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




Again the damn Gen2
Print
Author Topic: Again the damn Gen2  (Read 2157 times)
ricccc
Reputation: (+1)
Jan 02, 2009 10:16 am

Why can I view the ads when I'm logged off and when I'm logged in, can't? I mean, I click the ad but nothing shows up.

Code for ads.php:

Code:
<?php
/*
GEN2 PTC SCRIPT, A copyrighted trademark of PTCPay.com 2007-2008. DISTRIBUTED UNDER GNU GENERAL PUBLIC LICENSE.

 "Gen2PTC", "PTCPay" are a copyrighted service of PTCPay.com. All other respective trademarks remain a respectable licensed product of it's original creator.

 This file is a partial script from the Gen2PTC webscript which is open source and distributed through GNU PUBLIC LICENSE; This software remains copyrighted and any sign of unauthorised abuse will result in PTCPay taking action.

http://www.ptcpay.com/
*/
session_start();
include_once(
'lib/lib.php');
include_once(
'lib/configuration.php');

if(
$loggedin)
{
$upgsql =&#160; ($ir['upgraded'] > time()) ? "" : " AND aUpgraded='0'";
$query_ads mysql_query("SELECT * FROM `ads` WHERE `aClicksLeft` > 0 AND aApproved>0 AND aPaused=0".$upgsql." ORDER BY aId DESC;");
while(
$qa=mysql_fetch_array($query_ads))
{
if(
eregi('ALL'$qa['aCountries']) or eregi($ir['country'],$qa['aCountries']))
{

$do_desc = ($set['enable_ad_desc'] && $qa['aDesc']) ? "<br />{$qa['aDesc']}"";
$bold_accept = ($set['enable_ad_bold'] && $qa['aBold']) ? 0;
$do_bold_begin = ($bold_accept) ? "<b>" "";
$do_bold_after = ($bold_accept) ? "</b>" "";
$do_highlight = ($set['enable_ad_highlight'] && $qa['aHighlight']) ? " class='hl_ad'" "";

if(
eregi("-".$qa['aId']."-"$ir['ads_clicked']))
{
$ad_x "onclick=\"alert('You have already clicked this advertisement.');\" style='color:darkred;' x";
$ad_opac " style=\"background:#E6E6E6;\"";
} else {
$ad_x "onclick='__doAd(this, {$qa['aId']}); return false;' ";
$ad_opac '';
}
$ads_text[$qa[aCatagory]] .= "<tr{$ad_opac}><td{$do_highlight}><a {$ad_x}href='javascript:void(0);' id='cks.php?k=".$qa['aIdentifyKey']."'><small>{$do_bold_begin}{$qa['aName']}{$do_bold_after}{$do_desc}</small></a></td><td><font size=\"+1\">".number_format($qa['aMembers'])."</font></td><td><font size=\"+1\">".number_format($qa['aOutside'])."</font></td></tr>
<tr><td colspan=3><hr /></td></tr>"
;
$ads_av++;
}

}

} else {
$query_ads mysql_query("SELECT * FROM `ads` WHERE `aClicksLeft` > 0 AND aApproved>0 AND aPaused=0 ORDER BY aId DESC;");
while(
$qa=mysql_fetch_array($query_ads))
{

$do_desc = ($set['enable_ad_desc'] && $qa['aDesc']) ? "<br />{$qa['aDesc']}"";
$bold_accept = ($set['enable_ad_bold'] && $qa['aBold']) ? 0;
$do_bold_begin = ($bold_accept) ? "<b>" "";
$do_bold_after = ($bold_accept) ? "</b>" "";
$do_highlight = ($set['enable_ad_highlight'] && $qa['aHighlight']) ? " class='hl_ad'" "";

$ads_text[$qa[aCatagory]] .= "<tr><td{$do_highlight}><a href='cks.php?k=".$qa['aIdentifyKey']."' target='_blank'>{$do_bold_begin}{$qa['aName']}{$do_bold_after}<small>{$do_desc}</small></a></td><td><font size=\"+1\">".number_format($qa['aMembers'])."</font></td><td><font size=\"+1\">".number_format($qa['aOutside'])."</font></td></tr>";
$ads_av++;
}

}

$query_catagory mysql_query("SELECT * FROM `ad_catagories` WHERE `ac_draft` = '0' ORDER BY `ac_order` ASC");
while(
$qc=mysql_fetch_array($query_catagory))
{
if(
$ads_text[$qc[ac_id]])
{
$ads_show .= "<tr><td colspan=4 class='cat_top' style='border:1px #121212 ridge;'><b>{$qc['ac_name']}</b></td></tr>".$ads_text[$qc[ac_id]];
}
}


$ddir THDIR.$do->get_file_url();
include(
$ddir);

if(
file_exists(HEADER)) { include_once(HEADER); }
if(
$contents) { print $contents; }
if(
file_exists(FOOTER)) { include_once(FOOTER); }
?>

I managed to fix the admin area bug I had before myself.
« Last Edit: Jan 02, 2009 10:19 am by ricccc » Logged
Origin
Reputation: (+28)
*

Offline

Gender: Male
Posts: 2432
Referrals: 18


Super Noob!

View Profile WWW
Reply #1: Jan 02, 2009 03:23 pm

It's related to cookie's setting.
I'll double check first.
Logged


I accept coding work..
Delusional

Reputation: (+2)
*

Offline

Gender: Male
Posts: 4713
Referrals: 6


GPSBlack Creator

View Profile WWW
Reply #2: Jan 03, 2009 03:50 am

This file is a partial script from the Gen2PTC webscript which is open source and distributed through GNU PUBLIC LICENSE; This software remains copyrighted and any sign of unauthorised abuse will result in PTCPay taking action.

ROTFL
Logged

jpsportugal
Reputation: (+25)
*

Offline

Gender: Male
Posts: 4124
Referrals: 7


Coming soon...

View Profile
Reply #3: Jan 03, 2009 04:22 am

This file is a partial script from the Gen2PTC webscript which is open source and distributed through GNU PUBLIC LICENSE; This software remains copyrighted and any sign of unauthorised abuse will result in PTCPay taking action.

ROTFL


big grin Tongue
Logged
ricccc
Reputation: (+1)
Reply #4: Jan 03, 2009 05:50 am

I found that funny because only non-copyrighted files can be under GNU.

Also I won't be needing this just yet, I got a working copy.

I'll have to be picking up CSS now Sad
Logged
Print
 
Jump to:  
Copyright © 2008-2022 eMoneySpace. All rights reserved.