Advertisement
DibDibsTH13TEEN

Full HTML+PHP 1

Dec 13th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 3.90 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <head>
  3. <title>DibDibCraft | Staff Application</title>
  4.  
  5. <style>
  6.     body, html{
  7.         height: 100%;
  8.         width: 100%;
  9.         margin: 0;
  10.     }
  11.     body{
  12.         background-image: url("http://dibdibcraft.com/images/background.png");
  13.         background-repeat: no-repeat;
  14.         background-size: 100% 100%;
  15.     }
  16.     .text{
  17.         font-family: Arial, Helvetica, sans-serif;
  18.         font-size: 13px;
  19.         color: #FFFFFF;
  20.     }
  21.    
  22.     .bold{
  23.         font-family: Arial, Helvetica, sans-serif;
  24.         font-size: 13px;
  25.         font-weight: bold;
  26.         color: #FFFFFF;
  27.     }
  28.    
  29.     .header{
  30.         font-family: Arial, Helvetica, sans-serif;
  31.         font-size: 45px;
  32.         font-weight: bolder;
  33.         color: #FFFFFF;
  34.     }
  35.    
  36.     .header-small{
  37.         font-family: Arial, Helvetica, sans-serif;
  38.         font-size: 25px;
  39.         font-weight: bolder;
  40.         color: #FFFFFF;
  41.     }
  42. </style>
  43. </head>
  44.  
  45. <body>
  46.  
  47. <div class="header" align="center">DibDibCraft | Staff Application Form</div>
  48. <div class="header-small" align="center">Please fill out this form if you would like to become a staff member on DibDibCraft.<br>
  49. Please, only fill out the form once, otherwise your application may be ignored or declined!</div>
  50. <br>
  51. <br>
  52. <?php
  53. date_default_timezone_set('Europe/London');
  54. $activeFile = fopen("active.txt", "r");
  55. $active = fread($activeFile,filesize("active.txt"));
  56. fclose($activeFile);
  57. echo($active);
  58. if ($active !== "true"){
  59.     echo("There are no Staff Positions Availible");
  60.     header("Location: http://www.dibdibcraft.com/staff/closed");
  61. }
  62. ?>
  63. <div class="text" align="center">
  64.   <form name="apply" method="post">
  65.     <label>In-Game Name
  66.     <input name="ign" type="text" placeholder="eg; SpinballWhizzer">
  67.     </label>
  68.     <br>
  69.     <br>
  70.     <label>Full Name
  71.     <input type="rname" name="rname" placeholder="eg; Francis Ryley">
  72.     </label>
  73.     <br>
  74.     <br>
  75.     E-Mail Address
  76.     <label>
  77.     <input type="text" name="email">
  78.     </label>
  79.     <br>
  80.     <br>
  81.     <label>Age
  82.     <input name="age" type="text" id="age" placeholder="eg; 13">
  83.     </label>
  84.     <br>
  85.     <font color="#999999"><i> (You must be at least 10 years old to apply for a staff position.)</i></font>
  86.     <br>
  87.     <br>
  88.     <label>Why would you like a Staff Position?<br>
  89.     <textarea name="reason" cols="150" rows="10" id="reason"></textarea>
  90.     </label>
  91.     <br>
  92.     <font color="#999999"><i>Please write, at least, 300 characters for this, to provide a detailed description.</i></font>
  93.     <br>
  94.     <br>
  95.     <label><span>Have you had past Experience as a Staff Member?   Yes </span>
  96.     <input name="past_yes" id="past_yes" value="Yes" type="radio" checked>
  97.     </label>
  98.     <label><span>  No </span>
  99.     <input name="past_no" id="past_no" value="No" type="radio">
  100.     </label>
  101.     <br>
  102.     <br>
  103.     <label>How long have you been playing Minecraft (in years)?
  104.     <input type="text" name="duration" id="duration" placeholder="eg; 3" width="30">
  105.     </label>
  106.     <br>
  107.     <label>
  108.     <input name="Submit" type="submit" value="Apply">
  109.     </label>
  110.   </form>
  111. <font color="#FF0000"><? if ($error == true) echo(" *You must fill in ALL fields!"); ?>
  112. </div>
  113. <?php
  114. #CHANGING POST VARS TO REG VARS
  115. $submit = $_POST['Submit'];
  116. $ign = strtolower($_POST['ign']);
  117. $name = $_POST['rname'];
  118. $email = $_POST['email'];
  119. $age = $_POST['age'];
  120. $reason = $_POST['reason'];
  121. $duration = $_POST['duration'];
  122. $date = date('Y-m-d');
  123.  
  124. if (isset($_POST['past_yes'])){
  125.     $pe = "1";
  126. }else{
  127.     $pe = "0";
  128. }
  129.  
  130. if ($ign !== "" and $name !== "" and $email !== "" and $age !== "" and $reason !== "" and $duration !== "" and isset($_POST['Submit'])){
  131.     $conn = mysql_connect("localhost", "wadmin", "CENSORED", "DibDibCraft-API");
  132.     $data = "INSERT INTO `custom_staffapp`
  133.     (`ign`,`name`,`email`,`age`,`reason`,`past`,`duration`,`date`)
  134.     VALUES('$ign','$name','$email','$age','$reason','$pe','$duration', '$date')";
  135.     mysql_query($conn, $data);
  136.     mysql_close($conn);
  137.     sleep(0.5);
  138.     $ign = "";
  139.     $name = "";
  140.     $email = "";
  141.     $age = "";
  142.     $reason = "";
  143.     $duration = "";
  144.     $pe = "";
  145.     header("Location: http://www.dibdibcraft.com/staff/apply_done");
  146. }else $error = true;
  147. ?>
  148. </body>
  149. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement