}
function add_user_js_data() {
- global $path_to_root, $thoseps, $decseps;
+ global $path_to_root, $thoseps, $decseps, $date_system, $dateseps;
$ts = $thoseps[user_tho_sep()];
$ds = $decseps[user_dec_sep()];
. "var user = {\n"
. "theme: '". $path_to_root . '/themes/'. user_theme().'/'."',\n"
. "loadtxt: '"._('Requesting data...')."',\n"
- . "date: '".Today()."',\n"
+ . "date: '".Today()."',\n" // server date
+ . "datesys: ".$date_system.",\n"
+ . "datefmt: ".user_date_format().",\n"
+ . "datesep: '".$dateseps[user_date_sep()]."',\n"
. "ts: '$ts',\n"
. "ds: '$ds',\n"
. "pdec : " . user_price_dec() . "}\n";
$type = E_USER_NOTICE;
$content = '';
- $class = 'no_msg';
+// $class = 'no_msg';
if (count($messages)) {
foreach($messages as $cnt=>$msg) {
if ($msg[0]>$type) continue;
$content .= ($cnt ? '<hr>' : '').$str;
}
$class = $msg_class[$type];
+ $content = "<div class='$class'>$content</div>";
} else
- if ($path_to_root=='.')
- return '';
-
- $content = "<div class='$class'>$content</div>";
+ if ($path_to_root=='.')
+ return '';
return $content;
}
//-----------------------------------------------------------------------------
include_once($path_to_root . "/includes/db/comments_db.inc");
include_once($path_to_root . "/includes/db/sql_functions.inc");
include_once($path_to_root . "/includes/db/audit_trail_db.inc");
+include_once($path_to_root . "/includes/validation.inc");
include_once($path_to_root . "/admin/db/users_db.inc");
include_once($path_to_root . "/includes/ui/ui_view.inc");
include($path_to_root . "/includes/page/header.inc");
page_header($title, $no_menu, $is_index, $onload, $js);
- error_box();
+// error_box();
if($script_only) {
echo '<noscript>';
echo display_heading(_('This page is usable only with javascript enabled browsers.'));
***********************************************************************/
function page_footer($no_menu=false, $is_index=false)
{
- global $path_to_root, $js_lib;
+ global $path_to_root, $js_lib, $Validate;
if (in_ajax())
return;// just for speed up
include_once($path_to_root."/themes/".user_theme()."/renderer.php");
$rend = new renderer();
$rend->menu_footer($no_menu, $is_index);
- echo "<script>_focus = '".get_post('_focus')."';</script>";
+ echo "<script>
+ _focus = '" . get_post('_focus') . "';
+ _validate = " . JsHttpRequest::php2js($Validate).";
+ </script>";
add_user_js_data();
echo "\n<script type=\"text/javascript\"><!--\n";
include_once($local_path_to_root."/themes/".user_theme()."/renderer.php");
$rend = new renderer();
$rend->menu_header($title, $no_menu, $is_index);
+ error_box();
}
?>
\ No newline at end of file
include_once($path_to_root . "/config.php");
include_once($path_to_root . "/includes/main.inc");
+// Ajax communication object
$Ajax =& new Ajax();
+// js/php validation rules container
+$Validate = array();
+
// intercept all output to destroy it in case of ajax call
register_shutdown_function('ob_end_flush');
ob_start('output_html',0);