安装过程及后台修改.docx
- 文档编号:18298651
- 上传时间:2023-08-15
- 格式:DOCX
- 页数:21
- 大小:1.49MB
安装过程及后台修改.docx
《安装过程及后台修改.docx》由会员分享,可在线阅读,更多相关《安装过程及后台修改.docx(21页珍藏版)》请在冰点文库上搜索。
安装过程及后台修改
进入安装程序界面
点击【next】继续,弹出软件授权说明
点击【接受条款(Iaccepttheagreement)】,继续安装,弹出选择安装路径对话
框,选择路径
点击【next】,设置wamp的快捷方式
点击【next】后,进入readytoinstall界面
安装过程中会弹出检测到的浏览器对话框,一般采用explorer浏览器
选择完后继续安装,会让你输入PHP的邮件参数信息,这些保留默认的内容,也可自行
选择,选择完后点击【next】
弹出运行wampserver2.1对话框,进行选择,点击【完成】
后台修改
后台logo及背景制作与替换
使用PS制作新logo,如图所示
,替换原logo文件。
修改原背景文件颜色,替换原文件。
修改css文件,去掉背景分层。
效果如图:
修改后台管理页面
通过修改header.phpfooter.php文件修改管理页面
添加动态时钟
修改index.tpl.php文件,将原获取当前时间功能修改为动态时钟,代码如下:
php
//显示系统时间
$n=chr(13);
echo"
echo"document.write(' 0px;font-size: 9pt;font-family: 宋体\">? ');".$n; echo"vary=".date("Y").";//年".$n; echo"varm=".date("n").";//月".$n; echo"vard=".date("j").";//日".$n; echo"varw=".date("w").";//星".$n; echo"varh=".date("H").";//时".$n; echo"vari=".date("i").";//分".$n; echo"vars=".date("s").";//秒".$n; echo"varhstr=istr=sstr=a='';".$n; echo"varww=Array('日','一','二','三','四','五','六');".$n; echo"functionclock(){".$n; echo"s++;".$n; echo"if(s==60){i+=1;s=0;}//秒进位".$n; echo"if(i==60){h+=1;i=0;}//分进位".$n; echo"if(h==24){w+=1;d+=1;h=0;}//时进位".$n; echo"if(w==7){w=0;}//星期进位".$n; echo"if(m==2){//是否是二月份? ".$n; echo"if(! y%4>0){//不是闰月(二月有28天)".$n; echo"if(d==30){".$n; echo"m+=1;".$n; echo"d=1;}".$n; echo"}".$n; echo"else{//是闰月(二月有29天)".$n; echo"if(d==29){".$n; echo"m+=1;".$n; echo"d=1;}".$n; echo"}".$n; echo"}".$n; echo"else{//非2月份的月份".$n; echo"if(m==4||m==6||m==9||m==11){//只有30天的月份".$n; echo"if(d==31){".$n; echo"m+=1;".$n; echo"d=1;}".$n; echo"}".$n; echo"else{//有31天的月份".$n; echo"if(d==32){".$n; echo"m+=1;".$n; echo"d=1;}".$n; echo"}".$n; echo"}".$n; echo"if(m==13){y+=1;m=1;}//月进位".$n; echo"if(h<10){hstr='0'+h}else{hstr=''+h};".$n; echo"if(i<10){istr=': 0'+i}else{istr=': '+i};".$n; echo"if(s<10){sstr=': 0'+s}else{sstr=': '+s};".$n; echo"if(h<13){astr='am';}else{astr='pm';};".$n; echo"document.getElementById('TimeShow').innerHTML=''+y+'年'+m+'月'+d+'日'+' echo"setTimeout('clock()',1000);".$n; echo"}".$n; echo"clock();".$n; echo"".$n; ? >
效果如图:
登陆界面加验证码
在login.tpl.php中加验证码代码
80px;height: 25px;float: left;border: #666;"name="imgcode"> right;margin-right: 20px;cursor: pointer;"onclick="changeimg(this)"alt="点此刷新验证码"/> 创建code.php文件 php session_start(); //Setthecontent-type header("Content-type: image/png");//告诉浏览器当前文件产生的结果以png形式进行输出 //Createtheimage $im=imagecreate(110,30);//创建一张宽为110,高为30的画布 //Createsomecolors $bg=imagecolorallocate($im,155,100,255);//给画布加上背景颜色 $white=imagecolorallocate($im,255,255,255);//三原色白色 //$grey=imagecolorallocate($im,128,128,128); $black=imagecolorallocate($im,0,0,0);//黑色 $numer_array=range(0,9);//生成一个0到9范围的数组 $abc=range('a','z');//生成一个a到z范围的数组 $big_abc=range('A','Z');//生成一A到Z范围的数组 $big_chars=array_merge($numer_array,$abc,$big_abc);//将上述三个数组进行合并 $font='simhei.ttf';//设定字体文件的路径 $myimagecode=''; for($i=0;$i<4;$i++){ $str=$big_chars[rand(0,61)];//从合并后的数组中随机取一个字符 $myimagecode=$myimagecode.$str;//将这个验证码字符窜存入变量myimagecode中 $a=50*$i; $b=50*($i+1); imagettftext($im,30,0,mt_rand($a,$b),mt_rand(20,30),$black,$font,$str);//将取出的字符写在画布上 } $_SESSION['thisimagecode']=$myimagecode; for($i=0;$i<110;$i++){ imagesetpixel($im,mt_rand(0,110),mt_rand(0,30),$white);//给画布加上点 } for($i=0;$i<4;$i++){ imageline($im,mt_rand(0,110),mt_rand(0,30),mt_rand(0,110),mt_rand(0,30),$black);//给画面加上线条 } imagepng($im);//将图像以png形式输出 imagedestroy($im);//将图像资源从内存中销毁,以节约资源 ? > 在login.php文件中添加验证码验证代码 php /** *ZCNCMS *用户登陆 *php>=5.0 *@authorLEI *@version1.1.2 *@time20111004 */ //初始化 $pagetitle='系统登陆'; $loginerror=''; //功能部分 if(isset($submit)){ include(WEB_MOD.'users.class.php'); $users=newUsers(); $password=md5($password); $userslogin=array(); $userslogin=$users->yz($username,$password,$imgcode); if(! empty($userslogin)&&count($userslogin)>0){ $_SESSION['admin_username']=$userslogin['username']; $_SESSION['admin_classid']=$userslogin['classid']; $_SESSION['admin_power']=$userslogin['power']; $_SESSION['admin_id']=$userslogin['id']; //记录登陆信息 $imgcode=strtolower($_POST['imgcode']);//接受从登陆输入框提交过来的验证码并转化为小写; $myimagecode=strtolower($_SESSION['thisimagecode']);//从session中取得验证码并转化为小写; if($imgcode! =$myimagecode){ echo'请输入正确的验证码';exit; } include(WEB_MOD.'users_log.class.php'); $users_log=newUsers_log(); $users_last_log=$users_log->GetLastLog(array(),"`action`='login'anduserid=".$userslogin['id']); $_SESSION['admin_last_log']=$users_last_log; $timenow=time(); $info=array( 'userid'=>$userslogin['id'], 'action'=>'login', 'ipaddr'=>GetIP(), 'addtime'=>$timenow ); //print_r($_SESSION['members_last_log']); //print_r($info); $users_log->Add($info); header("location: ./"); exit; }else{ //echo1; $loginerror='用户名密码错误,请重新登陆.'; $templatefile='login.tpl.php'; } }else{ $templatefile='login.tpl.php'; } ? > 验证码添加点击刷新功能 在login.tpl.php文件中添加如下代码: 80px;height: 25px;float: left;border: #666;"name="imgcode"> right;margin-right: 20px;cursor: pointer;"onclick="changeimg(this)"alt="点此刷新验证码"/> //更换验证码 functionchangeimg(obj) { obj.src="code.php? t="+newDate().getTime(); }
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 安装 过程 后台 修改