Location: PHPKode > projects > lcdata > lcdata-0.0.1/frontend-web/index.php3
<?
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");   // always modified
header("Cache-Control: no-cache, must-revalidate");              // HTTP/1.1
header("Pragma: no-cache");                                      // HTTP/1.0



include 'includes/funktions.php';   
$sql="host=$host user=open password=sesame port=5432 dbname=gnu_pps";
$conn = pg_connect($sql);
if (!$conn) {
  echo "Fatal Error : can't connect to database.\n";
  exit;
}  


if ( (!(empty($id))) && (!(empty($key))) ){
  if ($conn) $result = SQL_exec ($conn, "DELETE from users WHERE us_id=$id AND us_key=$key");
}
$id = "";
 
$sql="SELECT * FROM var";
$result = SQL_exec($conn,$sql);
$data = pg_fetch_object ($result, 0); 
$id=$data->current_id+1;
$sql="UPDATE var set current_id=$id";
$result = SQL_exec($conn,$sql);  


setmycookie( "id", $id,2000000000,"/");
if (empty($user)){
 $user="";
}
echo "<html>\n<head>";


print "<script language=\"JavaScript\">\n";
print "<!--\n";
print "function CheckInput()";
print "{";
print "  document.forms[0].elements[2].value = \"yes\";\n";
print "  return true";
print "}";
print "\n//-->";
print "</script>\n";


print "\n</head>\n<body bgcolor=\"#ffffff\">\n";
echo "  <form action=\"enterdb.php3?bid=$id\" Method=\"POST\" onSubmit=\"return CheckInput();\">\n";
echo "\t<center><br><br>\n";
echo "\t<h2>Welcome to Lihas-CRM-Pro</h2>\n";
echo "\t<h3>Please connect to DB</h3><br><br>\n";
echo "\t<table border=0>\n";
echo "\t<tr><td width=100><b>User-Name</b></td><td><b><input type=text name=\"user\" value=\"$user\" size=35 maxlength=35></b></td></tr>\n";
echo "\t<tr><td width=100><b>Password</b></td><td><b><input type=password name=\"password\" value=\"\" size=35 maxlength=35>\n";
print "<input type=\"hidden\" name=\"javascript\" value=\"n\"></b></td></tr>\n";

echo "\t<tr><td></td><td><input type=IMAGE src=\"gfx/en/enter.gif\" border=0></td></tr>\n";
// echo "\t<tr><td><br><br> guestlogin = guest<br> password = guest</td></tr>";
echo "\t</table>\n";
echo "\t</center>\n";
echo "  </form>\n</body>\n";
echo "</html>\n";

?>

Return current item: lcdata