eMoneySpace
Welcome, Guest. Please login or register.
Did you miss your activation email?
News: Welcome to eMoneySpace! Aug 17, 2022 10:10 pm




[URGRNT] Need a small help from aurora script to display f. banner
Print
Author Topic: [URGRNT] Need a small help from aurora script to display f. banner  (Read 1200 times)
bucksman5233
Reputation: (+39)
*

Offline

Gender: Male
Posts: 1361
Referrals: 2


Front-end Web Developer

View Profile WWW
Apr 28, 2016 12:40 am

Hi there,
I was integrating a template to aurora script
I want php code to display featured banners (125x125) in Aurora 4.0.8E1.2-ERH

Please post here fast

Thanks a lot
Logged

ayman20068
Reputation: (+60)
*

Offline

Gender: Male
Posts: 3046
Referrals: 2


AuroraCoderz The Ultimate PTC/GPT Scripts

View Profile WWW
Reply #1: Apr 28, 2016 07:38 pm

Hi there,
I was integrating a template to aurora script
I want php code to display featured banners (125x125) in Aurora 4.0.8E1.2-ERH

Please post here fast

Thanks a lot

You should check layout_header.php of the template for featured banners code

By default in old versions like the one you mentioned , the featured banners used to be displayed via this code

<? if($areacontent != "") echo $areacontent; ?>
Logged

bucksman5233
Reputation: (+39)
*

Offline

Gender: Male
Posts: 1361
Referrals: 2


Front-end Web Developer

View Profile WWW
Reply #2: Apr 28, 2016 10:14 pm

You should check layout_header.php of the template for featured banners code

By default in old versions like the one you mentioned , the featured banners used to be displayed via this code

<? if($areacontent != "") echo $areacontent; ?>
Bro..
It not worked Sad
and this also not worked
<? echo $pagebanner180; ?> Sad
Logged

ayman20068
Reputation: (+60)
*

Offline

Gender: Male
Posts: 3046
Referrals: 2


AuroraCoderz The Ultimate PTC/GPT Scripts

View Profile WWW
Reply #3: Apr 30, 2016 05:49 pm

Bro..
It not worked Sad
and this also not worked
<? echo $pagebanner180; ?> Sad

Post the contents of the file called layout_header.php of your template here
Logged

bucksman5233
Reputation: (+39)
*

Offline

Gender: Male
Posts: 1361
Referrals: 2


Front-end Web Developer

View Profile WWW
Reply #4: Apr 30, 2016 09:31 pm

Post the contents of the file called layout_header.php of your template here
OK here you go
Code:
<?php

function get_banner() {
global $settings$Db1$username$LOGGED_IN;
$sql=$Db1->query("SELECT * FROM banners WHERE credits>=1 and (daily_limit>views_today or daily_limit=0) ".iif($LOGGED_IN==true," and username!='$username'")." order by rand() limit 1");
$banner $Db1->fetch_array($sql);
$Db1->query("UPDATE banners SET credits=credits-1, views=views+1, views_today=views_today+1 WHERE id='$banner[id]'");
if($banner[banner] != "") {
$banner "<a href='bannerclick.php?id=$banner[id]' target='_blank'><img alt='banner' src='$banner[banner]' border='0' width='468' height='60'></a>\n";
}
return $banner;
}


function 
get_cr() {
global $settings$Db1;
$sql=$Db1->query("SELECT * FROM code_rotator WHERE (wcount < weight) and (tcount < `limit` or `limit`=0) LIMIT 1");
if($Db1->num_rows() !=0) {
$temp=$Db1->fetch_array($sql);
$rcode=$temp[code];
}
else {
$Db1->query("UPDATE code_rotator SET wcount='0' WHERE wcount >= weight");
$sql=$Db1->query("SELECT * FROM code_rotator WHERE (wcount < weight) and (tcount < `limit` or `limit`=0) LIMIT 1");
if($Db1->num_rows() !=0) {
$temp=$Db1->fetch_array($sql);
$rcode=$temp[code];
}
}
if($rcode != "") {
$rcode=stripslashes($rcode);
$sql=$Db1->query("UPDATE code_rotator SET tcount=tcount+1, wcount=wcount+1 WHERE id='$temp[id]'");
}
return $rcode;
}

function 
get_content($title="",$content=""$width="100%"$height="100%") {
return 
"
<div class=\"contentBox\">
<h2>
$title</h2>
<div class=\"content\">
$content</div>
</div>
"
;
}

$includes[admin_js]="
<script>
var url_vars = \""
.$url_variables."\";
var ptc = "
.iif(SETTING_PTC==true,"1","0").";
var ptsu = "
.iif(SETTING_PTSU==true,"1","0").";
var ptp = "
.iif(SETTING_PTP==true,"1","0").";
var se  = "
.iif(SETTING_SE==true,"1","0").";
var ce  = "
.iif(SETTING_CE==true,"1","0").";
var ptr = "
.iif(SETTING_PTR==true,"1","0").";
var ptra = "
.iif(SETTING_PTRA==true,"1","0").";
var games = "
.iif(SETTING_GAMES==true,"1","0").";
</script>
<script language=\"javascript\" src=\"sniffer.js\"></script>
<script language=\"javascript\" src=\"menu_vars.js\"></script>
<script language=\"javascript\" src=\"style.js\"></script>
"
;



##################### BANNER AD ##########################
$showbanner 0;
$showcr 0;


if(
$settings[banner_cr_rotate] == 1) {
srand(time());
$random = (rand()%2);
if($random$showbanner=1;
else $showcr=1;
}
else {
$showbanner=1;
}
if(
$showbanner == 1) {
$pagebanner648 get_banner();
if($pagebanner648 == "") {
if($settings[banner_cr_rotate] == 1) {
$showcr=1;
}
}
}
if(
$showcr == 1) {
$pagebanner648 get_cr();
if($pagebanner648 == "") {
$pagebanner648 get_banner();
}
}

if(
$settings[banner_cr_rotate] == 1) {
srand(time());
$random = (rand()%2);
if($random$showbanner=1;
else $showcr=1;
}
else {
$showbanner=1;
}
if(
$showbanner == 1) {
$pagebanner649 get_banner();
if($pagebanner649 == "") {
if($settings[banner_cr_rotate] == 1) {
$showcr=1;
}
}
}
if(
$showcr == 1) {
$pagebanner649 get_cr();
if($pagebanner649 == "") {
$pagebanner649 get_banner();
}
}

if(
$settings[banner_cr_rotate] == 1) {
srand(time());
$random = (rand()%2);
if($random$showbanner=1;
else $showcr=1;
}
else {
$showbanner=1;
}
if(
$showbanner == 1) {
$pagebanner650 get_banner();
if($pagebanner650 == "") {
if($settings[banner_cr_rotate] == 1) {
$showcr=1;
}
}
}
if(
$showcr == 1) {
$pagebanner650 get_cr();
if($pagebanner650 == "") {
$pagebanner650 get_banner();
}
}

if(
$settings[banner_cr_rotate] == 1) {
srand(time());
$random = (rand()%2);
if($random$showbanner=1;
else $showcr=1;
}
else {
$showbanner=1;
}
if(
$showbanner == 1) {
$pagebanner651 get_banner();
if($pagebanner651 == "") {
if($settings[banner_cr_rotate] == 1) {
$showcr=1;
}
}
}
if(
$showcr == 1) {
$pagebanner651 get_cr();
if($pagebanner651 == "") {
$pagebanner651 get_banner();
}
}


##################### CODE ROTATOR ##########################
if($settings[code_rotator] == 1) {
$rcode=get_cr();
}




##################### FEATURED ADS ##########################
$sql=$Db1->query("SELECT * FROM fads WHERE credits>=1 and (daily_limit>views_today or daily_limit=0) ".iif($LOGGED_IN==true," and username!='$username'")." order by rand() limit 1");
$pagefad=$Db1->fetch_array($sql);
$sql=$Db1->query("UPDATE fads SET credits=credits-1, views=views+1, views_today=views_today+1 WHERE id='$pagefad[id]'");


##################### TOP CLICKERS ##########################
if($settings['top_clickers'] == 1) {
$sql=$Db1->query("SELECT username, clicked_today FROM user ORDER BY clicked_today DESC LIMIT $settings[top_clickers_show]");
for($d=1$temp=$Db1->fetch_array($sql); $d++) {
$honored.="$d$temp[username] ".iif($settings['top_clickers_show_clicks']==1"(".$temp['clicked_today'].")")."<br>";
}
}


##################### FEATURED LINKS ##########################
if($settings[flink_style] == 2) {
$sql=$Db1->query("SELECT * FROM flinks WHERE dend>'".time()."' order by rand() ".iif($settings[flink_show]!=0,"limit $settings[flink_show]")."");
while($temp=$Db1->fetch_array($sql)) {
$idlist.=", $temp[id]";
$flinklist.="<div".iif($temp[bgcolor]!=""," style=\"background-color: $temp[bgcolor]\"")."><a href=\"flinkclick.php?id=$temp[id]\" target=\"_blank\">".iif($temp[marquee]==1,"<marquee>".ucwords(strtolower($temp[title]))."</marquee>","$temp[title]")."</a></div><hr>";
}
$sql=$Db1->query("UPDATE flinks SET views=views+1 WHERE id IN (0".$idlist.")");

srand(time());
$random = (rand()%2);
}
else if(
$settings[flink_style] == 1) {
$sql=$Db1->query("SELECT * FROM flinks WHERE dend > '".time()."' order by dsub ".iif($settings[flink_show]!=0,"limit $settings[flink_show]")."");
$totalt=$Db1->num_rows();
for($x=0$x<(ceil($totalt/4)); $x++) {
$flinks.="<tr>";
for($y=0$y<4$y++) {
$temp=$Db1->fetch_array($sql);
if($temp[title]=="") {
$flinks.="<td bgcolor=\"white\" align=\"center\" width=100><marquee><b><a href=\"$settings[flinkdefaulturl]\">$settings[flinkdefault]</a></b></marquee></td>";
}
else {
$flinks.="<td width=\"100\" align=\"center\"".iif($temp[bgcolor]!=""," style=\"background-color: $temp[bgcolor]\"")."><a href=\"flinkclick.php?id=$temp[id]\" target=\"_blank\">".iif($temp[marquee]==1,"<marquee>".ucwords(strtolower($temp[title]))."</marquee>","$temp[title]")."</a></div></td>";
}
}
$flinks.="</tr>";
}
$sql=$Db1->query("UPDATE flinks SET views=views+1");
}





if((
$settings[poll_active] == 1) && (($random == 1) || ($settings[alt_fb_poll] == 0))) {
$pollshow=0;
}
if((
$settings[poll_active] == 0) || ($random == 0) || ($settings[alt_fb_poll] == 0)) {
$fbannershow=1;
}


$areacontent="";


if(
$pollshow == 1) {
$sql=$Db1->query("SELECT * FROM poll_history WHERE ip='$vip'");
if($Db1->num_rows() == 0) {
$polltitle="Poll";
$polltext="
<b>
$settings[poll_title]</b><br />
<small>
"
.iif($settings[poll_a1] != """<input type=\"radio\" name=\"pollres\" value=\"1\" onclick=\"document.pollvote.sub.disabled=false\">$settings[poll_a1]<br />")."
"
.iif($settings[poll_a2] != """<input type=\"radio\" name=\"pollres\" value=\"2\" onclick=\"document.pollvote.sub.disabled=false\">$settings[poll_a2]<br />")."
"
.iif($settings[poll_a3] != """<input type=\"radio\" name=\"pollres\" value=\"3\" onclick=\"document.pollvote.sub.disabled=false\">$settings[poll_a3]<br />")."
"
.iif($settings[poll_a4] != """<input type=\"radio\" name=\"pollres\" value=\"4\" onclick=\"document.pollvote.sub.disabled=false\">$settings[poll_a4]<br />")."
"
.iif($settings[poll_a5] != """<input type=\"radio\" name=\"pollres\" value=\"5\" onclick=\"document.pollvote.sub.disabled=false\">$settings[poll_a5]<br />")."
</small>
<div align=\"center\"><input type=\"submit\" value=\"Vote!\" name=\"sub\" disabled=\"true\"></div>
"
;
}
else {
$polltitle="Poll Results";

if($settings[poll_votes] == ""$settings[poll_votes]="0:0:0:0:0";
$ptemp=explode(":",$settings[poll_votes]);
for($x=0$x<5$x++) {
if($ptemp[$x] == "") {
$ptemp[$x]="0";
}
$pollresults[$x+1]=$ptemp[$x];
}
$polltext="
<b>
$settings[poll_title]</b><br />
<small>
"
.iif($settings[poll_a1] != """<li>$settings[poll_a1] : $pollresults[1]</li><br />")."
"
.iif($settings[poll_a2] != """<li>$settings[poll_a2] : $pollresults[2]</li><br />")."
"
.iif($settings[poll_a3] != """<li>$settings[poll_a3] : $pollresults[3]</li><br />")."
"
.iif($settings[poll_a4] != """<li>$settings[poll_a4] : $pollresults[4]</li><br />")."
"
.iif($settings[poll_a5] != """<li>$settings[poll_a5] : $pollresults[5]</li><br />")."
</small>
"
;
}
$areacontent.= "<form name=\"pollvote\" action=\"pollvote.php?action=vote&".$url_variables."\" method=\"post\">".get_content("$polltitle""$polltext"180)."</form>";
}

if(
$fbannershow == 1) {
$sql=$Db1->query("SELECT * FROM fbanners WHERE credits>=1 and (daily_limit>views_today or daily_limit=0) ".iif($LOGGED_IN==true," and username!='$username'")." order by rand() limit 1");
$pagebanner180=$Db1->fetch_array($sql);
$sql=$Db1->query("UPDATE fbanners SET credits=credits-1, views=views+1, views_today=views_today+1 WHERE id='$pagebanner180[id]'");
if($pagebanner180[id] != "") {
$areacontent.="<a href=\"fbannerclick.php?id=$pagebanner180[id]\" target=\"_blank\"><img src=\"$pagebanner180[banner]\" border=0\" width=\"180\" height=\"100\"></a><br /><br />";
}
}

function 
fbanner(){
    global 
$Db1;
    
$sql=$Db1->query("SELECT * FROM fbanners WHERE credits>=1 and (daily_limit>views_today or daily_limit=0) ".iif($LOGGED_IN==true," and username!='$username'")." order by rand() limit 1");
    
$pagebanner180=$Db1->fetch_array($sql);
    
$sql=$Db1->query("UPDATE fbanners SET credits=credits-1, views=views+1, views_today=views_today+1 WHERE id='$pagebanner180[id]'");
    if(
$pagebanner180['id'] != "") {
        return 
"<a href='fbannerclick.php?id=$pagebanner180[id]' target='_blank'><img alt='banner' src='$pagebanner180[banner]' border='0' width='180' height='100'></a>\n\n";
    }
}

function 
fbanner2(){
    global 
$Db1;
    
$sql=$Db1->query("SELECT * FROM fbanners WHERE credits>=1 and (daily_limit>views_today or daily_limit=0) ".iif($LOGGED_IN==true," and username!='$username'")." order by rand() limit 1");
    
$pagebanner180=$Db1->fetch_array($sql);
    
$sql=$Db1->query("UPDATE fbanners SET credits=credits-1, views=views+1, views_today=views_today+1 WHERE id='$pagebanner180[id]'");
    if(
$pagebanner180['id'] != "") {
        return 
"<a href='fbannerclick.php?id=$pagebanner180[id]' target='_blank'><img alt='banner' src='$pagebanner180[banner]' border='0' width='150' height='100'></a>\n\n";
    }
}

if(
$settings[homepage_stats] == 1) {
$sql=$Db1->query("SELECT COUNT(userid) AS total FROM user");
$totalmembers=$Db1->fetch_array($sql);
$sql=$Db1->query("SELECT new_members, hits, clicked FROM stats WHERE date='$today_date'");
$todaystats=$Db1->fetch_array($sql);
$sql=$Db1->query("SELECT SUM(amount) AS total, COUNT(amount) AS amount FROM payment_history WHERE status != 2");
$totalpaid=$Db1->fetch_array($sql);

    
$homepagestats="
        <table border='0'  bgcolor=\"\" cellpadding=\"2\" cellspacing=\"2\" align=\"center\">
        <tr>
            <td align='center'> Members</td>
            <td align='center'>"
.number_format($totalmembers['total'])."</td>
        </tr>
        <tr>
            <td align='center'> New Today</td>
            <td align='center'>"
.number_format($todaystats['new_members'])."</td>
        </tr>
        <tr>
            <td align='center'>Hits Today</td>
            <td align='center'>"
.number_format($todaystats['hits'])." </td>
        </tr>
        <tr>
            <td align='center'> Online</td>
            <td align='center'>"
.number_format($total_online)."</td>
        </tr>
        <tr>
            <td align='center'> Payouts Made</td>
            <td align='center'> "
.number_format($totalpaid['amount'])."</td>
        </tr>
        <tr>
            <td align='center'>Total Paid </td>
            <td align='center'>$"
.number_format(round($totalpaid['total']),2)."</td>
        </tr>
        </table>\n\n"
;
}


?>

[/code][/code]
« Last Edit: Apr 30, 2016 09:33 pm by bucksman5233 » Logged

Print
 
Jump to:  
Copyright © 2008-2022 eMoneySpace. All rights reserved.