From ef707202db0efb1094bac1ad7e2f1a656be252c0 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Wed, 5 Mar 2014 08:46:59 +0100 Subject: [PATCH] error.php page added --- WARNING.txt | 7 ++- web/Obj/brisk.phh | 13 ++++ web/error.php | 154 ++++++++++++++++++++++++++++++++++++++++++++++ web/index.php | 12 ---- 4 files changed, 173 insertions(+), 13 deletions(-) create mode 100644 web/error.php diff --git a/WARNING.txt b/WARNING.txt index 8a5c55c..a15fc68 100644 --- a/WARNING.txt +++ b/WARNING.txt @@ -8,4 +8,9 @@ ProxyPassMatch ^/brisk/.*\.(png|gif|jpg|css|js)$ ! ProxyPass /brisk/index_rd.php fd:///var/www/brisk-priv/brisk.sock keepalive=Off connectiontimeout=5 timeout=30 ProxyPass /brisk/index_wr.php fd:///var/www/brisk-priv/brisk.sock keepalive=Off connectiontimeout=5 timeout=30 ProxyPass /brisk/index.php fd:///var/www/brisk-priv/brisk.sock keepalive=Off connectiontimeout=5 timeout=30 - +-------- +# +# PLEASE, ADD THE ErrorDocument LINE TO APACHE CONF FILE. +# + ErrorLog ${APACHE_LOG_DIR}/error.log ++ ErrorDocument 500 /error.php diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index e19b659..c20fedc 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -3121,4 +3121,17 @@ class Poll { } } +function carousel_top() +{ + $what = rand(1,2); + if ($what == 1) { + $rn = rand(1, 3); + return (sprintf('il negozio virtuale di Brisk', $rn)); + } + else { + return (sprintf('il nuovo blog di Brisk')); + } +} + + ?> diff --git a/web/error.php b/web/error.php new file mode 100644 index 0000000..3e5625f --- /dev/null +++ b/web/error.php @@ -0,0 +1,154 @@ + array('it' => 'briscola chiamata in salsa ajax', + 'en' => 'declaration briscola in ajax sauce (Beta)'), + 'content' => array('it' => 'C\'è qualche problema sul server.

Tra qualche istante questa pagina proverà a riconnettersi automaticamente.

Ci dispiace del disagio.', + 'en' => 'EN E\' occorso qualche problema sul server.
Questa pagina proverà automaticamente a riconnettersi tra qualche istante.
Ci dispiace per il disagio.' ) ); + +$host = $_SERVER['HTTP_HOST']; +$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); +$redir_url = "http://$host$uri/"; + +mt_srand(make_seed()); +$redir_rnd = rand(15, 25); +$redir_meta = sprintf('', $redir_rnd, $redir_url); +?> + + +Brisk: errore! + + + + + + + + + + + + + + + + + + + + + +'; + $banner_top_right = carousel_top(); + } + else { + $banner_top_left = carousel_top(); + $banner_top_right = ' +'; + } + } + else { // !$G_is_local + $banner_top_left = carousel_top(); + $banner_top_right = carousel_top(); + } + + $brisk_header_form = '
+ +'; + + printf($brisk_header_form); +?> + +
+
+ + +
+ +
+
+
+
+
+
+
+
+
+
+ + diff --git a/web/index.php b/web/index.php index 294234c..6ee1d74 100644 --- a/web/index.php +++ b/web/index.php @@ -237,18 +237,6 @@ function poll_dom() { return ''; } -function carousel_top() -{ - $what = rand(1,2); - if ($what == 1) { - $rn = rand(1, 3); - return (sprintf('il negozio virtuale di Brisk', $rn)); - } - else { - return (sprintf('il nuovo blog di Brisk')); - } -} - function index_main(&$brisk, $transp_type, &$header_out, $addr, $get, $post, $cookie) { GLOBAL $G_with_donors, $G_donors_cur, $G_donors_all; -- 2.17.1