Diff for /boincuserstats/www/cn.inc between versions 1.1 and 1.4

version 1.1, 2005/02/27 15:58:16 version 1.4, 2005/03/01 23:14:04
Line 1 Line 1
 <?php  <?php
   function getit()
   {
           $myvar = explode("=",$_SERVER['QUERY_STRING']);
           return $myvar[count($myvar)-1];
   }
 function get_lang($acc_l)  function get_lang($acc_l)
 {  {
         /*TODO - make the $acc_l depend on available files!!! - this will require an argument??*/          /*TODO - make the $acc_l depend on available files!!! - this will require an argument??*/
Line 20  return $lang; Line 25  return $lang;
 }  }
 function get_my_name()  function get_my_name()
 {  {
        $look_for = basename($_SERVER['REQUEST_URI'],get_my_ending()); //what file was requested?        $look_for = basename(getit(),get_my_ending()); //what file was requested?
         return $look_for;          return $look_for;
 }  }
 function get_my_ending()  function get_my_ending()
 {  {
        $dotarray = explode(".",$_SERVER['REQUEST_URI']);        $dotarray = explode(".",getit());
         $fileending = $dotarray[(count($dotarray)-1)];          $fileending = $dotarray[(count($dotarray)-1)];
         return $fileending;          return $fileending;
 }  }
 function get_avail()  function get_avail()
 {  {
           $def_lang = "en";
         $look_for = get_my_name();          $look_for = get_my_name();
         $dir_list = explode("\n",`ls | grep $look_for`); //what files we have?          $dir_list = explode("\n",`ls | grep $look_for`); //what files we have?
         if($def_lang)          if($def_lang)
Line 40  function get_avail() Line 46  function get_avail()
         for ($i=0;$i<count($dir_list);$i++)          for ($i=0;$i<count($dir_list);$i++)
         {          {
          $what = explode(".",$dir_list[$i]);           $what = explode(".",$dir_list[$i]);
         if ((count($what)>2)&&($what[count($what)-2]!=$match[0]))         if (count($what)>2)
                 $match[] = $what[count($what)-2];                  $match[] = $what[count($what)-2];
         }          }
         return $match;          return $match;

Removed from v.1.1  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>