|
php+mysql,session頁(yè)面保護(hù),悄悄話功能,照片上傳,在線修改資料,email查詢及自動(dòng)回復(fù),客人模式,
方便的班級(jí)管理
程序清單:
配置部分:
配置文件:class/config.php 數(shù)據(jù)庫(kù)文件:class/mysql.txt 計(jì)數(shù)器文件:class/counter.txt
主程序:
登陸首頁(yè):index.php 成員主頁(yè):main.php 客人主頁(yè):class/guest.php
個(gè)人管理:
班級(jí)通訊錄:class/address.php 個(gè)人資料修改:class/modify.php 上傳照片:class/uploadphoto.php
密碼查詢:class/querypsw.php 悄悄話:privatenote.php
注冊(cè)部分:
注冊(cè)步驟1: class/register_step1.php 注冊(cè)步驟2: class/register_step2.php
照片部分:
班級(jí)照片:class/classphoto.php 學(xué)校照片:class/schoolphoto.php 個(gè)人照片:class/privatephoto.php
留言簿部分:
班級(jí)成員留言簿: 顯示留言:class/notebook/index.php 添加留言:class/notebook/addnote.php
客人留言簿: 顯示留言:class/notebookg/index.php 添加留言:class/notebookg/addnote.php
班級(jí)管理部分:
首頁(yè):superadmin.php 添加成員:class/admin/addmember.php 顯示、刪除成員:class/admin/member.php
修改成員資料:class/admin/editmember.php 修改成員資料步驟2:class/admin/editmember_step2.php
班級(jí)成員留言簿管理: class/notebook/delnote.php 客人留言簿管理: class/notebookg/delnote.php
其它:
幫助文件:readme.txt 圖片:class/image
注意事項(xiàng):
1.先將配置文件config.php改好再上傳,按照mysql.txt內(nèi)容建立數(shù)據(jù)庫(kù)。
2.上傳時(shí)將counter.txt的屬性改為777
3.照片上傳程序在某些主頁(yè)空間無(wú)法實(shí)現(xiàn),大家試試51.NET吧,注意保留class/upload/image目錄。
4.在本機(jī)調(diào)試時(shí),mail()函數(shù)可能會(huì)出錯(cuò),不必理它,上傳到服務(wù)器即可。
5.由于時(shí)間倉(cāng)促,也考慮到照片上傳不容易在個(gè)人主頁(yè)實(shí)現(xiàn),班級(jí)照片、個(gè)人照片等頁(yè)面請(qǐng)大家自己修改吧。
6.本人初學(xué)php,程序尚需進(jìn)一步完善,本程序僅供菜鳥(niǎo)參考。
程序示例:http://medguider.host.wayall.com/
聯(lián)系方式:webmaster@medguider.51.NET
由于程序代碼太多,這里只貼出部分重要代碼。完整程序請(qǐng)到我的主頁(yè)下載:http://www.medguider.com
配置部分:
數(shù)據(jù)庫(kù)文件:class/mysql.txt
create table user (id char(2),user char(12),psw char(8),name char(8),sex char(2),birth char(10),work varchar(50),ad varchar(50),post char(6),ph varchar(30),bp varchar(20),email varchar(35),oicq char(12),photo varchar(255),account varchar(255),count int(4) default '1',signature varchar(255),face int(2));
//成員資料表 id 記錄號(hào) user 用戶名 psw 密碼 name 姓名 sex 性別 birth 生日 work 工作單位 ad 通訊地址 post 郵編 ph 電話 bp 傳呼 email 電子信箱 oicq oicq count 計(jì)數(shù)默認(rèn)值為1
photo 個(gè)人照片 account 個(gè)人說(shuō)明 signature 個(gè)人簽名 face 頭像(default=1)
create table notebook (user char(12),time char(30),ip varchar(16),title varchar(255),nnote text);
//班級(jí)成員留言簿 user 用戶名 time 時(shí)間 ip title 標(biāo)題 nnote 內(nèi)容
create table notebookg (name char(8),email varchar(35),time char(30),face char(2),ip varchar(16),title varchar(255),nnote text);
//訪客留言簿 name 姓名 email time 時(shí)間 face 頭像 ip title 標(biāo)題 nnote 內(nèi)容
create table privatenote (id char(10),fromuser char(12),touser char(12),time char(30),message text,look char(1) default '0');
//悄悄話 id 記錄號(hào) fromuser 發(fā)消息人姓名 touser 接受人用戶名 time 發(fā)出時(shí)間 message 信息 look 是否看過(guò),默認(rèn)值為0
配置文件:class/config.php
<?php
$sitename="杏林同學(xué)錄"; //站點(diǎn)名
$url="http://medguider.host.wayall.com/"; //站點(diǎn)url
$db = mysql_connect("localhost", "root");//這里改為您的mysql用戶名密碼
mysql_select_db("test",$db);
$supervisor="demo"; //超級(jí)管理員名
$superpsw="demo"; //超級(jí)管理員密碼
$superemail="demo@demo.com";//超級(jí)管理員email
$question1="demo"; //注冊(cè)提示問(wèn)題1
$answer1="demo"; //注冊(cè)提示答案1
$question2="demo"; //注冊(cè)提示問(wèn)題2
$answer2="demo"; //注冊(cè)提示答案2
?>
主程序:
登陸首頁(yè):index.php
<html>
<head>
<title>班級(jí)成員登錄</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.deepblue10 { font-family: "宋體"; font-size: 10pt; color: #3333FF; text-decoration: none}
A.purple:hover { font-size: 9pt; color: #3366FF; background-color: #99FFFF; text-decoration: none}
A.purple:link { font-size: 10pt; text-decoration: none}
a:hover { text-decoration: none}
a:visited { text-decoration: none}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<table width="75%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<div align="center"><img src="class/image/classlogo.gif" width="224" height="60"></div>
</td>
</tr>
<tr>
<td height="48"> </td>
</tr>
<tr>
<td>
<table width="75%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#FF9900" bordercolordark="#FFFFFF" class="deepblue10">
<tr>
<td colspan="2">
<div align="center"></div>
</td>
</tr>
<tr>
<td width="33%" height="17">
<div align="center">班級(jí)成員登錄 </div>
</td>
<td width="67%" height="17">
<div align="center"><a href="class/register_step1.php" class="purple">班級(jí)成員注冊(cè)</a></div>
</td>
</tr>
<tr>
<td width="33%" rowspan="2">
<form method="post" action="main.php">
<div align="center">用戶名
<input type="text" name="username" size="8" maxlength="8">
<br>
密碼
<input type="password" name="userpsw" size="8" maxlength="8">
<br>
<br>
<input type="submit" name="Submit" value="登錄">
<input type="reset" name="cancel" value="重寫(xiě)">
</div>
</form>
</td>
<td width="67%" height="21">
<div align="center"><a href="class/guest.php">客人訪問(wèn)</a></div>
</td>
</tr>
<tr>
<td width="67%">
<div align="center">
<p>忘了密碼:<a href="class/querypsw.php" class="deepblue10">向管理員索要密碼</a><br>
</p>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
php技術(shù):杏林同學(xué)錄(一),轉(zhuǎn)載需保留來(lái)源!
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。