[ PHPXref.com ] [ Generated: Sun Jul 20 19:57:11 2008 ] [ PHP-Update 2.7 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/admin/ -> counter.php (source)

   1  <?
   2  extract($HTTP_POST_VARS); 
   3  extract($HTTP_GET_VARS); 
   4  extract($HTTP_COOKIE_VARS); 
   5  $adminsect = 1;
   6  include  "protection.php";
   7  if(file_exists("languages/$language.php")) include "languages/$language.php";
   8  else {
   9  echo "<b>Critical error</b><br>Language file <i>$language</i> could not be found.<p>";
  10  exit;
  11  }
  12  $pagetitle = "$sitetitle $split $title_counter";
  13  $thispagetitle = "$title_counter";
  14  if(file_exists("../code/templates/$template}_h.php") && file_exists("../code/templates/$template}_f.php")) {
  15  $tempfilename = "../code/templates/$template}_h.php";
  16  $handle = fopen($tempfilename, "r");
  17  $temp = fread($handle, filesize ($tempfilename));
  18  fclose($handle);
  19  include  "../code/menucode.php";
  20  include  "../code/parsetemplate.php";
  21  parsetemplate($temp, $menucode, $thispagetitle, $pagetitle);
  22  if($rights[4] == "1") {
  23  
  24  echo "<b>$title_counter</b><br><img src=\"../gfx/blank.gif\" width=1 height=6><br>
  25  
  26  <table border=0 cellspacing=1 cellpadding=2 class=filebg>
  27  <tr><td class=filelist><i>$txt_section</i></td><td class=filelist><i>$txt_filename</i></td><td class=filelist><i>$txt_hits</i></td></tr>";
  28  
  29  $query = mysql_query("SELECT * FROM $table_prefix}counter ORDER BY name ASC");
  30  
  31  if(mysql_num_rows($query) > 0) {
  32  for($i = 0; $i < mysql_num_rows($query); $i++) {
  33  $sect = mysql_result($query, $i, "section");
  34  $thisfile = mysql_result($query, $i, "name");
  35  $count = mysql_result($query, $i, "count");
  36  if($sect == "b") $sect = $txt_blog;
  37  if($sect == "c") $sect = $title_content;
  38  if($sect == "f") $sect = $txt_front;
  39  if($sect == "g") $sect = $title_gallery;
  40  if($sect == "n") $sect = $txt_news;
  41  if($sect == "v") $sect = $txt_guestbook;
  42  
  43  echo "<tr><td class=filelist>$sect</td><td class=filelist>$thisfile</td><td class=filelist>$count</td></tr>";
  44  }
  45  }
  46  else echo "<tr><td colspan=3 class=filelist align=center><i>$txt_empty</i></td></tr>";
  47  
  48  
  49  echo "</table>";
  50  
  51  }
  52  else echo "<b>$txt_error</b><br>$txt_norights<br><img src=\"../gfx/blank.gif\" width=1 height=6><br>$txt_home<p>";
  53  $tempfilename = "../code/templates/$template}_f.php";
  54  $handle = fopen($tempfilename, "r");
  55  $temp = fread($handle, filesize ($tempfilename));
  56  fclose($handle);
  57  parsetemplate($temp, $menucode, $thispagetitle, $pagetitle);
  58  }
  59  else echo "<b>$txt_error</b><br>$txt_tempnofound<p>";
  60  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]