<?php
session_cache_limiter('public');
session_start();
//ini_set("session.gc_maxlifetime", "18000");
//echo ini_get("session.gc_maxlifetime");
if (!session_is_registered("userid"))
{
echo "<font size=\"3\" color=\"#FF0000\"><font class=\"txt3\">
<span style=\"font-weight: 400\"> Access Denied.......!!!</span></font></font></span><p align=\"center\">
<span style=\"letter-spacing: 1pt\"><font color=\"#2E4B8C\">Please
Try From Login.....................................</font>";
exit;
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>:: Government Lady Reading Hospital ::</title>
<style type="text/css">
<!--
.txt
{
font-size:11;
font-weight:500;
}
.txt1
{
font-size:10;
}
.txt2
{
font-size:9;
}
.txt3
{
font-size:18;
font-weight:500;
}
.txt4
{
font-size:12;
}
.txt5
{
font-size:11;
font-weight:600;
}
a { text-decoration:none; }
a:hover { text-decoration:underline; }
.input
{
border-color: #003E5D;
border-width: 1px;
border-style: solid;
background: #C9C8C8;
color: #000000;
width: 170px;
}
.style1 {color: #000000}
-->
</style>
<script Language = "javascript">
function frmVerify()
{
if (document.form1.pid.value=="")
{
alert ("Please Enter Value For The Patient ID ");
document.form1.pid.focus();
return (false);
}
if (document.form1.pid.value!="")
{
if (isNaN(document.form1.pid.value))
{
alert ("Please Enter Integer Value For The Patient ID ");
document.form1.pid.focus();
return (false);
}
}
if (document.form1.pname.value=="")
{
alert ("Please Enter Value For The Patient Name ");
document.form1.pname.focus();
return (false);
}
if (document.form1.pname.value!="")
{
if (!isNaN(document.form1.pname.value))
{
alert ("Please Enter Character Value For The Patient Name ");
document.form1.pname.focus();
return (false);
}
}
if (document.form1.fhname.value=="")
{
alert ("Please Enter Value For The Patient Father/Husband Name ");
document.form1.fhname.focus();
return (false);
}
if (document.form1.fhname.value!="")
{
if (!isNaN(document.form1.fhname.value))
{
alert ("Please Enter Character Value For The Patient Father/Husband Name ");
document.form1.fhname.focus();
return (false);
}
}
if (document.form1.relg.value=="")
{
alert ("Please Enter Value For The Relegion Field!");
document.form1.relg.focus();
return (false);
}
if (document.form1.relg.value!="")
{
if (!isNaN(document.form1.relg.value))
{
alert ("Please Enter Character Values For Relegion Field!");
document.form1.relg.focus();
return (false);
}
}
if (document.form1.gender.options[0].selected)
{
alert ("Please Select One Of The \"Options\" From Gender!");
document.form1.gender.focus();
return (false);
}
if (document.form1.nationality.value=="")
{
alert ("Please Enter Value For The Nationality Field!");
document.form1.nationality.focus();
return (false);
}
if (document.form1.nationality.value!="")
{
if (!isNaN(document.form1.nationality.value))
{
alert ("Please Enter Nationality In Character Values!");
document.form1.nationality.focus();
return (false);
}
}
if (document.form1.dd.value=="")
{
alert ("Please Enter Value For The Day In Date Of Birth Field!");
document.form1.dd.focus();
return (false);
}
if (document.form1.dd.value!="")
{
if (isNaN(document.form1.dd.value))
{
alert ("Please Enter Date Day In Integer Values!");
document.form1.dd.focus();
return (false);
}
}
if (document.form1.mm.value=="")
{
alert ("Please Enter Value For The Month In Date Of Birth Field!");
document.form1.mm.focus();
return (false);
}
if (document.form1.mm.value!="")
{
if (isNaN(document.form1.mm.value))
{
alert ("Please Enter Date Month In Integer Values!");
document.form1.mm.focus();
return (false);
}
}
if (document.form1.yyyy.value=="")
{
alert ("Please Enter Value For The Year In Date Of Birth Field!");
document.form1.yyyy.focus();
return (false);
}
if (document.form1.yyyy.value!="")
{
if (isNaN(document.form1.yyyy.value))
{
alert ("Please Enter Date Year In Integer Values!");
document.form1.yyyy.focus();
return (false);
}
}
if (document.form1.purpose.options[0].selected)
{
alert ("Please Select One Of The \"Options\" From Purpose!");
document.form1.purpose.focus();
return (false);
}
if (document.form1.nic1.value=="")
{
alert ("Please Enter Value For The NIC First Field!");
document.form1.nic1.focus();
return (false);
}
if (document.form1.nic1.value!="")
{
if (isNaN(document.form1.nic1.value))
{
alert ("Please Enter NIC First Field In Integer!");
document.form1.nic1.focus();
return (false);
}
}
if (document.form1.nic2.value=="")
{
alert ("Please Enter Value For The NIC 2nd Field!");
document.form1.nic2.focus();
return (false);
}
if (document.form1.nic2.value!="")
{
if (isNaN(document.form1.nic2.value))
{
alert ("Please Enter NIC 2nd Field In Integer!");
document.form1.nic2.focus();
return (false);
}
}
if (document.form1.nic3.value=="")
{
alert ("Please Enter Value For The NIC 3rd Field!");
document.form1.nic3.focus();
return (false);
}
if (document.form1.nic3.value!="")
{
if (isNaN(document.form1.nic3.value))
{
alert ("Please Enter NIC 3rd Field In Integer!");
document.form1.nic3.focus();
return (false);
}
}
if (document.form1.fromdept.options[0].selected)
{
alert ("Please Select One Of The \"Options\" From Department!");
document.form1.fromdept.focus();
return (false);
}
if (document.form1.roomno.options[0].selected)
{
alert ("Please Select One Of The \"Options\" From Private Room!");
document.form1.roomno.focus();
return (false);
}
if (document.form1.dept.options[0].selected)
{
alert ("Please Select One Of The \"Options\" From Department!");
document.form1.dept.focus();
return (false);
}
if (document.form1.padd.value=="")
{
alert ("Please Enter Value For The Permanent Adress!");
document.form1.padd.focus();
return (false);
}
if (document.form1.tadd.value=="")
{
alert ("Please Enter Value For The Temporary Adress!");
document.form1.tadd.focus();
return (false);
}
}
function frmFieldSelcet()
{
document.form1.pid.focus();
return (false);
}
</script>
<?php
$con = mysql_connect("localhost","root","1234");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("lrh", $con);
$sql="select dept_name from department ";
$sql_result = mysql_query($sql,$con ) or die ("Could not execute query!");
$sqla="select room_no from viprooms where catagery = 'bolton block' and status = 'empty'";
$sql_resulta = mysql_query($sqla,$con ) or die ("Could not execute query!");
?>
</head>
<body bgcolor="white" leftmargin="0" rightmargin="0" bottommargin="0" topmargin="0" link="#FFFFFF" alink="#FFFFFF" vlink="#FFFFFF" onLoad= "return frmFieldSelcet()" background="images/back01.gif">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="779" bgcolor="#FFFFFF">
<tr>
<td width="779" height="155" background="images/top.jpg" style="background-repeat: no-repeat" valign="top" colspan="3"> </td>
</tr>
<tr>
<td width="779" height="26" background="images/bg1.gi