Location: PHPKode > projects > Guild DKP System > dkpsystem1.4/install.php
<?php
/***************
 * install.php *
 ***************/
@require("config.php");
$Create = $_POST[Create];
if(isset($Create)) {
	$txtUsername = $_POST[txtUsername];
	$txtPassword = $_POST[txtPassword];
	$file = file("install.sql");
	foreach($file as $line_num => $file) {
		$sql = $db->query($file);
		if(!$sql) { die(systemMessage("Database Error", mysql_error())); }
	}
	$db->query("INSERT INTO dkp_login (username, password) VALUES (\"$txtUsername\", \"$txtPassword\")");
	die(systemMessage("Installation Complete", "You have successfully created all necessary database tables.<br>".IMG_ARROW." Admin Username: $txtUsername<br>".IMG_ARROW." Admin Password: ********", "index.php"));
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Guild DKP Tracker v1.4.0 Installer - Programmed by Dexter Brock</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#E1E1E1" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
  <tr>
    <td><table width="100%" border="0" cellspacing="1" cellpadding="3">
        <tr> 
          <td bgcolor="#003366"><font color="#FFFFFF" size="2" face="Tahoma"><strong>Guild 
            DKP Tracker Installer</strong></font></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><form action="" method="post" name="formLogin" id="formLogin">
              <table width="100%" border="0" cellspacing="1" cellpadding="3">
                <tr> 
                  <td colspan="2" bgcolor="#003366"><font color="#CCCCCC" size="1" face="Tahoma"><strong>DKP 
                    Login </strong></font></td>
                </tr>
                <tr> 
                  <td width="15%" bgcolor="#999999"><strong><font color="#000000" size="1" face="Tahoma">Username</font></strong></td>
                  <td bgcolor="#CCCCCC"> <input name="txtUsername" type="text" id="txtUsername" value="admin" size="35" maxlength="35"></td>
                </tr>
                <tr> 
                  <td bgcolor="#999999"><strong><font color="#000000" size="1" face="Tahoma">Password</font></strong></td>
                  <td bgcolor="#CCCCCC"> <input name="txtPassword" type="password" id="txtPassword" value="password" size="35" maxlength="35"></td>
                </tr>
                <tr> 
                  <td bgcolor="#999999"><strong><font size="1" face="Tahoma"> 
                    </font></strong></td>
                  <td bgcolor="#CCCCCC"><strong><font size="1" face="Tahoma"> 
                    </font></strong> <input name="Create" type="submit" id="Create" onClick="location.href='?action=createtables'" value="Create Database Tables and Login" <?php $sql = $db->query("SELECT * FROM dkp_users"); if($sql) { echo "disabled=\"true\""; }?>> 
                  </td>
                </tr>
              </table>
            </form></td>
        </tr>
      </table> </td>
  </tr>
</table>
</body>
</html>
Return current item: Guild DKP System