Need some help.

Discussion in 'BlackHat Lounge' started by SeoGaming, Aug 30, 2011.

  1. SeoGaming

    SeoGaming BANNED BANNED

    Joined:
    May 23, 2011
    Messages:
    91
    Likes Received:
    13
    Hey guys,

    I need some help with php.

    I have installed a nulled adquick script.Everything is working fine but I can't add the site as a publisher, it always shows blank page.Can someone please look into the code and correct for me please.

    Here is from the file at mydomain.com/seller_mywebsites.php

    Code:
    <?php
    include ("include/config.php");
    
    $msg = "";
    
    
    if(isset($_GET['no_www']))
        $msg = "You hav no website to advertise on. Please register a website first.";
    
    if(isset($_POST[delete_pid])){
        mysql_query("delete from publishersinfo where pid='$_POST[del_pid]'");
        header("location: seller_mywebsites.php");            
        exit();
    }
    
    if($_SESSION[utype] != 'pub+adv'){
        header("location: account.php?smw&red_url=".urlencode(basename($_SERVER['PHP_SELF']).'?'.$_SERVER['QUERY_STRING']));
        exit();
    }
    
    
    
    
    if($_SERVER['REQUEST_METHOD']=='POST' && !isset($_POST[update_pid]))
        {
        if($pid = register_new_publisher($_POST))
            {
                if($_config[approve_new_site] == 'yes') 
                header("location: account.php?warning_msg_www");
                else header("location: account.php");
                exit();
            }
            
        else $msg = "There was a server error right this moment. Please try again later...";
        }
    
    
    else if(isset($_POST[update_pid]) && $_POST[update_pid] != '' && $_SERVER['REQUEST_METHOD']=='POST') {
        if(update_publisher($_POST))
            {
                header("location: seller_mywebsites.php?pid=$_POST[update_pid]");
                exit();
            }        
        else $msg = "There was a server error right this moment. Please try again later...";
        }
    
        $smarty->assign('msg',$msg);
        
    
    $res = mysql_query("select * from publishersinfo where uid = '$_SESSION[uid]' order by pid desc");
    while($r = @mysql_fetch_assoc($res)) {
        $rr[] = array('pid'=>$r[pid], 'web'=>$r[websitename]);
    }
    $smarty->assign('www',$rr);
        
    if(isset($_GET[pid])){
    $res2 = mysql_query("select * from publishersinfo where uid='$_SESSION[uid]' and pid='$_GET[pid]'");
    while($info = @mysql_fetch_assoc($res2)){
        $_POST['wname'] = $info['websitename'];
        $_POST['url'] = $info['url'];
        $_POST['wdes'] = $info['description'];
        $_POST['cats'] = $info['catid'];
        $_POST['subcats'] = $info['subcatid'];
        $_POST['keywords'] = $info['keywords'];
        $_POST['tad'] = $info['targetedad'];    
        $_POST['clickrate'] = $info['clickrate'];
        $_POST['isadult'] = $info['isadult'];
        $_POST['lang'] = $info['langid'];
        $_POST['adposition'] = $info['adposition'];
        $_POST['isrestricted'] = $info['isrestricted'];
        $_POST['restriction'] = $info['restriction'];
        
        $g = mysql_query("select gid from pub_geo where pid=$info[pid]");
            for($i=0; $i< mysql_num_rows($g); $i++)
                $_POST[dest][$i] = mysql_result($g,$i,0);
        }
    }
        
        $geo_list = get_list('pub_geolist','location');
        
        for ($i=0;$i<count($geo_list['gid']);$i++)
        {
            if(@in_array($geo_list['gid'][$i], $_POST['dest'])){
             $right_list['location'][] = $geo_list['location'][$i];
             $right_list['gid'][] = $geo_list['gid'][$i];
             }
             else{
             $left_list['location'][] = $geo_list['location'][$i];
             $left_list['gid'][] = $geo_list['gid'][$i];
             }
        }
        
    
        
    $smarty->assign('geo',$left_list['location']);
    $smarty->assign('g_id',$left_list['gid']);
    
    $smarty->assign('r_geo',$right_list['location']);
    $smarty->assign('r_g_id',$right_list['gid']);
    
    
        $cat_list = get_list('category','category');
        
    $smarty->assign('cats',$cat_list['category']);
    $smarty->assign('cat_ids',$cat_list['cid']);
    
        if(isset($_POST[subcats]) && isset($_POST[cats])){
            $scat_list = get_sub_cat_list($_POST[cats]);
        }
        else $scat_list = get_sub_cat_list($cat_list['cid'][0]);
        
    $smarty->assign('scats',$scat_list['subcategory']);
    $smarty->assign('scat_ids',$scat_list['sid']);
    
    
        $lang_list = get_list('language','language');
    
    $smarty->assign('langs',$lang_list['language']);
    $smarty->assign('lang_ids',$lang_list['lid']);
    $smarty->assign('right_panel','off');
    $content = $smarty->fetch('seller_mywebsites.tpl');
    $smarty->assign('content',$content);
    $smarty->display('master_page.tpl');
    ?>
    Code below is from the file at mydomain.com/include/config.php

    Code:
    <?php
    ob_start();
    error_reporting(0);
    session_start();
    $_config = array();
    require_once("db_connection.php");
    require_once("libs/Smarty.class.php");
    include("functions.php");
    require_once("pagination.php");
    
    $smarty = new Smarty;
    
    if($admin_page == 'Y')
        {
        $smarty->assign('sel_tmp', $_config['template'] );
        $_config['template'] = 'default';
        }
    
    $smarty->template_dir = 'templates/'.$_config['template'].'/';
    $smarty->compile_dir = 'templates_c/';
    $smarty->config_dir = 'configs/';
    $smarty->cache_dir = 'cache/';
    //$smarty->caching = true;
    //$smarty->cache_lifetime = 3600;
    $smarty->compile_check = true; //
    $smarty->debugging = false;  //
    $smarty->error_reporting = false;
    
    $lang_file = 'lang/'.$_config[lang].'.php';
    require_once($lang_file);
    $smarty->assign('_lang',$_lang);
    
    $smarty->assign('template_dir','templates/'.$_config['template']);
    
    $smarty->assign('CURRENCY',$_config['currency']);
    
    $smarty->assign('_config',$_config);
    
    $scfn = $_SERVER['SCRIPT_FILENAME'];
    $t = explode('/', $scfn );
    $cp = $t[count($t)-1];
    $smarty->assign('cp',$cp);
    
    $tip = mysql_result(mysql_query("select tip from tips order by rand() limit 1"),0,0);
    $TIP = '<p align="left" class="post-footer align-left" style="margin-bottom: 10px;">
        <span class="tips_body">
            <span class="tips">'.$_config[website_name].' '.$_lang[Tip].':</span>
            <strong><span id="tips_text">'.
                stripslashes($tip);
            '</span></strong> 
        </span>
    </p>';
    $smarty->assign('TIP',$TIP);
    
    /// Unique Hit Count //
            $host_name = gethostbyaddr($_SERVER['REMOTE_ADDR']);
            $ip=gethostbyname($host_name);
    //        mysql_query("delete from adquick_hits where ip_detail='$host_name' and ip='$ip'");
            mysql_query("insert into adquick_hits set ip_detail='$host_name', ip='$ip', date=curdate()");
    /// Top sites ///
    $top_sites_alexa = mysql_query("select distinct publishersinfo.* from publishersinfo, publishers_adspaces, users where publishersinfo.alexa_rank>0 and publishersinfo.status = '1' and publishers_adspaces.pid = publishersinfo.pid and users.status = '1' and users.uid = publishersinfo.uid 
    order by publishersinfo.alexa_rank limit 5");
    $top_sites_gpr = mysql_query("select distinct publishersinfo.* from publishersinfo, publishers_adspaces, users where publishersinfo.google_page_rank>0 and publishersinfo.status = '1' and publishers_adspaces.pid = publishersinfo.pid and users.status = '1' and users.uid = publishersinfo.uid 
    order by publishersinfo.google_page_rank desc limit 5");
        while ($alexa_row = mysql_fetch_assoc($top_sites_alexa)) {
            $a[] = array('pid' => $alexa_row['pid'], 'wname' => $alexa_row['websitename'], 'a_rank' => $alexa_row['alexa_rank']);
        }
        while ($gpr_row = mysql_fetch_assoc($top_sites_gpr)) {
            $g[] = array('pid' => $gpr_row['pid'], 'wname' => $gpr_row['websitename'], 'g_rank' => $gpr_row['google_page_rank']);
        }
        
        $smarty->assign('alexa_top', $a);
        $smarty->assign('google_top', $g);
    ob_end_clean();
    ?>
    
    Thanks