Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Uglymonkey Toplist Script, Getting an error with this script, please help.
Chatz
post Aug 2 2006, 06:28 PM
Post #1


Premium Member
********

Group: Members
Posts: 155
Joined: 15-July 06
Member No.: 26,695



I'm getting an error on the index page.Need help to fix it please.

There's the error:
CODE
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/chatz/public_html/top/index.php on line 10
Failed: delete from uglymonkey_toplist where lastin < '2006-07-28 18:23:19' and total='0'

Here's the index page that I'm getting the error on:

CODE
<?php
include("config.php");

if ($purgedays>0){
    $purgeseconds = $purgedays * 86400;
    $olddate = strftime("%Y-%m-%d %H:%M:%S", time() - $purgeseconds);
    
$getid = mysql_query("SELECT * FROM uglymonkey_toplist where lastin < '$olddate' and total='0'");

while($get = mysql_fetch_array($getid)){
$lastin = $get['lastin'];
$total = $get['total'];
$name = $get['name'];
$id = $get['id'];
$sendto = $get['mail'];
$subject = "cult.toddywap.com toplist\n";  
$message = "cult.toddywap.com, \n\nAs you did not send us any hits for the last $purgedays days, \nyour site, '$name', has been removed from the cult.toddywap.com top list.\nYou may register your site details again if you wish.\nYou need to send at least 1 hit every $purgedays days to keep your site active.";
mail($sendto, $subject, $message);
}
    $sql = "delete from uglymonkey_toplist where lastin < '$olddate' and total='0'";
$result = mysql_query($sql) or die("Failed: $sql");
}

////////////////RESET COUNTERS////////////////


header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
echo '<wml>
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';
echo "<card id=\"toplist\" title=\"cult.toddywap.com\"><p align=\"center\">";


$total = mysql_num_rows(mysql_query("select * from uglymonkey_toplist"));

$active = mysql_num_rows(mysql_query("select * from uglymonkey_toplist WHERE incoming>=2"));

$count1 = mysql_num_rows(mysql_query("select * from uglymonkey_toplist WHERE incoming>=2 AND cat = '1'"));

$count2 = mysql_num_rows(mysql_query("select * from uglymonkey_toplist WHERE incoming>=2 AND cat = '2'"));

$count3 = mysql_num_rows(mysql_query("select * from uglymonkey_toplist WHERE incoming>=2 AND cat = '3'"));

$count4 = mysql_num_rows(mysql_query("select * from uglymonkey_toplist WHERE incoming>=2 AND cat = '4'"));

$count5 = mysql_num_rows(mysql_query("select * from uglymonkey_toplist WHERE incoming>=2 AND cat = '5'"));

echo "<small><a href=\"top20.php\">+ Top 20 Sites +</a><br/><a href=\"http://wap.mmplatform.com/?s=6779\">+ Top Downloads +</a></small><br/>";

$sql = mysql_query("SELECT * FROM uglymonkey_toplist WHERE incoming>=2 ORDER BY incoming desc LIMIT 1");
while($row = mysql_fetch_array($sql)){
    $go = $row['name'];
$id = $row['id'];
    echo "<small><b><a href=\"viewsite.php?id=".$id."\"><img src=\"top.gif\" alt=\"\"/>".$row['name']."</a></b></small>";}
echo "</p><p align=\"left\">";


echo "<small><b>Categories:</b><br/><a href=\"viewcat.php?cat=1\"><img src=\"folder.gif\" alt=\"*\"/>Adult ($count1)</a><br/><a href=\"viewcat.php?cat=2\"><img src=\"folder.gif\" alt=\"*\"/>Downloads ($count2)</a><br/><a href=\"viewcat.php?cat=3\"><img src=\"folder.gif\" alt=\"*\"/>Portal ($count3)</a><br /><a href=\"viewcat.php?cat=4\"><img src=\"folder.gif\" alt=\"*\"/>Chat/Forum ($count4)</a><br /><a href=\"viewcat.php?cat=5\"><img src=\"folder.gif\" alt=\"*\"/>Other ($count5)</a><br/><a href=\"allsites.php\"><img src=\"dir.gif\" alt=\"*\"/>All Sites ($active)</a><br/>---<br/>
<a href=\"rules.wml\"><img src=\"wenload.gif\" alt=\"*\"/>Add Your Site</a><br/><a href=\"searchbox.php\"><img src=\"off.gif\" alt=\"*\"/>Search Engine</a><br/>---<br/>
<a href=\"edit.php\">-Login/Edit</a><br /><a href=\"newest.php\">-Newest sites</a><br /><a href=\"worst20.php\">-Worst sites</a><br /><a href=\"popular.php\">-Popular sites</a><br /><a href=\"about.wml\">-Information</a><br/>---<br /></small><small>registered sites: <b>$total</b></small><br/><small>active sites: <b>$active</b><br/>---<br/>sites sending no hits will be deleted after: <b>$purgedays days</b></small><small>
<br/>---<br/><a href=\"http://cult.toddywap.com\">wappyCULT</a>";

echo "<br/>---<br/>© wappyCULT 2006-2007";
echo "
</small></p></card></wml>";
?>


Please help I need to get this up and running as soon as possible.Thanx
Go to the top of the page
 
+Quote Post
wappy
post Aug 2 2006, 06:36 PM
Post #2


Premium Member
********

Group: Members
Posts: 164
Joined: 2-July 06
From: England
Member No.: 25,974



o look my stolen toplist script lol.. Should i help.. Mmm.
This server has a different mysql version than i was using before thats why it don't work he he.
Ok i really don't know why im helping you clone me but use the sql from the file toplist.zip in my scripts folder on http://cult.trap17.com instead of the original one lol tongue.gif
Go to the top of the page
 
+Quote Post
toddy
post Aug 2 2006, 07:17 PM
Post #3


Newbie [Level 1]
*

Group: Members
Posts: 12
Joined: 31-July 06
Member No.: 27,609



Didnt even bother to change the tiltles =o] You probably havent set a databses up, or your using the ugly_monkey original database setup
Go to the top of the page
 
+Quote Post
wappy
post Aug 2 2006, 07:54 PM
Post #4


Premium Member
********

Group: Members
Posts: 164
Joined: 2-July 06
From: England
Member No.: 25,974



yes toddy he will be because when dj.dumb uploaded my script to gumslone's site he assumed i used the original sql.. So he posted the ugly monkey sql not my sql ho ho ho ho. :-) also that script is rubbish. I made a few mistakes and am working on a new toplist for my site which will be much better. Enjoy trying to fix my errors and GOOD LUCK ha ha :-)
Go to the top of the page
 
+Quote Post
Chatz
post Aug 2 2006, 09:09 PM
Post #5


Premium Member
********

Group: Members
Posts: 155
Joined: 15-July 06
Member No.: 26,695



Fixing your erros shouldn't be a promblem since i'm one of the best coders on wap.I mean ravingwap probly had more erros than this script and i fixed ravingwap script 100% error free didn't I.The only thing i didn't get was this error but now it's clear that the server is different.Anyway thanx wappy.
Go to the top of the page
 
+Quote Post
wappy
post Aug 2 2006, 10:53 PM
Post #6


Premium Member
********

Group: Members
Posts: 164
Joined: 2-July 06
From: England
Member No.: 25,974



you fixed raving script? Where? Best coder on wap? Sorry but your not? Lol where is this raving fixed and uploaded i want to see? An the errors are not fixable they are huge mistakes, so huge infact that i started again from scratch with a new top list.
Whats your site url i wanna see?
An if you really have fixed the raving script fully you wanna share? Just uploaded 26 new scripts to my folder.
But you can't go round saying you the best coder with people like ahmet, gumslone etc pmpl your funny.
---
o and btw check the raving script with more phones. Mine works fully on my nokia6630 or any s60, but it don't work fully on my nokia6230 or any s40. It has some real strange file format unknown errors.

This post has been edited by wappy: Aug 2 2006, 10:57 PM
Go to the top of the page
 
+Quote Post
thehate
post Dec 3 2006, 04:06 PM
Post #7


Newbie
*

Group: Members
Posts: 2
Joined: 3-December 06
From: New York
Member No.: 34,575



QUOTE(wappy @ Aug 2 2006, 04:53 PM) *

you fixed raving script? Where? Best coder on wap? Sorry but your not? Lol where is this raving fixed and uploaded i want to see? An the errors are not fixable they are huge mistakes, so huge infact that i started again from scratch with a new top list.
Whats your site url i wanna see?
An if you really have fixed the raving script fully you wanna share? Just uploaded 26 new scripts to my folder.
But you can't go round saying you the best coder with people like ahmet, gumslone etc pmpl your funny.
---
o and btw check the raving script with more phones. Mine works fully on my nokia6630 or any s60, but it don't work fully on my nokia6230 or any s40. It has some real strange file format unknown errors.



fool
Go to the top of the page
 
+Quote Post
juice
post Jan 4 2007, 07:52 PM
Post #8


Premium Member
********

Group: Members
Posts: 183
Joined: 24-July 06
From: Cape Town
Member No.: 27,194



Rather use the ravingwap toplist script. It supports unlimited categories, more than one site per registration, easy to administrate - no need to go into the database everytime and it was released so it is not illegal to use it. Search google for it since the site that had it closed down.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Many Php Script Sites(16)
  2. Script: Php Jukebox(4)
  3. Parse: Error Unexpected T_lnumber(4)