• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getParams函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: log_list

function log_list() {
    $ajax = new AjaxFilter("modules/imaging/imaging/ajaxLogs.php", "container", getParams());
    //$ajax->setRefresh(10000);
    $ajax->display();
    echo '<br/><br/><br/>';
    $ajax->displayDivToUpdate();
}
开发者ID:neoclust,项目名称:mmc,代码行数:7,代码来源:logs.php


示例2: create

 /**
  * 添加商家
  * http://localhost/beauty/index.php?m=shop&c=index&a=create
  */
 public function create()
 {
     $data = getParams("data", '');
     $data['created'] = strtotime(date('Y-m-d H:i:s'));
     $result = parent::save($data);
     echo json_encode(array('code' => '0', 'message' => '成功', 'data' => $result));
 }
开发者ID:mustafakarali,项目名称:b2c-1,代码行数:11,代码来源:index.php


示例3: image_add

function image_add($type, $target_uuid)
{
    $params = getParams();
    $item_uuid = $_GET['itemid'];
    $label = urldecode($_GET['itemlabel']);
    $f = new PopupForm(sprintf(_T("Add the image <b>%s</b> to <b>%s</b>", "imaging"), $label, $params['hostname']));
    # Need to get the name of the target
    $f->push(new Table());
    // form preseeding
    $f->add(new HiddenTpl("itemid"), array("value" => $item_uuid, "hide" => True));
    $f->add(new HiddenTpl("itemlabel"), array("value" => $label, "hide" => True));
    $f->add(new HiddenTpl("gid"), array("value" => $_GET['gid'], "hide" => True));
    $f->add(new HiddenTpl("uuid"), array("value" => $_GET['uuid'], "hide" => True));
    /*$input = new TrFormElement(_T('Default menu item label', 'imaging'),        new InputTpl("default_mi_label"));
      $f->add($input,                                         array("value" => ''));
       */
    $check = new TrFormElement(_T('Selected by default', 'imaging'), new CheckboxTpl("do_default"));
    $f->add($check, array("value" => web_def_image_default() ? "checked" : ""));
    $check = new TrFormElement(_T('Displayed', 'imaging'), new CheckboxTpl("do_display"));
    $f->add($check, array("value" => web_def_image_hidden() ? "checked" : ""));
    $check = new TrFormElement(_T('Selected by default on WOL', 'imaging'), new CheckboxTpl("do_default_WOL"));
    $f->add($check, array("value" => web_def_image_default_WOL() ? "checked" : ""));
    $check = new TrFormElement(_T('Displayed on WOL', 'imaging'), new CheckboxTpl("do_display_WOL"));
    $f->add($check, array("value" => web_def_image_hidden_WOL() ? "checked" : ""));
    $f->addValidateButton("bconfirm");
    $f->addCancelButton("bback");
    $f->display();
}
开发者ID:sebastiendu,项目名称:mmc,代码行数:28,代码来源:master_add.php


示例4: deleteAction

 public function deleteAction(){
     $params = getParams();
     $podcast = $params['podcast'];
     $oldPath = $this -> Podcast -> Config -> get('path_data_podcast').$podcast.'.json';
     if(file_exists($oldPath))
         unlink($oldPath);
 }
开发者ID:seekwhencer,项目名称:Playlist-Automation,代码行数:7,代码来源:podcastController.php


示例5: getList

 public function getList()
 {
     $typeList = array();
     $typeList['catering'] = "餐饮";
     $typeList['variety'] = "便利店";
     $type = getParams('type', '');
     $name = $typeList[$type];
     $searchType = "3";
     $key = isset($_GET['key']) ? trim($_GET['key']) : null;
     //这里是一个坐标值
     $pageNum = isset($_GET['page']) ? trim($_GET['page']) - 1 : 0;
     $res = $this->poi->get_place_search($name, $searchType, $key, $pageNum);
     if ($res['status'] != 0) {
         return print json_encode(array('code' => '-1', 'message' => $res['message']));
     }
     // 返回错误信息.同时记录日志 message
     $list = array();
     $data = $res['results'];
     foreach ($data as $key => $val) {
         $location = $val['location'];
         $item = $value;
         unset($item['location']);
         $item['location'] = $location['lat'] . ',' . $location['lng'];
         $list[$key] = $item;
     }
     echo json_encode(array('code' => '0', 'message' => '成功', 'data' => $list));
 }
开发者ID:mustafakarali,项目名称:b2c-1,代码行数:27,代码来源:index.php


示例6: service_add

function service_add($location)
{
    $params = getParams();
    $item_uuid = $_GET['itemid'];
    $label = urldecode($_GET['itemlabel']);
    $f = new PopupForm(sprintf(_T("Add the boot service <b>%s</b> to the default boot menu", "imaging"), $label));
    $f->push(new Table());
    // form preseeding
    $f->add(new HiddenTpl("location"), array("value" => $location, "hide" => True));
    $f->add(new HiddenTpl("itemlabel"), array("value" => $label, "hide" => True));
    $f->add(new HiddenTpl("itemid"), array("value" => $item_uuid, "hide" => True));
    $f->add(new HiddenTpl("default_mi_label"), array("value" => $label, "hide" => True));
    #    $input = new TrFormElement(_T('Default menu item label', 'imaging'),        new InputTpl("default_mi_label"));
    #$f->add($input,                                         array("value" => ''));
    $check = new TrFormElement(_T('Selected by default', 'imaging'), new CheckboxTpl("do_default"));
    $f->add($check, array("value" => web_def_service_default() ? "checked" : ""));
    $check = new TrFormElement(_T('Displayed', 'imaging'), new CheckboxTpl("do_display"));
    $f->add($check, array("value" => web_def_service_hidden() ? "checked" : ""));
    $check = new TrFormElement(_T('Selected by default on WOL', 'imaging'), new CheckboxTpl("do_default_WOL"));
    $f->add($check, array("value" => web_def_service_default_WOL() ? "checked" : ""));
    $check = new TrFormElement(_T('Displayed on WOL', 'imaging'), new CheckboxTpl("do_display_WOL"));
    $f->add($check, array("value" => web_def_service_hidden_WOL() ? "checked" : ""));
    $f->addValidateButton("bconfirm");
    $f->addCancelButton("bback");
    $f->display();
}
开发者ID:sebastiendu,项目名称:mmc,代码行数:26,代码来源:service_add.php


示例7: __construct

 function __construct()
 {
     $dbconnect = getParams();
     $options = array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8");
     $this->bdd = new PDO("mysql:host=" . $dbconnect[0] . ";dbname=" . $dbconnect[1], $dbconnect[2], $dbconnect[3], $options);
     $this->bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     $this->bdd->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
 }
开发者ID:babolivier,项目名称:isen-rentree,代码行数:8,代码来源:connector.class.php


示例8: setdateAction

 public function setdateAction(){
     $params = getParams('configFormDate');
     
     foreach($params as $k => $p)
         $params[$k] = intval($p);
     
     $cmd = 'sudo date --set="'.$params['year'].'-'.$params['month'].'-'.$params['day'].' '.$params['hour'].':'.$params['minute'].':00.000"';
     shell_exec($cmd);
 }
开发者ID:seekwhencer,项目名称:Playlist-Automation,代码行数:9,代码来源:configController.php


示例9: loginAction

 public function loginAction()
 {
     global $_u;
     $params = getParams('login');
     if (trim($params['secret']) == USER_SECRET) {
         $_u->login();
         redirect('monitor');
     }
 }
开发者ID:seekwhencer,项目名称:WebSocket-UI,代码行数:9,代码来源:userController.php


示例10: previewAction

 public function previewAction()
 {
     $params = getParams();
     $showFileName = $params['show'];
     $show = $this->Radio->getShow($showFileName);
     $playlist = $this->Radio->buildPlaylist($show);
     shell_exec('sh /data/radio/script/schedule.sh');
     return array('playlist' => $playlist);
 }
开发者ID:seekwhencer,项目名称:Playlist-Automation,代码行数:9,代码来源:showController.php


示例11: saveConfig

 public function saveConfig(){
     $params = getParams('configForm');
     $save = json_encode($params);
     $filePath = PATH_DATA . "" . STATION_CONFIG;
     $fh = fopen($filePath,'w+');
     fwrite($fh,$save);
     fclose($fh);
     
     $this->getConfig();
 }
开发者ID:seekwhencer,项目名称:Playlist-Automation,代码行数:10,代码来源:Config.php


示例12: loginAction

 public function loginAction()
 {
     global $_u;
     if ($_u->isAuth()) {
         redirect('admin');
     }
     $params = getParams('login');
     if (trim($params['secret']) == USER_SECRET) {
         $_u->login();
         redirect('admin/show');
     }
 }
开发者ID:seekwhencer,项目名称:Playlist-Automation,代码行数:12,代码来源:userController.php


示例13: service_list

    function service_list($type, $target_uuid, $target_name) {
        $params = getParams();
        $params['target_uuid'] = $target_uuid;
        $params['target_type'] = $type;
        $params['target_name'] = $target_name;

        $ajax = new AjaxFilter("modules/imaging/imaging/ajaxServices.php", "Level2", $params, "Level2");
        //$ajax->setRefresh(10000);
        $ajax->display();
        echo '<br/><br/><br/>';
        $ajax->displayDivToUpdate();
    }
开发者ID:neoclust,项目名称:mmc,代码行数:12,代码来源:services.php


示例14: getParams

function getParams($classReflection, $class)
{
    $command = file_get_contents(__DIR__ . '/../library/Rediska/Command/' . substr($class, 16) . '.php');
    preg_match('/public function create\\((.+)/i', $command, $matches);
    if (isset($matches[1])) {
        return trim($matches[1]);
    } else {
        if ($classReflection->getParentClass()) {
            return getParams($classReflection, $classReflection->getParentClass()->getName());
        } else {
            die("{$class} doesnot have a create method");
        }
    }
}
开发者ID:r-kovalenko,项目名称:Rediska,代码行数:14,代码来源:add_command_methods.php


示例15: dispatch

function dispatch($data, $filePath)
{
    $params = getParams();
    if (count($params) > 0) {
        $response = save($data, $params, $filePath);
    } else {
        $id = getIdParam();
        if ($id) {
            $response = detail($data, $id);
        } else {
            $response = $data;
        }
    }
    return $response;
}
开发者ID:aique,项目名称:angular-staying-sharp,代码行数:15,代码来源:dispatcher.php


示例16: item_list

function item_list()
{
    if (isset($_GET['gid'])) {
        $type = 'group';
        list($count, $menu) = xmlrpc_getProfileBootMenu($_GET['gid']);
    } else {
        $type = '';
        list($count, $menu) = xmlrpc_getComputerBootMenu($_GET['uuid']);
    }
    $params = getParams();
    // forge params
    if ($type == 'group') {
        $module = "imaging";
        $submod = "manage";
    } else {
        $module = "base";
        $submod = "computers";
    }
    $upAction = new ActionItem(_T("Move Up"), $type . "imgtabs", "up", "item", $module, $submod, $type . "tabbootmenu", "up");
    $downAction = new ActionItem(_T("Move down"), $type . "imgtabs", "down", "item", $module, $submod, $type . "tabbootmenu", "down");
    $editAction = new ActionItem(_T("Edit"), $type . "imgtabs", "edit", "item", $module, $submod, $type . "tabbootmenu", "edit");
    $deleteAction = new ActionPopupItem(_T("Delete"), $type . "bootmenu_remove", "delete", "item", $module, $submod, $type . "tabbootmenu", 300, "delete");
    $emptyAction = new EmptyActionItem();
    $actionUp = array();
    $actionDown = array();
    $actionEdit = array();
    $actionDelete = array();
    $nbItems = $count;
    $a_label = array();
    $a_desc = array();
    $a_default = array();
    $a_display = array();
    $a_defaultWOL = array();
    $a_displayWOL = array();
    $params['from'] = 'tabbootmenu';
    $i = -1;
    $root_len = 0;
    foreach ($menu as $entry) {
        $i = $i + 1;
        $is_image = False;
        if (isset($entry['image'])) {
            $is_image = True;
        }
        if ($is_image) {
            # TODO $entry has now a cache for desc.
            $a_desc[] = $entry['image']['desc'];
            $entry['default_name'] = $entry['image']['name'];
            $kind = 'IM';
            if ($entry['read_only']) {
                $url = '<img src="modules/imaging/graph/images/imaging-action-ro.png" style="vertical-align: middle" alt="' . _T('master from the profile', 'imaging') . '"/> ';
            } else {
                $url = '<img src="modules/imaging/graph/images/imaging-action.png" style="vertical-align: middle" alt="' . _T('master', 'imaging') . '"/> ';
            }
        } else {
            $a_desc[] = $entry['boot_service']['default_desc'];
            $entry['default_name'] = $entry['boot_service']['default_name'];
            $kind = 'BS';
            if ($entry['read_only']) {
                $url = '<img src="modules/imaging/graph/images/service-action-ro.png" style="vertical-align: middle" alt="' . _T('boot service from profile', 'imaging') . '"/> ';
            } else {
                $url = '<img src="modules/imaging/graph/images/service-action.png" style="vertical-align: middle" alt="' . _T('boot service', 'imaging') . '"/> ';
            }
        }
        $list_params[$i] = $params;
        $list_params[$i]["itemid"] = $entry['imaging_uuid'];
        $list_params[$i]["itemlabel"] = urlencode($entry['default_name']);
        if ($entry['read_only']) {
            $actionsDown[] = $emptyAction;
            $actionsUp[] = $emptyAction;
            $root_len += 1;
            $actionEdit[] = $emptyAction;
            $actionDelete[] = $emptyAction;
        } else {
            $actionEdit[] = $editAction;
            $actionDelete[] = $deleteAction;
            if ($i == $root_len) {
                if ($count == 1 || $root_len == $count - 1) {
                    $actionsDown[] = $emptyAction;
                    $actionsUp[] = $emptyAction;
                } else {
                    $actionsDown[] = $downAction;
                    $actionsUp[] = $emptyAction;
                }
            } elseif ($i > $root_len && $i == $nbItems - 1) {
                $actionsDown[] = $emptyAction;
                $actionsUp[] = $upAction;
            } elseif ($i > $root_len) {
                $actionsDown[] = $downAction;
                $actionsUp[] = $upAction;
            }
        }
        $a_label[] = sprintf("%s%s", $url, $entry['default_name']);
        # should be replaced by the label in the good language
        $a_default[] = $entry['default'];
        $a_display[] = $entry['hidden'] ? False : True;
        $a_defaultWOL[] = $entry['default_WOL'];
        $a_displayWOL[] = $entry['hidden_WOL'] ? False : True;
    }
    $firstp = "<p>" . _T("Use \"Preselected choice\" or \"Preselected choice on WOL\" to define the default boot entry.", "imaging") . "</p>";
    /* Build tooltip text on column name */
//.........这里部分代码省略.........
开发者ID:sebastiendu,项目名称:mmc,代码行数:101,代码来源:bootmenu.php


示例17: setParams

/**
 * Функция переопределяет параметры скрипта
 */
function setParams()
{
    // Явное указание на использование глобальных переменных
    global $maxMailSend, $logFileMaxSize;
    // Получение параметров компонента
    $parameters = getParams();
    // Если запрос в БД вернул ошибку
    if (empty($parameters) || $parameters === false) {
        // Возвращаем отрицательный результат выполнения функции
        return false;
    }
    // Переопределение значений параметра скрипта значениями компонента
    $maxMailSend = $parameters['mailSendKolLimit'] != '' && (int) $parameters['mailSendKolLimit'] > 0 ? $parameters['mailSendKolLimit'] : $maxMailSend;
    // Переопределение значений параметра скрипта значениями компонента
    $logFileMaxSize = $parameters['logFileMaxSize'] != '' && (int) $parameters['logFileMaxSize'] > 1 ? 1024 * 1024 * $parameters['logFileMaxSize'] : $logFileMaxSize;
    // Возвращаем положительный результат выполнения функции
    return true;
}
开发者ID:ildaribragimov,项目名称:PHPResponder,代码行数:21,代码来源:responder.v1.php


示例18: str_replace

                $html = str_replace("<!--SO_HIDDEN-->", empty(Server::$Groups[$groupid]->ChatFunctions[1]) ? "none" : "", $html);
                $html = str_replace("<!--PR_HIDDEN-->", empty(Server::$Groups[$groupid]->ChatFunctions[2]) ? "none" : "", $html);
                $html = str_replace("<!--FV_HIDDEN-->", empty(Server::$Groups[$groupid]->ChatFunctions[4]) ? "none" : "", $html);
                $html = str_replace("<!--FU_HIDDEN-->", empty(Server::$Groups[$groupid]->ChatFunctions[5]) || !empty($_GET[GET_EXTERN_DYNAMIC_GROUP]) ? "none" : "", $html);
                $html = str_replace("<!--post_chat_js-->", base64_encode(Server::$Groups[$groupid]->PostJS), $html);
            }
            $html = str_replace("<!--TR_HIDDEN-->", strlen(Server::$Configuration->File["gl_otrs"]) > 1 ? "" : "none", $html);
            $html = str_replace("<!--ET_HIDDEN-->", !empty(Server::$Configuration->File["gl_retr"]) && !empty(Server::$Configuration->File["gl_soct"]) ? "" : "none", $html);
        }
    }
}
$header = IOStruct::GetFile(PATH_TEMPLATES . "header.tpl");
if (isset($_GET[GET_EXTERN_USER_HEADER]) && !empty($_GET[GET_EXTERN_USER_HEADER])) {
    $header = str_replace("<!--logo-->", "<img src=\"" . Encoding::Base64UrlDecode($_GET[GET_EXTERN_USER_HEADER]) . "\" border=\"0\"><br>", $header);
} else {
    if (!empty(Server::$Configuration->File["gl_cali"])) {
        $header = str_replace("<!--logo-->", "<img src=\"" . Server::$Configuration->File["gl_cali"] . "\" border=\"0\"><br>", $header);
    }
}
if (!empty(Server::$Configuration->File["gl_cahi"])) {
    $header = str_replace("<!--background-->", "<img src=\"" . Server::$Configuration->File["gl_cahi"] . "\" border=\"0\"><br>", $header);
}
$html = str_replace("<!--param-->", @Server::$Configuration->File["gl_cpar"], $html);
$html = str_replace("<!--header-->", $header, $html);
$html = str_replace("<!--server-->", LIVEZILLA_URL, $html);
$html = str_replace("<!--html-->", "<html dir=\"" . LocalizationManager::$Direction . "\">", $html);
$html = str_replace("<!--rtl-->", To::BoolString(LocalizationManager::$Direction == "rtl"), $html);
$html = str_replace("<!--dir-->", LocalizationManager::$Direction, $html);
$html = str_replace("<!--url_get_params-->", getParams(), $html);
Server::UnloadDataProvider();
exit(Server::Replace($html));
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:31,代码来源:chat.php


示例19: http_response_code

    http_response_code(400);
    $data = array('code' => 400, 'error' => 'invalid_token', 'error_description' => 'Field \'token\' is not set or is invalid.');
    echo json_encode($data);
    exit;
} else {
    $token = $_GET["token"];
}
if (!isset($data["code"]) && (!isset($_GET["action"]) || $_GET["action"] === "")) {
    http_response_code(400);
    $data = array('code' => 400, 'error' => 'invalid_action', 'error_description' => 'Field \'action\' is not set or is invalid.');
    echo json_encode($data);
    exit;
} else {
    $action = $_GET["action"];
}
$params = getParams($action);
$paramVals = array();
if (!isset($data["code"])) {
    foreach ($params as $param) {
        if (!isset($_GET[$param]) || $_GET[$param] === "") {
            http_response_code(400);
            $data = array('code' => 400, 'error' => 'invalid_param', 'error_description' => 'Field \'' . $param . '\' is not set.');
            echo json_encode($data);
            exit;
            break;
        } else {
            array_push($paramVals, $_GET[$param]);
        }
    }
}
if (!isset($data["code"])) {
开发者ID:krokerik,项目名称:SHL-Live,代码行数:31,代码来源:SHL_Proxy.php


示例20: print_r

    print_r($allGetVars);
    foreach ($allGetVars as $key => $param) {
        //GET parameters list
    }
    //POST or PUT
    $allPostPutVars = $request->getParsedBody();
    print_r($allPostPutVars);
    if (!empty($allPostPutVars)) {
        foreach ($allPostPutVars as $key => $param) {
            //POST or PUT parameters list
        }
    }
});
$app->any('/auth', function ($request, $response, $args) {
    // GET, POST or PUT
    $params = getParams($request);
    // Check for required params
    verifyRequired(array('email', 'password'), $params);
    // Validating email address
    validateEmail($params['email']);
    if ($params['email'] == '[email protected]' && $params['password'] == '123456') {
        // CSRF token name and value
        $nameKey = $this->csrf->getTokenNameKey();
        $valueKey = $this->csrf->getTokenValueKey();
        $name = $request->getAttribute($nameKey);
        $value = $request->getAttribute($valueKey);
        $tokenArray = [$nameKey => $name, $valueKey => $value];
        return json_encode(array('success' => true, 'token' => $tokenArray));
    } else {
        return json_encode(array('success' => false, 'message' => 'Email o password invalid.'));
    }
开发者ID:EliuFlorez,项目名称:app-slim,代码行数:31,代码来源:index.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getParentFolderPath函数代码示例发布时间:2022-05-15
下一篇:
PHP getParameter函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap