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


PHP needreload函数代码示例

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


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

示例1: doConfigPageInit

 public function doConfigPageInit()
 {
     $request = array('action', 'id', 'goto0', 'name', 'text', 'engine');
     $vars = array();
     $goto = null;
     foreach ($request as $key) {
         $vars[$key] = isset($_REQUEST[$key]) ? $_REQUEST[$key] : null;
     }
     if (isset($vars['goto0']) && isset($_REQUEST[$vars['goto0'] . "0"])) {
         $goto = $_REQUEST[$vars['goto0'] . "0"];
     }
     switch ($vars['action']) {
         case "add":
             $_REQUEST['id'] = \tts_add($vars['name'], $vars['text'], $goto, $vars['engine']);
             \needreload();
             break;
         case "delete":
             \tts_del($vars['id']);
             $_REQUEST['id'] = null;
             \needreload();
             break;
         case "edit":
             \tts_update($vars['id'], $vars['name'], $vars['text'], $goto, $_REQUEST['engine']);
             \needreload();
             break;
     }
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:27,代码来源:Tts.class.php

示例2: doConfigPageInit

 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     $action = isset($request['action']) ? $request['action'] : '';
     $password = isset($request['password']) ? $request['password'] : '';
     $fc_description = isset($request['fc_description']) ? $request['fc_description'] : '';
     $day_recording_id = isset($request['day_recording_id']) ? $request['day_recording_id'] : '';
     $night_recording_id = isset($request['night_recording_id']) ? $request['night_recording_id'] : '';
     isset($request['itemid']) ? $itemid = $request['itemid'] : ($itemid = '');
     $extdisplay = isset($request['extdisplay']) ? $request['extdisplay'] : '';
     switch ($action) {
         case "add":
         case "edit":
         case "edited":
             \daynight_edit($request, $itemid);
             \needreload();
             $_REQUEST['view'] = null;
             break;
         case "delete":
             \daynight_del($itemid);
             \needreload();
             $_REQUEST['view'] = null;
             break;
     }
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:25,代码来源:Daynight.class.php

示例3: doConfigPageInit

 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     isset($request['action']) ? $action = $request['action'] : ($action = '');
     isset($request['view']) ? $view = $request['view'] : ($view = '');
     isset($request['itemid']) ? $itemid = $request['itemid'] : ($itemid = '');
     if (isset($request['action'])) {
         switch ($action) {
             case "add":
                 pinsets_add($request);
                 needreload();
                 redirect_standard();
                 break;
             case "delete":
                 pinsets_del($itemid);
                 needreload();
                 redirect_standard();
                 break;
             case "edit":
                 pinsets_edit($itemid, $request);
                 needreload();
                 redirect_standard('itemid', 'view');
                 break;
         }
     }
 }
开发者ID:lidl,项目名称:pinsets,代码行数:26,代码来源:Pinsets.class.php

示例4: doConfigPageInit

 public function doConfigPageInit($page)
 {
     if (!empty($_POST)) {
         $readonly = $_POST['readonly'] == 'yes' ? 1 : 0;
         if (empty($_POST['id'])) {
             $id = $this->addUser($_POST['name'], $_POST['password'], $_POST['password_type'], $readonly);
             $_REQUEST['user'] = $id ? $id : '';
         } else {
             if ($_POST['password'] == '******') {
                 $this->editUser($_POST['id'], $_POST['name'], $readonly);
             } else {
                 $this->editUser($_POST['id'], $_POST['name'], $readonly, $_POST['password'], $_POST['password_type']);
             }
             $_REQUEST['user'] = $_POST['id'];
             $_REQUEST['view'] = 'form';
         }
         needreload();
     } elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') {
         if (!empty($_REQUEST['user'])) {
             $this->deleteUser($_REQUEST['user']);
             needreload();
             unset($_REQUEST['user']);
             if (isset($_REQUEST['view'])) {
                 unset($_REQUEST['view']);
             }
         }
     }
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:28,代码来源:Arimanager.class.php

示例5: doConfigPageInit

 public function doConfigPageInit($page)
 {
     $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
     if (isset($_REQUEST['delete'])) {
         $action = 'delete';
     }
     $queueprio_id = isset($_REQUEST['queueprio_id']) ? $_REQUEST['queueprio_id'] : false;
     $description = isset($_REQUEST['description']) ? $_REQUEST['description'] : '';
     $queue_priority = isset($_REQUEST['queue_priority']) ? $_REQUEST['queue_priority'] : '';
     $dest = isset($_REQUEST['dest']) ? $_REQUEST['dest'] : '';
     if (isset($_REQUEST['goto0']) && $_REQUEST['goto0']) {
         $dest = $_REQUEST[$_REQUEST['goto0'] . '0'];
     }
     switch ($action) {
         case 'add':
             $_REQUEST['extdisplay'] = queueprio_add($description, $queue_priority, $dest);
             needreload();
             break;
         case 'edit':
             queueprio_edit($queueprio_id, $description, $queue_priority, $dest);
             $_REQUEST['extdisplay'] = $queueprio_id;
             needreload();
             break;
         case 'delete':
             queueprio_delete($queueprio_id);
             needreload();
             break;
     }
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:29,代码来源:Queueprio.class.php

示例6: doConfigPageInit

 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     isset($request['extdisplay']) ? $extdisplay = $request['extdisplay'] : ($extdisplay = '');
     isset($request['description']) ? $description = $request['description'] : ($description = '');
     isset($request['destdial']) ? $destdial = $request['destdial'] : ($destdial = '');
     isset($request['view']) ? $view = $request['view'] : ($view = '');
     isset($request['action']) ? $action = $request['action'] : ($action = '');
     switch ($action) {
         case "add":
             $extdisplay = $this->add($request['description'], $request['destdial']);
             needreload();
             redirect_standard();
             break;
         case "delete":
             $this->del($request['extdisplay']);
             needreload();
             redirect_standard();
             break;
         case "edit":
             $this->update($request['extdisplay'], $request['description'], $request['destdial']);
             needreload();
             redirect_standard('extdisplay', 'view');
             break;
     }
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:26,代码来源:Miscdests.class.php

示例7: doConfigPageInit

 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     $type = isset($request['type']) ? $request['type'] : 'setup';
     $action = isset($request['action']) ? $request['action'] : '';
     if (isset($request['delete'])) {
         $action = 'delete';
     }
     $language_id = isset($request['language_id']) ? $request['language_id'] : false;
     $description = isset($request['description']) ? $request['description'] : '';
     $lang_code = isset($request['lang_code']) ? $request['lang_code'] : '';
     $dest = isset($request['dest']) ? $request['dest'] : '';
     $view = isset($request['view']) ? $request['view'] : '';
     if (isset($request['goto0']) && $request['goto0']) {
         $dest = $request[$request['goto0'] . '0'];
     }
     switch ($action) {
         case 'add':
             $request['extdisplay'] = languages_add($description, $lang_code, $dest);
             needreload();
             break;
         case 'edit':
             languages_edit($language_id, $description, $lang_code, $dest);
             needreload();
             break;
         case 'delete':
             languages_delete($language_id);
             needreload();
             break;
     }
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:31,代码来源:Languages.class.php

示例8: doConfigPageInit

 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     $error_displays = array();
     $action = isset($request['action']) ? $request['action'] : '';
     $post_codec = isset($request['codec']) ? $request['codec'] : array();
     $post_vcodec = isset($request['vcodec']) ? $request['vcodec'] : array();
     $iax_settings['codecpriority'] = isset($request['codecpriority']) ? $request['codecpriority'] : 'host';
     $iax_settings['bandwidth'] = isset($request['bandwidth']) ? $request['bandwidth'] : 'unset';
     $iax_settings['videosupport'] = isset($request['videosupport']) ? $request['videosupport'] : 'no';
     $iax_settings['maxregexpire'] = isset($request['maxregexpire']) ? htmlspecialchars($request['maxregexpire']) : '3600';
     $iax_settings['minregexpire'] = isset($request['minregexpire']) ? htmlspecialchars($request['minregexpire']) : '60';
     $iax_settings['jitterbuffer'] = isset($request['jitterbuffer']) ? $request['jitterbuffer'] : 'no';
     $iax_settings['forcejitterbuffer'] = isset($request['forcejitterbuffer']) ? $request['forcejitterbuffer'] : 'no';
     $iax_settings['maxjitterbuffer'] = isset($request['maxjitterbuffer']) ? htmlspecialchars($request['maxjitterbuffer']) : '200';
     $iax_settings['resyncthreshold'] = isset($request['resyncthreshold']) ? htmlspecialchars($request['resyncthreshold']) : '1000';
     $iax_settings['maxjitterinterps'] = isset($request['maxjitterinterps']) ? htmlspecialchars($request['maxjitterinterps']) : '10';
     $iax_settings['bindaddr'] = isset($request['bindaddr']) ? htmlspecialchars($request['bindaddr']) : '';
     $iax_settings['bindport'] = isset($request['bindport']) ? htmlspecialchars($request['bindport']) : '';
     $iax_settings['delayreject'] = isset($request['delayreject']) ? htmlspecialchars($request['delayreject']) : 'yes';
     $codecs = array('ulaw' => '', 'alaw' => '', 'slin' => '', 'g726' => '', 'gsm' => '', 'g729' => '', 'ilbc' => '', 'g723' => '', 'g726aal2' => '', 'adpcm' => '', 'lpc10' => '', 'speex' => '', 'g722' => '', 'siren7' => '', 'siren14' => '');
     // With the new sorting, the vars should come to us in the sorted order so just use that
     //
     $pri = 1;
     foreach (array_keys($post_codec) as $codec) {
         $codecs[$codec] = $pri++;
     }
     $iax_settings['codecs'] = $codecs;
     $video_codecs = array('h261' => '', 'h263' => '', 'h263p' => '', 'h264' => '');
     $pri = 1;
     foreach (array_keys($post_vcodec) as $vcodec) {
         $video_codecs[$vcodec] = $pri++;
     }
     $iax_settings['video_codecs'] = $video_codecs;
     $p_idx = $n_idx = 0;
     while (isset($request["iax_custom_key_{$p_idx}"])) {
         if ($request["iax_custom_key_{$p_idx}"] != '') {
             $iax_settings["iax_custom_key_{$n_idx}"] = htmlspecialchars($request["iax_custom_key_{$p_idx}"]);
             $iax_settings["iax_custom_val_{$n_idx}"] = htmlspecialchars($request["iax_custom_val_{$p_idx}"]);
             $n_idx++;
         }
         $p_idx++;
     }
     switch ($action) {
         case "edit":
             //just delete and re-add
             if (($errors = iaxsettings_edit($iax_settings)) !== true) {
                 $error_displays = process_errors($errors);
             } else {
                 needreload();
                 //redirect_standard();
             }
             break;
         default:
             /* only get them if first time load, if they pressed submit, use values from POST */
             $iax_settings = iaxsettings_get();
     }
     $error_displays = array_merge($error_displays, iaxsettings_check_custom_files());
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:59,代码来源:Iaxsettings.class.php

示例9: doConfigPageInit

 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     isset($request['action']) ? $action = $request['action'] : ($action = '');
     isset($request['view']) ? $view = $request['view'] : ($view = 'form');
     //the extension we are currently displaying
     $account = isset($request['account']) ? $request['account'] : '';
     $extdisplay = isset($request['extdisplay']) && $request['extdisplay'] != '' ? $request['extdisplay'] : $account;
     $orig_account = isset($request['orig_account']) ? $request['orig_account'] : '';
     $music = isset($request['music']) ? $request['music'] : '';
     $users = isset($request['users']) ? $request['users'] : '0';
     //check if the extension is within range for this user
     if ($account != "" && !checkRange($account)) {
         echo "<script>javascript:alert('" . _("Warning! Extension") . " {$account} " . _("is not allowed for your account.") . "');</script>";
     } else {
         //if submitting form, update database
         switch ($action) {
             case "add":
                 $conflict_url = array();
                 $usage_arr = framework_check_extension_usage($account);
                 if (!empty($usage_arr)) {
                     $conflict_url = framework_display_extension_usage_alert($usage_arr);
                 } elseif ($this->addConference($account, $request['name'], $request['userpin'], $request['adminpin'], $request['options'], $request['joinmsg_id'], $music, $users, $request['adminpin']) !== false) {
                     needreload();
                 }
                 break;
             case "delete":
                 $this->deleteConference($extdisplay);
                 needreload();
                 break;
             case "edit":
                 //just delete and re-add
                 //check to see if the room number has changed
                 if ($orig_account != '' && $orig_account != $account) {
                     $conflict_url = array();
                     $usage_arr = framework_check_extension_usage($account);
                     if (!empty($usage_arr)) {
                         $conflict_url = framework_display_extension_usage_alert($usage_arr);
                         break;
                     } else {
                         $this->deleteConference($orig_account);
                         $request['extdisplay'] = $account;
                         //redirect to the new ext
                         $old = conferences_getdest($orig_account);
                         $new = conferences_getdest($account);
                         framework_change_destination($old[0], $new[0]);
                     }
                 } else {
                     $this->deleteConference($account);
                 }
                 $this->addConference($account, $request['name'], $request['userpin'], $request['adminpin'], $request['options'], $request['joinmsg_id'], $music, $users, $request['language']);
                 needreload();
                 break;
         }
     }
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:56,代码来源:Conferences.class.php

示例10: itslenny_edit

function itslenny_edit($id, $post)
{
    global $db;
    $var1 = $db->escapeSimple($post['enable']);
    $var2 = $db->escapeSimple($post['record']);
    $var3 = $db->escapeSimple($post['destination']);
    $var4 = $db->escapeSimple($post['silence']);
    $var5 = $db->escapeSimple($post['itterations']);
    $results = sql("\n\t\tUPDATE itslenny \n\t\tSET \n\t\t\tenable = '{$var1}', \n\t\t\trecord = '{$var2}', \n\t\t\tdestination = '{$var3}',\n\t\t\tsilence = '{$var4}',\n\t\t\titterations = '{$var5}'\n\t\tWHERE id = '{$id}'");
    needreload();
}
开发者ID:raylee,项目名称:freepbx-Its_Lenny,代码行数:11,代码来源:functions.inc.php

示例11: doConfigPageInit

 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     if ($page == "callrecording") {
         $type = isset($request['type']) ? $request['type'] : 'setup';
         $view = isset($request['view']) ? $request['view'] : 'form';
         $action = isset($request['action']) ? $request['action'] : '';
         if (isset($request['delete'])) {
             $action = 'delete';
         }
         $callrecording_id = isset($request['callrecording_id']) ? $request['callrecording_id'] : false;
         $description = isset($request['description']) ? $request['description'] : '';
         $callrecording_mode = isset($request['callrecording_mode']) ? $request['callrecording_mode'] : '';
         $dest = isset($request['dest']) ? $request['dest'] : '';
         if (isset($request['goto0']) && $request['goto0']) {
             $dest = $request[$request['goto0'] . '0'];
         }
         switch ($action) {
             case 'add':
                 $request['extdisplay'] = callrecording_add($description, $callrecording_mode, $dest);
                 needreload();
                 //redirect_standard('extdisplay', 'view');
                 break;
             case 'edit':
                 callrecording_edit($callrecording_id, $description, $callrecording_mode, $dest);
                 needreload();
                 //redirect_standard('extdisplay', 'view');
                 break;
             case 'delete':
                 callrecording_delete($callrecording_id);
                 needreload();
                 //redirect_standard();
                 break;
         }
     }
     if ($page == "routing") {
         $viewing_itemid = isset($request['id']) ? $request['id'] : '';
         $action = isset($request['action']) ? $request['action'] : null;
         $route_id = $viewing_itemid;
         //dbug("got request for callrecording process for route: $route_id action: $action");
         if (isset($request['Submit'])) {
             $action = isset($action) ? $action : 'editroute';
         }
         // $action won't be set on the redirect but callrecordingAddRoute will be in the session
         //
         if (!$action && !empty($_SESSION['callrecordingAddRoute'])) {
             callrecording_adjustroute($route_id, 'delayed_insert_route', $_SESSION['callrecordingAddRoute']);
             unset($_SESSION['callrecordingAddRoute']);
         } elseif ($action) {
             callrecording_adjustroute($route_id, $action, $request['callrecording']);
         }
     }
 }
开发者ID:lidl,项目名称:callrecording,代码行数:53,代码来源:Callrecording.class.php

示例12: doConfigPageInit

 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     $dispnum = 'vmblast';
     //used for switch on config.php
     $action = isset($request['action']) ? $request['action'] : '';
     //the extension we are currently displaying
     $account = isset($request['account']) ? $request['account'] : '';
     $extdisplay = isset($request['extdisplay']) ? ltrim($request['extdisplay'], 'GRP-') : ($account != '' ? $account : '');
     $description = isset($request['description']) ? $request['description'] : '';
     $audio_label = isset($request['audio_label']) ? $request['audio_label'] : -1;
     $password = isset($request['password']) ? $request['password'] : '';
     $default_group = isset($request['default_group']) ? $request['default_group'] : '0';
     $vmblast_list = isset($request['vmblast_list']) ? $request['vmblast_list'] : '';
     $view = isset($request['view']) ? $request['view'] : 'form';
     // do if we are submitting a form
     if (isset($request['action'])) {
         //check if the extension is within range for this user
         if (isset($account) && !checkRange($account)) {
             echo "<script>javascript:alert('" . _("Warning! Extension") . " " . $account . " " . _("is not allowed for your account") . ".');</script>";
         } else {
             //add group
             if ($action == 'addGRP') {
                 $conflict_url = array();
                 $usage_arr = framework_check_extension_usage($account);
                 if (!empty($usage_arr)) {
                     $conflict_url = framework_display_extension_usage_alert($usage_arr);
                 } else {
                     if (vmblast_add($account, $vmblast_list, $description, $audio_label, $password, $default_group)) {
                         //$request['action'] = 'delGRP';
                         $_REQUEST['view'] = 'form';
                         $_REQUEST['extdisplay'] = $account;
                         needreload();
                         //redirect_standard('extdisplay', 'view');
                     }
                 }
             }
             //del group
             if ($action == 'delGRP') {
                 vmblast_del($account);
                 needreload();
             }
             //edit group - just delete and then re-add the extension
             if ($action == 'editGRP') {
                 vmblast_del($account);
                 vmblast_add($account, $vmblast_list, $description, $audio_label, $password, $default_group);
                 needreload();
             }
         }
     }
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:51,代码来源:Vmblast.class.php

示例13: doConfigPageInit

 public function doConfigPageInit($page)
 {
     isset($_REQUEST['action']) ? $action = $_REQUEST['action'] : ($action = '');
     isset($_REQUEST['itemid']) ? $itemid = $_REQUEST['itemid'] : ($itemid = '');
     switch ($action) {
         case "add":
             $_REQUEST['itemid'] = callback_add($_POST);
             needreload();
             break;
         case "delete":
             callback_del($itemid);
             needreload();
             break;
         case "edit":
             callback_edit($itemid, $_POST);
             needreload();
             break;
     }
 }
开发者ID:ringfreejohn,项目名称:pbxframework,代码行数:19,代码来源:Callback.class.php

示例14: doConfigPageInit

 public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     isset($request['action']) ? $action = $request['action'] : ($action = '');
     isset($request['view']) ? $view = $request['view'] : ($view = 'form');
     isset($request['itemid']) ? $itemid = $request['itemid'] : ($itemid = '');
     if (isset($request['action'])) {
         switch ($action) {
             case "add":
                 cidlookup_add($request);
                 needreload();
                 redirect_standard();
                 break;
             case "delete":
                 cidlookup_del($itemid);
                 needreload();
                 redirect_standard();
                 break;
             case "edit":
                 cidlookup_edit($itemid, $request);
                 needreload();
                 redirect_standard('itemid');
                 break;
             case "getJSON":
                 switch ($request['jdata']) {
                     case "cid_modules":
                         header('Content-Type: application/json');
                         echo json_encode($this->cid_modules);
                         exit;
                         break;
                     default:
                         header('Content-Type: application/json');
                         echo json_encode(array('status' => 'ERROR', 'message' => 'Invalid Request'));
                         exit;
                         break;
                 }
                 break;
         }
     }
 }
开发者ID:lidl,项目名称:cidlookup,代码行数:40,代码来源:Cidlookup.class.php

示例15: featurecodeadmin_update

function featurecodeadmin_update($req)
{
    foreach ($req as $key => $item) {
        // Split up...
        // 0 - action
        // 1 - modulename
        // 2 - featurename
        $arr = explode("#", $key);
        if (count($arr) == 3) {
            $action = $arr[0];
            $modulename = $arr[1];
            $featurename = $arr[2];
            $fieldvalue = $item;
            // Is there a more efficient way of doing this?
            switch ($action) {
                case "ena":
                    $fcc = new featurecode($modulename, $featurename);
                    if ($fieldvalue == 1) {
                        $fcc->setEnabled(true);
                    } else {
                        $fcc->setEnabled(false);
                    }
                    $fcc->update();
                    break;
                case "custom":
                    $fcc = new featurecode($modulename, $featurename);
                    if ($fieldvalue == $fcc->getDefault()) {
                        $fcc->setCode('');
                        // using default
                    } else {
                        $fcc->setCode($fieldvalue);
                    }
                    $fcc->update();
                    break;
            }
        }
    }
    needreload();
}
开发者ID:umjinsun12,项目名称:dngshin,代码行数:39,代码来源:functions.inc.php


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