X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex.php;h=5a4157dbfcad86b23b68eeff0d685d3bb1516f78;hb=6d1d9d3337628af37b5d7f28e949534c7eab5934;hp=69490556490311dd6e3cfc2313f713f6017bd82a;hpb=bc29696ba05142894c798c81931ab2bf23dae5c3;p=brisk.git diff --git a/web/index.php b/web/index.php index 6949055..5a4157d 100644 --- a/web/index.php +++ b/web/index.php @@ -25,6 +25,7 @@ */ require_once("Obj/brisk.phh"); +require_once("Obj/auth.phh"); require_once("Obj/proxyscan.phh"); // Use of proxies isn't allowed. @@ -42,7 +43,7 @@ log_load("index.php"); function main() { GLOBAL $G_with_topbanner, $G_topbanner, $G_is_local; - GLOBAL $sess, $name, $table_idx, $table_token, $BRISK_SHOWHTML, $BRISK_DEBUG, $_SERVER; + GLOBAL $sess, $name, $pass_private, $table_idx, $table_token, $BRISK_SHOWHTML, $BRISK_DEBUG, $_SERVER; $body = ""; $tables = ""; @@ -88,11 +89,22 @@ function main() if ($ACTION == "login" && isset($name)) { log_main("pre garbage_manager DUE"); + + if (isset($pass_private) == FALSE) { + $pass_private = FALSE; + } + $room->garbage_manager(TRUE); /* try login */ - if (($user = &$room->add_user(&$sess, &$idx, $name, $_SERVER['REMOTE_ADDR'])) != FALSE) { + if (($user = &$room->add_user(&$sess, &$idx, $name, $pass_private, $_SERVER['REMOTE_ADDR'])) != FALSE) { $ACTION = "room"; - + if ($idx < 0) { + $idx = -$idx - 1; + $login_exists = TRUE; + } + else + $login_exists = FALSE; + log_legal($curtime, $user->sess, $user->name, "STAT:LOGIN", ''); @@ -106,7 +118,9 @@ function main() } else { /* Login Rendering */ - if ($idx == -2) + if ($idx == -3) + $body .= '
Utente e/o password errati.
'; + else if ($idx == -2) $body .= '
Il nickname deve contenere almeno una lettera o una cifra.
'; else if ($idx == -1) $body .= '
Spiacenti, non ci sono più posti liberi. Riprova più tardi.
'; @@ -145,7 +159,7 @@ function main() $standup .= '
'; $standup .= '
'; - $standup .= '
Giocatori in piedi
'; + $standup .= '
Giocatori in piedi - Come ottenere user e password -
'; $standup .= sprintf('
'); $standup .= '
'; @@ -328,6 +342,7 @@ supported by:

Brisk + @@ -337,6 +352,7 @@ supported by:

+ @@ -349,8 +365,14 @@ supported by:

var sess = "not_connected"; window.onload = function() { - menu_init(); - topbanner_init(); + // alert(window.onbeforeunload); + + login_init(); + g_withflash = DetectFlashVer(6,0,0); if (g_withflash == false) { @@ -376,17 +398,18 @@ supported by:





-Digita il tuo nickname per accedere ai tavoli della briscola.
-
- -
user: - - - -
pwd: - -
-
+Digita il tuo nickname per accedere ai tavoli della briscola.

+
+ + + + + + + + +

+Se non hai ancora una password, lascia il campo in bianco ed entra.

(se usi firefox e qualcosa non funziona
prova a ricaricare la pagina con Ctrl + F5)




@@ -431,7 +454,7 @@ Digita il tuo nickname per accedere ai tavoli della briscola.
var gst = new globst(); var g_is_spawn = 0; var topbanner_sfx, topbanner_dx; - + // var nonunload = false; var g_withflash = false; var g_imgct= 0; var g_imgtot = g_preload_img_arr.length; @@ -445,24 +468,36 @@ if ($BRISK_SHOWHTML == "debugtable") { } else { ?> - // alert("INDEX START"); + // alert("INDEX START"); menu_init(); - topbanner_init(); + xhr_rd = createXMLHttpRequest(); + // xhr_rd.setRequestHeader("Content-type", "text/html; charset=utf-8"); sess = ""; tra = new train($('room_tit')); window.onunload = onunload_cb; + window.onbeforeunload = onbeforeunload_cb; g_withflash = DetectFlashVer(6,0,0); if (g_withflash == false) { $("proflash").innerHTML = 'Audio con Flash.
'; } else $("proflashext").innerHTML = ""; + setTimeout(xhr_rd_poll, 0, sess); // alert("ARR LENGTH "+g_preload_img_arr.length); setTimeout(preload_images, 0, g_preload_img_arr, g_imgct); $("txt_in").focus();
Il nickname che stai usando è già registrato,

se il suo proprietario si autentificherà

verrai rinominato d'ufficio come ghostN.


", 0, "torna ai tavoli", 400, 150); +} +?> + } @@ -495,7 +530,7 @@ else {
- +