Initial commit

This commit is contained in:
BIGMAN 2021-10-19 08:37:15 +08:00
parent f7ace44508
commit 9cd514bfbf
77 changed files with 5252 additions and 2 deletions

Binary file not shown.

Binary file not shown.

856
README.md
View File

@ -1,3 +1,855 @@
# textbook-management-system
# 基于php的教材管理系统
基于php的教材管理系统
# 摘 要
随着时代的进步,网络的应用已经相当普及,人们也认识到网络信息量大,传播方便快捷等特点,网上银行、网上商店、网上查分都应运而生。需求促进了技术的发展,而在这其中,PHP技术则因为可以进行复杂的数据库操作、很强的交互性以及方便用户控制管理且简便易学而备受青睐,成为当前相当热门的网络开发技术。MYSQL是一个真正的多用户,多线程的MYSQL数据库服务器。是一个客户机/服务器结构的实现,它由一个服务器守护程序MYSQL和不同的客户程序和库组成。由于其源码的开放性及稳定性,且与网站流行编程语言PHP的完美结合,很多站点都利用其作为后端数据库,获得了广泛应用。
本文首先介绍了PHP技术的工作原理、工作过程及其运行环境和PHP文件的编程特点,以及如何较好地配置PHP的需求环境,既使大家对PHP有更好的了解,同时也有利于更好地使用PHP技术。其次,介绍了教材管理系统MYSQL数据库,包括MYSQL数据库数据类型和数据表,对MYSQL数据库数据操作的核心概念,即数据的添加、删除、修改和查询进行了简单的介绍。
**关键词: **PHP, MySql, Apache, 数据库,数据库实现,数据源 ,电子高校教材
# Abstract
With the development of the computer and technology of the network, it ispopularized day by day in the world that Internet/Intranet uses, in numerousnetwork services, web gives somebody the feeling of finding everything freshand new, and among them, ASP carry on complicated data base operate , verystrong interaction and help user control management and simple and convenientto learn and was favored while being easy to learn, become the quite hotnetwork technology at present.
This article first introduced operationprinciple of the ASP technology, the workingprocess and its running environments and the programming characteristic of theASP document , as well as how doesdispose the ASP demand environment well, since everybody has a betterunderstanding to ASP, simultaneously is also advantageous to uses the ASPtechnology well. Secondly, having introduced the visit method based onWeb data-base of Access relatively in detail, including how to establish andjoin, carry out inquiring and disposal and so on, combining the data-basetechnology and ASP technology theoretically. Thereafter, on the basis of this,this text come out the design and exploitation of a currency-check-affairsystem based on web—webregistration sub-system, which based on network. Mainly recommend the foregoingpreparation (software and hardware) and the design considering of basic constitutesand the implement of functions of the system (including signing up on the net,submitting photograph, querying result, maintain systematically, etc), and thespecialties and security design of this system. Finally expound the matter andshortage of the system, in order to ameliorate better in the future .
**Keywords**PHP, Mysql, Apache, database, DB implement, datasource,E-GovermentAffair
# 第一章 引言
## 1.1 问题的提出
在电子计算机技术发展日新月异的今天计算机技术、网络技术和信息技术的发展和应用早已深入到了各行各业并发挥着它们的巨大潜力特别是网络的高速化、广泛化发展和运用。在我国各类企业的改革一切都在朝着社会化、高效化、智能化发展管理体制的改革更是进行着大手笔。但是国家高校职能的改革程度还远远不够。高校教材管理系统是计算机技术和网络迅速发展的一个高校办公应用解决方案。高校教材管理系统将Internet网络技术与现代管理观念相融合针对信息技术的特点对办公系统进行规划和重构对高校内部信息流进行优化及合理配置生成动态的、安全的、专有的数字化信息源将办公体系全面自动化流程化数字化。以此为桥梁横向连接同事间的交流与协同工作纵向实现上下级一体化的高效办公体系从而更明确、更有效地支持高校的管理和决策。
## 1.2 设计方案
本系统采用B/S结构所有的程序及数据都放在服务器上终端在取得相应的权限后使用Web页面浏览录入修改等功能。在语言方面使用PHP语言在数据库上我们为了节约成本采用了免费的MySQL数据库当然也可以移植到Oracle上服务器使用Apache Web服务器。
处理流程如下图:
![](http://www.write-bug.com/myres/static/uploads/2021/10/19/bbc8acc7b6233a4d15b2356e6e2b5224.writebug)
![](http://www.write-bug.com/myres/static/uploads/2021/10/19/6decf1a271968c9d627a8ca935217952.writebug)
### 1.2.1 功能要求
- **登录**:四种不同权限的人,管理员/系级人员/老师/学生,不同人登录后界面应有所不同,如果相同要做到不同功能并是是所有人都可用
- **教材征订**:教师通过每年的开课计划进行教材征订,征订的结果(订单号,教材编号,教材名,教材类型,作者,出版社及版本号,征订时间,征订人,所订班级,征订数量)由系级人员审批并保存,最后由管理员形成征订表单.之后是由采购员去买,与我们无关
- **教材入库**:和征订单比对后入库(可有可无),入库字段:教材编号,教材名,作者,出版社及版本号,市场价,实购价,数量,入库时间
- **教材发放**:在首页通知什么时间内领书,各班班长过来领.并记录领书人和所属班级.如果教师领书,只能领一本。每笔记录库存相应减少(在管理员界面实现)
- **相关查询**:四种权限人员都可以查看教材情况(教材编号,教材名,教材类型,作者,出版社,库存量)
- **管理员还可查看**:预定清单,发放清单,和财务清单并能开成报表(尽可能是可以查一段时间内的信息)
### 1.2.2 实现形式
采用页面对话交互方式进行,把页面形成工具(DREAMWAVER4)和动态编辑工具PHP以及强大的数据库支持MYSQL融为一体达到完成功能块目的。要求该功能块具有整个系统的统一风格。
### 1.2.3 具体内容
**标题栏部分**
采用“高校教材网”统一标题头,即:左为“网上办公,无纸办公”图片,右为“人民高校为人民”,下为其他功能模块的超链接。
**主体部分**
- 登录:四种不同权限的人,管理员/系级人员/老师/学生,不同人登录后界面应有所不同,如果相同要做到不同功能并是是所有人都可用
- 教材征订:教师通过每年的开课计划进行教材征订,征订的结果(订单号,教材编号,教材名,教材类型,作者,出版社及版本号,征订时间,征订人,所订班级,征订数量)由系级人员审批并保存,最后由管理员形成征订表单.之后是由采购员去买,与我们无关
- 教材入库:和征订单比对后入库(可有可无),入库字段:教材编号,教材名,作者,出版社及版本号,市场价,实购价,数量,入库时间
- 教材发放:在首页通知什么时间内领书,各班班长过来领.并记录领书人和所属班级.如果教师领书,只能领一本.每笔记录库存相应减少(在管理员界面实现)
- 相关查询:四种权限人员都可以查看教材情况(教材编号,教材名,教材类型,作者,出版社,库存量)
- 管理员还可查看:预定清单,发放清单,和财务清单并能开成报表(尽可能是可以查一段时间内的信息)
## 1.3 系统运行环境
本子系统承接高校教材办公网系统,对运行环境的要求是:
### 1.3.1 硬件需求
下列的配置是本次实际操作中的配置:
- 兼容Intel486等级以上的PC电脑
- 64M以上的RAM
- 15GB以上的硬盘空间
- 48倍速以上的光驱
- 1.44软驱
实际操作中可以略低于此配置。
### 1.3.2 软件需求
本系统采用了目前最佳组合LAMPLinux + Apache + MySQL +PHP, 该组合具有更稳定、高效能、更经济的特点。
- 操作系统Linux,采用“飓风Linux”
- Web服务器软件Apache
- 数据库服务器与用户端软件MySQL
- 页面应用软件PHP4
除了上面这些动态网页开发环境的需求还有一些时在安装时需要的软件在Linuz系统中都可以找到或到网上下载
- C语言编辑器将C语言源文件编译成可执行软件的工具
- Apxs制作Apache动态模块的工具
- SecureEdit跨平台上传文件的工具
本次开发过程是先在Window下编写代码然后上传到服务器进行调试。
# 第二章 设计的理论依据
## 2.1 Linux + Apache + MySQL + PHP 最优组合
现在的“网络生态”已经不能只有展示的功能,凡是网上下单、网络购物、检索查找等都是在网上随处可见的服务。这些功能的运作都牵涉到用户的选择、输入数据以及服务端处理数据与回应等动作,所以这样的网页即为互动式网页。也正是本系统所要采用的网络形式。
在HTML文件的结构下使用互动式网页就必须在服务器端另外增加这些处理信息的功能通常是针对用途写一个网页应用程序来负责处理。而以互动式网页存取得数据当然必须能长时间储存所以网页应用程序就要能存取数据库在浏览器上显示互动式网页如下图所示
![](http://www.write-bug.com/myres/static/uploads/2021/10/19/339560da6dc5ddd9819f9aa5f33fa4b2.writebug)
通过以上的介绍您应该已经知道如果是一个网站内容提供者ICP,要提供互动式网页的服务必须要有WWW服务器网页应用程序和数据库这三个成员当然它们都必须在操作系统下执行所以把操作系统也算在内总共四项软件。本系统采用了当今最佳组合――LAMP。
![](http://www.write-bug.com/myres/static/uploads/2021/10/19/a999cb5f469d477c3aaa918e05588eeb.writebug)
LAMP就是Linux、Apache、MySQL加上PHP。首先是Linux操作系统免费这两年在PC地舞台上大放光明尤其在server地使用上悄然威胁微软的地位。Web服务器Apache免费在全球的website有极大的使用率。数据库MySQL (免费! 一个快速、稳定的SQL数据库服务器。PHP免费 扮演处理互动式信息的网页应用程序的角色。除了稳定、高效能之外,它们均免费,是最经济的选择,而且丰富的网络资源与众多的高手绝对不会让你求教无门。
## 2.2、PHP, Apache, Mysql, Linux介绍
### 2.2.1 PHP 简介
PHP的全名即是Hypertext Processor最早的名称由来则是来自PHP ToolsPersonal HomePage ToolsPHP的程序引擎是一个公布源代码的Open Source 成员。PHP是一种“服务器端的HTML嵌入式的描速语言HTML embedded scripting language”。其语法混合了C、Java、Perl以及PHP式的新式语法它比CGI或者Perl可更快速地执行动态网页同时PHP的数据库层操作功能强大这使得PHP语言这几年飞速发展风靡全球。
以下是PHP的基本特点
- 开放源代码――所有的源代码都可以得到
- 免费使用――PHP是一个免费软件尽可放心使用
- 基于服务器端――由于PHP是在Web服务器端运行的所以它的程序可以很大、很复杂而不会降低客户端的运行速度
- 跨平台――PHP程序可以在UNIX、Linux或者Windows操作系统下运行
- 嵌入HTML――PHP语言可以嵌入到HTM内部则易学
- 还有语言简单、效率高、分析XML、数据库模块、文件存取、文本处理、复杂的变量图象处理等特点
最新PHP4.0的特点:
- 别名――通过引用别名为变量赋值,给编程带来极大方便
- 扩充了API模块――提供扩展接口模块
- 个性化的Java支持――PHP4.0和Java的交互
- 对象和数组嵌套――实现功能更加强大的对象以及数组嵌套
- 面向对象的编程――为面向对象的编程、构造类以及对象提供扩展的功能和新特征。
还包括如自动资源释放、布尔类型、进程生成、COM/DCOM支持、与PHP3.0的兼容性很好、配置、加密支持、类型检查、FTP支持、PHP4新增函数或功能增强函数、“Here”打印、HTTP Session fallback系统、ISAPI支持、内存、多维数组、其他类成员函数、对象重载支持、输出缓冲支持、支持引用等特点。编写好后将其放在服务器的提供的Web的目录里通过IE浏览器可看到结果“我的第一个PHP程序”。具体语法参考PHP4.0相关书籍。
### 2.2.2 Apache 简介
本系统的操作所使用的web服务器软件为Apache。Apache是目前全世界的网站使用最多的服务器。在2000年2月十全世界有58.08%的使用率。同样地Apache的优点也是稳定、快速与开放同时也有众多的功能并且可以在不同操作系统下执行。前面的内容已经介绍了web 服务器负责完成传送显示在浏览器的 HTML 文件内容,而数据处理就是 PHP 程序的工作了。所以在服务主机使用PHP时必须将解读PHP程序代码的功能加到Apache ,也就是按装Apache 的PHP 模块module。以往如果要加入PHP模块就必须先将PHP的源代码编译成Apache 的模块再将Apache加上PHP功能模块重新编译。从PHP3开始就支持了Apache 的动态共享对象Dynamic Shared Object , DSO模块的功能也就是说PHP3可以编译DSO模块Apache 只需在需要执行时调用PHP3模块就可以使用PHP3的功能。这样以来即使修改PHP、换装新版本或是重新安装PHP都可以不必 动用Apache ,当然PHP4 也可以编译DSO模块。
### 2.2.3 MySQL 简介
MySQL数据库系统与PHP整合使用是一个高效率的组合。MySQL是一个多用户Multi-user、多线程Multi-thread的SQL数据库系统使用目前最普遍地数据库标准语言SQLStructured Query Language。MySQL包括了服务器端程序与多种 用户端程序及程序库,并且可以在不同平台执行。其特点还有稳定、快速与高灵活性等。
MySQL有瑞典的T.c.X DataKonsultAB公司开发出来开发的主要目的就是以快速、健全以及使用微目标最初的开发即是因为该公司需要能在廉价的主机上执行优于当时各种商用数据库且快速管理庞大数据库的SQL服务器。MySQL是一个还在开发中的数据库系统但是其效能已经非常优秀。在MySQL网站http://www.mysql.org 上你可以看到它们的使用记录是以管理40个以上的数据库超过10000个表同时其中还有500个以上的表超过7百万记录而这些数据总共超过了10Gbytes的容量。
### 2.2.4 Linux简介
操作系统最好的选择当然是使用面费又稳定的Linux系统。Linux是在1991年发展起来的与UNIX兼容的操作系统可以免费使用它的源代码可以自由传播且可任人修改、充实、发展。Linux本身是一个完整的32位的多用户、多任务操作系统。而本次开发过程使用的版本是飓风软件公司出品的国产Linux操作系统。它是经汉化后形成的Linux操作系统。凡是Linux操作系统均可到网上下载。
## 2.3 安装及注意事项
LAMP (Linux + Apache + MySQL + PHP/Perl/Python) 近几年来已经成为Web 社区的事实标准。我们将介绍LAMP组合的安装假定你的机器上已经安装了Linux 如果你对Linux 的安装还有什么问题的话可以去相关的一些开放源码站点论坛上发表贴子向其他网友寻求帮助。也可以向相关的厂商寻求技术支持。本文的LAMP中的 P暂时解释为PHP,A解释为ApacheM解释为MySQLL当然解释为Linux。所有LAMP组合中的软件都是开放源代码产品所以您不必担心产品的价格以及版权问题。相反有广大的开放源码社区开发人员的不断努力这些产品的版本更新速度反而比那些昂贵的专有软件更快。虽然Linux 因为界面问题会让您望而却步但是您不必担心现在这些软件都采用了浏览器管理界面好多都提供phpMyAdmin一个利用PHP 语言在浏览器上管理MySQL的程序以及WebMin通过浏览器来管理系统来让您方便的管理系统。PHP现在的版本已经到了4.0.4pl1是一门面向对象的交叉平台的服务器端脚本语言。可以嵌入HTML语言中可以作为Apache 的模块来运行。下面我们以 tarball(.tar.gz)格式和它相对的是RPM 格式)的版本为例子,来介绍安装过程。
### 2.3.1 安装Mysql
因为RPM包安装非常简单而且成功率高所以我选择这种安装方式。
方法在Xwindows下双击此文件就可以了。在提示符下输入
>rpm -i MySQL-3.23.38-1.i386.rpm
### 2.3.2 安装Apache和PHP
Apache和PHP是在一起安装的这一点一定要理解。
步骤如下:    
- 先确定Apache安装后的路径
- 安装并编译PHP把PHP作为Apache的模块安装到Apache的安装路径即Apache的解压缩的路径
- 安装并编译Apache 因为只有先把PHP作为Apache的模块安装到Apache的安装路径即Apache的解压缩的路径再安装Apache才能使Apache执行PHP文件。
### 2.3.3 开始安装
**解压缩文件**
```
tar zxvf Apache_1.3.9.tar.gz
tar zxvf PHP-4.0.2.tar.gz
```
配置Apache确定Apache安装后的路径
```
cd Apache_1.3.9 ./configure --prefix=/usr/local/apache
```
进入PHP的解压目录输入
```
./configure --with-apache=../Apache_1.3.9 --with-mysql --disable-debug --enable-track-vars
```
注:"../Apache_1.3.9"表示Apache的解压路径这个路径一定要正确我是把Apache和PHP放在同一路径下解压的。 这样做就是让PHP作为Apache的模块和Apache一起安装。
**下一步**编译、安装PHP到Apache的原始目录中
在提示符下输入make
完成之后再输入make install
再将php.ini.dist拷贝到这个目录/usr/local/lib并重命名为php.ini
```
cp php.ini.dist /usr/local/lib
```
**最后一步是安装Apache**
进入Apache的解压目录输入
```
./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a
```
接下来make
```
make install
```
至此安装工作完成了。你还需要改动一些地方才能让Apache执行PHP如下
编辑Apache配置文件
```
/usr/local/apache/conf/httpd.conf
```
找到这一行AddType application/x-httpd-php4 .php4
去掉前面的“#”号。再加上下面的几行:
```
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php4
```
重新启动Apache: cd /usr/local/apache/bin ./apachectl restart
用下面这个文件在浏览器下测试Apache和PHP
```
test.php
<?
phpinfo();
?>
```
如果出现了有关PHP的信息说明你已经成功了注意大小写
利用PhpMyAdmin来管理Mysql:将解压后的PhpMyAdmin目录放到你的Apache的htdocs目录下修改这个文件使之成为中文的界面config.inc.php
找到有“english”单词的一行将“english”改成“chinese_gb”存盘这样就完成了。 这回再到浏览器下执行一下这个目录下的 index.php文件这下应该出现Mysql的管理界面了而且还是中文是不是很舒服
# 第三章 开发过程
## 3.1 设置服务器
这里主要是介绍Linux服务器中最重要的网络服务
**Web服务器的配置**
安装好Apache 服务器后,还需要根据实际情况完成各项参数的配置,其设置文件位于/www/httpd/conf/目录下通常使用3个配置文件httpd.conf, mysql.conf 和srm.conf来配置Apache。
httpd.conf提供了最基本的服务器配置是对守护进程httpd如何运行的技术描速srm.conf是服务器的资源映射文件告诉服务器各种文件的MIME类型以及如何支持这些文件mysql.conf用于配置服务器的访问权限控制不同用户和计算机的访问权限。
用命令:#/www/bin/apachectl restart启动来设置各项参数。
```
a. ServerType standalone //可使httpd进行自我处理占用较少CPU资源
b. ServerRoot “/usr/local” //指定守护进程的运行目录
```
其他参数可根据实际需要设置。
## 3.2 设置数据库
### 3.2.1创建数据库和数据表
教材管理子系统所用的数据库名为jc;
教材管理子系统所用的数据表有5项名分别为users(用户简要信息表),aducat(学历信息表),emergen(意外事故情况表),family(家属信息表),resume(个人简历表)。
- 用命令:
- /# cd /var/www/html 回车进入mysql所在目录
- /#mysql p 回车,根据提示键入密码;
- 用命令create database jc;//完成创建数据库
- 用命令show databases; //显示数据库
- 用命令use jc; //指定使用的数据库
以下将完成各表项的创建:
教材管理系统数据库设计
- 表[xuesheng] xuehao ingming banji xi user_name password
- 表 [laoshi] jiaoshihao xinmin xi user_name password
- 表[xi] xingming xi user_name password
- 表 [admin] name user_name password
- 表[zhengding] dingdan jcbianhao jcming jcleixin zuoze cbshe banben shijian zdren szbanjji zdshuliang
- 表 [ruku] jcbianhao jcming zuoze cbshe banben scjia sgjia suliang rukushijian
- 表 [fafang] shijian lsren ssbanji
- 实体: xuesheng laoshi xi admin zhengding ruku fafang
- 学生属性 学号,姓名,班级,系,账号,密码
- 老师属性 教师号,姓名,系,账号,密码
- 系级人员属性 姓名,系,账号,密码
- 管理员属性 姓名,账号,密码
- 征订属性 订单号,教材编号,教材名,教材类型,作者,出版社及版本号,征订时间,征订人,所订班级,征订数量
- 入库属性 教材编号,教材名,作者,出版社及版本号,市场价,实购价,数量,入库时间.
- 发放属性 时间 领书人 所属班级 数量
### 3.2.2 数据库连接
为了保证程序的安全,编写独立的数据库连接功能程序:
```php
<?php
do{include("../config.php");} while($sql=="");
//数据库所在的主机地址localhost是本机地址
$MYSQL_HOSTNAME = "localhost";
//数据库登录的用户名称
$MYSQL_USERNAME = "root";
//数据库登录的密码
// $MYSQL_PASSWORD = "1111";
//要登录的数据库的名称
// $DATABASE = "jc";
//数据库的连接操作
$link_id=$sql;
?>
```
### 3.2.3 创建数据源
用命令:
```
insert into users
values(1003,’张三’,’男’,’汉’,’教材部’,’部长’,’工程师’,1978-03-24,成都市人民南路3段3号,
12345,6,4,3);
```
其他表数据源类似插入。
用命令:
```
select * from users order by ID;
```
可以查看所录入的数据源。
注:教材管理和职员教材信息管理两部分的功能实现,由薪资管理模块和公共信息管理模块提供。
## 3.3 系统功能实现
教材管理子系统作为高校教材办公网的一个模块将完成对高校系统中公务员的教材管理目前包括教材规章制度、重要通知、最新教材信息、信息查询、管理员登录以及相关功能链接。其中以信息查询和管理员登录为主将实现个人信息的简要和详细查询部门中人员信息的简要和详细查询人员信息的录入、修改、删除、教材管理以及教材管理。采用页面交互式操作用网页制作工具dreamwaver或其它工具实现功能程序用php实现将所有的程序放置在服务器上通过apache提供达到网上办公和无纸办公。可以参考以下功能模块图。
### 3.3.1 系统登录
用户登录高校教材办公网后,点击“登陆”链接进入本子系统。
![](http://www.write-bug.com/myres/static/uploads/2021/10/19/f4ee52dfb281006f072491b25af39356.writebug)
如下图示,进入教材管理子系统主页面:
![](http://www.write-bug.com/myres/static/uploads/2021/10/19/966e6853b4fdb0a8a49a01534c109512.writebug)
### 3.3.2 教材规章制度
教材管理规章制度栏,将向所有公务员提供各种咨询信息,为初到机关的员工讲解具体要求。通过点击即可链接到所要查看项目,可以进入该项的详细内容页面。其具体内容由用户方提供,粘贴到页面即可。如上图左示。
### 3.3.3 重要通知
重要通知栏,将由教材部或科发布其最近最新的教材通知,由管理员在新闻发布管理项,可以添加,修改,删除新闻。如上图中上示。
### 3.3.4 最新教材信息
最新教材信息栏,将由教材部或科发布其最近最新的教材信息,包括与本单位一切相关信息,仍由管理员在新闻发布管理项,可以添加,修改,删除新闻;通过点击相关项,可浏览其详细信息。如上图中下示。
### 3.3.5 信息查询
```php
//选择进入模块login1.php
<? php
switch($choose):
case "c1":
require("infomation1.php"); break;
case "c2":
require("infomation2.php"); break;
case "c3":
require("depart1.php"); break;
case "c4":
require("depart2.php"); break;
default:
require("m6_index.php");
endswitch;
?>
```
- **职员信息查询**将向员工用户提供公务员信息查询员工简要信息查询和其详细信息查询。简要信息查询时当输入员工的帐号和姓名点击“确定”后由程序search1.php提交到数据库中根据ID和NAME从表users中提取数据返回infomation1.php显示详细信息查询时输入员工的帐号、姓名和密码,点击“确定”后由程序modify11.php提交到数据库中根据ID、NAME和PASSW从表users以及aducat、emergen、family、resume中提取数据返回infomation2.php显示。
```php
//个人简要信息search1.php
<?
if($ID AND $NAME){
//判断输入信息,若正确则连接数据库
do{
require("../config.php");
}while($sql==" ");
$str="SELECT NAME,XB,MZ,BM,ZC,ZW,ID,CSNY,XZDZ FROM users WHERE ID='$ID';";
$result=mysql_query($str,$sql);
mysql_close();//关闭数据库
$record=mysql_fetch_row($result);
}
?>
//送出查询结果
```
```php
//个人信息详细查询mofify11.php
<?php
if($ID AND $NAME){ //判断输入信息,若正确则连接数据库
do{
require("../config.php");
}while($sql=="");
$str="SELECT * FROM users WHERE ID='$ID';";
$result=mysql_query($str,$sql);
$record1=mysql_fetch_array($result);
$str2="SELECT * FROM aducat WHERE ID='$ID';";
$result2=mysql_query($str2,$sql);
$record2=mysql_fetch_array($result2);
$str3="SELECT * FROM resume WHERE ID='$ID';";
$result3=mysql_query($str3,$sql);
$record3=mysql_fetch_array($result3);
$str4="SELECT * FROM family WHERE ID='$ID';";
$result4=mysql_query($str4,$sql);
$record4=mysql_fetch_array($result4);
$str5="SELECT * FROM emergen WHERE ID='$ID';";
$result5=mysql_query($str5,$sql);
$record5=mysql_fetch_array($result5);
mysql_close();
}
?>
```
- **部门信息查询**部门简要信息查询和其详细信息查询。即查询该部门员工的信息。部门简要信息查询时只需输入部门名称点击“确定”后程序search2.php根据BM部门名提交到数据库中从表users,中查询到该部门所有员工的简要信息返回depart1.php显示。详细信息查询时需输入你的姓名,帐号,密码,且必须是领导,职务编码为4。然后输入被查询者的姓名和帐号点击“确定”由程序depart12.php提交数据库从表users,aducat,emergen,resume,family中查询返回到depart2.php显示。
```php
//部门信息简要查询search2.php
<?
//判断输入信息,若正确则连接数据库
do{
require("../config.php");
}while($sql==" ");
if($BM){
$select="select * from users where BM='$BM';";
$result=mysql_query($select,$sql);
//$record=mysql_fetch_row($result);
$sn_index=mysql_num_rows($result);
for($index=0;$index<$sn_index;$index++){
$arr[$index]=mysql_fetch_array($result);
};
mysql_close();
}
?>
```
用list_display.php程序来实现逐条显示
```php
<?
//逐条显示
<TR align=center><TD ALIGN=CENTER><?echo $arr[$index][ID]?></TD>
<TD ALIGN=CENTER><?echo $arr[$index][NAME]?></TD>
<TD ALIGN=CENTER><?echo $arr[$index][XB]?></TD>
<TD ALIGN=CENTER><?echo $arr[$index][MZ]?></TD>
<TD ALIGN=CENTER><?echo $arr[$index][BM]?></TD>
<TD ALIGN=CENTER><?echo $arr[$index][ZC]?></TD>
<TD ALIGN=CENTER><?echo $arr[$index][ZW]?></TD>
<TD ALIGN=CENTER><?echo $arr[$index][CSNY]?></TD>
<TD ALIGN=CENTER><?echo $arr[$index][XZDZ]?></TD>
</TR>
?>
```
```php
//部门详细信息查询depart12.php
<?
//判断输入信息,若正确则连接数据库
if($ID AND $NAME AND $PASSW AND $OBJECTN AND $OBJECTID){
do{
require("../config.php");
}while($sql=="");
$str=" SELECT ZWBM FROM users WHERE ID='$ID';";
$result=mysql_query($str,$sql);
$record=mysql_fetch_array($result);
if($record[0]==4){
if($OBJECTID AND $OBJECTN){
//判断输入信息,若正确则连接数据库
do{
require("../config.php");
}while($sql=="");
$str="SELECT * FROM users WHERE ID='$OBJECTID';";
$result=mysql_query($str,$sql);
$record1=mysql_fetch_array($result);
$str2="SELECT * FROM aducat WHERE ID='$OBJECTID';";
$result2=mysql_query($str2,$sql);
$record2=mysql_fetch_array($result2);
$str3="SELECT * FROM resume WHERE ID='$OBJECTID';";
$result3=mysql_query($str3,$sql);
$record3=mysql_fetch_array($result3);
$str4="SELECT * FROM family WHERE ID='$OBJECTID';";
$result4=mysql_query($str4,$sql);
$record4=mysql_fetch_array($result4);
$str5="SELECT * FROM emergen WHERE ID='$OBJECTID';";
$result5=mysql_query($str5,$sql);
$record5=mysql_fetch_array($result5);
mysql_close();
}
}
}
?>
```
### 3.3.6 管理员模块
登录时要求输入管理员的姓名、密码、帐号此处设定为姓名SSSS、密码12345、帐号6666,点击“确定”后由程序login2.php提交到数据库根据输入的信息判断其是否为管理员若是可进入。进入后点击左边的各项即可链接到相应的功能项继续操作。
![](http://www.write-bug.com/myres/static/uploads/2021/10/19/56eeff73a576b168f900dec8435a39ef.writebug)
```php
//管理员登录功能程序
<?php
//判断输入信息,若正确则连接数据库
do{
require("../config.php");
}while($sql==" ");
if($ID=="6666" and $NAME=="ssss" and $PASSW==12345){
$select="select ID from users where ID='$ID' AND NAME='$NAME' AND PASSW='$PASSW';";
$result=mysql_query($select,$sql);
if($result){
require("manager.php");
}
else {
echo"您填入的信息有误,<a href=m6_index.php>请回上一页重新登录!</a>";
}
mysql_close();
}
?>
```
登录成功后进入管理员页面manager.php如下
在页面的左侧选择操作项,右侧绿色区域为工作区。
![](http://www.write-bug.com/myres/static/uploads/2021/10/19/c0fa6f8f764b2979e276c945c0fc672d.writebug)
- **职员信息录入**公务员号ID项必须录入数据直接在文本框中录入数据要求日期类的格式必须为“1990-09-09”身高“170cm”,体重“65kg”,在录入界面中输入数据后按“提交”后由程序insert.php提交数据库对users, aducat, emergen, resume, family 五表插入数据;当提示数据录入成功后,点击返回,可继续录入。
![](http://www.write-bug.com/myres/static/uploads/2021/10/19/dd709c298c772d1ccca216e86ab5b96f.writebug)
```php
//职员信息录入insert.php
<?php
if($ID){
//判断输入信息,若正确则连接数据库
do{
require("../config.php");
}while($sql=="");
//向users表插入数据
$str="INSERT INTO users VALUES('$ID','$NAME','$XB','$MZ','$CSNY','$XZDZ','$ZC','$ZW','$BM','$BMBM','$ZWBM','$MJ','$PASSW','$HYZK','$ZZMM');";
//插入新数据
if(!$str){
echo "can not insert data";
exit;
}
$result=mysql_query($str,$sql);
//送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
//向aducat表中插入数据
$str="INSERT INTO aducat VALUES ('$XL','$SCHOOL','$GRADATE','$MAJOR','$SPECI','$LANGU','$ID');";
//插入新数据
if(!$str){
echo "can not insert data";
exit;
}
$result=mysql_query($str,$sql);
//送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
//向emergen表中插入数据
$str="INSERT INTO emergen VALUES ( '$YWLLR','$YWGX','$YWTX','$YWDH','$YWSYR','$YWSYGX','$YWSYTX','$YWSYDH','$ID');";//插入新数据
if(!$str){
echo "can not insert data";
exit;
}
$result=mysql_query($str,$sql); //送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
//向family表中插入数据
$str="INSERT INTO family VALUES ('$JSCH1','$JSXM1','$JSXB1','$JSCSRQ1','$JSZY1','$JSGZDW1','$JSZZ1', '$JSCH2','$JSXM2','$JSXB2','$JSCSRQ2','$JSZY2','$JSGZDW2','$JSZZ2', '$JSCH3','$JSXM3','$JSXB3','$JSCSRQ3','$JSZY3','$JSGZDW3','$JSZZ3','$ID');";//插入新数据
if(!$str){
echo "can not insert data";
exit;
}
$result=mysql_query($str,$sql); //送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
//向resume表中插入数据
$str="INSERT INTO resume VALUES ('$JG','$SG','$TZ','$XUX','$STZK','$HJ','$SFZH','$HOBBY','$YB','$EML','$HYZK','$ZZMM','$XZ','$ID');";//插入新数据
if(!$str){
echo "can not insert data";
exit;
}
$result=mysql_query($str,$sql); //送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
//向base表中插入数据
$str="INSERT INTO base(id,name,password,bmbm,zwbm) VALUES('$ID','$NAME','$PASSW','$BMBM','$ZWBM');";//插入新数据
if(!$str){
echo "can not insert data";
exit;
}
$result=mysql_query($str,$sql); //送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
mysql_close();//关闭数据库
echo "添加数据成功!<a href=insert.php>返回</a>";
}
else{
echo "添加数据不成功!<a href=insert.php>返回,请检查数据类型的正确性!</a>";
}
?>
```
- **职员信息修改**在修改界面中首先输入被修改者的帐号ID和姓名NAME点击“确定”后由程序modify11.php提交到数据库首先将其原始数据搜索出返回到modify.php中显示在此基础上对数据进行修改修改完毕再由程序modify12.php提交到数据库对数据进行更新users,aducat,emergen,resume,family五表操作提示修改成功后可返回继续下一次修改。
![](http://www.write-bug.com/myres/static/uploads/2021/10/19/b738b317ec8c48f4875231874fe982f2.writebug)
```php
//职员信息修改
<?
if($ID){
//判断公务员号是否存在
do{
require("../config.php");
}while($sql=="");
//update users table
$str="UPDATE users SET NAME='$NAME',XB='$XB',MZ='$MZ',CSNY='$CSNY',XZDZ='$XZDZ', ZC='$ZC',ZW='$ZW',BM='$BM',BMBM='$BMBM',ZWBM='$ZWBM',MJ='$MJ',PASSW='$PASSW',HYZK='$HYZK',ZZMM='$ZZMM' WHERE ID='$ID';"; //更改数据
if(!$str){
echo "can not update data";
exit;
}
$result=mysql_query($str,$sql); //送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
//update aducat table
$str="UPDATE aducat SET XL='$XL',SCHOOL='$SCHOOL',GRADATE='$GRADATE',MAJOR='$MAJOR',SPECI='$SPECI',LANGU='$LANGU' WHERE ID='$ID';"; //更改数据
if(!$str){
echo "can not update data";
exit;
}
$result=mysql_query($str,$sql); //送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
//update emergen table
$str="UPDATE emergen SET YWLLR='$YWLLR',YWGX='$YWGX',YWTX='$YWTX',YWDH='$YWDH',YWSYR='$YWSYR',YWSYGX='$YWSYGX',YWSYTX='$YWSYTX',YWSYDH='$YWSYDH' WHERE ID='$ID';";
if(!$str){
echo "can not update data";
exit;
}
$result=mysql_query($str,$sql); //送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
//update family table
$str="UPDATE family SET SCH1='$JSCH1',JSXM1='$JSXM1',JSXB1='$JSXB1',JSCSRQ1='$JSCSRQ1',JSGZDW1='$JSGZDW1',JSZZ1='$JSZZ1',JSCH2='$JSCH2',JSXM2='$JSXM2',JSXB2='$JSXB2',JSCSRQ2='$JSCSRQ2',JSGZDW2='$JSGZDW2',JSZZ2='$JSZZ2',JSCH3='$JSCH3',JSXM3='$JSXM3',JSXB3='$JSXB3',JSCSRQ3='$JSCSRQ3',JSGZDW3='$JSGZDW3',JSZZ3='$JSZZ3' WHERE ID='$ID';"; //更改数据
if(!$str){
echo "can not update data";
exit;
}
$result=mysql_query($str,$sql); //送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
//update resume table
$str="UPDATE resume SET JG='$JG',SG='$SG',TZ='$TZ',XUX='$XUX',STZK='$STZK',HJ='$HJ',SFZH='$SFZH',HOBBY='$HOBBY',YB='$YB',EML='$EML',HYZK='$HYZK',ZZMM='$ZZMM',XZ='$XZ' WHERE ID='$ID';"; //更改数据
if(!$str){
echo "can not update data";
exit;
}
$result=mysql_query($str,$sql); //送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
//update base table
$str="UPDATE base SET name='$XM',bmbm='$BMBM',zwbm='$ZWBM',password='$MM' WHERE id='$GWYH';";
//更改数据
if(!$str){
echo "can not update data";
exit;
}
$result=mysql_query($str,$sql); //送出查询字符串
if($result==0){
echo "can not query ";
exit;
}
mysql_close(); //关闭数据库
echo "数据修改成功!<a href=modify2.php>返回</a>";
}
?>
```
- **职员信息删除**在删除界面中首先输入被删除者的帐号ID和姓名NAME点击“确定”后程序delete.php根据ID提交到数据库查询是否有此人然后将其删除根据提示信息继续操作。
```php
//职员信息删除
<!---Deleteuser php script begins here--->
<?php
if($ID and $NAME){
//判断输入信息,若正确则连接数据库
do{
require("../config.php");
}while($sql==" ");
//删除users表中某一信息
$deleteresult="DELETE FROM users where NAME='$NAME' AND ID='$ID'";
$result=mysql_query($deleteresult, $sql);
if(!result){
echo "can not query";
exit;
}
$affected_rows=mysql_affected_rows( $sql);
//删除aducat表中某一信息
$deleteresult ="DELETE FROM aducat WHERE ID='$ID'";
$result=mysql_query($deleteresult, $sql);
if(!result){
echo "can not query";
exit;
}
$affected_rows=mysql_affected_rows( $sql);
//删除family表中某一信息
$deleteresult ="DELETE FROM family WHERE ID='$ID'"; $result=mysql_query($deleteresult, $sql);
if(!result){
echo "can not query";
exit;
}
$affected_rows=mysql_affected_rows( $sql);
//删除resume表中某一信息
$deleteresult ="DELETE FROM resume WHERE ID='$ID'"; $result=mysql_query($deleteresult, $sql);
if(!result){
echo "can not query";
exit;
}
$affected_rows=mysql_affected_rows( $sql);
//删除emergen表中某一信息
$deleteresult ="DELETE FROM emergen WHERE ID='$ID'";
$result=mysql_query($deleteresult, $sql);
if(!result){
echo "can not query";
exit;
}
$affected_rows=mysql_affected_rows( $sql);
//删除base表中某一信息
$deleteresult ="DELETE FROM base WHERE id = '$ID'";
$result=mysql_query($deleteresult, $sql);
if(!result){
echo "can not query";
exit;
}
$affected_rows=mysql_affected_rows( $sql);
mysql_close();
echo "<b>$NAME</b> 已经被成功的删除了.";
}
?>
```
- **教材信息管理**:具备录入,修改,删除;同上点击链接后,根据提示信息继续操作。该块由教材管理栏完成。
![](http://www.write-bug.com/myres/static/uploads/2021/10/19/ae061e7248f6ccf8146a7c5a5dbba8cd.writebug)
- **教材管理**:同上点击链接后,根据提示信息继续操作。
- **新闻发布管理**:目前由于时间原因暂未实现,若要实现可与系统主页中的新闻管理相似处理。
- **职员相片管理**:目前由于时间原因暂未实现,具备相片上传、相片修改、相片删除功能。暂时实现相片上传功能,后继实现。
### 3.3.7 相关功能链接
该部分用于提供客户的功能扩展,暂未连接功能项,留待客户具体需求提出后实现。

View File

@ -0,0 +1,10 @@
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_jc = "localhost";
$database_jc = "jc";
$username_jc = "root";
$password_jc = "1111";
$jc = mysql_pconnect($hostname_jc, $username_jc, $password_jc) or trigger_error(mysql_error(),E_USER_ERROR);
?>

View File

@ -0,0 +1,109 @@
<?php // <ERRORS><ERROR><DESCRIPTION>Your testing server do not has support for PHP pages</DESCRIPTION></ERROR>\n</ERRORS>
$debug_to_file = false;
function log_messages($error_message){
global $f, $debug_to_file;
if ($debug_to_file === true){
if (!is_resource($f)){
@ini_set('display_errors', 1);
@error_reporting(E_ALL);
$f = @fopen('log.txt', 'a');
}
if (is_resource($f)){
return @fwrite($f, $error_message."\n");
}
}
return false;
}
function create_error($error_msg = '', $line = -1){
if ($error_msg != ''){
return '<ERRORS><ERROR><DESCRIPTION>'.$error_msg.'</DESCRIPTION></ERROR></ERRORS>\n';
}else{
return '<ERRORS><ERROR><DESCRIPTION> Unidentified Connection Error at Line '.$line.'</DESCRIPTION></ERROR></ERRORS>\n';
}
}
log_messages("\n--------------------------------");
// what parameters were sent ?!
foreach($_POST as $key=>$value) {
if (strtoupper($key) != 'PASSWORD'){
log_messages('$_POST["'.$key.'"] = \''.$value."';");
}
}
// We need these information only once when the test button is hit
if (isset($_POST['opCode']) && $_POST['opCode'] == 'IsOpen' ){
// What PHP version
log_messages("\nPHP-Version: ".phpversion());
// What OS System is running on
log_messages('PHP-OS: '.PHP_OS);
// How PHP is installed (CGI, ISAPI, FastCGI)
// !!!! Major difference exists on these servers for $_ENV, $_SERVER
log_messages('PHP-SAPI-NAME: '.php_sapi_name());
// MySQL, mbstring modules are installed ?!
log_messages('PHP-Extensions: '.var_export(get_loaded_extensions(),true));
}
if(extension_loaded('mbstring'))
{
$acceptCharsetHeader = 'Accept-Charset: ' . mb_internal_encoding();
header( $acceptCharsetHeader );
$head = '<html><head><meta http-equiv=\'Content-Type\' content=\'text/html; charset=' . mb_http_output() . '\'></head>';
echo $head;
}else{
echo '<html><head></head>';
}
// Build connection object
if (isset($_POST['Type']) && $_POST['Type'] == 'MYSQL')
{
require("./mysql.php");
$oConn = new MySqlConnection(@$_POST['ConnectionString'], @$_POST['Timeout'], @$_POST['Host'], @$_POST['Database'], @$_POST['UserName'], @$_POST['Password']);
if (!isset($oConn) || $oConn == false){
log_messages("\n".'MySQL Connection Object initialisation failed'."\n\n".@$error);
}else{
log_messages("\n".'MySQL Connection Object Created'."\n\n");
}
}else{
$error=create_error('The files from the _mmServerScripts folder are for the server model PHP-MySQL. You try to connect to a database using a different server model '.@$_POST['Type'].".\n\nPlease remove this folder outside the Dreamweaver environment on both local and testing machines and try again.",__LINE__);
log_messages("\nError Sent:\n\n\t".@$error."\n\n\n");
echo $error.'</HTML>';
return;
}
// Process opCode
if (isset($oConn) && $oConn)
{
$oConn->Open();
if ($_POST['opCode'] == 'IsOpen'){
$answer = $oConn->TestOpen();
}elseif (is_resource($oConn->connectionId) && $oConn->isOpen){
switch ($_POST['opCode']){
case 'GetTables': $answer = $oConn->GetTables(@$_POST['Database']); break;
case 'GetColsOfTable': $answer = $oConn->GetColumnsOfTable(@$_POST['TableName']); break;
case 'ExecuteSQL': $answer = $oConn->ExecuteSQL(@$_POST['SQL'], @$_POST['MaxRows']); break;
case 'GetODBCDSNs': $answer = $oConn->GetDatabaseList(); break;
case 'SupportsProcedure': $answer = $oConn->SupportsProcedure(); break;
case 'GetProviderTypes': $answer = $oConn->GetProviderTypes(); break;
case 'GetViews': $answer = $oConn->GetViews(); break;
case 'GetProcedures': $answer = $oConn->GetProcedures(); break;
case 'GetParametersOfProcedure': $answer = $oConn->GetParametersOfProcedure(@$_POST['ProcName']); break;
case 'ReturnsResultset': $answer = $oConn->ReturnsResultSet($_POST['RRProcName']); break;
case 'ExecuteSP': $answer = $oConn->ExecuteSP(@$_POST['ExecProcName'], 0, @$_POST['ExecProcParameters']); break;
case 'GetKeysOfTable': $answer = $oConn->GetPrimaryKeysOfTable(@$_POST['TableName']); break;
default: $answer = create_error('The \''.$_POST['opCode'].'\' command is not supported.'); break;
}
}
$oConn->Close();
}else{
$answer = create_error('The Connection Module was not initialized properly for an unknown reason.');
}
log_messages("\nAnswer From Database:\n\n\t".@$answer."\n\n\n");
echo $answer;
echo '</html>';
?>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<dwsync>
<file name="MMHTTPDB.php" local="128531112327255593" remote="0" testing="128531112320000000" />
<file name="mysql.php" local="128531112327255593" remote="0" testing="128531112320000000" />
</dwsync>

View File

@ -0,0 +1,412 @@
<?php
// If this file is not included from the MMHTTPDB possible hacking problem.
if (!function_exists('create_error')){
die();
}
define('MYSQL_NOT_EXISTS', create_error("Your PHP server doesn't have the MySQL module loaded or you can't use the mysql_(p)connect functions."));
define('CONN_NOT_OPEN_GET_TABLES', create_error('The Connection is not opened when trying to retrieve the tables. Please refer to www.interaktonline.com for more information.'));
define('CONN_NOT_OPEN_GET_DB_LIST', create_error('The Connection is not opened when trying to retrieve the database list. Please refer to www.interaktonline.com for more information.'));
if (!function_exists('mysql_connect') || !function_exists('mysql_pconnect') || !extension_loaded('mysql')){
echo MYSQL_NOT_EXISTS;
die();
}
// Now let's handle the crashes or any other PHP errors that we can catch
function KT_ErrorHandler($errno, $errstr, $errfile, $errline) {
global $f, $already_sent;
$errortype = array (
1 => "Error",
2 => "Warning",
4 => "Parsing Error",
8 => "Notice",
16 => "Core Error",
32 => "Core Warning",
64 => "Compile Error",
128 => "Compile Warning",
256 => "User Error",
512 => "User Warning",
1024=> "User Notice",
2048=> "E_ALL",
2049=> "PHP5 E_STRICT"
);
$str = sprintf("[%s]\n%s:\t%s\nFile:\t\t'%s'\nLine:\t\t%s\n\n", date('d-m-Y H:i:s'),(isset($errortype[@$errno])?$errortype[@$errno]:('Unknown '.$errno)),@$errstr,@$errfile,@$errline);
if (error_reporting() != 0) {
@fwrite($f, $str);
if (@$errno == 2 && isset($already_sent) && !$already_sent==true){
$error = '<ERRORS>'."\n";
$error .= '<ERROR><DESCRIPTION>An Warning Type error appeared. The error is logged into the log file.</DESCRIPTION></ERROR>'."\n";
$error .= '</ERRORS>'."\n";
$already_sent = true;
echo $error;
}
}
}
if ($debug_to_file){
$old_error_handler = set_error_handler("KT_ErrorHandler");
}
class MySqlConnection
{
/*
// The 'var' keyword is deprecated in PHP5 ... we will define these variables at runtime.
var $isOpen;
var $hostname;
var $database;
var $username;
var $password;
var $timeout;
var $connectionId;
var $error;
*/
function MySqlConnection($ConnectionString, $Timeout, $Host, $DB, $UID, $Pwd)
{
$this->isOpen = false;
$this->timeout = $Timeout;
$this->error = '';
if( $Host ) {
$this->hostname = $Host;
}
elseif( ereg("host=([^;]+);", $ConnectionString, $ret) ) {
$this->hostname = $ret[1];
}
if( $DB ) {
$this->database = $DB;
}
elseif( ereg("db=([^;]+);", $ConnectionString, $ret) ) {
$this->database = $ret[1];
}
if( $UID ) {
$this->username = $UID;
}
elseif( ereg("uid=([^;]+);", $ConnectionString, $ret) ) {
$this->username = $ret[1];
}
if( $Pwd ) {
$this->password = $Pwd;
}
elseif( ereg("pwd=([^;]+);", $ConnectionString, $ret) ) {
$this->password = $ret[1];
}
}
function Open()
{
$this->connectionId = mysql_connect($this->hostname, $this->username, $this->password);
if (isset($this->connectionId) && $this->connectionId && is_resource($this->connectionId))
{
$this->isOpen = ($this->database == "") ? true : mysql_select_db($this->database, $this->connectionId);
}
else
{
$this->isOpen = false;
}
}
function TestOpen()
{
return ($this->isOpen) ? '<TEST status=true></TEST>' : $this->HandleException();
}
function Close()
{
if (is_resource($this->connectionId) && $this->isOpen)
{
if (mysql_close($this->connectionId))
{
$this->isOpen = false;
unset($this->connectionId);
}
}
}
function GetTables($table_name = '')
{
$xmlOutput = "";
if ($this->isOpen && isset($this->connectionId) && is_resource($this->connectionId)){
// 1. mysql_list_tables and mysql_tablename are deprecated in PHP5
// 2. For backward compatibility GetTables don't have any parameters
if ($table_name === ''){
$table_name = @$_POST['Database'];
}
$sql = ' SHOW TABLES FROM ' . $table_name;
$results = mysql_query($sql, $this->connectionId) or $this->HandleException();
$xmlOutput = "<RESULTSET><FIELDS>";
// Columns are referenced by index, so Schema and
// Catalog must be specified even though they are not supported
$xmlOutput .= '<FIELD><NAME>TABLE_CATALOG</NAME></FIELD>'; // column 0 (zero-based)
$xmlOutput .= '<FIELD><NAME>TABLE_SCHEMA</NAME></FIELD>'; // column 1
$xmlOutput .= '<FIELD><NAME>TABLE_NAME</NAME></FIELD>'; // column 2
$xmlOutput .= "</FIELDS><ROWS>";
if (is_resource($results) && mysql_num_rows($results) > 0){
while ($row = mysql_fetch_array($results)){
$xmlOutput .= '<ROW><VALUE/><VALUE/><VALUE>' . $row[0]. '</VALUE></ROW>';
}
}
$xmlOutput .= "</ROWS></RESULTSET>";
}
return $xmlOutput;
}
function GetViews()
{
// not supported
return "<RESULTSET><FIELDS></FIELDS><ROWS></ROWS></RESULTSET>";
}
function GetProcedures()
{
// not supported
return "<RESULTSET><FIELDS></FIELDS><ROWS></ROWS></RESULTSET>";
}
function GetColumnsOfTable($TableName)
{
$xmlOutput = "";
$query = "DESCRIBE $TableName";
$result = mysql_query($query) or $this->HandleException();
if ($result)
{
$xmlOutput = "<RESULTSET><FIELDS>";
// Columns are referenced by index, so Schema and
// Catalog must be specified even though they are not supported
$xmlOutput .= "<FIELD><NAME>TABLE_CATALOG</NAME></FIELD>"; // column 0 (zero-based)
$xmlOutput .= "<FIELD><NAME>TABLE_SCHEMA</NAME></FIELD>"; // column 1
$xmlOutput .= "<FIELD><NAME>TABLE_NAME</NAME></FIELD>"; // column 2
$xmlOutput .= "<FIELD><NAME>COLUMN_NAME</NAME></FIELD>";
$xmlOutput .= "<FIELD><NAME>DATA_TYPE</NAME></FIELD>";
$xmlOutput .= "<FIELD><NAME>IS_NULLABLE</NAME></FIELD>";
$xmlOutput .= "<FIELD><NAME>COLUMN_SIZE</NAME></FIELD>";
$xmlOutput .= "</FIELDS><ROWS>";
// The fields returned from DESCRIBE are: Field, Type, Null, Key, Default, Extra
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$xmlOutput .= "<ROW><VALUE/><VALUE/><VALUE/>";
// Separate type from size. Format is: type(size)
if (ereg("(.*)\\((.*)\\)", $row["Type"], $ret))
{
$type = $ret[1];
$size = $ret[2];
}
else
{
$type = $row["Type"];
$size = "";
}
// MySQL sets nullable to "YES" or "", so we need to set "NO"
$null = $row["Null"];
if ($null == "")
$null = "NO";
$xmlOutput .= "<VALUE>" . $row["Field"] . "</VALUE>";
$xmlOutput .= "<VALUE>" . $type . "</VALUE>";
$xmlOutput .= "<VALUE>" . $null . "</VALUE>";
$xmlOutput .= "<VALUE>" . $size . "</VALUE></ROW>";
}
mysql_free_result($result);
$xmlOutput .= "</ROWS></RESULTSET>";
}
return $xmlOutput;
}
function GetParametersOfProcedure($ProcedureName, $SchemaName, $CatalogName)
{
// not supported on MySQL
return '<RESULTSET><FIELDS></FIELDS><ROWS></ROWS></RESULTSET>';
}
function ExecuteSQL($aStatement, $MaxRows)
{
if ( get_magic_quotes_gpc() )
{
$aStatement = stripslashes( $aStatement ) ;
}
$xmlOutput = "";
$result = mysql_query($aStatement) or $this->HandleException();
if (isset($result) && is_resource($result))
{
$xmlOutput = "<RESULTSET><FIELDS>";
$fieldCount = mysql_num_fields($result);
for ($i=0; $i < $fieldCount; $i++)
{
$meta = mysql_fetch_field($result);
if ($meta)
{
$xmlOutput .= '<FIELD';
$xmlOutput .= ' type="' . $meta->type;
$xmlOutput .= '" max_length="' . $meta->max_length;
$xmlOutput .= '" table="' . $meta->table;
$xmlOutput .= '" not_null="' . $meta->not_null;
$xmlOutput .= '" numeric="' . $meta->numeric;
$xmlOutput .= '" unsigned="' . $meta->unsigned;
$xmlOutput .= '" zerofill="' . $meta->zerofill;
$xmlOutput .= '" primary_key="' . $meta->primary_key;
$xmlOutput .= '" multiple_key="'. $meta->multiple_key;
$xmlOutput .= '" unique_key="' . $meta->unique_key;
$xmlOutput .= '"><NAME>' . $meta->name;
$xmlOutput .= '</NAME></FIELD>';
}
}
$xmlOutput .= "</FIELDS><ROWS>";
$row = mysql_fetch_assoc($result);
for ($i=0; $row && ($i < $MaxRows); $i++)
{
$xmlOutput .= "<ROW>";
foreach ($row as $key => $value)
{
$xmlOutput .= "<VALUE>";
$xmlOutput .= htmlspecialchars($value);
$xmlOutput .= "</VALUE>";
}
$xmlOutput .= "</ROW>";
$row = mysql_fetch_assoc($result);
}
mysql_free_result($result);
$xmlOutput .= "</ROWS></RESULTSET>";
}
return $xmlOutput;
}
function GetProviderTypes()
{
return '<RESULTSET><FIELDS></FIELDS><ROWS></ROWS></RESULTSET>';
}
function ExecuteSP($aProcStatement, $TimeOut, $Parameters)
{
return '<RESULTSET><FIELDS></FIELDS><ROWS></ROWS></RESULTSET>';
}
function ReturnsResultSet($ProcedureName)
{
return '<RETURNSRESULTSET status=false></RETURNSRESULTSET>';
}
function SupportsProcedure()
{
return '<SUPPORTSPROCEDURE status=false></SUPPORTSPROCEDURE>';
}
/*
* HandleException added by InterAKT for ease in database translation answer
*/
function HandleException()
{
global $debug_to_file, $f;
$this->error = create_error(' MySQL Error#: '. ((int)mysql_errno()) . "\n\n".mysql_error());
log_messages($this->error);
die($this->error.'</HTML>');
}
function GetDatabaseList()
{
$xmlOutput = '<RESULTSET><FIELDS><FIELD><NAME>NAME</NAME></FIELD></FIELDS><ROWS>';
if (isset($this->connectionId) && is_resource($this->connectionId)){
$dbList = mysql_list_dbs($this->connectionId);
while ($row = mysql_fetch_object($dbList))
{
$xmlOutput .= '<ROW><VALUE>' . $row->Database . '</VALUE></ROW>';
}
}else{
$this->error = CONN_NOT_OPEN_GET_DB_LIST;
return $this->error;
}
$xmlOutput .= '</ROWS></RESULTSET>';
return $xmlOutput;
}
function GetPrimaryKeysOfTable($TableName)
{
$xmlOutput = '';
$query = "DESCRIBE $TableName";
$result = mysql_query($query) or $this->HandleException();
if ($result)
{
$xmlOutput = '<RESULTSET><FIELDS>';
// Columns are referenced by index, so Schema and
// Catalog must be specified even though they are not supported
$xmlOutput .= '<FIELD><NAME>TABLE_CATALOG</NAME></FIELD>'; // column 0 (zero-based)
$xmlOutput .= '<FIELD><NAME>TABLE_SCHEMA</NAME></FIELD>'; // column 1
$xmlOutput .= '<FIELD><NAME>TABLE_NAME</NAME></FIELD>'; // column 2
$xmlOutput .= '<FIELD><NAME>COLUMN_NAME</NAME></FIELD>';
$xmlOutput .= '<FIELD><NAME>DATA_TYPE</NAME></FIELD>';
$xmlOutput .= '<FIELD><NAME>IS_NULLABLE</NAME></FIELD>';
$xmlOutput .= '<FIELD><NAME>COLUMN_SIZE</NAME></FIELD>';
$xmlOutput .= '</FIELDS><ROWS>';
// The fields returned from DESCRIBE are: Field, Type, Null, Key, Default, Extra
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
if (strtoupper($row['Key']) == 'PRI'){
$xmlOutput .= '<ROW><VALUE/><VALUE/><VALUE/>';
// Separate type from size. Format is: type(size)
if (ereg("(.*)\\((.*)\\)", $row['Type'], $ret))
{
$type = $ret[1];
$size = $ret[2];
}
else
{
$type = $row['Type'];
$size = '';
}
// MySQL sets nullable to "YES" or "", so we need to set "NO"
$null = $row['Null'];
if ($null == '')
$null = 'NO';
$xmlOutput .= '<VALUE>' . $row['Field'] . '</VALUE>';
$xmlOutput .= '<VALUE>' . $type . '</VALUE>';
$xmlOutput .= '<VALUE>' . $null . '</VALUE>';
$xmlOutput .= '<VALUE>' . $size . '</VALUE></ROW>';
}
}
mysql_free_result($result);
$xmlOutput .= '</ROWS></RESULTSET>';
}
return $xmlOutput;
}
} // class MySqlConnection
?>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="PageAccessControlMethod" value="dontUseAccessList" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:jcbianhao;datatype:string,name:jcming;datatype:string,name:zuozhe;datatype:string,name:cbshe;datatype:string,name:banben;datatype:string" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:xingming;datatype:string,name:xi;datatype:string,name:user_name;datatype:string,name:password;datatype:string" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:jcbianhao;datatype:string,name:jcming;datatype:string,name:zuozhe;datatype:string,name:cbshe;datatype:string,name:banben;datatype:string,name:scjia;datatype:real,name:sgjia;datatype:real,name:suliang;datatype:int,name:rukushijian;datatype:blob" />
</info>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:jcbianhao;datatype:string,name:jcming;datatype:string,name:zuozhe;datatype:string,name:cbshe;datatype:string,name:banben;datatype:string,name:scjia;datatype:real,name:sgjia;datatype:real,name:suliang;datatype:int,name:rukushijian;datatype:blob" />
<infoitem key="UD_Recordset2" value="name:fa;datatype:real" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:jcbianhao;datatype:string,name:jcming;datatype:string,name:zuozhe;datatype:string,name:cbshe;datatype:string,name:banben;datatype:string" />
</info>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:dingdan;datatype:string,name:jcbianhao;datatype:string,name:jcming;datatype:string,name:zuozhe;datatype:string,name:cbshe;datatype:string,name:banben;datatype:string,name:shijian;datatype:string,name:zdren;datatype:string,name:szbanji;datatype:string,name:zdshuliang;datatype:int" />
<infoitem key="UD_Recordset2" value="name:jcbianhao;datatype:string,name:jcming;datatype:string,name:zuozhe;datatype:string,name:cbshe;datatype:string,name:banben;datatype:string,name:scjia;datatype:real,name:sgjia;datatype:real,name:suliang;datatype:int,name:rukushijian;datatype:blob" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:dingdan;datatype:string,name:jcbianhao;datatype:string,name:jcming;datatype:string,name:zuozhe;datatype:string,name:cbshe;datatype:string,name:banben;datatype:string,name:shijian;datatype:string,name:zdren;datatype:string,name:szbanji;datatype:string,name:zdshuliang;datatype:int" />
</info>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:jcbianhao;datatype:string,name:jcming;datatype:string,name:zuozhe;datatype:string,name:cbshe;datatype:string,name:banben;datatype:string" />
<infoitem key="UD_Recordset2" value="name:dingdan;datatype:string,name:jcbianhao;datatype:string,name:jcming;datatype:string,name:zuozhe;datatype:string,name:cbshe;datatype:string,name:banben;datatype:string,name:shijian;datatype:string,name:zdren;datatype:string,name:szbanji;datatype:string,name:zdshuliang;datatype:int" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:jiaoshihao;datatype:string,name:xingming;datatype:string,name:xi;datatype:string,name:user_name;datatype:string,name:password;datatype:string" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:jiaoshihao;datatype:string,name:xingming;datatype:string,name:xi;datatype:string,name:user_name;datatype:string,name:password;datatype:string" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:name;datatype:string,name:user_name;datatype:string,name:password;datatype:string" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:name;datatype:string,name:user_name;datatype:string,name:password;datatype:string" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:name;datatype:string,name:user_name;datatype:string,name:password;datatype:string" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:name;datatype:string,name:user_name;datatype:string,name:password;datatype:string" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:xuehao;datatype:string,name:xingming;datatype:string,name:banji;datatype:string,name:xi;datatype:string,name:user_name;datatype:string,name:password;datatype:string" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:xingming;datatype:string,name:xi;datatype:string,name:user_name;datatype:string,name:password;datatype:string" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:xuehao;datatype:string,name:xingming;datatype:string,name:banji;datatype:string,name:xi;datatype:string,name:user_name;datatype:string,name:password;datatype:string" />
</info>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_Recordset1" value="name:jcbianhao;datatype:string,name:jcming;datatype:string,name:zuozhe;datatype:string,name:cbshe;datatype:string,name:banben;datatype:string" />
</info>

View File

@ -0,0 +1,12 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>PHP教材管理系统</title>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<?php include("foot.php");?>
</body>
</html>

View File

@ -0,0 +1,51 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
if ((isset($_GET['jcbianhao'])) && ($_GET['jcbianhao'] != "")) {
$deleteSQL = sprintf("DELETE FROM jiaocai WHERE jcbianhao=%s",
GetSQLValueString($_GET['jcbianhao'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error());
$deleteGoTo = "cg5.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {
font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body>
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="txt">操作成功!<a href="user.php">点击返回</a></td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {
font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body>
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="txt">操作成功!<a href="xxgl.php">点击返回</a></td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {
font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body>
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="txt">操作成功!<a href="jsgl.php">点击返回</a></td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {
font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body>
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="txt">操作成功!<a href="xgl.php">点击返回</a></td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {
font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body>
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="txt">操作成功!<a href="jcguanli.php">点击返回</a></td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {
font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body>
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="txt">操作成功!<a href="jczhengding.php">点击返回</a></td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {
font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body>
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="txt">操作成功!<a href="jcruku.php">点击返回</a></td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {
font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body>
<table width="760" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="txt">操作成功!<a href="jcfafang.php">点击返回</a></td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,119 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE jiaocai SET jcming=%s, zuozhe=%s, cbshe=%s, banben=%s WHERE jcbianhao=%s",
GetSQLValueString($_POST['jcming'], "text"),
GetSQLValueString($_POST['zuozhe'], "text"),
GetSQLValueString($_POST['cbshe'], "text"),
GetSQLValueString($_POST['banben'], "text"),
GetSQLValueString($_POST['jcbianhao'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error());
$updateGoTo = "cg5.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$colname_Recordset1 = "-1";
if (isset($_GET['jcbianhao'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['jcbianhao'] : addslashes($_GET['jcbianhao']);
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = sprintf("SELECT * FROM jiaocai WHERE jcbianhao = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="20" colspan="2" align="center">添加教材</td>
</tr>
<tr>
<td width="102" align="right">教材编号:</td>
<td width="198"><input name="jcbianhao" type="text" id="jcbianhao" value="<?php echo $row_Recordset1['jcbianhao']; ?>" /></td>
</tr>
<tr>
<td align="right">教材名:</td>
<td><input name="jcming" type="text" id="jcming" value="<?php echo $row_Recordset1['jcming']; ?>" /></td>
</tr>
<tr>
<td align="right">作者:</td>
<td><input name="zuozhe" type="text" id="zuozhe" value="<?php echo $row_Recordset1['zuozhe']; ?>" /></td>
</tr>
<tr>
<td align="right">出版社:</td>
<td><input name="cbshe" type="text" id="cbshe" value="<?php echo $row_Recordset1['cbshe']; ?>" /></td>
</tr>
<tr>
<td align="right">版本号:</td>
<td><input name="banben" type="text" id="banben" value="<?php echo $row_Recordset1['banben']; ?>" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="修改" />
</label>
<input type="hidden" name="MM_update" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,26 @@
<link href="x.css" rel="stylesheet" type="text/css" />
<link href="txt.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
-->
</style>
<table width="760" height="5" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="760" height="1" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="x">
<tr>
<td bgcolor="#FFFFFF"></td>
</tr>
</table>
<table width="760" align="center">
<tbody>
<tr>
<td height="50" align="center" valign="middle"><p align="center"><span class="txt STYLE1">PHP½Ì²Ä¹ÜÀíϵͳ</span><br />
<br />
</p></td>
</tr>
</tbody>
</table>

View File

@ -0,0 +1,141 @@
<?php require_once('Connections/jc.php'); ?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "admin.php";
$MM_redirectLoginFailed = "gindex.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_jc, $jc);
$LoginRS__query=sprintf("SELECT user_name, user_name FROM admin WHERE user_name='%s' AND user_name='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $jc) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet">
<title>PHP教材管理系统</title>
<script language="JavaScript">
<!--
<!--
function Juge(theForm)
{
if (theForm.username.value == "")
{
alert("请输入您的注册名!");
theForm.username.focus();
return (false);
}
if (theForm.password.value == "")
{
alert("请输入您的密码!");
theForm.password.focus();
return (false);
}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body bgcolor=#21415a>
<p> </p>
<p> </p>
<p align="center">
<img border="0" src="img/index.jpg" width="568" height="252"></p>
<form action="<?php echo $loginFormAction; ?>" name="theform" method="POST" onSubmit="return Juge(this)">
<div align="center">
<center>
<table border="0" width="568" bgcolor=#21415a style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" style="font-size: 12px">
<p style="margin-top: 0; margin-bottom: 0" align="center">
<font color="#FFFFFF">身份登陆:</font>
<select name="select" id="select" onChange="MM_jumpMenu('parent',this,0)">
<option value="index.php">学生</option>
<option value="lindex.php">老师</option>
<option value="xindex.php">系级人员</option>
<option value="gindex.php" selected>管理员</option>
</select>
</p>
<p style="margin-top: 0; margin-bottom: 0" align="center">
 </p>
<table border="0" width="333" bgcolor=#21415a align=center height="72">
<tr>
<TD width="125" style="font-size: 12px" height="17">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="#FFFFFF">&nbsp;&nbsp;名:</font> </TD>
<TD width="194" style="font-size: 12px" height="17">
<input type="text" name="username" size="17" class="text" onBlur="this.className='text'" onFocus="this.className='textedit';this.select()">
</TD>
</tr>
<tr>
<TD width="125" style="font-size: 12px" height="13">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="#FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;码: </font> </TD>
<TD width="194" style="font-size: 12px" height="13">
<INPUT type=password maxLength=20 name=password size="17" class="text" onBlur="this.className='text'" onFocus="this.className='textedit';this.select()">
</TD>
</tr>
<tr>
<TD align=middle
colSpan=2 width="325" style="font-size: 12px" height="30">
<p align="center" style="margin-top: 0; margin-bottom: 0">
 </p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
<INPUT type=submit value=" 登 录 " name=login class="buttonface"> &nbsp;&nbsp;
<INPUT type=reset value=" 清 除 " name=qingchu class="buttonface">
</p>
</TD>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,36 @@
<style type="text/css">
<!--
body {
background-image: url(img/bj.gif);
}
-->
</style>
<link href="txt.css" rel="stylesheet" type="text/css" />
</head>
<table width="760" height="130" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="img/b.jpg">&nbsp;</td>
</tr>
</table>
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" background="img/q.jpg" class="txt">
<tr>
<td width="12%" align="center" valign="bottom"><a href="xxgl.php">学生管理</a></td>
<td width="12%" align="center" valign="bottom"><a href="jsgl.php">教师管理</a></td>
<td width="12%" align="center" valign="bottom"><a href="xgl.php">系级管理</a></td>
<td width="12%" align="center" valign="bottom"><a href="jcguanli.php">教材管理</a></td>
<td width="12%" align="center" valign="bottom"><a href="jczhengding.php">教材征订</a></td>
<td width="12%" align="center" valign="bottom"><a href="jcruku.php">教材入库</a></td>
<td width="12%" align="center" valign="bottom"><a href="jcfafang.php">
教材发放</a></td>
<td width="12%" align="center" valign="bottom"><a href="user.php">用户管理</a></td>
</tr>
</table>
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><marquee>
公告:欢迎登陆管理后台
学生领书!
</marquee></td>
</tr>
</table>

View File

@ -0,0 +1,51 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
if ((isset($_GET['user_name'])) && ($_GET['user_name'] != "")) {
$deleteSQL = sprintf("DELETE FROM xi WHERE user_name=%s",
GetSQLValueString($_GET['user_name'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error());
$deleteGoTo = "cg4.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,115 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE xi SET xingming=%s, xi=%s, password=%s WHERE user_name=%s",
GetSQLValueString($_POST['xingming'], "text"),
GetSQLValueString($_POST['xi'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['user_name'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error());
$updateGoTo = "cg4.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$colname_Recordset1 = "-1";
if (isset($_GET['user_name'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['user_name'] : addslashes($_GET['user_name']);
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = sprintf("SELECT * FROM xi WHERE user_name = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="22" colspan="2" align="center">修改系级人员</td>
</tr>
<tr>
<td width="102" align="right"> &nbsp;:</td>
<td width="198"><input name="xingming" type="text" id="xingming" value="<?php echo $row_Recordset1['xingming']; ?>" /></td>
</tr>
<tr>
<td align="right">:</td>
<td><input name="xi" type="text" id="xi" value="<?php echo $row_Recordset1['xi']; ?>" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="user_name" type="text" id="user_name" value="<?php echo $row_Recordset1['user_name']; ?>" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="password" type="text" id="password" value="<?php echo $row_Recordset1['password']; ?>" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="修改" />
</label>
<input type="hidden" name="MM_update" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($Recordset1);
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

View File

@ -0,0 +1,140 @@
<?php require_once('Connections/jc.php'); ?><?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "xueshen.php";
$MM_redirectLoginFailed = "index.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_jc, $jc);
$LoginRS__query=sprintf("SELECT user_name, password FROM xushen WHERE user_name='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $jc) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet">
<title>PHP教材管理系统</title>
<script language="JavaScript">
<!--
<!--
function Juge(theForm)
{
if (theForm.username.value == "")
{
alert("请输入您的注册名!");
theForm.username.focus();
return (false);
}
if (theForm.password.value == "")
{
alert("请输入您的密码!");
theForm.password.focus();
return (false);
}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body bgcolor=#21415a>
<p> </p>
<p> </p>
<p align="center">
<img border="0" src="img/index.jpg" width="568" height="252"></p>
<form action="<?php echo $loginFormAction; ?>" name="theform" method="POST" onSubmit="return Juge(this)">
<div align="center">
<center>
<table border="0" width="568" bgcolor=#21415a style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" style="font-size: 12px">
<p style="margin-top: 0; margin-bottom: 0" align="center">
<font color="#FFFFFF">身份登陆:</font>
<select name="select" id="select" onChange="MM_jumpMenu('parent',this,0)">
<option value="index.php" selected>学生</option>
<option value="lindex.php">老师</option>
<option value="xindex.php">系级人员</option>
<option value="gindex.php">管理员</option>
</select>
</p>
<p style="margin-top: 0; margin-bottom: 0" align="center">
 </p>
<table border="0" width="333" bgcolor=#21415a align=center height="72">
<tr>
<TD width="125" style="font-size: 12px" height="17">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="#FFFFFF">&nbsp;&nbsp;名:</font> </TD>
<TD width="194" style="font-size: 12px" height="17">
<input type="text" name="username" size="17" class="text" onBlur="this.className='text'" onFocus="this.className='textedit';this.select()">
</TD>
</tr>
<tr>
<TD width="125" style="font-size: 12px" height="13">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="#FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;码: </font> </TD>
<TD width="194" style="font-size: 12px" height="13">
<INPUT type=password maxLength=20 name=password size="17" class="text" onBlur="this.className='text'" onFocus="this.className='textedit';this.select()">
</TD>
</tr>
<tr>
<TD align=middle
colSpan=2 width="325" style="font-size: 12px" height="30">
<p align="center" style="margin-top: 0; margin-bottom: 0">
 </p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
<INPUT type=submit value=" 登 录 " name=login class="buttonface"> &nbsp;&nbsp;
<INPUT type=reset value=" 清 除 " name=qingchu class="buttonface">
</p>
</TD>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,207 @@
-- phpMyAdmin SQL Dump
-- version 2.9.2-rc1
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生æˆ<C3A6>日期: 2008 å¹´ 04 月 21 æ—¥ 05:49
-- æœ<C3A6>务器版本: 5.0.27
-- PHP 版本: 5.2.1
--
-- æ•°æ<C2B0>®åº“: `jc`
--
-- --------------------------------------------------------
--
-- 表的结构 `admin`
--
CREATE TABLE "admin" (
"name" varchar(20) NOT NULL COMMENT '¹ÜÀíÔ±ÐÕÃû',
"user_name" varchar(50) NOT NULL COMMENT 'µÇ¼Ãû',
"password" varchar(20) NOT NULL COMMENT 'ÃÜÂë',
PRIMARY KEY ("user_name"),
FULLTEXT KEY "name" ("name")
);
--
-- 导出表中的数æ<C2B0>® `admin`
--
INSERT INTO `admin` (`name`, `user_name`, `password`) VALUES
('¹ÜÀíÔ±', 'admin', 'admin');
-- --------------------------------------------------------
--
-- 表的结构 `fafang`
--
CREATE TABLE "fafang" (
"shijian" varchar(50) NOT NULL COMMENT 'ʱ',
"lsren" varchar(30) NOT NULL COMMENT 'ÁìÊéÈË',
"ssbanji" varchar(30) NOT NULL COMMENT 'ËùÊô°à¼¶',
"suliang" float NOT NULL,
"jcbianhao" varchar(50) NOT NULL,
PRIMARY KEY ("jcbianhao")
);
--
-- 导出表中的数æ<C2B0>® `fafang`
--
INSERT INTO `fafang` (`shijian`, `lsren`, `ssbanji`, `suliang`, `jcbianhao`) VALUES
('1208755948', '5', '5', 1, '1'),
('1208755969', '41', '2', 1, '999'),
('1208756045', '45', '45', 1, '4236546'),
('1208756056', '455', '4555', 0, '42387777');
-- --------------------------------------------------------
--
-- 表的结构 `jiaocai`
--
CREATE TABLE "jiaocai" (
"jcbianhao" varchar(50) NOT NULL,
"jcming" varchar(50) NOT NULL,
"zuozhe" varchar(50) NOT NULL,
"cbshe" varchar(50) NOT NULL,
"banben" varchar(50) NOT NULL,
PRIMARY KEY ("jcbianhao")
);
--
-- 导出表中的数æ<C2B0>® `jiaocai`
--
INSERT INTO `jiaocai` (`jcbianhao`, `jcming`, `zuozhe`, `cbshe`, `banben`) VALUES
('0023', 'Êýѧ', 'Ã<EFBFBD>¡Ã÷', 'Ç廪´óѧ', 'µÚÒ»°æ'),
('1124', '4242', '42', '42', '42'),
('423', '24', '242', '424', '42'),
('424', '24', '242', '424', '242'),
('4564', '456', '45', '456', '456456'),
('54645645', '¶á', '45', '456', '456');
-- --------------------------------------------------------
--
-- 表的结构 `laoshi`
--
CREATE TABLE "laoshi" (
"jiaoshihao" varchar(20) NOT NULL COMMENT '½ÌʦºÅ',
"xingming" varchar(20) NOT NULL COMMENT 'ÐÕÃû',
"xi" varchar(20) NOT NULL COMMENT 'ϵºÅ',
"user_name" varchar(50) NOT NULL COMMENT 'µÇ¼Ãû',
"password" varchar(20) NOT NULL COMMENT 'ÃÜÂë',
PRIMARY KEY ("jiaoshihao")
);
--
-- 导出表中的数æ<C2B0>® `laoshi`
--
INSERT INTO `laoshi` (`jiaoshihao`, `xingming`, `xi`, `user_name`, `password`) VALUES
('001', '½Ìʦ', '¼ÆËã»ú', 'laoshi', 'laoshi');
-- --------------------------------------------------------
--
-- 表的结构 `ruku`
--
CREATE TABLE "ruku" (
"jcbianhao" varchar(50) NOT NULL COMMENT '½Ì²Ä±àºÅ',
"jcming" varchar(50) NOT NULL COMMENT '½Ì²ÄÃû',
"zuozhe" varchar(30) NOT NULL COMMENT '×÷Õß',
"cbshe" varchar(50) NOT NULL COMMENT '³ö°æÉç',
"banben" varchar(20) NOT NULL COMMENT '°æ±¾ºÅ',
"scjia" float NOT NULL COMMENT 'Êг¡¼Û',
"sgjia" float NOT NULL COMMENT 'ʵ¹º¼Û',
"suliang" int(10) NOT NULL COMMENT 'ÊýÁ¿',
"rukushijian" text NOT NULL,
PRIMARY KEY ("jcbianhao")
);
--
-- 导出表中的数æ<C2B0>® `ruku`
--
INSERT INTO `ruku` (`jcbianhao`, `jcming`, `zuozhe`, `cbshe`, `banben`, `scjia`, `sgjia`, `suliang`, `rukushijian`) VALUES
('1', '1', '1', '1', '1', 1, 1, 1, '1'),
('999', '9612', '5415', '121', '222', 12, 121, 121, '2'),
('4236546', '24', '242', '424', '42', 455, 54, 585, '1208755827'),
('423', '24', '242', '424', '42', 4, 4, 4, '1208756112');
-- --------------------------------------------------------
--
-- 表的结构 `xi`
--
CREATE TABLE "xi" (
"xingming" varchar(20) NOT NULL COMMENT 'ϵ¹ÜÀíÈËÐÕÃû',
"xi" varchar(20) NOT NULL COMMENT 'ϵºÅ',
"user_name" varchar(50) NOT NULL COMMENT 'µÇ¼Ãû',
"password" varchar(20) NOT NULL COMMENT 'ÃÜÂë',
PRIMARY KEY ("user_name")
);
--
-- 导出表中的数æ<C2B0>® `xi`
--
INSERT INTO `xi` (`xingming`, `xi`, `user_name`, `password`) VALUES
('系级管ç<EFBFBD>†äººå˜', '计算机', 'xi', 'xi');
-- --------------------------------------------------------
--
-- 表的结构 `xushen`
--
CREATE TABLE "xushen" (
"xuehao" varchar(20) NOT NULL COMMENT 'ѧºÅ',
"xingming" varchar(20) NOT NULL COMMENT 'ÐÕÃû',
"banji" varchar(20) NOT NULL COMMENT '°à¼¶',
"xi" varchar(20) NOT NULL COMMENT 'ϵºÅ',
"user_name" varchar(50) NOT NULL COMMENT 'µÇ¼Ãû',
"password" varchar(20) NOT NULL COMMENT 'ÃÜÂë',
PRIMARY KEY ("xuehao")
);
--
-- 导出表中的数æ<C2B0>® `xushen`
--
INSERT INTO `xushen` (`xuehao`, `xingming`, `banji`, `xi`, `user_name`, `password`) VALUES
('001', 'ѧÉú', '¼ÆÃã»úÃ<EFBFBD>øÃç', '¼ÆÃã»úÃ<EFBFBD>µ', 'xueshen', 'xueshen');
-- --------------------------------------------------------
--
-- 表的结构 `zhengding`
--
CREATE TABLE "zhengding" (
"dingdan" varchar(30) NOT NULL COMMENT '¶©µ¥ºÅ',
"jcbianhao" varchar(30) NOT NULL COMMENT '½Ì²Ä±àºÅ',
"jcming" varchar(50) NOT NULL COMMENT '½Ì²ÄÃû',
"zuozhe" varchar(50) NOT NULL COMMENT '×÷Õß',
"cbshe" varchar(50) NOT NULL COMMENT '³ö°æÉç',
"banben" varchar(20) NOT NULL COMMENT '°æ±¾ºÅ',
"shijian" varchar(50) NOT NULL,
"zdren" varchar(30) NOT NULL COMMENT 'Õ÷¶©ÈË',
"szbanji" varchar(30) NOT NULL COMMENT 'Ëù¶©°à¼¶',
"zdshuliang" int(10) NOT NULL COMMENT 'Õ÷¶©ÊýÁ¿',
PRIMARY KEY ("dingdan")
);
--
-- 导出表中的数æ<C2B0>® `zhengding`
--
INSERT INTO `zhengding` (`dingdan`, `jcbianhao`, `jcming`, `zuozhe`, `cbshe`, `banben`, `shijian`, `zdren`, `szbanji`, `zdshuliang`) VALUES
('990', '0023', 'Êýѧ', 'Ã<EFBFBD>¡Ã÷', 'Ç廪´óѧ', 'µÚÒ»°æ', '20080420', 'Ã<EFBFBD>¡Ã÷', '¼ÆËã»ú', 10),
('666', '423', '24', '242', '424', '42', '666', '555', '555', 555);

View File

@ -0,0 +1,103 @@
<?php require_once('Connections/jc.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = "SELECT * FROM ruku";
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><form id="form1" name="form1" method="POST">
<label></label>
<label></label>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td colspan="6" align="center" valign="bottom">教材发放</td>
</tr>
<tr>
<td width="12%" align="center" valign="bottom">教材编号</td>
<td width="12%" align="center" valign="bottom">教材名</td>
<td width="12%" align="center" valign="bottom">作者</td>
<td width="12%" align="center" valign="bottom">数量</td>
<td width="12%" align="center" valign="bottom">入库时间</td>
<td width="12%" align="center" valign="bottom">教材发放</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<?php do { ?>
<tr>
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcbianhao']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcming']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['zuozhe']; ?></td>
<td align="center"><?php echo $row_Recordset1['suliang']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['rukushijian']; ?></td>
<td align="center" valign="bottom"><a href="jcfafang1.php?jcbianhao=<?php echo $row_Recordset1['jcbianhao']; ?>">教材发放</a></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset2.MoveNext()
Wend
%>
</table>
<p>&nbsp;</p>
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,159 @@
<?php require_once('Connections/jc.php'); ?>
<?php require_once('Connections/jc.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO fafang (shijian, lsren, ssbanji, suliang, jcbianhao) VALUES (%s, %s, %s, %s, %s)",
GetSQLValueString($_POST['ff'], "text"),
GetSQLValueString($_POST['ls'], "text"),
GetSQLValueString($_POST['ssbj'], "text"),
GetSQLValueString($_POST['sl'], "double"),
GetSQLValueString($_POST['jc'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error());
$insertGoTo = "cg8.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE fafang SET suliang=%s WHERE jcbianhao=%s",
GetSQLValueString($_POST['hiddenField'], "double"),
GetSQLValueString($_POST['jc'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error());
$updateGoTo = "cg8.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$colname_Recordset1 = "-1";
if (isset($_GET['jcbianhao'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['jcbianhao'] : addslashes($_GET['jcbianhao']);
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = sprintf("SELECT * FROM ruku WHERE jcbianhao = %s", GetSQLValueString($colname_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$colname_Recordset2 = "-1";
if (isset($_GET['jcbianhao'])) {
$colname_Recordset2 = (get_magic_quotes_gpc()) ? $_GET['jcbianhao'] : addslashes($_GET['jcbianhao']);
}
mysql_select_db($database_jc, $jc);
$query_Recordset2 = sprintf("SELECT (fafang.suliang-1) as fa FROM fafang WHERE jcbianhao = %s", GetSQLValueString($colname_Recordset2, "text"));
$Recordset2 = mysql_query($query_Recordset2, $jc) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="20" colspan="2" align="center">教材发放</td>
</tr>
<tr>
<td width="102" align="right">教材编号:</td>
<td width="198"><input name="jc" type="text" id="jc" value="<?php echo $row_Recordset1['jcbianhao']; ?>" /></td>
</tr>
<tr>
<td align="right">发放时间:</td>
<td width="198"><input name="ff" type="text" id="ff" value="<? print(time());?>" /></td>
</tr>
<tr>
<td align="right">领书人:</td>
<td><input name="ls" type="text" id="ls" /></td>
</tr>
<tr>
<td align="right">所属班级:</td>
<td><input name="ssbj" type="text" id="ssbj" /></td>
</tr>
<tr>
<td align="right">数量:</td>
<td><input name="sl" type="text" id="sl" value="1" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="教材发放" />
</label>
<label>
<input name="hiddenField" type="hidden" value="<?php echo $row_Recordset2['fa']; ?>" />
</label>
<p>&nbsp;</p>
<input type="hidden" name="MM_insert" value="form1">
<input type="hidden" name="MM_update" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($Recordset2);
?>

View File

@ -0,0 +1,149 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO jiaocai (jcbianhao, jcming, zuozhe, cbshe, banben) VALUES (%s, %s, %s, %s, %s)",
GetSQLValueString($_POST['jcbianhao'], "text"),
GetSQLValueString($_POST['jcming'], "text"),
GetSQLValueString($_POST['zuozhe'], "text"),
GetSQLValueString($_POST['cbshe'], "text"),
GetSQLValueString($_POST['banben'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error());
$insertGoTo = "cg5.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = "SELECT * FROM jiaocai";
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="20" colspan="2" align="center">添加教材</td>
</tr>
<tr>
<td width="102" align="right">教材编号:</td>
<td width="198"><input name="jcbianhao" type="text" id="jcbianhao" /></td>
</tr>
<tr>
<td align="right">教材名:</td>
<td><input name="jcming" type="text" id="jcming" /></td>
</tr>
<tr>
<td align="right">作者:</td>
<td><input name="zuozhe" type="text" id="zuozhe" /></td>
</tr>
<tr>
<td align="right">出版社:</td>
<td><input name="cbshe" type="text" id="cbshe" /></td>
</tr>
<tr>
<td align="right">版本号:</td>
<td><input name="banben" type="text" id="banben" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
<label></label>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td colspan="6" align="center" valign="bottom">教材管理</td>
</tr>
<tr>
<td width="12%" align="center" valign="bottom">教材编号</td>
<td width="12%" align="center" valign="bottom">教材名</td>
<td width="12%" align="center" valign="bottom">作者</td>
<td width="12%" align="center" valign="bottom">出版社</td>
<td width="12%" align="center" valign="bottom">修改</td>
<td width="12%" align="center" valign="bottom">删除</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<?php do { ?>
<tr>
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcbianhao']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcming']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['zuozhe']; ?></td>
<td align="center"><?php echo $row_Recordset1['cbshe']; ?></td>
<td align="center" valign="bottom"><a href="cgai.php?jcbianhao=<?php echo $row_Recordset1['jcbianhao']; ?>">修改</a></td>
<td align="center" valign="bottom"><a href="cdel.php?jcbianhao=<?php echo $row_Recordset1['jcbianhao']; ?>">删除</a></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset2.MoveNext()
Wend
%>
</table>
<p>&nbsp;</p>
<input type="hidden" name="MM_insert" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,144 @@
<?php require_once('Connections/jc.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = "SELECT * FROM zhengding";
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_jc, $jc);
$query_Recordset2 = "SELECT * FROM ruku";
$Recordset2 = mysql_query($query_Recordset2, $jc) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
?>
<?php require_once('Connections/jc.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><form id="form1" name="form1" method="post">
<label></label>
<label></label>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td colspan="6" align="center" valign="bottom">已征订教材入库</td>
</tr>
<tr>
<td width="12%" align="center" valign="bottom">征订编号</td>
<td width="12%" align="center" valign="bottom">教材名</td>
<td width="12%" align="center" valign="bottom">作者</td>
<td width="12%" align="center" valign="bottom">征订人</td>
<td width="12%" align="center" valign="bottom">征订数量</td>
<td width="12%" align="center" valign="bottom">教材入库</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<?php do { ?>
<tr>
<td align="center" valign="bottom"><?php echo $row_Recordset1['dingdan']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcming']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['zuozhe']; ?></td>
<td align="center"><?php echo $row_Recordset1['zdren']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['zdshuliang']; ?></td>
<td align="center" valign="bottom"><a href="jcruku1.php?dingdan=<?php echo $row_Recordset1['dingdan']; ?>">教材入库</a></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset2.MoveNext()
Wend
%>
</table>
<p> </p>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td colspan="6" align="center" valign="bottom">教材已入库管理</td>
</tr>
<tr>
<td width="12%" align="center" valign="bottom">教材编号</td>
<td width="12%" align="center" valign="bottom">教材名</td>
<td width="12%" align="center" valign="bottom">作者</td>
<td width="12%" align="center" valign="bottom">数量</td>
<td width="12%" align="center" valign="bottom">入库时间</td>
<td width="12%" align="center" valign="bottom">删除</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<?php do { ?>
<tr>
<td align="center" valign="bottom"><?php echo $row_Recordset2['jcbianhao']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset2['jcming']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset2['zuozhe']; ?></td>
<td align="center"><?php echo $row_Recordset2['suliang']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset2['rukushijian']; ?></td>
<td align="center" valign="bottom"><a href="rkdel.php?jcbianhao=<?php echo $row_Recordset2['jcbianhao']; ?>">删除</a></td>
</tr>
<?php } while ($row_Recordset2 = mysql_fetch_assoc($Recordset2)); ?>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset2.MoveNext()
Wend
%>
</table>
<p>&nbsp;</p>
</form></td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($Recordset2);
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,149 @@
<?php require_once('Connections/jc.php'); ?>
<?php require_once('Connections/jc.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO ruku (jcbianhao, jcming, zuozhe, cbshe, banben, scjia, sgjia, suliang, rukushijian) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['jcbianhao'], "text"),
GetSQLValueString($_POST['jcming'], "text"),
GetSQLValueString($_POST['zuozhe'], "text"),
GetSQLValueString($_POST['cbshe'], "text"),
GetSQLValueString($_POST['banben'], "text"),
GetSQLValueString($_POST['shicangjia'], "double"),
GetSQLValueString($_POST['sgj'], "double"),
GetSQLValueString($_POST['sl'], "int"),
GetSQLValueString($_POST['rksj'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error());
$insertGoTo = "cg7.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
$colname_Recordset1 = "-1";
if (isset($_GET['dingdan'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['dingdan'] : addslashes($_GET['dingdan']);
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = sprintf("SELECT * FROM zhengding WHERE dingdan = %s", GetSQLValueString($colname_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="20" colspan="2" align="center">教材入库</td>
</tr>
<tr>
<td width="102" align="right">教材编号:</td>
<td width="198"><input name="jcbianhao" type="text" id="jcbianhao" value="<?php echo $row_Recordset1['jcbianhao']; ?>" /></td>
</tr>
<tr>
<td align="right">教材名:</td>
<td><input name="jcming" type="text" id="jcming" value="<?php echo $row_Recordset1['jcming']; ?>" /></td>
</tr>
<tr>
<td align="right">作者:</td>
<td><input name="zuozhe" type="text" id="zuozhe" value="<?php echo $row_Recordset1['zuozhe']; ?>" /></td>
</tr>
<tr>
<td align="right">出版社:</td>
<td><input name="cbshe" type="text" id="cbshe" value="<?php echo $row_Recordset1['cbshe']; ?>" /></td>
</tr>
<tr>
<td align="right">版本号:</td>
<td><input name="banben" type="text" id="banben" value="<?php echo $row_Recordset1['banben']; ?>" /></td>
</tr>
<tr>
<td align="right">市场价</td>
<td><label>
<input name="shicangjia" type="text" id="shicangjia" />
</label></td>
</tr>
<tr>
<td align="right">实购价</td>
<td><input name="sgj" type="text" id="sgj" /></td>
</tr>
<tr>
<td align="right">数量</td>
<td><input name="sl" type="text" id="sl" /></td>
</tr>
<tr>
<td align="right">入库时间</td>
<td><input name="rksj" type="text" id="rksj" value="<? print(time());?>" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="教材入库" />
</label>
<label></label>
<p>&nbsp;</p>
<input type="hidden" name="MM_insert" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,114 @@
<?php require_once('Connections/jc.php'); ?>
<?php
mysql_select_db($database_jc, $jc);
$query_Recordset1 = "SELECT * FROM jiaocai";
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_jc, $jc);
$query_Recordset2 = "SELECT * FROM zhengding";
$Recordset2 = mysql_query($query_Recordset2, $jc) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><form id="form1" name="form1" method="POST">
<label></label>
<label></label>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td colspan="6" align="center" valign="bottom">教材征订</td>
</tr>
<tr>
<td width="12%" align="center" valign="bottom">教材编号</td>
<td width="12%" align="center" valign="bottom">教材名</td>
<td width="12%" align="center" valign="bottom">作者</td>
<td width="12%" align="center" valign="bottom">出版社</td>
<td width="12%" align="center" valign="bottom">版本号</td>
<td width="12%" align="center" valign="bottom">教材征订</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<?php do { ?>
<tr>
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcbianhao']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['jcming']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['zuozhe']; ?></td>
<td align="center"><?php echo $row_Recordset1['cbshe']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['banben']; ?></td>
<td align="center" valign="bottom"><a href="zding.php?jcbianhao=<?php echo $row_Recordset1['jcbianhao']; ?>">教材征订</a></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset2.MoveNext()
Wend
%>
</table>
<p>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td colspan="6" align="center" valign="bottom">教材已征订管理</td>
</tr>
<tr>
<td width="12%" align="center" valign="bottom">征订编号</td>
<td width="12%" align="center" valign="bottom">教材名</td>
<td width="12%" align="center" valign="bottom">作者</td>
<td width="12%" align="center" valign="bottom">征订人</td>
<td width="12%" align="center" valign="bottom">征订数量</td>
<td width="12%" align="center" valign="bottom">删除</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<?php do { ?>
<tr>
<td align="center" valign="bottom"><?php echo $row_Recordset2['dingdan']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset2['jcming']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset2['zuozhe']; ?></td>
<td align="center"><?php echo $row_Recordset2['zdren']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset2['zdshuliang']; ?></td>
<td align="center" valign="bottom"><a href="zzdel.php?dingdan=<?php echo $row_Recordset2['dingdan']; ?>">删除</a></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset2.MoveNext()
Wend
%>
</table>
<p>&nbsp;</p>
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($Recordset2);
?>

View File

@ -0,0 +1,51 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
if ((isset($_GET['jiaoshihao'])) && ($_GET['jiaoshihao'] != "")) {
$deleteSQL = sprintf("DELETE FROM laoshi WHERE jiaoshihao=%s",
GetSQLValueString($_GET['jiaoshihao'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error());
$deleteGoTo = "cg3.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,119 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE laoshi SET xingming=%s, xi=%s, user_name=%s, password=%s WHERE jiaoshihao=%s",
GetSQLValueString($_POST['xingming'], "text"),
GetSQLValueString($_POST['xi'], "text"),
GetSQLValueString($_POST['user_name'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['jshao'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error());
$updateGoTo = "cg3.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$colname_Recordset1 = "-1";
if (isset($_GET['jiaoshihao'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['jiaoshihao'] : addslashes($_GET['jiaoshihao']);
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = sprintf("SELECT * FROM laoshi WHERE jiaoshihao = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="20" colspan="2" align="center">修改教师资料</td>
</tr>
<tr>
<td width="102" align="right">教师号:</td>
<td width="198"><input name="jshao" type="text" id="jshao" value="<?php echo $row_Recordset1['jiaoshihao']; ?>" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="xingming" type="text" id="xingming" value="<?php echo $row_Recordset1['xingming']; ?>" /></td>
</tr>
<tr>
<td align="right">:</td>
<td><input name="xi" type="text" id="xi" value="<?php echo $row_Recordset1['xi']; ?>" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="user_name" type="text" id="user_name" value="<?php echo $row_Recordset1['user_name']; ?>" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="password" type="text" id="password" value="<?php echo $row_Recordset1['password']; ?>" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="修改" />
</label>
<input type="hidden" name="MM_update" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,149 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO laoshi (jiaoshihao, xingming, xi, user_name, password) VALUES (%s, %s, %s, %s, %s)",
GetSQLValueString($_POST['jshao'], "text"),
GetSQLValueString($_POST['xingming'], "text"),
GetSQLValueString($_POST['xi'], "text"),
GetSQLValueString($_POST['user_name'], "text"),
GetSQLValueString($_POST['password'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error());
$insertGoTo = "cg3.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = "SELECT * FROM laoshi";
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="20" colspan="2" align="center">添加教师</td>
</tr>
<tr>
<td width="102" align="right">教师号:</td>
<td width="198"><input name="jshao" type="text" id="jshao" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="xingming" type="text" id="xingming" /></td>
</tr>
<tr>
<td align="right">:</td>
<td><input name="xi" type="text" id="xi" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="user_name" type="text" id="user_name" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="password" type="password" id="password" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
<label></label>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td colspan="6" align="center" valign="bottom">教师管理</td>
</tr>
<tr>
<td width="12%" align="center" valign="bottom">教师号</td>
<td width="12%" align="center" valign="bottom"> &nbsp;</td>
<td width="12%" align="center" valign="bottom"> &nbsp;</td>
<td width="12%" align="center" valign="bottom"> &nbsp;</td>
<td width="12%" align="center" valign="bottom">修改</td>
<td width="12%" align="center" valign="bottom">删除</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<?php do { ?>
<tr>
<td align="center" valign="bottom"><?php echo $row_Recordset1['jiaoshihao']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['xingming']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['user_name']; ?></td>
<td align="center"><?php echo $row_Recordset1['password']; ?></td>
<td align="center" valign="bottom"><a href="jgai.php?jiaoshihao=<?php echo $row_Recordset1['jiaoshihao']; ?>">修改</a></td>
<td align="center" valign="bottom"><a href="jdel.php?jiaoshihao=<?php echo $row_Recordset1['jiaoshihao']; ?>">删除</a></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset2.MoveNext()
Wend
%>
</table>
<p>&nbsp;</p>
<input type="hidden" name="MM_insert" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,46 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>PHP教材管理系统</title>
<style type="text/css">
<!--
@import url("txt.css");
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<style type="text/css">
<!--
body {
background-image: url(img/bj.gif);
}
-->
</style>
<link href="txt.css" rel="stylesheet" type="text/css" />
</head>
<table width="760" height="130" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="img/b.jpg">&nbsp;</td>
</tr>
</table>
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" background="img/q.jpg" class="txt">
<tr>
<td width="12%" align="center" valign="bottom"><a href="xxgl.php">学生管理</a></td>
<td width="12%" align="center" valign="bottom"><a href="jsgl.php">教师管理</a></td>
<td width="12%" align="center" valign="bottom"><a href="jcguanli.php">教材管理</a></td>
<td width="12%" align="center" valign="bottom"><a href="jczhengding.php">教材征订</a></td>
<td width="12%" align="center" valign="bottom"><a href="jcruku.php">教材入库</a><a href="user.php"></a></td>
</tr>
</table>
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><marquee>
公告:欢迎登陆教师管理后台
</marquee></td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>

View File

@ -0,0 +1,140 @@
<?php require_once('Connections/jc.php'); ?><?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "laoshi.php";
$MM_redirectLoginFailed = "lindex.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_jc, $jc);
$LoginRS__query=sprintf("SELECT user_name, password FROM laoshi WHERE user_name='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $jc) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet">
<title>PHP教材管理系统</title>
<script language="JavaScript">
<!--
<!--
function Juge(theForm)
{
if (theForm.username.value == "")
{
alert("请输入您的注册名!");
theForm.username.focus();
return (false);
}
if (theForm.password.value == "")
{
alert("请输入您的密码!");
theForm.password.focus();
return (false);
}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body bgcolor=#21415a>
<p> </p>
<p> </p>
<p align="center">
<img border="0" src="img/index.jpg" width="568" height="252"></p>
<form action="<?php echo $loginFormAction; ?>" name="theform" method="POST" onSubmit="return Juge(this)">
<div align="center">
<center>
<table border="0" width="568" bgcolor=#21415a style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" style="font-size: 12px">
<p style="margin-top: 0; margin-bottom: 0" align="center">
<font color="#FFFFFF">身份登陆:</font>
<select name="select" id="select" onChange="MM_jumpMenu('parent',this,0)">
<option value="index.php">学生</option>
<option value="lindex.php" selected>老师</option>
<option value="xindex.php">系级人员</option>
<option value="gindex.php">管理员</option>
</select>
</p>
<p style="margin-top: 0; margin-bottom: 0" align="center">
 </p>
<table border="0" width="333" bgcolor=#21415a align=center height="72">
<tr>
<TD width="125" style="font-size: 12px" height="17">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="#FFFFFF">&nbsp;&nbsp;名:</font> </TD>
<TD width="194" style="font-size: 12px" height="17">
<input type="text" name="username" size="17" class="text" onBlur="this.className='text'" onFocus="this.className='textedit';this.select()">
</TD>
</tr>
<tr>
<TD width="125" style="font-size: 12px" height="13">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="#FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;码: </font> </TD>
<TD width="194" style="font-size: 12px" height="13">
<INPUT type=password maxLength=20 name=password size="17" class="text" onBlur="this.className='text'" onFocus="this.className='textedit';this.select()">
</TD>
</tr>
<tr>
<TD align=middle
colSpan=2 width="325" style="font-size: 12px" height="30">
<p align="center" style="margin-top: 0; margin-bottom: 0">
 </p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
<INPUT type=submit value=" 登 录 " name=login class="buttonface"> &nbsp;&nbsp;
<INPUT type=reset value=" 清 除 " name=qingchu class="buttonface">
</p>
</TD>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,55 @@
<?php require_once('Connections/jc.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
if ((isset($_GET['jcbianhao'])) && ($_GET['jcbianhao'] != "")) {
$deleteSQL = sprintf("DELETE FROM ruku WHERE jcbianhao=%s",
GetSQLValueString($_GET['jcbianhao'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error());
$deleteGoTo = "cg7.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,9 @@
.txt {
font-size: 12px;
color: #000000;
}
a:link {
font-size: 12px;
color: #000000;
text-decoration: none;
}

View File

@ -0,0 +1,59 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
if ((isset($_GET['user_name'])) && ($_GET['user_name'] != "")) {
$deleteSQL = sprintf("DELETE FROM admin WHERE user_name=%s",
GetSQLValueString($_GET['user_name'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error());
$deleteGoTo = "cg1.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
</body>
</html>

View File

@ -0,0 +1,111 @@
<?php require_once('Connections/jc.php'); ?>
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE admin SET name=%s, password=%s WHERE user_name=%s",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['user_name'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error());
$updateGoTo = "cg1.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$colname_Recordset1 = "-1";
if (isset($_GET['user_name'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['user_name'] : addslashes($_GET['user_name']);
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = sprintf("SELECT * FROM `admin` WHERE user_name = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="20" colspan="2" align="center">修改账号</td>
</tr>
<tr>
<td width="102" align="right">用户名:</td>
<td width="198"><input name="user_name" type="text" id="user_name" value="<?php echo $row_Recordset1['user_name']; ?>" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="password" type="text" id="password" value="<?php echo $row_Recordset1['password']; ?>" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="name" type="text" id="name" value="<?php echo $row_Recordset1['name']; ?>" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="修改" />
</label>
<input type="hidden" name="MM_update" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,136 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO admin (name, user_name, password) VALUES (%s, %s, %s)",
GetSQLValueString($_POST['name'], "text"),
GetSQLValueString($_POST['user_name'], "text"),
GetSQLValueString($_POST['password'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error());
$insertGoTo = "cg1.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = "SELECT * FROM `admin`";
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="20" colspan="2" align="center">添加账号</td>
</tr>
<tr>
<td width="102" align="right">用户名:</td>
<td width="198"><input name="user_name" type="text" id="user_name" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="password" type="password" id="password" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="name" type="text" id="name" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
<label></label>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td colspan="5" align="center" valign="bottom">用户管理</td>
</tr>
<tr>
<td width="20%" align="center" valign="bottom">用户名</td>
<td width="20%" align="center" valign="bottom">密码</td>
<td width="20%" align="center" valign="bottom">姓名</td>
<td width="20%" align="center" valign="bottom">修改</td>
<td width="20%" align="center" valign="bottom">删除</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<?php do { ?>
<tr>
<td align="center" valign="bottom"><?php echo $row_Recordset1['user_name']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['password']; ?></td>
<td align="center"><?php echo $row_Recordset1['name']; ?></td>
<td align="center" valign="bottom"><a href="ugai.php?user_name=<?php echo $row_Recordset1['user_name']; ?>">修改</a></td>
<td align="center" valign="bottom"><a href="udel.php?user_name=<?php echo $row_Recordset1['user_name']; ?>">删除</a></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset2.MoveNext()
Wend
%>
</table>
<p>&nbsp;</p>
<input type="hidden" name="MM_insert" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,3 @@
.x {
border: 0.1px solid #FFFFFF;
}

View File

@ -0,0 +1,51 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
if ((isset($_GET['xuehao'])) && ($_GET['xuehao'] != "")) {
$deleteSQL = sprintf("DELETE FROM xushen WHERE xuehao=%s",
GetSQLValueString($_GET['xuehao'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error());
$deleteGoTo = "cg2.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,124 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE xushen SET xingming=%s, banji=%s, xi=%s, user_name=%s, password=%s WHERE xuehao=%s",
GetSQLValueString($_POST['xingming'], "text"),
GetSQLValueString($_POST['banji'], "text"),
GetSQLValueString($_POST['xi'], "text"),
GetSQLValueString($_POST['user_name'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['xuehao'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($updateSQL, $jc) or die(mysql_error());
$updateGoTo = "cg2.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$colname_Recordset1 = "-1";
if (isset($_GET['xuehao'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['xuehao'] : addslashes($_GET['xuehao']);
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = sprintf("SELECT * FROM xushen WHERE xuehao = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="20" colspan="2" align="center">修改学生资料</td>
</tr>
<tr>
<td width="102" align="right"> &nbsp;:</td>
<td width="198"><input name="xuehao" type="text" id="xuehao" value="<?php echo $row_Recordset1['xuehao']; ?>" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="xingming" type="text" id="xingming" value="<?php echo $row_Recordset1['xingming']; ?>" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="banji" type="text" id="banji" value="<?php echo $row_Recordset1['banji']; ?>" /></td>
</tr>
<tr>
<td align="right">:</td>
<td><input name="xi" type="text" id="xi" value="<?php echo $row_Recordset1['xi']; ?>" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="user_name" type="text" id="user_name" value="<?php echo $row_Recordset1['user_name']; ?>" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="password" type="text" id="password" value="<?php echo $row_Recordset1['password']; ?>" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="修改" />
</label>
<input type="hidden" name="MM_update" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,144 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO xi (xingming, xi, user_name, password) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['xingming'], "text"),
GetSQLValueString($_POST['xi'], "text"),
GetSQLValueString($_POST['user_name'], "text"),
GetSQLValueString($_POST['password'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error());
$insertGoTo = "cg4.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = "SELECT * FROM xi";
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="22" colspan="2" align="center">添加系级人员</td>
</tr>
<tr>
<td width="102" align="right"> &nbsp;:</td>
<td width="198"><input name="xingming" type="text" id="xingming" /></td>
</tr>
<tr>
<td align="right">:</td>
<td><input name="xi" type="text" id="xi" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="user_name" type="text" id="user_name" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="password" type="password" id="password" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
<label></label>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td colspan="6" align="center" valign="bottom">教师管理</td>
</tr>
<tr>
<td width="12%" align="center" valign="bottom"></td>
<td width="12%" align="center" valign="bottom"> &nbsp;</td>
<td width="12%" align="center" valign="bottom"> &nbsp;</td>
<td width="12%" align="center" valign="bottom"> &nbsp;</td>
<td width="12%" align="center" valign="bottom">修改</td>
<td width="12%" align="center" valign="bottom">删除</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<?php do { ?>
<tr>
<td align="center" valign="bottom"><?php echo $row_Recordset1['xi']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['xingming']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['user_name']; ?></td>
<td align="center"><?php echo $row_Recordset1['password']; ?></td>
<td align="center" valign="bottom"><a href="jgai.php?user_name=<?php echo $row_Recordset1['user_name']; ?>">修改</a></td>
<td align="center" valign="bottom"><a href="jdel.php?user_name=<?php echo $row_Recordset1['user_name']; ?>">删除</a></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset2.MoveNext()
Wend
%>
</table>
<p>&nbsp;</p>
<input type="hidden" name="MM_insert" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,43 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>PHP教材管理系统</title>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<style type="text/css">
<!--
body {
background-image: url(img/bj.gif);
}
-->
</style>
<link href="txt.css" rel="stylesheet" type="text/css" />
</head>
<table width="760" height="130" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="img/b.jpg">&nbsp;</td>
</tr>
</table>
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" background="img/q.jpg" class="txt">
<tr>
<td width="12%" align="center" valign="bottom"><a href="xxgl.php">学生管理</a></td>
<td width="12%" align="center" valign="bottom"><a href="jsgl.php">教师管理</a></td>
<td width="12%" align="center" valign="bottom"><a href="jcguanli.php">教材管理</a></td>
<td width="12%" align="center" valign="bottom"><a href="jczhengding.php">教材征订</a></td>
<td width="12%" align="center" valign="bottom"><a href="jcruku.php">教材入库</a></td>
<td width="12%" align="center" valign="bottom"><a href="jcfafang.php">
教材发放</a></td>
</tr>
</table>
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><marquee>
公告:欢迎登陆系级人员管理后台
</marquee></td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>

View File

@ -0,0 +1,136 @@
<?php require_once('Connections/jc.php'); ?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "xi.php";
$MM_redirectLoginFailed = "xindex.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_jc, $jc);
$LoginRS__query=sprintf("SELECT user_name, password FROM xi WHERE user_name='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $jc) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet">
<title>PHP教材管理系统</title>
<script language="JavaScript">
<!--
<!--
function Juge(theForm)
{
if (theForm.username.value == "")
{
alert("请输入您的注册名!");
theForm.username.focus();
return (false);
}
if (theForm.password.value == "")
{
alert("请输入您的密码!");
theForm.password.focus();
return (false);
}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body bgcolor=#21415a>
<p> </p>
<p> </p>
<p align="center">
<img border="0" src="img/index.jpg" width="568" height="252"></p>
<form action="<?php echo $loginFormAction; ?>" name="theform" method="POST" onSubmit="return Juge(this)">
<div align="center">
<center>
<table border="0" width="568" bgcolor=#21415a style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" style="font-size: 12px">
<p style="margin-top: 0; margin-bottom: 0" align="center">
<font color="#FFFFFF">身份登陆:</font>
<select name="select" id="select" onChange="MM_jumpMenu('parent',this,0)">
<option value="index.php">学生</option>
<option value="lindex.php">老师</option>
<option value="xindex.php" selected>系级人员</option>
<option value="gindex.php">管理员</option>
</select>
</p>
<p style="margin-top: 0; margin-bottom: 0" align="center">
 </p>
<table border="0" width="333" bgcolor=#21415a align=center height="72">
<tr>
<TD width="125" style="font-size: 12px" height="17">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="#FFFFFF">&nbsp;&nbsp;名:</font> </TD>
<TD width="194" style="font-size: 12px" height="17">
<input type="text" name="username" size="17" class="text" onBlur="this.className='text'" onFocus="this.className='textedit';this.select()"> </TD>
</tr>
<tr>
<TD width="125" style="font-size: 12px" height="13">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="#FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;码: </font> </TD>
<TD width="194" style="font-size: 12px" height="13">
<INPUT type=password maxLength=20 name=password size="17" class="text" onBlur="this.className='text'" onFocus="this.className='textedit';this.select()"> </TD>
</tr>
<tr>
<TD align=middle
colSpan=2 width="325" style="font-size: 12px" height="30">
<p align="center" style="margin-top: 0; margin-bottom: 0">
 </p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
<INPUT type=submit value=" 登 录 " name=login class="buttonface"> &nbsp;&nbsp;
<INPUT type=reset value=" 清 除 " name=qingchu class="buttonface">
</p> </TD>
</tr>
</table> </td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,42 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>PHP教材管理系统</title>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<style type="text/css">
<!--
body {
background-image: url(img/bj.gif);
}
-->
</style>
<link href="txt.css" rel="stylesheet" type="text/css" />
</head>
<table width="760" height="130" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="img/b.jpg">&nbsp;</td>
</tr>
</table>
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" background="img/q.jpg" class="txt">
<tr>
<td align="center" valign="bottom"><a href="jczhengding.php">教材征订</a></td>
</tr>
</table>
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><marquee>
公告:欢迎登陆学生管理后台
</marquee></td>
</tr>
</table>
<table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center">欢迎登陆学生管理后台</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>

View File

@ -0,0 +1,154 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO xushen (xuehao, xingming, banji, xi, user_name, password) VALUES (%s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['xuehao'], "text"),
GetSQLValueString($_POST['xingming'], "text"),
GetSQLValueString($_POST['banji'], "text"),
GetSQLValueString($_POST['xi'], "text"),
GetSQLValueString($_POST['user_name'], "text"),
GetSQLValueString($_POST['password'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error());
$insertGoTo = "cg2.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = "SELECT * FROM xushen";
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="20" colspan="2" align="center">添加学生</td>
</tr>
<tr>
<td width="102" align="right"> &nbsp;:</td>
<td width="198"><input name="xuehao" type="text" id="xuehao" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="xingming" type="text" id="xingming" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="banji" type="text" id="banji" /></td>
</tr>
<tr>
<td align="right">:</td>
<td><input name="xi" type="text" id="xi" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="user_name" type="text" id="user_name" /></td>
</tr>
<tr>
<td align="right"> &nbsp;:</td>
<td><input name="password" type="password" id="password" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
<label></label>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td colspan="6" align="center" valign="bottom">学生管理</td>
</tr>
<tr>
<td width="12%" align="center" valign="bottom"> &nbsp;</td>
<td width="12%" align="center" valign="bottom"> &nbsp;</td>
<td width="12%" align="center" valign="bottom"> &nbsp;</td>
<td width="12%" align="center" valign="bottom"> &nbsp;</td>
<td width="12%" align="center" valign="bottom">修改</td>
<td width="12%" align="center" valign="bottom">删除</td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<?php do { ?>
<tr>
<td align="center" valign="bottom"><?php echo $row_Recordset1['xuehao']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['xingming']; ?></td>
<td align="center" valign="bottom"><?php echo $row_Recordset1['user_name']; ?></td>
<td align="center"><?php echo $row_Recordset1['password']; ?></td>
<td align="center" valign="bottom"><a href="xgai.php?xuehao=<?php echo $row_Recordset1['xuehao']; ?>">修改</a></td>
<td align="center" valign="bottom"><a href="xdel.php?xuehao=<?php echo $row_Recordset1['xuehao']; ?>">删除</a></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset2.MoveNext()
Wend
%>
</table>
<p>&nbsp;</p>
<input type="hidden" name="MM_insert" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,152 @@
<?php require_once('Connections/jc.php'); ?>
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO zhengding (dingdan, jcbianhao, jcming, zuozhe, cbshe, banben, shijian, zdren, szbanji, zdshuliang) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['dindan'], "text"),
GetSQLValueString($_POST['jcbianhao'], "text"),
GetSQLValueString($_POST['jcming'], "text"),
GetSQLValueString($_POST['zuozhe'], "text"),
GetSQLValueString($_POST['cbshe'], "text"),
GetSQLValueString($_POST['banben'], "text"),
GetSQLValueString($_POST['shijian'], "text"),
GetSQLValueString($_POST['zjren'], "text"),
GetSQLValueString($_POST['szbanji'], "text"),
GetSQLValueString($_POST['zdsliang'], "int"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($insertSQL, $jc) or die(mysql_error());
$insertGoTo = "cg6.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
$colname_Recordset1 = "-1";
if (isset($_GET['jcbianhao'])) {
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['jcbianhao'] : addslashes($_GET['jcbianhao']);
}
mysql_select_db($database_jc, $jc);
$query_Recordset1 = sprintf("SELECT * FROM jiaocai WHERE jcbianhao = '%s'", $colname_Recordset1);
$Recordset1 = mysql_query($query_Recordset1, $jc) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.txt {font-size: 12px;
color: #000000;
}
-->
</style>
</head>
<body topmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<?php include("head.php");?>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="txt">
<tr>
<td align="center"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="txt">
<tr>
<td height="20" colspan="2" align="center">教材征订</td>
</tr>
<tr>
<td width="102" align="right">教材编号:</td>
<td width="198"><input name="jcbianhao" type="text" id="jcbianhao" value="<?php echo $row_Recordset1['jcbianhao']; ?>" /></td>
</tr>
<tr>
<td align="right">教材名:</td>
<td><input name="jcming" type="text" id="jcming" value="<?php echo $row_Recordset1['jcming']; ?>" /></td>
</tr>
<tr>
<td align="right">作者:</td>
<td><input name="zuozhe" type="text" id="zuozhe" value="<?php echo $row_Recordset1['zuozhe']; ?>" /></td>
</tr>
<tr>
<td align="right">出版社:</td>
<td><input name="cbshe" type="text" id="cbshe" value="<?php echo $row_Recordset1['cbshe']; ?>" /></td>
</tr>
<tr>
<td align="right">版本号:</td>
<td><input name="banben" type="text" id="banben" value="<?php echo $row_Recordset1['banben']; ?>" /></td>
</tr>
<tr>
<td align="right">订单号</td>
<td><label>
<input name="dindan" type="text" id="dindan" />
</label></td>
</tr>
<tr>
<td align="right">征订时间</td>
<td><input name="shijian" type="text" id="shijian" value="<? print(time());?>" /></td>
</tr>
<tr>
<td align="right">征订人</td>
<td><input name="zjren" type="text" id="zjren" /></td>
</tr>
<tr>
<td align="right">所订班级</td>
<td><input name="szbanji" type="text" id="szbanji" /></td>
</tr>
<tr>
<td align="right">征订数量</td>
<td><input name="zdsliang" type="text" id="zdsliang" /></td>
</tr>
</table>
<label>
<input type="submit" name="Submit" value="教材征订" />
</label>
<label></label>
<p>&nbsp;</p>
<input type="hidden" name="MM_insert" value="form1">
</form>
</td>
</tr>
</table>
<?php include("foot.php");?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($Recordset1);
?>

View File

@ -0,0 +1,51 @@
<?php require_once('Connections/jc.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
if ((isset($_GET['dingdan'])) && ($_GET['dingdan'] != "")) {
$deleteSQL = sprintf("DELETE FROM zhengding WHERE dingdan=%s",
GetSQLValueString($_GET['dingdan'], "text"));
mysql_select_db($database_jc, $jc);
$Result1 = mysql_query($deleteSQL, $jc) or die(mysql_error());
$deleteGoTo = "cg6.htm";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $deleteGoTo));
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ</title>
</head>
<body>
</body>
</html>

View File

@ -0,0 +1,83 @@
--
-- 数据库: `jck`
--
CREATE TABLE `admin` (
`name` varchar(20) NOT NULL COMMENT '管理员姓名',
`user_name` varchar(50) NOT NULL COMMENT '登录名',
`password` varchar(20) NOT NULL COMMENT '密码'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `fafang` (
`shijian` date NOT NULL COMMENT '时间',
`lsren` varchar(30) NOT NULL COMMENT '领书人',
`ssbanji` varchar(30) NOT NULL COMMENT '所属班级',
`suliang` varchar(10) NOT NULL COMMENT '数量'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `laoshi` (
`jiaoshihao` varchar(20) NOT NULL COMMENT '教师号',
`xingming` varchar(20) NOT NULL COMMENT '姓名',
`xi` varchar(20) NOT NULL COMMENT '系号',
`user_name` varchar(50) NOT NULL COMMENT '登录名',
`password` varchar(20) NOT NULL COMMENT '密码'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `ruku` (
`jcbianhao` varchar(50) NOT NULL COMMENT '教材编号',
`jcming` varchar(50) NOT NULL COMMENT '教材名',
`zuozhe` varchar(30) NOT NULL COMMENT '作者',
`cbshe` varchar(50) NOT NULL COMMENT '出版社',
`banben` varchar(20) NOT NULL COMMENT '版本号',
`scjia` float NOT NULL COMMENT '市场价',
`sgjia` float NOT NULL COMMENT '实购价',
`suliang` int(10) NOT NULL COMMENT '数量',
`rukushijian` date NOT NULL COMMENT '入库时间'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `xi` (
`xingming` varchar(20) NOT NULL COMMENT '系管理人姓名',
`xi` varchar(20) NOT NULL COMMENT '系号',
`user_name` varchar(50) NOT NULL COMMENT '登录名',
`password` varchar(20) NOT NULL COMMENT '密码'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `xushen` (
`xuehao` varchar(20) NOT NULL COMMENT '学号',
`xingming` varchar(20) NOT NULL COMMENT '姓名',
`banji` varchar(20) NOT NULL COMMENT '班级',
`xi` varchar(20) NOT NULL COMMENT '系号',
`user_name` varchar(50) NOT NULL COMMENT '登录名',
`password` varchar(20) NOT NULL COMMENT '密码'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `zhengding` (
`dingdan` varchar(30) NOT NULL COMMENT '订单号',
`jcbianhao` varchar(30) NOT NULL COMMENT '教材编号',
`jcming` varchar(50) NOT NULL COMMENT '教材名',
`jcleixin` varchar(30) NOT NULL COMMENT '教材类型',
`zuozhe` varchar(50) NOT NULL COMMENT '作者',
`cbshe` varchar(50) NOT NULL COMMENT '出版社',
`banben` varchar(20) NOT NULL COMMENT '版本号',
`shijian` date NOT NULL COMMENT '征订时间',
`zdren` varchar(30) NOT NULL COMMENT '征订人',
`szbanji` varchar(30) NOT NULL COMMENT '所订班级',
`zdshuliang` int(10) NOT NULL COMMENT '征订数量'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

View File

@ -0,0 +1,15 @@
mysql 账号root 密码1111
登 录:四种不同权限的人,管理员/系级人员/老师/学生,不同人登录后界面应有所不同,如果相同要做到不同功能并是是所有人都可用.
教材征订:教师通过每年的开课计划进行教材征订,征订的结果(订单号,教材编号,教材名,教材类型,作者,出版社及版本号,征订时间,征订人,所订班级,征订数量)由系级人员审批并保存,最后由管理员形成征订表单.之后是由采购员去买,与我们无关.
教材入库:和征订单比对后入库(可有可无),入库字段:教材编号,教材名,作者,出版社及版本号,市场价,实购价,数量,入库时间.
教材发放:在首页通知什么时间内领书,各班班长过来领.并记录领书人和所属班级.如果教师领书,只能领一本.每笔记录库存相应减少(在管理员界面实现)
相关查询:四种权限人员都可以查看教材情况(教材编号,教材名,教材类型,作者,出版社,库存量)
管理员还可查看:预定清单,发放清单,和财务清单并能开成报表(尽可能是可以查一段时间内的信息)
我说个大致的流程:老师进入系统,根据分类教材,看到自己要征订的书,可以点下征订按钮.之后到征订页面,系统会记录下征订人,征订时间和相关教材的信息,老师只要填下为哪个班级订的,和订购数量.-----?信息在系级人登录后展现,系级人员点下同意,系统记下这个审核人的姓名------?所在征订单汇总到管理员这,管理员制定出一个订单表.其它的过程应该比较清楚的.