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

📄 info.php3

📁 网络同学录程序
💻 PHP3
字号:
<?
/*大家好,我是豆腐
提供原码是我的一贯原则,但是希望大家能够尊重豆腐的工作
希望大家在使用的过程中随时和我联系 roboo@21cn.com
您可以随意修改代码,但是请保留我的注释(如果不保留,我也没办法)
如果您觉得这个程序对您有或多或少的帮助,豆腐希望能够得到您的鼓励
您的鼓励和支持,是我们工作的最大动力
    .  =======
   / \| O   O |
   \ /  \v_'/
    #   _| |_
   (#) (     )
    #\//|* *|\\
    #\/(  *  )/       //豆腐制作,都是精品
    #   =====
    #   (\ /)
    #   || ||
   .#---'| |----.
    #----' -----'
    //哲人说:用我的心换你的心,我们便拥有两颗心
*/
?>
<?
  include("conn.php3");
  include("db.php3");
  session_start();
  $userid=$session_userid;
?>
<?
  $conn=openconn();
  if($cmdDo!=""){
     $SQL="Update " . $DataBaseOwerName . ".Class_userInfo set PAGER='" . $txtPager . "',";
     $SQL=$SQL . "ADDR='" . $txtAddr . "'";
     $SQL=$SQL . ",POSTCODE='" . $txtPostcode . "'";
     $SQL=$SQL . ",MAILADDR='" . $txtMailAddr . "'";
     $SQL=$SQL . ",LIKESAY='" . $txtLikeSay . "'";
     $SQL=$SQL . ",OTHER='" . $txtOther . "'";
     $SQL=$SQL . " where userid='" . $userid . "'";
     $stmt=opensql($conn,$SQL);
  }
  if($cmdSubmit!=""){
     $strBirthSubmit=$selYear . "-" . $selMonth . "-" . $selDay;
     $SQL="Update " . $DataBaseOwerName . ".class_classuser set USERNAME='" . $txtName . "',";
     $SQL=$SQL . "FOLK='" . $cmdBoy . "'";
     $SQL=$SQL . ",BIRTH='" . $strBirthSubmit . "'";
     $SQL=$SQL . ",USEREMAIL='" . $txtMail . "'";
     $SQL=$SQL . ",DEGREE='" . $selDegree . "'";
     $SQL=$SQL . ",QUESTION='" . $txtQuestion . "'";
     $SQL=$SQL . ",ANSWER='" . $txtAnswer . "'";
     $SQL=$SQL . " where userid='" . $userid . "'";
     $stmt=opensql($conn,$SQL);
  }
?>
<?

  $SQL="select * from " . $DataBaseOwerName . ".class_userInfo where userid='" . $userid . "'";
  $stmt1=opensql($conn,$SQL);
  $stmt=fecthrow($stmt1);
?>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="class.css">
<title>个人信息管理</title>
</head>
<BODY>
    <FORM action=<? echo $PHP_SELF; ?>?userid=<? echo $userid?> method="post">
       <table border=1>
          <tr>
             <td class=keyItem>用户代号</td>
             <td><? echo $userid ?></td>
          </tr>
                    <tr>
             <td>传呼</td>
             <td><input type=text name="txtPager"  value="<? echo getcolumn($stmt,"PAGER") ?>" class=editface></td>
          </tr>
                    <tr>
             <td>家庭住址</td>
             <td><input type=text name="txtAddr" value="<? echo getcolumn($stmt,"ADDR") ?>" class=editface></td>
          </tr>
                    <tr>
             <td>邮政编码</td>
             <td><input type=text name="txtPostcode" value="<? echo getcolumn($stmt,"POSTCODE") ?>" class=editface maxlength=6 size=6></td>
          </tr>
                    <tr>
             <td>通讯地址</td>
             <td><input type=text name="txtMailAddr" value="<? echo getcolumn($stmt,"MAILADDR") ?>" class=editface></td>
          </tr>
          <tr>
             <td>至理名言</td>
             <td><input type=text name="txtLikeSay"  value="<? echo getcolumn($stmt,"LIKESAY") ?>" class=editface></td>
          </tr>
                    <tr>
             <td>其他</td>
             <td><input type=text name="txtOther" value="<? echo getcolumn($stmt,"OTHER") ?>" class=editface></td>
          </tr>
       </table>
    <input type=submit value="确定" name="cmdDo" class=buttonface>
    </form>
    <!--登录信息的修改-->
<?
  $SQL="select * from " . $DataBaseOwerName . ".CLASS_CLASSUSER where userid='" . $userid . "'";
  $stmt1=opensql($conn,$SQL);
  $stmt=fecthrow($stmt1);

?>
    <form method="post">
      <TABLE border=1 width=70%>
         <tr>
            <td align=center width=33% class=keyItem>用户编号</td>
            <TD width=33% class=keyItem><? echo $userid ?><input type=hidden value="<? echo $userid ?>" name="txtID"></td>
            <td align=center width=33%></td>
         </TR>
         <tr>
            <td align=center width=33%>用户姓名</td>
            <TD width=33%><font color=red><input type=text name="txtName" maxlength=20 class=editface value="<? echo getcolumn($stmt,"USERNAME")?>"></font></td>
            <td align=center width=33%></td>
         </TR>
         <tr>
            <td align=center width=33%>性别</td>
            <TD width=33%>
               <input type=radio name="cmdBoy"
               <?
                  if(getcolumn($stmt,"FOLK")=="0"){
                     echo "checked";
                  }
               ?> value="0"><img src="boy.jpg" width=20 height=20 alt="帅哥">
               <input type=radio name="cmdBoy"
               <?
                  if(getcolumn($stmt,"FOLK")=="1"){
                     echo "checked";
                  }
               ?>
                value="1"><img src="girl.jpg" width=20 height=20 alt="美眉">
            </td>
            <td align=center width=33%></td>
         </TR>
         <tr>
            <td align=center width=33%>出生日期</td>
            <?
              $strBirth=explode("-",getcolumn($stmt,"BIRTH"));
            ?>
            <td width=33%>
               <input type=text name="selYear" maxlength=4 size=4 class=editface value="<? echo $strBirth[0];?>">年
               <input type=text name="selMonth" maxlength=2 size=2 class=editface value="<? echo $strBirth[1];?>"> 月
               <input type=text name="selDay" maxlength=2 size=2 class=editface value="<? echo $strBirth[2];?>">日
            </td>
         </tr>
         <tr>
            <td align=center>联系Email</td>
            <td><input type=text name="txtMail" maxlength="40" class=editface value="<? echo getcolumn($stmt,"USEREMAIL")?>"></td>
         </tr>
         <tr>
            <td align=center>最高学历</td>
            <TD>
               <select size=1 name="selDegree" class=selectFace>
                  <?
                    $strDegree[0]="小学";
                    $strDegree[1]="中学";
                    $strDegree[2]="高中";
                    $strDegree[3]="大专";
                    $strDegree[4]="本科";
                    $strDegree[5]="硕士";
                    $strDegree[6]="博士";
                    $i=0;
                    for($i=0;$i<7;$i++){
                      ?>
                        <option value="<? echo $strDegree[$i]?>"
                          <?
                            if($strDegree[$i]==getcolumn($stmt,"DEGREE")){
                              echo "selected";
                            }
                          ?>
                        ><? echo $strDegree[$i]?></option>
                      <?
                    }
                  ?>
               </SELECT>
            </td>
         </tr>
         <tr>
            <td align=center>忘记密码的问题</td>
            <td><input type=text maxlength=80 name="txtQuestion" class=editface value="<? echo getcolumn($stmt,"QUESTION")?>"></td>
         </tr>
         <tr>
            <td align=center>问题的答案</td>
            <td><input type=text maxlength=80 name="txtAnswer" class=editface value="<? echo getcolumn($stmt,"ANSWER")?>"></td>
         </tr>

      </table>
      <input type=submit name="cmdSubmit" value="我填完了" class=buttonface>
      <input type=reset value="我要重填" class=buttonface>
      </form>
</BODY>
</html>

⌨️ 快捷键说明

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