本文整理汇总了PHP中wf_TableBody函数的典型用法代码示例。如果您正苦于以下问题:PHP wf_TableBody函数的具体用法?PHP wf_TableBody怎么用?PHP wf_TableBody使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wf_TableBody函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell(__('Date'));
$cells .= wf_TableCell(__('Text'));
$cells .= wf_TableCell(__('Processed'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($this->alltickets)) {
foreach ($this->alltickets as $io => $each) {
$cells = wf_TableCell($each['id']);
$cells .= wf_TableCell($each['date']);
if (strlen($each['text']) > 140) {
$textPreview = mb_substr(strip_tags($each['text']), 0, 140, 'utf-8') . '...';
} else {
$textPreview = strip_tags($each['text']);
}
$cells .= wf_TableCell($textPreview);
$cells .= wf_TableCell(web_bool_led($each['status']));
$cells .= wf_TableCell(wf_Link('?module=ticketing&showticket=' . $each['id'], __('Show'), false, 'ubButton'));
$rows .= wf_TableRow($cells, 'row3');
}
}
$result = wf_TableBody($rows, '100%', 0, 'sortable');
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:26,代码来源:index.php
示例2: stg_show_tagtypes
/**
* Render available tag types list with all needed controls
*
* @return string
*/
function stg_show_tagtypes()
{
$messages = new UbillingMessageHelper();
$query = "SELECT * from `tagtypes` ORDER BY `id` ASC";
$alltypes = simple_queryall($query);
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell(__('Color'));
$cells .= wf_TableCell(__('Priority'));
$cells .= wf_TableCell(__('Text'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($alltypes)) {
foreach ($alltypes as $io => $eachtype) {
$eachtagcolor = $eachtype['tagcolor'];
$actions = wf_JSAlert('?module=usertags&delete=' . $eachtype['id'], web_delete_icon(), $messages->getDeleteAlert());
$actions .= wf_JSAlert('?module=usertags&edit=' . $eachtype['id'], web_edit_icon(), $messages->getEditAlert());
$cells = wf_TableCell($eachtype['id']);
$cells .= wf_TableCell(wf_tag('font', false, '', 'color="' . $eachtagcolor . '"') . $eachtagcolor . wf_tag('font', true));
$cells .= wf_TableCell($eachtype['tagsize']);
$cells .= wf_TableCell($eachtype['tagname']);
$cells .= wf_TableCell($actions);
$rows .= wf_TableRow($cells, 'row3');
}
}
$result = wf_TableBody($rows, '100%', 0, 'sortable');
//construct adding form
$inputs = wf_ColPicker('newcolor', __('Color'), '#' . rand(11, 99) . rand(11, 99) . rand(11, 99), false, '10');
$inputs .= wf_TextInput('newtext', __('Text'), '', false, '15');
$inputs .= web_priority_selector() . ' ';
$inputs .= wf_HiddenInput('addnewtag', 'true');
$inputs .= wf_Submit(__('Create'));
$form = wf_Form("", 'POST', $inputs, 'glamour');
$result .= $form;
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:40,代码来源:api.usertags.php
示例3: web_CardShowUsageByMonth
/**
* Renders search results for used cards
*
* @param int $year
* @param string $month
*
* @return void
*/
function web_CardShowUsageByMonth($year, $month)
{
$month = mysql_real_escape_string($month);
$year = mysql_real_escape_string($year);
$query = "SELECT * from `cardbank` WHERE `usedate` LIKE '%" . $year . "-" . $month . "-%'";
$allusedcards = simple_queryall($query);
$allrealnames = zb_UserGetAllRealnames();
$alladdress = zb_AddressGetFulladdresslist();
$totalsumm = 0;
$totalcount = 0;
$csvdata = '';
$tablecells = wf_TableCell(__('ID'));
$tablecells .= wf_TableCell(__('Serial number'));
$tablecells .= wf_TableCell(__('Cash'));
$tablecells .= wf_TableCell(__('Usage date'));
$tablecells .= wf_TableCell(__('Used login'));
$tablecells .= wf_TableCell(__('Full address'));
$tablecells .= wf_TableCell(__('Real name'));
$tablerows = wf_TableRow($tablecells, 'row1');
if (!empty($allusedcards)) {
$csvdata = __('ID') . ';' . __('Serial number') . ';' . __('Cash') . ';' . __('Usage date') . ';' . __('Used login') . ';' . __('Full address') . ';' . __('Real name') . "\n";
foreach ($allusedcards as $io => $eachcard) {
$tablecells = wf_TableCell($eachcard['id']);
$tablecells .= wf_TableCell($eachcard['serial']);
$tablecells .= wf_TableCell($eachcard['cash']);
$tablecells .= wf_TableCell($eachcard['usedate']);
$profilelink = wf_Link("?module=userprofile&username=" . $eachcard['usedlogin'], web_profile_icon() . ' ' . $eachcard['usedlogin'], false);
$tablecells .= wf_TableCell($profilelink);
@($useraddress = $alladdress[$eachcard['usedlogin']]);
$tablecells .= wf_TableCell($useraddress);
@($userrealname = $allrealnames[$eachcard['usedlogin']]);
$tablecells .= wf_TableCell($userrealname);
$tablerows .= wf_TableRow($tablecells, 'row3');
$totalcount++;
$totalsumm = $totalsumm + $eachcard['cash'];
$csvdata .= $eachcard['id'] . ';' . $eachcard['serial'] . ';' . $eachcard['cash'] . ';' . $eachcard['usedate'] . ';' . $eachcard['usedlogin'] . ';' . $useraddress . ';' . $userrealname . "\n";
}
}
if (!empty($csvdata)) {
$exportFilename = 'exports/cardreport_' . $year . '-' . $month . '.csv';
$csvdata = iconv('utf-8', 'windows-1251', $csvdata);
file_put_contents($exportFilename, $csvdata);
$exportLink = wf_Link('?module=cardreport&dloadcsv=' . base64_encode($exportFilename), wf_img('skins/excel.gif', __('Export')), false, '');
} else {
$exportLink = '';
}
$result = wf_TableBody($tablerows, '100%', '0', 'sortable');
$result .= __('Total') . ': ' . $totalcount . ' ' . __('payments') . ', ' . __('with total amount') . ': ' . $totalsumm;
show_window(__('Payment cards usage report') . ' ' . $exportLink, $result);
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:58,代码来源:index.php
示例4: ts_EmployeeMonthGraphs
function ts_EmployeeMonthGraphs()
{
$curmonth = curmonth();
$employees = ts_GetAllEmployee();
$month_jobs_q = "SELECT `workerid`,`jobid` from `jobs` WHERE `date` LIKE '" . $curmonth . "%'";
$alljobs = simple_queryall($month_jobs_q);
$jobtypes = ts_GetAllJobtypes();
$jobdata = array();
$result = '';
if (!empty($employees)) {
if (!empty($alljobs)) {
foreach ($alljobs as $io => $eachjob) {
if (isset($jobdata[$eachjob['workerid']][$eachjob['jobid']])) {
$jobdata[$eachjob['workerid']][$eachjob['jobid']]++;
} else {
$jobdata[$eachjob['workerid']][$eachjob['jobid']] = 1;
}
}
}
//build graphs for each employee
if (!empty($jobdata)) {
foreach ($jobdata as $employee => $each) {
$employeeName = isset($employees[$employee]) ? $employees[$employee] : __('Deleted');
$result .= wf_tag('h3', false) . $employeeName . wf_tag('h3', true);
$rows = '';
if (!empty($each)) {
foreach ($each as $jobid => $count) {
$cells = wf_TableCell(@$jobtypes[$jobid], '40%');
$cells .= wf_TableCell($count, '20%');
$cells .= wf_TableCell(web_bar($count, sizeof($alljobs)), '40%');
$rows .= wf_TableRow($cells, 'row3');
}
}
$result .= wf_TableBody($rows, '100%', 0);
$result .= wf_delimiter();
}
}
}
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:40,代码来源:index.php
示例5: web_UsersLister
function web_UsersLister($users)
{
$tablecells = wf_TableCell(__('Login'));
$tablecells .= wf_TableCell(__('Real Name'));
$tablecells .= wf_TableCell(__('Full address'));
$tablecells .= wf_TableCell(__('Tariff'));
$tablecells .= wf_TableCell(__('Tariff speeds'));
$tablecells .= wf_TableCell(__('Speed override'));
$tablecells .= wf_TableCell(__('Actions'));
$tablerows = wf_TableRow($tablecells, 'row1');
if (!empty($users)) {
$udata = array();
$alluserdata = zb_UserGetAllStargazerData();
$alladdress = zb_AddressGetFulladdresslist();
$allrealnames = zb_UserGetAllRealnames();
$allspeeds = zb_TariffGetAllSpeeds();
if (!empty($alluserdata)) {
foreach ($alluserdata as $ia => $eachdata) {
$udata[$eachdata['login']]['Tariff'] = $eachdata['Tariff'];
@($udata[$eachdata['login']]['Address'] = $alladdress[$eachdata['login']]);
@($udata[$eachdata['login']]['RealName'] = $allrealnames[$eachdata['login']]);
@($udata[$eachdata['login']]['NormalSpeedDown'] = $allspeeds[$eachdata['Tariff']]['speeddown']);
@($udata[$eachdata['login']]['NormalSpeedUp'] = $allspeeds[$eachdata['Tariff']]['speedup']);
}
}
foreach ($users as $io => $eachuser) {
$tablecells = wf_TableCell(wf_Link('?module=userprofile&username=' . $eachuser['login'], web_profile_icon() . ' ' . $eachuser['login']));
$tablecells .= wf_TableCell($udata[$eachuser['login']]['RealName']);
$tablecells .= wf_TableCell($udata[$eachuser['login']]['Address']);
$tablecells .= wf_TableCell($udata[$eachuser['login']]['Tariff']);
$tablecells .= wf_TableCell($udata[$eachuser['login']]['NormalSpeedDown'] . '/' . $udata[$eachuser['login']]['NormalSpeedUp']);
$tablecells .= wf_TableCell(zb_UserGetSpeedOverride($eachuser['login']));
$fixlink = wf_JSAlert('?module=speedcontrol&fix=' . $eachuser['login'], '<img src="skins/icon_repair.gif" title=' . __('Fix') . '>', 'Are you serious');
$tablecells .= wf_TableCell($fixlink);
$tablerows .= wf_TableRow($tablecells, 'row3');
}
}
$result = wf_TableBody($tablerows, '100%', '0', 'sortable');
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:40,代码来源:index.php
示例6: web_NasTemplatesShow
function web_NasTemplatesShow()
{
$query = "SELECT * from `nastemplates`";
$alltemplates = simple_queryall($query);
$tablecells = wf_TableCell(__('ID'));
$tablecells .= wf_TableCell(__('NAS'));
$tablecells .= wf_TableCell(__('Template'));
$tablecells .= wf_TableCell(__('Actions'));
$tablerows = wf_TableRow($tablecells, 'row1');
if (!empty($alltemplates)) {
foreach ($alltemplates as $io => $eachtemplate) {
$nasdata = zb_NasGetData($eachtemplate['nasid']);
$tablecells = wf_TableCell($eachtemplate['id']);
$tablecells .= wf_TableCell($eachtemplate['nasid'] . ':' . $nasdata['nasname']);
$tablecells .= wf_TableCell('<pre>' . $eachtemplate['template'] . '</pre>');
$actions = wf_JSAlert("?module=radiust&delete=" . $eachtemplate['id'], web_delete_icon(), 'Are you serious');
$actions .= wf_Link("?module=radiust&edit=" . $eachtemplate['id'], web_edit_icon(), false, '');
$tablecells .= wf_TableCell($actions);
$tablerows .= wf_TableRow($tablecells, 'row3');
}
}
$result = wf_TableBody($tablerows, '100%', '0', 'sortable');
show_window(__('Available NAS Radius attribute templates'), $result);
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:24,代码来源:api.radius.php
示例7: web_PhpConsoleShowTemplates
function web_PhpConsoleShowTemplates()
{
$alltemplatekeys = zb_StorageFindKeys('PHPCONSOLETEMPLATE:');
$tablecells = wf_TableCell(__('Template'), '80%');
$tablecells .= wf_TableCell(__('Actions'));
$tablerows = wf_TableRow($tablecells, 'row1');
if (!empty($alltemplatekeys)) {
foreach ($alltemplatekeys as $eachtemplatekey) {
$templatearray = zb_PhpConsoleGetTemplate($eachtemplatekey['key']);
$templatename = $templatearray['name'];
$templatebody = $templatearray['body'];
//show code template
$runlink = wf_JSAlert('?module=sqlconsole&devconsole=true&runtpl=' . $eachtemplatekey['key'], $templatename, 'Insert this template into PHP console');
$tablecells = wf_TableCell($runlink);
$actionlinks = wf_JSAlert('?module=sqlconsole&devconsole=true&deltemplate=' . $eachtemplatekey['key'], web_delete_icon(), 'Are you serious');
$actionlinks .= wf_Link('?module=sqlconsole&devconsole=true&edittemplate=' . $eachtemplatekey['key'], web_edit_icon());
$tablecells .= wf_TableCell($actionlinks);
$tablerows .= wf_TableRow($tablecells, 'row3');
}
}
$createlink = __('Available code templates') . ' ' . wf_Link("?module=sqlconsole&devconsole=true&templateadd=true", wf_img("skins/icon_add.gif", __('Create')), false);
$result = $createlink . ' ' . wf_TableBody($tablerows, '100%', '0', 'sortable');
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:24,代码来源:index.php
示例8: renderGraphs
/**
* Renders per-payment system openpayz transaction charts
*
* @return string
*/
public function renderGraphs()
{
$psysdata = array();
$gcAllData = array();
$gcMonthData = array();
$result = wf_Link('?module=openpayz', __('Back'), true, 'ubButton');
if (!empty($this->allTransactions)) {
foreach ($this->allTransactions as $io => $each) {
$timestamp = strtotime($each['date']);
$curMonth = curmonth();
$date = date("Y-m-01", $timestamp);
if (isset($psysdata[$each['paysys']][$date]['count'])) {
$psysdata[$each['paysys']][$date]['count']++;
$psysdata[$each['paysys']][$date]['summ'] = $psysdata[$each['paysys']][$date]['summ'] + $each['summ'];
} else {
$psysdata[$each['paysys']][$date]['count'] = 1;
$psysdata[$each['paysys']][$date]['summ'] = $each['summ'];
}
//all time stats
if (isset($gcAllData[$each['paysys']])) {
$gcAllData[$each['paysys']]++;
} else {
$gcAllData[$each['paysys']] = 1;
}
//current month stats
if (ispos($date, $curMonth . '-')) {
if (isset($gcMonthData[$each['paysys']])) {
$gcMonthData[$each['paysys']]++;
} else {
$gcMonthData[$each['paysys']] = 1;
}
}
}
}
$chartOpts = "chartArea: { width: '90%', height: '90%' }, legend : {position: 'right'}, ";
if (!empty($gcAllData)) {
$gcAllPie = wf_gcharts3DPie($gcAllData, __('All time'), '400px', '400px', $chartOpts);
} else {
$gcAllPie = '';
}
if (!empty($gcMonthData)) {
$gcMonthPie = wf_gcharts3DPie($gcMonthData, __('Current month'), '400px', '400px', $chartOpts);
} else {
$gcMonthPie = '';
}
$gcells = wf_TableCell($gcAllPie);
$gcells .= wf_TableCell($gcMonthPie);
$grows = wf_TableRow($gcells);
$result .= wf_TableBody($grows, '100%', 0, '');
if (!empty($psysdata)) {
foreach ($psysdata as $psys => $opdate) {
$gdata = __('Date') . ',' . __('Count') . ',' . __('Cash') . "\n";
foreach ($opdate as $datestamp => $optrans) {
$gdata .= $datestamp . ',' . $optrans['count'] . ',' . $optrans['summ'] . "\n";
}
$result .= wf_tag('div', false, '', '');
$result .= wf_tag('h2') . $psys . wf_tag('h2', true) . wf_delimiter();
$result .= wf_Graph($gdata, '800', '200', false);
$result .= wf_tag('div', true);
}
}
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:68,代码来源:api.opayz.php
示例9: web_SignupGraph
/**
* Shows signup tariffs popularity chart
*
* @return void
*/
function web_SignupGraph()
{
if (!wf_CheckGet(array('month'))) {
$cmonth = curmonth();
} else {
$cmonth = mysql_real_escape_string($_GET['month']);
}
$where = "WHERE `date` LIKE '" . $cmonth . "%'";
$alltariffnames = zb_TariffsGetAll();
$tariffusers = zb_TariffsGetAllUsers();
$allsignups = zb_SignupsGet($where);
$tcount = array();
if (!empty($allsignups)) {
foreach ($alltariffnames as $io => $eachtariff) {
foreach ($allsignups as $ii => $eachsignup) {
if (@$tariffusers[$eachsignup['login']] == $eachtariff['name']) {
@($tcount[$eachtariff['name']] = $tcount[$eachtariff['name']] + 1);
}
}
}
}
$tablecells = wf_TableCell(__('Tariff'));
$tablecells .= wf_TableCell(__('Count'));
$tablecells .= wf_TableCell(__('Visual'));
$tablerows = wf_TableRow($tablecells, 'row1');
if (!empty($tcount)) {
foreach ($tcount as $sigtariff => $eachcount) {
$tablecells = wf_TableCell($sigtariff);
$tablecells .= wf_TableCell($eachcount);
$tablecells .= wf_TableCell(web_bar($eachcount, sizeof($allsignups)), '', '', 'sorttable_customkey="' . $eachcount . '"');
$tablerows .= wf_TableRow($tablecells, 'row3');
}
}
$result = wf_TableBody($tablerows, '100%', '0', 'sortable');
show_window(__('Tariffs report'), $result);
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:41,代码来源:index.php
示例10: ts_ShowLate
/**
* Returns list of expired undone tasks
*
* @return string
*/
function ts_ShowLate()
{
$allemployee = ts_GetAllEmployee();
$alljobtypes = ts_GetAllJobtypes();
$curyear = curyear();
$curmonth = date("m");
$curdate = curdate();
if ($curmonth != 1 and $curmonth != 12) {
$query = "SELECT * from `taskman` WHERE `status`='0' AND `startdate` LIKE '" . $curyear . "-%' AND `startdate`< '" . $curdate . "' ORDER BY `startdate` ASC";
} else {
$query = "SELECT * from `taskman` WHERE `status`='0' AND `startdate`< '" . $curdate . "' ORDER BY `startdate` ASC";
}
$cells = wf_TableCell(__('Target date'));
$cells .= wf_TableCell(__('Task address'));
$cells .= wf_TableCell(__('Phone'));
$cells .= wf_TableCell(__('Job type'));
$cells .= wf_TableCell(__('Who should do'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
$all = simple_queryall($query);
if (!empty($all)) {
foreach ($all as $io => $each) {
$cells = wf_TableCell($each['startdate']);
$cells .= wf_TableCell($each['address']);
$cells .= wf_TableCell($each['phone']);
$cells .= wf_TableCell(@$alljobtypes[$each['jobtype']]);
$cells .= wf_TableCell(@$allemployee[$each['employee']]);
$actions = wf_Link('?module=taskman&edittask=' . $each['id'], web_edit_icon(), false, '');
$cells .= wf_TableCell($actions);
$rows .= wf_TableRow($cells, 'row3');
}
}
$result = wf_TableBody($rows, '100%', '0', 'sortable');
return $result;
}
开发者ID:carriercomm,项目名称:Ubilling,代码行数:40,代码来源:api.teskman.php
示例11: cf_FieldShower
/**
* Returns CFs listing for some login
*
* @param string $login Existing user login
*
* @return string
*/
function cf_FieldShower($login)
{
$alltypes = cf_TypeGetAll();
$login = mysql_real_escape_string($login);
$result = '';
if (!empty($alltypes)) {
$rows = '';
foreach ($alltypes as $io => $eachtype) {
$cells = wf_TableCell($eachtype['name'], '30%', 'row2');
$cells .= wf_TableCell(cf_FieldDisplay($eachtype['type'], cf_FieldGet($login, $eachtype['id'])), '', 'row3');
$rows .= wf_TableRow($cells);
}
$result = wf_TableBody($rows, '100%', 0, '');
}
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:23,代码来源:api.cf.php
示例12: web_TsmsMassendConfirm
function web_TsmsMassendConfirm($userarray)
{
global $td_users, $td_mobiles, $td_realnames, $td_realnamestrans, $td_tariffprices, $td_alladdress;
global $ubillingConfig;
$altCfg = $ubillingConfig->getAlter();
$template = tsms_GetTemplate();
$excludeUsers = tsms_GetExcludeUsers();
$excludeArr = array();
//ignoring DEAD_TAGID users
if ($altCfg['CEMETERY_ENABLED']) {
$cemetery = new Cemetery();
$excludeCemetery = $cemetery->getAllTagged();
if (!empty($excludeCemetery)) {
foreach ($excludeCemetery as $eecl => $eecld) {
$excludeUsers[$eecl] = 'NOP';
}
}
}
$cells = wf_TableCell(__('Login'));
$cells .= wf_TableCell(__('Address'));
$cells .= wf_TableCell(__('Real Name'));
$cells .= wf_TableCell(__('SMS'));
$cells .= wf_TableCell(__('Mobile'));
$cells .= wf_TableCell(__('Tariff'));
$cells .= wf_TableCell(__('Balance'));
$cells .= wf_TableCell(__('Credit'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($userarray)) {
//excluded users handling
if (!empty($excludeUsers)) {
$excludeResult = wf_tag('h3') . __('Next users will be ignored while SMS sending') . wf_tag('h3', true);
foreach ($excludeUsers as $excludeLogin => $nop) {
unset($userarray[$excludeLogin]);
$excludeArr[$excludeLogin] = $excludeLogin;
}
} else {
$excludeResult = '';
}
foreach ($userarray as $login => $phone) {
$message = tsms_ParseTemplate($login, $template);
$smsContainer = wf_modal(__('Show'), __('SMS'), $message, '', '300', '200');
$cells = wf_TableCell(wf_Link("?module=userprofile&username=" . $login, web_profile_icon() . ' ' . $login, false));
$cells .= wf_TableCell(@$td_alladdress[$login]);
$cells .= wf_TableCell(@$td_realnames[$login]);
$cells .= wf_TableCell($smsContainer);
$cells .= wf_TableCell($td_mobiles[$login]);
$cells .= wf_TableCell($td_users[$login]['Tariff']);
$cells .= wf_TableCell($td_users[$login]['Cash']);
$cells .= wf_TableCell($td_users[$login]['Credit']);
$rows .= wf_TableRow($cells, 'row3');
}
}
//confirmation form
$packdata = serialize($userarray);
$packdata = base64_encode($packdata);
$inputs = wf_HiddenInput('massendConfirm', $packdata);
$inputs .= wf_Submit(__('Send SMS for all of this users'));
$confirmForm = wf_Form("", 'POST', $inputs, 'glamour');
$result = $confirmForm;
$result .= wf_TableBody($rows, '100%', '0', 'sortable');
//showing which users will be excluded
if (!empty($excludeUsers)) {
$result .= $excludeResult;
$result .= web_UserArrayShower($excludeArr);
}
return $result;
}
开发者ID:syscenter,项目名称:ubilling-sms,代码行数:67,代码来源:index.php
示例13: web_CityLister
/**
* Returns available cities lister with some controls
*
* @return string
*/
function web_CityLister()
{
$allcity = zb_AddressGetCityAllData();
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell(__('City name'));
$cells .= wf_TableCell(__('City alias'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($allcity)) {
foreach ($allcity as $io => $eachcity) {
$cells = wf_TableCell($eachcity['id']);
$cells .= wf_TableCell($eachcity['cityname']);
$cells .= wf_TableCell($eachcity['cityalias']);
$acts = wf_JSAlert('?module=city&action=delete&cityid=' . $eachcity['id'], web_delete_icon(), 'Removing this may lead to irreparable results') . ' ';
$acts .= wf_JSAlert('?module=city&action=edit&cityid=' . $eachcity['id'], web_edit_icon(), 'Are you serious') . ' ';
$acts .= wf_Link('?module=streets', web_street_icon(), false, '');
$cells .= wf_TableCell($acts);
$rows .= wf_TableRow($cells, 'row3');
}
}
$result = wf_TableBody($rows, '100%', 0, 'sortable');
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:28,代码来源:api.address.php
示例14: renderCemeteryLog
/**
* Renders full cemetary log for some user
*
* @param string $login
*
* @return string
*/
public function renderCemeteryLog($login)
{
$result = '';
if (!empty($this->allDead)) {
$cells = wf_TableCell(__('Date'));
$cells .= wf_TableCell(__('Status'));
$rows = wf_TableRow($cells, 'row1');
foreach ($this->allDead as $io => $each) {
if ($each['login'] == $login) {
$led = $each['state'] ? web_bool_led(0) : web_bool_led(1);
$cells = wf_TableCell($each['date']);
$cells .= wf_TableCell($led);
$rows .= wf_TableRow($cells, 'row3');
}
}
$result = wf_TableBody($rows, '100%', 0, 'sortable');
if (cfr('USERREG')) {
if ($this->isUserDead($login)) {
$inputs = wf_HiddenInput('cemeterysetasundead', $login);
$inputs .= wf_Submit(__('Set user connected'));
$result .= wf_Form('', 'POST', $inputs, 'glamour');
} else {
$inputs = wf_HiddenInput('cemeterysetasdead', $login);
$inputs .= wf_Submit(__('Set user disconnected'));
$result .= wf_Form('', 'POST', $inputs, 'glamour');
}
}
}
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:37,代码来源:api.cemetery.php
示例15: renderComments
/**
* Returns list of available comments for some item
*
* @param string $item
* @return string
*/
public function renderComments($item)
{
$this->setItem($item);
$this->loadComments();
$this->commentSaver();
@($employeeLogins = unserialize(ts_GetAllEmployeeLoginsCached()));
$result = '';
$rows = '';
if (!empty($this->data)) {
foreach ($this->data as $io => $each) {
$authorRealname = isset($employeeLogins[$each['admin']]) ? $employeeLogins[$each['admin']] : $each['admin'];
$authorName = wf_tag('center') . wf_tag('b') . $authorRealname . wf_tag('b', true) . wf_tag('center', true);
$authorAvatar = wf_tag('center') . @gravatar_ShowAdminAvatar($each['admin'], '64') . wf_tag('center', true);
$commentController = wf_tag('center') . $this->commentControls($each['id']) . wf_tag('center', true);
$authorPanel = $authorName . wf_tag('br') . $authorAvatar . wf_tag('br') . $commentController;
$commentText = nl2br($each['text']);
if (wf_CheckPost(array('adcommentseditid'))) {
if ($_POST['adcommentseditid'] == $each['id']) {
$commentText = $this->commentEditForm($each['id']);
} else {
$commentText = nl2br($each['text']);
}
}
$cells = wf_TableCell('', '20%');
$cells .= wf_TableCell($each['date']);
$rows .= wf_TableRow($cells, 'row2');
$cells = wf_TableCell($authorPanel);
$cells .= wf_TableCell($commentText);
$rows .= wf_TableRow($cells, 'row3');
}
$result .= wf_TableBody($rows, '100%', '0', '');
}
$result .= $this->commentAddForm();
return $result;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:41,代码来源:api.adcomments.php
示例16: zb_AskoziaParseStatus
function zb_AskoziaParseStatus($rawData)
{
$exploded = explodeRows($rawData);
$data = array('phones' => 0, 'curcalls' => 0, 'totalcalls' => 0, 'ram' => 0, 'disk' => 0, 'uptime' => 0);
if (!empty($exploded)) {
foreach ($exploded as $each) {
//detecting stats
if (ispos($each, ';')) {
$parse = explode(';', $each);
//current calls
$data['curcalls'] = $parse[1];
//total calls
$data['totalcalls'] = $parse[2];
//registered phones
$data['phones'] = $parse[4];
//uptime in days or minutes
$data['uptime'] = $parse[5];
$data['uptime'] = str_replace('min', __('minutes'), $data['uptime']);
$data['uptime'] = str_replace('hours', __('hours'), $data['uptime']);
$data['uptime'] = str_replace('hour', __('hour'), $data['uptime']);
$data['uptime'] = str_replace('days', __('days'), $data['uptime']);
$data['uptime'] = str_replace('day', __('day'), $data['uptime']);
//system memory
$data['ram'] = $parse[6];
//external storage
$data['disk'] = $parse[7];
}
}
}
$cells = wf_TableCell(__('Phones'));
$cells .= wf_TableCell(__('Current calls'));
$cells .= wf_TableCell(__('Calls processed'));
$cells .= wf_TableCell(__('Uptime'));
$cells .= wf_TableCell(__('Memory usage'));
$cells .= wf_TableCell(__('External storage'));
$rows = wf_TableRow($cells, 'row2');
$cells = wf_TableCell($data['phones']);
$cells .= wf_TableCell($data['curcalls']);
$cells .= wf_TableCell($data['totalcalls']);
$cells .= wf_TableCell($data['uptime']);
$cells .= wf_TableCell(web_bar($data['ram'], '100') . ' ' . $data['ram'] . '%');
$cells .= wf_TableCell(web_bar($data['disk'], '100') . ' ' . $data['disk'] . '%');
$rows .= wf_TableRow($cells, 'row3');
$result = wf_TableBody($rows, '100%', 0, '');
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:46,代码来源:index.php
示例17: ub_SwitchesTimeMachineSearch
/**
* Do the search in dead switches time machine
*
* @param string $query
* @return string
*/
function ub_SwitchesTimeMachineSearch($request)
{
$request = strtolower_utf8($request);
$result = '';
$query = "SELECT * from `switchdeadlog` ORDER BY `id` DESC";
$raw = simple_queryall($query);
$deadcount = 0;
$tmpArr = array();
if (!empty($raw)) {
foreach ($raw as $io => $each) {
if (!empty($each)) {
$switchData = unserialize($each['swdead']);
foreach ($switchData as $switchIp => $switchLocation) {
if (ispos(strtolower_utf8($switchIp), $request) or ispos(strtolower_utf8($switchLocation), $request)) {
$searchId = zb_rand_string(8);
$tmpArr[$searchId]['date'] = $each['date'];
$tmpArr[$searchId]['ip'] = $switchIp;
$tmpArr[$searchId]['location'] = $switchLocation;
}
}
}
}
}
if (!empty($tmpArr)) {
$cells = wf_TableCell(__('Date'));
$cells .= wf_TableCell(__('IP'));
$cells .= wf_TableCell(__('Location'));
$rows = wf_TableRow($cells, 'row1');
foreach ($tmpArr as $ia => $eachResult) {
$cells = wf_TableCell($eachResult['date']);
$cells .= wf_TableCell($eachResult['ip']);
$cells .= wf_TableCell($eachResult['location']);
$rows .= wf_TableRow($cells, 'row3');
$deadcount++;
}
$result = wf_TableBody($rows, '100%', 0, 'sortable');
$result .= __('Total') . ': ' . $deadcount;
} else {
$result = __('Nothing found');
}
return $result;
}
开发者ID:carriercomm,项目名称:Ubilling,代码行数:48,代码来源:api.switches.php
示例18: renderList
/**
* Returns available time rules grid
*
* @return string
*/
public function renderList()
{
$messages = new UbillingMessageHelper();
$allTariffs = zb_TariffGetPricesAll();
$query = "SELECT * from `dshape_time` ORDER BY `id` ASC";
$allrules = simple_queryall($query);
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell(__('Tariff'));
$cells .= wf_TableCell(__('Time from'));
$cells .= wf_TableCell(__('Time to'));
$cells .= wf_TableCell(__('Speed'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($allrules)) {
foreach ($allrules as $io => $eachrule) {
$rowClass = isset($allTariffs[$eachrule['tariff']]) ? 'row3' : 'sigdeleteduser';
$tariffControl = cfr('TARIFFSPEED') ? wf_Link('?module=tariffspeeds&tariff=' . $eachrule['tariff'], $eachrule['tariff'], false) : $eachrule['tariff'];
$cells = wf_TableCell($eachrule['id']);
$cells .= wf_TableCell($tariffControl);
$cells .= wf_TableCell($eachrule['threshold1']);
$cells .= wf_TableCell($eachrule['threshold2']);
$cells .= wf_TableCell($eachrule['speed']);
$actions = wf_JSAlert('?module=dshaper&delete=' . $eachrule['id'], web_delete_icon(), $messages->getDeleteAlert());
$actions .= wf_JSAlert('?module=dshaper&edit=' . $eachrule['id'], web_edit_icon(), $messages->getEditAlert());
$cells .= wf_TableCell($actions);
$rows .= wf_TableRow($cells, $rowClass);
}
}
$result = wf_TableBody($rows, '100%', '0', 'sortable');
return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:36,代码来源:api.dshaper.php
示例19: wf_TableCell
$userip = @$alluserips[$backmaclogin];
} else {
$profilelink = '';
$realname = '';
$usertariff = '';
$userip = '';
}
$tablecells = wf_TableCell($profilelink);
$tablecells .= wf_TableCell($realname);
$tablecells .= wf_TableCell($usertariff);
$tablecells .= wf_TableCell($userip);
$tablecells .= wf_TableCell($eachmac);
$tablecells .= wf_TableCell($displaysig);
$tablerows .= wf_TableRow($tablecells, $rowclass);
}
$result .= wf_TableBody($tablerows, '100%', '0', 'sortable');
} else {
$result .= __('Empty reply received');
}
$result .= wf_tag('div', false, '', 'style="clear:both;"') . wf_tag('div', true);
$result .= wf_tag('div', false, 'glamour') . __('Total') . ': ' . $userCounter . wf_tag('div', true);
$result .= wf_tag('div', false, '', 'style="clear:both;"') . wf_tag('div', true);
$result .= wf_delimiter();
}
} else {
$result = __('No devices for signal monitoring found');
}
//if called as an user profile plugin
if (isset($_GET['username'])) {
$result .= wf_Link('?module=userprofile&username=' . $_GET['username'], __('Back'), true, 'ubButton');
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php
示例20: getPonSignalControl
/**
* Renders PON signal from cache
*
* @return string
*/
protected function getPonSignalControl()
{
$result = '';
$searched = __('No');
$sigColor = '#000000';
if ($this->alterCfg['SIGNAL_IN_PROFILE']) {
$query = "SELECT `mac`,`oltid` FROM `pononu` WHERE `login`='" . $this->login . "'";
$onu_data = simple_query($query);
if (!empty($onu_data)) {
$availCacheData = rcms_scandir(PONizer::SIGCACHE_PATH, $onu_data['oltid'] . "_" . PONizer::SIGCACHE_EXT);
if (!empty($availCacheData)) {
foreach ($availCacheData as $io => $each) {
$raw = file_get_contents(PONizer::SIGCACHE_PATH . $each);
$raw = unserialize($raw);
foreach ($raw as $mac => $signal) {
if ($mac == $onu_data['mac']) {
if ($signal > 0 or $signal < -25) {
$sigColor = '#ab0000';
} else {
$sigColor = '#005502';
}
$searched = $signal;
}
}
}
}
$cells = wf_TableCell(__("ONU Signal"), '30%', 'row2');
$cells .= wf_TableCell(wf_tag('strong') . wf_tag('font color=' . $sigColor, false) . $searched . wf_tag('font', true) . wf_tag('strong', true));
$rows = wf_TableRow($cells, 'row3');
$result = wf_TableBody($rows, '100%', '0');
}
}
return $result;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:39,代码来源:api.userprofile.php
注:本文中的wf_TableBody函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论