1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
| <?php
function adminloginpage( )
{
global $smarty;
global $dbconn;
global $config;
global $lang;
if ( isset( $_SERVER['PHP_SELF'] ) )
{
$_obfuscate_VvnB7aAScz0 = afterlastslash( $_SERVER['PHP_SELF'] );
}
else
{
$_obfuscate_VvnB7aAScz0 = "index.php";
}
indexadminpage( "admin_login" );
if ( isset( $_POST['login_lg'] ) || isset( $_POST['pass_lg'] ) )
{
geterrors( "auth_failed" );
}
$smarty->assign( "file_name", $_obfuscate_VvnB7aAScz0 );
$smarty->display( trimslash( $config['admin_theme_path'] )."/admin_login_table.tpl" );
exit( );
}
function adminlogout( )
{
global $smarty;
global $dbconn;
global $config;
global $lang;
global $auth;
setcookie( "re_login", "", time( ) - 7200, $config['site_root']."/" );
setcookie( "re_pass", "", time( ) - 7200, $config['site_root']."/" );
$_obfuscate_M2poO71n = "DELETE FROM ".ACTIVE_SESSIONS_TABLE.( " WHERE id_user='".$auth[0]."' AND session='" ).session_id( )."' ";
if ( isset( $auth[0] ) )
{
$_obfuscate_SF4 = $dbconn->execute( $_obfuscate_M2poO71n );
}
unset( $_SESSION['return_list']);
unset( $_SESSION['xml_menu']);
unset( $_SESSION['active_menu']);
sess_delete( session_id( ) );
echo "<script>location.href='".$config['server'].$config['site_root']."/'</script>";
}
include( "../include/config.php" );
include( "../common.php" );
include( "../include/functions_admin.php" );
include( "../include/functions_auth.php" );
include( "../include/functions_common.php" );
include( "../include/functions_xml.php" );
$auth = array( );
$auth = auth_user( );
@$sel = $_POST['sel'] ? $_POST['sel'] : $_GET['sel'];
if ( $auth[4] == 1 || @!is_array( $auth ) && isusermoderator( $auth[0] ) )
{
do
{
if ( 0 < $auth[0] && $sel != "logoff" )
{
setloginstatistic( $auth[0] );
$GLOBALS['_SESSION']['lang_cd'] = $auth[13];
$login_lg = isset( $_POST['login_lg'] ) ? $_POST['login_lg'] : "";
$pass_lg = isset( $_POST['pass_lg'] ) ? $_POST['pass_lg'] : "";
setcookie( "re_login", $login_lg, time( ) + 86400000, $config['site_root']."/" );
setcookie( "re_pass", md5( $pass_lg ), time( ) + 86400000, $config['site_root']."/" );
$return_list = isset( $_SESSION['return_list'] ) ? $_SESSION['return_list'] : "";
unset( $_SESSION['return_list']);
if ( is_array( $return_list ) )
{
if ( empty( $return_list[1] ) )
{
$URL = $config['server'].$config['site_root']."/admin/admin_homepage.php";
}
else
{
$URL = $config['server'].$return_list[1];
}
header( "Location: ".$URL );
}
else if ( getsitesettings( "use_link_modifications" ) )
{
echo "<script>location.href='".$config['server'].$config['site_root']."/admin/homepage/'</script>";
}
else
{
echo "<script>location.href='".$config['server'].$config['site_root']."/admin/admin_homepage.php'</script>";
}
switch ( $sel )
{
}
else if
{
case "logoff" :
adminlogout( );
break;
default :
adminloginpage( );
if ( getsitesettings( "use_link_modifications" ) )
{
break;
if ( getsitesettings( "use_link_modifications" ) )
{
break;
}
}
}
}
if ( $auth[10] == 3 )
{
$GLOBALS['_SESSION']['lang_cd'] = $auth[13];
echo "<script>location.href='".$config['server'].$config['site_root']."/homepage.php'</script>";
}
else
{
echo "<script>location.href='".$config['server'].$config['site_root']."/index.php?sel=logoff'</script>";
}
// }
while ( 0 );
?> |
Partager