wiev topic link

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

    #16
    my online list is completely different and wont make any sense without the rest of my codings.

    placedet = $item[4] (new sql i added) after sex
    you could have it as:
    if($item[4]!=""){
    $where = "<a href=\"$item[4]&amp;sid=$sid\">$item[1] </a>";
    }
    ($item[1] is only the name of the place where as $item[4] is the link)

    Comment


      #17
      Code:
      else if($action=="online"){
      addonline(getuid_sid($sid),"<b>Online List</b>","");
      echo "<card id=\"main\" title=\"[".getnumonline()."] Online\">";
      echo "<p align=\"center\">";
      
      $nouo = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE hidden = 1"));
      $num_items = getnumonline(); //changable
      if (ismod($uid)){
          $clkd = "<a href=\"modcp.php?action=hidden&amp;sid=$sid\">Nevidljivi</a>.";
      echo " ".$nouo[0]."  $clkd.<br/>";
      
      }
      else{
          $clkd = "Nevidljiv";
      }
      
      echo "</p>";
      $placedet= getip;
      if($page=="" || $page<=0)$page=1;
      $items_per_page= 20;
      $num_pages = ceil($num_items/$items_per_page);
      if($page>$num_pages)$page= $num_pages;
      $limit_start = ($page-1)*$items_per_page;
       $sql = "SELECT
                  a.name, b.place, b.userid, a.sex,b.placedet FROM ibwf_users a
                  INNER JOIN ibwf_online b ON a.id = b.userid WHERE b.hidden = 0
      
                  GROUP BY 1,2
                  LIMIT $limit_start, $items_per_page";
      
      
      
         
      
      
      echo "<p align=\"center\">";
      $lpt = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_topics ORDER BY lastpost DESC LIMIT 0,1"));
            $nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts"));
            if($nops[0]==0)
            {
              $pinfo = mysql_fetch_array(mysql_query("SELECT authorid FROM ibwf_topics"));
              $tluid = $pinfo[0];
              
            }else{
              $pinfo = mysql_fetch_array(mysql_query("SELECT  uid  FROM ibwf_posts ORDER BY dtpost DESC LIMIT 0, 1"));
              
              $tluid = $pinfo[0];
            }
            $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'"));
            $tlnm = htmlspecialchars($lpt[1]);
            $tlnick = getnick_uid($tluid);
            $tpclnk = "<a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$lpt[0]&amp;go=last\">$tlnm</a>";
            $vulnk = "<br/><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$tluid\">$tlnick</a><br/>";
      if(!isforumblocked($uid)){
      
            echo "<small><b>Poslednja poruka je napisana u temi</b><br/>$tpclnk<br/><b>Od:</b> $vulnk</small><br/>";
      
      
      $timeout = 180;
      $timeon = time()-$timeout;
      $chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
      echo " <a href=\"chat.php?rid=100&amp;sid=$sid\">HAPPY KVIZ</a>($chs[0])<br/><br/>";
      }
      
      $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'"));
      echo "<a href=\"index.php?action=stfol&amp;sid=$sid\">Tim Online: ".$noi[0]."</a><br/>";
      $timeout = 180;
      $timeon = time()-$timeout;
      
      $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE vip>'0' AND lastact>'".$timeon."'"));
      echo "<a href=\"index.php?action=vipon&amp;sid=$sid\">Vip Chlanovi Online: ".$noi[0]."</a><br/>";
      echo "<a href=\"index.php?action=online&amp;sid=$sid\">Osvezi</a><br/>";
      
      $tmsg = getpmcount(getuid_sid($sid));
      $umsg = getunreadpm(getuid_sid($sid));
      
      echo "</p>";
      echo "<p align=\"center\">";
      
          $items = mysql_query($sql);
          echo mysql_error();
          while ($item = mysql_fetch_array($items))
          {
      
      
      $gender = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$item[2]."'"));
      if($gender[0]=="M") {
      $seximg = "<img src=\"smilies/kid.gif\" alt=\"M\"/>";
      }else if($gender[0]=="F") {
      $seximg = "<img src=\"smilies/gr1.gif\" alt=\"F\"/>";
      }else{
      $seximg = "<img src=\"images/alien.gif\" alt=\"A\"/>";
      }
      $pr = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$item[2]."'"));
      if($pr[0]=="1") {
      $prm = "<br/><img src=\"http://fotke.srecnica.com/mod.GIF\" alt=\"Moder\"/>";
      
      }else if($pr[0]=="2") {
      $prm = "<br/><img src=\"http://fotke.srecnica.com/adm.GIF\" alt=\"Admin\"/>";
      
      }
      else if($pr[0]=="4") {
      $prm = "<br/><img src=\"images/vl.GIF\" alt=\"Vlasnik\"/>";
      }else if($pr[0]=="5") {
      $prm = "<br/><img src=\"http://fotke.srecnica.com/penzioner.GIF\" alt=\"Penzioner\"/>";
      }
      else if($pr[0]=="6") {
      $prm = "<br/><img src=\"http://fotke.srecnica.com/svaler.gif\" alt=\"Svaler\"/>";
      }
      else{
      $prm ="";
      }
      }
      if($item[4]!=""){
      $where = "<a href=\"$item[4]&amp;sid=$sid\">$item[1] </a>";
      }
      
      $status = getstatus($item[2]);
      $nopl = mysql_fetch_array(mysql_query("SELECT onlpotpis FROM ibwf_users WHERE id='".$item[2]."'"));
      $onlpotpis = parsepm($nopl[0], $sid);
      $lnk = "$seximg <a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">".getnick_uid($item[2])."</a> <br/><b>Status: $status <br/>Trenutno $item[1]</b>";
      
                  if($item[2]==0) {
                  
      echo "<b>- GOST na online -IP $item[3]-- Browser $item[4]<br/>Trenutno: $where </b><br/>-----<br/>";
      }
      
      else 
      {
      
      echo "$lnk<br/>$onlpotpis<br/><br/>-----<br/>";
      
      
      }
      }
      
      echo "</p>";
      echo "<p align=\"center\">";
      if($page>1)
      {
      $ppage = $page-1;
      echo "<a href=\"index.php?action=online&amp;page=$ppage&amp;sid=$sid\">Nazad</a> ";
      }
      if($page<$num_pages)
      {
      $npage = $page+1;
      echo "<a href=\"index.php?action=online&amp;page=$npage&amp;sid=$sid\">Napred</a>";
      }
      echo "<br/>$page/$num_pages<br/>";
      if($num_pages>2)
      {
      echo getjumper($action, $sid,"index");
      }
      echo "</p>";
      ////// UNTILL HERE >>
      
      echo "<p align=\"center\">";
      $mols = mysql_fetch_array(mysql_query("SELECT name, value FROM ibwf_settings WHERE id='2'"));
      echo "<small>Najvise Online: $mols[1]</small><br/>";
      
      $mols = mysql_fetch_array(mysql_query("SELECT ppl, dtm FROM ibwf_mpot WHERE ddt='".date("d m y")."'"));
      echo "<small>Najvise Online Danas: $mols[0]</small><br/>";
       $tm24 = time() - (24*60*60);
      $aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>'".$tm24."'"));
      echo mysql_error();
      echo "<small>Online za 24h: <a href=\"index.php?action=actmem&amp;sid=$sid\">$aut[0]</a></small><br/>";
      if(!isforumblocked($uid)){
      
        echo "<a href=\"index.php?action=onlpotpis&amp;sid=$sid\">[Online Potpis]</a><br/>";
      }
      echo "<img src=\"images/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&amp;sid=$sid\">";
      echo "HAPPY</a>";
      echo "</p>";
      echo "</card>";
      }
      this?
      sigpichttp://happy.srecnica.com/web

      Comment


        #18
        that looks good
        but remember to add the addonline function like this:

        addonline(getuid_sid($sid),"<b>Main Page</b>","index.php?action=main");

        Comment


          #19
          errorrrrrrrrrrrrrrrrrrrrr
          Last edited by srecnica; 11.09.09, 23:35.
          sigpichttp://happy.srecnica.com/web

          Comment


            #20
            sigpichttp://happy.srecnica.com/web

            Comment


              #21
              thats cos u havent opened
              echo "<card id=\"main\" title=\"[".getnumonline()."] Online\">"; by the looks of things

              Comment


                #22
                and? how to close? worked well until I put the changes......o my God .... chaos
                sigpichttp://happy.srecnica.com/web

                Comment


                  #23
                  you already have </card>
                  to close it
                  Do you not use a test folder? :P

                  Comment


                    #24
                    used. I use ... ok .. thanks for the help but it obviously
                    Code:
                    if($item[4]!=""){
                    $where = "<a href=\"$item[4]&amp;sid=$sid\">Goto </a>";
                    }
                    makes mistakes ....thanks
                    sigpichttp://happy.srecnica.com/web

                    Comment


                      #25
                      there is nothing wrong with:
                      if($item[4]!=""){
                      $where = "<a href=\"$item[4]&amp;sid=$sid\">Goto </a>";
                      }
                      and everyone else will tell you the same.
                      The whole reason i didnt want to code it in first place was because your online list your showing had fatal errors in it...

                      Comment


                        #26
                        ok .. what to fix in my online list not to be mistakes and that we work with? help me ... here is my whole code for the online list, tell me what to fix?
                        sigpichttp://happy.srecnica.com/web

                        Comment


                          #27
                          PHP Code:
                          if($action=="online"){
                          addonline(getuid_sid($sid),"<b>Online List</b>","");
                          echo 
                          "<card id=\"main\" title=\"[".getnumonline()."] Online\">";
                          echo 
                          "<p align=\"center\">";

                          $nouo mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE hidden = 1"));
                          $num_items getnumonline(); //changable
                          if (ismod($uid)){
                              
                          $clkd "<a href=\"modcp.php?action=hidden&amp;sid=$sid\">Nevidljivi</a>.";
                          echo 
                          " ".$nouo[0]."  $clkd.<br/>";

                          }
                          else{
                              
                          $clkd "Nevidljiv";
                          }

                          echo 
                          "</p>";
                          $placedetgetip;
                          if(
                          $page=="" || $page<=0)$page=1;
                          $items_per_page20;
                          $num_pages ceil($num_items/$items_per_page);
                          if(
                          $page>$num_pages)$page$num_pages;
                          $limit_start = ($page-1)*$items_per_page;
                           
                          $sql "SELECT
                                      a.name, b.place, b.userid, a.sex,b.placedet FROM ibwf_users a
                                      INNER JOIN ibwf_online b ON a.id = b.userid WHERE b.hidden = 0

                                      GROUP BY 1,2
                                      LIMIT 
                          $limit_start$items_per_page";



                             


                          echo 
                          "<p align=\"center\">";
                          $lpt mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_topics ORDER BY lastpost DESC LIMIT 0,1"));
                                
                          $nops mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts"));
                                if(
                          $nops[0]==0)
                                {
                                  
                          $pinfo mysql_fetch_array(mysql_query("SELECT authorid FROM ibwf_topics"));
                                  
                          $tluid $pinfo[0];
                                  
                                }else{
                                  
                          $pinfo mysql_fetch_array(mysql_query("SELECT  uid  FROM ibwf_posts ORDER BY dtpost DESC LIMIT 0, 1"));
                                  
                                  
                          $tluid $pinfo[0];
                                }
                                
                          $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'"));
                                
                          $tlnm htmlspecialchars($lpt[1]);
                                
                          $tlnick getnick_uid($tluid);
                                
                          $tpclnk "<a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$lpt[0]&amp;go=last\">$tlnm</a>";
                                
                          $vulnk "<br/><a href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$tluid\">$tlnick</a><br/>";
                          if(!
                          isforumblocked($uid)){

                                echo 
                          "<small><b>Poslednja poruka je napisana u temi</b><br/>$tpclnk<br/><b>Od:</b> $vulnk</small><br/>";


                          $timeout 180;
                          $timeon time()-$timeout;
                          $chs mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
                          echo 
                          " <a href=\"chat.php?rid=100&amp;sid=$sid\">HAPPY KVIZ</a>($chs[0])<br/><br/>";
                          }

                          $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'"));
                          echo 
                          "<a href=\"index.php?action=stfol&amp;sid=$sid\">Tim Online: ".$noi[0]."</a><br/>";
                          $timeout 180;
                          $timeon time()-$timeout;

                          $noi mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE vip>'0' AND lastact>'".$timeon."'"));
                          echo 
                          "<a href=\"index.php?action=vipon&amp;sid=$sid\">Vip Chlanovi Online: ".$noi[0]."</a><br/>";
                          echo 
                          "<a href=\"index.php?action=online&amp;sid=$sid\">Osvezi</a><br/>";

                          $tmsg getpmcount(getuid_sid($sid));
                          $umsg getunreadpm(getuid_sid($sid));

                          echo 
                          "</p>";
                          echo 
                          "<p align=\"center\">";

                              
                          $items mysql_query($sql);
                              echo 
                          mysql_error();
                              while (
                          $item mysql_fetch_array($items))
                              {


                          $gender mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$item[2]."'"));
                          if(
                          $gender[0]=="M") {
                          $seximg "<img src=\"smilies/kid.gif\" alt=\"M\"/>";
                          }else if(
                          $gender[0]=="F") {
                          $seximg "<img src=\"smilies/gr1.gif\" alt=\"F\"/>";
                          }else{
                          $seximg "<img src=\"images/alien.gif\" alt=\"A\"/>";
                          }
                          $pr mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$item[2]."'"));
                          if(
                          $pr[0]=="1") {
                          $prm "<br/><img src=\"http://fotke.srecnica.com/mod.GIF\" alt=\"Moder\"/>";

                          }else if(
                          $pr[0]=="2") {
                          $prm "<br/><img src=\"http://fotke.srecnica.com/adm.GIF\" alt=\"Admin\"/>";

                          }
                          else if(
                          $pr[0]=="4") {
                          $prm "<br/><img src=\"images/vl.GIF\" alt=\"Vlasnik\"/>";
                          }else if(
                          $pr[0]=="5") {
                          $prm "<br/><img src=\"http://fotke.srecnica.com/penzioner.GIF\" alt=\"Penzioner\"/>";
                          }
                          else if(
                          $pr[0]=="6") {
                          $prm "<br/><img src=\"http://fotke.srecnica.com/svaler.gif\" alt=\"Svaler\"/>";
                          }
                          else{
                          $prm ="";
                          }
                          }
                          if(
                          $item[4]!=""){
                          $where "<a href=\"$item[4]&amp;sid=$sid\">$item[1] </a>";
                          }else{
                          $where $item[1];
                          }

                          $status getstatus($item[2]);
                          $nopl mysql_fetch_array(mysql_query("SELECT onlpotpis FROM ibwf_users WHERE id='".$item[2]."'"));
                          $onlpotpis parsepm($nopl[0], $sid);
                          $lnk "$seximg <a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">".getnick_uid($item[2])."</a> <br/><b>Status: $status <br/>Trenutno $item[1]</b>";

                                      if(
                          $item[2]==0) {
                                      
                          echo 
                          "<b>- GOST na online -IP $item[3]-- Browser $item[4]<br/>Trenutno: $where </b><br/>-----<br/>";
                          }

                          else 
                          {

                          echo 
                          "$lnk<br/>$onlpotpis<br/><br/>-----<br/>";


                          }
                          }

                          echo 
                          "</p>";
                          echo 
                          "<p align=\"center\">";
                          if(
                          $page>1)
                          {
                          $ppage $page-1;
                          echo 
                          "<a href=\"index.php?action=online&amp;page=$ppage&amp;sid=$sid\">Nazad</a> ";
                          }
                          if(
                          $page<$num_pages)
                          {
                          $npage $page+1;
                          echo 
                          "<a href=\"index.php?action=online&amp;page=$npage&amp;sid=$sid\">Napred</a>";
                          }
                          echo 
                          "<br/>$page/$num_pages<br/>";
                          if(
                          $num_pages>2)
                          {
                          echo 
                          getjumper($action$sid,"index");
                          }
                          echo 
                          "</p>";
                          ////// UNTILL HERE >>

                          echo "<p align=\"center\">";
                          $mols mysql_fetch_array(mysql_query("SELECT name, value FROM ibwf_settings WHERE id='2'"));
                          echo 
                          "<small>Najvise Online: $mols[1]</small><br/>";

                          $mols mysql_fetch_array(mysql_query("SELECT ppl, dtm FROM ibwf_mpot WHERE ddt='".date("d m y")."'"));
                          echo 
                          "<small>Najvise Online Danas: $mols[0]</small><br/>";
                           
                          $tm24 time() - (24*60*60);
                          $aut mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>'".$tm24."'"));
                          echo 
                          mysql_error();
                          echo 
                          "<small>Online za 24h: <a href=\"index.php?action=actmem&amp;sid=$sid\">$aut[0]</a></small><br/>";
                          if(!
                          isforumblocked($uid)){

                            echo 
                          "<a href=\"index.php?action=onlpotpis&amp;sid=$sid\">[Online Potpis]</a><br/>";
                          }
                          echo 
                          "<img src=\"images/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&amp;sid=$sid\">";
                          echo 
                          "HAPPY</a>";
                          echo 
                          "</p>";
                          echo 
                          "</card>";

                          Comment


                            #28
                            Parse error: syntax error, unexpected '}' in /home/srecnica/domains/srecnica.com/public_html/happy/index.php on line 4275
                            sigpichttp://happy.srecnica.com/web

                            Comment


                              #29
                              what ever line 4275 is remove the }

                              Comment


                                #30
                                works now, thanks .. tell me if this can do addonline all files? in the inbox, genproc, lists ....
                                sigpichttp://happy.srecnica.com/web

                                Comment

                                Working...
                                X