当前位置: 首页>>代码示例>>PHP>>正文


PHP web_bool_led函数代码示例

本文整理汇总了PHP中web_bool_led函数的典型用法代码示例。如果您正苦于以下问题:PHP web_bool_led函数的具体用法?PHP web_bool_led怎么用?PHP web_bool_led使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了web_bool_led函数的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;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:26,代码来源:index.php

示例2: em_EmployeeShowForm

/**
 * Renders employee list with required controls and creation form
 * 
 * @return void
 */
function em_EmployeeShowForm()
{
    $show_q = "SELECT * from `employee`";
    $allemployee = simple_queryall($show_q);
    $cells = wf_TableCell(__('ID'));
    $cells .= wf_TableCell(__('Real Name'));
    $cells .= wf_TableCell(__('Active'));
    $cells .= wf_TableCell(__('Appointment'));
    $cells .= wf_TableCell(__('Mobile'));
    $cells .= wf_TableCell(__('Administrator'));
    $cells .= wf_TableCell(__('Actions'));
    $rows = wf_TableRow($cells, 'row1');
    if (!empty($allemployee)) {
        foreach ($allemployee as $ion => $eachemployee) {
            $cells = wf_TableCell($eachemployee['id']);
            $cells .= wf_TableCell($eachemployee['name']);
            $cells .= wf_TableCell(web_bool_led($eachemployee['active']));
            $cells .= wf_TableCell($eachemployee['appointment']);
            $cells .= wf_TableCell($eachemployee['mobile']);
            $admlogin = $eachemployee['admlogin'];
            if (!empty($admlogin)) {
                if (file_exists(USERS_PATH . $admlogin)) {
                    $admlogin = wf_Link('?module=permissions&edit=' . $admlogin, web_profile_icon() . ' ' . $admlogin, false);
                }
            }
            $cells .= wf_TableCell($admlogin);
            $actions = wf_JSAlert('?module=employee&delete=' . $eachemployee['id'], web_delete_icon(), 'Removing this may lead to irreparable results');
            $actions .= wf_JSAlert('?module=employee&edit=' . $eachemployee['id'], web_edit_icon(), 'Are you serious');
            $cells .= wf_TableCell($actions);
            $rows .= wf_TableRow($cells, 'row3');
        }
    }
    //new employee create form inputs
    $inputs = wf_HiddenInput('addemployee', 'true');
    $inputs .= wf_TableCell('');
    $inputs .= wf_TableCell(wf_TextInput('employeename', '', '', false, 30));
    $inputs .= wf_TableCell('');
    $inputs .= wf_TableCell(wf_TextInput('employeejob', '', '', false, 20));
    $inputs .= wf_TableCell(wf_TextInput('employeemobile', '', '', false, 15));
    $inputs .= wf_TableCell(wf_TextInput('employeeadmlogin', '', '', false, 10));
    $inputs .= wf_TableCell(wf_Submit(__('Create')));
    $inputs = wf_TableRow($inputs, 'row2');
    $addForm = wf_Form("", 'POST', $inputs, '');
    $rows .= $addForm;
    $result = wf_TableBody($rows, '100%', '0', '');
    show_window(__('Employee'), $result);
}
开发者ID:carriercomm,项目名称:Ubilling,代码行数:52,代码来源:api.teskman.php

示例3: multinet_show_available_networks

function multinet_show_available_networks()
{
    global $ubillingConfig;
    $alter = $ubillingConfig->getAlter();
    // Выбираем все сети
    $query = "SELECT * from `networks`";
    $networks = simple_queryall($query);
    // Заголовок таблицы
    $cells = wf_TableCell(__('ID'));
    $cells .= wf_TableCell(__('First IP'));
    $cells .= wf_TableCell(__('Last IP'));
    $cells .= wf_TableCell(__('Network/CIDR'));
    $cells .= wf_TableCell(__('Network type'));
    if ($alter['FREERADIUS_ENABLED']) {
        $cells .= wf_TableCell(__('Use Radius'));
    }
    $cells .= wf_TableCell(__('Actions'));
    $rows = wf_TableRow($cells, 'row1');
    // Содержимое таблицы
    if (!empty($networks)) {
        foreach ($networks as $network) {
            $cells = wf_TableCell($network['id']);
            $cells .= wf_TableCell($network['startip']);
            $cells .= wf_TableCell($network['endip']);
            $cells .= wf_TableCell($network['desc']);
            $cells .= wf_TableCell($network['nettype']);
            if ($alter['FREERADIUS_ENABLED']) {
                $cells .= wf_TableCell(web_bool_led($network['use_radius']));
            }
            $actions = wf_JSAlert('?module=multinet&deletenet=' . $network['id'], web_delete_icon(), 'Removing this may lead to irreparable results');
            $actions .= wf_JSAlert('?module=multinet&editnet=' . $network['id'], web_edit_icon(), 'Are you serious');
            if ($alter['FREERADIUS_ENABLED'] && $network['use_radius']) {
                $actions .= wf_Link('?module=freeradius&netid=' . $network['id'], web_icon_freeradius('Set RADIUS-attributes'));
            }
            $cells .= wf_TableCell($actions);
            $rows .= wf_TableRow($cells, 'row3');
        }
    }
    // Результат - таблица
    $result = wf_TableBody($rows, '100%', '0', 'sortable');
    // Отображаем результат
    show_window(__('Networks'), $result);
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:43,代码来源:api.networking.php

示例4: sp_parse_zyportstates

/**
 * Zyxel Port state data parser
 * 
 * @return string
 */
function sp_parse_zyportstates($data)
{
    if (!empty($data)) {
        $data = explode('=', $data);
        $data[0] = trim($data[0]);
        $portnum = substr($data[0], -2);
        $portnum = str_replace('.', '', $portnum);
        if (ispos($data[1], '1')) {
            $cells = wf_TableCell($portnum, '24', '', 'style="height:20px;"');
            $cells .= wf_TableCell(web_bool_led(true));
            $rows = wf_TableRow($cells, 'row3');
            $result = wf_TableBody($rows, '100%', 0, '');
        } else {
            $cells = wf_TableCell($portnum, '24', '', 'style="height:20px;"');
            $cells .= wf_TableCell(web_bool_led(false));
            $rows = wf_TableRow($cells, 'row3');
            $result = wf_TableBody($rows, '100%', 0, '');
        }
        return $result;
    } else {
        return __('Empty reply received');
    }
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:28,代码来源:api.swpoll.php

示例5: im_ContactList

/**
 * Return contact list 
 * 
 * @return string
 */
function im_ContactList()
{
    $me = whoami();
    @($employeeNames = unserialize(ts_GetAllEmployeeLoginsCached()));
    $alladmins = rcms_scandir(DATA_PATH . "users/");
    $activeAdmins = im_GetActiveAdmins();
    $result = '';
    $rows = '';
    if (!empty($alladmins)) {
        foreach ($alladmins as $eachadmin) {
            if ($eachadmin != $me) {
                //need checks for unread messages for each user
                if (wf_CheckGet(array('checknew'))) {
                    $unreadCounter = im_CheckForUnreadMessagesByUser($eachadmin);
                    if ($unreadCounter != 0) {
                        $blinker = wf_img('skins/icon_mail.gif');
                    } else {
                        $blinker = '';
                    }
                } else {
                    $blinker = '';
                }
                if (isset($activeAdmins[$eachadmin])) {
                    $aliveFlag = web_bool_led(true);
                } else {
                    $aliveFlag = web_bool_led(false);
                }
                $conatactAvatar = gravatar_ShowAdminAvatar($eachadmin, '32') . ' ';
                $adminName = isset($employeeNames[$eachadmin]) ? $employeeNames[$eachadmin] : $eachadmin;
                $threadLink = wf_AjaxLink("?module=ubim&showthread=" . $eachadmin, $adminName . ' ' . $blinker, 'threadContainer', false, 'ubimcontact');
                //$threadLink.=$blinker;
                $cells = wf_TableCell($aliveFlag, '', '', 'valign="center" align="center"');
                $cells .= wf_TableCell($conatactAvatar, '35', '', 'valign="center" align="left"');
                $cells .= wf_TableCell($threadLink, '', '', 'valign="center" align="left"');
                $rows .= wf_TableRow($cells, '');
            }
        }
        $result = wf_TableBody($rows, '100%', '0', 'glamour');
        $result .= wf_delimiter() . wf_Link("?module=ubim&avatarcontrol=true", __('Avatar control'), false, 'ubButton');
    }
    return $result;
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:47,代码来源:api.ubim.php

示例6: renderTasks

 /**
  * Renders tasks list as human readable view
  * 
  * @param array $tasksArray
  * 
  * @return string
  */
 public function renderTasks($tasksArray)
 {
     $result = '';
     $totalCount = 0;
     if (!empty($tasksArray)) {
         $cells = wf_TableCell(__('ID'));
         $cells .= wf_TableCell(__('Address'));
         $cells .= wf_TableCell(__('Job type'));
         $cells .= wf_TableCell(__('Phone'));
         $cells .= wf_TableCell(__('Who should do'));
         $cells .= wf_TableCell(__('Worker done'));
         $cells .= wf_TableCell(__('Target date'));
         $cells .= wf_TableCell(__('Finish date'));
         $cells .= wf_TableCell(__('Status'));
         $cells .= wf_TableCell(__('Actions'));
         $rows = wf_TableRow($cells, 'row1');
         foreach ($tasksArray as $io => $each) {
             $cells = wf_TableCell($each['id']);
             $cells .= wf_TableCell($each['address']);
             $cells .= wf_TableCell(@$this->allJobtypes[$each['jobtype']]);
             $cells .= wf_TableCell($each['phone']);
             $cells .= wf_TableCell(@$this->allEmployee[$each['employee']]);
             $cells .= wf_TableCell(@$this->allEmployee[$each['employeedone']]);
             $cells .= wf_TableCell($each['startdate'] . ' ' . $each['starttime']);
             $cells .= wf_TableCell($each['enddate']);
             $cells .= wf_TableCell(web_bool_led($each['status']), '', '', 'sorttable_customkey="' . $each['status'] . '"');
             $actLinks = wf_Link(self::URL_TASKVIEW . $each['id'], web_edit_icon(), false);
             $cells .= wf_TableCell($actLinks);
             $rows .= wf_TableRow($cells, 'row3');
             $totalCount++;
         }
         $result = wf_TableBody($rows, '100%', 0, 'sortable');
         $result .= __('Total') . ': ' . $totalCount;
     } else {
         $messages = new UbillingMessageHelper();
         $result = $messages->getStyledMessage(__('Nothing found'), 'warning');
     }
     return $result;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:46,代码来源:index.php

示例7: web_TicketDialogue

/**
 * Renders ticket, all of replies and all needed controls/forms for they
 * 
 * @param int $ticketid
 * 
 * @return string
 */
function web_TicketDialogue($ticketid)
{
    $ticketid = vf($ticketid, 3);
    $ticketdata = zb_TicketGetData($ticketid);
    $ticketreplies = zb_TicketGetReplies($ticketid);
    $result = wf_tag('p', false, '', 'align="right"') . wf_Link('?module=ticketing', 'Back to tickets list', true, 'ubButton') . wf_tag('p', true);
    if (!empty($ticketdata)) {
        $alladdress = zb_AddressGetFulladdresslist();
        $allrealnames = zb_UserGetAllRealnames();
        $alltariffs = zb_TariffsGetAllUsers();
        $allcash = zb_CashGetAllUsers();
        $allcredits = zb_CreditGetAllUsers();
        $alluserips = zb_UserGetAllIPs();
        if ($ticketdata['status']) {
            $actionlink = wf_Link('?module=ticketing&openticket=' . $ticketdata['id'], 'Open', false, 'ubButton');
        } else {
            $actionlink = wf_Link('?module=ticketing&closeticket=' . $ticketdata['id'], 'Close', false, 'ubButton');
        }
        $tablecells = wf_TableCell(__('ID'));
        $tablecells .= wf_TableCell(__('Date'));
        $tablecells .= wf_TableCell(__('Login'));
        $tablecells .= wf_TableCell(__('Real Name'));
        $tablecells .= wf_TableCell(__('Full address'));
        $tablecells .= wf_TableCell(__('IP'));
        $tablecells .= wf_TableCell(__('Tariff'));
        $tablecells .= wf_TableCell(__('Balance'));
        $tablecells .= wf_TableCell(__('Credit'));
        $tablecells .= wf_TableCell(__('Processed'));
        $tablerows = wf_TableRow($tablecells, 'row1');
        $tablecells = wf_TableCell($ticketdata['id']);
        $tablecells .= wf_TableCell($ticketdata['date']);
        $profilelink = wf_Link('?module=userprofile&username=' . $ticketdata['from'], web_profile_icon() . ' ' . $ticketdata['from']);
        $tablecells .= wf_TableCell($profilelink);
        $tablecells .= wf_TableCell(@$allrealnames[$ticketdata['from']]);
        $tablecells .= wf_TableCell(@$alladdress[$ticketdata['from']]);
        $tablecells .= wf_TableCell(@$alluserips[$ticketdata['from']]);
        $tablecells .= wf_TableCell(@$alltariffs[$ticketdata['from']]);
        $tablecells .= wf_TableCell(@$allcash[$ticketdata['from']]);
        $tablecells .= wf_TableCell(@$allcredits[$ticketdata['from']]);
        $tablecells .= wf_TableCell(web_bool_led($ticketdata['status']));
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $result .= wf_TableBody($tablerows, '100%', '0');
        //ticket body
        $tickettext = strip_tags($ticketdata['text']);
        $tickettext = nl2br($tickettext);
        $tablecells = wf_TableCell('', '20%');
        $tablecells .= wf_TableCell($ticketdata['date']);
        $tablerows = wf_TableRow($tablecells, 'row2');
        $ticketauthor = wf_tag('center') . wf_tag('b') . @$allrealnames[$ticketdata['from']] . wf_tag('b', true) . wf_tag('center', true);
        $ticketavatar = wf_tag('center') . wf_img('skins/userava.png') . wf_tag('center', true);
        $ticketpanel = $ticketauthor . wf_tag('br') . $ticketavatar;
        $tablecells = wf_TableCell($ticketpanel);
        $tablecells .= wf_TableCell($tickettext);
        $tablerows .= wf_TableRow($tablecells, 'row3');
        $result .= wf_TableBody($tablerows, '100%', '0', 'glamour');
        $result .= $actionlink;
    }
    if (!empty($ticketreplies)) {
        $result .= wf_tag('h2') . __('Replies') . wf_tag('h2', true);
        $result .= wf_CleanDiv();
        foreach ($ticketreplies as $io => $eachreply) {
            //reply
            if ($eachreply['admin']) {
                $replyauthor = wf_tag('center') . wf_tag('b') . $eachreply['admin'] . wf_tag('b', true) . wf_tag('center', true);
                $replyavatar = wf_tag('center') . gravatar_ShowAdminAvatar($eachreply['admin'], '64') . wf_tag('center', true);
            } else {
                $replyauthor = wf_tag('center') . wf_tag('b') . @$allrealnames[$eachreply['from']] . wf_tag('b', true) . wf_tag('center', true);
                $replyavatar = wf_tag('center') . wf_img('skins/userava.png') . wf_tag('center', true);
            }
            $replyactions = wf_tag('center');
            $replyactions .= wf_JSAlert('?module=ticketing&showticket=' . $ticketdata['id'] . '&deletereply=' . $eachreply['id'], web_delete_icon(), 'Removing this may lead to irreparable results') . ' ';
            $replyactions .= wf_JSAlert('?module=ticketing&showticket=' . $ticketdata['id'] . '&editreply=' . $eachreply['id'], web_edit_icon(), 'Are you serious');
            $replyactions .= wf_tag('center', true);
            // reply body
            if (isset($_GET['editreply'])) {
                if ($_GET['editreply'] == $eachreply['id']) {
                    //is this reply editing?
                    $replytext = web_TicketReplyEditForm($eachreply['id']);
                } else {
                    //not this ticket edit
                    $replytext = strip_tags($eachreply['text']);
                }
            } else {
                //normal text by default
                $replytext = strip_tags($eachreply['text']);
                $replytext = nl2br($replytext);
            }
            $replypanel = $replyauthor . wf_tag('br') . $replyavatar . wf_tag('br') . $replyactions;
            $tablecells = wf_TableCell('', '20%');
            $tablecells .= wf_TableCell($eachreply['date']);
            $tablerows = wf_TableRow($tablecells, 'row2');
            $tablecells = wf_TableCell($replypanel);
            $tablecells .= wf_TableCell($replytext);
//.........这里部分代码省略.........
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:101,代码来源:api.ticketing.php

示例8: catvbs_ShowHash

function catvbs_ShowHash($hash)
{
    $hash = vf($hash);
    $allrealnames = catv_GetAllRealnames();
    $alladdress = catv_GetFullAddressList();
    $montharr = months_array();
    $checkarr = catvbs_SearchCheckArr($alladdress, $allrealnames);
    $alter_conf = rcms_parse_ini_file(CONFIG_PATH . 'catv.ini');
    $query = "SELECT * from `catv_bankstaparsed` WHERE `hash`='" . $hash . "' ORDER BY `id` DESC";
    $alldata = simple_queryall($query);
    if (!empty($alldata)) {
        $tablecells = wf_TableCell(__('ID'));
        $tablecells .= wf_TableCell(__('Real Name'));
        $tablecells .= wf_TableCell(__('Address'));
        $tablecells .= wf_TableCell(__('Cash'));
        $tablecells .= wf_TableCell(__('User poroposal'));
        $tablecells .= wf_TableCell(__('Month'));
        $tablecells .= wf_TableCell(__('Processed'));
        $tablecells .= wf_TableCell(__('Actions'));
        $tablerows = wf_TableRow($tablecells, 'row1');
        foreach ($alldata as $io => $eachrow) {
            $tablecells = wf_TableCell($eachrow['id']);
            $tablecells .= wf_TableCell(bs_NameEditForm($eachrow['id'], $eachrow['realname']));
            $tablecells .= wf_TableCell(bs_AddressEditForm($eachrow['id'], $eachrow['address']));
            $tablecells .= wf_TableCell($eachrow['summ']);
            //proposal subroutine
            if (empty($eachrow['login'])) {
                $proposed_login = catvbs_SearchLoginByAddresspart($eachrow['address'], $eachrow['realname'], $checkarr);
                //if no one found
                if (sizeof($proposed_login) == 0) {
                    $proposal_form = catvbs_LoginProposalForm($eachrow['id'], '');
                }
                //if only one user found
                if (sizeof($proposed_login) == 1) {
                    $proposal_form = bs_LoginProposalForm($eachrow['id'], $proposed_login[0]);
                    //заполним со старта что-ли
                    simple_update_field('catv_bankstaparsed', 'login', $proposed_login[0], "WHERE `id`='" . $eachrow['id'] . "'");
                }
                //if many users found
                if (sizeof($proposed_login) > 1) {
                    $proposal_form = __('Multiple users found');
                }
            } else {
                $proposal_form = catvbs_LoginProposalForm($eachrow['id'], $eachrow['login']);
            }
            $tablecells .= wf_TableCell($proposal_form);
            $procflag = web_bool_led($eachrow['state']);
            if (!$eachrow['state']) {
                $actlink = wf_JSAlert("?module=catv_banksta&lockrow=" . $eachrow['id'] . "&showhash=" . $eachrow['hash'], web_key_icon('Lock'), __('Are you serious'));
            } else {
                $actlink = '';
            }
            //month detection here
            $month_detected = catvbs_MonthDetect($eachrow['address']);
            if ($month_detected) {
                $monthname = web_bool_led($month_detected) . ' ' . rcms_date_localise($montharr[$month_detected]);
            } else {
                $monthname = web_bool_led($month_detected);
            }
            $tablecells .= wf_TableCell($monthname);
            $tablecells .= wf_TableCell($procflag);
            $tablecells .= wf_TableCell($actlink);
            $tablerows .= wf_TableRow($tablecells, 'row3');
        }
        $result = wf_TableBody($tablerows, '100%', '0', 'sortable');
    } else {
        $result = __('Strange exeption catched');
    }
    show_window('', wf_Link("?module=catv_banksta", 'Back', true, 'ubButton'));
    show_window(__('Bank statement processing'), $result);
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:71,代码来源:api.catv.php

示例9: renderAllUserDocuments

 /**
  * Renders previously generated all users documents 
  * 
  * @return string
  */
 public function renderAllUserDocuments()
 {
     $allAddress = zb_AddressGetFulladdresslistCached();
     $allRealnames = zb_UserGetAllRealnames();
     $cells = wf_TableCell(__('ID'));
     $cells .= wf_TableCell(__('Date'));
     $cells .= wf_TableCell(__('Public'));
     $cells .= wf_TableCell(__('Template'));
     $cells .= wf_TableCell(__('Path'));
     $cells .= wf_TableCell(__('Login'));
     $cells .= wf_TableCell(__('Address'));
     $cells .= wf_TableCell(__('Real Name'));
     $cells .= wf_TableCell(__('Actions'));
     $rows = wf_TableRow($cells, 'row1');
     if (!empty($this->allUserDocuments)) {
         foreach ($this->allUserDocuments as $io => $each) {
             $cells = wf_TableCell($each['id']);
             $cells .= wf_TableCell($each['date']);
             $cells .= wf_TableCell(web_bool_led($each['public']));
             @($templateName = $this->templates[$each['templateid']]['name']);
             $cells .= wf_TableCell(wf_tag('abbr', false, '', 'title="' . $each['templateid'] . '"') . $templateName . wf_tag('abbr', true));
             $downloadLink = wf_Link('?module=report_documents&documentdownload=' . $each['path'], $each['path'], false, '');
             $cells .= wf_TableCell($downloadLink);
             $profileLink = wf_Link('?module=userprofile&username=' . $each['login'], web_profile_icon() . ' ' . $each['login']);
             $cells .= wf_TableCell($profileLink);
             $cells .= wf_TableCell(@$allAddress[$each['login']]);
             $cells .= wf_TableCell(@$allRealnames[$each['login']]);
             $actionLinks = wf_JSAlert('?module=report_documents&deletedocument=' . $each['id'], web_delete_icon(), __('Are you serious'));
             $cells .= wf_TableCell($actionLinks);
             $rows .= wf_TableRow($cells, 'row3');
         }
     }
     $result = wf_TableBody($rows, '100%', '0', '');
     return $result;
 }
开发者ID:carriercomm,项目名称:Ubilling,代码行数:40,代码来源:api.documents.php

示例10: renderSubManagerForm

 /**
  * Renders subscribtion management form
  * 
  * @param int $subId
  * 
  * @return string
  */
 public function renderSubManagerForm($subId)
 {
     $subId = vf($subId, 3);
     $result = '';
     if (isset($this->allSubscribers[$subId])) {
         $baseUrl = self::URL_ME . '&' . self::URL_SUBVIEW . '&subid=' . $subId;
         $subData = $this->allSubscribers[$subId];
         $cells = wf_TableCell(__('ID'));
         $cells .= wf_TableCell(__('User'));
         $cells .= wf_TableCell(__('Tariff'));
         $cells .= wf_TableCell(__('Date'));
         $cells .= wf_TableCell(__('Active'));
         $cells .= wf_TableCell(__('Primary'));
         $cells .= wf_TableCell(__('Free period'));
         $rows = wf_TableRow($cells, 'row1');
         $cells = wf_TableCell($subData['id']);
         $cells .= wf_TableCell(wf_Link('?module=userprofile&username=' . $subData['login'], web_profile_icon() . ' ' . $subData['login']));
         $cells .= wf_TableCell($this->allTariffs[$subData['tariffid']]['name']);
         $cells .= wf_TableCell($subData['actdate']);
         $cells .= wf_TableCell(web_bool_led($subData['active']));
         $cells .= wf_TableCell(web_bool_led($subData['primary']));
         $cells .= wf_TableCell(web_bool_led($subData['freeperiod']));
         $rows .= wf_TableRow($cells, 'row3');
         $result = wf_TableBody($rows, '100%', 0, '');
         $result .= wf_delimiter();
         if (cfr('ROOT')) {
             $controls = wf_Link($baseUrl . '&maction=subscribe', web_bool_star(1) . ' ' . __('Subscribe with Megogo API'), true, 'ubButton') . wf_tag('br');
             $controls .= wf_Link($baseUrl . '&maction=unsubscribe', web_bool_star(0) . ' ' . __('Unubscribe with Megogo API'), true, 'ubButton') . wf_tag('br');
             $controls .= wf_Link($baseUrl . '&maction=activate', web_bool_led(1) . ' ' . __('Activate subscription'), true, 'ubButton') . wf_tag('br');
             $controls .= wf_Link($baseUrl . '&maction=deactivate', web_bool_led(0) . ' ' . __('Deactivate subscription'), true, 'ubButton') . wf_tag('br');
             $controls .= wf_JSAlertStyled($baseUrl . '&maction=delete', web_delete_icon() . ' ' . __('Delete subscription'), $this->messages->getDeleteAlert(), 'ubButton');
             $result .= $controls;
         }
     } else {
         $result = $this->messages->getStyledMessage(__('Something went wrong') . ' EX_ID_NOEXISTS', 'error');
     }
     return $result;
 }
开发者ID:carriercomm,项目名称:Ubilling,代码行数:45,代码来源:api.megogo.php

示例11: showRequest

 /**
  * shows selected signup request by its ID
  * 
  * @param int $requid Existing signup request ID
  * 
  * @return void
  */
 public function showRequest($reqid)
 {
     $requid = vf($reqid, 3);
     $reqdata = $this->getData($reqid);
     if (empty($reqdata['apt'])) {
         $apt = 0;
     } else {
         $apt = $reqdata['apt'];
     }
     $shortaddress = $reqdata['street'] . ' ' . $reqdata['build'] . '/' . $apt;
     $taskCreateControls = wf_modal(wf_img('skins/createtask.gif', __('Create task')), __('Create task'), ts_TaskCreateFormSigreq($shortaddress, $reqdata['phone']), '', '420', '500');
     $cells = wf_TableCell(__('Date'));
     $cells .= wf_TableCell($reqdata['date'] . ' ' . $taskCreateControls);
     $rows = wf_TableRow($cells, 'row3');
     $whoislink = self::URL_WHOIS . $reqdata['ip'];
     $iplookup = wf_Link($whoislink, $reqdata['ip'], false, '');
     $cells = wf_TableCell(__('IP'));
     $cells .= wf_TableCell($iplookup);
     $rows .= wf_TableRow($cells, 'row3');
     $reqAddress = $reqdata['street'] . ' ' . $reqdata['build'] . '/' . $apt;
     //Construct capability create form if enabled
     if ($this->altcfg['CAPABDIR_ENABLED']) {
         $capabDir = new CapabilitiesDirectory(true);
         $capabCreateForm = $capabDir->createForm($reqAddress, $reqdata['phone'], $reqdata['service'] . ' ' . $reqdata['notes']);
         $capabControl = wf_modal(wf_img_sized('skins/icon_cake.png', __('Available connection capabilities'), 10), __('Create connection capability'), $capabCreateForm, '', '400', '300');
     } else {
         $capabControl = '';
     }
     $cells = wf_TableCell(__('Full address'));
     $cells .= wf_TableCell($reqAddress . ' ' . $capabControl);
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Real Name'));
     $cells .= wf_TableCell($reqdata['realname']);
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Phone'));
     $cells .= wf_TableCell($reqdata['phone']);
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Service'));
     $cells .= wf_TableCell($reqdata['service']);
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Processed'));
     $cells .= wf_TableCell(web_bool_led($reqdata['state']));
     $rows .= wf_TableRow($cells, 'row3');
     $cells = wf_TableCell(__('Notes'));
     $notes = nl2br($reqdata['notes']);
     $notes = str_replace('Tariff:', __('Tariff') . ':', $notes);
     $notes = str_replace('Email:', __('Email') . ':', $notes);
     $cells .= wf_TableCell($notes);
     $rows .= wf_TableRow($cells, 'row3');
     $result = wf_TableBody($rows, '100%', '0', 'glamour');
     $actlinks = wf_Link('?module=sigreq', __('Back'), false, 'ubButton');
     if ($reqdata['state'] == 0) {
         $actlinks .= wf_Link('?module=sigreq&reqdone=' . $reqid, wf_img_sized('skins/icon_active.gif', '', '10') . ' ' . __('Close'), false, 'ubButton');
     } else {
         $actlinks .= wf_Link('?module=sigreq&requndone=' . $reqid, wf_img_sized('skins/icon_inactive.gif', '', '10') . ' ' . __('Open'), false, 'ubButton');
     }
     $deletelink = ' ' . wf_JSAlert("?module=sigreq&deletereq=" . $reqid, web_delete_icon(), 'Are you serious');
     show_window(__('Signup request') . ': ' . $reqid . $deletelink, $result);
     show_window('', $actlinks);
     //additional comments
     if ($this->altcfg['ADCOMMENTS_ENABLED']) {
         $adcomments = new ADcomments('SIGREQ');
         show_window(__('Additional comments'), $adcomments->renderComments($requid));
     }
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:72,代码来源:api.sigreq.php

示例12: web_CardsSearchBySerial

/**
 * Returns card by serial search results
 * 
 * @param string $serial
 * @return string
 */
function web_CardsSearchBySerial($serial)
{
    $serial = mysql_real_escape_string($serial);
    $query = "SELECT * from `cardbank` WHERE `serial` LIKE '%" . $serial . "%'";
    $allcards = simple_queryall($query);
    $result = __('Nothing found');
    if (!empty($allcards)) {
        $cells = wf_TableCell(__('ID'));
        $cells .= wf_TableCell(__('Serial number'));
        $cells .= wf_TableCell(__('Price'));
        $cells .= wf_TableCell(__('Admin'));
        $cells .= wf_TableCell(__('Date'));
        $cells .= wf_TableCell(__('Active'));
        $cells .= wf_TableCell(__('Used'));
        $cells .= wf_TableCell(__('Usage date'));
        $cells .= wf_TableCell(__('Used login'));
        $cells .= wf_TableCell(__('Used IP'));
        $rows = wf_TableRow($cells, 'row1');
        foreach ($allcards as $io => $eachcard) {
            $cells = wf_TableCell($eachcard['id']);
            $cells .= wf_TableCell($eachcard['serial']);
            $cells .= wf_TableCell($eachcard['cash']);
            $cells .= wf_TableCell($eachcard['admin']);
            $cells .= wf_TableCell($eachcard['date']);
            $cells .= wf_TableCell(web_bool_led($eachcard['active']));
            $cells .= wf_TableCell(web_bool_led($eachcard['used']));
            $cells .= wf_TableCell($eachcard['usedate']);
            $cells .= wf_TableCell($eachcard['usedlogin']);
            $cells .= wf_TableCell($eachcard['usedip']);
            $rows .= wf_TableRow($cells, 'row3');
        }
        $result = wf_TableBody($rows, '100%', 0, 'sortable');
    }
    return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:41,代码来源:api.cardpay.php

示例13: reportPrintable

 /**
  * shows printable report content
  * 
  * @param $title report title
  * @param $data  report data to printable transform
  * 
  * @return void
  */
 public function reportPrintable($title, $data)
 {
     $style = file_get_contents(CONFIG_PATH . "ukvprintable.css");
     $header = wf_tag('!DOCTYPE', false, '', 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"');
     $header .= wf_tag('html', false, '', 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru"');
     $header .= wf_tag('head', false);
     $header .= wf_tag('title') . $title . wf_tag('title', true);
     $header .= wf_tag('meta', false, '', 'http-equiv="Content-Type" content="text/html; charset=UTF-8" /');
     $header .= wf_tag('style', false, '', 'type="text/css"');
     $header .= $style;
     $header .= wf_tag('style', true);
     $header .= wf_tag('script', false, '', 'src="modules/jsc/sorttable.js" language="javascript"') . wf_tag('script', true);
     $header .= wf_tag('head', true);
     $header .= wf_tag('body', false);
     $footer = wf_tag('body', true);
     $footer .= wf_tag('html', true);
     $title = !empty($title) ? wf_tag('h2') . $title . wf_tag('h2', true) : '';
     $data = $header . $title . $data . $footer;
     $payedIconMask = web_bool_led(1);
     $unpayedIconMask = web_bool_led(0);
     $submitInputMask = wf_Submit(__('Processing'));
     $data = str_replace($payedIconMask, __('Paid'), $data);
     $data = str_replace($unpayedIconMask, __('Not paid'), $data);
     $data = str_replace($submitInputMask, '', $data);
     die($data);
 }
开发者ID:carriercomm,项目名称:Ubilling,代码行数:34,代码来源:api.salary.php

示例14: um_MapDrawBuilds

/**
 * Returns full map marks for builds with filled GEO field
 * 
 * @return string
 */
function um_MapDrawBuilds()
{
    $ym_conf = rcms_parse_ini_file(CONFIG_PATH . "ymaps.ini");
    $query = "SELECT * from `build` WHERE `geo` != '' ";
    $allbuilds = simple_queryall($query);
    $allstreets = zb_AddressGetStreetAllData();
    $streetData = array();
    $cacheDir = 'exports/';
    $cacheTime = 10;
    $cacheTime = time() - $cacheTime * 60;
    //street id => streetname
    if (!empty($allstreets)) {
        foreach ($allstreets as $ia => $eachstreet) {
            $streetData[$eachstreet['id']] = $eachstreet['streetname'];
        }
    }
    //get apts in all builds aggregated with users logins
    $aptData = array();
    $allapts_q = "SELECT `buildid`,`apt`,`login` from `apt` JOIN `address` ON `apt`.`id`=`address`.`aptid`";
    $allapts = simple_queryall($allapts_q);
    if (!empty($allapts)) {
        $aptData = $allapts;
    }
    //get all user ips
    $alluserips = zb_UserGetAllIPs();
    //form alive ips array
    $aliveIps = array();
    if (file_exists("exports/nmaphostscan")) {
        $nmapData = file_get_contents("exports/nmaphostscan");
        $nmapData = explodeRows($nmapData);
        if (!empty($nmapData)) {
            foreach ($nmapData as $ic => $eachnmaphost) {
                $zhost = zb_ExtractIpAddress($eachnmaphost);
                if ($zhost) {
                    $aliveIps[$zhost] = $zhost;
                }
            }
        }
    }
    $result = '';
    if (!empty($allbuilds)) {
        foreach ($allbuilds as $io => $each) {
            $geo = mysql_real_escape_string($each['geo']);
            @($streetname = $streetData[$each['streetid']]);
            $title = wf_Link("?module=builds&action=editbuild&streetid=" . $each['streetid'] . "&buildid=" . $each['id'], $streetname . ' ' . $each['buildnum'], false);
            $content = '';
            $cells = wf_TableCell(__('apt.'));
            $cells .= wf_TableCell(__('User'));
            $cells .= wf_TableCell(__('Status'));
            $rows = wf_tag('tr', false, '', 'bgcolor=#DCDCDC') . $cells . wf_tag('tr', true);
            $iconlabel = '';
            $footer = '';
            $aliveUsers = 0;
            $usersCount = 0;
            if (!empty($aptData)) {
                //build users data caching
                $cacheName = $cacheDir . $each['id'] . '.inbuildusers';
                if (file_exists($cacheName)) {
                    $updateCache = false;
                    if (filemtime($cacheName) > $cacheTime) {
                        $updateCache = false;
                    } else {
                        $updateCache = true;
                    }
                } else {
                    $updateCache = true;
                }
                if (!$updateCache) {
                    $cachePrev = file_get_contents($cacheName);
                    $cachePrev = unserialize($cachePrev);
                    $rows = $cachePrev['rows'];
                    $usersCount = $cachePrev['userscount'];
                    $aliveUsers = $cachePrev['aliveusers'];
                } else {
                    foreach ($aptData as $ib => $eachapt) {
                        if ($eachapt['buildid'] == $each['id']) {
                            if (isset($alluserips[$eachapt['login']])) {
                                $userIp = $alluserips[$eachapt['login']];
                                $usersCount++;
                                if (isset($aliveIps[$userIp])) {
                                    $aliveFlag = web_bool_led(true);
                                    $aliveUsers++;
                                } else {
                                    $aliveFlag = web_bool_led(false);
                                }
                                $cells = wf_TableCell($eachapt['apt']);
                                $cells .= wf_TableCell(wf_Link('?module=userprofile&username=' . $eachapt['login'], $userIp, false));
                                $cells .= wf_TableCell($aliveFlag);
                                $rows .= wf_TableRow($cells);
                            }
                        }
                    }
                    $cacheStore = array();
                    $cacheStore['rows'] = $rows;
                    $cacheStore['userscount'] = $usersCount;
//.........这里部分代码省略.........
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:101,代码来源:api.ymaps.php

示例15: bs_ShowHash

function bs_ShowHash($hash)
{
    $hash = vf($hash);
    $allrealnames = zb_UserGetAllRealnames();
    $alladdress = zb_AddressGetFulladdresslist();
    $checkarr = bs_SearchCheckArr($alladdress, $allrealnames);
    $alter_conf = rcms_parse_ini_file(CONFIG_PATH . 'alter.ini');
    $query = "SELECT * from `bankstaparsed` WHERE `hash`='" . $hash . "' ORDER BY `id` DESC";
    $alldata = simple_queryall($query);
    // проверяем врублены ли корпоративные пользователи
    if ($alter_conf['USER_LINKING_ENABLED']) {
        $alllinkedusers = cu_GetAllLinkedUsers();
        $allparentusers = cu_GetAllParentUsers();
    }
    if (!empty($alldata)) {
        $tablecells = wf_TableCell(__('ID'));
        $tablecells .= wf_TableCell(__('Real Name'));
        $tablecells .= wf_TableCell(__('Address'));
        $tablecells .= wf_TableCell(__('Cash'));
        $tablecells .= wf_TableCell(__('Login poroposal'));
        $tablecells .= wf_TableCell(__('Processed'));
        $tablecells .= wf_TableCell(__('Actions'));
        $tablerows = wf_TableRow($tablecells, 'row1');
        foreach ($alldata as $io => $eachrow) {
            $tablecells = wf_TableCell($eachrow['id']);
            $tablecells .= wf_TableCell(bs_NameEditForm($eachrow['id'], $eachrow['realname']));
            $tablecells .= wf_TableCell(bs_AddressEditForm($eachrow['id'], $eachrow['address']));
            $tablecells .= wf_TableCell($eachrow['summ']);
            //proposal subroutine
            if (empty($eachrow['login'])) {
                $proposed_login = bs_SearchLoginByAddresspart($eachrow['address'], $eachrow['realname'], $checkarr);
                //if no one found
                if (sizeof($proposed_login) == 0) {
                    $proposal_form = bs_LoginProposalForm($eachrow['id'], '');
                }
                //if only one user found
                if (sizeof($proposed_login) == 1) {
                    $proposal_form = bs_LoginProposalForm($eachrow['id'], $proposed_login[0]);
                    //заполним со старта что-ли
                    simple_update_field('bankstaparsed', 'login', $proposed_login[0], "WHERE `id`='" . $eachrow['id'] . "'");
                }
                //if many users found
                if (sizeof($proposed_login) > 1) {
                    //считаем что это корпоративный пользователь и достаем для него родительского
                    if ($alter_conf['USER_LINKING_ENABLED']) {
                        foreach ($proposed_login as $eachcorp) {
                            if (bs_cu_IsParent($eachcorp, $allparentusers)) {
                                $proposal_form = web_corporate_icon() . ' ' . $eachcorp;
                                //заполним родительского пользователя
                                simple_update_field('bankstaparsed', 'login', $eachcorp, "WHERE `id`='" . $eachrow['id'] . "'");
                            }
                        }
                    } else {
                        // если корпоративщина не включена - вываливаем екзепшн
                        $proposal_form = __('Multiple users found');
                    }
                }
            } else {
                $proposal_form = bs_LoginProposalForm($eachrow['id'], $eachrow['login']);
            }
            $tablecells .= wf_TableCell($proposal_form);
            $procflag = web_bool_led($eachrow['state']);
            if (!$eachrow['state']) {
                $actlink = wf_JSAlert("?module=bankstatements&lockrow=" . $eachrow['id'] . "&showhash=" . $eachrow['hash'], web_key_icon('Lock'), __('Are you serious'));
            } else {
                $actlink = '';
            }
            $tablecells .= wf_TableCell($procflag);
            $tablecells .= wf_TableCell($actlink);
            $tablerows .= wf_TableRow($tablecells, 'row3');
        }
        $result = wf_TableBody($tablerows, '100%', '0', 'sortable');
    } else {
        $result = __('Strange exeption catched');
    }
    show_window('', wf_Link("?module=bankstatements", 'Back', true, 'ubButton'));
    show_window(__('Bank statement processing'), $result);
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:78,代码来源:api.banksta.php


注:本文中的web_bool_led函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。