本文整理汇总了PHP中wf_TableCell函数的典型用法代码示例。如果您正苦于以下问题:PHP wf_TableCell函数的具体用法?PHP wf_TableCell怎么用?PHP wf_TableCell使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wf_TableCell函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}