第一步:
打开
phpcms/modules/admin/index.php文件,找到以下代码
//不为口令卡验证
if (!isset($_GET['card'])) {
$username = isset($_POST['username']) ? trim($_POST['username']) : showmessage(L('nameerror'),HTTP_REFERER);
$code = isset($_POST['code']) && trim($_POST['code']) ? trim($_POST['code']) : showmessage(L('input_code'), HTTP_REFERER);
if ($_SESSION['code'] != strtolower($code)) {
$_SESSION['code'] = '';
showmessage(L('code_error'), HTTP_REFERER);
}
修改为:
//不为口令卡验证
if (!isset($_GET['card'])) {
$username = isset($_POST['username']) ? trim($_POST['username']) : showmessage(L('nameerror'),HTTP_REFERER);
//$code = isset($_POST['code']) && trim($_POST['code']) ? trim($_POST['code']) : showmessage(L('input_code'), HTTP_REFERER);
if ($_SESSION['code'] != strtolower($code)) {
$_SESSION['code'] = '';
//showmessage(L('code_error'), HTTP_REFERER);
}
第二步:
打开
phpcms/modules/admin/templates/login.tpl.php文件,删除以下代码
<label><?php echo L('security_code')?>:</label><input name="code" type="text" class="ipt ipt_reg" οnfοcus="document.getElementById('yzm').style.display='block'" />
<div id="yzm" class="yzm"><?php echo form::checkcode('code_img')?><br /><a href="javascript:document.getElementById('code_img').src='<?php echo SITE_PROTOCOL.SITE_URL.WEB_PATH;?>api.php?op=checkcode&m=admin&c=index&a=checkcode&time='+Math.random();void(0);"><?php echo L('click_change_validate')?></a></div>