Guest User

Manager

a guest
Aug 5th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.96 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL); ini_set('display_errors', '1');
  3. session_start();
  4.  
  5. require_once 'db.php';
  6.  
  7. function mod($isMod) {
  8. switch($isMod) {
  9. case 0: return "You are NOT Moderator";
  10. case 1: return "You are Moderator";
  11. }
  12. }
  13.  
  14. if (isset($_POST['submit'])) {
  15.  
  16. $name = $_POST["name"];
  17. $password = md5($_POST['password']);
  18. $submit = $_POST["submit"];
  19.  
  20. $name = mysqli_real_escape_string($db, $name);
  21.  
  22.  
  23. $name = addslashes($_POST['name']);
  24.  
  25. $sql = $db->prepare("SELECT * FROM users WHERE username = ?");
  26. $sql->bind_param("s", ($_SESSION['name']));
  27. $sql->fetch();
  28. $sql->execute();
  29.  
  30.  
  31.  
  32. $sqlz = $db->prepare("SELECT * FROM users WHERE username = ?");
  33. $sqlz->bind_param("s", ($_SESSION['name']));
  34. $sqlzz->num_rows();
  35. $resultd = $sqlz->get_result();
  36.  
  37. if($submit)
  38. {
  39. if($name && $password)
  40. {
  41. if($sqlzz->num_rows == 1)
  42. {
  43. while($row = $resultd->fetch_assoc()) { }
  44. {
  45. $dbname = $row['name'];
  46. $dbpassword = $row['password'];
  47. }
  48. if($name == $dbname && $password == $dbpassword)
  49. {
  50. $_SESSION['name'] = $name;
  51. }
  52. else
  53. {
  54. echo('
  55. <p style="font-family:Geneva;color:#ff0000;">The password you entered is wrong.</p>
  56. ');
  57. }
  58. }
  59. else
  60. {
  61. echo('
  62. <p style="font-family:Geneva;color:#ff0000;">The name you entered does not exist.</p>
  63. ');
  64. }
  65. }
  66. else
  67. {
  68. echo('
  69. <p style="font-family:Geneva;color:#ff0000;">Please enter all the required information.</p>
  70. ');
  71. }
  72. }
  73.  
  74. $sqlzddd = $db->prepare("SELECT * FROM users WHERE username = ?");
  75. $sqlzdd->bind_param("s", ($_SESSION['name']));
  76. $result = $sqlzddd->get_result();
  77. $rose = $result->fetch_assoc();
  78. if(!isset($_SESSION['name']))
  79.  
  80. ?>
  81.  
  82. <head>
  83. <meta name="keywords" content="iwaddle, cpps, cpps.me, rile5.com, cppses, club penguin private server, icpps" />
  84. <meta name="description" content="iWaddle, the Club Penguin Private Server" />
  85. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  86. <title>iWaddle - A Club Penguin Private Server</title>
  87. <link href="style.css" rel="stylesheet" type="text/css" media="all" /><style>#button{color:white; background: 27AAD6; border-radius:5px; border: 3px solid #FFFFFF; margin-top: 10px; margin-left: 550px;} form{border: solid 2px #0E97C4; background: #1BAFE0 url('igloo.png') no-repeat top; padding-left: 10px; padding-top: 10px; padding-bottom: 10px; color: white; border-radius: 15px;} li{padding-left: 20px;} input{border-radius: 15px; border: none; height: 30px; margin-bottom: 10px;} </style>
  88. </head>
  89. <body>
  90. <center><div id="menu">
  91. <ul>
  92. <li><a accesskey='1' href='http://iwaddle.me' title=''>Home</a></li>
  93. <li><a accesskey='2' href='http://secure.iwaddle.me/register' title=''>Register</a></li>
  94. <li><a accesskey='3' href='http://secure.iwaddle.me/manage' title=''>Manager</a></li>
  95. <li><a accesskey='4' href='http://play.iwaddle.me' title=''>Play</a></li>
  96. <li><a accesskey='5' href='http://blog.iwaddle.me' title=''>News</a></li>
  97. <li><a accesskey='6' href='http://twitter.com/iwaddleme' title=''>Follow Us</a></li>
  98. </ul>
  99. </div></center>
  100. <div id="page-wrapper">
  101. <center>
  102. <div id="main">
  103. <div class="right">
  104. <h3>Read the Blog</h3>
  105. <a href="http://blog.iwaddle.me"><img src="blog.png" width="45%" style="margin-left: 68px;"></a>
  106. <h3>Latest Updates</h3>
  107. <div id="body-text">The server should be back online late tomorrow night. <p>All accounts were deleted, so you will need to sign up again. All paid Moderators will be sent instructions on how to get their rank back. <p>Once again, we are sorry for the inconvenience caused.</div>
  108. </div>
  109. <p>
  110. <div class="left">
  111. <h2>Login</h2>
  112. <p>
  113. <div id="body-text">
  114. <form action="" method="POST">
  115. <h4>Penguin Name</h4>
  116. <input type="text" name="name">
  117. <h4>Password</h4>
  118. <input type="password" name="password"><h4></h4>
  119. <input type="submit" name="submit" value="Login" id="button">
  120. </form>
  121. </div>
  122. </div>
  123. <center>
  124. <footer>
  125. <ul>
  126. <li><a href="/about">About Us</a></li>
  127. <li><a href="/commands">Commands</a></li>
  128. <li><a href="/contact">Contact Us</a></li>
  129. <li><a href="/items">Custom Items</a></li>
  130. <li><a href="http://secure.iwaddle.me/manage">Buy Moderator</a></li>
  131. <li><a href="/rules">Rules</a></li>
  132. </ul>
  133. <p>Copyright © 2012 - 2013 iWaddle Some rights reserved.
  134. </footer>
  135. </center>
  136. </div>
  137. </center>
  138. </div>
  139. </body>
  140. </html>
  141.  
  142.  
  143. <html>
  144. <title>iWaddle - A Club Penguin Private Server</title>
  145. <head>
  146. <style>
  147. body { background: #0074c7; font-family: 'arial';}
  148. #left-bar-box1 { background: #FFF; border-radius: 15px; width: 280px; height: 200px; margin-right: 10px; -moz-box-shadow: 0 0 20px #888; -webkit-box-shadow: 0 0 20px #888; box-shadow: 0 0 20px #888; padding-top: 10px; padding-left: 10px; padding-right: 10px;}
  149. #left-bar-box2 { background: #FFF; border-radius: 15px; width: 280px; height: 310px; margin-top: 20px; -moz-box-shadow: 0 0 20px #888; -webkit-box-shadow: 0 0 20px #888; box-shadow: 0 0 20px #888; padding-top: 10px; padding-left: 10px; padding-right: 10px;}
  150. #main-bar-box1 { background: #FFF; border-radius: 15px; width: 630px; height: 200px; margin-left: 10px; -moz-box-shadow: 0 0 20px #888; -webkit-box-shadow: 0 0 20px #888; box-shadow: 0 0 20px #888; padding-top: 10px; padding-left: 10px; padding-right: 10px;}
  151. #main-bar-box2 { background: #FFF; border-radius: 15px; width: 630px; height: 310px; margin-left: 10px; margin-top: 20px; -moz-box-shadow: 0 0 20px #888; -webkit-box-shadow: 0 0 20px #888; box-shadow: 0 0 20px #888; padding-top: 10px; padding-left: 10px; padding-right: 10px;}
  152. table { margin-top: 100px;}
  153. footer { color: #FFF; font-family: 'arial'; margin-top: 30px; text-align: center;}
  154. #title { font-family: 'arial'; font-weight: bold; }
  155. a:link {color:#FFFFFF; text-decoration: none;}
  156. #a:visited {color:#FFFFFF; text-decoration: none;}
  157. #details { margin-top: 0px; color: #FFF;}
  158. #box-container { background: #177CBF; color: #FFFFFF; border-radius: 10px; padding: 4px 4px 4px 4px; }
  159. img { margin-left: 10px;}
  160. #textup {margin-left: 30px;}
  161. #text {margin-left: 260px;}
  162. </style>
  163. </head>
  164. <body>
  165. <center><table border="0">
  166. <tr>
  167. <td><div id="left-bar-box1"><center><span id="title">Welcome, <?php echo $_SESSION['name']; ?></span><p>
  168. <div id="box-container">Welcome to the Manager, <?php echo $_SESSION['name']; ?>! Here you can edit your Account settings, and purchase Upgrades for your penguin. <p>
  169. <a href="logout.php"><strong>Logout</strong></a><div>
  170. </center></div></td>
  171. <td><div id="main-bar-box1"><span id="title">Penguin Info</span><img src="penguin.png" width="auto" height="15px"><p>
  172. <div id="box-container"><table border="0" id="details">
  173. <tr>
  174. <td><strong>ID</strong> : <? echo ($crumbs["idk"]); ?></td>
  175. <td><div id="text"><strong>Hands</strong> : <? echo ($crumbs["hands"]); ?></div></td>
  176. </tr>
  177. <tr>
  178. <td><strong>Color</strong> : <? echo ($crumbs["color"]); ?></td>
  179. <td><div id="text"><strong>Feet</strong> : <? echo ($crumbs["feet"]); ?></div></td>
  180. </tr>
  181. <tr>
  182. <td><strong>Head</strong> : <? echo ($crumbs["head"]); ?></td>
  183. <td><div id="text"><strong>Background</strong> : <? echo ($crumbs["photo"]); ?></div></td>
  184. </tr>
  185. <tr>
  186. <td><strong>Face</strong> : <? echo ($crumbs["face"]); ?></td>
  187. <td><div id="text"><strong>Namecolor</strong> : #FFFFFF</div></td>
  188. </tr>
  189. <tr>
  190. <td><strong>Neck</strong> : <? echo ($crumbs["neck"]); ?></td>
  191. <td><div id="text"><strong>Nameglow</strong> : #000000</div></td>
  192. </tr>
  193. <tr>
  194. <td><strong>Body</strong> : <? echo ($crumbs["body"]); ?></td>
  195. <td><div id="text"><strong><? echo mod($crumbs["ismod"]); ?></strong></div></td>
  196. </tr>
  197. </table><div>
  198. </div></td>
  199. </tr>
  200. <tr>
  201. <td><div id="left-bar-box2"><span id="title">Account Settings</span><img src="settings.png" width="auto" height="15px"><p>
  202.  
  203. <form action="pass.php" method="POST">
  204. <div id="box-container"><strong>Change Password</strong><p>
  205. <input type="text" name="username" value="<?php echo $_SESSION['name']; ?>" style="width: 0px; height: 0px; border: 0px;">
  206. Current Password :<center><input type="password" name="pass" style="margin-top: -10px; margin-bottom: -10px; border-radius: 15px; border: 0px;"></center><p>
  207. New Password :<center><input type="password" name="pass2" style="margin-top: -10px; margin-bottom: -10px; border-radius: 15px; border: 0px;"></center><p>
  208. Confirm New Password :<center><input type="password" name="pass2" style="margin-top: -10px; margin-bottom: -10px; border-radius: 15px; border: 0px;"></center><p>
  209. <input type="submit" name="submit" value="Change" style="margin-left: 180px; background: #FFFFFF; border-radius: 10px; width: 70px; border: 0px;">
  210. </form>
  211. <div>
  212. </div></td>
  213. <td><div id="main-bar-box2"><span id="title">Upgrades</span><p>
  214. <div id="box-container">
  215. <table border="0" id="details">
  216. <tr>
  217. <td><center><strong>Upgrade</center></strong></td>
  218. <td><center><strong>Decription</center></strong></td>
  219. <td><center><strong>Price</center></strong></td>
  220. </tr>
  221. <tr>
  222. <td>Moderator</td>
  223. <td><div id="textup">Makes you a Moderator on iWaddle</div></td>
  224. <td><div id="textup">$4<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
  225. <input type="hidden" name="cmd" value="_s-xclick">
  226. <input type="hidden" name="hosted_button_id" value="7P5WH4MY3U9CS">
  227. <input type="hidden" style="width:0; height: 0;" name="on0" value="Penguin Name : <?php echo $_SESSION['name']; ?>">
  228. </div>
  229. </td>
  230. <td>
  231. <input type="submit" value="Buy" border="0" name="submit" alt="iWaddle - Moderator Purchase" style="margin-left: 180px; background: #FFFFFF; border-radius: 10px; width: 70px; border: 0px;">
  232. <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="0" height="0">
  233. </form>
  234. </td>
  235. </tr>
  236. <tr>
  237. <td>Nameglow</td>
  238. <td><div id="textup">Makes your Penguin Name Glow</div></td>
  239. <td><div id="textup">$2<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
  240. <input type="hidden" name="cmd" value="_s-xclick">
  241. <input type="hidden" name="hosted_button_id" value="QEC88RBNRUUY6">
  242. <input type="hidden" style="width:0; height: 0;" name="on0" value="Penguin Name : <?php echo $_SESSION['name']; ?>">
  243. </div>
  244. </td>
  245. <td>
  246. <input type="submit" value="Buy" border="0" name="submit" alt="iWaddle - Moderator Purchase" style="margin-left: 180px; background: #FFFFFF; border-radius: 10px; width: 70px; border: 0px;">
  247. <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="0" height="0">
  248. </form>
  249. </td>
  250. </div></td>
  251. </tr>
  252. <tr>
  253. <td>Bubblecolor</td>
  254. <td><div id="textup">Gives your Penguin a Colored Chat Bubble</div></td>
  255. <td><div id="textup">$2<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
  256. <input type="hidden" name="cmd" value="_s-xclick">
  257. <input type="hidden" name="hosted_button_id" value="ECUFM29VQ4E6U">
  258. <input type="hidden" style="width:0; height: 0;" name="on0" value="Penguin Name : <?php echo $_SESSION['name']; ?>">
  259. </div>
  260. </td>
  261. <td>
  262. <input type="submit" value="Buy" border="0" name="submit" alt="iWaddle - Moderator Purchase" style="margin-left: 180px; background: #FFFFFF; border-radius: 10px; width: 70px; border: 0px;">
  263. <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="0" height="0">
  264. </form>
  265. </td>
  266. </div></td>
  267. </tr>
  268. <tr>
  269. <td>Bubble Glow</td>
  270. <td><div id="textup">Makes your Chat Bubble glow</div></td>
  271. <td><div id="textup">$3<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
  272. <input type="hidden" name="cmd" value="_s-xclick">
  273. <input type="hidden" name="hosted_button_id" value="5FJ6T6D6Z4KDG">
  274. <input type="hidden" style="width:0; height: 0;" name="on0" value="Penguin Name : <?php echo $_SESSION['name']; ?>">
  275. </div>
  276. </td>
  277. <td>
  278. <input type="submit" value="Buy" border="0" name="submit" alt="iWaddle - Moderator Purchase" style="margin-left: 180px; background: #FFFFFF; border-radius: 10px; width: 70px; border: 0px;">
  279. <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="0" height="0">
  280. </form>
  281. </td>
  282. </div></td>
  283. </tr>
  284. </table><div>
  285. <div>
  286. </div></td>
  287. </tr>
  288. </table></center>
  289. </body>
  290. <footer>Need help? Contact <a href="mailto:support@iwaddle.me">support@iwaddle.me</a></footer>
  291. </html>
  292. <?php
  293. }
  294. ?>
Add Comment
Please, Sign In to add comment