Location: PHPKode > projects > PHP Enter > www/install/install3.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta name="author" content="php enter" />
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	



<style type="text/css">
body {
 font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
 font-size: 14px;
 font-weight: normal;
 margin: 0px;
 padding: 0px;
 background-color: #f8f8f8;
  color: #4F4F4F;
}

h1 {
 font-family: Times New Roman, serif;
 font-size: 26px;
 font-weight: normal;
 color: #4F4F4F;
 }

h2 {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 12px;
 font-weight: bold;
 color: #333333;
 }

p {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 12px;
 font-weight: normal;
 line-height: 18px;
 color: #333333;
 }

a {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 14px;
 font-weight: normal;
 text-decoration: none;
 color: #4F4F4F;
 }

a:visited {
 text-decoration: none;
 color: #4F4F4F;
 }
</style>
	
</head>


<body>
<br>
<table width="70%" text align="center" border="0">
<tr><td>
<center><h3>:: php Enter ::</h3>

<br>
<br>
</td></tr></table>	
<?php
require_once('../admin/config.php');
if(isset($_POST['submit']))
{
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];

if(!$username){ 
echo "<center>Empty Field: Username:<a href=\"javascript:history.go(-1)\">Go Back</a></center>";  
die();
              }
if(!$password){ 
echo "<center>Empty Field: Password:<a href=\"javascript:history.go(-1)\">Go Back</a></center>";  
die();
              }
if(!$email){ 
echo "<center>Empty Field: Email:<a href=\"javascript:history.go(-1)\">Go Back</a></center>";  
die();
              }
mysql_query("INSERT INTO cpadmin (ausername,apassword,aemail)
VALUES ('$username','".mysql_real_escape_string(md5($_POST['password']))."','$email')")
or die(mysql_error());

$mcFile = "../admin/version.php";
$fh = fopen($mcFile, 'w') or die("can't open file - check CHMOD");
$version = '$version';
$stringData = 
"<?php 
$version = '3.0.';
?>";
fwrite($fh, $stringData);
fclose($fh);
echo "<center>Please remove install directory for security reasons.<br></center>";
}else{
?>
    <table width="70%" text align="center" border="0">
      <form method="post" action="install3.php">
<tr>
  <td align="center" width="120">Username:</td>
  <td align="center"><input type=text style="font-size: 16px; font-family: tahoma,arial; font-weight: bold; color: #4F4F4F; BORDER: #4F4F4F 1px solid ; BACKGROUND-COLOR: #F8F8F8" name="username"  size="30"></td>
</tr>
<tr>
  <td align="center" width="120">Password</td>
  <td align="center"><input type=text style="font-size: 16px; font-family: tahoma,arial; font-weight: bold; color: #4F4F4F; BORDER: #4F4F4F 1px solid ; BACKGROUND-COLOR: #F8F8F8" name="password" size="30"></td>
</tr>
<tr>
  <td align="center" width="120">Email</td>
  <td align="center"><input type=text style="font-size: 16px; font-family: tahoma,arial; font-weight: bold; color: #4F4F4F; BORDER: #4F4F4F 1px solid ; BACKGROUND-COLOR: #F8F8F8" name="email" size="30"></td>
</tr>

<tr>
  <td align="center" width="120">
<input type="submit" name="submit" value="Admin Account">
</td></tr>
</form>
<?php }  ?>
</table>
<table width="100%" height="322px" text align="center" border="0">
<tr>
  <td align="center" valign="bottom">
<center>
<a href="http://phpenter.net"><font size=1 font color="#4F4F4F">powered by phpenter.net</font></a>
 </td>
</tr>
</table>
</center>
</HTML>
Return current item: PHP Enter