Location: PHPKode > scripts > Hot or Not Clone > hotornot/control/testadmin.php
<?
include("../config.php");
$sql="select * from admin";
$res=mysql_query($sql);
while($obj=mysql_fetch_object($res))
{
$username=$obj->username;
$password=$obj->password;
$name=$obj->name;
$email=$obj->email;


print "uname=$username";
print "pass=$password";
print "email=$email";
print "name=$name";

}

?>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" href="stylesheet.css" type="text/css">

<title>Control Panel</title>
<script language="JavaScript">

function checkifvalid(){
if (window.document.myform.username.value=="")
{
alert("please enter the User Name!");
window.document.myform.username.focus();
return false;
}
if (window.document.myform.upassword.value=="")
{
alert("please enter the Password!");
window.document.myform.upassword.focus();
return false;
}

if (window.document.myform.name1.value=="")
{
alert("please enter the Name!");
window.document.myform.name1.focus();
return false;
}
if (window.document.myform.email.value=="")
{
alert("please enter the Email!");
window.document.myform.email.focus();
return false;
}

return true;
}
</script>
</head>
<script language="JavaScript">
 <?php
    if(isset($error))
    {
    if($error=="lo")print("alert('Your old password is wrong!');");
	}
    ?>
</script>
</head>

<body leftmargin="0" rightmargin="0" bottommargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FCFAF7" text="#000000" >

<div align="left"> 
  <table border="0" cellpadding="0" cellspacing="0" width="100%" height="41">
    <tr> 
      <td width="150%" bgcolor="#000000" height="1"></td>
    </tr>
    <tr > 
      <td width="100%" align="left" valign="bottom" bgcolor="#FFFFFF" class="topheader"  > 
        Control Panel </td>
    </tr>
  </table>
</div>

<div align="left"> 
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td width="20%" valign="top"> 
        <? include("sidelinks.php"); ?>
      </td>
      <td width="80%" valign="top" align="center"><br>
        <br>
        <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td><div align="center"> 
                <?
						if(!isset($success))
						{
						?>
                <table width="77%" height="10" border="0" cellpadding="0" cellspacing="0" class="mytable">
                  <tr> 
                    <td><div align="center"> 
                        <table border="0" width="100%" height="100%">
                          <form name="myform"  method="post" action="testadmin.php" onsubmit="javascript: return checkifvalid();">
                            <tr bgcolor="#006633"> 
                              <td height="19" colspan="2" class="header">Create 
                                New Administrator</td>
                            </tr>
                            <tr> 
                              <td height="19"><font face="Verdana" size="2">Username</font></td>
                              <td height="19"><input name="username" type="text" id="name" size="20"></td>
                            </tr>
                            <tr>
                              <td height="19"><font face="Verdana" size="2">Password</font></td>
                              <td height="19"><input name="password" type="text" id="password" size="20"></td>
                            </tr>
                            <tr> 
                              <td width="37%" height="19"><font face="Verdana" size="2">Name</font></td>
                              <td width="63%" height="19"><input name="name" type="text" id="name" size="20"></td>
                            </tr>
                            <tr> 
                              <td height="19"><font face="Verdana" size="2">Email 
                                Address </font></td>
                              <td height="19"><input name="email" type="text" id="email" size="20"></td>
                            </tr>
                            <tr> 
                              <td colspan="2" height="17"> <p align="center"> 
                                  <input type="submit" value="Create " name="B1">
                                
                              </td>
                            </tr>
                          </form>
                        </table>
                      </div></td>
                  </tr>
                </table>
                <?
						  }
						  else
						  {
						  ?>
                <table width="70%" height="10" border="0" cellpadding="0" cellspacing="0" bordercolor="#006633">
                  <tr> 
                    <td><div align="center"> 
                        <table border="0" width="100%" height="100%">
                          <tr> 
                            <td height="19" colspan="2"><font face="Verdana" size="2">New 
                              admin has been created!</font></td>
                          </tr>
                        </table>
                      </div></td>
                  </tr>
                </table>
                <?
						  }
						  ?>
              </div></td>
          </tr>
        </table> </td>
    </tr>
	
  </table>
</div>
</body>

</html>
<? include("conclose.php"); ?>
Return current item: Hot or Not Clone