Compare commits

..

3 Commits

Author SHA1 Message Date
Clemens Schwaighofer
c772a39156 Back port email regex patch 2019-06-14 14:51:28 +09:00
Clemens Schwaighofer
7907d1d507 Backport fix Basic Class date/time check 2019-06-07 16:42:06 +09:00
Clemens Schwaighofer
01c4a35026 Backport the CoreLibs/Basic changes to the oldTemplateLayout branch 2019-06-07 16:19:35 +09:00
866 changed files with 1415 additions and 1560 deletions

File diff suppressed because one or more lines are too long

View File

@@ -5,63 +5,19 @@
#echo "EXIT"; #echo "EXIT";
#exit; #exit;
# if flagged 'y' then it will ask after each import to continue
development='y';
test='n';
input='';
# database connection info
db='<db name>'; db='<db name>';
host='<db host>'; host='<db host>';
user='<db user>'; user='<db user>';
schema="public"; #schema="publicv";
export PGPASSWORD='';
# log files for file in `cat ORDER`;
error_file="log/error"; do
output_file="log/output"; if [ -f $file ];
then
if [ ! -f ORDER ]; then # for path in $schema;
echo "Could not find ORDER file"; # do
exit; # echo "WORK ON "$schema"."$file;
fi; psql -U $user -h $host -f $file $db 1>> output 2>> error
# done;
if [ "$test" != "n" ]; then
echo "TESTING MODE, NO DATA WILL BE IMPORTED";
fi;
if [ "$development" = "y" ]; then
echo "STEP BY STEP IMPORT MODE ACTIVATED";
fi;
while read file <&3; do
if [ "$file" = "FINISHED" ]; then
echo "Database data is flagged as FINISHED in ORDER file";
exit;
fi;
if [ -f "$file" ]; then
for path in "$schemas"; do
echo "[+] WORK ON '${file}' @ '${path}'";
if [ "$test" = 'n' ]; then
echo "=== START [$file] ===>" >> ${error_file};
psql -U ${user} -h ${host} -f "${file}" ${db} 1>> ${output_file} 2>> ${error_file}
echo "=== END [$file] ===>" >> ${error_file};
fi;
if [ "$development" = "y" ]; then
echo "Press 'y' to move to next. Press 'r' to reload last file. ^c to abort";
fi;
while [ "$development" = "y" ] && [ "$input" != "y" ]; do
read -ep "Continue (y|r|^c): " input;
if [ "$input" = "r" ]; then
echo "Reload File '${file}' ...";
if [ "$test" = 'n' ]; then
echo "=== START RELOAD [$file] ===>" >> ${error_file};
psql -U ${user} -h ${host} -f "${file}" ${db} 1>> ${output_file} 2>> ${error_file}
echo "=== END RELOAD [$file] ===>" >> ${error_file};
fi;
fi; fi;
done; done;
input='';
done;
elif [[ ${file::1} != "#" ]]; then
echo "[!] COULD NOT FIND FILE: '${file}'";
fi;
done 3<ORDER;

View File

@@ -1 +0,0 @@
../includes/edit_base.inc

207
www/admin/edit_order.php Normal file
View File

@@ -0,0 +1,207 @@
<?php
/********************************************************************
* AUTHOR: Clemens Schwaighofer
* CREATED: 2001/07/11
* SHORT DESCRIPTION:
* sets the order from a table (edit_)
* HISTORY:
* 2005/07/11 (cs) adept to new edit interface
* 2002-10-18: little include changes
* 2001-07-11: erste Version
**********************************************************************/
$DEBUG_ALL = 1;
$DB_DEBUG = 1;
extract($_GET, EXTR_SKIP);
extract($_POST, EXTR_SKIP);
require 'config.php';
// set session name
define('SET_SESSION_NAME', EDIT_SESSION_NAME);
// overrride debug flags
if (!DEBUG) {
$DEBUG_ALL = 0;
$PRINT_ALL = 0;
$DB_DEBUG = 0;
$ECHO_ALL = 0;
}
// default lang
if (!$lang) {
$lang = DEFAULT_LANG;
}
$table_width = 600;
if (!$table_width) {
$table_width = PAGE_WIDTH;
}
ob_end_flush();
$login = new CoreLibs\ACL\Login($DB_CONFIG[LOGIN_DB], $lang);
$db = new CoreLibs\DB\IO($DB_CONFIG[MAIN_DB]);
$db->dbExec("SET search_path TO ".LOGIN_DB_SCHEMA);
$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
$db->debug_output_all = DEBUG ? 1 : 0;
$db->echo_output_all = 0;
$db->print_output_all = DEBUG ? 1 : 0;
}
// set the template dir
if (defined('LAYOUT')) {
$smarty->setTemplateDir(LAYOUT.DEFAULT_TEMPLATE.TEMPLATES);
$DATA['css'] = LAYOUT.DEFAULT_TEMPLATE.CSS;
$DATA['js'] = LAYOUT.DEFAULT_TEMPLATE.JS;
} else {
$smarty->setTemplateDir(TEMPLATES.DEFAULT_TEMPLATE);
$DATA['css'] = CSS.DEFAULT_TEMPLATE;
$DATA['js'] = JS.DEFAULT_TEMPLATE;
}
// 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 <select>
// I can't put an number into the array field, in this array,
// there are the POSITION stored, that should CHANGE there order (up/down)
// $row_data_id ... has ALL ids from the sorting part
// $row_data_order ... has ALL order positions from the soirting part
if (!is_array($position)) {
$position = array ();
}
if (count($position)) {
$original_id = $row_data_id;
// FIRST u have to put right sort, then read again ...
// hast to be >0 or the first one is selected and then there is no move
if ($up && $position[0] > 0) {
for ($i = 0; $i < count($position); $i++) {
// change position order
// this gets temp, id before that, gets actual (moves one "down")
// this gets the old before (moves one "up")
// is done for every element in row
// echo "A: ".$row_data_id[$position[$i]]." (".$row_data_order[$position[$i]].") -- ".$row_data_id[$position[$i]-1]." (".$row_data_order[$position[$i]-1].")<br>";
$temp_id = $row_data_id[$position[$i]];
$row_data_id[$position[$i]] = $row_data_id[$position[$i]-1];
$row_data_id[$position[$i]-1] = $temp_id;
// echo "A: ".$row_data_id[$position[$i]]." (".$row_data_order[$position[$i]].") -- ".$row_data_id[$position[$i]-1]." (".$row_data_order[$position[$i]-1].")<br>";
} // for
} // if up
// the last position id from position array is not to be the count-1 of row_data_id array, or it is the last element
if ($down && ($position[count($position) - 1] != (count($row_data_id) - 1))) {
for ($i = count($position) - 1; $i >= 0; $i --) {
// same as up, just up in other way, starts from bottom (last element) and moves "up"
// element before actuel gets temp, this element, becomes element after this,
// element after this, gets this
$temp_id = $row_data_id[$position[$i] + 1];
$row_data_id[$position[$i] + 1] = $row_data_id[$position[$i]];
$row_data_id[$position[$i]] = $temp_id;
} // for
} // if down
// write data ... (which has to be abstrackt ...)
if (($up && $position[0] > 0) || ($down && ($position[count($position) - 1]!=(count($row_data_id) - 1)))) {
for ($i = 0; $i < count($row_data_id); $i ++) {
$q = "UPDATE ".$table_name." SET order_number = ".$row_data_order[$i]." WHERE ".$table_name."_id = ".$row_data_id[$i];
$q = $db->dbExec($q);
} // for all article ids ...
} // if write
} // if there is something to move
// get ...
$q = "SELECT ".$table_name."_id, name, order_number FROM ".$table_name." ";
if ($where_string) {
$q .= "WHERE $where_string ";
}
$q .= "ORDER BY order_number";
while ($res = $db->dbReturn($q)) {
$row_data[] = array (
"id" => $res[$table_name."_id"],
"name" => $res["name"],
"order" => $res["order_number"]
);
} // while read data ...
// define all needed smarty stuff for the general HTML/page building
$DATA['css'] = LAYOUT.DEFAULT_TEMPLATE.CSS;
$DATA['js'] = LAYOUT.DEFAULT_TEMPLATE.JS;
$HEADER['CSS'] = CSS;
$HEADER['DEFAULT_ENCODING'] = DEFAULT_ENCODING;
$HEADER['JS'] = JS;
$HEADER['STYLESHEET'] = $EDIT_STYLESHEET;
$HEADER['JAVASCRIPT'] = $EDIT_JAVASCRIPT;
// html title
$HEADER['HTML_TITLE'] = (!$L_TITLE) ? $smarty->l10n->__($G_TITLE) : $smarty->l10n->__($L_TITLE);
$DATA['table_width'] = $table_width;
// error msg
if ($error) {
$messages[] = array('msg' => $msg, 'class' => 'error', 'width' => $table_width);
}
$DATA['form_error_msg'] = $messages;
// all the row data
$options_id = array ();
$options_name = array ();
$options_selected = array ();
if (!is_array($row_data)) {
$row_data = array ();
}
for ($i = 0; $i < count($row_data); $i ++) {
$options_id[] = $i;
$options_name[] = $row_data[$i]["name"];
// list of points to order
for ($j = 0; $j < count($position); $j++) {
// if matches, put into select array
if ($original_id[$position[$j]] == $row_data[$i]["id"]) {
$options_selected[] = $i;
}
}
}
$DATA['options_id'] = $options_id;
$DATA['options_name'] = $options_name;
$DATA['options_selected'] = $options_selected;
// hidden list for the data (id, order number)
$row_data_id = array ();
$row_data_order = array ();
for ($i = 0; $i < count($row_data); $i++) {
$row_data_id[] = $row_data[$i]["id"];
$row_data_order[] = $row_data[$i]["order"];
}
$DATA['row_data_id'] = $row_data_id;
$DATA['row_data_order'] = $row_data_order;
// hidden names for the table & where string
$DATA['table_name'] = $table_name;
$DATA['where_string'] = $where_string;
// debug data, if DEBUG flag is on, this data is print out
$DEBUG_DATA['DEBUG'] = $DEBUG_TMPL;
// create main data array
$CONTENT_DATA = array_merge($HEADER, $DATA, $DEBUG_DATA);
// data is 1:1 mapping (all vars, values, etc)
foreach ($CONTENT_DATA as $key => $value) {
$smarty->assign($key, $value);
}
if (is_dir(BASE.TEMPLATES_C)) {
$smarty->setCompileDir(BASE.TEMPLATES_C);
}
if (is_dir(BASE.CACHE)) {
$smarty->setCacheDir(BASE.CACHE);
}
$smarty->display('edit_order.tpl');
echo $login->printErrorMsg();
echo $db->printErrorMsg();
// __END__

View File

@@ -16,10 +16,10 @@ $CSS_NAME = 'smart_test.css';
$USE_PROTOTYPE = false; $USE_PROTOTYPE = false;
$USE_JQUERY = true; $USE_JQUERY = true;
if ($USE_PROTOTYPE) { if ($USE_PROTOTYPE) {
$ADMIN_JAVASCRIPT = 'edit.pt.js'; $EDIT_JAVASCRIPT = 'edit.pt.js';
$JS_NAME = 'prototype.test.js'; $JS_NAME = 'prototype.test.js';
} else if ($USE_JQUERY) { } else if ($USE_JQUERY) {
$ADMIN_JAVASCRIPT = 'edit.jq.js'; $EDIT_JAVASCRIPT = 'edit.jq.js';
$JS_NAME = 'jquery.test.js'; $JS_NAME = 'jquery.test.js';
} }
$PAGE_WIDTH = "100%"; $PAGE_WIDTH = "100%";

View File

@@ -26,8 +26,6 @@ DEFINE('LIBS', 'lib'.DS);
DEFINE('CONFIGS', 'configs'.DS); DEFINE('CONFIGS', 'configs'.DS);
// includes (strings, arrays for static, etc) // includes (strings, arrays for static, etc)
DEFINE('INCLUDES', 'includes'.DS); DEFINE('INCLUDES', 'includes'.DS);
// data folder (mostly in includes)
DEFINE('DATA', 'data'.DS);
// layout base path // layout base path
DEFINE('LAYOUT', 'layout'.DS); DEFINE('LAYOUT', 'layout'.DS);
// pic-root (compatible to CMS) // pic-root (compatible to CMS)
@@ -72,6 +70,20 @@ DEFINE('LOG', 'log'.DS);
DEFINE('TEMPLATES_C', 'templates_c'.DS); DEFINE('TEMPLATES_C', 'templates_c'.DS);
// template base // template base
DEFINE('TEMPLATES', 'templates'.DS); DEFINE('TEMPLATES', 'templates'.DS);
// frontend template dir', only for admin
DEFINE('TEMPLATES_FRONTEND', 'templates_frontend'.DS);
// if below is turned to true then the old folder format is ued
// www/layout/<admin|frontend>/<template name>/...
// in the new layout the "<template name>" is dropped and only frontend
// data is visible there: js, css, images
// language files are moved into www/includes/lang/<admin/frontend>/*.mo
// the language .po files are in 4dev/lang/<admin/frontend>/*.po
DEFINE('USE_DEPRECATED_TEMPLATE_FOLDERS', false);
// default template
DEFINE('DEFAULT_TEMPLATE', 'default'.DS);
// default template file
DEFINE('DEFAULT_TEMPLATE_FILE', 'default.tpl');
/************* HASH / ACL DEFAULT / ERROR SETTINGS / SMARTY *************/ /************* HASH / ACL DEFAULT / ERROR SETTINGS / SMARTY *************/
// default hash type // default hash type
@@ -132,10 +144,6 @@ DEFINE('SESSION_NAME', 'SESSION_NAME'.SERVER_NAME_HASH);
// SET_SESSION_NAME should be set in the header if a special session name is needed // SET_SESSION_NAME should be set in the header if a special session name is needed
// DEFINE('SET_SESSION_NAME', SESSION_NAME); // DEFINE('SET_SESSION_NAME', SESSION_NAME);
/************* CACHE/COMPILE IDS *************/
DEFINE('CACHE_ID', 'CACHE_'.SERVER_NAME_HASH);
DEFINE('COMPILE_ID', 'COMPILE_'.SERVER_NAME_HASH);
/************* LANGUAGE / ENCODING *******/ /************* LANGUAGE / ENCODING *******/
DEFINE('DEFAULT_LANG', 'en_utf8'); DEFINE('DEFAULT_LANG', 'en_utf8');
// default web page encoding setting // default web page encoding setting
@@ -159,6 +167,13 @@ DEFINE('DEV_SCHEMA', 'public');
DEFINE('TEST_SCHEMA', 'public'); DEFINE('TEST_SCHEMA', 'public');
DEFINE('LIVE_SCHEMA', 'public'); DEFINE('LIVE_SCHEMA', 'public');
/************* OTHER PATHS *****************/
// File and Folder paths
// ID is TARGET (first array element)
// $PATHS['test']['csv_path'] = '';
// $PATHS['test']['perl_bin'] = '';
// $PATHS['test']['redirect_url'] = '';
/************* DB ACCESS *****************/ /************* DB ACCESS *****************/
if (file_exists(BASE.CONFIGS.'config.db.inc')) { if (file_exists(BASE.CONFIGS.'config.db.inc')) {
require BASE.CONFIGS.'config.db.inc'; require BASE.CONFIGS.'config.db.inc';
@@ -167,10 +182,6 @@ if (file_exists(BASE.CONFIGS.'config.db.inc')) {
if (file_exists(BASE.CONFIGS.'config.host.inc')) { if (file_exists(BASE.CONFIGS.'config.host.inc')) {
require BASE.CONFIGS.'config.host.inc'; require BASE.CONFIGS.'config.host.inc';
} }
/************* OTHER PATHS *****************/
if (file_exists(BASE.CONFIGS.'config.path.inc')) {
require BASE.CONFIGS.'config.path.inc';
}
// set the USE_DATABASE var, if there is nothing set, we assume TRUE // set the USE_DATABASE var, if there is nothing set, we assume TRUE
$USE_DATABASE = defined('USE_DATABASE') ? USE_DATABASE : true; $USE_DATABASE = defined('USE_DATABASE') ? USE_DATABASE : true;
@@ -216,13 +227,14 @@ DEFINE('SITE_LANG', $SITE_LANG[$HOST_NAME]);
DEFINE('SHOW_ALL_ERRORS', true); // show all errors if debug_all & show_error_handling are enabled DEFINE('SHOW_ALL_ERRORS', true); // show all errors if debug_all & show_error_handling are enabled
/************* GENERAL PAGE TITLE ********/ /************* GENERAL PAGE TITLE ********/
DEFINE('G_TITLE', '<OVERALL FALLBACK PAGE TITLE>'); $G_TITLE = '<OVERALL PAGE TITLE>';
/************ STYLE SHEETS / JS **********/ /************ STYLE SHEETS / JS **********/
DEFINE('ADMIN_STYLESHEET', 'edit.css'); $EDIT_STYLESHEET = 'edit.css';
DEFINE('ADMIN_JAVASCRIPT', 'edit.js'); $EDIT_JAVASCRIPT = 'edit.js';
DEFINE('STYLESHEET', 'frontend.css');
DEFINE('JAVASCRIPT', 'frontend.js'); $STYLESHEET = 'frontend.css';
$JAVASCRIPT = 'frontend.js';
// anything optional // anything optional
/************* INTERNAL ******************/ /************* INTERNAL ******************/

View File

@@ -1,17 +0,0 @@
<?php
/********************************************************************
* AUTHOR: Clemens Schwaighofer
* CREATED: 2018/10/11
* SHORT DESCRIPTION:
* configuration file for core path settings
* CSV target paths, and other download access URLS or paths needed
* HISTORY:
*********************************************************************/
// File and Folder paths
// ID is TARGET (first array element)
// $PATHS['test']['csv_path'] = '';
// $PATHS['test']['perl_bin'] = '';
// $PATHS['test']['redirect_url'] = '';
// __END__

View File

@@ -10,7 +10,7 @@
define('CONFIG_PATH', 'configs'.DIRECTORY_SEPARATOR); define('CONFIG_PATH', 'configs'.DIRECTORY_SEPARATOR);
// config path prefix search, start with 0, got down each level __DIR__ has, if nothing found -> bail // config path prefix search, start with 0, got down each level __DIR__ has, if nothing found -> bail
$CONFIG_PATH_PREFIX = ''; $CONFIG_PATH_PREFIX = '';
for ($dir_pos = 0, $dir_max = count(explode(DIRECTORY_SEPARATOR, __DIR__)); $dir_pos <= $dir_max; $dir_pos ++) { for ($dir_pos = 0, $dir_max = count(explode('/', __DIR__)); $dir_pos <= $dir_max; $dir_pos ++) {
$CONFIG_PATH_PREFIX .= '..'.DIRECTORY_SEPARATOR; $CONFIG_PATH_PREFIX .= '..'.DIRECTORY_SEPARATOR;
if (file_exists($CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc')) { if (file_exists($CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc')) {
require $CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc'; require $CONFIG_PATH_PREFIX.CONFIG_PATH.'config.inc';
@@ -21,12 +21,5 @@ for ($dir_pos = 0, $dir_max = count(explode(DIRECTORY_SEPARATOR, __DIR__)); $dir
if (!defined('DS')) { if (!defined('DS')) {
exit('Base config unloadable'); exit('Base config unloadable');
} }
// find trigger name "admin/" or "frontend/" in the getcwd() folder
foreach (array ('admin', 'frontend') as $folder) {
if (strstr(getcwd(), DS.$folder)) {
define('CONTENT_PATH', $folder.DS);
break;
}
}
// __END__ // __END__

View File

@@ -1,7 +0,0 @@
RewriteEngine on
# not a file
RewriteCond %{REQUEST_FILENAME} !-f
# not a directory
RewriteCond %{REQUEST_FILENAME} !-d
# throw the whole path to the url as form parameter
RewriteRule (.*) index.php?path=$1 [QSA,L]

View File

@@ -1 +0,0 @@
../configs/config.php

View File

@@ -1 +0,0 @@
../../configs/config.php

View File

@@ -1,3 +0,0 @@
<?php
require 'config.php';

View File

@@ -1,3 +0,0 @@
<?php
require 'config.php';

View File

@@ -33,14 +33,12 @@ if (!isset($encoding)) {
if (session_id() && $_SESSION['DEFAULT_LANG']) { if (session_id() && $_SESSION['DEFAULT_LANG']) {
$lang = $_SESSION['DEFAULT_LANG']; $lang = $_SESSION['DEFAULT_LANG'];
} elseif (!$lang) { } elseif (!$lang) {
$lang = defined('SITE_LANG') ? SITE_LANG : DEFAULT_LANG; $lang = DEFAULT_LANG;
} }
// end the stop of the output flow, but only if we didn't request a csv file download // end the stop of the output flow, but only if we didn't request a csv file download
if (array_key_exists('action', $_POST) && $_POST['action'] != 'download_csv') { if (array_key_exists('action', $_POST) && $_POST['action'] != 'download_csv') {
header("Content-type: text/html; charset=".$encoding); header("Content-type: text/html; charset=".$encoding);
} ob_end_flush();
if ($AJAX_PAGE && !$ZIP_STREAM) {
header("Content-Type: application/json; charset=UTF-8");
} }
//------------------------------ basic variable settings start //------------------------------ basic variable settings start
@@ -61,8 +59,6 @@ $cms->menu_show_flag = 'main';
$cms->dbInfo(); $cms->dbInfo();
// set acl // set acl
$cms->acl = $login->acl; $cms->acl = $login->acl;
// flush
ob_end_flush();
//------------------------------ class init end //------------------------------ class init end
//------------------------------ logging start //------------------------------ logging start

View File

@@ -7,33 +7,38 @@
* HISTORY: * HISTORY:
*********************************************************************/ *********************************************************************/
// template path
if ($_SESSION['TEMPLATE']) {
$TEMPLATE = $_SESSION['TEMPLATE'];
} elseif ($LOCAL_TEMPLATE) {
$TEMPLATE = $LOCAL_TEMPLATE;
} else {
$TEMPLATE = DEFAULT_TEMPLATE;
}
$TEMPLATE_DIR = $TEMPLATE;
// master template // master template
if (!isset($MASTER_TEMPLATE_NAME)) { if (!$MASTER_TEMPLATE_NAME) {
$MASTER_TEMPLATE_NAME = MASTER_TEMPLATE_NAME; $MASTER_TEMPLATE_NAME = MASTER_TEMPLATE_NAME;
} }
// just emergency fallback for language // just emergency fallback for language
// set encoding // set encoding
if (isset($_SESSION['DEFAULT_CHARSET'])) { if ($_SESSION['DEFAULT_CHARSET']) {
$encoding = $_SESSION['DEFAULT_CHARSET']; $encoding = $_SESSION['DEFAULT_CHARSET'];
} elseif (!isset($encoding)) { } elseif (!$encoding) {
$encoding = DEFAULT_ENCODING; $encoding = DEFAULT_ENCODING;
} }
// just emergency fallback for language // just emergency fallback for language
if (isset($_SESSION['DEFAULT_LANG'])) { if ($_SESSION['DEFAULT_LANG']) {
$lang = $_SESSION['DEFAULT_LANG']; $lang = $_SESSION['DEFAULT_LANG'];
} elseif (!isset($lang)) { } elseif (!$lang) {
$lang = defined('SITE_LANG') ? SITE_LANG : DEFAULT_LANG; $lang = defined('SITE_LANG') ? SITE_LANG : DEFAULT_LANG;
} }
// create the char lang encoding // create the char lang encoding
$lang_short = substr($lang, 0, 2); $lang_short = substr($lang, 0, 2);
// set include & template names // set include & template names
$PAGE_FILE_NAME = str_replace(".php", "", $cms->page_name); $CONTENT_INCLUDE = str_replace(".php", ".tpl", $cms->page_name);
// set include & template names
if (!isset($CONTENT_INCLUDE)) {
$CONTENT_INCLUDE = $PAGE_FILE_NAME.'.tpl';
}
$FORM_NAME = !isset($FORM_NAME) || !$FORM_NAME ? str_replace(".php", "", $cms->page_name) : $FORM_NAME; $FORM_NAME = !isset($FORM_NAME) || !$FORM_NAME ? str_replace(".php", "", $cms->page_name) : $FORM_NAME;
// set local page title // set local page title
$L_TITLE = ucfirst(str_replace('_', ' ', $cms->getPageName(1))).' - '.$G_TITLE; $L_TITLE = ucfirst(str_replace('_', ' ', $cms->getPageName(1))).' - '.$G_TITLE;
@@ -45,85 +50,65 @@ $cms->JS_TEMPLATE_NAME = str_replace(".tpl", ".js", $CONTENT_INCLUDE);
// css per page // css per page
$cms->CSS_TEMPLATE_NAME = str_replace(".tpl", ".css", $CONTENT_INCLUDE); $cms->CSS_TEMPLATE_NAME = str_replace(".tpl", ".css", $CONTENT_INCLUDE);
// special CSS file // special CSS file
$cms->CSS_SPECIAL_TEMPLATE_NAME = $CSS_NAME; $cms->CSS_SPECIAL_TEMPLATE_NAME = @$CSS_NAME;
// special JS file // special JS file
$cms->JS_SPECIAL_TEMPLATE_NAME = $JS_NAME; $cms->JS_SPECIAL_TEMPLATE_NAME = @$JS_NAME;
// compile & cache id
$cms->CACHE_ID = isset($CACHE_ID) ? $CACHE_ID : CACHE_ID;
$cms->COMPILE_ID = isset($COMPILE_ID) ? $COMPILE_ID : CACHE_ID;
// set basic template path (tmp) // set basic template path (tmp)
$cms->includes = BASE.INCLUDES; // no longer in templates, only global $cms->template_path = LAYOUT.$TEMPLATE_DIR.TEMPLATES;
$cms->template_path = BASE.INCLUDES.TEMPLATES.CONTENT_PATH;
if ($smarty) { if ($smarty) {
$smarty->setTemplateDir($cms->template_path); $smarty->setTemplateDir($cms->template_path);
} }
if (isset($LANGUAGE_FOLDER)) { $cms->lang_dir = LAYOUT.$TEMPLATE_DIR.LANG; // no outside
$cms->lang_dir = $LANGUAGE_FOLDER; $cms->includes = BASE.INCLUDES; // no longer in templates, only global
} else { $cms->javascript = LAYOUT.$TEMPLATE_DIR.JS;
$cms->lang_dir = BASE.INCLUDES.LANG.CONTENT_PATH; // no outside $cms->css = LAYOUT.$TEMPLATE_DIR.CSS;
} $cms->pictures = LAYOUT.$TEMPLATE_DIR.IMAGES;
$cms->javascript = LAYOUT.JS; $cms->cache_pictures = LAYOUT.$TEMPLATE_DIR.CACHE;
$cms->css = LAYOUT.CSS;
$cms->pictures = LAYOUT.IMAGES;
$cms->cache_pictures = LAYOUT.CACHE;
$cms->cache_pictures_root = ROOT.$cms->cache_pictures; $cms->cache_pictures_root = ROOT.$cms->cache_pictures;
if (!is_dir($cms->cache_pictures_root)) { if (!is_dir($cms->cache_pictures_root)) {
mkdir($cms->cache_pictures_root); mkdir($cms->cache_pictures_root);
} }
// check if we have an external file with the template name $template_set = $TEMPLATE;
if (file_exists($cms->includes.$cms->INC_TEMPLATE_NAME) &&
is_file($cms->includes.$cms->INC_TEMPLATE_NAME) // if we don't find the master template, set the template path back AND set the insert template as absolute path
) { if (!file_exists(ROOT.$smarty->getTemplateDir()[0].DS.MASTER_TEMPLATE_NAME)) {
include($cms->includes.$cms->INC_TEMPLATE_NAME); if (file_exists(ROOT.$smarty->getTemplateDir()[0].DS.$TEMPLATE_NAME)) {
$TEMPLATE_NAME = ROOT.$smarty->getTemplateDir()[0].DS.$TEMPLATE_NAME;
} }
// only CSS/JS/etc include stuff if we have non AJAX page $smarty->setTemplateDir(LAYOUT.DEFAULT_TEMPLATE.TEMPLATES);
if (!$AJAX_PAGE) { $template_set = DEFAULT_TEMPLATE;
// check for template include } elseif (!file_exists(ROOT.$smarty->getTemplateDir()[0].DS.$TEMPLATE_NAME)) {
if (isset($USE_INCLUDE_TEMPLATE) && $USE_INCLUDE_TEMPLATE === true && !isset($TEMPLATE_NAME)) { // check if the template exists in the template path, if not, set path to to default
$TEMPLATE_NAME = $CONTENT_INCLUDE; $smarty->setTemplateDir(LAYOUT.DEFAULT_TEMPLATE.TEMPLATES);
// add to cache & compile id $template_set = DEFAULT_TEMPLATE;
$cms->COMPILE_ID .= '_'.$TEMPLATE_NAME;
$cms->CACHE_ID .= '_'.$TEMPLATE_NAME;
} }
// additional per page Javascript include // check if lang_dir folder exists in the template path, if not fall back to default
$cms->JS_INCLUDE = ''; if (!is_dir($cms->lang_dir)) {
if (file_exists($cms->javascript.$cms->JS_TEMPLATE_NAME) && is_file($cms->javascript.$cms->JS_TEMPLATE_NAME)) { $cms->lang_dir = LAYOUT.DEFAULT_TEMPLATE.LANG;
$cms->JS_INCLUDE = $cms->javascript.$cms->JS_TEMPLATE_NAME;
} }
// per page css file // check if the javascript folder exists in the template path, if not fall back to default
$cms->CSS_INCLUDE = ''; if (!is_dir($cms->javascript)) {
if (file_exists($cms->css.$cms->CSS_TEMPLATE_NAME) && is_file($cms->css.$cms->CSS_TEMPLATE_NAME)) { $cms->javascript = LAYOUT.DEFAULT_TEMPLATE.JS;
$cms->CSS_INCLUDE = $cms->css.$cms->CSS_TEMPLATE_NAME;
} }
// optional CSS file // check if css folder exists in the template path, if not fall back to default
$cms->CSS_SPECIAL_INCLUDE = ''; if (!is_dir($cms->css)) {
if (file_exists($cms->css.$cms->CSS_SPECIAL_TEMPLATE_NAME) && is_file($cms->css.$cms->CSS_SPECIAL_TEMPLATE_NAME)) { $cms->css = LAYOUT.DEFAULT_TEMPLATE.CSS;
$cms->CSS_SPECIAL_INCLUDE = $cms->css.$cms->CSS_SPECIAL_TEMPLATE_NAME;
}
// optional JS file
$cms->JS_SPECIAL_INCLUDE = '';
if (file_exists($cms->javascript.$cms->JS_SPECIAL_TEMPLATE_NAME) && is_file($cms->javascript.$cms->JS_SPECIAL_TEMPLATE_NAME)) {
$cms->JS_SPECIAL_INCLUDE = $cms->javascript.$cms->JS_SPECIAL_TEMPLATE_NAME;
}
if ($smarty) {
// check if template names exist
if (!file_exists($smarty->getTemplateDir()[0].DS.$MASTER_TEMPLATE_NAME)) {
// abort if master template could not be found
exit('MASTER TEMPLATE: '.$MASTER_TEMPLATE_NAME.' could not be found');
}
if (isset($TEMPLATE_NAME) && !file_exists($smarty->getTemplateDir()[0].DS.$TEMPLATE_NAME)) {
exit('INCLUDE TEMPLATE: '.$TEMPLATE_NAME.' could not be found');
} }
if (!is_dir($cms->pictures)) {
$cms->pictures = LAYOUT.DEFAULT_TEMPLATE.PICTURES;
} }
if (!is_dir($cms->cache_pictures)) {
$cms->cache_pictures = LAYOUT.DEFAULT_TEMPLATE.CACHE;
$cms->cache_pictures_root = ROOT.$cms->cache_pictures;
} }
// if the lang folder is different to the default one // if the template_dir is != DEFAULT_TEMPLATE, then try to make a lang switch
// if the default lang is not like the lang given, switch lang // if the default lang is not like the lang given, switch lang
if (false === strstr(BASE.INCLUDES.LANG.CONTENT_PATH, $cms->lang_dir) || if (false === strstr(LAYOUT.DEFAULT_TEMPLATE.LANG, $cms->lang_dir) ||
strcasecmp(defined('SITE_LANG') ? SITE_LANG : DEFAULT_LANG, $lang) strcasecmp(defined('SITE_LANG') ? SITE_LANG : DEFAULT_LANG, $lang)
) { ) {
$cms->debug('LANG', 'Orig: '.BASE.INCLUDES.LANG.CONTENT_PATH.', New: '.$cms->lang_dir.' | Orig Lang: '.(defined('SITE_LANG') ? SITE_LANG : DEFAULT_LANG).', New Lang: '.$lang); $cms->debug('LANG', 'Orig: '.LAYOUT.DEFAULT_TEMPLATE.LANG.', New: '.$cms->lang_dir.' | Orig Lang: '.(defined('SITE_LANG') ? SITE_LANG : DEFAULT_LANG).', New Lang: '.$lang);
$cms->l->l10nReloadMOfile($lang, $cms->lang_dir); $cms->l->l10nReloadMOfile($lang, $cms->lang_dir);
// if we have login class // if we have login class
if ($login) { if ($login) {
@@ -135,8 +120,7 @@ if (false === strstr(BASE.INCLUDES.LANG.CONTENT_PATH, $cms->lang_dir) ||
} }
} }
if (!$AJAX_PAGE) { // javascrip translate data as template for auto translate
// javascript translate data as template for auto translate
if (!$TEMPLATE_TRANSLATE) { if (!$TEMPLATE_TRANSLATE) {
$TEMPLATE_TRANSLATE = 'jsTranslate_'.$lang.'.tpl'; $TEMPLATE_TRANSLATE = 'jsTranslate_'.$lang.'.tpl';
$cms->debug('LANG', 'Load lang: '.$lang.', for page file '.$TEMPLATE_TRANSLATE); $cms->debug('LANG', 'Load lang: '.$lang.', for page file '.$TEMPLATE_TRANSLATE);
@@ -152,15 +136,12 @@ if (!$AJAX_PAGE) {
} }
} }
// if we can't find it, dump it // if we can't find it, dump it
if ($smarty && !file_exists($smarty->getTemplateDir()[0].DS.$TEMPLATE_TRANSLATE)) { if (!file_exists($smarty->getTemplateDir()[0].DS.$TEMPLATE_TRANSLATE)) {
unset($TEMPLATE_TRANSLATE); unset($TEMPLATE_TRANSLATE);
} }
}
// $cms->debug("LANGUAGE", "L: $lang | ".$cms->lang_dir." | MO File: ".$cms->l->mofile); // $cms->debug("LANGUAGE", "L: $lang | ".$cms->lang_dir." | MO File: ".$cms->l->mofile);
$cms->debug("LANGUAGE", "SL: ".$_SESSION['DEFAULT_CHARSET']." | ".$_SESSION['LANG']." | ".$_SESSION['DEFAULT_LANG']); $cms->debug("LANGUAGE", "SL: ".$_SESSION['DEFAULT_CHARSET']." | ".$_SESSION['LANG']." | ".$_SESSION['DEFAULT_LANG']);
if ($smarty) {
$cms->debug("TEMPLATE", "P: ".$smarty->getTemplateDir()[0]); $cms->debug("TEMPLATE", "P: ".$smarty->getTemplateDir()[0]);
}
// __END__ // __END__

View File

@@ -14,7 +14,35 @@ if ($cms->HEADER['USE_PROTOTYPE']) {
$cms->HEADER['USE_SCRIPTACULOUS'] = isset($USE_SCRIPTACULOUS) ? $USE_SCRIPTACULOUS : USE_SCRIPTACULOUS; $cms->HEADER['USE_SCRIPTACULOUS'] = isset($USE_SCRIPTACULOUS) ? $USE_SCRIPTACULOUS : USE_SCRIPTACULOUS;
} }
// jquery and prototype should not be used together // jquery and prototype should not be used together
$cms->HEADER['USE_JQUERY'] = isset($USE_JQUERY) ? $USE_JQUERY : USE_JQUERY; // don't use either of those two together $cms->HEADER['USE_JQUERY'] = isset($USE_JQUERY) ? $USE_JQUERY : USE_JQUERY; // don't use either of those two toger
// set basic template path (tmp)
// paths are set in the 'set_paths.inc' file
// check if we have an external file with the template name
if (file_exists($cms->includes.$cms->INC_TEMPLATE_NAME) && is_file($cms->includes.$cms->INC_TEMPLATE_NAME)) {
include($cms->includes.$cms->INC_TEMPLATE_NAME);
}
// additional per page Javascript include
$cms->JS_INCLUDE = '';
if (file_exists($cms->javascript.$cms->JS_TEMPLATE_NAME) && is_file($cms->javascript.$cms->JS_TEMPLATE_NAME)) {
$cms->JS_INCLUDE = $cms->javascript.$cms->JS_TEMPLATE_NAME;
}
// per page css file
$cms->CSS_INCLUDE = '';
if (file_exists($cms->css.$cms->CSS_TEMPLATE_NAME) && is_file($cms->css.$cms->CSS_TEMPLATE_NAME)) {
$cms->CSS_INCLUDE = $cms->css.$cms->CSS_TEMPLATE_NAME;
}
// optional CSS file
$cms->CSS_SPECIAL_INCLUDE = '';
if (file_exists($cms->css.$cms->CSS_SPECIAL_TEMPLATE_NAME) && is_file($cms->css.$cms->CSS_SPECIAL_TEMPLATE_NAME)) {
$cms->CSS_SPECIAL_INCLUDE = $cms->css.$cms->CSS_SPECIAL_TEMPLATE_NAME;
}
// optional JS file
$cms->JS_SPECIAL_INCLUDE = '';
if (file_exists($cms->javascript.$cms->JS_SPECIAL_TEMPLATE_NAME) && is_file($cms->javascript.$cms->JS_SPECIAL_TEMPLATE_NAME)) {
$cms->JS_SPECIAL_INCLUDE = $cms->javascript.$cms->JS_SPECIAL_TEMPLATE_NAME;
}
// the actual include files for javascript (per page) // the actual include files for javascript (per page)
$cms->HEADER['JS_INCLUDE'] = $cms->JS_INCLUDE; $cms->HEADER['JS_INCLUDE'] = $cms->JS_INCLUDE;
@@ -33,11 +61,11 @@ $cms->HEADER['CSS'] = CSS;
$cms->HEADER['JS'] = JS; $cms->HEADER['JS'] = JS;
$cms->HEADER['ENCODING'] = $encoding; $cms->HEADER['ENCODING'] = $encoding;
$cms->HEADER['DEFAULT_ENCODING'] = DEFAULT_ENCODING; $cms->HEADER['DEFAULT_ENCODING'] = DEFAULT_ENCODING;
$cms->HEADER['STYLESHEET'] = isset($ADMIN_STYLESHEET) ? $ADMIN_STYLESHEET : ADMIN_STYLESHEET; $cms->HEADER['STYLESHEET'] = $EDIT_STYLESHEET;
$cms->HEADER['JAVASCRIPT'] = isset($ADMIN_JAVASCRIPT) ? $ADMIN_JAVASCRIPT : ADMIN_JAVASCRIPT; $cms->HEADER['JAVASCRIPT'] = $EDIT_JAVASCRIPT;
// html title // html title
$cms->HEADER['HTML_TITLE'] = isset($L_TITLE) ? $cms->l->__($L_TITLE) : $cms->l->__(G_TITLE); $cms->HEADER['HTML_TITLE'] = (!isset($L_TITLE) || !$L_TITLE) ? $cms->l->__($G_TITLE) : $cms->l->__($L_TITLE);
$cms->DATA['table_width'] = isset($PAGE_WIDTH) ? $PAGE_WIDTH : PAGE_WIDTH; $cms->DATA['table_width'] = $PAGE_WIDTH ? $PAGE_WIDTH : PAGE_WIDTH;
// messages = array('msg' =>, 'class' => 'error/warning/...') // messages = array('msg' =>, 'class' => 'error/warning/...')
$cms->DATA['messages'] = $cms->messages; $cms->DATA['messages'] = $cms->messages;
@@ -71,10 +99,6 @@ if (is_dir(BASE.TEMPLATES_C)) {
if (is_dir(BASE.CACHE)) { if (is_dir(BASE.CACHE)) {
$smarty->setCacheDir(BASE.CACHE); $smarty->setCacheDir(BASE.CACHE);
} }
$smarty->display( $smarty->display($MASTER_TEMPLATE_NAME, $TEMPLATE.$lang, $TEMPLATE.$lang);
$MASTER_TEMPLATE_NAME,
$cms->CACHE_ID.($cms->CACHE_ID ? '_' : '').$lang,
$cms->COMPILE_ID.($cms->COMPILE_ID ? '_' : '').$lang
);
// __END__ // __END__

View File

@@ -18,10 +18,8 @@
*********************************************************************/ *********************************************************************/
$DEBUG_ALL = 1; $DEBUG_ALL = 1;
$PRINT_ALL = 1;
$DB_DEBUG = 1; $DB_DEBUG = 1;
// TODO: only extract _POST data that is needed
extract($_POST, EXTR_SKIP); extract($_POST, EXTR_SKIP);
$table_width = '100%'; $table_width = '100%';
@@ -51,6 +49,7 @@ $login = new CoreLibs\ACL\Login($DB_CONFIG[LOGIN_DB], $lang);
// create form class // create form class
$form = new CoreLibs\Output\Form\Generate($DB_CONFIG[MAIN_DB], $lang); $form = new CoreLibs\Output\Form\Generate($DB_CONFIG[MAIN_DB], $lang);
$form->dbExec("SET search_path TO ".LOGIN_DB_SCHEMA);
if ($form->mobile_phone) { if ($form->mobile_phone) {
echo "I am sorry, but this page cannot be viewed by a mobile phone"; echo "I am sorry, but this page cannot be viewed by a mobile phone";
exit; exit;
@@ -71,13 +70,13 @@ if (TARGET == 'live' || TARGET == 'remote') {
// set the template dir // set the template dir
// WARNING: this has a special check for the mailing tool layout (old layout) // WARNING: this has a special check for the mailing tool layout (old layout)
if (defined('LAYOUT')) { if (defined('LAYOUT')) {
$smarty->setTemplateDir(BASE.INCLUDES.TEMPLATES.CONTENT_PATH); $smarty->setTemplateDir(LAYOUT.DEFAULT_TEMPLATE.TEMPLATES);
$DATA['css'] = LAYOUT.CSS; $DATA['css'] = LAYOUT.DEFAULT_TEMPLATE.CSS;
$DATA['js'] = LAYOUT.JS; $DATA['js'] = LAYOUT.DEFAULT_TEMPLATE.JS;
} else { } else {
$smarty->setTemplateDir(TEMPLATES); $smarty->setTemplateDir(TEMPLATES.DEFAULT_TEMPLATE);
$DATA['css'] = CSS; $DATA['css'] = CSS.DEFAULT_TEMPLATE;
$DATA['js'] = JS; $DATA['js'] = JS.DEFAULT_TEMPLATE;
} }
// space for setting special debug flags // space for setting special debug flags
@@ -106,134 +105,19 @@ $data = array (
// log action // log action
EditLog('Edit Submit', serialize($data)); 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 <select>
// I can't put an number into the array field, in this array,
// there are the POSITION stored, that should CHANGE there order (up/down)
// $row_data_id ... has ALL ids from the sorting part
// $row_data_order ... has ALL order positions from the soirting part
if (!is_array($position)) {
$position = array ();
}
if (count($position)) {
$original_id = $row_data_id;
// FIRST u have to put right sort, then read again ...
// hast to be >0 or the first one is selected and then there is no move
if ($up && $position[0] > 0) {
for ($i = 0; $i < count($position); $i++) {
// change position order
// this gets temp, id before that, gets actual (moves one "down")
// this gets the old before (moves one "up")
// is done for every element in row
// echo "A: ".$row_data_id[$position[$i]]." (".$row_data_order[$position[$i]].") -- ".$row_data_id[$position[$i]-1]." (".$row_data_order[$position[$i]-1].")<br>";
$temp_id = $row_data_id[$position[$i]];
$row_data_id[$position[$i]] = $row_data_id[$position[$i]-1];
$row_data_id[$position[$i]-1] = $temp_id;
// echo "A: ".$row_data_id[$position[$i]]." (".$row_data_order[$position[$i]].") -- ".$row_data_id[$position[$i]-1]." (".$row_data_order[$position[$i]-1].")<br>";
} // for
} // if up
// the last position id from position array is not to be the count-1 of row_data_id array, or it is the last element
if ($down && ($position[count($position) - 1] != (count($row_data_id) - 1))) {
for ($i = count($position) - 1; $i >= 0; $i --) {
// same as up, just up in other way, starts from bottom (last element) and moves "up"
// element before actuel gets temp, this element, becomes element after this,
// element after this, gets this
$temp_id = $row_data_id[$position[$i] + 1];
$row_data_id[$position[$i] + 1] = $row_data_id[$position[$i]];
$row_data_id[$position[$i]] = $temp_id;
} // for
} // if down
// write data ... (which has to be abstrackt ...)
if (($up && $position[0] > 0) || ($down && ($position[count($position) - 1]!=(count($row_data_id) - 1)))) {
for ($i = 0; $i < count($row_data_id); $i ++) {
$q = "UPDATE ".$table_name." SET order_number = ".$row_data_order[$i]." WHERE ".$table_name."_id = ".$row_data_id[$i];
$q = $form->dbExec($q);
} // for all article ids ...
} // if write
} // if there is something to move
// get ...
$q = "SELECT ".$table_name."_id, name, order_number FROM ".$table_name." ";
if ($where_string) {
$q .= "WHERE $where_string ";
}
$q .= "ORDER BY order_number";
while ($res = $form->dbReturn($q)) {
$row_data[] = array (
"id" => $res[$table_name."_id"],
"name" => $res["name"],
"order" => $res["order_number"]
);
} // while read data ...
// html title
$HEADER['HTML_TITLE'] = $form->l->__('Edit Order');
// error msg
if ($error) {
$messages[] = array ('msg' => $msg, 'class' => 'error', 'width' => '100%');
}
$DATA['form_error_msg'] = $messages;
// all the row data
$options_id = array ();
$options_name = array ();
$options_selected = array ();
if (!is_array($row_data)) {
$row_data = array ();
}
for ($i = 0; $i < count($row_data); $i ++) {
$options_id[] = $i;
$options_name[] = $row_data[$i]["name"];
// list of points to order
for ($j = 0; $j < count($position); $j++) {
// if matches, put into select array
if ($original_id[$position[$j]] == $row_data[$i]["id"]) {
$options_selected[] = $i;
}
}
}
$DATA['options_id'] = $options_id;
$DATA['options_name'] = $options_name;
$DATA['options_selected'] = $options_selected;
// hidden list for the data (id, order number)
$row_data_id = array ();
$row_data_order = array ();
for ($i = 0; $i < count($row_data); $i++) {
$row_data_id[] = $row_data[$i]["id"];
$row_data_order[] = $row_data[$i]["order"];
}
$DATA['row_data_id'] = $row_data_id;
$DATA['row_data_order'] = $row_data_order;
// hidden names for the table & where string
$DATA['table_name'] = $table_name;
$DATA['where_string'] = $where_string;
$EDIT_TEMPLATE = 'edit_order.tpl';
} else {
$form->formProcedureLoad(${$form->archive_pk_name}); $form->formProcedureLoad(${$form->archive_pk_name});
$form->formProcedureNew(); $form->formProcedureNew();
$form->formProcedureSave(); $form->formProcedureSave();
$form->formProcedureDelete(); $form->formProcedureDelete();
$form->formProcedureDeleteFromElementList($element_list, $remove_name); $form->formProcedureDeleteFromElementList($element_list, $remove_name);
// define all needed smarty stuff for the general HTML/page building
$HEADER['CSS'] = CSS;
$HEADER['DEFAULT_ENCODING'] = DEFAULT_ENCODING;
$HEADER['JS'] = JS;
$HEADER['STYLESHEET'] = $EDIT_STYLESHEET;
$HEADER['JAVASCRIPT'] = $EDIT_JAVASCRIPT;
$DATA['table_width'] = $table_width; $DATA['table_width'] = $table_width;
// write out error / status messages // write out error / status messages
@@ -306,7 +190,7 @@ if ($form->my_page_name == 'edit_order') {
$DATA['page_name'] = $menuarray[$position]["page_name"]; $DATA['page_name'] = $menuarray[$position]["page_name"];
$L_TITLE = $DATA['page_name']; $L_TITLE = $DATA['page_name'];
// html title // html title
$HEADER['HTML_TITLE'] = $form->l->__($L_TITLE); $HEADER['HTML_TITLE'] = ((!$L_TITLE) ? $form->l->__($G_TITLE) : $form->l->__($L_TITLE));
// END MENU // END MENU
// LOAD AND NEW // LOAD AND NEW
$DATA['load'] = $form->formCreateLoad(); $DATA['load'] = $form->formCreateLoad();
@@ -419,8 +303,6 @@ if ($form->my_page_name == 'edit_order') {
$DATA['hidden'] = $form->formCreateHiddenFields(); $DATA['hidden'] = $form->formCreateHiddenFields();
$DATA['save_delete'] = $form->formCreateSaveDelete(); $DATA['save_delete'] = $form->formCreateSaveDelete();
} }
$EDIT_TEMPLATE = 'edit_body.tpl';
}
// debug data, if DEBUG flag is on, this data is print out // debug data, if DEBUG flag is on, this data is print out
$DEBUG_DATA['DEBUG'] = $DEBUG_TMPL; $DEBUG_DATA['DEBUG'] = $DEBUG_TMPL;
@@ -437,7 +319,7 @@ if (is_dir(BASE.TEMPLATES_C)) {
if (is_dir(BASE.CACHE)) { if (is_dir(BASE.CACHE)) {
$smarty->setCacheDir(BASE.CACHE); $smarty->setCacheDir(BASE.CACHE);
} }
$smarty->display($EDIT_TEMPLATE, 'editAdmin_'.$lang, 'editAdmin_'.$lang); $smarty->display('edit_body.tpl');
// debug output // debug output
echo $login->printErrorMsg(); echo $login->printErrorMsg();

View File

@@ -1,19 +1,13 @@
/* smart test CSS */ /* smart test CSS */
.jq-container {
width: 100%;
margin: 0;
padding: 0;
}
.jp-test { .jp-test {
width: 100%; width: 100%;
padding: 20px; margin: 20px;
box-sizing: border-box; box-sizing: border-box;
} }
.test-div { .test-div {
padding: 20px; margin: 20px;
} }
/* CORE overlay, progress elements */ /* CORE overlay, progress elements */

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 56 B

After

Width:  |  Height:  |  Size: 56 B

View File

Before

Width:  |  Height:  |  Size: 87 B

After

Width:  |  Height:  |  Size: 87 B

Some files were not shown because too many files have changed in this diff Show More