Refresh Code

Started on the old forum in January 2007 · view the original in the archive · old links redirect here

7 replies · 843 views · started 19 years ago · 1 min read

2 participants
andre3 Developer · 192 posts #1

hello can someone put a refrsh code in this script for me..it is a file from toddy gb service

<?php
//script edited by andre brown
include 'config.php';

////////////////HEADER INFO////////////////

header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-type: text/vnd.wap.wml;");
echo '<?xml version="1.0" encoding="utf-8"?>';
print '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">'.
'<wml>
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>';

////////////////MAIN PAGE////////////////

 $sqlthing = mysql_query("SELECT * FROM settings WHERE site='$site'");
   $title=(mysql_result($sqlthing,0,"name"));
    $logo=(mysqlesult($sqlthing,0,"logo"));
       $fpm=(mysql_result($$sqlthing,0,"fp"));
echo "<card id=\"JP\" title=\"$title Gbook\"><p align=\"center\">";
if($logo==""){
echo "[b]$title Guestbook[/b]
";}
else
{
echo "<img src=\"http://$logo\" alt=\"logo\"/>
";
}
echo "$fpm</p>

[size="1"]";
if(!isset($GET['page'])){
    $page = 1;
} else {
    $page = $_GET['page'];
}
echo "<a href=\"add.php?site=$site\">Add A Comment</a>
";
echo "<a href=\"images/index.php?site=$site\">Smilies List</a>
";
echo "-----
";
$max_results = 10;
$from = (($page * $max_results) - $max_results);

$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM bkmsgs WHERE site='$site'"),0);
$total_pages = ceil($total_results / $max_results);

$sql = mysql_query("SELECT * FROM bkmsgs WHERE site='$site'  ORDER BY id desc LIMIT $from, $max_results");
while($row = mysql_fetch_array($ql)){
$name = $row['ame'];
$msg = $row['msg'];
$key = $row['id'];
include 'str_replace.php';
include 'smile.php';
echo "<img src=\"star.gif\" alt=\"*\"/><a href=\"poster.php?site=$site&key=$key\">$name</a> - $msg
------
";

}

if($page < $total_pages){
    $next = ($page + 1);
    echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$next&site=$site\">Next Page</a>
";
}
if($page > 1){
    $prev = ($pag
    echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev&site=$site\">Prev Page</a>
";
}
$i = 1; $i <= $total_pages; $i++;
 $sqlthing = mysql_quer("SELECT * FROM settings WHERE site='$site'");
$link=(mysql_result($sqlthing,0,"link"));
   $ln=(mysql_result($sqlthing,0,"linkname"));

echo "
<a href=\"htt://$link\">Back To $ln</a>";
$result=mysql_query("select * from bkmsgs where site='$site'");
$post = mysql_num_rows($result);
echo "
Comments:post
";
echo "------
<a href=\"http://wapforumx.com/gb/index.php\">Get Your Gbook Here!</a>
Script edited by andre3";
echo "[/size]</p></card></wml>";
?>
GumSlone Administrator Principal · 1,690 posts #2

replace

echo "<card id=\"JP\" title=\"$title Gbook\"><p align=\"center\">";

with

echo '<card id="JP" title="'.$title.' Gbook" ontimer="'.$_SERVER["PHP_SELF"].'?&site='.$site.'"><timer value="200"/><p align="center">';

it should work.

Please use the code tag from bbcodes when you are posting some sourcecodes next time. External image (may be gone)

And another small improvement suggestion from my side, replace

header("Content-type: text/vnd.wap.wml;");
echo '<?xml version="1.0" encoding="utf-8"?>';

with

header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1"); echo '<?xml version="1.0"?>';

its better External image (may be gone)

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

andre3 Developer · 192 posts #6

GumSlone 1 more thing again bro... i took your guest.php file from one of ur chat script and usersonline.php n use this code to show the users inside the guestbook: $anzahl but i noticed that if 5 person is inside another guestbook it shows the 5 persons in all of the registered books.. do you know what i am doing wrong? i want it to be like if 3 person is in my guestbook and there are no one in ur guestbook it should show: online: 3 and in urs online: 1

Guest #7

GumSlone 1 more thing again bro... i took your guest.php file from one of ur chat script and usersonline.php n use this code to show the users inside the guestbook: $anzahl but i noticed that if 5 person is inside another guestbook it shows the 5 persons in all of the registered books.. do you know what i am doing wrong? i want it to be like if 3 person is in my guestbook and there are no one in ur guestbook it should show: online: 3 and in urs online: 1

make a code to identify its book External image (may be gone)

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close