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


PHP cfr函数代码示例

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


在下文中一共展示了cfr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: web_HelpIconShow

/**
 *  Shows help icon if context chapter available for current language
 *  
 *  @return  string
 */
function web_HelpIconShow()
{
    $lang = curlang();
    $result = '';
    if (cfr('HELP')) {
        if (isset($_GET['module'])) {
            $modulename = vf($_GET['module']);
            if (file_exists(DATA_PATH . "help/" . $lang . "/" . $modulename)) {
                $help_chapter = web_HelpChapterGet($modulename);
                $result = wf_modal(wf_img_sized("skins/help.gif", __('Context help'), 20), __('Context help'), $help_chapter, '', '600', '300');
            }
        }
    }
    return $result;
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:20,代码来源:api.help.php

示例3: build_task

 function build_task($right, $link, $icon, $text)
 {
     global $system;
     global $billing_config;
     global $altconf;
     $icon_path = CUR_SKIN_PATH . 'taskbar/';
     if (cfr($right)) {
         $task_link = $link;
         $task_icon = $icon_path . $icon;
         if (!file_exists($task_icon)) {
             $task_icon = 'skins/taskbar/' . $icon;
         }
         $task_text = $text;
         if (isset($_COOKIE['tb_iconsize'])) {
             //is icon customize enabled?
             if ($altconf['TB_ICONCUSTOMSIZE']) {
                 $tbiconsize = vf($_COOKIE['tb_iconsize'], 3);
             } else {
                 $tbiconsize = $billing_config['TASKBAR_ICON_SIZE'];
             }
         } else {
             $tbiconsize = $billing_config['TASKBAR_ICON_SIZE'];
         }
         if ($altconf['TB_LABELED']) {
             if ($tbiconsize > 63) {
                 $template = '<div class="dashtask" style="height:' . ($tbiconsize + 30) . 'px; width:' . ($tbiconsize + 30) . 'px;"> <a href="' . $task_link . '"><img  src="' . $task_icon . '" border="0" width="' . $tbiconsize . '"  height="' . $tbiconsize . '" alt="' . $task_text . '" title="' . $task_text . '"></a> <br><br>' . $task_text . ' </div>';
             } else {
                 $template = '<a href="' . $task_link . '"><img  src="' . $task_icon . '" border="0" width="' . $tbiconsize . '"  height="' . $tbiconsize . '" alt="' . $task_text . '" title="' . $task_text . '"></a><img src="' . $icon_path . 'spacer.gif">  ';
             }
         } else {
             $template = '<a href="' . $task_link . '"><img  src="' . $task_icon . '" border="0" width="' . $tbiconsize . '"  height="' . $tbiconsize . '" alt="' . $task_text . '" title="' . $task_text . '"></a><img src="' . $icon_path . 'spacer.gif">  ';
         }
     } else {
         $template = '';
     }
     return $template;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:37,代码来源:index.php

示例4: array

<?php

if (cfr('VOLS')) {
    /**
     * Класс:
     */
    class VOLS
    {
        /* Private variablesЖ */
        private $html;
        private $config = array();
        private $polylines = '';
        private $placemarks = '';
        /* Names of forms: */
        const FORM_ADD = 'form_add';
        const FORM_EDIT = 'form_edit';
        /* URLs: */
        const URL_HOME = '?module=vols&item=map&action=show';
        const URL_MAP_SHOW = '?module=vols&item=map&action=show';
        const URL_MAP_EDIT = '?module=vols&item=map&action=edit';
        const URL_MARK_TYPES_LIST = '?module=vols&item=mark_type&action=list';
        const URL_MARK_TYPE_EDIT = '?module=vols&item=mark_type&action=edit&id=';
        const URL_MARK_TYPE_DEL = '?module=vols&item=mark_type&action=delete&id=';
        const URL_MARK_TYPE_ADD = '?module=vols&item=mark_type&action=add';
        const URL_MARKS_LIST = '?module=vols&item=mark&action=list';
        const URL_MARK_PLACE = '?module=vols&item=mark&action=place&id=';
        const URL_MARK_DOCS = '?module=vols&item=mark&action=documents&id=';
        const URL_MARK_EDIT = '?module=vols&item=mark&action=edit&id=';
        const URL_MARK_DEL = '?module=vols&item=mark&action=delete&id=';
        const URL_MARK_ADD = '?module=vols&item=mark&action=add';
        const URL_LINES_LIST = '?module=vols&item=line&action=list';
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例5: 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

示例6: array

<?php

if (cfr('NAS')) {
    if (isset($_GET['delete'])) {
        $deletenas = $_GET['delete'];
        zb_NasDelete($deletenas);
        zb_NasConfigSave();
        rcms_redirect("?module=nas");
    }
    if (isset($_POST['newnasip'])) {
        $newnasip = $_POST['newnasip'];
        $newnetid = $_POST['networkselect'];
        $newnasname = $_POST['newnasname'];
        $newnastype = $_POST['newnastype'];
        $newbandw = $_POST['newbandw'];
        if (!empty($newnasip) and !empty($newnasname)) {
            zb_NasAdd($newnetid, $newnasip, $newnasname, $newnastype, $newbandw);
            zb_NasConfigSave();
            rcms_redirect("?module=nas");
        }
    }
    // Show available NASes
    $allnas = zb_NasGetAllData();
    // construct needed editor
    $titles = array('ID', 'Network', 'IP', 'NAS name', 'NAS type', 'Bandwidthd URL');
    $keys = array('id', 'netid', 'nasip', 'nasname', 'nastype', 'bandw');
    if (!wf_CheckGet(array('edit'))) {
        $altCfg = $ubillingConfig->getAlter();
        if ($altCfg['FREERADIUS_ENABLED']) {
            $freeRadiusClientsData = web_FreeRadiusListClients();
            $radiusControls = wf_modal(web_icon_extended(__('FreeRADIUS NAS parameters')), __('FreeRADIUS NAS parameters'), $freeRadiusClientsData, '', '600', '300');
开发者ID:nightflyza,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例7:

<?php

// check for right of current admin on this module
if (cfr('CITY')) {
    if (isset($_POST['newcityname'])) {
        $newcityname = $_POST['newcityname'];
        if (isset($_POST['newcityalias'])) {
            $newcityalias = $_POST['newcityalias'];
        } else {
            $newcityalias = '';
        }
        if (!empty($newcityname)) {
            zb_AddressCreateCity($newcityname, $newcityalias);
            rcms_redirect('?module=city');
        } else {
            show_error(__('Empty city name'));
        }
    }
    if (isset($_GET['action'])) {
        if (isset($_GET['cityid'])) {
            $cityid = $_GET['cityid'];
            if ($_GET['action'] == 'delete') {
                if (!zb_AddressCityProtected($cityid)) {
                    zb_AddressDeleteCity($cityid);
                    rcms_redirect('?module=city');
                } else {
                    show_window(__('Error'), __('You can not just remove a city where there are streets and possibly survivors'));
                    show_window('', wf_Link('?module=city', __('Back'), true, 'ubButton'));
                }
            }
            if ($_GET['action'] == 'edit') {
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例8: rcms_redirect

         rcms_redirect("?module=reportmaster");
     } else {
         show_error(__('You cant control this module'));
     }
 }
 //if adding new report
 if (isset($_GET['add'])) {
     if (cfr('REPORTMASTERADM')) {
         web_ReportMasterShowAddForm();
     } else {
         show_error(__('You cant control this module'));
     }
 }
 //and if editing
 if (isset($_GET['edit'])) {
     if (cfr('REPORTMASTERADM')) {
         web_ReportMasterShowEditForm($_GET['edit']);
         if (isset($_POST['editreportname']) and isset($_POST['editsqlquery']) and isset($_POST['editdatakeys']) and isset($_POST['editfieldnames'])) {
             zb_RMEditReport($_GET['edit'], $_POST['editreportname'], $_POST['editsqlquery'], $_POST['editdatakeys'], $_POST['editfieldnames'], $_POST['editaddr'], $_POST['editrnames'], $_POST['editrowcount']);
             rcms_redirect("?module=reportmaster");
         }
     } else {
         show_error(__('You cant control this module'));
     }
 }
 // view reports
 if (isset($_GET['view'])) {
     if (!isset($_GET['printable'])) {
         // natural view
         web_ReportMasterViewReport($_GET['view']);
     } else {
开发者ID:nightflyza,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例9: Avarice

<?php

if (cfr('SALARYTSHEETS')) {
    $altcfg = $ubillingConfig->getAlter();
    if ($altcfg['SALARY_ENABLED']) {
        $greed = new Avarice();
        $beggar = $greed->runtime('SALARY');
        if (!empty($beggar)) {
            $salary = new Salary();
            //creating of new timesheet
            if (wf_CheckPost(array('newtimesheet', 'newtimesheetdate', '_employeehours'))) {
                $tsSheetCreateResult = $salary->timesheetCreate();
                if ($tsSheetCreateResult == 0) {
                    //succeful creation
                    rcms_redirect('?module=salary_timesheets');
                } else {
                    if ($tsSheetCreateResult == 1) {
                        //date duplicate
                        show_error(__('Timesheets with that date already exist'));
                    }
                }
            }
            $tsCf = $salary->timesheetCreateForm();
            if ($tsCf) {
                $timesheetsControls = wf_modal(web_add_icon() . ' ' . __('Create'), __('Create') . ' ' . __('Timesheet'), $tsCf, 'ubButton', '800', '600');
                show_window('', $timesheetsControls);
                if (!wf_CheckGet(array('showdate'))) {
                    //render available timesheets list by date
                    show_window(__('Timesheets'), $salary->timesheetsListRender('?module=salary_timesheets'));
                } else {
                    //saving changes for single timesheet row
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例10: __construct

<?php

if (cfr('REPORTNOSWPORT')) {
    class ReportNoSwitchPort
    {
        protected $data = array();
        protected $allusers = array();
        protected $diff = array();
        public function __construct()
        {
            //load actual data by switch port assing
            $this->loadData();
            //loads full user list
            $this->loadAllUsers();
        }
        /*
         * get all users with switch port assing and push it into data prop
         * 
         * @return void
         */
        protected function loadData()
        {
            $query = "SELECT * from `switchportassign`;";
            $alldata = simple_queryall($query);
            if (!empty($alldata)) {
                foreach ($alldata as $io => $each) {
                    $this->data[$each['login']] = $each['login'];
                }
            }
        }
        /*
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例11: SendDog

<?php

if (cfr('SENDDOG')) {
    $altCfg = $ubillingConfig->getAlter();
    if ($altCfg['SENDDOG_ENABLED']) {
        $sendDog = new SendDog();
        //editing config
        if (wf_CheckPost(array('editconfig'))) {
            $sendDog->saveConfig();
            rcms_redirect($sendDog->getBaseUrl());
        }
        if (!wf_CheckGet(array('showmisc'))) {
            //render config interface
            show_window(__('SendDog configuration'), $sendDog->renderConfigForm());
        } else {
            //render SMS queue
            $smsQueue = $_GET['showmisc'];
            switch ($smsQueue) {
                case 'tsms':
                    show_window(__('View SMS sending queue'), $sendDog->renderTurboSMSQueue());
                    break;
                case 'smsflybalance':
                    show_window(__('SMS-Fly') . ' ' . __('Balance'), $sendDog->renderSmsflyBalance());
                    break;
                case 'telegramcontacts':
                    show_window(__('Telegram bot contacts'), $sendDog->renderTelegramContacts());
                    break;
            }
        }
    } else {
        show_error(__('This module is disabled'));
开发者ID:nightflyza,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例12: ProfileDocuments

<?php

if (cfr('PLDOCS')) {
    $altcfg = $ubillingConfig->getAlter();
    if ($altcfg['DOCX_SUPPORT']) {
        $documents = new ProfileDocuments();
        $date = wf_CheckPost(array('showdate')) ? $_POST['showdate'] : '';
        $documents->loadAllUsersDocuments($date);
        //existing document downloading
        if (wf_CheckGet(array('documentdownload'))) {
            zb_DownloadFile($documents::DOCUMENTS_PATH . $_GET['documentdownload'], 'docx');
        }
        //document deletion from database
        if (wf_CheckGet(array('deletedocument'))) {
            $documents->unregisterDocument($_GET['deletedocument']);
            rcms_redirect('?module=report_documents');
        }
        //controls
        $actionLinks = wf_Link('?module=report_documents', __('Grid view') . ' ' . wf_img('skins/icon_table.png'), false, 'ubButton');
        $actionLinks .= wf_Link('?module=report_documents&calendarview=true', __('As calendar') . ' ' . wf_img('skins/icon_calendar.gif'), false, 'ubButton');
        show_window('', $actionLinks);
        if (!wf_CheckGet(array('calendarview'))) {
            //show calendar control
            show_window(__('By date'), $documents->dateControl());
            //list available documents
            show_window(__('Previously generated documents'), $documents->renderAllUserDocuments());
        } else {
            //or calendar view
            show_window(__('Previously generated documents'), $documents->renderAllUserDocumentsCalendar());
        }
    } else {
开发者ID:nightflyza,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例13: commentControls

 /**
  * Returns coment controls for own comments or if im root user
  * 
  * @param int $commentid existing additional comment ID
  * @return string
  */
 protected function commentControls($commentid)
 {
     $result = '';
     if (isset($this->data[$commentid])) {
         if ($this->data[$commentid]['admin'] == $this->mylogin or cfr('ROOT')) {
             $deleteInputs = wf_HiddenInput('adcommentsdeleteid', $commentid);
             $deleteInputs .= wf_tag('input', false, '', 'type="image" src="skins/icon_del.gif" title="' . __('Delete') . '" ' . $this->jsAlert(__('Removing this may lead to irreparable results')));
             $deleteForm = wf_Form('', 'POST', $deleteInputs, '');
             $editInputs = wf_HiddenInput('adcommentseditid', $commentid);
             $editInputs .= wf_tag('input', false, '', 'type="image" src="skins/icon_edit.gif"  title="' . __('Edit') . '" ' . $this->jsAlert(__('Are you serious')));
             $editForm = wf_Form('', 'POST', $editInputs, '');
             $result .= wf_tag('div', false, '', 'style="display:inline-block;"') . $deleteForm . wf_tag('div', true);
             $result .= wf_tag('div', false, '', 'style="display:inline-block;"') . $editForm . wf_tag('div', true);
         }
     }
     return $result;
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:23,代码来源:api.adcomments.php

示例14: PhotoStorage

<?php

$altCfg = $ubillingConfig->getAlter();
if ($altCfg['PHOTOSTORAGE_ENABLED']) {
    if (cfr('PHOTOSTORAGE')) {
        if (wf_CheckGet(array('scope', 'itemid'))) {
            $photoStorage = new PhotoStorage($_GET['scope'], $_GET['itemid']);
            //catch ajax webcam upload request
            if (wf_CheckGet(array('uploadcamphoto'))) {
                $photoStorage->catchWebcamUpload();
            }
            //catch file upload request
            if (wf_CheckGet(array('uploadfilephoto'))) {
                $photoStorage->catchFileUpload();
            }
            //catch file download
            if (wf_CheckGet(array('download'))) {
                $photoStorage->catchDownloadImage($_GET['download']);
            }
            //catch file deletion event
            if (wf_CheckGet(array('delete'))) {
                $photoStorage->catchDeleteImage($_GET['delete']);
            }
            //show webcam snapshot form
            if (wf_CheckGet(array('mode'))) {
                $modeSet = $_GET['mode'];
                //webcamera snapshot
                if ($modeSet == 'cam') {
                    show_window(__('Webcamera snapshot'), $photoStorage->renderWebcamForm(false));
                }
                //webcamera cropped snapshot
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例15: vf

<?php

if (cfr('DOWN')) {
    if (isset($_GET['username'])) {
        $login = vf($_GET['username']);
        // change down  if need
        if (isset($_POST['newdown'])) {
            $down = $_POST['newdown'];
            $billing->setdown($login, $down);
            log_register('CHANGE Down (' . $login . ') ON ' . $down);
            rcms_redirect("?module=downedit&username=" . $login);
        }
        $current_down = zb_UserGetStargazerData($login);
        $current_down = $current_down['Down'];
        $useraddress = zb_UserGetFullAddress($login) . ' (' . $login . ')';
        // Edit form construct
        $fieldname = __('Current Down state');
        $fieldkey = 'newdown';
        $form = web_EditorTrigerDataForm($fieldname, $fieldkey, $useraddress, $current_down);
        $form .= web_UserControls($login);
        // show form
        show_window(__('Edit Down'), $form);
    }
} else {
    show_error(__('You cant control this module'));
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:26,代码来源:index.php


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