欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

基于Sql Server 2008的分布式数据库的实践(五)_PHP教程

程序员文章站 2022-05-23 14:38:35
...

程序设计

-----------------------------------------------------------------------------------------------------------------

Index.php————选择界面,并且实现学生和老师的注册

sql_ini.php————SQL配置文件

./student————学生的后台

./admin————老师的后台

-----------------------------------------------------------------------------------------------------------------

./student

cookie.php————cookie转跳文件

index1.php————后台界面

login.php————登录界面

loginout.php————cookie注销处理

main.php————主界面

menu.php————后台菜单

sclass.php————显示学生选课信息

score.php-————显示学生成绩

sinfo.php————显示*

sql_ini.php————SQL配置文件

up.php————后台表单处理文件

-----------------------------------------------------------------------------------------------------------------

./admin

class.php————显示老师课程信息

cookie.php————cookie转跳文件

index1.php————后台界面

info.php————显示老师资料(有权限设置)

login.php————登录界面

loginout.php————cookie注销处理

main.php————主界面

menu.php————后台菜单

score.php-————登记学生成绩

sql_ini.php————SQL配置文件

up.php————后台表单处理文件

程序解释

学生注册

 ((['addstudent'      
     ((['sname']=='')||(['sex']=='')||(['school']=='')||(['scount']=='')||(['spwd1']=='')||(['spwd2']==''           '请输全信息!'               
     =['sname'     =['sex'     =['school'     =['scount'     =['spwd1'     =['spwd2'     =(1,9999); 
     (==          
          
         ="select * from [V3].[dbo].[V3_student]"          = mssql_query(         
          ( = mssql_fetch_array(,              
             (['scount']==                  
                  ("已经有人申请了这个帐号!"                            
         ="                         VALUES ("..",'".."','".."','".."','".."','".."')"          = mssql_query(         
         (             { "
注册成功!
" { "sql出错!" ("两次密码不对" }

老师注册

 ((['addadmin'      
     ((['name']=='')||(['sex']=='')||(['age']=='')||(['count']=='')||(['pwd']=='')||(['pwd2']=='')||(['ageage']=='')||(['tel']=='')||(['address']==''           '请输全信息!'               
     =['name'     =['sex'     =['age'     =['count'     =['pwd'     =['pwd2'     =['ageage'     =['tel'     =['address'     =1     =(1,9999     
     (==          
          
         ="select * from [V3].[dbo].[teacher]"          = mssql_query(         
          ( = mssql_fetch_array(,              
             (['tcount']==                  
                  ("已经有人申请了这个帐号!"                            ="EXEC [V3].[dbo].[V3_teacher] "..",'".."', '".."', '".."', '".."', '".."', '".."','".."','".."','".."'"          = mssql_query(         (             { "
注册成功!
" { "sql出错!" ("两次密码不对" }

学生登录和查看资料

 
     =['uid'      
      = "SELECT * FROM [V3].[dbo].[V3_student] where [sid]="..""      = mssql_query(     
     =mssql_num_fields(     
     [0]='学号'     [1]='姓名'     [2]='学院'     [3]='帐号'     [4]='密码'       
      "\n"      "\t\n"     (=0;;++          
          "\t\t\n"       "\t\n"      ( = mssql_fetch_array(,          
        "\t\n"              ''              ''              ''              ''              '';
          "\t\n"       "
".[]."
'.["sid"].' '.["sname"].' '.["school"].' '.["scount"].' ******
\n" mssql_free_result();

学生选课

 
 (['action']=='do'      
     =["uid"      
     ="SELECT * FROM [V3].[dbo].[class] where [sid]="..""      = mssql_query(     =0;
      ( = mssql_fetch_array(,          []=['cid'         ++      
     
     ="SELECT * FROM [V3].[dbo].[class] where [sid] = 0"      = mssql_query(     =0;
      ( = mssql_fetch_array(,          []=['tid'         []=['cid'         []=['cname'         ++      
     (=0;;++          []="SELECT * FROM [V3].[dbo].[teacher] where [tid]=".[].""         []= mssql_query([          ( = mssql_fetch_array([],              []=['tsex'             []=['tage'             []=['tname'       
     [0]='课号'     [1]='课名'     [2]='老师名字'     [3]='老师编号'     [4]='老师教学年龄'     [5]='老师性别'     [6]='选课'       
      '
' "\n" "\t\n" "\t\n" "\t\n" (=0;++ "\t\t\n" (=0;;++ = '' ([]=='0' []='男' []='女' (=0;;++ ([]==[
选课系统
".[]."