Пример #1
0
function data_print($a)
{
    global ${"{$a}_array"};
    global ${"{$a}_rows"};
    global ${"{$a}_data"};
    global $stats_rows;
    global $board_rows;
    global $board_data;
    global $board_array;
    global $post_data;
    global $post_rows;
    global $total_data;
    global $GLOBAL;
    for ($i = 0; $i < ${"{$a}_rows"}; $i++, ${"{$a}_data"} = mysql_fetch_array(${"{$a}_array"})) {
        data_fetch("stats", "SELECT `id` FROM `board_" . ${"{$a}_data"}['id'] . "`");
        data_fetch("board", "SELECT `id`,`readby`,`date` FROM `boardnames` WHERE `forumid`='" . ${"{$a}_data"}['id'] . "'");
        data_fetch("post", "SELECT `date`,`poster` FROM `board_" . ${"{$a}_data"}['id'] . "` WHERE `id`=" . ${"{$a}_data"}['lastpost']);
        $post_new = 1;
        for ($j = 0; $j < $board_rows; $j++, $board_data = mysql_fetch_array($board_array)) {
            if ($board_data['date'] > $GLOBAL['user_info']['user_joined'] && !in_array($_COOKIE['ZeldaShrine'], split(":", $board_data['readby'])) && $_COOKIE['ZeldaShrine']) {
                unset($post_new);
            }
        }
        print "\r\n<div class=\"f_item\">\r\n  <div class=\"f_new_" . (isset($post_new) ? $i % 2 == 0 ? "l" : "d" : "red") . "\"></div>\r\n  <div style=\"background-image:url('http://" . $_SERVER['HTTP_HOST'] . "/images/main/Forum/chart." . (!isset($post_new) ? "new" : "old") . "." . ($i % 2 == 0 ? "l" : "d") . ".gif');\" class=\"f_check_" . ($i % 2 == 0 ? "l" : "d") . "\">\r\n  " . (!isset($post_new) ? "\r\n    <input name=\"post_mark_selected[" . ${"{$a}_data"}['id'] . "]\" type=\"checkbox\" value=\"" . ${"{$a}_data"}['id'] . "\" class=\"radio\">\r\n  " : "") . "</div>\r\n  <div class=\"f_thread\">\r\n    <div class=\"f_top_" . ($i % 2 == 0 ? "l" : "d") . "\">\r\n      <a href=\"?fid=" . ${"{$a}_data"}['id'] . "&amp;f_p=0#" . ${"{$a}_data"}['id'] . "\" name=\"" . ${"{$a}_data"}['id'] . "\" id=\"" . ${"{$a}_data"}['id'] . "\">" . ${"{$a}_data"}['name'] . "</a><br>\r\n      <small>\r\n        " . ${"{$a}_data"}['description'] . "<br>\r\n        " . ($_COOKIE['ZeldaShrine'] ? "<a href='http://" . $_SERVER['HTTP_HOST'] . "/Forum/thread.php?fid=" . ${"{$a}_data"}['id'] . "'>Make new thread</a>" : "Please log in to create a new thread.") . "\r\n      </small>\r\n    </div>";
        if ($_GET['fid'] == ${"{$a}_data"}['id']) {
            data_fetch("total", "SELECT COUNT(*) AS `rows` FROM `boardnames` WHERE `forumid`=" . $_GET['fid']);
            data_fetch("board", "SELECT `id`,`name`,`starter`,`date`,`lastpost`,`readby` FROM `boardnames` WHERE `forumid`='" . $_GET['fid'] . "' ORDER BY `lastpost` DESC LIMIT " . $_GET['f_p'] * 5 . ",5");
            print "\r\n  <!-- Running data_thread -->\r\n";
            data_thread("board", $i);
            print "\r\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"m_nav\">\r\n      <tr>\r\n        <td class=\"m_nav_left\">" . ($_GET['f_p'] > 0 ? "\r\n          <a href='?fid=" . $_GET['fid'] . "&amp;f_p=" . ($_GET['f_p'] - 1) . "#" . $_GET['fid'] . "'>Previous page of topics</a>" : "\r\n          &nbsp;") . "\r\n        </td>\r\n        <td class=\"m_nav_right\">" . ($total_data['rows'] - ($_GET['f_p'] + 1) * 5 > 0 ? "\r\n          <a href='?fid=" . $_GET['fid'] . "&amp;f_p=" . ($_GET['f_p'] + 1) . "#" . $_GET['fid'] . "'>Next page of topics</a>" : "\r\n          &nbsp;") . "\r\n        </td>\r\n      </tr>\r\n    </table>";
        }
        print "\r\n  </div>\r\n</div>";
    }
}
Пример #2
0
function walk_main()
{
    // arguments defined as [0]=>folder/game, [1]=>full game name
    global $_GET, $GLOBAL, $alter_data, $alter_rows, $alter_array, $main_data, $user_permission;
    $function_arguments = func_get_args();
    data_fetch("main", "SELECT `permission` FROM `walk_index` WHERE `name`='" . $function_arguments[0] . "' LIMIT 1");
    $main_data['permission'] = explode(":", $main_data['permission']);
    if (in_array($GLOBAL['user_info']['user_name'], $main_data['permission'])) {
        $user_permission = true;
    }
    if (isset($_GET['main_alter'])) {
        data_fetch("alter", "SELECT * FROM `" . strtolower($function_arguments[0]) . "_walk` WHERE `id`=" . $_GET['main_alter']);
    }
    if (is_file($_SERVER['DOCUMENT_ROOT'] . "/" . $function_arguments[0] . "/walk1.jpg")) {
        $image_game_info = getimagesize($_SERVER['DOCUMENT_ROOT'] . "/" . $function_arguments[0] . "/walk1.jpg");
        print "\r\n<div style=\"width:" . max(450, $image_game_info[0]) . "px; height:" . $image_game_info[1] . "px; background: url('walk1.jpg') no-repeat top right;\"></div>";
    }
    print "\r\n<div style=\"padding-left:100px; margin-top:30px;\">\r\n  <big>Walkthrough for " . $function_arguments[1] . "</big><br>\r\n  <small>\r\n    This walkthrough is dynamically managed. Information will be added after time.<br>\r\n    If I am mistaken, please send me a message with the correct information.\r\n  </small><br><br>\r\n  <div style=\"margin-left:30px;\">Mandatory parts // Parts of the main quest</div><br>";
    $sub_arguments = $function_arguments;
    array_push($sub_arguments, "1");
    walk_main_sub1($sub_arguments);
    unset($sub_arguments);
    print "\r\n  <a id=\"sidequest\" name=\"sidequest\"></a>\r\n  <div style=\"margin-left:30px;\">Optional parts // Parts of side quests</div>";
    $sub_arguments = $function_arguments;
    array_push($sub_arguments, "2");
    walk_main_sub1($sub_arguments);
    unset($sub_arguments);
    if (isset($user_permission)) {
        print "\r\n  <br><br><big>" . ($_GET['main_alter'] ? "Alter this part" : "Add another part") . "</big><br>\r\n  <form id=\"file_another_form\" name=\"file_another_form\" method=\"post\" action=\"http://" . $_SERVER['HTTP_HOST'] . "/Members/admin/walk.actions.php?g=" . $function_arguments[0] . "&amp;g_n=" . urlencode($function_arguments[1]) . (isset($_GET['main_alter']) ? "&amp;main_altered=" . $_GET['main_alter'] : "") . "\">\r\n    Title:<br>\r\n    <input type=\"text\" id=\"main_title\" name=\"main_title\" size=\"60\"" . (isset($_GET['main_alter']) ? " value=\"" . $alter_data['title'] . "\"" : "") . "><br><br>\r\n    Class:<br>\r\n    <input type=\"radio\" id=\"main_class\" name=\"main_class\" " . ($alter_data['class'] == 1 ? "checked " : "") . "value=\"1\" class=\"radio\">Part of the main timeline<br>\r\n    <input type=\"radio\" id=\"main_class\" name=\"main_class\" " . ($alter_data['class'] == 2 ? "checked " : "") . "value=\"2\" class=\"radio\">Not part of the main timeline<br><br>\r\n    <input type=\"submit\" id=\"file_another\" name=\"file_another\" value=\"" . (isset($_GET['main_alter']) ? "Alter this part." : "Create this part") . "\" class=\"submit\">\r\n  </form>";
    }
    print "\r\n</div>";
}
Пример #3
0
function data_b_print($a)
{
    global ${"{$a}_array"};
    global ${"{$a}_rows"};
    global ${"{$a}_data"};
    global $poster_data;
    global $post_pattern;
    global $post_replace;
    global $GLOBAL;
    global $poster_rows;
    for ($i = 0; $i < ${"{$a}_rows"}; $i++, ${"{$a}_data"} = mysql_fetch_array(${"{$a}_array"})) {
        data_fetch("poster", "SELECT `id` FROM `user_data` WHERE `name`='" . ${"{$a}_data"}['poster'] . "'");
        data_fetch("poster", "SELECT `color`,`favorite` FROM `subrosian_main` WHERE `id`=" . $poster_data['id']);
        if ($poster_rows > 0) {
            $poster_data['color'] = explode(":", $poster_data['color']);
        }
        $alter_path = "http://" . $_SERVER['HTTP_HOST'] . "/Forum/pr_alter.php?fid=" . $_GET['fid'] . "&at=" . ${"{$a}_data"}['id'] . "&loc=" . str_replace("&", "¤", $_SERVER['REQUEST_URI']);
        $delete_path = "http://" . $_SERVER['HTTP_HOST'] . "/Forum/pr_action.php?fid=" . $_GET['fid'] . "&post_delete=" . ${"{$a}_data"}['id'] . "&loc=" . str_replace("&", "¤", $_SERVER['REQUEST_URI']);
        print "\r\n  <div class=\"b_item_" . ($i % 2 == 0 ? "l" : "d") . "\">\r\n    " . (is_file($_SERVER['DOCUMENT_ROOT'] . "/images/main/Members/" . strtolower(${"{$a}_data"}['poster']) . ".forum.gif") ? "<div class=\"b_image\" style=\"background:url('http://" . $_SERVER['HTTP_HOST'] . "/images/main/Members/" . strtolower(${"{$a}_data"}['poster']) . ".forum.gif') no-repeat top left;\"></div>" : "<div class=\"b_image\" style=\"background:url('http://" . $_SERVER['HTTP_HOST'] . "/images/main/Members/generic.black.forum.gif') no-repeat top left;\"></div>") . "\r\n    <div class=\"b_text\">\r\n    <small>\r\n      " . ${"{$a}_data"}['poster'] . ", " . ${"{$a}_data"}['date'] . ":\r\n    </small>\r\n    <br><br>\r\n    " . stripslashes(nl2br(preg_replace($post_pattern, $post_replace, ${"{$a}_data"}['message']))) . "\r\n    <br><br>";
        if ($GLOBAL['user_info']['user_name'] == ${"{$a}_data"}['poster']) {
            print "\r\n    <small>\r\n      <a href=\"" . $alter_path . "\">Edit your post</a> | \r\n      <a href=\"" . $delete_path . "\">Delete your post</a>\r\n    </small>";
        } else {
            if ($GLOBAL['user_info']['user_class'] == "Administrator" || $GLOBAL['user_info']['user_class'] == "Moderator") {
                print "\r\n    <small>\r\n      <a href=\"" . $delete_path . "\">Remove this post because of inappropriate use</a>\r\n    </small>";
            }
        }
        print "\r\n    </div>\r\n  </div>";
    }
}
Пример #4
0
function data_pages($a, $b)
{
    global $pages_rows;
    data_fetch("pages", "SELECT `id` FROM `news_" . $a . "`");
    print "Pages: ";
    for ($i = 0; $i < ceil($pages_rows / 10); $i++) {
        print "<a href='?" . $a . "=0" . $i . "&" . $b . "=0" . number_format($_GET[$b], 0, '.', '') . "'>" . ($i + 1) . "</a> ";
    }
}
Пример #5
0
function f_search_print($search_array)
{
    // prints results from search
    global $GLOBAL, $post_pattern, $post_replace, $post_before_data;
    foreach ($search_array as $match_key => $match_content) {
        data_fetch("post_before", "SELECT COUNT(*) AS `rows` FROM `board_" . $match_content[0][0] . "` WHERE `boardid`=" . $match_content[1][0] . " AND `id`<" . $match_content[2]['id']);
        if (strlen($match_content[1][1]) > 50) {
            $match_content[1][1] = substr($match_content[1][1], 0, 48) . "...";
        }
        print "\r\n<div class=\"a_item_" . ($match_key % 2 == 0 ? "l" : "d") . "\">\r\n    " . (is_file($_SERVER['DOCUMENT_ROOT'] . "/images/main/Members/" . strtolower($match_content[2]['poster']) . ".forum.gif") ? "<div class=\"a_image\" style=\"background:url('http://" . $_SERVER['HTTP_HOST'] . "/images/main/Members/" . strtolower($match_content[2]['poster']) . ".forum.gif') no-repeat top left;\"></div>" : "<div class=\"a_image\" style=\"background:url('http://" . $_SERVER['HTTP_HOST'] . "/images/main/Members/generic.black.forum.gif') no-repeat top left;\"></div>") . "\r\n  <div class=\"a_text\">\r\n    <small>\r\n      " . $match_content[2]['poster'] . ", " . $match_content[2]['date'] . ":<br>\r\n      reply found in " . $match_content[0][1] . " | " . $match_content[1][1] . "\r\n    </small>\r\n    <br><br>\r\n    " . stripslashes(nl2br(preg_replace($post_pattern, $post_replace, $match_content[2]['message']))) . "\r\n    <br><br>\r\n    <small>\r\n      <a href=\"http://" . $_SERVER['HTTP_HOST'] . "/Forum/board.php?fid=" . $match_content[0][0] . "&bid=" . $match_content[1][0] . "&p=" . floor($post_before_data['rows'] / $GLOBAL['browse_info']['forum_limit']) . "\">read this thread from the corresponding page</a>\r\n    </small>\r\n  </div>\r\n</div>";
    }
}
Пример #6
0
function walk_part()
{
    // arguments defined as [0]=>folder/game, [1]=>full game name
    global $GLOBAL, $_GET, $_POST, $_SERVER, $part_data, $part_rows, $part_array, $main_data;
    include $_SERVER['DOCUMENT_ROOT'] . "/includes/walk.replace.php";
    $function_arguments = func_get_args();
    $str_newline = $GLOBAL['browse_info']['str_newline'];
    $file_name = $_SERVER['DOCUMENT_ROOT'] . "/" . $function_arguments[0] . "/walk" . $_GET['nr'] . ".php";
    data_fetch("part", "SELECT * FROM `" . strtolower($function_arguments[0]) . "_walk` WHERE `id`=" . $_GET['nr']);
    if (isset($_GET['at'])) {
        $file_output = !preg_match("/win/i", $_SERVER['SERVER_SOFTWARE']) ? str_replace("\r\n", "\n", file($file_name)) : file($file_name);
        $search_start = array_search("<!-- " . $_GET['at'] . "-start -->" . $str_newline, $file_output);
        $search_end = array_search("<!-- " . $_GET['at'] . "-end -->" . $str_newline, $file_output);
        $alter_headline = strip_tags(trim($file_output[$search_start + 3]));
        for ($i = 1; $i <= 4; $i++) {
            preg_match("/[\\w]{32}/", $file_output[$search_end - 7 + $i], $alter_md5[$i]);
        }
        if (count(array_merge($alter_md5[1], $alter_md5[2], $alter_md5[3], $alter_md5[4])) == 1) {
            $alter_md5 = array("1" => array(implode("", array_merge($alter_md5[1], $alter_md5[2], $alter_md5[3], $alter_md5[4]))), "2" => array(), "3" => array(), "4" => array());
        }
        $alter_mean = strip_tags(trim(implode("", array_slice($file_output, $search_start + 4, $search_end - $search_start - 14))));
        $post_data['message'] = $alter_mean;
    }
    if (file_exists($file_name)) {
        $file_handle = fopen($file_name, 'r');
        $file_output = file($file_name);
        fclose($file_handle);
    }
    @array_shift($file_output);
    data_fetch("main", "SELECT `permission` FROM `walk_index` WHERE `name`='" . $function_arguments[0] . "' LIMIT 1");
    $main_data['permission'] = explode(":", $main_data['permission']);
    if (in_array($GLOBAL['user_info']['user_name'], $main_data['permission'])) {
        $user_permission = true;
    } else {
        $file_output = preg_replace("'<!--Admin-start-->.*<!--Admin-end-->'", "", $file_output);
    }
    unset($file_output[0]);
    $post_reply = isset($_GET['at']) ? "Alter this file" : "Add to this file";
    print "\r\n<br><a href=\"http://" . $_SERVER['HTTP_HOST'] . "/" . $function_arguments[0] . "/walk.main.php\">Go back to the main view</a>\r\n<br><hr>\r\n<div style=\"margin-left:30px; margin-top:-14px; font-size:20px; font-style:italic;\">" . $part_data['title'] . "</div>\r\n<table cellspacing=\"10\" cellpadding=\"0\" border=\"0\" style=\"width:640px;\">\r\n  " . preg_replace($post_pattern, $post_replace, @implode("", $file_output)) . "\r\n</table>\r\n<br>";
    if (isset($user_permission)) {
        print "\r\n<hr>\r\n<div style=\"margin-left:30px; margin-top:-14px; font-size:20px; font-style:italic;\">" . (isset($_GET['at']) ? "Alter this part" : "Add another part") . "</div>\r\n<a id=\"form\"></a>\r\n<form name=\"post_reply\" method=\"post\" action=\"http://" . $_SERVER['HTTP_HOST'] . "/Members/admin/walk.actions.php?g=" . $function_arguments[0] . "&amp;g_n=" . urlencode($function_arguments[1]) . "&amp;nr=" . $_GET['nr'] . (isset($_GET['at']) ? "&amp;file_altered=" . $_GET['at'] : "") . "\">\r\n  <div style=\"margin-left:30px;\">A headline to match this part</div><br>\r\n  <input type=\"text\" id=\"text_headline\" name=\"text_headline\" size=\"102\" " . (isset($_GET['at']) ? "value=\"" . $alter_headline . "\"" : "") . "><br>\r\n  <div style=\"margin-left:30px;\">\r\n    Pick up to four pictures for this part.<br>\r\n    <small>This is optional, leave fields blank for no pictures.</small>\r\n  </div>";
        for ($i = 1; $i <= 4; $i++) {
            print "\r\n  <input type=\"text\" name=\"text_picture" . $i . "\" size=\"77\" " . (isset($alter_md5[$i][0]) ? "" : "disabled ") . (isset($_GET['at']) && isset($alter_md5[$i][0]) ? "value=\"" . $alter_md5[$i][0] . "\"" : "") . ">\r\n  <input type=\"button\" value=\"Browse archive\" onClick=\"window.open('http://" . $_SERVER['HTTP_HOST'] . "/images/walk.images.php?g=" . $function_arguments[0] . "&image=" . $i . "','image','toolbar=no,scrollbars=yes,directories=no,width=390,height=600');\">\r\n  <br>";
        }
        print "\r\n  <br>\r\n  <div style=\"margin-left:30px;\">The actual text. Remember to check your spelling.</div>";
        include $_SERVER['DOCUMENT_ROOT'] . "/Forum/p_reply.php";
        print "\r\n</form>";
    }
}
Пример #7
0
function data_print($a)
{
    global ${"{$a}_array"};
    global ${"{$a}_rows"};
    global ${"{$a}_data"};
    global $stats_data;
    global $post_data;
    global $post_rows;
    for ($i = 0; $i < ${"{$a}_rows"}; $i++, ${"{$a}_data"} = mysql_fetch_array(${"{$a}_array"})) {
        data_fetch("stats", "SELECT COUNT(*) AS `rows` FROM `board_pr` WHERE `boardid`=" . ${"{$a}_data"}['id']);
        data_fetch("post", "SELECT `poster`,`date` FROM `board_pr` WHERE `id`=" . ${"{$a}_data"}['lastpost']);
        ${"{$a}_data"}['starter'] = preg_replace("/[\\:]?" . $_COOKIE['ZeldaShrine'] . "[\\:]?/", "", ${"{$a}_data"}['starter']);
        $post_new = !in_array($_COOKIE['ZeldaShrine'], split(":", ${"{$a}_data"}['readby'])) && $_COOKIE['ZeldaShrine'] ? "" : "1";
        print "\r\n<div class=\"f_item\">\r\n  <div class=\"f_new_" . (isset($post_new) ? $i % 2 == 0 ? "l" : "d" : "red") . "\"></div>\r\n  <div class=\"f_check_" . ($i % 2 == 0 ? "l" : "d") . "\">\r\n  " . (!isset($post_new) ? "\r\n    <em>new</em><br>\r\n    <input name=\"post_mark_selected[" . ${"{$a}_data"}['id'] . "]\" type=\"checkbox\" value=\"" . ${"{$a}_data"}['id'] . "\" class=\"radio\">\r\n  " : "") . "</div>\r\n  <div class=\"f_thread\">\r\n    <div class=\"f_top_" . ($i % 2 == 0 ? "l" : "d") . "\">\r\n      <a href=\"pr_board.php?fid=" . ${"{$a}_data"}['id'] . "\" name=\"" . ${"{$a}_data"}['id'] . "\">" . ${"{$a}_data"}['name'] . "</a><br>\r\n      <small>\r\n        A discussion between you and " . ${"{$a}_data"}['starter'] . "<br>\r\n        Containing a total of " . $stats_data['rows'] . " posts.\r\n        <div id='lvl1" . ${"{$a}_data"}['id'] . "link' style='display:block;'>\r\n          <a href='javascript:void(0);' onClick=\"showL('lvl1" . ${"{$a}_data"}['id'] . "delete'); hideL('lvl1" . ${"{$a}_data"}['id'] . "link');\">Delete this discussion by clicking here</a>\r\n        </div>\r\n        <div id='lvl1" . ${"{$a}_data"}['id'] . "delete' style='display:none;'>\r\n          Please remember that deletion is irreversible for both parts.<br>\r\n          <a href='pr_action.php?thread_delete=1&fid=" . ${"{$a}_data"}['id'] . "&loc=/Forum/pr_forum.php'>Click here to confirm the deletion.</a>\r\n        </div>\r\n      </small>\r\n    </div>\r\n  </div>\r\n</div>";
    }
}
function d_compile_file()
{
    // creates string to write to file
    // arguments defined as [0]=>folder/game, [1]=>full game name, [2]=>number
    global $GLOBAL, $_SERVER, $post_pattern, $post_replace, $part_data, $part_rows, $part_array, $prev_data, $prev_rows, $next_data, $next_rows;
    $function_arguments = func_get_args();
    $o_content_array = o_get_content($function_arguments[0], $function_arguments[2]);
    $o_title_string = o_get_title($function_arguments[0], $function_arguments[2]);
    data_fetch("part", "SELECT * FROM `" . strtolower($function_arguments[0]) . "_walk` WHERE `id`=" . $function_arguments[2]);
    data_fetch("prev", "SELECT `id`,`title` FROM `" . strtolower($function_arguments[0]) . "_walk` WHERE `id`<" . $function_arguments[2] . " AND `class`=1 ORDER BY `id` DESC LIMIT 1");
    data_fetch("next", "SELECT `id`,`title` FROM `" . strtolower($function_arguments[0]) . "_walk` WHERE `id`>" . $function_arguments[2] . " AND `class`=1 ORDER BY `id` ASC LIMIT 1");
    $ad_file_name = $_SERVER['DOCUMENT_ROOT'] . "/includes/main.ad.skyscraper.php";
    $d_content_ad = file($ad_file_name);
    $GLOBAL['d_content'] = "\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<html>\r\n<head>\r\n  <title>Zelda Shrine - Walkthrough for " . $function_arguments[1] . ": " . $part_data['title'] . "</title>\r\n  <link rel=\"stylesheet\" type=\"text/css\" href=\"http://" . $_SERVER['HTTP_HOST'] . "/includes/style.main.php\">\r\n  <link rel=\"stylesheet\" type=\"text/css\" href=\"http://" . $_SERVER['HTTP_HOST'] . "/includes/style.layers.common.php\">\r\n  <meta name=\"description\" content=\"Walkthrough for " . $function_arguments[1] . ": " . $part_data['title'] . " complete with screenshots, cross-references and ...\">\r\n  <meta name=\"keywords\" content=\"" . $o_title_string . "\">\r\n  <meta name=\"Search\" content=\"" . $function_arguments[1] . ": " . $part_data['title'] . "\">\r\n  <meta name=\"File\" content=\"http://" . $_SERVER['HTTP_HOST'] . "/" . $function_arguments[0] . "/walk.part.php?nr=" . $function_arguments[2] . "\">\r\n</head>\r\n<body>\r\n  <div style=\"height:35px; padding-top:2px; padding-bottom:2px; padding-left:10px;\" class=\"dark\">\r\n    <div style=\"height:35px; margin-right:50px; width:50px; float:left; background:url('http://" . $_SERVER['HTTP_HOST'] . "/images/main/main.logo.small.jpg') no-repeat top left;\">\r\n    </div>\r\n    <small>\r\n      This page is a part of the walkthrough for " . $function_arguments[1] . " at <a href=\"http://" . $_SERVER['HTTP_HOST'] . "\">Zelda Shrine</a>.<br>\r\n      <a href=\"http://" . $_SERVER['HTTP_HOST'] . "/" . $function_arguments[0] . "/walk.part.php?nr=" . $function_arguments[2] . "\">Click here to see it in its proper context.</a>\r\n    </small>\r\n  </div>" . ($prev_rows > 0 ? "\r\n  <div style=\"height:20px; padding-left:140px; margin-top:2px;\" class=\"dark\">\r\n    <small><a href=\"http://" . $_SERVER['HTTP_HOST'] . "/" . $function_arguments[0] . "/walkthrough/part" . $prev_data['id'] . ".html\">see previous part of this walkthrough (" . strtolower($prev_data['title']) . ")</a></small>\r\n  </div>" : "") . "\r\n  <div style=\"position:absolute; left:10px; width:120px;\">\r\n    " . implode("", $d_content_ad) . "\r\n  </div>\r\n  <div style=\"margin-left:140px; margin-top:20px;\">\r\n    <div style=\"margin-left:30px; margin-top:-14px; font-size:20px; font-style:italic;\">" . $part_data['title'] . "</div>\r\n    <table cellspacing=\"10\" cellpadding=\"0\" border=\"0\" style=\"width:640px;\">\r\n      " . preg_replace($post_pattern, $post_replace, @implode("", $o_content_array)) . "\r\n    </table>\r\n    <br>\r\n  </div>" . ($next_rows > 0 ? "\r\n  <div style=\"height:20px; padding-left:140px; margin-top:2px;\" class=\"dark\">\r\n    <small><a href=\"http://" . $_SERVER['HTTP_HOST'] . "/" . $function_arguments[0] . "/walkthrough/part" . $next_data['id'] . ".html\">see next part of this walkthrough (" . strtolower($next_data['title']) . ")</a></small>\r\n  </div>" : "") . "\r\n</body>\r\n</html>";
    d_create_file($function_arguments[0], $function_arguments[1], $function_arguments[2]);
}
Пример #9
0
function menu_request()
{
    // arguments defined as [0]=>folder/game
    global $GLOBAL, $menu_data, $menu_rows, $menu_array, $image_data;
    $result_array = array();
    $function_arguments = func_get_args();
    $function_arguments[0] = str_replace(".", "", $function_arguments[0]);
    data_fetch("menu", "SELECT `link`,`text` FROM `menu_items` WHERE `game`='" . $function_arguments[0] . "'");
    data_fetch("image", "SELECT count(*) FROM `screenshots` WHERE `game`='" . $function_arguments[0] . "'");
    $result_array[] = array("text" => "game information", "link" => "/" . $function_arguments[0] . "/");
    for ($i = 0; $i < $menu_rows; $i++, $menu_data = mysql_fetch_array($menu_array)) {
        $result_array[] = array("text" => $menu_data['text'], "link" => $menu_data['link']);
    }
    if ($image_data[0] > 0) {
        $result_array[] = array("text" => "game screenshots", "link" => "/images/image.browse.php");
    }
    return $result_array;
}
Пример #10
0
function d2_trash($a)
{
    global ${"{$a}_array"};
    global ${"{$a}_rows"};
    global ${"{$a}_data"};
    global $GLOBAL;
    global $thread_data;
    print "\r\r\n  <tr>\r\r\n    <td colspan='2'></td>\r\r\n    <td>\r\r\n      <div style='position:relative; left:30px;'>\r\r\n        <small>\r\r\n          These threads have been marked for deletion by a moderator:<br><br>\r\r\n        </small>\r\r\n          <div style='position:relative; left:30px;'>";
    for ($i = 0; $i < ${"{$a}_rows"}; $i++, ${"{$a}_data"} = mysql_fetch_array(${"{$a}_array"})) {
        data_fetch("thread", "SELECT `name` FROM `forumnames` WHERE `id`=" . ${"{$a}_data"}['forumid']);
        print "\r\r\n            " . ${"{$a}_data"}['name'] . "\r\r\n            <div style='position:relative; left:30px;'>\r\r\n              <small>\r\r\n              Created by " . ${"{$a}_data"}['starter'] . " (" . ${"{$a}_data"}['date'] . ")<br>\r\r\n              Originally part of " . $thread_data['name'] . "<br>";
        if ($GLOBAL['user_info']['user_class'] == "Administrator") {
            print "\r\r\n              <a href='http://" . $_SERVER['HTTP_HOST'] . "/Forum/action.php?trash_restore=" . ${"{$a}_data"}['id'] . "&amp;loc=/Forum/forum.php?fid=" . ${"{$a}_data"}['forumid'] . "'>Restore this thread</a>\r\r\n              ||\r\r\n              <a href='http://" . $_SERVER['HTTP_HOST'] . "/Forum/action.php?trash_delete=" . ${"{$a}_data"}['id'] . "&amp;loc=/Forum/forum.php'>Delete this thread</a>\r\r\n              <div style='position:relative; left:30;'>\r\r\n                Note that deletion can not be undone.\r\r\n              </div>";
        }
        print "\r\r\n              </small>\r\r\n            </div><br>";
    }
    print "\r\r\n            " . ($GLOBAL['user_info']['user_class'] == "Administrator" && ${"{$a}_rows"} > 0 ? "<a href='http://" . $_SERVER['HTTP_HOST'] . "/Forum/action.php?trash_delete_all=1&amp;loc=/Forum/forum.php'>Click here to delete all threads in the bin.</a>" : "") . "\r\r\n          </div><br>\r\r\n      </div>\r\r\n    </td>\r\r\n    <td></td>\r\r\n  </tr>";
}
Пример #11
0
function d2_print($a)
{
    global ${"{$a}_array"};
    global ${"{$a}_rows"};
    global ${"{$a}_data"};
    global $poster_data;
    global $post_pattern;
    global $post_replace;
    global $GLOBAL;
    global $poster_rows;
    global $reply_data;
    print "\r\n  <tr>\r\n    <td style='width:400px;'></td><td style='width:190px;'></td>\r\n  </tr>";
    for ($i = 0; $i < ${"{$a}_rows"}; $i++, ${"{$a}_data"} = mysql_fetch_array(${"{$a}_array"})) {
        $alter_path = "http://" . $_SERVER['HTTP_HOST'] . "/Forum/alter.php?fid=" . $_GET['fid'] . "&bid=" . $_GET['bid'] . "&at=" . ${"{$a}_data"}['id'] . "&loc=" . str_replace("&", "¤", $_SERVER['REQUEST_URI']);
        $delete_path = "http://" . $_SERVER['HTTP_HOST'] . "/Forum/action.php?fid=" . $_GET['fid'] . "&post_delete=" . ${"{$a}_data"}['id'] . "&loc=" . str_replace("&", "¤", $_SERVER['REQUEST_URI']);
        if (${"{$a}_data"}['poster'] == "Moderator") {
            print "\r\n  <tr>\r\n    <td colspan='2' style='vertical-align:bottom; padding:2px; text-align:center; border-bottom: #000000 1px solid;' class='board'>\r\n      <em>" . stripslashes(nl2br(preg_replace($post_pattern, $post_replace, ${"{$a}_data"}['message']))) . "</em>";
            if ($GLOBAL['user_info']['user_class'] == "Administrator" || $GLOBAL['user_info']['user_class'] == "Moderator") {
                print "\r\n        <small>\r\n        <br /><br /><a href='" . $delete_path . "' class='dark'>Re-open this thread</a>\r\n        </small>";
            }
            print "\r\n    </td>\r\n  </tr>";
        } else {
            data_fetch("poster", "SELECT `id` FROM `user_data` WHERE `name`='" . ${"{$a}_data"}['poster'] . "'");
            data_fetch("poster", "SELECT `color`,`favorite` FROM `subrosian_main` WHERE `id`=" . $poster_data['id']);
            data_fetch("reply", "SELECT `poster` FROM `board_" . $_GET['fid'] . "` WHERE `boardid`=" . $_GET['bid'] . " ORDER BY `id` DESC LIMIT 1");
            if ($poster_rows > 0) {
                $poster_data['color'] = explode(":", $poster_data['color']);
            }
            print "\r\n  <tr style='height:100px'>\r\n    <td style='vertical-align:bottom; padding:5px; border-bottom: #000000 1px solid;'>\r\n      " . stripslashes(nl2br(preg_replace($post_pattern, $post_replace, ${"{$a}_data"}['message']))) . "<br /><br />";
            if ($GLOBAL['user_info']['user_name'] == ${"{$a}_data"}['poster'] && $reply_data['poster'] != "Moderator") {
                print "\r\n      <small>\r\n      <a href='" . $alter_path . "'>Edit your post</a><br />\r\n      <a href='" . $delete_path . "'>Delete your post</a>\r\n      </small>";
            } else {
                if ($GLOBAL['user_info']['user_class'] == "Administrator" || $GLOBAL['user_info']['user_class'] == "Moderator") {
                    print "\r\n      <small>\r\n      <a href='" . $delete_path . "'>Remove this post because of inappropriate use</a><br />\r\n      <a href='pr_thread.php?regexp=^" . ${"{$a}_data"}['poster'] . "\$'>Start a discussion with this member</a>\r\n      </small>";
                } else {
                    if ($_COOKIE['ZeldaShrine']) {
                        print "\r\n      <small>\r\n      <a href='pr_thread.php?regexp=^" . ${"{$a}_data"}['poster'] . "\$'>Start a discussion with this member</a>\r\n      </small>";
                    }
                }
            }
            print "\r\n    </td>\r\n    <td style='vertical-align:bottom; border-bottom: #000000 1px solid;'>\r\n      <div style='position:relative; top:2px;'>\r\n        <small>\r\n          <div style='position:relative; left:20px;'>\r\n            Posted by " . ${"{$a}_data"}['poster'] . "<br />" . ${"{$a}_data"}['date'] . "\r\n          </div>\r\n        </small>\r\n      </div>" . ($poster_rows > 0 ? "\r\n      <img src='http://" . $_SERVER['HTTP_HOST'] . "/images/main/Members/" . (in_array("Custom", $poster_data['color']) ? "custom/" . strtolower(${"{$a}_data"}['poster']) : "subrosian_" . strtolower($poster_data['color'][$poster_data['favorite']])) . "_big.gif'></td>" : "\r\n      &nbsp;</td>") . "\r\n  </tr>";
        }
    }
}
Пример #12
0
function image_picture()
{
    // draws large image
    // input data: [0] => image_id
    $function_arguments = func_get_args();
    global $image_data;
    data_fetch("image", "SELECT * FROM `subrosian_tattoos` WHERE `id`=" . $function_arguments[0]);
    $file_src1 = $_SERVER['DOCUMENT_ROOT'] . "/images/main/Members/generic.pink.large.gif";
    $file_src2 = $_SERVER['DOCUMENT_ROOT'] . "/images/main/Tattoos/tattoo" . $image_data['id'] . "." . $image_data['filetype'];
    $image_fileinfo1 = getimagesize($file_src1);
    $image_fileinfo2 = getimagesize($file_src2);
    $image_src1 = imagecreatefromgif($file_src1);
    switch ($image_fileinfo2[2]) {
        case 1:
            $image_src2 = imagecreatefromgif($file_src2);
            break;
        case 2:
            $image_src2 = imagecreatefromjpeg($file_src2);
            break;
        case 3:
            $image_src2 = imagecreatefrompng($file_src2);
            break;
    }
    $image_dest = imagecreatetruecolor($image_fileinfo1[0], $image_fileinfo1[1]);
    $image_width3 = $image_data['scale'] / 100 * ($image_fileinfo2[0] * abs(cos(M_PI * $image_data['rotation'] / 180)) + $image_fileinfo2[1] * abs(sin(M_PI * $image_data['rotation'] / 180)));
    $image_height3 = $image_data['scale'] / 100 * ($image_fileinfo2[0] * abs(sin(M_PI * $image_data['rotation'] / 180)) + $image_fileinfo2[1] * abs(cos(M_PI * $image_data['rotation'] / 180)));
    $image_src3 = imagecreatetruecolor($image_width3, $image_height3);
    $image_width2 = $image_width3 * 100 / $image_data['scale'];
    $image_height2 = $image_height3 * 100 / $image_data['scale'];
    $image_bg_fill = imagecolorat($image_src2, 5, 5);
    $image_src2 = imagerotate($image_src2, $image_data['rotation'], $image_bg_fill);
    imagecopy($image_dest, $image_src1, 0, 0, 0, 0, $image_fileinfo1[0], $image_fileinfo1[1]);
    imagecopyresized($image_src3, $image_src2, 0, 0, 0, 0, $image_width3, $image_height3, $image_width2, $image_height2);
    imagetruecolortopalette($image_src3, 0, 2);
    imagecolortransparent($image_src3, imagecolorat($image_src3, 0, 0));
    imagecopymerge($image_dest, $image_src3, $image_data['x'], $image_data['y'], 0, 0, $image_width3, $image_height3, $image_data['strength']);
    imagefilter($image_dest, IMG_FILTER_SMOOTH, 80);
    imagetruecolortopalette($image_dest, 0, 128);
    return $image_dest;
    imagedestroy($image_src3);
    imagedestroy($image_src2);
    imagedestroy($image_src1);
    imagedestroy($image_dest);
}
Пример #13
0
function f_search_match($search_array)
{
    // compiles array from database matches
    global $GLOBAL, $forum_data, $forum_rows, $forum_array, $board_data, $board_rows, $board_array;
    $forum_info = array();
    $board_info = array();
    $result_array = array();
    data_fetch("forum", "SELECT `id`,`name`,`class` FROM `forumnames` ORDER BY `id` ASC");
    data_fetch("board", "SELECT `id`,`name` FROM `boardnames` ORDER BY `id` ASC");
    for ($i = 0; $i < $forum_rows; $i++, $forum_data = mysql_fetch_array($forum_array)) {
        $forum_info[$forum_data['id']] = array($forum_data['id'], $forum_data['name'], $forum_data['class']);
    }
    for ($i = 0; $i < $board_rows; $i++, $board_data = mysql_fetch_array($board_array)) {
        $board_info[$board_data['id']] = array($board_data['id'], $board_data['name']);
    }
    foreach ($search_array as $match_array) {
        $result_array[] = array($forum_info[$match_array[0]], $board_info[$match_array[1]], $match_array[2]);
    }
    return $result_array;
}
Пример #14
0
function data_thread($a, $i)
{
    global ${"{$a}_array"};
    global ${"{$a}_rows"};
    global ${"{$a}_data"};
    global $post_data;
    global $post_rows;
    global $thread_rows;
    global $GLOBAL;
    for ($j = 0; $j < ${"{$a}_rows"}; $j++, ${"{$a}_data"} = mysql_fetch_array(${"{$a}_array"})) {
        $post_new = 1;
        if (${"{$a}_data"}['date'] > $GLOBAL['user_info']['user_joined'] && !in_array($GLOBAL['user_info']['user_name'], split(":", ${"{$a}_data"}['readby'])) && $_COOKIE['ZeldaShrine']) {
            unset($post_new);
        }
        data_fetch("thread", "SELECT `id` FROM `board_" . $_GET['fid'] . "` WHERE `boardid`=" . ${"{$a}_data"}['id']);
        data_fetch("post", "SELECT `date`,`poster` FROM `board_" . $_GET['fid'] . "` WHERE `id`=" . ${"{$a}_data"}['lastpost']);
        if (strlen(${"{$a}_data"}['name']) > 30) {
            ${"{$a}_data"}['name'] = substr(${"{$a}_data"}['name'], 0, 28) . "...";
        }
        print "\r\n<div class=\"f_topic\">\r\n  <div class=\"f_new_" . (isset($post_new) ? ($j + $i) % 2 == 0 ? "d" : "l" : "red") . "\"></div>\r\n  <div class=\"f_thread_" . (($j + $i) % 2 == 0 ? "d" : "l") . "\">\r\n    <a href=\"board.php?fid=" . $_GET['fid'] . "&amp;bid=" . ${"{$a}_data"}['id'] . "&amp;p=0\">" . ${"{$a}_data"}['name'] . "</a>\r\n    <small>\r\n      (Go to page:";
        for ($k = 1; $k <= ceil($thread_rows / 10); $k++) {
            print "\r\n      <a href='board.php?fid=" . $_GET['fid'] . "&amp;bid=" . ${"{$a}_data"}['id'] . "&amp;p=" . ($k - 1) . "'>" . $k . "</a>";
            if ($k > 8) {
                print "\r\n      ... <a href='board.php?fid=" . $_GET['fid'] . "&amp;bid=" . ${"{$a}_data"}['id'] . "&p=" . floor($thread_rows / 10) . "'>last</a>";
                break;
            }
        }
        print "\r\n      )<br>\r\n      Created by " . ${"{$a}_data"}['starter'] . ",";
        if ($post_rows) {
            print "\r\n      Latest post by " . $post_data['poster'] . " (" . $post_data['date'] . ")<br>";
        } else {
            print "\r\n      Latest post was deleted.<br>";
        }
        if ($GLOBAL['user_info']['user_class'] == "Administrator" || $GLOBAL['user_info']['user_class'] == "Moderator") {
            print "\r\n      <a href=\"http://" . $_SERVER['HTTP_HOST'] . "/Forum/action.php?trash_remove=" . ${"{$a}_data"}['id'] . "&amp;loc=/Forum/forum.php?fid=" . str_replace("&", "¤", $_GET['fid'] . (isset($_GET['f_p']) ? "&amp;f_p=" . $_GET['f_p'] : "")) . "\">send thread to the recycle bin.</a> |\r\n      <a href=\"http://" . $_SERVER['HTTP_HOST'] . "/Forum/f_move.php?bid=" . ${"{$a}_data"}['id'] . "&amp;fid=" . $_GET['fid'] . "\">move thread elsewhere.</a>";
        }
        print "\r\n    </small>\r\n  </div>\r\n</div>";
    }
}
Пример #15
0
    }
}
function island_nofile()
{
    global $file_name;
    global $file_output;
    print "\r\n        <form method='post' name='island_text' action='?nr=" . $_GET['nr'] . "'>\r\n          <textarea name='post_message' cols='70' rows='10'>";
    if ($_GET['change']) {
        print implode("", $file_output);
    }
    print "</textarea>\r\n          <div style='position:relative; left:30px; top:-5px;'>\r\n            <input name='post_submit' type='submit' value='Enter this text' class='searchform'>\r\n          </div>\r\n        </form>";
}
if (isset($_GET['nr'])) {
    include $_SERVER['DOCUMENT_ROOT'] . "/includes/layout.top.php";
    data_fetch("island", "SELECT * FROM `wind_islands` WHERE `id`=" . $_GET['nr'] . " LIMIT 1");
    data_fetch("items", "SELECT `name` FROM `wind_items` WHERE `island`='" . $island_data['coordinates'] . "' ORDER BY `name`");
    $file_name = "islands/" . $island_data['coordinates'] . ".php";
    if ($_POST['post_message']) {
        $file_handle = fopen($file_name, 'w');
        $file_content = "<meta name='Search' content=\"Wind waker: " . $island_data['name'] . " details\"><meta name='File' content='http://www.zshrine.com/Wind/islands.php?nr=" . $_GET['nr'] . "'>" . $str_newline . stripslashes($_POST['post_message']);
        fwrite($file_handle, $file_content);
        fclose($file_handle);
    }
    if (file_exists($file_name)) {
        $file_handle = fopen($file_name, 'r');
        $file_output = file($file_name);
        array_shift($file_output);
        fclose($file_handle);
    }
    ?>
Пример #16
0
These are the current visitors here at Zelda Shrine:<br><br>

<?php 
for ($i = 0; $i < $visitors_mem_rows; $i++, $visitors_mem_data = mysql_fetch_array($visitors_mem_array)) {
    data_fetch("country", "SELECT `country_name` AS `country` FROM `ip_numbers` WHERE `ip_from`<= " . sprintf("%u", ip2long($visitors_mem_data['ip'])) . " AND `ip_to`>= " . sprintf("%u", ip2long($visitors_mem_data['ip'])) . " LIMIT 1");
    print "\r\n  <div class=\"m_list" . ($i % 2 == 0 ? "_l" : "_d") . "\">\r\n    <div class=\"m_content\" style=\"background:url('http://" . $_SERVER['HTTP_HOST'] . "/images/main/Members/" . strtolower($visitors_mem_data['name']) . ".forum.gif') no-repeat top left;\">\r\n      " . $visitors_mem_data['name'] . " is currently online.<br>\r\n      <small><span style='position:relative; left:20px;'>\r\n        This member" . (strlen($country_data['country']) > 2 ? " is located in " . $country_data['country'][0] . strtolower(substr($country_data['country'], 1)) . "." : "'s location is unknown.") . "\r\n      </span></small>\r\n    </div>\r\n  </div>";
}
?>

  <hr />
  There <?php 
print ($visitors_gue_rows > 1 ? "are" : "is") . " also " . $visitors_gue_rows . " guest" . ($visitors_gue_rows > 1 ? "s" : "");
?>
 here at Zelda Shrine.<br />
  Their location<?php 
print $visitors_gue_rows > 1 ? "s are" : " is";
?>
 as follows:<br />
  <span style='position:relative; left:20px;'>

<?php 
for ($i = 0; $i < $visitors_gue_rows; $i++, $visitors_gue_data = mysql_fetch_array($visitors_gue_array)) {
    data_fetch("country", "SELECT `country_name` AS `country` FROM `ip_numbers` WHERE `ip_from`<= " . sprintf("%u", ip2long($visitors_gue_data['ip'])) . " AND `ip_to`>= " . sprintf("%u", ip2long($visitors_gue_data['ip'])) . " LIMIT 1");
    print strlen($country_data['country']) > 2 ? $country_data['country'][0] . strtolower(substr($country_data['country'], 1)) . ", " : "<em>Unknown</em>, ";
}
?>

  </span><br />

<?php 
include $_SERVER['DOCUMENT_ROOT'] . "/includes/layout.bottom.php";
Пример #17
0
      Any member can only have five private discussions at a time.<br>
      These discussions can only host five replies from each part.<br><br>
      You have space left for <?php 
    print 5 - $thread_data['rows'];
    ?>
 new discussions and <?php 
    print 25 - $reply_data['rows'];
    ?>
 total replies.
    </small><br><br>
    <input name="post_mark_all" type="button" onClick="parent.location='<?php 
    print $all_action;
    ?>
'" value="Mark all threads as read" class="submit" />
    <input name="post_mark_submit" type="submit" value="Mark selected threads as read" class="submit" />
  </div>
  <div class="f_title" style="background:url('http://<?php 
    print $_SERVER['HTTP_HOST'];
    ?>
/images/main/main.text.privatediscussions.gif') no-repeat top left;">
  </div>
<?php 
    data_fetch("general", "SELECT * FROM `privatenames` WHERE `starter` REGEXP '" . $_COOKIE['ZeldaShrine'] . "' ORDER BY `date` DESC");
    $general_rows > 0 ? data_print("general") : data_fail();
    print "\r\n\r\n  <div class=\"f_item\">\r\n    <div class=\"f_new_" . (max($general_rows, 1) % 2 == 0 ? "l" : "d") . "\"></div>\r\n    <div class=\"f_check_" . (max($general_rows, 1) % 2 == 0 ? "l" : "d") . "\"></div>\r\n    <div class=\"f_thread\">\r\n      <div class=\"f_top_" . (max($general_rows, 1) % 2 == 0 ? "l" : "d") . "\">\r\n        <a href=\"pr_thread.php\">Start a new discussion with another member.</a>\r\n      </div>\r\n    </div>\r\n  </div>";
    ?>
</div>

<?php 
}
include $_SERVER['DOCUMENT_ROOT'] . "/includes/layout.bottom.php";
Пример #18
0
/images/main/main.go.light2.gif';" onMouseOut="this.src='http://<?php 
    print $_SERVER['HTTP_HOST'];
    ?>
/images/main/main.go.light1.gif';" alt="Go!"><br>
      <span style="position:relative; left:20px;"><small><a href="#" onClick="window.open('../Wind/regexp.php', 'regexp' ,'toolbar=no,directories=no,width=320,height=650')">What is a regular expression?</a></small></span>
    </form>
  </div>
  <div class="a_reply">
<?php 
    data_fetch("thread", "SELECT COUNT(*) AS `rows` FROM `privatenames` WHERE `starter` REGEXP '" . $_COOKIE['ZeldaShrine'] . "'");
    if ($thread_data['rows'] < 5) {
        print "\n  <form id=\"post_reply\" name=\"post_reply\" method=\"post\" action=\"" . $post_action . "\">";
        if ($_GET['regexp'] && $members_rows > 0) {
            print "\n    <select name=\"post_member\">\n      <option value=\"\">---Please select a member from this list---";
            for ($i = 0; $i < $members_rows; $i++, $members_data = mysql_fetch_array($members_array)) {
                data_fetch("disc", "SELECT COUNT(*) AS `rows` FROM `privatenames` WHERE `starter` REGEXP '" . $members_data['name'] . "'");
                if ($members_data['name'] != $_COOKIE['ZeldaShrine'] && $disc_data['rows'] < 5) {
                    print "\n      <option value=\"" . $members_data['name'] . "\"" . ($members_rows == 1 ? " selected" : "") . ">" . $members_data['name'];
                }
            }
            print "\n    </select><br>\n    <small>Remember that members without space left for another discussion will not be shown.</small><br>";
        }
        print "\n    <br>\n    Discussion title:<br>\n    <input type=\"text\" id=\"post_subject\" name=\"post_subject\" size=\"78\"><br><br>\n    Initial message:<br>";
        include "p_reply.php";
        print "\n  </form>";
    } else {
        print "\n  You have currently 5 active discussions. In order to start a new one, please delete one of them.<br>\n  <a href='pr_forum.php'>Click here to go back to the private discussions.</a>";
    }
    ?>
  </div>
</div>
Пример #19
0
    fwrite($file_handle, $file_content);
    fclose($file_handle);
}
?>
<meta name="Search" content="Wind Waker: pieces of heart" />
<br />
Please click on the islands' names in order to see their entry in our island details.<br /><br />
The first eleven pieces of heart are found on the sea floor while the other can be found in chests.
<table cellpadding="0" cellspacing="5" border="0">
  <tr>
    <td style='width:20px;'>&nbsp;</td>
    <td style='padding-right:20px; text-align:right; background-color:#000000;'><img src="http://<?php 
print $_SERVER['HTTP_HOST'];
?>
/Wind/items/pieceofheart.gif" /></td>
  </tr>

<?php 
for ($i = 0; $i < $treasure_rows; $i++, $treasure_data = mysql_fetch_array($treasure_array)) {
    $file_name = "hearts/piece" . $treasure_data['id'] . ".php";
    data_fetch("island", "SELECT * FROM `wind_islands` WHERE `coordinates`='" . $treasure_data['island'] . "' LIMIT 1");
    print "\r\n  <tr>\r\n    <td rowspan='2' style='width:20px;'>&nbsp;</td>\r\n    <td style='width:500px;'>" . $treasure_data['name'] . " (" . ($island_rows > 0 ? "<a href='http://" . $_SERVER['HTTP_HOST'] . "/Wind/islands.php?nr=" . $island_data['id'] . "' class='dark'>" . $island_data['name'] . "</a>" : $treasure_data['island']) . ")</td>\r\n  </tr>\r\n  <tr>\r\n    <td style='width:500px; padding-left:30px; padding-bottom:10px;'>";
    !is_file($file_name) || $_GET['nr'] == $treasure_data['id'] && $_GET['change'] ? treasure_nofile($treasure_data['id']) : treasure_file($treasure_data['id']);
    print "\r\n    </td>\r\n  </tr>";
}
?>

</table>

<?php 
include $_SERVER['DOCUMENT_ROOT'] . "/includes/layout.bottom.php";
Пример #20
0
</div>
<table cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td style="width:320px; height:245px; vertical-align:middle; text-align:center;" class="subrosian">
<?php 
    print "\n      <img src=\"http://" . $image_dir . "bigthumbs/" . md5($image_data['file']) . ".jpg\" style=\"border:#000000 1px solid;\" /><br />";
    ?>
      <a href="javascript:void(0);" <?php 
    print "onClick=\"window.open('art.popup.php?game=" . $_GET['game'] . "&source=" . $image_data['id'] . "','image','toolbar=no,directories=no,width=" . ($image_properties[0] + 20) . ",height=" . ($image_properties[1] + 44) . "');\"";
    ?>
>Display this image in a new window by clicking here.</a>
    </td>
    <td colspan="2" style="width:280px; padding:10px; vertical-align:top;">
      <table cellpadding="0" cellspacing="0" border="0">
<?php 
    data_fetch("archive", "SELECT `id`,`file`,`name` FROM `art_official` WHERE `game`='" . $_GET['game'] . "' ORDER BY `id` ASC");
    for ($i = 0; $i < $archive_rows; $i++, $archive_data = mysql_fetch_array($archive_array)) {
        print round($i / 4) == $i / 4 ? ($i > 0 ? "</tr>" : "") . "\n        <tr>\n          <td style=\"width:68px; height:68px; text-align:center; vertical-align:center;\">\n            <a href=\"?nr=" . $archive_data['id'] . "&game=" . $_GET['game'] . "\">\n              <img src=\"http://" . $image_dir . "thumbs/" . md5($archive_data['file']) . ".jpg\" alt=\"" . $archive_data['name'] . "\" border='0' /></a></td>" : "\n          <td style=\"width:68px; height:68px; text-align:center; vertical-align:center;\">\n            <a href=\"?nr=" . $archive_data['id'] . "&game=" . $_GET['game'] . "\">\n              <img src=\"http://" . $image_dir . "thumbs/" . md5($archive_data['file']) . ".jpg\" alt=\"" . $archive_data['name'] . "\" border='0' /></a></td>";
    }
    ?>
      </table>&nbsp;
    </td>
  </tr>
  <tr>
    <td style="width:320px; padding:10px;">
<?php 
    print "\n      <div style=\"position:relative; left:20px;\">\n        <big>" . $image_data['name'] . "</big>\n      </div>\n      " . ($GLOBAL['user_info']['user_class'] == "Administrator" ? "<a href=\"art.action.php?remove=" . $image_data['id'] . "&game=" . $_GET['game'] . "\">Remove this image from the gallery.</a><br /><small><em>Warning: This action can not be undone!</em></small><br />" : "") . "<br />\n      " . $image_data['description'];
    ?>
    </td>
  </tr>
</table>
Пример #21
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . "/includes/layout.top.php";
if ($user_data['class'] != "Administrator" && $user_data['class'] != "Moderator") {
    exit;
}
function poll_sort($text)
{
    return $text != '';
}
data_fetch("poll", "SELECT * FROM `poll`");
?>
<meta name="Search" content="Administration: Change poll" />

<?php 
print "\r\n<br><center>\r\n  <a href='http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?change=1'>Change the current poll</a> | <a href='http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "'>Post a new poll</a>\r\n<br>\r\n<form method='post' action='main.actions.php?poll_change=1&amp;" . ($_GET['change'] ? "changed=1&amp;" : "") . "loc=" . str_replace("&", "¤", $_SERVER['REQUEST_URI']) . "' name='poll_change'>  \r\n  <textarea name='poll_main' cols='80' rows='10'>";
if ($_GET['change']) {
    mysql_data_seek($poll_array, 0);
    $poll_data = mysql_fetch_array($poll_array);
    for ($i = 0; $i <= $poll_rows; $i++, $poll_data = mysql_fetch_array($poll_array)) {
        print $poll_data['id'] > 1 ? $GLOBAL['browse_info']['str_newline'] . $poll_data['text'] . "[" . $poll_data['voters'] . "]" : $poll_data['text'];
    }
}
print "</textarea><br>\r\n  <div style='position:relative; top:-5px;'>\r\n    <input type='button' onClick=\"document.poll_change.submit(); this.disabled = 'true';\" value='Change the poll' class='submit' />\r\n  </div>\r\n</form>\r\n</center>";
include $_SERVER['DOCUMENT_ROOT'] . "/includes/layout.bottom.php";
Пример #22
0
     foreach ($GLOBAL['user_info']['subrosian']['attention'] as $loop_key => $loop_content) {
         $GLOBAL['user_info']['subrosian']['attention'][$loop_key] = round(1 / count($GLOBAL['user_info']['subrosian']['attention']), 2);
     }
     $subrosian_extra['water'] = explode(":", $current_data['water']);
     $subrosian_extra['water'][count($subrosian_extra['water'])] = 0;
     $subrosian_extra['food'] = explode(":", $current_data['food']);
     $subrosian_extra['food'][count($subrosian_extra['food'])] = 0;
     $subrosian_extra['attention'] = explode(":", $current_data['attention']);
     $subrosian_extra['attention'][count($subrosian_extra['attention'])] = 0;
     mysql_query("UPDATE `subrosian_main` SET `name`='" . implode(":", $GLOBAL['user_info']['subrosian']['name']) . "',`color`='" . implode(":", $GLOBAL['user_info']['subrosian']['color']) . "',`water`='" . implode(":", $GLOBAL['user_info']['subrosian']['water']) . "',`food`='" . implode(":", $GLOBAL['user_info']['subrosian']['food']) . "',`attention`='" . implode(":", $GLOBAL['user_info']['subrosian']['attention']) . "' WHERE `id`=" . $GLOBAL['user_info']['user_id'] . " LIMIT 1") or die("Fel 1");
     mysql_query("UPDATE `subrosian_date` SET `water`='" . implode(":", $subrosian_extra['water']) . "',`food`='" . implode(":", $subrosian_extra['food']) . "',`attention`='" . implode(":", $subrosian_extra['attention']) . "' WHERE `id`=" . $GLOBAL['user_info']['user_id'] . " LIMIT 1") or die("Fel 2");
     mysql_query("DELETE FROM `subrosian_adoption` WHERE `id`=" . $_GET['id'] . " LIMIT 1") or die("Fel 3");
 }
 // Bury subrosian
 if (isset($_GET['bureal'])) {
     data_fetch("current", "SELECT * FROM `subrosian_date` WHERE `id`=" . $GLOBAL['user_info']['user_id'] . " LIMIT 1");
     mysql_query("INSERT INTO `subrosian_dead` (`name`,`owner`,`death`) VALUES ('" . $GLOBAL['user_info']['subrosian']['name'][$_GET['bureal']] . "','" . $GLOBAL['user_info']['user_name'] . "',CURDATE())");
     unset($GLOBAL['user_info']['subrosian']['name'][$_GET['bureal']]);
     unset($GLOBAL['user_info']['subrosian']['color'][$_GET['bureal']]);
     unset($GLOBAL['user_info']['subrosian']['water'][$_GET['bureal']]);
     unset($GLOBAL['user_info']['subrosian']['food'][$_GET['bureal']]);
     foreach ($GLOBAL['user_info']['subrosian']['attention'] as $loop_key => $loop_content) {
         $GLOBAL['user_info']['subrosian']['attention'][$loop_key] = 1 / (count($GLOBAL['user_info']['subrosian']['attention']) - 1);
     }
     unset($GLOBAL['user_info']['subrosian']['attention'][$_GET['bureal']]);
     $subrosian_extra['water'] = explode(":", $current_data['water']);
     unset($subrosian_extra['water'][$_GET['bureal']]);
     $subrosian_extra['food'] = explode(":", $current_data['food']);
     unset($subrosian_extra['food'][$_GET['bureal']]);
     $subrosian_extra['attention'] = explode(":", $current_data['attention']);
     unset($subrosian_extra['attention'][$_GET['bureal']]);
Пример #23
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . "/includes/layout.top.php";
data_fetch("subrosian", "SELECT * FROM `subrosian_adoption`");
?>
<meta name="Search" content="Membership: Subrosian adoption" />
These are the subrosians that have been left at the adoption agency.<br />
Any of these would require a home and a caring member to thrive.<br /><br />
<?php 
for ($i = 0; $i < $subrosian_rows; $i++, $subrosian_data = mysql_fetch_array($subrosian_array)) {
    print "\r\n  <div class=\"m_list" . ($i % 2 == 0 ? "_l" : "_d") . "\">\r\n    <div class=\"m_content\" style=\"background:url('http://" . $_SERVER['HTTP_HOST'] . "/images/main/Members/generic." . strtolower($subrosian_data['color']) . ".forum.gif') no-repeat top left;\">\r\n      This subrosian's name is " . $subrosian_data['name'] . ".<br><br>\r\n      <img src=\"http://" . $_SERVER['HTTP_HOST'] . "/images/main/Items/subrosian.property.php?length=" . $subrosian_data['water'] . "\" alt=\"Water\"><br>\r\n      <img src=\"http://" . $_SERVER['HTTP_HOST'] . "/images/main/Items/subrosian.property.php?length=" . $subrosian_data['food'] . "\" alt=\"Food\"><br>\r\n        " . (count($GLOBAL['user_info']['subrosian']['color']) < 4 ? "\r\n        <input type='button' value='Adopt this subrosian' onClick=\"parent.location='http://" . $_SERVER['HTTP_HOST'] . "/Members/Subrosians/actions.php?adopt=1&id=" . $subrosian_data['id'] . "&loc=" . $_SERVER['REQUEST_URI'] . "'\" />" : "\r\n        You can not adopt any more subrosians.") . "\r\n    </div>\r\n  </div>";
    if (0) {
        print "\r\n<fieldset>\r\n  <legend><small>Abandoned subrosian #" . $subrosian_data['id'] . "</small></legend>\r\n  <table cellpadding='0' cellspacing='0' border='0'>\r\n    <tr>\r\n      <td style='width:400px; vertical-align:top; padding:5px; border-bottom: #000000 1px solid;'>\r\n        <big>This subrosian's name is " . $subrosian_data['name'] . ".</big><br /><br />\r\n        Water: <span style='background-color:#" . floor(99 - 50 * $subrosian_data['water']) . floor(44 + 50 * $subrosian_data['water']) . "44; border:#666666 1px solid; font-size:1px;'>\r\n          <img src=\"http://" . $_SERVER['HTTP_HOST'] . "/protection.gif\" style='width:" . $subrosian_data['water'] * 200 . "px; height:4px;'>\r\n        </span><br />\r\n        Food: <span style='background-color:#" . floor(99 - 50 * $subrosian_data['food']) . floor(44 + 50 * $subrosian_data['food']) . "44; border:#666666 1px solid; font-size:1px;'>\r\n          <img src=\"http://" . $_SERVER['HTTP_HOST'] . "/protection.gif\" style='width:" . $subrosian_data['food'] * 200 . "px; height:4px;'>\r\n        </span><br /><br />" . (count($GLOBAL['user_info']['subrosian']['color']) < 4 ? "\r\n        <input type='button' value='Adopt this subrosian' onClick=\"parent.location='http://" . $_SERVER['HTTP_HOST'] . "/Members/Subrosians/actions.php?adopt=1&id=" . $subrosian_data['id'] . "&loc=" . $_SERVER['REQUEST_URI'] . "'\" class='submit' />" : "\r\n        You can not adopt any more subrosians.") . "\r\n      </td>\r\n      <td style='width:190px; vertical-align:top; border-bottom: #000000 1px solid;'><img src=\"http://" . $_SERVER['HTTP_HOST'] . "/images/main/Members/generic." . strtolower($subrosian_data['color']) . ".forum.gif\" /></td>\r\n    </tr>\r\n  </table>\r\n</fieldset>";
    }
}
?>

<?php 
include $_SERVER['DOCUMENT_ROOT'] . "/includes/layout.bottom.php";
Пример #24
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . "/includes/db.connect.php";
include $_SERVER['DOCUMENT_ROOT'] . "/includes/db.fetch.php";
data_fetch("high", "SELECT DISTINCT `name`,`score` FROM `game_invaders` ORDER BY `score` DESC LIMIT 100");
?>
<html>
<head>
<title>Zelda Shrine</title>
<meta name="Search" content="Swordtraining highscore">
<link rel="stylesheet" href="http://<?php 
print $_SERVER['HTTP_HOST'];
?>
/includes/style.main.php" type="text/css">
</head>
<body style="text-align:center; padding:50px;">
<div style="width:400px; height:500px; padding:10px; border:#000000 1px solid;" class="dark">
  <a href="games.invaders.php" class="dark">Play again</a> || <a href="#" onClick="window.close();" class="dark">Close window</a><br><br>
  <table cellspacing="0" cellpadding="0" border="0">
    <tr>
      <th colspan="3">Top 100 scores</th>
    </tr>
<?php 
for ($i = 1; $i <= $high_rows; $i++, $high_data = mysql_fetch_array($high_array)) {
    print "\r\n    <tr>\r\n      <td width=\"40\" style=\"padding-left:5px;\">" . $i . "</td>\r\n      <td width=\"100\" style=\"padding-left:5px;\">" . $high_data['score'] . "</td>\r\n      <td width=\"240\" style=\"padding-left:5px;\">" . $high_data['name'] . "</td>\r\n    </tr>";
}
?>
  </table>
</div>
</body>
</html>
Пример #25
0
         $file_number = 1;
     }
     $file_content_array_top = array($str_newline . "<!-- " . $file_number . "-start -->" . $str_newline, "<tr>" . $str_newline, "<td>" . $str_newline, "<div align='right'><big>" . $_POST['text_headline'] . "</big></div>" . $str_newline . nl2br($_POST['post_message']) . $str_newline . "<br><br>" . $str_newline, "<!--Admin-start--><small><a href='walk.part.php?nr=" . $_GET['nr'] . "&at=" . $file_number . "#form'>Alter this part</a> || <a href='walk.action.php?nr=" . $_GET['nr'] . "&file_delete=" . $file_number . "'>Delete this part</a></small><!--Admin-end-->" . $str_newline, "</td>" . $str_newline, "<td width='150' align='center' style='border-top:1px #000000 solid; padding-top:10px;'>" . $str_newline);
     $file_content_array_middle = array();
     for ($i = 0; $i < 4; $i++) {
         $file_content_array_middle[] = ${"image{$i}_rows"} > 0 ? "<a href='javascript:' onClick=\"window.open('http://" . $_SERVER['HTTP_HOST'] . "/images/image.popup.php?source=" . ${"image{$i}_data"}['id'] . "','image','toolbar=no,directories=no,width=" . (${"image{$i}_info"}[0] + 20) . ",height=" . (${"image{$i}_info"}[1] + 44) . "');\"><img src='http://" . $_SERVER['HTTP_HOST'] . "/images/" . $walk_game . "/thumbs/" . ${"image{$i}_data"}['md5'] . ".jpg' style='border: 1px #000000 solid;'><br>" . (count($picture_md5) > 1 ? "<small>Screenshot #" . ($i + 1) . "</small>" : $_POST['text_headline']) . "</a><br><br>" . $str_newline : (count($picture_md5) < 1 && $i == 0 ? $str_newline . "&nbsp;" : $str_newline);
     }
     $file_content_array_bottom = array("</td>" . $str_newline, "</tr>" . $str_newline, "<!-- " . $file_number . "-end -->" . $str_newline);
     $file_content = implode("", array_merge($file_content_array_top, $file_content_array_middle, $file_content_array_bottom));
     if (file_exists($file_name)) {
         $file_output[0] = $file_output[0] + 1 . $str_newline;
         $file_handle = fopen($file_name, 'w');
         fwrite($file_handle, implode("", $file_output));
         fclose($file_handle);
     } else {
         data_fetch("walk", "SELECT `title` FROM `" . strtolower($walk_game) . "_walk` WHERE `id`=" . $_GET['nr']);
         $file_content = "1" . $str_newline . "<meta name='Search' content=\"" . $walk_game_name . ": " . $walk_data['title'] . "\"><meta name='File' content='http://www.zshrine.com/" . $walk_game . "/walk.part.php?nr=" . $_GET['nr'] . "'>" . $str_newline . $file_content;
     }
     $file_handle = fopen($file_name, 'a');
     fwrite($file_handle, stripslashes($file_content));
     header("Location:http://" . $_SERVER['HTTP_HOST'] . "/" . $walk_game . "/walk.part.php?nr=" . $_GET['nr']);
     exit;
 }
 if ($_GET['file_delete']) {
     $file_output = file($file_name);
     $search_start = array_search("<!-- " . $_GET['file_delete'] . "-start -->" . $str_newline, $file_output) - 1;
     $search_end = array_search("<!-- " . $_GET['file_delete'] . "-end -->" . $str_newline, $file_output);
     $search_length = $search_end - $search_start + 1;
     array_splice($file_output, $search_start, $search_length);
     $file_handle = fopen($file_name, 'w');
     fwrite($file_handle, implode("", $file_output));
Пример #26
0
<?php

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
include $_SERVER['DOCUMENT_ROOT'] . "/includes/db.connect.php";
include $_SERVER['DOCUMENT_ROOT'] . "/includes/db.fetch.php";
include $_SERVER['DOCUMENT_ROOT'] . "/includes/values.main.php";
$_GET['name'] = "loc." . $_GET['id'] . "." . $_GET['number'] . ".jpg";
data_fetch("image", "SELECT `name` FROM `twilight_locations` WHERE `id`=" . $_GET['id']);
$image_game_info = getimagesize($_SERVER['DOCUMENT_ROOT'] . "/Twilight/maps/" . $_GET['name']);
?>

<html>
<head>
<script language=JavaScript>
if(! window.opener){
  window.location='http://<?php 
print $_SERVER['HTTP_HOST'];
?>
/404error.php';
}
var message="";
function clickIE() {
  if (document.all) {
    (message);
    return false;
  }
}
function clickNS(e) {
    print $_SERVER['HTTP_HOST'];
    ?>
/images/main/Tattoos/main.preview.gif">
      </td>
      <td style="width:500px;">
        <form id="tattoo_form" name="tattoo_form" method="post" action="http://<?php 
    print $_SERVER['HTTP_HOST'];
    ?>
/Members/admin/image.action.tattoo.php?step=2&amp;id=<?php 
    print $_GET['id'];
    ?>
">
          <fieldset>
            <legend>Refine your subrosian</legend>
<?php 
    data_fetch("image", "SELECT * FROM `subrosian_tattoos` WHERE `id`=" . $_GET['id']);
    print "\r\n            position (x/y): <input id=\"tattoo_x\" name=\"tattoo_x\" type=\"text\" size=\"4\" value=\"" . $image_data['x'] . "\">\r\n            <input id=\"tattoo_y\" name=\"tattoo_y\" type=\"text\" size=\"4\" value=\"" . $image_data['y'] . "\"><br>\r\n            scale (%): <input id=\"tattoo_scale\" name=\"tattoo_scale\" type=\"text\" size=\"4\" value=\"" . $image_data['scale'] . "\"><br>\r\n            rotation (CCW): <input id=\"tattoo_rotation\" name=\"tattoo_rotation\" type=\"text\" size=\"4\" value=\"" . $image_data['rotation'] . "\"><br>\r\n            strength (%): <input id=\"tattoo_strength\" name=\"tattoo_strength\" type=\"text\" size=\"4\" value=\"" . $image_data['strength'] . "\"><br><br>";
    ?>
            <img class="s_go_dark" src="http://<?php 
    print $_SERVER['HTTP_HOST'];
    ?>
/images/main/main.go.light1.gif" onClick="tattoo_form.submit();" onMouseOver="this.src='http://<?php 
    print $_SERVER['HTTP_HOST'];
    ?>
/images/main/main.go.light2.gif';" onMouseOut="this.src='http://<?php 
    print $_SERVER['HTTP_HOST'];
    ?>
/images/main/main.go.light1.gif';" alt="Go!">
          </fieldset>
        </form>
      </td>
Пример #28
0
            your favorite after the operation, you must first use a standard colour for this pet.<br />
            You can preview the changes as many times as you want without losing the knife. However, once
            the subrosian has undergone the surgery, it will become dull and you must buy a new one.
          </small>
        </div>
      </fieldset>
    </td>
  </tr>
  <tr>

<?php 
if ($GLOBAL['subrosian']['inventory']['10'] == 0) {
    print "\r\n    <td colspan=\"2\" style=\"padding:10px;\">\r\n      <big>In order to change your subrosian, you must first buy yourself a knife in the shop.</big>\r\n    </td>";
} else {
    print "\r\n    <td class='subrosian' style='vertical-align:top; width:160px; padding-top:30px;'>\r\n    " . (is_file($_SERVER['DOCUMENT_ROOT'] . $image_full) ? "<img src=\"http://" . $_SERVER['HTTP_HOST'] . $image_full . "\" />" : "<img src=\"http://" . $_SERVER['HTTP_HOST'] . "/images/main/Members/generic.white.large.gif\" />") . "<br />\r\n    </td>\r\n    <td style='width:480px; height:300px; padding-left:5px; text-align:center;'>\r\n      <fieldset>\r\n        <form name=\"subrosian_custom\" method=\"post\" action=\"actions.custom.php?customize=1\">\r\n          <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n            <tr>\r\n              <td colspan=\"4\">\r\n                <small>\r\n                  Specify the colors below in amounts between 0 and 255 where 255 is the maximum amount.\r\n                </small>\r\n              </td>\r\n            </tr>\r\n            <tr>\r\n              <td>&nbsp;</td>\r\n              <td style=\"text-align:center;\"><img src=\"http://" . $_SERVER['HTTP_HOST'] . "/images/main/Items/bottle_red.gif\" alt=\"Red color\" /></td>\r\n              <td style=\"text-align:center;\"><img src=\"http://" . $_SERVER['HTTP_HOST'] . "/images/main/Items/bottle_green.gif\" alt=\"Green color\" /></td>\r\n              <td style=\"text-align:center;\"><img src=\"http://" . $_SERVER['HTTP_HOST'] . "/images/main/Items/bottle_blue.gif\" alt=\"Blue color\" /></td>\r\n            </tr>\r\n            <tr>\r\n              <td>The color of the <em>fur</em>:</td>\r\n              <td style=\"text-align:center;\"><input name=\"color_fur[]\" type=\"text\" size=\"4\" maxlength=\"3\" value=\"" . (isset($_GET['f']) ? $_GET['f'][0] : "0") . "\" style=\"text-align:center;\" /></td>\r\n              <td style=\"text-align:center;\"><input name=\"color_fur[]\" type=\"text\" size=\"4\" maxlength=\"3\" value=\"" . (isset($_GET['f']) ? $_GET['f'][1] : "0") . "\" style=\"text-align:center;\" /></td>\r\n              <td style=\"text-align:center;\"><input name=\"color_fur[]\" type=\"text\" size=\"4\" maxlength=\"3\" value=\"" . (isset($_GET['f']) ? $_GET['f'][2] : "0") . "\" style=\"text-align:center;\" /></td>\r\n            </tr>\r\n            <tr>\r\n              <td colspan=\"4\" style=\"padding-top:10px;\">\r\n                <small>\r\n                  Select any number of tattoos to imprint on your subrosian.\r\n                </small>\r\n              </td>\r\n            </tr>";
    data_fetch("tattoo", "SELECT * FROM `subrosian_tattoos` WHERE `ready`= 1 AND (`limit`='all' OR `limit`='" . $_COOKIE['ZeldaShrine'] . "')");
    for ($i = 0; $i < ceil($tattoo_rows / 4); $i++) {
        print "\r\n            <tr>";
        for ($j = 0; $j < min(4, $tattoo_rows - $i * 4); $j++, $tattoo_data = mysql_fetch_array($tattoo_array)) {
            print "\r\n              <td style=\"text-align:center; padding-top:10px;\">\r\n                <img src=\"http://" . $_SERVER['HTTP_HOST'] . "/images/main/Tattoos/preview" . $tattoo_data['id'] . ".gif\" alt=\"Tattoo nr " . $tattoo_data['id'] . "\"><br>\r\n                <input id=\"tattoo[]\" name=\"tattoo[]\" type=\"checkbox\" value=\"" . $tattoo_data['id'] . "\" class=\"radio\">\r\n              </td>";
        }
        while ($j < 4) {
            $j++;
            print "\r\n              <td></td>";
        }
        print "\r\n            </tr>";
    }
    print "\r\n            <tr>\r\n              <td colspan=\"4\" style=\"text-align:center;\"><br><br><input type=\"submit\" value=\"Preview this subrosian\"></td>\r\n            </tr>\r\n            <tr>\r\n              <td colspan=\"4\" style=\"padding-top:30px; text-align:center;\">\r\n                <input type=\"button\" onClick=\"this.disabled = 'true'; parent.location='http://" . $_SERVER['HTTP_HOST'] . "/Members/Subrosians/actions.custom.php?finalize=1';\" value=\"Finalize the subrosian and perform the surgery\"" . (is_file($_SERVER['DOCUMENT_ROOT'] . $image_full) ? "" : " disabled") . " />\r\n              </td>\r\n            </tr>\r\n          </table>\r\n        </form>\r\n      </fieldset>\r\n    </td>";
}
?>
Пример #29
0
// Reconstruct all thumbnails for a game
if ($_GET['action'] == 5) {
    data_fetch("image", "SELECT * FROM `screenshots` WHERE `game`='" . $_GET['game'] . "' ORDER BY `id`");
    for ($i = 0; $i < $image_rows; $i++, $image_data = mysql_fetch_array($image_array)) {
        if (is_file($image_data['game'] . "/thumbs/" . $image_data['md5'] . ".jpg")) {
            $image_path = $_SERVER['DOCUMENT_ROOT'] . "/images/" . $_GET['game'] . "/" . $image_data['name'];
            $thumb_path = $_SERVER['DOCUMENT_ROOT'] . "/images/" . $_GET['game'] . "/thumbs/" . $image_data['md5'] . ".jpg";
            unlink($thumb_path);
            $upload_fileinfo = getimagesize($image_path);
            $image_src = $upload_fileinfo[2] == 2 ? imagecreatefromjpeg($image_path) : imagecreatefrompng($image_path);
            $image_dest = $upload_fileinfo[0] > $upload_fileinfo[1] ? imagecreatetruecolor(100, $upload_fileinfo[1] / $upload_fileinfo[0] * 100) : imagecreatetruecolor($upload_fileinfo[0] / $upload_fileinfo[1] * 100, 100);
            $upload_fileinfo[0] > $upload_fileinfo[1] ? imagecopyresampled($image_dest, $image_src, 0, 0, 0, 0, 100, $upload_fileinfo[1] / $upload_fileinfo[0] * 100, $upload_fileinfo[0], $upload_fileinfo[1]) : imagecopyresampled($image_dest, $image_src, 0, 0, 0, 0, $upload_fileinfo[0] / $upload_fileinfo[1] * 100, 100, $upload_fileinfo[0], $upload_fileinfo[1]);
            imagejpeg($image_dest, $thumb_path, 45);
            imagedestroy($image_src);
            imagedestroy($image_dest);
        }
    }
    header("Location: http://" . $_SERVER['HTTP_HOST'] . "/images/image.browse.php");
    exit;
}
// Remove a screenshot from the main archive
if ($_GET['action'] == 6) {
    data_fetch("image", "SELECT * FROM `screenshots` WHERE `id`=" . $_GET['id'] . " LIMIT 1");
    $image_path = $_SERVER['DOCUMENT_ROOT'] . "/images/" . $image_data['game'] . "/" . $image_data['name'];
    $thumb_path = $_SERVER['DOCUMENT_ROOT'] . "/images/" . $image_data['game'] . "/thumbs/" . $image_data['md5'] . ".jpg";
    if (is_file($image_path) && is_file($thumb_path)) {
        unlink($thumb_path);
    }
    header("Location: http://" . $_SERVER['HTTP_HOST'] . "/images/image.browse.php");
    exit;
}
Пример #30
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . "/includes/db.connect.php";
include $_SERVER['DOCUMENT_ROOT'] . "/includes/db.fetch.php";
include $_SERVER['DOCUMENT_ROOT'] . "/includes/values.main.php";
include $_SERVER['DOCUMENT_ROOT'] . "/includes/values.subrosian.php";
include $_SERVER['DOCUMENT_ROOT'] . "/includes/menu.functions.php";
include $_SERVER['DOCUMENT_ROOT'] . "/includes/subrosian.functions.php";
$style_link = array("/index.php" => "/includes/style.p.main.php", ".Forum." => "/includes/style.p.forum.gen.php", "/Forum/forum.php" => "/includes/style.p.forum.php", "/Forum/board.php" => "/includes/style.p.board.php", "/Forum/pr_board.php" => "/includes/style.p.board.php", ".Games." => "/includes/style.p.forum.gen.php", ".images." => "/includes/style.p.images.gen.php", "/Members/index.php" => "/includes/style.p.member.php", "/Members/main.list.php" => "/includes/style.p.list.php", "/Members/main.online.php" => "/includes/style.p.list.php", ".Members.admin." => "/includes/style.p.forum.gen.php", "/Members/Subrosians/index.php" => "/includes/style.p.sub.m.php", "/Members/Subrosians/adoption.php" => "/includes/style.p.list.php", ".search." => "/includes/style.p.forum.gen.php");
if (isset($_COOKIE['ZeldaShrine'])) {
    subrosian_decay();
    data_fetch("ip", "SELECT `ip` FROM `user_data` WHERE `id`=" . $GLOBAL['user_info']['user_id'] . " LIMIT 1");
    $ip_data['ip'] == $_SERVER['REMOTE_ADDR'] || strlen($ip_data['ip']) < 1 || 1 ? mysql_query("UPDATE `user_data` SET `logon`=CURDATE(), `ip`='" . $_SERVER['REMOTE_ADDR'] . "' WHERE `id`=" . $GLOBAL['user_info']['user_id'] . " LIMIT 1") : mysql_query("UPDATE `user_data` SET `logon`=CURDATE(), `ip`='N/A' WHERE `id`=" . $GLOBAL['user_info']['user_id'] . " LIMIT 1");
}
mysql_query("DELETE FROM `user_online` WHERE UNIX_TIMESTAMP()-`time`>500");
data_fetch("user_online", "SELECT `id` FROM `user_online` WHERE `ip`='" . $_SERVER['REMOTE_ADDR'] . "'");
if (!$user_online_data['id']) {
    mysql_query("INSERT INTO `user_online` (`ip`,`name`,`time`) VALUES ('" . $_SERVER['REMOTE_ADDR'] . "','" . (isset($_COOKIE['ZeldaShrine']) ? $_COOKIE['ZeldaShrine'] : "N/A") . "',UNIX_TIMESTAMP())");
} else {
    mysql_query("UPDATE `user_online` SET `name`='" . (isset($_COOKIE['ZeldaShrine']) ? $_COOKIE['ZeldaShrine'] : "N/A") . "',`time`=UNIX_TIMESTAMP() WHERE `id`=" . $user_online_data['id']);
}
if ($GLOBAL['user_info']['user_class'] == "Banned") {
    header("Location: http://" . $_SERVER['HTTP_HOST'] . "/main.banned.php");
    exit;
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>Zelda Shrine - <?php