[ PHPXref.com ] [ Generated: Sun Jul 20 20:25:38 2008 ] [ SPiD 1.3.1 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> disp_pic.php (source)

   1  <?
   2      // Getting picture infos
   3      require  "connect.php";
   4      $ptl = getcwd() . "/lang/"; require  "lang/lang.php";
   5      
   6      print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">";
   7      print "<html>";
   8      print "<head>\n";
   9      print "<title>SPiD :: Picture</title>\n";
  10      print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$lang_charset\">";
  11      print "</head>\n";
  12      print "<body LEFTMARGIN=\"0\" TOPMARGIN=\"0\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\">\n";
  13  
  14      $query = "SELECT * FROM `cat_" . de_hyphenfile($_REQUEST["cat"]) . "` WHERE id = '" . de_hyphen($_REQUEST["pic"]) . "'";
  15      $id = mysql_db_query($mydbase, $query) or exit ($lang_string_error_cantquery);
  16      $r = mysql_fetch_array($id);
  17      
  18      $file = "cat_" . de_hyphenfile($_REQUEST["cat"]) . "/" . $r[3];
  19  
  20      $info = getimagesize($file);
  21      $width = $info[0];
  22      $height = $info[1];
  23      
  24      print "<img src=\"$file\" width=\"$width\" height=\"$height\" alt=\"$r[1]\" />\n";
  25  
  26      // Updating download counter
  27      $download = $r[6] + 1;
  28      $query = "UPDATE `cat_" . de_hyphenfile($_REQUEST["cat"]) . "` SET nbacces='$download' WHERE `id`='" . de_hyphen($_REQUEST["pic"]) . "'";
  29      $id = mysql_db_query($mydbase, $query) or exit ($lang_string_error_cantquery);
  30      
  31      print "</body>\n";
  32      print "</html>\n";
  33  ?>


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