本文整理汇总了PHP中wf_JSAlert函数的典型用法代码示例。如果您正苦于以下问题:PHP wf_JSAlert函数的具体用法?PHP wf_JSAlert怎么用?PHP wf_JSAlert使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wf_JSAlert函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Renders list of available SMS in queue with some controls
*
* @return string
*/
public function render()
{
$result = '';
if (!empty($this->queue)) {
$cells = wf_TableCell(__('Date'));
$cells .= wf_TableCell(__('Mobile'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
foreach ($this->queue as $io => $each) {
$cells = wf_TableCell($each['date']);
$cells .= wf_TableCell($each['number']);
$actLinks = wf_modalAuto(wf_img('skins/icon_search_small.gif', __('Preview')), __('Preview'), $this->smsPreview($each), '');
$actLinks .= wf_JSAlert('?module=tsmsqueue&deletesms=' . $each['filename'], web_delete_icon(), __('Are you serious'));
$cells .= wf_TableCell($actLinks);
$rows .= wf_TableRow($cells, 'row3');
}
$result = wf_TableBody($rows, '100%', 0, 'sortable');
} else {
$result .= wf_tag('span', false, 'alert_info');
$result .= wf_tag('center', false);
$result .= __('Nothing found');
$result .= wf_tag('center', true);
$result .= wf_tag('span', true);
}
return $result;
}
示例2: web_AvailableDBBackupsList
function web_AvailableDBBackupsList()
{
$backupsPath = DATA_PATH . 'backups/sql/';
$availbacks = rcms_scandir($backupsPath);
$result = __('No existing DB backups here');
if (!empty($availbacks)) {
$cells = wf_TableCell(__('Date'));
$cells .= wf_TableCell(__('Size'));
$cells .= wf_TableCell(__('Filename'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
foreach ($availbacks as $eachDump) {
$fileDate = filectime($backupsPath . $eachDump);
$fileDate = date("Y-m-d H:i:s", $fileDate);
$fileSize = filesize($backupsPath . $eachDump);
$fileSize = stg_convert_size($fileSize);
$encodedDumpPath = base64_encode($backupsPath . $eachDump);
$downloadLink = wf_Link('?module=backups&download=' . $encodedDumpPath, $eachDump, false, '');
$actLinks = wf_JSAlert('?module=backups&deletedump=' . $encodedDumpPath, web_delete_icon(), __('Removing this may lead to irreparable results')) . ' ';
$actLinks .= wf_Link('?module=backups&download=' . $encodedDumpPath, wf_img('skins/icon_download.png', __('Download')), false, '');
$actLinks .= wf_JSAlert('?module=backups&restore=true&restoredump=' . $encodedDumpPath, wf_img('skins/icon_restoredb.png', __('Restore DB')), __('Are you serious'));
$cells = wf_TableCell($fileDate);
$cells .= wf_TableCell($fileSize);
$cells .= wf_TableCell($downloadLink);
$cells .= wf_TableCell($actLinks);
$rows .= wf_TableRow($cells, 'row3');
}
$result = wf_TableBody($rows, '100%', '0', 'sortable');
}
return $result;
}
示例3: 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;
}
示例4: web_list_admins
/**
* Returns available administrators list
*
* @return string
*/
function web_list_admins()
{
$alladmins = rcms_scandir(USERS_PATH);
$cells = wf_TableCell(__('Admin'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($alladmins)) {
foreach ($alladmins as $eachadmin) {
$actions = wf_JSAlert('?module=permissions&delete=' . $eachadmin, web_delete_icon(), 'Removing this may lead to irreparable results');
$actions .= wf_Link('?module=permissions&passwd=' . $eachadmin, web_key_icon());
$actions .= wf_Link('?module=permissions&edit=' . $eachadmin, web_edit_icon('Rights'));
$cells = wf_TableCell($eachadmin);
$cells .= wf_TableCell($actions);
$rows .= wf_TableRow($cells, 'row3');
}
}
$form = wf_TableBody($rows, '100%', '0', 'sortable');
return $form;
}
示例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: multinet_show_available_services
function multinet_show_available_services()
{
$allservices = multinet_get_services();
$tablecells = wf_TableCell(__('ID'));
$tablecells .= wf_TableCell(__('Network'));
$tablecells .= wf_TableCell(__('Service name'));
$tablecells .= wf_TableCell(__('Actions'));
$tablerows = wf_TableRow($tablecells, 'row1');
if (!empty($allservices)) {
foreach ($allservices as $io => $eachservice) {
$netdesc = multinet_get_network_params($eachservice['netid']);
$tablecells = wf_TableCell($eachservice['id']);
$tablecells .= wf_TableCell($netdesc['desc']);
$tablecells .= wf_TableCell($eachservice['desc']);
$actionlinks = wf_JSAlert('?module=multinet&deleteservice=' . $eachservice['id'], web_delete_icon(), 'Removing this may lead to irreparable results');
$actionlinks .= wf_JSAlert('?module=multinet&editservice=' . $eachservice['id'], web_edit_icon(), 'Are you serious');
$tablecells .= wf_TableCell($actionlinks);
$tablerows .= wf_TableRow($tablecells, 'row3');
}
}
$result = wf_TableBody($tablerows, '100%', '0', 'sortable');
show_window(__('Services'), $result);
}
示例9: ub_SwitchesTimeMachineCleanup
//show dead switch time machine
if (!isset($_GET['snapshot'])) {
//cleanup subroutine
if (wf_CheckGet(array('flushalldead'))) {
ub_SwitchesTimeMachineCleanup();
rcms_redirect("?module=switches&timemachine=true");
}
//calendar view time machine
if (!wf_CheckPost(array('switchdeadlogsearch'))) {
$deadTimeMachine = ub_JGetSwitchDeadLog();
$timeMachine = wf_FullCalendar($deadTimeMachine);
} else {
//search processing
$timeMachine = ub_SwitchesTimeMachineSearch($_POST['switchdeadlogsearch']);
}
$timeMachineCleanupControl = wf_JSAlert('?module=switches&timemachine=true&flushalldead=true', wf_img('skins/icon_cleanup.png', __('Cleanup')), __('Are you serious'));
//here some searchform
$timeMachineSearchForm = web_SwitchTimeMachineSearchForm() . wf_tag('br');
show_window(__('Dead switches time machine') . ' ' . $timeMachineCleanupControl, $timeMachineSearchForm . $timeMachine);
} else {
//showing dead switches snapshot
ub_SwitchesTimeMachineShowSnapshot($_GET['snapshot']);
}
}
} else {
//editing switch form
$switchid = vf($_GET['edit'], 3);
$switchdata = zb_SwitchGetData($switchid);
//if someone edit switch
if (wf_CheckPost(array('editmodel'))) {
if (cfr('SWITCHESEDIT')) {
示例10: web_SwitchModelsShow
/**
* Returns list of all available switch models
*
* @return string
*/
function web_SwitchModelsShow()
{
$query = 'SELECT * from `switchmodels`';
$allmodels = simple_queryall($query);
$tablecells = wf_TableCell(__('ID'));
$tablecells .= wf_TableCell(__('Model'));
$tablecells .= wf_TableCell(__('Ports'));
$tablecells .= wf_TableCell(__('SNMP template'));
$tablecells .= wf_TableCell(__('Actions'));
$tablerows = wf_TableRow($tablecells, 'row1');
/**
* Now its time to break up with the system
* Our reasons are clear and listed
* Come on and change the cause of the history
* Take off disguise of that rotten mystery
*/
if (!empty($allmodels)) {
foreach ($allmodels as $io => $eachmodel) {
$tablecells = wf_TableCell($eachmodel['id']);
$tablecells .= wf_TableCell($eachmodel['modelname']);
$tablecells .= wf_TableCell($eachmodel['ports']);
$tablecells .= wf_TableCell($eachmodel['snmptemplate']);
$switchmodelcontrols = wf_JSAlert('?module=switchmodels&deletesm=' . $eachmodel['id'], web_delete_icon(), 'Removing this may lead to irreparable results');
$switchmodelcontrols .= wf_Link('?module=switchmodels&edit=' . $eachmodel['id'], web_edit_icon());
$tablecells .= wf_TableCell($switchmodelcontrols);
$tablerows .= wf_TableRow($tablecells, 'row3');
}
}
$result = wf_TableBody($tablerows, '100%', '0', 'sortable');
return $result;
}
示例11: 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;
}
示例12: gen_check_users
function gen_check_users()
{
global $etalon_day_band, $control_tariffs, $etalon_speed, $cur_day, $home_band_p;
$tariff_names = array_keys($control_tariffs);
$genocide_qarr = array();
$band_arr = array();
$geninputs = wf_TextInput('home_band_p', 'Normal bandwidth load', $home_band_p, false, '2') . ' %';
$geninputs .= wf_HiddenInput('change_settings', 'true') . ' ';
$geninputs .= wf_Submit('Change');
$genform = wf_Form('', 'POST', $geninputs, 'glamour');
$result = $genform;
$tablecells = wf_TableCell(__('Tariff'));
$tablecells .= wf_TableCell(__('Normal day band'));
$tablecells .= wf_TableCell(__('Current date normal band'));
$tablecells .= wf_TableCell(__('Speed'));
$tablecells .= wf_TableCell(__('Actions'));
$tablerows = wf_TableRow($tablecells, 'row1');
$i = 0;
foreach ($control_tariffs as $eachtariff) {
@($cspeed_k = $etalon_speed / $eachtariff);
@($cband_k = $etalon_day_band / $cspeed_k);
$dband_l = $cband_k * $cur_day;
$band_arr[$i][$tariff_names[$i]] = $dband_l * 1024 * 1024;
$tablecells = wf_TableCell($tariff_names[$i]);
$tablecells .= wf_TableCell(stg_convert_size($cband_k * 1024 * 1024));
$tablecells .= wf_TableCell(stg_convert_size($band_arr[$i][$tariff_names[$i]]));
$tablecells .= wf_TableCell($eachtariff);
$gactions = wf_JSAlert('?module=genocide&delete=' . $tariff_names[$i], web_delete_icon(), 'Are you serious');
$tablecells .= wf_TableCell($gactions);
$tablerows .= wf_TableRow($tablecells, 'row3');
$i++;
}
//controlled tariffs
$result .= wf_TableBody($tablerows, '100%', '0', '');
$i = 0;
foreach ($band_arr as $eachtariff => $eachband) {
$query = "SELECT * from `users` WHERE `D0`+`U0`>'" . $eachband[$tariff_names[$i]] . "' and `Tariff`='" . $tariff_names[$i] . "';";
$genocide_qarr[] = $query;
$i++;
}
$tablecells = wf_TableCell(__('Login'));
$tablecells .= wf_TableCell(__('Full address'));
$tablecells .= wf_TableCell(__('Real Name'));
$tablecells .= wf_TableCell(__('Tariff'));
$tablecells .= wf_TableCell(__('IP'));
$tablecells .= wf_TableCell(__('Downloaded'));
$tablecells .= wf_TableCell(__('Uploaded'));
$tablecells .= wf_TableCell(__('Total'));
$tablerows = wf_TableRow($tablecells, 'row1');
foreach ($genocide_qarr as $each_q) {
$genocide_users = simple_queryall($each_q);
if (!empty($genocide_users)) {
$alluseraddress = zb_AddressGetFulladdresslist();
$allusernames = zb_UserGetAllRealnames();
foreach ($genocide_users as $io => $eachuser) {
$profilelink = wf_Link('?module=userprofile&username=' . $eachuser['login'], web_profile_icon() . ' ' . $eachuser['login']);
$tablecells = wf_TableCell($profilelink);
$tablecells .= wf_TableCell(@$alluseraddress[$eachuser['login']]);
$tablecells .= wf_TableCell(@$allusernames[$eachuser['login']]);
$tablecells .= wf_TableCell($eachuser['Tariff']);
$tablecells .= wf_TableCell($eachuser['IP'], '', '', 'sorttable_customkey="' . ip2int($eachuser['IP']) . '"');
$tablecells .= wf_TableCell(stg_convert_size($eachuser['D0']), '', '', 'sorttable_customkey="' . $eachuser['D0'] . '"');
$tablecells .= wf_TableCell(stg_convert_size($eachuser['U0']), '', '', 'sorttable_customkey="' . $eachuser['U0'] . '"');
$tablecells .= wf_TableCell(stg_convert_size($eachuser['D0'] + $eachuser['U0']), '', '', 'sorttable_customkey="' . ($eachuser['D0'] + $eachuser['U0']) . '"');
$tablerows .= wf_TableRow($tablecells, 'row3');
}
}
}
$result .= wf_TableBody($tablerows, '100%', '0', 'sortable');
show_window(__('Genocide'), $result);
}
示例13: web_TariffLister
function web_TariffLister()
{
$alltariffs = billing_getalltariffs();
$dbSchema = zb_CheckDbSchema();
global $ubillingConfig;
$alter = $ubillingConfig->getAlter();
$cells = wf_TableCell(__('Tariff name'));
$cells .= wf_TableCell(__('Tariff Fee'));
if ($dbSchema > 0) {
$cells .= wf_TableCell(__('Period'));
}
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
$result = wf_Link("?module=tariffs&action=new", __('Create new tariff'), true, 'ubButton');
if (!empty($alltariffs)) {
foreach ($alltariffs as $io => $eachtariff) {
$cells = wf_TableCell($eachtariff['name']);
$cells .= wf_TableCell($eachtariff['Fee']);
if ($dbSchema > 0) {
$cells .= wf_TableCell(__($eachtariff['period']));
}
$actions = wf_JSAlert("?module=tariffs&action=delete&tariffname=" . $eachtariff['name'], web_delete_icon(), __('Delete') . ' ' . $eachtariff['name'] . '? ' . __('Removing this may lead to irreparable results'));
$actions .= wf_JSAlert("?module=tariffs&action=edit&tariffname=" . $eachtariff['name'], web_edit_icon(), __('Edit') . ' ' . $eachtariff['name'] . '? ' . __('Are you serious'));
$actions .= wf_Link('?module=tariffspeeds&tariff=' . $eachtariff['name'], wf_img('skins/icon_speed.gif', __('Edit speed')), false, '');
$actions .= isset($alter['SIGNUP_PAYMENTS']) && !empty($alter['SIGNUP_PAYMENTS']) ? wf_Link('?module=signupprices&tariff=' . $eachtariff['name'], wf_img('skins/icons/register.png', __('Edit signup price')), false, '') : null;
$cells .= wf_TableCell($actions);
$rows .= wf_TableRow($cells, 'row3');
}
}
$result .= wf_TableBody($rows, '100%', 0, 'sortable');
return $result;
}
示例14: wf_TableCell
$cells .= wf_TableCell(__('op'));
$cells .= wf_TableCell(__('Value'));
$cells .= wf_TableCell(__('Foreach'));
$cells .= wf_TableCell(__('Actions'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($results)) {
foreach ($results as $result) {
$cells = wf_TableCell($result['id']);
$cells .= wf_TableCell($result['scenario']);
$cells .= wf_TableCell($result['Attribute']);
$cells .= wf_TableCell($result['op']);
$cells .= wf_TableCell($result['Value']);
$content = web_bool_led($result['login'] == '*');
$cells .= wf_TableCell($content);
$content = wf_Link("?module=freeradius&netid={$netid}&edit=" . $result['id'], web_edit_icon());
$content .= wf_JSAlert("?module=freeradius&netid={$netid}&delete=" . $result['id'], web_delete_icon(), 'Are you serious');
$cells .= wf_TableCell($content);
$rows .= wf_TableRow($cells, 'row3');
}
}
/* Кнопка "Назад" */
$html .= wf_Link("?module=multinet", __('Back'), false, 'ubButton');
// Форма добавления нового атрибута
$form = new InputForm('', 'POST', __('Save'), '', '', '', 'add');
// - Сценарий
$content = $form->radio_button('add[scenario]', $scenarios, 'check');
$form->addrow(__('Scenario'), $content);
// - Сервис (disabled)
$content = $form->select_tag('add[netid]', getServiceIdDesc(), $netid, 'disabled');
$content .= $form->checkbox('add[login]', '*', __('Foreach'), '');
$form->addrow(__('Service'), $content);
示例15: listAllTasks
public function listAllTasks()
{
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell(__('Active'));
$cells .= wf_TableCell(__('Name'));
$cells .= wf_TableCell(__('Check type'));
$cells .= wf_TableCell(__('Parameter'));
$cells .= wf_TableCell(__('Operator'));
$cells .= wf_TableCell(__('Condition'));
$cells .= wf_TableCell(__('Actions'));
$cells .= wf_TableCell(__('Manage'));
$rows = wf_TableRow($cells, 'row1');
$lighter = 'onmouseover="this.className = \'row2\';" onmouseout="this.className = \'row3\';" ';
if (!empty($this->allTasks)) {
foreach ($this->allTasks as $io => $eachtask) {
$details = wf_tag('pre') . print_r($eachtask, true) . wf_tag('pre', true);
$detailLink = wf_modal($eachtask['id'], $eachtask['name'], $details, '', '600', '400');
$cells = wf_TableCell($detailLink, '', '', 'sorttable_customkey="' . $eachtask['id'] . '"');
$cells .= wf_TableCell(web_bool_led($eachtask['active']), '', '', 'sorttable_customkey="' . $eachtask['active'] . '"');
$cells .= wf_TableCell($eachtask['name']);
$cells .= wf_TableCell($eachtask['checktype']);
$cells .= wf_TableCell($eachtask['param']);
$cells .= wf_TableCell($eachtask['operator']);
$cells .= wf_TableCell($eachtask['condition']);
$cells .= wf_TableCell($eachtask['action']);
$controls = wf_JSAlert('?module=watchdog&delete=' . $eachtask['id'], web_delete_icon(), __('Removing this may lead to irreparable results'));
$controls .= wf_JSAlert('?module=watchdog&edit=' . $eachtask['id'], web_edit_icon(), __('Are you serious'));
$cells .= wf_TableCell($controls);
$rows .= wf_tag('tr', false, 'row3', $lighter);
$rows .= $cells;
$rows .= wf_tag('tr', true);
}
}
$result = wf_TableBody($rows, '100%', '0', 'sortable');
return $result;
}