function NAV_Regular($navName, $rsName, $relPath, $currentPage, $maxRows) { $this->navName = $navName; $this->rsName = $rsName; $this->relPath = $relPath; $this->currentPage = $currentPage; KT_session_start(); if (!isset($_SESSION["default_max_rows_" . $navName])) { $_SESSION["default_max_rows_" . $navName] = $maxRows; } if (!isset($_SESSION["max_rows_" . $navName])) { $_SESSION["max_rows_" . $navName] = (int) $maxRows; } if (isset($_GET["show_all_" . $this->navName])) { $_SESSION["max_rows_" . $navName] = 10000; } else { if (isset($_POST['KT_dynRows_' . $navName])) { $KT_dynRows = (int) $_POST['KT_dynRows_' . $navName]; if ($KT_dynRows > 0) { $_SESSION["max_rows_" . $navName] = $KT_dynRows; $KT_url = KT_addReplaceParam(KT_getFullURI(), 'pageNum_' . $this->rsName); KT_redir($KT_url); } } else { if ($_SESSION["default_max_rows_" . $navName] != $maxRows || $_SESSION["max_rows_" . $navName] == 10000) { $_SESSION["max_rows_" . $navName] = $maxRows; $_SESSION["default_max_rows_" . $navName] = $maxRows; } } } }
/** * Update in session the values related to user login; * @param object tNG transaction object * @return nothing * @access public */ function Trigger_Update_RefreshSession(&$tNG) { if (is_array($GLOBALS['tNG_login_config_session'])) { KT_session_start(); if (isset($_SESSION['kt_login_id'])) { $session_pk_field = $GLOBALS['tNG_login_config_session']['kt_login_id']; $session_pk_value = $_SESSION['kt_login_id']; $pk_field = $tNG->getPrimaryKey(); $pk_value = $tNG->getPrimaryKeyValue(); if ($pk_field != '' && $session_pk_field == $pk_field && $pk_value != '' && $session_pk_value == $pk_value) { $ses_arr = $GLOBALS['tNG_login_config_session']; foreach ($ses_arr as $ses_name => $ses_value) { if (isset($tNG->columns[$ses_value])) { $value = $tNG->getColumnValue($ses_value); $_SESSION[$ses_name] = $value; KT_setSessionVar($ses_name); } } } } } return null; }
<?php /* Copyright (c) InterAKT Online 2000-2006 */ $KT_Collapsible_uploadErrorMsg = '<strong>File not found:</strong> <br />%s<br /><strong>Please upload the includes/jaxon/widgets folder to the testing server.</strong> <br /><a href="http://www.interaktonline.com/error/?error=upload_includes" onclick="return confirm(\'Some data will be submitted to InterAKT. Do you want to continue?\');" target="KTDebugger_0">Online troubleshooter</a>'; $KT_Collapsible_uploadFileList = array('../../utils/json.php', '../../../common/KT_common.php', 'collapsible.class.php'); for ($KT_Collapsible_i = 0; $KT_Collapsible_i < sizeof($KT_Collapsible_uploadFileList); $KT_Collapsible_i++) { $KT_Collapsible_uploadFileName = dirname(realpath(__FILE__)) . '/' . $KT_Collapsible_uploadFileList[$KT_Collapsible_i]; if (file_exists($KT_Collapsible_uploadFileName)) { require_once $KT_Collapsible_uploadFileName; } else { die(sprintf($KT_Collapsible_uploadErrorMsg, $KT_Collapsible_uploadFileList[$KT_Collapsible_i])); } } KT_session_start();
/** * Add the URL to the $_SESSION['KT_backArr'] array if this array not exist; * If the array $_SESSION['KT_backArr'] exist check if the last entry is identical with the argument; * If this 2 url are identical the old one is replaced with the new one, if not the new one is append it. * @param string $newUrl the url to be add to the array; * @return nothing; */ function KT_SessionKtBack($newUrl) { KT_session_start(); $newUrl = KT_addReplaceParam($newUrl, 'KT_ajax_request'); if (!isset($_SESSION['KT_backArr'])) { $_SESSION['KT_backArr'] = array(); array_push($_SESSION['KT_backArr'], $newUrl); } elseif (count($_SESSION['KT_backArr']) > 0) { $oldUrl = array_pop($_SESSION['KT_backArr']); $toldUrl = KT_addReplaceParam($oldUrl, '/^pageNum_.*$/i'); $toldUrl = KT_addReplaceParam($toldUrl, '/^totalRows_.*$/i'); $toldUrl = KT_addReplaceParam($toldUrl, '/^sorter_.*$/i'); $toldUrl = KT_addReplaceParam($toldUrl, '/^show_all_.*$/i'); $toldUrl = KT_addReplaceParam($toldUrl, '/^show_filter_.*$/i'); $toldUrl = KT_addReplaceParam($toldUrl, '/^reset_filter_.*$/i'); $toldUrl = KT_addReplaceParam($toldUrl, 'isFlash'); $toldUrl = KT_addReplaceParam($toldUrl, session_name()); $tnewUrl = KT_addReplaceParam($newUrl, '/^pageNum_.*$/i'); $tnewUrl = KT_addReplaceParam($tnewUrl, '/^totalRows_.*$/i'); $tnewUrl = KT_addReplaceParam($tnewUrl, '/^sorter_.*$/i'); $tnewUrl = KT_addReplaceParam($tnewUrl, '/^show_all_.*$/i'); $tnewUrl = KT_addReplaceParam($tnewUrl, '/^show_filter_.*$/i'); $tnewUrl = KT_addReplaceParam($tnewUrl, '/^reset_filter_.*$/i'); $tnewUrl = KT_addReplaceParam($tnewUrl, 'isFlash'); $tnewUrl = KT_addReplaceParam($tnewUrl, session_name()); if ($tnewUrl != $toldUrl) { array_push($_SESSION['KT_backArr'], $oldUrl); } array_push($_SESSION['KT_backArr'], $newUrl); } else { array_push($_SESSION['KT_backArr'], $newUrl); } }