private static function _setTimeFrameSetting($frame) { global $CONFIG; if ($GLOBALS['timeframe']['data_object']) { return $GLOBALS['timeframe']['data_object']->SetTimeframe($frame); } if ($CONFIG['timeframe']['set_timeframe_func'] == 'setUserSetting') { return setUserSetting("timeframe", $frame); } else { return $CONFIG['timeframe']['set_timeframe_func']($frame); } }
<head> <?php html_header_show(); // If we are saving user_specific globals. // if ($_POST['form_save'] && $_GET['mode'] == "user") { $i = 0; foreach ($GLOBALS_METADATA as $grpname => $grparr) { if (in_array($grpname, $USER_SPECIFIC_TABS)) { foreach ($grparr as $fldid => $fldarr) { if (in_array($fldid, $USER_SPECIFIC_GLOBALS)) { list($fldname, $fldtype, $flddef, $flddesc) = $fldarr; $label = "global:" . $fldid; $fldvalue = trim(strip_escape_custom($_POST["form_{$i}"])); setUserSetting($label, $fldvalue, $_SESSION['authId'], FALSE); if ($_POST["toggle_{$i}"] == "YES") { removeUserSetting($label); } ++$i; } } } } echo "<script type='text/javascript'>"; echo "parent.left_nav.location.reload();"; echo "parent.Title.location.reload();"; echo "if(self.name=='RTop'){"; echo "parent.RBot.location.reload();"; echo "}else{"; echo "parent.RTop.location.reload();";
<?php // Copyright (C) 2010 Brady Miller <*****@*****.**> // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // // This file contains functions that manage custom user // settings // //SANITIZE ALL ESCAPES $sanitize_all_escapes = true; // //STOP FAKE REGISTER GLOBALS $fake_register_globals = false; // require_once dirname(__FILE__) . "/../../interface/globals.php"; require_once dirname(__FILE__) . "/../user.inc"; //If 'mode' is either a 1 or 0 and 'target' ends with _expand // Then will update the appropriate user _expand flag if (($_POST['mode'] == 1 || $_POST['mode'] == 0) && substr($_POST['target'], -7, 7) == "_expand") { //set the user setting setUserSetting($_POST['target'], $_POST['mode']); } //mdsupport : Generic user setting if (isset($_POST['lab']) && isset($_POST['val'])) { setUserSetting($_POST['lab'], $_POST['val']); }
<?php // Copyright (C) 2010 Brady Miller <*****@*****.**> // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // // This file contains functions that manage custom user // settings // //SANITIZE ALL ESCAPES $sanitize_all_escapes = true; // //STOP FAKE REGISTER GLOBALS $fake_register_globals = false; // require_once dirname(__FILE__) . "/../../interface/globals.php"; require_once dirname(__FILE__) . "/../user.inc"; //If 'mode' is either a 1 or 0 and 'target' ends with _expand // Then will update the appropriate user _expand flag if (($_POST['mode'] == 1 || $_POST['mode'] == 0) && substr($_POST['target'], -7, 7) == "_expand") { //set the user setting setUserSetting($_POST['target'], $_POST['mode']); }
<?php header('Content-Type: application/json'); include "../../include/functions.php"; include "../../include/dbcon.inc.php"; include "../../include/settings_functions.inc.php"; $user_id = getUserIdFromToken($con, @$_POST["token"]); $response = array("result" => 0); if ($user_id != 0) { $type = $con->real_escape_string(@$_POST["type"]); $value = $con->real_escape_string(@$_POST["value"]); if ($type != "" & $value != "") { if (setUserSetting($user_id, $type, $value, $con)) { $response = array("result" => 1); } } else { $response = array("result" => 0, "errortext" => "No Type, Value Recieved"); } } echo json_encode($response);