Нужда от съвет помощ

alex222

Registered
Здравейте това ми е първия пост тук и ще се радвам някой ако може да ми помогне с моя проблем .Вече два дена се опивам да го реша но някъкси все повече се омотвам Благодаря ви предварително на всички отзовали се.

Това е от система за размяна набанери но немога да влезна в часта за клиента (но го създавам без проблем)

клиентски вход:
Код:
<?

foreach($_POST as $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; }}

// Your paypal account
$email_pay="youremail@youremail.com";

// Referral level credits

$ref_cr[1]=0.25;
$ref_cr[2]=0.0125;
$ref_cr[3]=0.000625;
$ref_cr[4]=0.0000625;
$ref_cr[5]=0.000003125;

// Account Credit Rates
$basic_min=0.75;
$basic_max=1;
$silver_min=1;
$silver_max=1.25;
$gold_min=1.25;
$gold_max=1.5;

// URLs
$path="http://localhost/blue";
$url_default="http://localhost/blue";

// Lenght of session (during session each site will be shown only one time)
$time_autohit=30;        //sec

// mysql database details
$hostnm = "localhost";
$usernm = "root";
$pwd = "1234";
$dbName = "text";

// Bonus credits at signup
$bonus_credits=200;

include('apanel/vars.conf.php');

// Do not edit below
$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";

if(!MYSQL_CONNECT($hostnm,$usernm,$pwd)){
        die($err[2]);
}
if (!mysql_select_db($dbName)){
        die($err[2]);
}

$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)){
        unset($body,$subject,$row,$result);
        require('apanel/error_inc.php');
        require('apanel/weekstat.php');
        unset($body,$subject,$row,$result);
        require('error_inc.php');
}
@mysql_free_result($result);

function auth($log,$pass){
        global $t_user;
        $query = "select id from ".$t_user." where email=\"".$log."\" and pass=\"".$pass."\" ";
        $result = MYSQL_QUERY($query);
        if(mysql_num_rows($result)>0){
                $id=mysql_result($result,0,"id");
                @mysql_free_result($result);
                return $id;
        }else{
                @mysql_free_result($result);
                return 0;
        }
}

//get the settings
$qset = "select * from re_settings";
$rset = mysql_query($qset) or die(mysql_error());
$aset = mysql_fetch_array($rset);

$admin_mail = $aset['ContactEmail'];
$site1 = $aset['SiteTitle'];

?>

Също така немога да влезна и в админ входа паролата е виждам но нестава:
Код:
<? 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 = "localhost";
$usernm = "root";
$pwd = "1234";
$dbName = "text";

// your site name
$site_name="YourWebsiteName";

// admin's email
$admin_mail="youremail@youremail.com";


// 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]);
}
*/

?>
Наистина някой ако може да помогне ще съм благодарен.Нещо ако е нужно питайте за да го поставя тук.
 

Горе