Refresh Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Refresh Code

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

    Code:
    <?php
    //script edited by andre brown
    include &#39;config.php&#39;;
    
    ////////////////HEADER INFO////////////////
    
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    header("Content-type: text/vnd.wap.wml;");
    echo &#39;<?xml version="1.0" encoding="utf-8"?>&#39;;
    print &#39;<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">&#39;.
    &#39;<wml>
    <head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>&#39;;
    
    
    ////////////////MAIN PAGE////////////////
    
     $sqlthing = mysql_query("SELECT * FROM settings WHERE site=&#39;$site&#39;");
       $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[&#39;page&#39;])){
        $page = 1;
    } else {
        $page = $_GET[&#39;page&#39;];
    }
    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=&#39;$site&#39;"),0);
    $total_pages = ceil($total_results / $max_results);
    
    $sql = mysql_query("SELECT * FROM bkmsgs WHERE site=&#39;$site&#39;  ORDER BY id desc LIMIT $from, $max_results");
    while($row = mysql_fetch_array($ql)){
    $name = $row[&#39;ame&#39;];
    $msg = $row[&#39;msg&#39;];
    $key = $row[&#39;id&#39;];
    include &#39;str_replace.php&#39;;
    include &#39;smile.php&#39;;
    echo "<img src=\"star.gif\" alt=\"*\"/><a href=\"poster.php?site=$site&amp;key=$key\">$name</a> - $msg
    ------
    ";
    
    
    }
    
    if($page < $total_pages){
        $next = ($page + 1);
        echo "<a href=\"".$_SERVER[&#39;PHP_SELF&#39;]."?page=$next&amp;site=$site\">Next Page</a>
    ";
    }
    if($page > 1){
        $prev = ($pag
        echo "<a href=\"".$_SERVER[&#39;PHP_SELF&#39;]."?page=$prev&amp;site=$site\">Prev Page</a>
    ";
    }
    $i = 1; $i <= $total_pages; $i++;
     $sqlthing = mysql_quer("SELECT * FROM settings WHERE site=&#39;$site&#39;");
    $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=&#39;$site&#39;");
    $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>";
    ?>
    wapZan Mobile site builder - Yours is here



    http://wapzan.com?ref=2wap

    #2
    replace
    Code:
    echo "<card id=\"JP\" title=\"$title Gbook\"><p align=\"center\">";
    with
    Code:
    echo &#39;<card id="JP" title="&#39;.$title.&#39; Gbook" ontimer="&#39;.$_SERVER["PHP_SELF"].&#39;?&amp;site=&#39;.$site.&#39;"><timer value="200"/><p align="center">&#39;;
    it should work.


    Please use the code tag from bbcodes when you are posting some sourcecodes next time.

    And another small improvement suggestion from my side, replace
    Code:
    header("Content-type: text/vnd.wap.wml;");
    echo &#39;<?xml version="1.0" encoding="utf-8"?>&#39;;
    with
    Code:
    header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1"); echo &#39;<?xml version="1.0"?>&#39;;
    its better
    Advertise your mobile site for FREE with AdTwirl

    Comment


      #3
      ok bro... but i get this error: Parse error: syntax error, unexpected T_STRING, expecting &#39;,&#39; or &#39;;&#39; in /home/andre3/public_html/gb/book.php on line 34
      wapZan Mobile site builder - Yours is here



      http://wapzan.com?ref=2wap

      Comment


        #4
        add after
        Code:
        echo &#39;<?xml version="1.0"?>&#39;
        the
        Code:
        ;
        it should be
        Code:
        echo &#39;<?xml version="1.0"?>&#39;;
        Advertise your mobile site for FREE with AdTwirl

        Comment


          #5
          it works like a charm bro thanks alot........
          wapZan Mobile site builder - Yours is here



          http://wapzan.com?ref=2wap

          Comment


            #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
            wapZan Mobile site builder - Yours is here



            http://wapzan.com?ref=2wap

            Comment


              #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[/b]
              make a code to identify its book

              Comment


                #8
                i managed to code it thanks..................
                wapZan Mobile site builder - Yours is here



                http://wapzan.com?ref=2wap

                Comment

                Working...
                X