本文整理汇总了PHP中getParams函数的典型用法代码示例。如果您正苦于以下问题:PHP getParams函数的具体用法?PHP getParams怎么用?PHP getParams使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getParams函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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));
}
示例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();
}
示例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);
}
示例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));
}
示例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();
}
示例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);
}
示例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);
}
示例9: loginAction
public function loginAction()
{
global $_u;
$params = getParams('login');
if (trim($params['secret']) == USER_SECRET) {
$_u->login();
redirect('monitor');
}
}
示例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);
}
示例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();
}
示例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');
}
}
示例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();
}
示例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");
}
}
}
示例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;
}