本文整理汇总了PHP中modules::saveShortcuts方法的典型用法代码示例。如果您正苦于以下问题:PHP modules::saveShortcuts方法的具体用法?PHP modules::saveShortcuts怎么用?PHP modules::saveShortcuts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类modules
的用法示例。
在下文中一共展示了modules::saveShortcuts方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
public function process()
{
//load de security class
$sec = new security();
// if the user data send user and password post...!!
if (!empty($_POST) && !empty($_POST["user"]) && !empty($_POST["password"])) {
//we try to log in...!!
$res = $sec->login($_POST["user"], $_POST["password"]);
}
// verify if we are login, this check session, and check
$res = $sec->loged();
if ($res["success"]) {
//check the action we need
//$this->debug->log($_GET);
$Module = null;
$option = null;
$action = null;
if (isset($_GET["Module"])) {
$Module = $_GET["Module"];
}
if (isset($_GET["option"])) {
$option = $_GET["option"];
}
if (isset($_GET["action"])) {
$action = $_GET["action"];
}
if (isset($_POST["Module"])) {
$Module = $_POST["Module"];
}
if (isset($_POST["option"])) {
$option = $_POST["option"];
}
if (isset($_POST["action"])) {
$action = $_POST["action"];
}
switch ($Module) {
case "Main":
if ($action == "load_user/") {
$action = "load_user";
}
//TODO: dirty fix in update to ext js4
switch ($action) {
case "load_user":
// we get the languaje strings
$languaje = json_encode($this->lang["languaje"]);
// send a ok signal
$json = '{"success" : true, "login": true,';
// we print user data
$json = $json . '"user" : [{' . $sec->print_user();
$json = $json . '"strings":' . $languaje . ",";
$modules = new modules();
$moduleStr = $modules->getUserModules();
$json = $json . '"modules": ' . $moduleStr . ' } ]}';
echo $json;
break;
}
//<--end case action
break;
default:
//first check the user permisión
//this is a generic function
$modules = new modules();
$permision = $modules->checkPermision();
//KILL THIS FUCKING LINE IS JUST TO TEST
//$permision=1;
//$this->debug->log(var_dump($permision));
if ($permision == 1) {
switch ($Module) {
case 'Settings':
switch ($option) {
case 'Wallpaper':
if ($action = "save") {
$isSet = $modules->saveWallpaper();
if (!$isSet) {
echo '{success:false, msg:"No se realizaron los cambios en el servidor"}';
} else {
echo '{success:true, msg:"Guardado"}';
}
}
break;
case "Shortcuts":
if ($action = "save") {
$isSet = $modules->saveShortcuts();
if (!$isSet) {
echo '{success:false, msg:"No se realizaron los cambios en el servidor"}';
} else {
echo '{success:true, msg:"Guardado"}';
}
}
break;
case "QLaunchs":
if ($action = "save") {
$isSet = $modules->saveQLaunchs();
if (!$isSet) {
echo '{success:false, msg:"No se realizaron los cambios en el servidor"}';
} else {
echo '{success:true, msg:"Guardado"}';
}
}
break;
//.........这里部分代码省略.........