日期:2013-01-18  浏览次数:20447 次

个人管理:
   班级通讯录:class/address.php
<?
session_start(); // 开始session
if(!session_is_registered("userregister")||($userregister==""))//检查是否注册,如userregister未注册或session为空值,重新注册.
{
echo "<a href='../index.php'>请重新注册<BR>";
exit;
}
?>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>班级通讯录</TITLE>
<style type="text/css">
<!--
.white12 {  font-size: 12pt; color: #FFFFFF; text-decoration: none}
.blue9 {  font-size: 9pt; color: #9999FF}
-->
</style>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<table width="98%" border="0" cellspacing="0" cellpadding="0" height="65">
  <tr>  
    <td width="35%"><img src="http://edu.cnzz.cn/NewsInfo/image/classlogo.gif" width="224" height="60"> </td>
    <td width="65%">  
      <table width="97%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#CC0000" bordercolordark="#FFFFFF" bordercolor="#FFFFFF">
        <tr>  
          <td><img src="http://edu.cnzz.cn/NewsInfo/image/aslist.gif" width="470" height="70" alt="班级通讯录"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<?php
include "config.php";
$result = mysql_query("SELECT * FROM user",$db);
$row=mysql_num_rows($result);//查看结果有多少行
for ($i=0;$i<=($row-1);$i++) {
   $name=mysql_result($result,$i,'name');
   $sex=mysql_result($result,$i,'sex');
   $birth=mysql_result($result,$i,'birth');
   $ph=mysql_result($result,$i,'ph');
   $bp=mysql_result($result,$i,'bp');
   $email=mysql_result($result,$i,'email');
   $oicq=mysql_result($result,$i,'oicq');
   $work=mysql_result($result,$i,'work');
   $photo=mysql_result($result,$i,'photo');
   $ad=mysql_result($result,$i,'ad');
   $post=mysql_result($result,$i,'post');
   $account=mysql_result($result,$i,'account');
   $face=mysql_result($result,$i,'face');
   $face='image/face/icon'.$face;
   echo "<table width='76%' border='1' cellspacing='0' cellpadding='0' bordercolorlight='#330099' bordercolordark='#FFFFFF' align='center' class='blue9'> <tr bgcolor='#3399FF'> <td colspan='8'>      <div class='white12' align='center'>......................○班级通讯录○....................</div>    </td> </tr> <tr>  <td width='30%'><img src='http://edu.cnzz.cn/NewsInfo/$face.gif' width='32' height='32'> 姓名:$name</td>  <td colspan='6'>性别:$sex</td> <td width='35%'>生日:$birth</td>  </tr> <tr> <td colspan='7'>电话: $ph</td> <td width='34%'>传呼:$bp</td> </tr> <tr>  <td colspan='7'>Email:<a href='mailto:$email'>$email</a></td>  <td width='34%'>oicq:$oicq</td> </tr> <tr> <td colspan='7'>工作单位:$work</td> <td width='34%'>邮编:$post</td></tr> <tr><td colspan='8'>通讯地址:$ad</td></tr> <tr>  <td colspan='8'>个人照片:$photo</td