<?
require"ygl.php";
if(!isset($ses_user_id)||!isset($ses_user_psd)){errorview("对不起，你没有登陆！！");exit;}
$user_login_id=$ses_user_id;
$user_login_psd=$ses_user_psd;
read_user_zl($user_login_id);
if($userpass1!=$ses_user_psd){errorview("非法登陆！");exit;}
if(file_exists("user/$user_login_id.crd"))read_card($user_login_id);
$title="欢迎使用时尚同友录!(http://sstxl.yeah.net)";
readclass();
$ynhead1="1";
$ynhead2="1";
$ynhead3="1";
$title="我的名片";
include"header.php";
if($xiucard!="")
{
if(!empty($mphone))if(!ereg("^[0-9-]{11,15}$",$mphone)){errorview("手机号码不对，请认真填写！！");exit;}
if(!empty($mytel))if(!ereg("^[0-9-]{6,15}$",$mytel)){errorview("住址电话号码不对，请认真填写！！");exit;}
if(!empty($mymail))if(!ereg(".*\@.*\..*",$mymail)){errorview("您的Email输入错误！");exit;}
$fp=fopen("user/$user_login_id.crd","w+") or die("file open error");
$usercard=$user_login_id."\t".$username."\t".$workaddr."\t".$mytel."\t".$mphone."\t".$cardmail."\n";
fwrite($fp,$usercard);
fclose($fp);
print"<META HTTP-EQUIV=REFRESH CONTENT=0;URL=mycard.php>";
}


?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>
   <div align="center"><b><font color="#000066">我的名片</font></b></div>
  </td>
 </tr>
 <tr>
  <td>
   <div align="center"><b></b></div>
  </td>
 </tr>
</table>
<table width="220" border="0" cellspacing="0" cellpadding="3" align="center">
 <tr>
  <td bgcolor="#f2f2f2">
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
     <td width="68%" align=center class=3dfont><?echo $my_name;?></td>
     <td width="32%" align="right"><img src="image/card.gif" width="34" height="34"></td>
    </tr>
    <tr>
     <td colspan="2">
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
       <tr>
        <td>工作单位:<?echo $w_addr;?></td>
       </tr>
       <tr>
        <td>TEL:<?echo $gu_tel;?></td>
       </tr>
       <tr>
        <td>MP:<?echo $m_phone;?></td>
       </tr>
       <tr>
        <td>E-mail:<?echo $my_mail;?></td>
       </tr>
      </table>
     </td>
    </tr>
   </table>
  </td>
 </tr>
</table>

<P align="center"></p>
<form name="form1" method="post" action="mycard.php">
 <table width="400" border="1" cellspacing="0" cellpadding="2" align="center" bordercolorlight="#B5E1F7" bordercolordark="#FFFFFF">
  <tr>
   <td colspan="2" bgcolor="#B5E1F7">
    <div align="center"><b><font color="#000099">设置我的名片</font></b></div>
   </td>
  </tr>
  <tr>
   <td width="98">工作单位：</td>
   <td width="388">
    <input type="text" name="workaddr" size="30" class=text value=<?echo $w_addr;?>>
   </td>
  </tr>
  <tr>
   <td width="98">固定电话：</td>
   <td width="388">
    <input type="text" name="mytel" size="30" class=text value=<?echo $gu_tel;?>>
   </td>
  </tr>
  <tr>
   <td width="98">移动电话：</td>
   <td width="388">
    <input type="text" name="mphone" size="30" class=text value=<?echo $m_phone;?>>
   </td>
  </tr>
  <tr>
   <td width="98">邮箱：</td>
   <td width="388">
    <input type="text" name="cardmail" size="30" class=text value=<?echo $my_mail;?>>
   </td>
  </tr>
  <tr align="center">
   <td colspan="2">
    <input type="submit" name="xiucard" value="提 交" class=text>
    <input type="reset" name="Submit2" value="重 置" class=text>
   </td>
  </tr>
 </table>
<?include"footer.php";?>