micheal332001
10-08-2005, 11:02 AM
Hi there
I hope someone can help me with this problem i have.
I want to add page numbers to this peice of code but im not sure how to go about it.
Here is the code i have now.
/************************************************** ********************
* View Jokes In Catid *
************************************************** ********************/
if($_REQUEST['do']=="viewcatid"){
if ($jokessettings['active']==1) {
$jokecount = $DB_site->query_first("
SELECT COUNT(*) AS jokecatid
FROM " . TABLE_PREFIX . "vbjokes_jokes AS vbjokes_jokes
WHERE jokecatid='{$_GET['cid']}'
");
$totaljokes = $jokecount['jokecatid'];
$category = $DB_site->query("SELECT jokeid,jokename,jokediscription,jokeimage,jokecati d,username FROM " . TABLE_PREFIX . "vbjokes_jokes WHERE jokecatid='{$_GET['cid']}' AND aprove=1 ORDER BY jokeid ASC
");
$categorys=$DB_site->num_rows($category);
$categorysbits="1";
$e=1;
while ($categorys = $DB_site->fetch_array($category)) {
$kleur = ($e % 2) ? $class='alt2' : $class='alt1';
$jokesbycat[jokeid] = $categorys['jokeid'];
$jokesbycat[jokename] = $categorys['jokename'];
$jokesbycat[jokediscription] = $categorys['jokediscription'];
$jokesbycat[jokeimage] = $categorys['jokeimage'];
if ($jokesbycat[jokeimage] == ""){
$jokesbycat[jokeimage] = "images/vbjokes/noimage.gif";
}
$jokesbycat[jokecatid] = $categorys['jokecatid'];
$jokesbycat[username] = $categorys['username'];
eval('$showbits .= "' . fetch_template('jokes_view_jokesinthiscat') . '";');
$e++;
}
eval('$current .= "' . fetch_template('jokes_view_jokeincat') . '";');
$navbits[$parent] = 'Jokes In This Cat';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('JOKES') . '");');
}
}
If someone could help please as this hack is almost finished.
To see the hack working goto www.michealmilton.com/forums/vbjokes.php (http://www.michealmilton.com/forums/vbjokes.php)
Please please can someone help.
I hope someone can help me with this problem i have.
I want to add page numbers to this peice of code but im not sure how to go about it.
Here is the code i have now.
/************************************************** ********************
* View Jokes In Catid *
************************************************** ********************/
if($_REQUEST['do']=="viewcatid"){
if ($jokessettings['active']==1) {
$jokecount = $DB_site->query_first("
SELECT COUNT(*) AS jokecatid
FROM " . TABLE_PREFIX . "vbjokes_jokes AS vbjokes_jokes
WHERE jokecatid='{$_GET['cid']}'
");
$totaljokes = $jokecount['jokecatid'];
$category = $DB_site->query("SELECT jokeid,jokename,jokediscription,jokeimage,jokecati d,username FROM " . TABLE_PREFIX . "vbjokes_jokes WHERE jokecatid='{$_GET['cid']}' AND aprove=1 ORDER BY jokeid ASC
");
$categorys=$DB_site->num_rows($category);
$categorysbits="1";
$e=1;
while ($categorys = $DB_site->fetch_array($category)) {
$kleur = ($e % 2) ? $class='alt2' : $class='alt1';
$jokesbycat[jokeid] = $categorys['jokeid'];
$jokesbycat[jokename] = $categorys['jokename'];
$jokesbycat[jokediscription] = $categorys['jokediscription'];
$jokesbycat[jokeimage] = $categorys['jokeimage'];
if ($jokesbycat[jokeimage] == ""){
$jokesbycat[jokeimage] = "images/vbjokes/noimage.gif";
}
$jokesbycat[jokecatid] = $categorys['jokecatid'];
$jokesbycat[username] = $categorys['username'];
eval('$showbits .= "' . fetch_template('jokes_view_jokesinthiscat') . '";');
$e++;
}
eval('$current .= "' . fetch_template('jokes_view_jokeincat') . '";');
$navbits[$parent] = 'Jokes In This Cat';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('JOKES') . '");');
}
}
If someone could help please as this hack is almost finished.
To see the hack working goto www.michealmilton.com/forums/vbjokes.php (http://www.michealmilton.com/forums/vbjokes.php)
Please please can someone help.