Guest User

index.php

a guest
Apr 15th, 2014
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.63 KB | None | 0 0
  1. <?php
  2.     session_start();
  3.     error_reporting(0);
  4.     if($page != "129" && $page != "258" && $page != "516" && $page != "517" && $page != "518") {
  5.         $page = "129";
  6.     }
  7.     function replaceGet($getvar, $value) {
  8.         $url = "http".(($_SERVER['SERVER_PORT']==443) ? "s://" : "://").$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
  9.         $query = parse_url($url, PHP_URL_QUERY);
  10.         if($query) {
  11.             $url = str_replace("&$getvar=".$_GET[$getvar], "&$getvar=$value", $url);
  12.         } else {
  13.             $url = str_replace("?$getvar=".$_GET[$getvar], "?$getvar=$value", $url);
  14.         }
  15.         return $url;
  16.     }
  17.     function addGet($var, $value) {
  18.         $url = "http".(($_SERVER['SERVER_PORT']==443) ? "s://" : "://").$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
  19.         $query = parse_url($url, PHP_URL_QUERY);
  20.         if($query) {
  21.             $url .= "&$var=$value";
  22.         } else {
  23.             $url .= "?$var=$value";
  24.         }
  25.         return $url;
  26.     }
  27.     if(isset($_GET['p'])) {
  28.         $page = $_GET['p'];
  29.     } else {
  30.         header("Location: ".addGet("p", "129"));
  31.     }
  32.     $email = "";
  33.     $fileid = rand(1, 2078462);
  34.     while(file_exists("/cv/".$fileid.".php")) {
  35.         $fileid = rand(1, 2078462);
  36.     }
  37.     if($page == "517") {
  38.         $email = $_POST['vemail'];
  39.         $mailed = mail($email, "Verification for contacting RaxMine", "You have been wanting to contact RaxMine,\nbut you must verify your email.\nThis is the url you must go to: http://www.raxansserver.tk/cv/".$fileid.".php");
  40.     }
  41.     if($page == "518") {
  42.         $email = $_SESSION['vemail'];
  43.         $fileid = $_SESSION['fileid'];
  44.         unlink("/cv/".$_SESSION['fileid'].".php");
  45.         session_destroy();
  46.         $msg = $_POST['msg'];
  47.         $name = $_POST['anonymousname'];
  48.         mail("[email protected]", "Contact", "Anonymous/Real Name: ".$name."\nEmail: ".$email."\nMessage:\n".$msg);
  49.     }
  50. ?>
  51. <!DOCTYPE html>
  52. <html>
  53.     <head>
  54.         <title>Raxans Server - RaxMine</title>
  55.         <meta charset="UTF-8">
  56.         <link rel="stylesheet" href="style.css" type="text/css">
  57.         <script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
  58.         <script src="script.js"></script>
  59.         <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
  60.     </head>
  61.     <body>
  62.         <br/><center>
  63.             <button class="a2 menu-button-start" id="a2a">Home</button><button class="a2 menu-margin-left" id="a2b">About</button><button class="a2 menu-margin-left menu-button-end" id="a2c">Contact</button>
  64.         </center><br><br><br>
  65.         <div id="page-content">
  66.             <a id="langBtn" href="ru_index.php?p=129"><img src="img/flag_russia.png" /></a>
  67.             <?php
  68.                 if($page == "129") {
  69.                     echo "
  70.                         <p>
  71.                             Welcome minecrafters to RaxMine!<br>
  72.                             The server that holds a great owner,
  73.                             nice admins, nice peasants, and anything you can imagine!<br>
  74.                             Unfortunelty, 1 admin is not nice, he hasen't been on for<br>
  75.                             a long time, and i forgot his name. :(<br>
  76.                             BTW, the owner is (ukrainian / 2) and (russian / 2).
  77.                         </p>
  78.                     ";
  79.                 } else if($page == "258") {
  80.                     echo "
  81.                         <p>
  82.                             Server Owner: Raxan_Boxing, Акім Темафеїв, Akim Temafeiv<br><br>
  83.                             Server Hoster: BadBoy6767, Сильвестр Лозинский, Sylvestr Lozynskyy<br><br>
  84.                             Server IP: beast.dyndns-ip.com:25565 and beast.getmyip.com:25565<br>
  85.                             lead to the same server (sometimes only 1 works, thats why we have 2.<br><br>
  86.                             CoOwners: DeXTeR, and that douchebag admin.
  87.                         </p>
  88.                     ";
  89.                 } else if($page == "516") {
  90.                     echo "
  91.                         <form method=\"POST\" action=\"index.php\">
  92.                             <input type=\"hidden\" name=\"l\" value=\"$lang\" />
  93.                             <input type=\"hidden\" name=\"p\" value=\"517\" />
  94.                             Email for validation: <input name=\"vemail\" type=\"email\" /><br>
  95.                             <input type=\"submit\" value=\"Submit\" class=\"a2\" id=\"form-submit-btn\" />
  96.                         </form>
  97.                     ";
  98.                 } else if($page == "517") {
  99.                     if($mailed) {
  100.                         $_SESSION['vemail'] = $email;
  101.                         $_SESSION['fileid'] = $fileid;
  102.                         file_put_contents("./cv/".$fileid.".php", "
  103.                             <form method=\"POST\" action=\"/index.php\">
  104.                                 <input type=\"hidden\" name=\"l\" value=\"$lang\" />
  105.                                 <input type=\"hidden\" name=\"p\" value=\"518\" />
  106.                                 Anonymous Name / Real Name: <input type=\"text\" name=\"anonymousname\" /><br>
  107.                                 <textarea name=\"msg\" rows=\"30\" cols=\"30\">Message here,</textarea>
  108.                                 <input type=\"submit\" value=\"Submit\" class=\"a2\" id=\"form-submit-btn\" />
  109.                             </form>
  110.                         ");
  111.                         echo "Sent successfully,<br>created a session.";
  112.                     } else {
  113.                         echo "Couldn't send verification,<br>could not create a session.";
  114.                     }
  115.                 } else if($page == "518") {
  116.                     echo "Contacted successfully! Your message should be replied in 24 (or less) hours.";
  117.                 } else {
  118.                     echo "Unknown Page ID.";
  119.                 }
  120.             ?>
  121.         </div>
  122.     </body>
  123. </html>
Advertisement
Add Comment
Please, Sign In to add comment