PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Darrell3831
Worker
Worker


Joined: Feb 18, 2004
Posts: 244

PostPosted: Tue Feb 01, 2005 3:17 pm Reply with quote Back to top

Hi,

With nuke 7.4 there is a banners.php file in the main html directory for clients to log into their banners account and see their stats.

I assume it should be accessed like this:
Only registered users can see links on this board!
Get registered or login to the forums!


However that dosent work. If the login id is correct and the password is wrong you get a message stating that the login id is incorrect. If the id and password are both correct you get the standard Page Cannot Be Displayed Error.

Is that URL correct? What is the correct URL to give a client so that they can log in and see their statistics?

Thanks,
Darrell
View user's profile Send private message Visit poster's website
Darrell3831
Worker
Worker


Joined: Feb 18, 2004
Posts: 244

PostPosted: Tue Feb 01, 2005 3:35 pm Reply with quote Back to top

I've discovered a little more.

A brand new account with no banners assigned to it can log into the banners.php file and view their stats.. which are blank.

Once a banner is added to the account they can no longer log in.

Is this a bug that someone else has experienced? Is there a published fix for it?

thanks,
Darrell
View user's profile Send private message Visit poster's website
persona_non_grata



Joined:
Posts: 0

PostPosted: Tue Feb 01, 2005 3:40 pm Reply with quote Back to top

well maybe i understand you completely wrong but there isnt a login for banner clients.
but im maybe wrong....
i stopped using it since i discovered it holds back on referers.
but the the banner.php in your root controls your banners ...thats all....
the banner login or with clients whatever thats the big version.....and can be bought at nukescripts.net
and he also offers a free/but with less options version.
View user's profile Send private message
Darrell3831
Worker
Worker


Joined: Feb 18, 2004
Posts: 244

PostPosted: Tue Feb 01, 2005 4:00 pm Reply with quote Back to top

Yes,

It seems like it's main purpose is to proccess the banners, however it does have two functions for clients to view their stats.

Code:
function clientlogin() {
    echo"
    <html>
    <body bgcolor=\"#AA9985\" text=\"#000000\" link=\"#006666\" vlink=\"#006666\">
    <center><br><br><br><br>
    <table width=\"200\" cellpadding=\"0\" cellspacing=\"1\" border=\"0\" bgcolor=\"#000000\"><tr><td>
    <table width=\"100%\" cellpadding=\"5\" cellspacing=\"1\" border=\"0\" bgcolor=\"#FFFFFF\"><tr><td bgcolor=\"#EECFA1\">
    <center><b>Advertising Statistics</b></center>
    </td></tr><tr><td bgcolor=\"#FFFACD\">
    <form action=\"banners.php\" method=\"post\">
    Login: <input type=\"text\" name=\"login\" size=\"12\" maxlength=\"10\"><br>
    Password: <input type=\"password\" name=\"pass\" size=\"12\" maxlength=\"10\"><br>
    <input type=\"hidden\" name=\"op\" value=\"Ok\">
    <input type=\"submit\" value=\"Login\">
    </td></tr><tr><td bgcolor=\"#EECFA1\">
    <font class=\"content\">
    <center>Please type your client information</center>
    </font></form>
    </td></tr></table></td></tr></table>
    </body>
    </html>
    ";
}


and function bannerstats($login, $pass) which is probably to large to post here.

You get there through one of the switch cases at the bottom.

Code:
    case "login":
   clientlogin();
   break;


This is standard stuff as far as I know. It came out of the box this way. I did not specificlaly install a paid script from anyone.

If I do have an upgraded version of banners.php then I'd have to say it came from when I did chatserv's patches.

Perhaps he has an upgraded version??

Anyone else have any information on this?

Thanks,
Darrell
View user's profile Send private message Visit poster's website
Darrell3831
Worker
Worker


Joined: Feb 18, 2004
Posts: 244

PostPosted: Fri Feb 04, 2005 7:43 am Reply with quote Back to top

I'm still having trouble with this.

When this function executes with a valid advertising client that has no banners and no data it displays the tables correctly.

When this function executes with a valid advertising client that has banners and data you get a page cannot be displayed standard error message.

When an invalid username and/or password is passed you get the incorrect login message and the go back option.

Can anyone suggest ways for me to track this problem down please?

Code:
/*********************************************/
/* Function to display the banners stats for */
/* each client                               */
/*********************************************/

function bannerstats($login, $pass) {
    global $prefix, $db, $sitename;
    $row = $db->sql_fetchrow($db->sql_query("SELECT cid, name, passwd FROM " . $prefix . "_bannerclient WHERE login='$login'"));
    $cid = intval($row['cid']);
    $name = $row['name'];
    $passwd = $row['passwd'];
    if($login=="" AND $pass=="" OR $pass=="") {
   echo "<center><br>Login Incorrect!!!<br><br><a href=\"javascript:history.go(-1)\">Back to Login Screen</a></center>";
    } else {
   
    if ($pass==$passwd) {
   
    echo"
    <html>
    <body bgcolor=\"#AA9985\" text=\"#000000\" link=\"#006666\" vlink=\"#006666\">
    <center>
    <table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#000000\"><tr><td>
    <table border=\"0\" width=\"100%\" cellpadding=\"8\" cellspacing=\"1\" bgcolor=\"#FFFACD\"><tr><td>
    <font class=\"option\">
    <center><b>Current Active Banners for " . $name . "</b></center><br>
    </font>
    <table width=\"100%\" border=\"0\"><tr>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>ID</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>Imp. Made</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>Imp. Total</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>Imp. Left</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>Clicks</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>% Clicks</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>Functions</b></td><tr>";
    while ($row2 = $db->sql_fetchrow($db->sql_query("SELECT bid, imptotal, impmade, clicks, date FROM " . $prefix . "_banner WHERE cid='$cid' AND active='1'"))) {
   $bid = intval($row2['bid']);
   $imptotal = intval($row2['imptotal']);
   $impmade = intval($row2['impmade']);
   $clicks = intval($row2['clicks']);
   $date = $row2['date'];
        if($impmade==0) {
           $percent = 0;
        } else {
           $percent = substr(100 * $clicks / $impmade, 0, 5);
        }
        if($imptotal==0) {
           $left = "Unlimited";
        } else {
           $left = $imptotal-$impmade;
        }
        echo "
        <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$bid</td>
        <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$impmade</td>
        <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$imptotal</td>
   <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$left</td>
        <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$clicks</td>
        <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$percent%</td>
        <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\"><a href=\"banners.php?op=EmailStats&amp;login=$login&amp;cid=$cid&amp;bid=$bid\">E-mail Stats</a></td><tr>";
    }
    echo "
    </table>
    <center><br><br>
    Following are your running Banners in " . $sitename . "<br><br>";
    $result3 = $db->sql_query("SELECT bid, imageurl, clickurl, alttext FROM " . $prefix . "_banner WHERE cid='$cid' AND active='1'");
    while ($row3 = $db->sql_fetchrow($result3)) {
   $bid = intval($row3['bid']);
   $imageurl = $row3['imageurl'];
   $clickurl = $row3['clickurl'];
   $alttext = $row3['alttext'];
   $numrows = $db->sql_numrows($result3);
   if ($numrows>1) {
       echo "<hr noshade width=\"80%\"><br>";
   }

   echo "<img src=\"$imageurl\" border=\"1\"><br>
   <font class=\"content\">Banner ID: $bid<br>
   Send <a href=\"banners.php?op=EmailStats&amp;login=$login&amp;cid=$cid&amp;bid=$bid\">E-Mail Stats</a> for this Banner<br>
   This Banners points to <a href=\"$clickurl\">this URL</a><br>
   <form action=\"banners.php\" method=\"submit\">
   Change URL: <input type=\"text\" name=\"url\" size=\"50\" maxlength=\"200\" value=\"$clickurl\"><br>
   Change Text: <input type=\"text\" name=\"alttext\" size=\"50\" maxlength=\"255\" value=\"$alttext\"><br>
   <input type=\"hidden\" name=\"login\" value=\"$login\">
   <input type=\"hidden\" name=\"bid\" value=\"$bid\">
   <input type=\"hidden\" name=\"pass\" value=\"$pass\">
   <input type=\"hidden\" name=\"cid\" value=\"$cid\">
   <input type=\"submit\" name=\"op\" value=\"Change\"></form></font>";
    }
    echo "
    </td></tr></table></td></tr></table>
    ";

/* Finnished Banners */
    echo "
    <center><br>
    <table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"000000\"><tr><td>
    <table border=\"0\" width=\"100%\" cellpadding=\"8\" cellspacing=\"1\" bgcolor=\"#FFFACD\"><tr><td>
    <font class=\"option\">
    <center><b>Banners Finished for " . $name . "</b></center><br>
    </font>
    <table width=\"100%\" border=\"0\"><tr>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>ID</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>Impressions</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>Clicks</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>% Clicks</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>Start Date</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>End Date</b></td>
    <td bgcolor=\"#887765\"><font color=\"Black\"><center><b>Functions</b></td></tr>";
    $sql4 = "SELECT bid, impmade, clicks, imageurl, date, dateend FROM ".$prefix."_banner WHERE cid='$cid' AND active='0'";
    $result4 = $db->sql_query($sql4);
    while ($row4 = $db->sql_fetchrow($result4)) {
   $bid = intval($row4['bid']);
   $impmade = intval($row4['impmade']);
   $clicks = intval($row4['clicks']);
   $imageurl = $row4['imageurl'];
   $date = $row4['date'];
   $dateend = $row4['dateend'];
        $percent = substr(100 * $clicks / $impmade, 0, 5);
   echo "
        <tr><td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$bid</td>
        <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$impmade</td>
        <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$clicks</td>
   <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$percent%</td>
        <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$date</td>
        <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\">$dateend</td>
   <td bgcolor=\"#AA9985\" align=\"center\"><font color=\"White\"><a href=\"$imageurl\" target=\"new\">View Banner</a></td></tr>";
    }
echo "
</table></td></tr></table></td></tr></table>
<br><a href=\"http://phpnuke.org\"><img src=\"images/powered/powered6.gif\" border=\"0\" Alt=\"This site Powered by PHP-Nuke\"></a>
</body>
</html>
";
   
    } else {
   echo "<center><br>Login Incorrect!!!<br><br><a href=\"javascript:history.go(-1)\">Back to Login Screen</a></center>";
    }
}
}
View user's profile Send private message Visit poster's website
Darrell3831
Worker
Worker


Joined: Feb 18, 2004
Posts: 244

PostPosted: Fri Apr 15, 2005 1:29 pm Reply with quote Back to top

Well....

I tried again to make this work. There is a while loop that is not executing. It dosent execute even once, when there is data there which should let it execute.

Code:
    while ($row2 = $db->sql_fetchrow($db->sql_query("SELECT bid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE cid='$cid' AND active='1'"))) {
   $bid = intval($row2['bid']);
   $imptotal = intval($row2['imptotal']);
   $impmade = intval($row2['impmade']);
   $clicks = intval($row2['clicks']);
   $date = $row2['date'];
        if($impmade==0) {
           $percent = 0;
        } else {
           $percent = substr(100 * $clicks / $impmade, 0, 5);
        }
        if($imptotal==0) {
           $left = "Unlimited";
        } else {
           $left = $imptotal-$impmade;
        }


Does anyone see any syntax errors or design errors that would prevent this while loop from being true at least one time? (it is true one time for my test accounts, however the program does not flow into the loop.)

I'm still stumped...

Thanks,
Darrell
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15235
Location: Kansas

PostPosted: Fri Apr 15, 2005 10:24 pm Reply with quote Back to top

I haven't tried this in 7.4 but I am using it in 6.9. Are you using the virgin 7.4 or what? What is supposed to happen is that you get a very ugly login page.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Darrell3831
Worker
Worker


Joined: Feb 18, 2004
Posts: 244

PostPosted: Sat Apr 16, 2005 7:41 am Reply with quote Back to top

I don't mind the ah, unique login page colors. I could spiff it and the subsuquent tables up if I wanted to. I just don't know how to fix these bugs.

I've tried on several occasions....

This is nuke 7.4 downloaded from here with chatserv's patches... Version 2.6 I believe.

The first message in this thread described the problem.

There are no errors printed to the screen, except for the standard page cannot be displayed error. No visible php errors anywhere...

The last user created can login with his PW and can get to the page that is supposed to show the status of his banners.

That last person does not have any data filled into his tables though.

If you put an echo statement in as a test you can see that you never fall into the while loop in the message above that is supposed to be prefilling the table with data.

Code:
while ($row2 = $db->sql_fetchrow($db->sql_query("SELECT bid, imptotal, impmade, clicks, date FROM ".$prefix."_banner WHERE cid='$cid' AND active='1'"))) {

echo "Kilroy was here";

}


Even though there is a record in nuke_banners where cid=5 and active=1, and the table does have the following fields of bid, impotatal, impmade, clicks and date, you still don't get to see the message Kilroy was here.

I don't understand why the while loop is not dropping down into the area where it parses the information....

That's why I was asking if there was a syntax error, or logic error with it.

Thanks,
Darrell
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15235
Location: Kansas

PostPosted: Sat Apr 16, 2005 7:49 am Reply with quote Back to top

Just for grins and giggles, install the 2.9 patched banner.php and se if that helps.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Darrell3831
Worker
Worker


Joined: Feb 18, 2004
Posts: 244

PostPosted: Sat Apr 16, 2005 8:05 am Reply with quote Back to top

That fixed it.

Everything worked except the little 'powered by' icon at the bottom and I had that fixed in a minute.

I see just from looking around in the area I was tinkering that there are some logic changes...

hmmm

Thanks for the suggestion!

Darrell
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum