php editing help please

Hy Guys:

In my previous post i explained i cant log in to my admin panel on my website. When i try is just refresh, and make the fields empty. I check on the phpadmin the pass and everything, but i think there everything fine.

I find out, before the login.php let me in to the admin index.php, communicate with the config_inc.php

Here is the config_inc.php details:

[php]<? session_start();

foreach($_POST as $k => $v){ $$k=$v; “$k=$v;”; }
foreach($_GET as $k => $v){ $$k=$v; }
foreach($_SERVER as $k => $v){ $$k=$v; }
if(sizeof($_SESSION)>0) foreach($_SESSION as $k => $v){ $$k=$v; /define($k,$v);/ }

// your mysql database details
$hostnm = “bla bla bla”;
$usernm = “bla bla bla”;
$pwd = “bla bla bla”;
$dbName = “bla bla bla”;

// your site name
$site_name=“YourWebsiteName”;

// admin’s email
$admin_mail="[email protected]";

// do not edit below

if(!MYSQL_CONNECT($hostnm,$usernm,$pwd)){
die($err[2]);
}
if (!mysql_select_db("$dbName")){
die($err[2]);
}
if(@$HTTP_POST_VARS[‘login_id’]!="" and @$HTTP_POST_VARS[‘password’]!="")
{
$loginid = $HTTP_POST_VARS[‘login_id’];
$password = $HTTP_POST_VARS[‘password’];
$password = crypt($HTTP_POST_VARS[‘password’],2);
$query = “select * from pass where login=’$loginid’ and pass=’$password’”;
//
//
$result=mysql_query($query) or die(“query failed: $query”.mysql_error());

if($line=mysql_fetch_array($result))
{
session_register(“loginid”);

  header("Location: index.php ");
  exit;

}
else
{
$msg= “Login Failed : Check Login and Password”;
session_register(‘msg’);
header("Location: login.php ");
exit;
}

}
if(!session_is_registered(‘loginid’))
{
$msg=“Login to view this page”;
session_register(“msg”);
header("Location: login.php ");
exit;
}

/*$query = “select * from pass where login=”".$_SERVER[‘PHP_AUTH_USER’]."" and pass="".(crypt($_SERVER[‘PHP_AUTH_PW’],2)).""";
$result = MYSQL_QUERY($query);

if((mysql_num_rows($result)!=1)or($_SERVER[‘PHP_AUTH_USER’]=="")or($_SERVER[‘PHP_AUTH_PW’]=="")){
authenticate();
}
@mysql_free_result($result);*/

$num_en=10;

$t_language= “language”;
$t_user= “user”;
$t_site= “site”;
$t_clear= “clear”;
$t_cat= “cat”;
$t_idu_idc= “idu_idc”;
$t_idm_idc= “idm_idc”;
$t_tmp_mail= “tmp_mail”;

$num_rows=10;

$query = "select * from ".$t_clear;
$result = MYSQL_QUERY($query);
if((mktime(0,0,0,date(“m”),date(“d”),date(“Y”))!=mysql_result($result,0,“date”))and(date(‘w’)==0)){
require(‘weekstat.php’);
}
@mysql_free_result($result);

/*function authenticate() {
global $err;
header( “WWW-Authenticate: Basic realm=“Authentication System””);
header( “HTTP/1.0 401 Unauthorized”);
die($err[1]);
}
*/

?>[/php]

The question is, how can i make to work, or to change to log in as a admin without password, or any way to get in. Please guys help! Thank you anyway

Sponsor our Newsletter | Privacy Policy | Terms of Service