Flags in ONline list

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

    Flags in ONline list

    can you help me,, how can i put the flags of the user in the online list, thankz

    #2
    Originally posted by hunter-x-hunter View Post
    can you help me,, how can i put the flags of the user in the online list, thankz
    open any script that uses IP2country and use that code...
    It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
    ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
    ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
    キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

    Comment


      #3
      here are my online script get the code u want from here
      Code:
      ////////////////////////////////////////////
      else if($action=="online")
      {
      
        addonline(getuid_sid($sid),"Online List - xHTML","index.php?action=$action");
      
      
        //////ALL LISTS SCRIPT <<
      
          if($page=="" || $page<=0)$page=1;
          $num_items = getnumonline(); //changable
          $items_per_page= 10;
          $num_pages = ceil($num_items/$items_per_page);
          if($page>$num_pages)$page= $num_pages;
          $limit_start = ($page-1)*$items_per_page;
      //changable sql
          $sql = "SELECT
                  a.name, b.place, b.userid, a.onlinemsg, sex, perms FROM ibwf_users a
                  INNER JOIN online b ON a.id = b.userid
                  GROUP BY 1,2
                  LIMIT $limit_start, $items_per_page
          ";
          echo "<p><small>";
               echo "<div class=\"box_cen\" align=\"center\">";
        echo "<b>Users Online</b>";
       echo "<div class=\"box_sub\" align=\"left\">";
          $mols = mysql_fetch_array(mysql_query("SELECT name, value FROM ibwf_settings WHERE id='2'"));
          print "Most online: <b>$mols[1]</b><br/>";
          $mols = mysql_fetch_array(mysql_query("SELECT ppl, dtm FROM ibwf_mpot WHERE ddt='".date("d m y")."'"));
          print "Most online today only: <b>$mols[0]</b><br/>";
          $kazz = mysql_fetch_array(mysql_query("SELECT count(a.userid) FROM online a,ibwf_members b where a.userid=b.id and b.sex='F' "));
         echo "Female <a href=\"index.php?action=fonline&amp;sid=$sid\"> [$kazz[0]]</a>&#187";
      $kazz = mysql_fetch_array(mysql_query("SELECT count(a.userid) FROM online a,ibwf_users b where a.userid=b.id and b.sex='M' "));
          echo "Male <a href=\"index.php?action=monline&amp;sid=$sid\"> [$kazz[0]]</a><br/>";
        $timeout = 180;
        $timeon = time()-$timeout;
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."' "));
        echo "Staff Online: <a href=\"index.php?action=stfol&amp;sid=$sid\">".$noi[0]."</a><br/>";
      
      echo"</center><hr/>";
          $items = mysql_query($sql);
          echo mysql_error();
          while ($item = mysql_fetch_array($items))
          {
      $uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$item[2]."'"));
      $IPaddress=$uipadd[0];
      $two_letter_country_code=iptocountry($IPaddress);
      echo "</br><img src=\"flags/$two_letter_country_code.png\" alt=\"*\"/>";
       $avlink = getavatar($item[2]);
      if ($avlink!=""){
      echo "<img src=\"$avlink\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
      }else{
      echo "<img src=\"images/nopic.jpg\" height=\"25\" width=\"25\" alt=\"avatar\"/>";
      }
          $sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE name='$item[0]'"));
      if($sex[0]=="M"){$usersex = "I'm Male <img src=\"images/male1.gif\" alt=\"M\"/><br/>";}
      if($sex[0]=="F"){$usersex = "I'm Female <img src=\"images/female1.gif\" alt=\"F\"/><br/>";}
      if($sex[0]==""){$usersex = "I'm a dreamerz freak..<img src=\"images/freak.gif\" alt=\"F\"/><br/>";}
      	  if ($item[4]=="1")
      	  {
      	  $lnk = "<a class=\"mod\" href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$item[0]</a>";
      	  }
      	  else if ($item[4]=="2")
      	  {
      	  $lnk = "<a class=\"admin\" href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$item[0]</a>";
      	  }
      	  else if ($item[4]=="3")
      	  {
      	  $lnk = "<a class=\"owner\" href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$item[0]</a>";
      	  }
       else if ($item[4]=="4")
      	  {
      	  $lnk = "<a class=\"head admin\" href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$item[0]</a>";
      	  }
      	  else
      	  {
      	  $lnk = "<a href=\"index.php?action=viewuser&amp;who=$item[2]&amp;sid=$sid\">$item[0]</a><br/>";
      	  }
        $text = parsepm($item[3], $sid);
        $onmsg = "~ <font color=\"blue\">$text</font>~";
      
           // echo "$icon $lnk - $item[1]";
      $whereami = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='$item[2]'"));
      if ($whereami[0]=="")
      {
      $myloc = $item[1];
      }
      else
      {
      $myloc = "<a href=\"$whereami[0]&amp;sid=$sid\">$item[1]</a>";
      }
      
       echo "$lnk  - $pm <b>&#183;</b>$icon $usersex<font color=\"green\"><b>&#183; Where : </b>$myloc</font> <br/>$tit";
         echo "<b>&#183;</b> Online Msg : $onmsg<br/>";
         echo "<b>Country:</b> $two_letter_country_code<br/>";
      echo "&#183;&#183;&#183;&#183;&#183;&#183;&#183;&#183;&#183;</br>";
      
        }
      
          echo "</small></p>";
          echo "<p align=\"center\">";
          if($page>1)
          {
            $ppage = $page-1;
            echo "<a href=\"index.php?action=online&amp;page=$ppage&amp;sid=$sid\">&#171;PREV</a> ";
          }
          if($page<$num_pages)
          {
            $npage = $page+1;
            echo "<a href=\"index.php?action=online&amp;page=$npage&amp;sid=$sid\">Next&#187;</a>";
          }
          echo "<br/>$page/$num_pages<br/>";
          if($num_pages>2)
          {
            echo getjumper($action, $sid,"index");
          }
          echo "</p>";
        ////// UNTILL HERE >>
      
        echo "<p align=\"center\">";
       echo "<div class=\"box_sub\" align=\"left\">";
         echo "<b>Update Online Msg</b>";
               echo "<form action=\"index.php?action=uponmsg&amp;sid=$sid\" method=\"post\">";
      
          echo "Text:<input name=\"text\" maxlength=\"100\" value=\"$dmsg\"/><br/>";
      echo "<input type=\"submit\" value=\"Save\"/>";
          echo "</form><br/></div>";
        $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
          $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
      echo "Home</a>";
        echo "</p></div>";
      
      exit();
      }
      in core.php
      Code:
      //////////////////////Country
      
      function iptocountry($ip) {
          $numbers = preg_split( "/\./", $ip);
          include("ip_files/".$numbers[0].".php");
          $code=($numbers[0] * 16777216) + ($numbers[1] * 65536) + ($numbers[2] * 256) + ($numbers[3]);
          foreach($ranges as $key => $value){
              if($key<=$code){
                  if($ranges[$key][0]>=$code){$two_letter_country_code=$ranges[$key][1];break;}
                  }
          }
          if ($two_letter_country_code==""){$two_letter_country_code="unkown";}
          return $two_letter_country_code;
      }
      function country_name($two_letter_country_code)
          {
           include("ip_files/countries.php");
          $country_name=$countries[$two_letter_country_code][0];
         return $country_name;
          }
      function show_flag($two_letter_country_code)
            {
           $file_to_check='./flags/'.strtolower($two_letter_country_code).'.png';
           if (file_exists($file_to_check)){
                      $FLAG= '<img src="'.$file_to_check.'" alt="'.$two_letter_country_code.'"/>';
                      }else{
                      $FLAG= '<img src="./flags/noflag.png" alt="'.$two_letter_country_code.'"/>';
                      }
             return $FLAG;
             }
      then just add the flags folder urself
      Last edited by riderz; 15.08.10, 14:13.
      ________________
      Jacques
      jacques@gw-designs.co.za
      http://coding.biz.tm
      Come join and lets make it a place to learn all the noobies how to code
      __________________

      NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

      Comment


        #4
        Wheres the directory ip_files?

        Comment


          #5
          lllllllllll

          if ya looking for this u cant code this using free ip2c... u need to buy one something else
          i have 12.7mb
          Attached Files


          ....................................
          http://photomag.lk/
          ....................................

          Comment


            #6
            Cn i have that 12.7 mb, hehe, thankz al0t

            Comment


              #7
              its a csv file ok...... u ok with that???


              ....................................
              http://photomag.lk/
              ....................................

              Comment


                #8
                Originally posted by centi View Post
                if ya looking for this u cant code this using free ip2c... u need to buy one something else
                i have 12.7mb
                done coding with my own.. you may look on Gothic IndusTrial Culture

                Originally posted by centi View Post
                if ya looking for this u cant code this using free ip2c... u need to buy one something else
                i have 12.7mb
                done coding with my own.. you may look on Gothic IndusTrial Culture
                com site: http://vampist.net
                download site: http://wapdloads.net
                fb: http://www.facebook.com/pmplx

                Comment


                  #9
                  here's a really cheap way...


                  C3 Themes: http://c3themes.wen.ru/index.html
                  Find Files: http://mystarter.tk/?goto=X-search

                  Comment


                    #10
                    Originally posted by wapmetal View Post
                    done coding with my own.. you may look on Gothic IndusTrial Culture



                    done coding with my own.. you may look on Gothic IndusTrial Culture

                    may you plsss share, plsss i need it thankz,..

                    Comment


                      #11
                      nope thtz not a matter....use the riderz script...that works well.....only thing needed is the free ip2country database...


                      I'm Proud to be a Sri Lankan!

                      Comment


                        #12
                        For free IP address geolocation database, IP address geolocation SQL database :: IPInfoDB . if you don't want to use a mysql database, you can use this free API service. IP location XML API :: IPInfoDB with php examples.

                        Or you can try for “Who Is Online” Widget With PHP, MySQL Tutorial: “Who Is Online” Widget With PHP, MySQL & jQuery | Tutorialzine

                        Free Mobile Web Scripts by me: Free Youtube Downloader, Tweets Reader, Facebook Wall Posts Reader
                        PHP Tutorials: How to Secure Your PHP Script (PHP SECURITY)
                        Want to Develop/Edit your WAP/Web Site? Add me to Gtalk (gmail) 'lakshan1989' or PM me.

                        Comment


                          #13
                          Originally posted by icen01 View Post
                          Wheres the directory ip_files?
                          U need to get the ip range database to use this. It neeeds a flat file database which is provided from software77 for free


                          I'm Proud to be a Sri Lankan!

                          Comment

                          Working...
                          X