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

📄 add.php

📁 php中英版本 仿alibaba贸易平台
💻 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>&nbsp;<b><font color=#cc0000 
            face=Wingdings>1</font> New Company Information </b>&nbsp; &nbsp; 
									&nbsp; &nbsp; <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: &nbsp;</td>
												<td><input name=loginname size=36 value="<?php echo "$loginname";?>"> 
													<font color=#cc0000>*</font></td>
											</tr>
											<tr> 
												<td align=right>Password: &nbsp;</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: 
													&nbsp;</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: &nbsp;</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 : &nbsp;</td>
												<td> <input type="radio" name="ifsb" value="s" checked>
													Seller &nbsp;&nbsp;<font color=#cc0000>&nbsp;*</font></td>
											</tr>
											<tr> 
												<td align=right>Contact Person: 
													&nbsp;</td>
												<td><input name=linkman size=36 value="<?php echo "$linkman";?>"> 
													<font color=#cc0000>*</font></td>
											</tr>
											<tr> 
												<td align=right>&nbsp;</td>
												<td><input name=sex type=radio value=Mr. <?php if($sex == "Mr") echo "checked"; ?>>
													Mr. &nbsp; <input name=sex type=radio value=Ms. <?php if($sex == "Ms") echo "checked"; ?>>
													Ms.</td>
											</tr>
											<tr> 
												<td align=right>Current Email: 
													&nbsp;</td>
												<td><input name=email size=36 value="<?php echo "$email";?>"> 
													<font color=#cc0000>*</font> 
												</td>
											</tr>
											<tr> 
												<td align=right>Alternate Email: 
													&nbsp;</td>
												<td><input name=email2 size=36 value="<?php echo "$email2";?>"> 
												</td>
											</tr>
											<tr> 
												<td align=right>&nbsp;</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: &nbsp;</td>
												<td><input name=tel size=36 value="<?php echo "$tel";?>"> <font 
                  color=#cc0000>*</font></td>
											</tr>
											<tr> 
												<td align=right>&nbsp;</td>
												<td><font color=#3373ae 
                  style="FONT-SIZE: 8pt">(Country Code - Area Code - Number)</font></td>
											</tr>
											<tr> 
												<td align=right>Fax: &nbsp;</td>
												<td><input name=fax size=36 value="<?php echo "$fax";?>"> </td>
											</tr>
											<tr> 
												<td align=right>Street Address: 
													&nbsp;</td>
												<td><input name=address size=45 value="<?php echo "$address";?>"> 
													<font 
                  color=#cc0000>*</font></td>
											</tr>
											<tr> 
												<td align=right>Zip/Postal Code: 
													&nbsp;</td>
												<td><input name=zip size=36 value="<?php echo "$zip";?>"> </td>
											</tr>
											<tr> 
												<td align=right>City: &nbsp;</td>
												<td><input name=city size=36 value="<?php echo "$city";?>"> 
													<font 
                  color=#cc0000>*</font></td>
											</tr>
											<tr> 
												<td align=right>State/Province: 
													&nbsp;</td>
												<td><input name=state size=36 value="<?php echo "$state";?>"> 
												</td>
											</tr>
											<tr> 
												<td align=right>Country/Territory: 
													&nbsp;</td>
												<td><select name=country>
														<option value=CN>China</option>
													</select> <font color=#cc0000>*</font></td>
											</tr>
											<tr> 
												<td align=right>Industry: &nbsp;</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: &nbsp;</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: &nbsp;</td>
												<td height=15><input name=product size=45 value="<?php echo "$product";?>"> 
													<font 
                  color=#cc0000>*</font></td>
											</tr>
											<tr> 
												<td align=right>Homepage: &nbsp;</td>
												<td><input name=homepage size=36 value="<?php echo "$homepage";?>"> 
												</td>
											</tr>
											<tr valign=top> 
												<td align=right>Company Overview: 
													&nbsp;</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>&nbsp;<INPUT type="hidden" name="step_LY" value="ok"></td>
												<td>&nbsp;</td>
											</tr>
											<tr align=middle> 
												<td colspan=2><input name=Submit type=submit value="  Submit  "> 
													&nbsp; &nbsp; <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 + -