Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include("servervariables.php"); include('database.php');
- ?>
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <title><?php echo SERVERNAME;?></title>
- <meta name="keywords" content="" />
- <meta name="description" content="" />
- <link href="default.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="header">
- <h1><?php echo SERVERNAME;?></h1>
- <h2><?php echo SLOGAN;?></h2>
- </div>
- <div id="left">
- <div id="menu" class="boxed">
- <h2 class="heading">Pages</h2>
- <ul>
- <li class="first"><a href="index.php" title="">Home</a></li>
- <li><a href="stats.php" title="">Player Stats</a></li>
- <li><a href="admins.php" title="">Admins</a></li>
- <li><a href="register.php" title="">Register</a></li>
- <li><?php echo'<a href="login.php?l=a" title="">Admin Control Panel</a>';?></li>
- <li><?php echo'<a href="login.php" title="">User Control Panel</a>';?></li>
- <?php if(defined("FORUMURL")) echo "<li><a href='FORUMURL'>Forums</a></li>"; else echo "<p> </p>";?>
- </ul>
- <p> </p>
- <p> </p>
- </div>
- </div>
- <!-- end #left -->
- <div id="right">
- <div class="boxed">
- <h2 class="heading">News</h2>
- <p>
- <?php
- include("news.php");
- mysql_close($con);
- ?></p>
- </div>
- </div>
- <!-- end #right -->
- <div id="center">
- <div class="boxed">
- <h1 class="heading">Welcome to <?php echo SERVERNAME;?>!
- </h1><center>
- <p>
- <h1>Register </h1>
- <!-- register -->
- <?php
- /* This code will make a connection with database */
- $con=mysql_connect("localhost","root","");
- /* Now, we select the database */
- mysql_select_db("tkadmin");
- /* Now we will store the values submitted by form in variable */
- $username=$_POST['username'];
- $pass=$_POST['password'];
- /* we are now encrypting password while using md5() function */
- $password=md5($pass);
- $confirm_password=$_POST['confirm_password'];
- /* Now we will check if username is already in use or not */
- $queryuser=mysql_query("SELECT * FROM playerinfo WHERE username='$username' ");
- $checkuser=mysql_num_rows($queryuser);
- if($checkuser != 0)
- { echo "Sorry, ".$username." is already been taken."; }
- else {
- /* now we will check if password and confirm password matched */
- if($pass != $confirm_password)
- { echo "Password and confirm password fields were not matched"; }
- else {
- /* Now we will write a query to insert user details into database */
- $insert_user=mysql_query("INSERT INTO playerinfo (username, password, kills, deaths, score, money, IP, adminlvl, email) VALUES ('$username', '$password', 0, 0, 0, 0, '', 0, '')");
- if($insert_user)
- { echo "Registration Succesfull"; }
- else
- { echo "error in registration".mysql_error(); }
- /* closing the if else statements */
- }}
- mysql_close($con);
- ?>
- <!--end of register-->
- </center></p>
- </div>
- </div>
- <!-- end #center -->
- <div style="clear: both;"> </div>
- <div id="footer">
- <p id="legal">Copyright <?php echo SERVERNAME;?>. All Rights Reserved. Website created and designed By [HiC]TheKiller and XFlawless. Icons by glyphish.</p>
- <p id="links"><a href="index.php">Home</a> | <a href="stats.php">Stats</a> | <a href="admins.php">Admins</a> | <a href=<?php if(isset($_SESSION['logged'])) echo "adminpage.php"; else echo "login.php?l=a";?>>ACP</a> | <a href=<?php if(isset($_SESSION['logged'])) echo "playerpage.php"; else echo "login.php";?>>UCP</a> </p>
- </div>
- </body>
- </html>
- <? mysql_close($con); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement