⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nextstep.php

📁 个人主页音乐程序 个人主页音乐程序 个人主页音乐程序 个人主页音乐程序 个人主页音乐程序
💻 PHP
字号:
<?
/**
* Musicbox Database Installer Created by Abbas
* TeaM SCRiPTMAFiA 2005
*/
include("../sources/session.php");
include("../sources/functions.php");
include("show_header.php");
	
?>

<html>
<title>Administrator Setup</title>
<body>

<?
/**
 * The user is already logged in, not allowed to register.
 */
if($session->logged_in){
   echo "<h1>Registered</h1>";
   echo "<p>We're sorry <b>$session->username</b>, but you've already registered. "
       ."<a href=\"../index.php\">Main</a>.</p>";
}
/**
 * The user has submitted the registration form and the
 * results have been processed.
 */
else if(isset($_SESSION['regsuccess'])){
   /* Registration was successful */
   if($_SESSION['regsuccess']){
      echo "<h1>Registered!</h1>";
      echo "<p>Thank you <b>".$_SESSION['reguname']."</b>, your information has been added to the database, "
          ."you may now <a href=\"../index.php\">log in</a>.</p>";
   }
   /* Registration failed */
   else{
      echo "<h1>Registration Failed</h1>";
      echo "<p>We're sorry, but an error has occurred and your registration for the username <b>".$_SESSION['reguname']."</b>, "
          ."could not be completed.<br>Please try again at a later time.</p>";
   }
   unset($_SESSION['regsuccess']);
   unset($_SESSION['reguname']);
}
/**
 * The user has not filled out the registration form yet.
 * Below is the page with the sign-up form, the names
 * of the input fields are important and should not
 * be changed.
 */
else{
?>

<h1>Admin Setup</h1>
(your default username has to be <b>admin</b> only)
<?
if($form->num_errors > 0){
   echo "<td><font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font></td>";
}
?>
<form action="../process.php" method="POST" enctype="multipart/form-data">
 
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr><td><br>Username:</td><td><input type="text" name="user" maxlength="30" value="admin"> (dont change this)</td><td><? echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr><td>(Confirm)</td><td><input type="password" name="pass_confirm" maxlength="30" value="<? echo $form->value("pass_confirm"); ?>"></td><td><? echo $form->error("pass_confirm"); ?></td></tr>
<tr><td>Email:</td><td><input type="text" name="email" maxlength="50" value="<? echo $form->value("email"); ?>"></td><td><? echo $form->error("email"); ?></td></tr>
<tr>
	<td>Avatar:</td>
	<td>
		<input type="radio" name="avatar_type" value="upload"<? if($form->value("avatar_type") == "upload" || !$form->value("avatar_type")){ echo "checked"; } ?>> Upload your own image<br>
		<input type="file" name="avatar_file"><br>
		or <input id="avatar_type_choose" type="radio" name="avatar_type" value="choose"<? if($form->value("avatar_type") == "choose"){ echo "checked"; } ?>> Choose Avatars<br>
		<? include("../sources/avatars.php"); ?>
		<br>
	</td>
	<td><? echo $form->error("avatar"); ?></td>
</tr>
<tr>
	<td>I am a</td>
	<td>
		<select name="sex">
		  <option value="Male"<? if($form->value("sex") == "Male") echo 'selected'; ?>>Guy</option>
		  <option value="Female"<? if($form->value("sex") == "Female") echo 'selected'; ?>>Girl</option>
		</select>
	</td>
	<td><? echo $form->error("sex"); ?></td>
</tr>
<tr>
	<td>Country</td>
	<td><?=insertCountrySelect($form->value('country'))?></td>
	<td><? echo $form->error("birthday"); ?></td>
</tr>
<tr>
	<td colspan="2"><input type="checkbox" name="newsletter" value="1"<? if($form->value("newsletter") == "1"){ echo "checked"; } ?>> Join Newsletter</td>
	<td><? echo $form->error("newsletter"); ?></td>
</tr>
<tr>
	<td colspan="2"><input type="checkbox" name="terms" value="1"<? if($form->value("terms") == "1"){ echo "checked"; } ?>> I have read and accepted the terms and conditions.</td>
	<td><? echo $form->error("terms"); ?></td>
</tr>
<tr><td colspan="2" align="right">
<input type="hidden" name="subjoin" value="1">
<input type="submit" value="Join!"></td></tr>
<tr><td colspan="2" align="left"><a href="../index.php">Back to Main Page</a></td></tr>
</table>
</form>

<?
}
?>
<?
include("show_footer.php"); ?>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -