X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex_wr.php;fp=web%2Findex_wr.php;h=7ca82bcc98a205f6fe1cfe1cf733199470e5e7b6;hb=f53ddbf7b25778e2c55a93b20732eb314fb67cb5;hp=1577f01d1be2d46eed0bc5f1356a56059e5cb594;hpb=36c532cb49238f285ffcf43e96a1422b085ff217;p=brisk.git
diff --git a/web/index_wr.php b/web/index_wr.php
index 1577f01..7ca82bc 100644
--- a/web/index_wr.php
+++ b/web/index_wr.php
@@ -67,6 +67,7 @@ if (($user = &$room->get_user($sess, &$idx)) == FALSE) {
$argz = explode('|', $mesg);
if ($argz[0] == 'getchallenge') {
+ GLOBAL $cli_name;
if (($a_sem = Challenges::lock_data()) != FALSE) {
log_main("chal lock data success");
@@ -77,7 +78,7 @@ if (($user = &$room->get_user($sess, &$idx)) == FALSE) {
// echo '2|'.$argz[1].'|'.$token.'|'.$_SERVER['REMOTE_ADDR'].'|'.$curtime.'|';
// exit;
- if (($login_new = validate_name($argz[1])) != FALSE) {
+ if (($login_new = validate_name($cli_name)) != FALSE) {
if ($chals->add($login_new, $token, $_SERVER['REMOTE_ADDR'], $curtime) != FALSE) {
echo '0|'.$token;
}
@@ -135,6 +136,43 @@ if ($argz[0] == 'shutdown') {
else
log_rd2("SHUTDOWN FROM WHAT ???");
}
+else if ($argz[0] == 'warranty') {
+ GLOBAL $cli_name, $cli_email;
+
+ $curtime = time();
+ $mesg_to_user = "";
+
+ log_wr("INFO:SKIP:argz == warranty name: [".$cli_name."] AUTH: ".($user->flags & USER_FLAG_AUTH));
+ if ($user->flags & USER_FLAG_AUTH) {
+ if (($wa_lock = Warrant::lock_data()) != FALSE) {
+ if (($fp = @fopen(LEGAL_PATH."/warrant.txt", 'a')) != FALSE) {
+ /* Unix time | session | nickname | IP | where was | mesg */
+ fwrite($fp, sprintf("%ld|%s|%s|%s|\n", $curtime, $user->name, xcapelt(urldecode($cli_name)), xcapelt(urldecode($cli_email))));
+ fclose($fp);
+ }
+ Warrant::unlock_data($wa_lock);
+ $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
+ $user->comm[$user->step % COMM_N] .= show_notify("
Il nominativo è stato inoltrato all\'amministratore.
Nell\'arco di pochi giorni vi verrà
notificata l\'avvenuta registrazione.", 0, "chiudi", 400, 150);
+ $user->step_inc();
+ echo "1";
+ }
+ else {
+ $mesg_to_user = sprintf('chatt_sub("%s", [2, "%s"],"E\' occorso un errore durante il salvataggio, riprova o contatta l\'amministratore.");', $dt, NICKSERV);
+ }
+
+ }
+ else {
+ $mesg_to_user = sprintf('chatt_sub("%s", [2, "%s"],"Per autenticare qualcuno devi a tua volta essere autenticato.");', $dt, NICKSERV);
+ }
+
+ if ($mesg_to_user != "") {
+ $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
+
+ $dt = date("H:i ", $curtime);
+ $user->comm[$user->step % COMM_N] .= $mesg_to_user;
+ $user->step_inc();
+ }
+}
/******************
* *
* STAT: room *