rwrss error

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

    rwrss error

    I make this error
    Parse error: syntax error, unexpected T_STRING in /membri/universal3000/chat_universal2/web/rwrss.php on line 110
    PHP Code:
    <?php
    include("config.php");
    include(
    "core.php");
    include(
    "lastRSS.php");
    $bcon connectdb();
    $sitename mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
    $sitename $sitename[0];
    if (!
    $bcon)
    {
        echo 
    "<head>";
        echo 
    "<title>Error!!!</title>";
        echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
        echo 
    "</head>";
        echo 
    "<body>";
        echo 
    "<p align=\"center\">";
        echo 
    "<img src=\"../images/notok.gif\" alt=\"!\"/><br/>";
        echo 
    "<b><strong>Errore! Impossibile collegarsi al database...</strong></b><br/><br/>";
        echo 
    "Questo errore si verifica di solito quando c'è il backup del database, si prega di essere pazienti...";
        echo 
    "</p>";
        echo 
    "</body>";
        echo 
    "</html>";
        exit();
    }
    $brws explode("/",$HTTP_USER_AGENT);
    $ubr $brws[0];
    $uip getip();
    $rssid $_GET["rssid"];
    $sid $_GET["sid"];
    $page $_GET["page"];
    $fid $_GET["fid"];
    $action $_GET["action"];
    $uid getuid_sid($sid);
    $theme mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
    $hvia $HTTP_VIA;
    cleardata();
    if(
    $action=="showfrss")
    {
        
    addonline(getuid_sid($sid),"RSS aggregator","");
          echo 
    "<head>";
          echo 
    "<title>RSS aggregator</title>";
          echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
     
        
    //////ALL LISTS SCRIPT <<
        
    if($page=="" || $page<=0)$page=1;
        
    $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rss WHERE fid='".$fid."'"));
        
    $num_items $noi[0]; //changable
        
    $items_per_page5;
        
    $num_pages ceil($num_items/$items_per_page);
        if((
    $page>$num_pages)&&$page!=1)$page$num_pages;
        
    $limit_start = ($page-1)*$items_per_page;
        
    //changable sql
            
    $sql "SELECT id, title, dscr, imgsrc, pubdate FROM ibwf_rss WHERE fid='".$fid."' ORDER BY id LIMIT $limit_start$items_per_page";
     
        echo 
    "<p>";
        
    $items mysql_query($sql);
        echo 
    mysql_error();
        if(
    mysql_num_rows($items)>0)
        {
        while (
    $item mysql_fetch_array($items))
        {
     if(
    trim($item[3]!=""))
          {
            
    $img "<img src=\"$item[3]\" alt=\"*\"/>";
          }else{
           
    $img=""
          }
            
    $lnk "$img<a href=\"rwrss.php?action=readrss&amp;sid=$sid&amp;rssid=$item[0]&amp;fid=$fid\">".htmlspecialchars($item[1])."</a><br/>";
            
    $feedsc htmlspecialchars($item[2]);
            echo 
    $lnk;
            echo 
    $feedsc;
            echo 
    "<br/>Publish Date: $item[4]<br/>";
        }
        }
        echo 
    "</p>";
        echo 
    "<p align=\"center\">";
        if(
    $page>1)
        {
          
    $ppage $page-1;
          echo 
    "<a href=\"rwrss.php?action=$action&amp;page=$ppage&amp;sid=$sid&amp;fid=$fid\">«Indietro</a> ";
        }
        if(
    $page<$num_pages)
        {
          
    $npage $page+1;     
          echo 
    "<a href=\"rwrss.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;fid=$fid\">Avanti»</a>";
        }
        echo 
    "<br/>$page/$num_pages<br/>";
        if(
    $num_pages>2)
        {
     
    $rets "<form action=\"inbox.php\" method=\"get\">";
     
    $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"3\"/>";
     
    $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
     
    $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
     
    $rets .= "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
     
    $rets .= "<input type=\"Submit\" value=\"vai a pagina" Name=\"Submit\"/></form>";
            echo 
    $rets;
        }
        echo 
    "</p>";
      echo 
    "<p align=\"center\">";
      echo 
    "<b>9 </b><a accesskey=\"9\" href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">";
    echo 
    htmlspecialchars(getfname($fid))."</a><br/>";
      echo 
    "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo 
    "</p></body>";
    }
    else if(
    $action=="readrss")
    {
        
    addonline(getuid_sid($sid),"RSS Reader","");
          echo 
    "<head>";
          echo 
    "<title>RSS Reader</title>";
          echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo 
    "</head>";
          echo 
    "<body>";
        echo 
    "<p align=\"center\">";
        
    $rssinfo mysql_fetch_array(mysql_query("SELECT lupdate, link FROM ibwf_rss WHERE id='".$rssid."'"));
        
    $updt time() - 3600;
        if(
    $rssinfo[0]<$updt)
        {
            
    ///code to refresh info
            
    $rss = new lastRSS;
            
    $rss->cache_dir './rsscache';
            
    $rss->cache_time 3600;
            
    $rss->date_format 'd m y - H:i';
            
    $rss->stripHTML true;
            
    $rssurl $rssinfo[1];
            if (
    $rs $rss->get($rssurl))
            {
              
    $title $rs["title"];
              
    $pgurl $rs["link"];
              
    $srcd $rs["description"];
              
    $pubdate $rs["lastBuildDate"];
     
                
    mysql_query("UPDATE ibwf_rss SET lupdate='".time()."', title='".$title."', pgurl='".$pgurl."', srcd='".$srcd."', pubdate='".$pubdate."' WHERE id='".$rssid."'");
                
    mysql_query("DELETE FROM ibwf_rssdata WHERE rssid='".$rssid."'");
                
    $rssitems $rs["items"];
                for(
    $i=0;$i<count($rssitems);$i++)
                {
                  
    $rssitem $rssitems[$i];
                  
    mysql_query("INSERT INTO ibwf_rssdata SET rssid='".$rssid."', title='".mysql_real_escape_string($rssitem["title"])."', link='".$rssitem["link"]."', text='".mysql_real_escape_string($rssitem["description"])."', pubdate='".$rssitem["pubDate"]."'");
                }
            }
            else {
                
    $errt "Error: It's not possible to get the service...";
                
    mysql_query("INSERT INTO ibwf_rssdata SET rssid='".$rssid."', title='ERROR!', link='', text='".mysql_real_escape_string($errt)."', pubdate='".time()."'");
            }
        }
        
    $rssinfo mysql_fetch_array(mysql_query("SELECT pgurl, title, srcd, imgsrc FROM ibwf_rss WHERE id='".$rssid."'"));
        echo 
    "<img src=\"$rssinfo[3]\" alt=\"*\"/><br/>";
        echo 
    "<b>$rssinfo[1]</b><br/><small>";
        echo 
    $rssinfo[2];
        echo 
    "</small></p>";
     
        if(
    $page=="" || $page<=0)$page=1;
        
    $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rssdata WHERE rssid='".$rssid."'"));
        
    $num_items $noi[0]; //changable
        
    $items_per_page5;
        
    $num_pages ceil($num_items/$items_per_page);
        if((
    $page>$num_pages)&&$page!=1)$page$num_pages;
        
    $limit_start = ($page-1)*$items_per_page;
        
    //changable sql
            
    $sql "SELECT id, title,  text, pubdate FROM ibwf_rssdata WHERE rssid='".$rssid."' ORDER BY id LIMIT $limit_start$items_per_page";
     
        echo 
    "<p><small>";
        
    $items mysql_query($sql);
        echo 
    mysql_error();
        if(
    mysql_num_rows($items)>0)
        {
        while (
    $item mysql_fetch_array($items))
        {
            
    $lnk "<img src=\"../images/star.gif\" alt=\"*\"/><b>".$item[1]."</b><br/>";
            
    $feedsc $item[2];
            echo 
    $lnk;
            echo 
    $feedsc;
            echo 
    "<br/>Publish Date: $item[3]<br/><img src=\"../images/line.jpg\" alt=\"*\"/><br/>";
        }
        }
        echo 
    "</small></p>";
        echo 
    "<p align=\"center\">";
        if(
    $page>1)
        {
          
    $ppage $page-1;
          echo 
    "<a href=\"rwrss.php?action=$action&amp;page=$ppage&amp;sid=$sid&amp;rssid=$rssid&amp;fid=$fid\">«Indietro</a> ";
        }
        if(
    $page<$num_pages)
        {
          
    $npage $page+1;
          echo 
    "<a href=\"rwrss.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;rssid=$rssid&amp;fid=$fid\">Avanti»</a>";
        }
        echo 
    "<br/>$page/$num_pages<br/>";
        if(
    $num_pages>2)
        {
     
    $rets "<form action=\"inbox.php\" method=\"get\">";
     
    $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"3\"/>";
     
    $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
     
    $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
     
    $rets .= "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
     
    $rets .= "<input type=\"hidden\" name=\"rssid\" value=\"$rssid\"/>";
     
    $rets .= "<input type=\"Submit\" value=\"vai a pagina\" Name=\"Submit\"/></form>";
            echo 
    $rets;
        }
        echo 
    "</p>";
        echo 
    "<p align=\"center\">";
     
        if(
    $fid!=""||$fid>0)
        {
        
    $fname htmlspecialchars(getfname($fid));
        echo 
    "<b>8 </b><a accesskey=\"8\" href=\"rwrss.php?action=showfrss&amp;sid=$sid&amp;fid=$fid\"><img src=\"../images/rss.gif\" alt=\"rss\"/>$fname Extras</a><br/>";
        echo 
    "<b>9 </b><a accesskey=\"9\" href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">$fname</a><br/>";
        }
      echo 
    "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo 
    "</p></body>";
    }
    else{
    addonline(getuid_sid($sid),"Lost in RSS aggregator","");
      echo 
    "<head>";
      echo 
    "<title>Error!!!</title>";
      echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo 
    "</head>";
      echo 
    "<body>";
      echo 
    "<p align=\"center\">";
      echo 
    "I don't know how did you get into here, but there's nothing to show<br/><br/>";
      echo 
    "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo 
    "</p></body>";
    }
    Thanks to whoever solves this problem
    Last edited by Leviathan73; 25.09.09, 11:48.

    #2
    u didnt add this in the top and bottom dnt know if its the prob
    <?php
    ?>

    Code:
    <?php
    include("config.php");
    include("core.php");
    include("lastRSS.php");
    $bcon = connectdb();
    $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
    $sitename = $sitename[0];
    if (!$bcon)
    {
        echo "<head>";
        echo "<title>Error!!!</title>";
        echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
        echo "</head>";
        echo "<body>";
        echo "<p align=\"center\">";
        echo "<img src=\"../images/notok.gif\" alt=\"!\"/><br/>";
        echo "<b><strong>Errore! Impossibile collegarsi al database...</strong></b><br/><br/>";
        echo "Questo errore si verifica di solito quando c'è il backup del database, si prega di essere pazienti...";
        echo "</p>";
        echo "</body>";
        echo "</html>";
        exit();
    }
    $brws = explode("/",$HTTP_USER_AGENT);
    $ubr = $brws[0];
    $uip = getip();
    $rssid = $_GET["rssid"];
    $sid = $_GET["sid"];
    $page = $_GET["page"];
    $fid = $_GET["fid"];
    $action = $_GET["action"];
    $uid = getuid_sid($sid);
    $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
    $hvia = $HTTP_VIA;
    cleardata();
    if($action=="showfrss")
    {
        addonline(getuid_sid($sid),"RSS aggregator","");
          echo "<head>";
          echo "<title>RSS aggregator</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";
    
        //////ALL LISTS SCRIPT <<
        if($page=="" || $page<=0)$page=1;
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rss WHERE fid='".$fid."'"));
        $num_items = $noi[0]; //changable
        $items_per_page= 5;
        $num_pages = ceil($num_items/$items_per_page);
        if(($page>$num_pages)&&$page!=1)$page= $num_pages;
        $limit_start = ($page-1)*$items_per_page;
        //changable sql
            $sql = "SELECT id, title, dscr, imgsrc, pubdate FROM ibwf_rss WHERE fid='".$fid."' ORDER BY id LIMIT $limit_start, $items_per_page";
    
        echo "<p>";
        $items = mysql_query($sql);
        echo mysql_error();
        if(mysql_num_rows($items)>0)
        {
        while ($item = mysql_fetch_array($items))
        {
     if(trim($item[3]!=""))
          {
            $img = "<img src=\"$item[3]\" alt=\"*\"/>";
          }else{
           $img="";
          }
            $lnk = "$img<a href=\"rwrss.php?action=readrss&amp;sid=$sid&amp;rssid=$item[0]&amp;fid=$fid\">".htmlspecialchars($item[1])."</a><br/>";
            $feedsc = htmlspecialchars($item[2]);
            echo $lnk;
            echo $feedsc;
            echo "<br/>Publish Date: $item[4]<br/>";
        }
        }
        echo "</p>";
        echo "<p align=\"center\">";
        if($page>1)
        {
          $ppage = $page-1;
          echo "<a href=\"rwrss.php?action=$action&amp;page=$ppage&amp;sid=$sid&amp;fid=$fid\">«Indietro</a> ";
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          echo "<a href=\"rwrss.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;fid=$fid\">Avanti»</a>";
        }
        echo "<br/>$page/$num_pages<br/>";
        if($num_pages>2)
        {
     $rets = "<form action=\"inbox.php\" method=\"get\">";
     $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"3\"/>";
     $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
     $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
     $rets .= "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
     $rets .= "<input type=\"Submit\" value=\"vai a pagina" Name="Submit\"/></form>";
            echo $rets;
        }
        echo "</p>";
      echo "<p align=\"center\">";
      echo "<b>9 </b><a accesskey=\"9\" href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">";
    echo htmlspecialchars(getfname($fid))."</a><br/>";
      echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p></body>";
    }
    else if($action=="readrss")
    {
        addonline(getuid_sid($sid),"RSS Reader","");
          echo "<head>";
          echo "<title>RSS Reader</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";
        echo "<p align=\"center\">";
        $rssinfo = mysql_fetch_array(mysql_query("SELECT lupdate, link FROM ibwf_rss WHERE id='".$rssid."'"));
        $updt = time() - 3600;
        if($rssinfo[0]<$updt)
        {
            ///code to refresh info
            $rss = new lastRSS;
            $rss->cache_dir = './rsscache';
            $rss->cache_time = 3600;
            $rss->date_format = 'd m y - H:i';
            $rss->stripHTML = true;
            $rssurl = $rssinfo[1];
            if ($rs = $rss->get($rssurl))
            {
              $title = $rs["title"];
              $pgurl = $rs["link"];
              $srcd = $rs["description"];
              $pubdate = $rs["lastBuildDate"];
    
                mysql_query("UPDATE ibwf_rss SET lupdate='".time()."', title='".$title."', pgurl='".$pgurl."', srcd='".$srcd."', pubdate='".$pubdate."' WHERE id='".$rssid."'");
                mysql_query("DELETE FROM ibwf_rssdata WHERE rssid='".$rssid."'");
                $rssitems = $rs["items"];
                for($i=0;$i<count($rssitems);$i++)
                {
                  $rssitem = $rssitems[$i];
                  mysql_query("INSERT INTO ibwf_rssdata SET rssid='".$rssid."', title='".mysql_real_escape_string($rssitem["title"])."', link='".$rssitem["link"]."', text='".mysql_real_escape_string($rssitem["description"])."', pubdate='".$rssitem["pubDate"]."'");
                }
            }
            else {
                $errt = "Error: It's not possible to get the service...";
                mysql_query("INSERT INTO ibwf_rssdata SET rssid='".$rssid."', title='ERROR!', link='', text='".mysql_real_escape_string($errt)."', pubdate='".time()."'");
            }
        }
        $rssinfo = mysql_fetch_array(mysql_query("SELECT pgurl, title, srcd, imgsrc FROM ibwf_rss WHERE id='".$rssid."'"));
        echo "<img src=\"$rssinfo[3]\" alt=\"*\"/><br/>";
        echo "<b>$rssinfo[1]</b><br/><small>";
        echo $rssinfo[2];
        echo "</small></p>";
    
        if($page=="" || $page<=0)$page=1;
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rssdata WHERE rssid='".$rssid."'"));
        $num_items = $noi[0]; //changable
        $items_per_page= 5;
        $num_pages = ceil($num_items/$items_per_page);
        if(($page>$num_pages)&&$page!=1)$page= $num_pages;
        $limit_start = ($page-1)*$items_per_page;
        //changable sql
            $sql = "SELECT id, title,  text, pubdate FROM ibwf_rssdata WHERE rssid='".$rssid."' ORDER BY id LIMIT $limit_start, $items_per_page";
    
        echo "<p><small>";
        $items = mysql_query($sql);
        echo mysql_error();
        if(mysql_num_rows($items)>0)
        {
        while ($item = mysql_fetch_array($items))
        {
            $lnk = "<img src=\"../images/star.gif\" alt=\"*\"/><b>".$item[1]."</b><br/>";
            $feedsc = $item[2];
            echo $lnk;
            echo $feedsc;
            echo "<br/>Publish Date: $item[3]<br/><img src=\"../images/line.jpg\" alt=\"*\"/><br/>";
        }
        }
        echo "</small></p>";
        echo "<p align=\"center\">";
        if($page>1)
        {
          $ppage = $page-1;
          echo "<a href=\"rwrss.php?action=$action&amp;page=$ppage&amp;sid=$sid&amp;rssid=$rssid&amp;fid=$fid\">«Indietro</a> ";
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          echo "<a href=\"rwrss.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;rssid=$rssid&amp;fid=$fid\">Avanti»</a>";
        }
        echo "<br/>$page/$num_pages<br/>";
        if($num_pages>2)
        {
     $rets = "<form action=\"inbox.php\" method=\"get\">";
     $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"3\"/>";
     $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
     $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
     $rets .= "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
     $rets .= "<input type=\"hidden\" name=\"rssid\" value=\"$rssid\"/>";
     $rets .= "<input type=\"Submit\" value=\"vai a pagina\" Name=\"Submit\"/></form>";
            echo $rets;
        }
        echo "</p>";
        echo "<p align=\"center\">";
    
        if($fid!=""||$fid>0)
        {
        $fname = htmlspecialchars(getfname($fid));
        echo "<b>8 </b><a accesskey=\"8\" href=\"rwrss.php?action=showfrss&amp;sid=$sid&amp;fid=$fid\"><img src=\"../images/rss.gif\" alt=\"rss\"/>$fname Extras</a><br/>";
        echo "<b>9 </b><a accesskey=\"9\" href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">$fname</a><br/>";
        }
      echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p></body>";
    }
    else{
    addonline(getuid_sid($sid),"Lost in RSS aggregator","");
      echo "<head>";
      echo "<title>Error!!!</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
      echo "I don't know how did you get into here, but there's nothing to show<br/><br/>";
      echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p></body>";
    }
    ?>

    Comment


      #3
      the problem is towards this part of code
      PHP Code:
      {
            
      $npage $page+1;     
            echo 
      "<a href=\"rwrss.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;fid=$fid\">Avanti»</a>";
          }
          echo 
      "<br/>$page/$num_pages<br/>";
          if(
      $num_pages>2)
          {
       
      $rets "<form action=\"inbox.php\" method=\"get\">";
       
      $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"3\"/>";
       
      $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
       
      $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
       
      $rets .= "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
       
      $rets .= "<input type=\"Submit\" value=\"vai a pagina" Name=\"Submit\"/></form>";        echo $rets;
          }
          echo 
      "</p>";
        echo 
      "<p align=\"center\">";
        echo 
      "<b>9 </b><a accesskey=\"9\" href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">";
      echo 
      htmlspecialchars(getfname($fid))."</a><br/>";
        echo 
      "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
        echo 
      "</p></body>";
      }
      else if(
      $action=="readrss")
      {
          
      addonline(getuid_sid($sid),"RSS Reader","");
            echo 
      "<head>";
            echo 
      "<title>RSS Reader</title>";
            echo 
      "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
            echo 
      "</head>";
            echo 
      "<body>";
          echo 
      "<p align=\"center\">";
          
      $rssinfo mysql_fetch_array(mysql_query("SELECT lupdate, link FROM ibwf_rss WHERE id='".$rssid."'"));
          
      $updt time() - 3600;
          if(
      $rssinfo[0]<$updt)
          {
              
      ///code to refresh info
              
      $rss = new lastRSS;
              
      $rss->cache_dir './rsscache';
              
      $rss->cache_time 3600;
              
      $rss->date_format 'd m y - H:i';
              
      $rss->stripHTML true;
              
      $rssurl $rssinfo[1];
              if (
      $rs $rss->get($rssurl))
              {
                
      $title $rs["title"];
                
      $pgurl $rs["link"];
                
      $srcd $rs["description"];
                
      $pubdate $rs["lastBuildDate"]; 

      Comment


        #4
        can u see the error in this line m8
        Code:
         $rets .= "<input type=\"Submit\" value=\"vai a pagina" Name="Submit\"/></form>";
        the space of Name is in blue so there ur error might be

        Comment


          #5
          whats on line 110?

          maybe you forgot to put ; or "

          check also for these { }
          LDSWAPWORLD sigpic
          site closed.
          im busy with other things in life like facebook , send me PM so i can add you
          www.pinoySG.com

          don't ask for help if you're not even helping yourself!
          i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


          Comment


            #6
            capofret, but what part of code is, exactly?? What is the code of line 110 exactly?
            Last edited by Leviathan73; 25.09.09, 12:17.

            Comment


              #7
              Originally posted by Leviathan73 View Post
              capofret, but what part of code is, exactly?? What is the code of line 110 exactly?
              you can see the numbering on your script editor
              something like

              1 <?php
              2 include("config.php");
              3 include("core.php");
              4 include("lastRSS.php");
              5 $bcon = connectdb();

              and so on..

              so just tell us what is on line 110. its a waste of time if you will manually count it lol.

              just check maybe you missed putting " or ; on that line

              if you have IF or ELSE IF statement, you should have the { and }
              LDSWAPWORLD sigpic
              site closed.
              im busy with other things in life like facebook , send me PM so i can add you
              www.pinoySG.com

              don't ask for help if you're not even helping yourself!
              i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


              Comment


                #8
                here is the error, line 110
                PHP Code:
                $rets .= "<input type=\"Submit\" value=\"vai a pagina" Name=\"Submit\"/></form>";
                        echo 
                "$rets;
                   }  
                    echo "
                </p>"; 
                I can not change

                Comment


                  #9
                  Originally posted by Leviathan73 View Post
                  here is the error, line 110
                  PHP Code:
                  $rets .= "<input type=\"Submit\" value=\"vai a pagina" Name=\"Submit\"/></form>";
                          echo 
                  "$rets;
                     }  
                      echo "
                  </p>"; 
                  I can not change
                  echo "$rets";
                  LDSWAPWORLD sigpic
                  site closed.
                  im busy with other things in life like facebook , send me PM so i can add you
                  www.pinoySG.com

                  don't ask for help if you're not even helping yourself!
                  i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.


                  Comment


                    #10
                    it should be:
                    PHP Code:
                    $rets .= "<input type=\"Submit\" value=\"vai a pagina\" Name=\"Submit\"/></form>"
                    try now.

                    PS.

                    you forgot to backslash the quotes
                    Advertise your mobile site for FREE with AdTwirl

                    Comment


                      #11
                      PHP Code:
                      <?php
                      include("config.php");
                      include(
                      "core.php");
                      include(
                      "lastRSS.php");
                      $bcon connectdb();
                      $sitename mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
                      $sitename $sitename[0];
                      if (!
                      $bcon)
                      {
                          echo 
                      "<head>";
                          echo 
                      "<title>Error!!!</title>";
                          echo 
                      "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
                          echo 
                      "</head>";
                          echo 
                      "<body>";
                          echo 
                      "<p align=\"center\">";
                          echo 
                      "<img src=\"../images/notok.gif\" alt=\"!\"/><br/>";
                          echo 
                      "<b><strong>Errore! Impossibile collegarsi al database...</strong></b><br/><br/>";
                          echo 
                      "Questo errore si verifica di solito quando c'è il backup del database, si prega di essere pazienti...";
                          echo 
                      "</p>";
                          echo 
                      "</body>";
                          echo 
                      "</html>";
                          exit();
                      }
                      $brws explode("/",$HTTP_USER_AGENT);
                      $ubr $brws[0];
                      $uip getip();
                      $rssid $_GET["rssid"];
                      $sid $_GET["sid"];
                      $page $_GET["page"];
                      $fid $_GET["fid"];
                      $action $_GET["action"];
                      $uid getuid_sid($sid);
                      $theme mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
                      $hvia $HTTP_VIA;
                      cleardata();
                      if(
                      $action=="showfrss")
                      {
                          
                      addonline(getuid_sid($sid),"RSS aggregator","");
                            echo 
                      "<head>";
                            echo 
                      "<title>RSS aggregator</title>";
                            echo 
                      "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                            echo 
                      "</head>";
                            echo 
                      "<body>";
                       
                          
                      //////ALL LISTS SCRIPT <<
                          
                      if($page=="" || $page<=0)$page=1;
                          
                      $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rss WHERE fid='".$fid."'"));
                          
                      $num_items $noi[0]; //changable
                          
                      $items_per_page5;
                          
                      $num_pages ceil($num_items/$items_per_page);
                          if((
                      $page>$num_pages)&&$page!=1)$page$num_pages;
                          
                      $limit_start = ($page-1)*$items_per_page;
                          
                      //changable sql
                              
                      $sql "SELECT id, title, dscr, imgsrc, pubdate FROM ibwf_rss WHERE fid='".$fid."' ORDER BY id LIMIT $limit_start$items_per_page";
                       
                          echo 
                      "<p>";
                          
                      $items mysql_query($sql);
                          echo 
                      mysql_error();
                          if(
                      mysql_num_rows($items)>0)
                          {
                          while (
                      $item mysql_fetch_array($items))
                          {
                       if(
                      trim($item[3]!=""))
                            {
                              
                      $img "<img src=\"$item[3]\" alt=\"*\"/>";
                            }else{
                             
                      $img=""
                            }
                              
                      $lnk "$img<a href=\"rwrss.php?action=readrss&amp;sid=$sid&amp;rssid=$item[0]&amp;fid=$fid\">".htmlspecialchars($item[1])."</a><br/>";
                              
                      $feedsc htmlspecialchars($item[2]);
                              echo 
                      $lnk;
                              echo 
                      $feedsc;
                              echo 
                      "<br/>Publish Date: $item[4]<br/>";
                          }
                          }
                          echo 
                      "</p>";
                          echo 
                      "<p align=\"center\">";
                          if(
                      $page>1)
                          {
                            
                      $ppage $page-1;
                            echo 
                      "<a href=\"rwrss.php?action=$action&amp;page=$ppage&amp;sid=$sid&amp;fid=$fid\">«Indietro</a> ";
                          }
                          if(
                      $page<$num_pages)
                          {
                            
                      $npage $page+1;     
                            echo 
                      "<a href=\"rwrss.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;fid=$fid\">Avanti»</a>";
                          }
                          echo 
                      "<br/>$page/$num_pages<br/>";
                          if(
                      $num_pages>2)
                          {
                       
                      $rets "<form action=\"inbox.php\" method=\"get\">";
                       
                      $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"3\"/>";
                       
                      $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
                       
                      $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
                       
                      $rets .= "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
                       
                      $rets .= "<input type=\"Submit\" value=\"vai a pagina\" Name=\"Submit\"/></form>";
                              echo 
                      $rets;
                          }
                          echo 
                      "</p>";
                        echo 
                      "<p align=\"center\">";
                        echo 
                      "<b>9 </b><a accesskey=\"9\" href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">";
                      echo 
                      htmlspecialchars(getfname($fid))."</a><br/>";
                        echo 
                      "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        echo 
                      "</p></body>";
                      }
                      else if(
                      $action=="readrss")
                      {
                          
                      addonline(getuid_sid($sid),"RSS Reader","");
                            echo 
                      "<head>";
                            echo 
                      "<title>RSS Reader</title>";
                            echo 
                      "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                            echo 
                      "</head>";
                            echo 
                      "<body>";
                          echo 
                      "<p align=\"center\">";
                          
                      $rssinfo mysql_fetch_array(mysql_query("SELECT lupdate, link FROM ibwf_rss WHERE id='".$rssid."'"));
                          
                      $updt time() - 3600;
                          if(
                      $rssinfo[0]<$updt)
                          {
                              
                      ///code to refresh info
                              
                      $rss = new lastRSS;
                              
                      $rss->cache_dir './rsscache';
                              
                      $rss->cache_time 3600;
                              
                      $rss->date_format 'd m y - H:i';
                              
                      $rss->stripHTML true;
                              
                      $rssurl $rssinfo[1];
                              if (
                      $rs $rss->get($rssurl))
                              {
                                
                      $title $rs["title"];
                                
                      $pgurl $rs["link"];
                                
                      $srcd $rs["description"];
                                
                      $pubdate $rs["lastBuildDate"];
                       
                                  
                      mysql_query("UPDATE ibwf_rss SET lupdate='".time()."', title='".$title."', pgurl='".$pgurl."', srcd='".$srcd."', pubdate='".$pubdate."' WHERE id='".$rssid."'");
                                  
                      mysql_query("DELETE FROM ibwf_rssdata WHERE rssid='".$rssid."'");
                                  
                      $rssitems $rs["items"];
                                  for(
                      $i=0;$i<count($rssitems);$i++)
                                  {
                                    
                      $rssitem $rssitems[$i];
                                    
                      mysql_query("INSERT INTO ibwf_rssdata SET rssid='".$rssid."', title='".mysql_real_escape_string($rssitem["title"])."', link='".$rssitem["link"]."', text='".mysql_real_escape_string($rssitem["description"])."', pubdate='".$rssitem["pubDate"]."'");
                                  }
                              }
                              else {
                                  
                      $errt "Error: It's not possible to get the service...";
                                  
                      mysql_query("INSERT INTO ibwf_rssdata SET rssid='".$rssid."', title='ERROR!', link='', text='".mysql_real_escape_string($errt)."', pubdate='".time()."'");
                              }
                          }
                          
                      $rssinfo mysql_fetch_array(mysql_query("SELECT pgurl, title, srcd, imgsrc FROM ibwf_rss WHERE id='".$rssid."'"));
                          echo 
                      "<img src=\"$rssinfo[3]\" alt=\"*\"/><br/>";
                          echo 
                      "<b>$rssinfo[1]</b><br/><small>";
                          echo 
                      $rssinfo[2];
                          echo 
                      "</small></p>";
                       
                          if(
                      $page=="" || $page<=0)$page=1;
                          
                      $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_rssdata WHERE rssid='".$rssid."'"));
                          
                      $num_items $noi[0]; //changable
                          
                      $items_per_page5;
                          
                      $num_pages ceil($num_items/$items_per_page);
                          if((
                      $page>$num_pages)&&$page!=1)$page$num_pages;
                          
                      $limit_start = ($page-1)*$items_per_page;
                          
                      //changable sql
                              
                      $sql "SELECT id, title,  text, pubdate FROM ibwf_rssdata WHERE rssid='".$rssid."' ORDER BY id LIMIT $limit_start$items_per_page";
                       
                          echo 
                      "<p><small>";
                          
                      $items mysql_query($sql);
                          echo 
                      mysql_error();
                          if(
                      mysql_num_rows($items)>0)
                          {
                          while (
                      $item mysql_fetch_array($items))
                          {
                              
                      $lnk "<img src=\"../images/star.gif\" alt=\"*\"/><b>".$item[1]."</b><br/>";
                              
                      $feedsc $item[2];
                              echo 
                      $lnk;
                              echo 
                      $feedsc;
                              echo 
                      "<br/>Publish Date: $item[3]<br/><img src=\"../images/line.jpg\" alt=\"*\"/><br/>";
                          }
                          }
                          echo 
                      "</small></p>";
                          echo 
                      "<p align=\"center\">";
                          if(
                      $page>1)
                          {
                            
                      $ppage $page-1;
                            echo 
                      "<a href=\"rwrss.php?action=$action&amp;page=$ppage&amp;sid=$sid&amp;rssid=$rssid&amp;fid=$fid\">«Indietro</a> ";
                          }
                          if(
                      $page<$num_pages)
                          {
                            
                      $npage $page+1;
                            echo 
                      "<a href=\"rwrss.php?action=$action&amp;page=$npage&amp;sid=$sid&amp;rssid=$rssid&amp;fid=$fid\">Avanti»</a>";
                          }
                          echo 
                      "<br/>$page/$num_pages<br/>";
                          if(
                      $num_pages>2)
                          {
                       
                      $rets "<form action=\"inbox.php\" method=\"get\">";
                       
                      $rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"3\"/>";
                       
                      $rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
                       
                      $rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
                       
                      $rets .= "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
                       
                      $rets .= "<input type=\"hidden\" name=\"rssid\" value=\"$rssid\"/>";
                       
                      $rets .= "<input type=\"Submit\" value=\"vai a pagina\" Name=\"Submit\"/></form>";
                              echo 
                      $rets;
                          }
                          echo 
                      "</p>";
                          echo 
                      "<p align=\"center\">";
                       
                          if(
                      $fid!=""||$fid>0)
                          {
                          
                      $fname htmlspecialchars(getfname($fid));
                          echo 
                      "<b>8 </b><a accesskey=\"8\" href=\"rwrss.php?action=showfrss&amp;sid=$sid&amp;fid=$fid\"><img src=\"../images/rss.gif\" alt=\"rss\"/>$fname Extras</a><br/>";
                          echo 
                      "<b>9 </b><a accesskey=\"9\" href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">$fname</a><br/>";
                          }
                        echo 
                      "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        echo 
                      "</p></body>";
                      }
                      else{
                      addonline(getuid_sid($sid),"Lost in RSS aggregator","");
                        echo 
                      "<head>";
                        echo 
                      "<title>Error!!!</title>";
                        echo 
                      "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
                        echo 
                      "</head>";
                        echo 
                      "<body>";
                        echo 
                      "<p align=\"center\">";
                        echo 
                      "I don't know how did you get into here, but there's nothing to show<br/><br/>";
                        echo 
                      "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
                        echo 
                      "</p></body>";
                      }
                      Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                      Visit: WapMasterz Coming Back Soon!
                      _______
                      SCRIPTS FOR SALE BY SUBZERO
                      Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                      FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                      _______
                      Info & Tips
                      php.net
                      w3schools.com

                      Comment


                        #12
                        thanks friends! now in me when I checked this forum
                        ERROR!
                        Error: It's not possible to get the service...
                        Publish Date: 1253956016

                        Comment


                          #13
                          many words for nothing..rss on wapdesire not work.
                          i tried to see various version but page don't display nothing
                          always appears
                          Error: It's not possible to get the service...
                          and
                          Publish Date stays empty
                          sigpicthe italian/international COMMUNITY of friendship
                          http://people2000.netne.net
                          WAP/WEB
                          peoplemailbox@katamail.com

                          Comment

                          Working...
                          X