X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=inline;f=web%2Findex.php;h=703252418c0e0e87412c00c17ebf93417dcc1fbe;hb=2d5c1d8ff205decdad1c91222e5e5366007ef785;hp=69490556490311dd6e3cfc2313f713f6017bd82a;hpb=bc29696ba05142894c798c81931ab2bf23dae5c3;p=brisk.git diff --git a/web/index.php b/web/index.php index 6949055..7032524 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 .= '
';
$standup .= ' ';
- $standup .= '
Giocatori in piedi ';
+ $standup .= 'Giocatori in piedi - Come ottenere user e password - ';
$standup .= sprintf('');
$standup .= '';
@@ -328,6 +342,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,17 @@ supported by: -Digita il tuo nickname per accedere ai tavoli della briscola. - +Digita il tuo nickname per accedere ai tavoli della briscola. + (se usi firefox e qualcosa non funziona prova a ricaricare la pagina con Ctrl + F5) @@ -431,7 +453,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 +467,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 +529,7 @@ else {
|