mobile_phone) { echo "I am sorry, but this page cannot be viewed by a mobile phone"; exit; } // smarty template engine (extended Translation version) $smarty = new CoreLibs\Template\SmartyExtend($lang); if (TARGET == 'live' || TARGET == 'remote') { // login $login->debug_output_all = DEBUG ? 1 : 0; $login->echo_output_all = 0; $login->print_output_all = DEBUG ? 1 : 0; // form $form->debug_output_all = DEBUG ? 1 : 0; $form->echo_output_all = 0; $form->print_output_all = DEBUG ? 1 : 0; } // set the template dir // WARNING: this has a special check for the mailing tool layout (old layout) if (defined('LAYOUT')) { $smarty->setTemplateDir(BASE.INCLUDES.TEMPLATES.CONTENT_PATH); $DATA['css'] = LAYOUT.CSS; $DATA['js'] = LAYOUT.JS; } else { $smarty->setTemplateDir(TEMPLATES); $DATA['css'] = CSS; $DATA['js'] = JS; } // space for setting special debug flags $login->debug_output_all = 1; // define edit logging function. should be in a special edit interface class later // METHOD: EditLog() // PARAMS: event -> any kind of event description, data -> any kind of data related to that event // RETURN: none // DESC: writes all action vars plus other info into edit_log table function EditLog($event = '', $data = '') { $q = "INSERT INTO edit_log "; $q .= "(euid, event_date, ip, event, data, page) "; $q .= "VALUES (".$_SESSION['EUID'].", NOW(), '".$_SERVER["REMOTE_ADDR"]."', '".$GLOBALS['form']->dbEscapeString($event)."', '".$GLOBALS['form']->dbEscapeString($data)."', '".$GLOBALS['form']->getPageName()."')"; } // log backend data // data part creation $data = array ( '_SESSION' => $_SESSION, '_GET' => $_GET, '_POST' => $_POST, '_FILES' => $_FILES ); // log action EditLog('Edit Submit', serialize($data)); // define all needed smarty stuff for the general HTML/page building $HEADER['CSS'] = CSS; $HEADER['DEFAULT_ENCODING'] = DEFAULT_ENCODING; $HEADER['STYLESHEET'] = isset($ADMIN_STYLESHEET) ? $ADMIN_STYLESHEET : ADMIN_STYLESHEET; if ($form->my_page_name == 'edit_order') { // get is for "table_name" and "where" only $table_name = isset($_GET['table_name']) ? $_GET['table_name'] : ''; // $where = isset($_GET['where']) ? $_GET['where'] : ''; // order name is _always_ order_number for the edit interface // follwing arrays do exist here: // $position ... has the positions of the array (0..max), cause in a