资源简介
1.首先将数据库相关操作完成
建立数据库连接 数据表的设计
2.将代码解压 放在www目录下(在此之前要配置好php运行环境)
3.后台管理员登录地址:http://localhost/cms2/admin.php/Admin/index 管理员用户名和密码都是admin admin
可以在用户管理处添加一个用户名,以便第4步操作
4.前台教师登录地址:http://localhost/cms2/index.php/home/index/index
需要完善地方:用户添加学生添加信息的验证,注册信息的验证等
代码片段和文件信息
/***********************************************************************
Copyright 2006-2007 Ma Bingyao
These sources is free software. Redistributions of source code must
retain the above copyright notice. Redistributions in binary form
must reproduce the above copyright notice. You can redistribute it
freely. You can use it with any free or commercial software.
These sources is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY. Without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You may contact the author by:
e-mail: andot@coolcode.cn
*************************************************************************/
#ifdef HAVE_CONFIG_H
#include “config.h“
#endif
#include “php.h“
#if HAVE_XXTEA
#include “php_xxtea.h“
#include “ext/standard/info.h“ /* for phpinfo() functions */
#include “xxtea.h“
/* compiled function list so Zend knows what‘s in this module */
zend_function_entry xxtea_functions[] =
{
ZEND_FE(xxtea_encrypt NULL)
ZEND_FE(xxtea_decrypt NULL)
ZEND_FE(xxtea_info NULL)
{NULL NULL NULL}
};
/* compiled module information */
zend_module_entry xxtea_module_entry =
{
STANDARD_MODULE_HEADER
XXTEA_MODULE_NAME
xxtea_functions
ZEND_MINIT(xxtea)
ZEND_MSHUTDOWN(xxtea)
NULL
NULL
ZEND_MINFO(xxtea)
XXTEA_VERSION
STANDARD_MODULE_PROPERTIES
};
/* implement standard “stub“ routine to introduce ourselves to Zend */
#if defined(COMPILE_DL_XXTEA)
ZEND_GET_MODULE(xxtea)
#endif
static xxtea_long *xxtea_to_long_array(unsigned char *data xxtea_long len int include_length xxtea_long *ret_len) {
xxtea_long i n *result;
n = len >> 2;
n = (((len & 3) == 0) ? n : n + 1);
if (include_length) {
result = (xxtea_long *)emalloc((n + 1) << 2);
result[n] = len;
*ret_len = n + 1;
} else {
result = (xxtea_long *)emalloc(n << 2);
*ret_len = n;
}
memset(result 0 n << 2);
for (i = 0; i < len; i++) {
result[i >> 2] |= (xxtea_long)data[i] << ((i & 3) << 3);
}
return result;
}
static unsigned char *xxtea_to_byte_array(xxtea_long *data xxtea_long len int include_length xxtea_long *ret_len) {
xxtea_long i n m;
unsigned char *result;
n = len << 2;
if (include_length) {
m = data[len - 1];
if ((m < n - 7) || (m > n - 4)) return NULL;
n = m;
}
result = (unsigned char *)emalloc(n + 1);
for (i = 0; i < n; i++) {
result[i] = (unsigned char)((data[i >> 2] >> ((i & 3) << 3)) & 0xff);
}
result[n] = ‘\0‘;
*ret_len = n;
return result;
}
static unsigned char *php_xxtea_encrypt(unsigned char *data xxtea_long len unsigned char *key xxtea_long *ret_len) {
unsigned char *result;
xxtea_long *v *k v_len k_len;
v = xxtea_to_long_array(data len 1 &v_len);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 210 2015-01-28 15:47 cms\cms2\.htaccess
文件 2 2016-04-05 21:42 cms\cms2\.idea\.name
文件 948 2016-05-07 08:33 cms\cms2\.idea\encodings.xm
文件 599 2016-04-05 21:42 cms\cms2\.idea\misc.xm
文件 256 2016-04-05 21:42 cms\cms2\.idea\modules.xm
文件 281 2016-04-05 21:42 cms\cms2\.idea\tp.iml
文件 164 2016-04-05 21:42 cms\cms2\.idea\vcs.xm
文件 55450 2016-05-12 14:02 cms\cms2\.idea\workspace.xm
文件 456 2016-05-07 15:08 cms\cms2\admin.php
文件 253 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\!.gif
文件 1705 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\ad.gif
文件 606 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\add.gif
文件 213 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\back.gif
文件 73 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\bg.gif
文件 26509 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\bigsize.jpg
文件 18679 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\bootnbg.jpg
文件 179 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\bullet.gif
文件 600 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\buttom-copy-bg.gif
文件 1813 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\buttom-left.gif
文件 2530 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\buttom-right.gif
文件 225 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\buttom_bgs.gif
文件 353 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\buttom_left2.gif
文件 383 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\buttom_right2.gif
文件 2001 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\card.jpg
文件 350 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\check-out_.gif
文件 502 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\close.gif
文件 164 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\content-bg-line.gif
文件 257 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\content-bg.gif
文件 379 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\databa
文件 1892 2008-06-04 18:48 cms\cms2\Application\Admin\Common\images\DefaultDocs.gif
............此处省略736个文件信息
评论
共有 条评论