Exemple #1
0
function mail_main()
{
    global $x7s;
    $page = '';
    $body = perfom_mail();
    print_sheet($body, $page);
}
Exemple #2
0
function secret_main()
{
    global $print, $x7c, $x7s, $prefix, $db;
    if ($_GET['secret'] == '') {
        die("Empty secret");
    }
    $query = $db->DoQuery("SELECT name FROM {$prefix}rooms WHERE long_name='{$_GET['secret']}'");
    $row = $db->Do_Fetch_Assoc($query);
    include_once "./lib/secrets/{$_GET['secret']}.php";
    //It changes each 65535 seconds ~18h
    $today_secret = $secrets[(time() >> 16) % $secret_lenght];
    if ($row['name'] != $today_secret) {
        $db->DoQuery("UPDATE {$prefix}rooms SET name='{$today_secret}' WHERE long_name='{$_GET['secret']}'");
        $db->DoQuery("UPDATE {$prefix}users SET position='{$today_secret}' WHERE position='{$row['name']}'");
        $db->DoQuery("UPDATE {$prefix}messages SET room='{$today_secret}' WHERE room='{$row['name']}'");
    }
    if (isset($_GET['code']) && $_GET['code'] == $today_secret) {
        $db->DoQuery("UPDATE {$prefix}users SET secrets='0' WHERE username='******'");
        $body = '<img src="graphic/Giardino_dei_Suicidi.jpg">
                  <a onClick="javascript: opener.location.href=\'index.php?act=frame&room=' . $today_secret . '\'; window.close(self); ">
                  
                  <div style="background-color: transparent; position: absolute; top: 380px; left: 465px; width: 100px; height: 40px;"></div>

                  </a>
        ';
        print_sheet($body);
    } else {
        $query = $db->DoQuery("SELECT secrets FROM {$prefix}users WHERE username='******'");
        $row = $db->Do_Fetch_Assoc($query);
        $body = "<img src=\"graphic/Smarrirsi-nei-boschi.jpg\">";
        $row['secrets']++;
        //We ban for some minutes after two attempts
        if ($row['secrets'] > 2) {
            echo header("Location: index.php?act=logout&secret");
            new_ban2($x7s->username, 600, "Ti sei smarrito durante la ricerca di un luogo segreto. Per 10 minuti non potrai ricollegarti", "*");
            $db->DoQuery("UPDATE {$prefix}users SET secrets='0' WHERE username='******'");
            return;
        }
        $db->DoQuery("UPDATE {$prefix}users SET secrets='{$row['secrets']}' WHERE username='******'");
        print_sheet($body);
    }
}
Exemple #3
0
function sheet_main()
{
    global $x7s, $db, $x7c, $prefix;
    $page = '';
    $body = '<div style="color: white;">Not ready yet</div>';
    if (isset($_GET['page'])) {
        $page = $_GET['page'];
    } else {
        $page = "main";
        $_GET['page'] = "main";
    }
    if (!isset($_GET['pg'])) {
        $_GET['pg'] = $x7s->username;
    }
    if ($page == "main") {
        $body = sheet_page_main();
    } else {
        if ($page == "ability") {
            $body = sheet_page_ability();
        } else {
            if ($page == "background") {
                $body = sheet_page_background();
            } else {
                if ($page == "master") {
                    $body = sheet_page_master();
                } else {
                    if ($page == "equip") {
                        $body = sheet_page_equip();
                    } else {
                        if ($page == "corp") {
                            $body = sheet_page_corp();
                        }
                    }
                }
            }
        }
    }
    if ($body != "") {
        print_sheet($body, $page);
    }
}
require "../settings.php";
require "../core-settings.php";
require "finstatements.php";
foreach ($_GET as $key => $value) {
    $_POST[$key] = $value;
}
if (isset($_POST["key"])) {
    switch ($_POST["key"]) {
        default:
        case "display":
            $OUTPUT = financialStatements::balsheet($_POST);
            break;
        case ct("Print"):
        case ct("Save"):
        case ct("Export to Spreadsheet"):
            $OUTPUT = print_sheet($_POST);
            break;
        case "customize":
            $OUTPUT = customize($_POST);
            break;
        case "add":
        case "remove selected":
        case "update":
            $OUTPUT = update($_POST);
            break;
        case "note_view":
            $OUTPUT = note_view($_POST);
            break;
        case "note_save":
            $OUTPUT = note_save($_POST);
            break;