?? add.php
字號:
<?php
/*
文件名稱: reg.php
功能說明: 用戶注冊
創建日期: 03/09/12
*/
include "../inc/header.inc.php";
include "../inc/class_db_mysql.php";
include "../inc/func.inc.php";
$db = new db_sql();
$ip = $_SERVER['REMOTE_ADDR']; //取當前用戶的IP
$regtime = time(); //當前時間
if($step_LY=="ok"){
$db->query("select euid from en_user where loginname='$loginname'");
if($db->next_record()){
$reason="<font color=blue><b>sorry! the member id is exit!</b></font>";
$write="no";
}else{
$write="ok";
}
if($write=="ok"){
$db->query("insert into en_user (loginname,password,company,ifsb,linkman,sex,email,email2,tel,fax,address,zip,city,state,country,biztype,product,homepage,overview,industry,regtime,lasttime,regip,lastip)
values ('$loginname','$password','$company','$ifsb','$linkman','$sex','$email','$email2','$tel','$fax','$address','$zip','$city','$state','$country','$biztype','$product','$homepage','$overview','$industry','$regtime','$regtime','$ip','$ip')");
}
}
?>
<?php include '../inc/en_inc_head.php'; ?>
<body topmargin="0" leftmargin="0" bgcolor="#FFFFFF" >
<!--<?php include '../inc/en_inc_nav_head.php'; ?>-->
<?php
if($write=="no" || !isset($write)){
if($write=="no"){
}
?>
<table align=center border=0 cellpadding=0 cellspacing=0 width=756>
<form name="reg" action="<?php echo $PHP_SELF; ?>" method="post" onSubmit="return checkform(this)">
<tr align=middle>
<td valign=top> <table border=0 cellpadding=0 cellspacing=0 width="90%">
<tbody>
<tr>
<td bgcolor=#c6d9ec height=20> <b><font color=#cc0000
face=Wingdings>1</font> New Company Information </b>
<font color=#da3830 style="FONT-SIZE: 8pt">(<font
color=#cc0000>*</font> Required Information)</font></td>
</tr>
<tr bgcolor=#999999>
<td height=1><spacer type="block" width="1" height="1"></td>
</tr>
<tr align=middle bgcolor=#f3f8fc>
<td><?php echo"$reason"; ?><br><br> <table border=0 cellpadding=2 cellspacing=0 width="80%">
<tbody>
<tr>
<td align=right>Member ID: </td>
<td><input name=loginname size=36 value="<?php echo "$loginname";?>">
<font color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right>Password: </td>
<td><input name=password type="password" size=36 value="<?php echo "$password";?>">
<font color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right>Verify Password:
</td>
<td><input name=password1 type="password" size=36 value="<?php echo "$password";?>">
<font color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right width="35%">Company
Name: </td>
<td width="150"><input name=company size=45 value="<?php echo "$company";?>">
<font
color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right>Join ec188 as
a : </td>
<td> <input type="radio" name="ifsb" value="s" checked>
Seller <font color=#cc0000> *</font></td>
</tr>
<tr>
<td align=right>Contact Person:
</td>
<td><input name=linkman size=36 value="<?php echo "$linkman";?>">
<font color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right> </td>
<td><input name=sex type=radio value=Mr. <?php if($sex == "Mr") echo "checked"; ?>>
Mr. <input name=sex type=radio value=Ms. <?php if($sex == "Ms") echo "checked"; ?>>
Ms.</td>
</tr>
<tr>
<td align=right>Current Email:
</td>
<td><input name=email size=36 value="<?php echo "$email";?>">
<font color=#cc0000>*</font>
</td>
</tr>
<tr>
<td align=right>Alternate Email:
</td>
<td><input name=email2 size=36 value="<?php echo "$email2";?>">
</td>
</tr>
<tr>
<td align=right> </td>
<td><font color=#3373ae
style="FONT-SIZE: 8pt">(Please make sure your email address
is correct to enable other
users to contact you)</font>
</td>
</tr>
<tr>
<td align=right>Tel: </td>
<td><input name=tel size=36 value="<?php echo "$tel";?>"> <font
color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right> </td>
<td><font color=#3373ae
style="FONT-SIZE: 8pt">(Country Code - Area Code - Number)</font></td>
</tr>
<tr>
<td align=right>Fax: </td>
<td><input name=fax size=36 value="<?php echo "$fax";?>"> </td>
</tr>
<tr>
<td align=right>Street Address:
</td>
<td><input name=address size=45 value="<?php echo "$address";?>">
<font
color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right>Zip/Postal Code:
</td>
<td><input name=zip size=36 value="<?php echo "$zip";?>"> </td>
</tr>
<tr>
<td align=right>City: </td>
<td><input name=city size=36 value="<?php echo "$city";?>">
<font
color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right>State/Province:
</td>
<td><input name=state size=36 value="<?php echo "$state";?>">
</td>
</tr>
<tr>
<td align=right>Country/Territory:
</td>
<td><select name=country>
<option value=CN>China</option>
</select> <font color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right>Industry: </td>
<td><select name=industry>
<option selected value="">Please Select Industry</option>
<?php
$db->query("select catalog_id,catalog,parent_id from en_catalog where parent_id=0 order by catalog_id");
while($db->next_record()){
$catalog_id=$db->f("catalog_id");
$catalog=$db->f("catalog");
if ($industry == $catalog_id){
echo "<option value=$catalog_id selected>$catalog</option>";
}else{
echo "<option value=$catalog_id>$catalog</option>";
}
}
?>
</select> <font color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right height=15>Company
Business Type: </td>
<td height=15><select name=biztype>
<option
value=Manufacturers>Manufacturers</option>
</select> <font
color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right height=15>Main
Items: </td>
<td height=15><input name=product size=45 value="<?php echo "$product";?>">
<font
color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right>Homepage: </td>
<td><input name=homepage size=36 value="<?php echo "$homepage";?>">
</td>
</tr>
<tr valign=top>
<td align=right>Company Overview:
</td>
<td><textarea cols=50 name=overview rows=10 wrap=VIRTUAL><?php echo strip_tags($overview); ?></textarea>
<font color=#cc0000>*</font></td>
</tr>
<tr>
<td align=right> <INPUT type="hidden" name="step_LY" value="ok"></td>
<td> </td>
</tr>
<tr align=middle>
<td colspan=2><input name=Submit type=submit value=" Submit ">
<input name=Submit2 type=button value=" Reset ">
</td>
</tr>
</tbody>
</table>
<br></td>
</tr>
</tbody>
</table>
<br></td>
</tr>
</form>
</table>
<?php
}else{
$leyond = base64_encode("author=".'ziso@msn.com'."&username=".$user."&password=".$password);
?>
<TABLE width="60%" border="0" cellspacing="3" cellpadding="12" align="CENTER" bgcolor="ddf3fb">
<TR valign="TOP" align="CENTER" bgcolor="#FFFFFF">
<TD height="87" bgcolor="#F5F5F5"><BR> <BR> <FONT color="#FF0000" size="2"><B><FONT style="font-size:14px">Sucess!</FONT></B></FONT><BR> <BR> <FONT color="#000000">Please Remember your login name:<?php echo "$loginname"; ?>
Login Password:<?php echo "$password"; ?></FONT><BR> <BR> <BR> <A href="index.php"><FONT color="#FF6600">Reurn Index</FONT></A>
<A href="login.php?leyond=<?php echo "$leyond"; ?>"><FONT color="#FF6600">Member Login</FONT></A><BR> </TD>
</TR>
</TABLE>
<?php
}
?>
<!--<?php include '../inc/en_inc_foot.php'; ?>-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -