详细的错误显示如下:PHP Notice: Undefined index: action in D:\virtualhost\wk6478001\admin\login.php on line 18 ,请问代码怎么改?
<?php
/*********************/
/* */
/* Version : 5.1.0 */
/* Author : RM */
/* Comment : 071223 */
/* */
/*********************/
define( "JIEQI_MODULE_NAME", "system" );
define( "JIEQI_ADMIN_LOGIN", 1 );
if ( $_REQUEST['action'] == "login" )
{
define( "JIEQI_NEED_SESSION", 1 );
}
require_once( "../global.php" );
if ( !empty( $_SESSION['jieqiUserId'] ) || !empty( $_SESSION['jieqiAdminLogin'] ) )
{
if ( empty( $_REQUEST['jumpurl'] ) )
{
$GLOBALS['_REQUEST']['jumpurl'] = JIEQI_URL."/admin/index.php";
}
header( "Location: ".$_REQUEST['jumpurl'] );
exit( );
}
if ( isset( $_REQUEST['action'], $_SESSION['jieqiUserId'] ) )
{
@session_regenerate_id( );
}
jieqi_loadlang( "users", JIEQI_MODULE_NAME );
jieqi_getconfigs( JIEQI_MODULE_NAME, "configs" );
if ( !isset( $_REQUEST['action'] ) )
{
$GLOBALS['_REQUEST']['action'] = "";
}
if ( $_REQUEST['action'] == "login" && !empty( $_REQUEST['password'] ) || ( !empty( $_REQUEST['username'] ) && !empty( $_SESSION['jieqiUserUname'] ) ) )
{
if ( empty( $_REQUEST['username'] ) && !empty( $_SESSION['jieqiUserUname'] ) )
{
$GLOBALS['_REQUEST']['username'] = $_SESSION['jieqiUserUname'];
}
if ( empty( $_REQUEST['jumpurl'] ) )
{
$GLOBALS['_REQUEST']['jumpurl'] = JIEQI_URL."/admin/index.php";
}
jieqi_useraction( "login", $_REQUEST );
exit( );
}
include_once( JIEQI_ROOT_PATH."/admin/header.php" );
$self_fname = $_SERVER['PHP_SELF'] ? basename( $_SERVER['PHP_SELF'] ) : basename( $_SERVER['SCRIPT_NAME'] );
if ( !empty( $_REQUEST['jumpurl'] ) )
{
$jieqiTpl->assign( "url_login", JIEQI_USER_URL."/admin/".$self_fname."?do=submit&jumpurl=".urlencode( $_REQUEST['jumpurl'] ) );
}
else
{
$jieqiTpl->assign( "url_login", JIEQI_USER_URL."/admin/".$self_fname."?do=submit" );
}
if ( empty( $_SESSION['jieqiUserId'] ) )
{
$jieqiTpl->assign( "jieqi_userid", 0 );
$jieqiTpl->assign( "jieqi_username", "" );
}
else
{
$jieqiTpl->assign( "jieqi_userid", $_SESSION['jieqiUserId'] );
$jieqiTpl->assign( "jieqi_username", jieqi_htmlstr( $_SESSION['jieqiUserUname'] ) );
}
if ( !empty( $jieqiConfigs['system']['checkcodelogin'] ) )
{
$jieqiTpl->assign( "show_checkcode", 1 );
}
else
{
$jieqiTpl->assign( "show_checkcode", 0 );
}
if ( empty( $jieqiConfigs['system']['usegd'] ) )
{
$jieqiTpl->assign( "usegd", 0 );
}
else
{
$jieqiTpl->assign( "usegd", 1 );
}
$jieqiTpl->assign( "url_checkcode", JIEQI_USER_URL."/checkcode.php" );
$jieqiTpl->setcaching( 0 );
$jieqiTset['jieqi_contents_template'] = JIEQI_ROOT_PATH."/templates/admin/login.html";
include_once( JIEQI_ROOT_PATH."/admin/footer.php" );
?>
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。