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

title

Body

[close]

/admin/ -> login.php (source)

   1  <?
   2  extract($HTTP_POST_VARS); 
   3  extract($HTTP_GET_VARS); 
   4  extract($HTTP_COOKIE_VARS); 
   5  $adminsect = 1;
   6  include  "../code/settings.php";
   7  if($connected != 1) {
   8  include  "common_db.inc";
   9  error_reporting(0);
  10  $link_id = db_connect();
  11  if(!$link_id) die(sql_error());
  12  if(!mysql_select_db($dbname)) die(sql_error());
  13  $connected = 1;
  14  }
  15  include  "sqlset.php";
  16  
  17  if(file_exists("languages/$language.php")) include "languages/$language.php";
  18  else {
  19  echo "<b>Critical error</b><br>Language file <i>$language</i> could not be found.<p>";
  20  exit;
  21  }
  22  $pagetitle = "$sitetitle $split $txt_login";
  23  $thispagetitle = "$txt_login";
  24  if(file_exists("../code/templates/$template}_h.php") && file_exists("../code/templates/$template}_f.php")) {
  25  $tempfilename = "../code/templates/$template}_h.php";
  26  $handle = fopen($tempfilename, "r");
  27  $temp = fread($handle, filesize ($tempfilename));
  28  fclose($handle);
  29  include  "../code/menucode.php";
  30  include  "../code/parsetemplate.php";
  31  parsetemplate($temp, $menucode, $thispagetitle, $pagetitle);
  32  
  33  echo "$txt_loginpage<br>
  34  <img src=\"../gfx/blank.gif\" width=1 height=6><br>
  35  <table width=200 cellspacing=0 cellpadding=2><tr>
  36  <FORM METHOD=post ACTION=\"logged.php?action=login\">
  37  <td align=right><font class=med>$txt_username:</td><td valign=top><INPUT TYPE=text SIZE=20 NAME=loginname></td></tr>
  38  <tr><td align=right><font class=med>$txt_password:</td><td valign=top><INPUT TYPE=password SIZE=20 NAME=loginpass></td></tr>
  39  <tr><td>&nbsp;</td><td valign=top><INPUT TYPE=submit VALUE=\"$txt_login\"></td></tr>
  40  </FORM></table><p>";
  41  
  42  $tempfilename = "../code/templates/$template}_f.php";
  43  $handle = fopen($tempfilename, "r");
  44  $temp = fread($handle, filesize ($tempfilename));
  45  fclose($handle);
  46  parsetemplate($temp, $menucode, $thispagetitle, $pagetitle);
  47  }
  48  else {
  49  echo "<b>$txt_error</b><br>$txt_tempnofound<p>";
  50  }
  51  ?>


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