<?php
session_start();
if(!$_session=$myusername){
header("location:index.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome User</title>
<link href="css/layout.css" rel="stylesheet" type="text/css" />
<link href="css/forms.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrap">
<?php
date_default_timezone_set ("Asia/Dhaka");
$date=date("d-M-y");
?>
<div id="content" align="center">
<div id="home_main"><div id="search">
<div class="tab">
<h2>CURRENT ACCOUNTS LIST</h2>
</div>
<div class="container">
<br>
<table width="450" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form name="form1" method="post" action="<?php print $_SERVER['PHP_SELF'] ?>">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr><td width="350"><b>Select Area</td>
<td width="6">:</td>
<td width="150"><select name="pcatagory">
<option selected value="">Select Area</option>
<option value="R0069">AREA01
<option value="R0124">AREA02
<option value="R0164">AREA03
<option value="R0364">AREA04</option>
</select></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td><input type="submit" name="submit" value="Check Account Detail"></td><td></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<?php
$pccat=$_POST['pcatagory'];
if($_POST['pcatagory']!="")
{
$_SESSION['pcatagory']=$pccat;
$barea=$_SESSION['pcatagory'];
}
else
{
$barea=$_SESSION['pcatagory'];
}
error_reporting(E_ALL ^ E_NOTICE);
print "<br>";
if($barea=="R0069")
{
$billarea="AREA01";
}
if($barea=="R0124")
{
$billarea="AREA02";
}
if($barea=="R0164")
{
$billarea="AREA03";
}
if($barea=="R0364")
{
$billarea="AREA04";
}
if($barea)
{
Print "<b>Customer Area : <font color=\"red\">". $billarea."</font></b>";
print "<br>";
$username = 'dbuser';
$password = 'dbpassword';
$ora_host='(DESCRIPTION =(ADDRESS =(PROTOCOL = TCP)(HOST = 102.102.1.1)(PORT = 1521))(CONNECT_DATA =(SID = dbname)))';
$objConnect = ocilogon($username, $password, $ora_host);
$strSQL = "select FL.ACCOUNTNUMBER, FL.CUSTNAME, FL.ENTRY_DATE DATE,
from table_name where FL.AREAID = '$barea' ";
$objParse = oci_parse ($objConnect, $strSQL);
oci_execute ($objParse,OCI_DEFAULT);
$Num_Rows = oci_fetch_all($objParse, $Result);
$Per_Page = 7; // Per Page
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page)
{
$Num_Pages =1;
}
else if(($Num_Rows % $Per_Page)==0)
{
$Num_Pages =($Num_Rows/$Per_Page) ;
}
else
{
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
}
$Page_End = $Per_Page * $Page;
if ($Page_End > $Num_Rows)
{
$Page_End = $Num_Rows;
}
print "<br>";
print "<table border=\"1\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\" >";
print "<tr border=\"1\">";
print "<td valign=\"top\" style=\"border:1px solid black\" width=\"150\"><p align=\"center\"><b>ACCOUNT NUMBER</td>";
print "<td valign=\"top\" style=\"border:1px solid black\" width=\"150\"><p align=\"center\"><b>CUSTOMER NAME</td>";
print "<td valign=\"top\" style=\"border:1px solid black\" width=\"150\"><p align=\"center\"><b>DATE</td>";
print "</tr>";
for($i=$Page_Start;$i<$Page_End;$i++)
{
?>
<tr border=\"1\">
<td valign="top" style="border:1px solid black"><font color="black"><?php print $Result["ACCOUNTNUMBER"][$i];?></td>
<td valign="top" style="border:1px solid black"><font color="black"><?php print $Result["PACKAGENAME"][$i];?></td>
<td valign="top" style="border:1px solid black"><font color="black"><?php print $Result["DATE"][$i];?></td>
<?php
$ac_num=$Result["ACCOUNTNUMBER"][$i];
print "<td width=\"30\"><form action=\"prevfup.php\" method=\"POST\">";
print "<input type=\"hidden\" name=\"ac_no\" value=\"$ac_num\">";
print "<input type=\"image\" id=\"enter\" name=\"submit: width=\"30\" height=\"15\" src=\"prev.jpg\">";
?>
</tr>
</form>
<?
}
?>
</table>
<center><table align="center" style="width:50%; ">
<font size=2><b>
Total <?= $Num_Rows;?> Record : <?=$Num_Pages;?> Page :
<?
if($Prev_Page)
{
echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'><< Back</a> ";
}
for($i=1; $i<=$Num_Pages; $i++){
if($i != $Page)
{
echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i'>$i</a> ]";
}
else
{
echo "<b> $i </b>";
}
}
if($Page!=$Num_Pages)
{
echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'>Next>></a> ";
}
oci_close($objConnect);
}
?>
</p>
</table></center>
</b></font>
</center>
</div>
</div></div>
<div class="clear"> </div>
</div>
</div>
</body>
</html>
Server side coding,ASP,ActiveVFP,CSP,Server-Side ANSI C, ColdFusion, CGI, Erlang with Linux, Yaws, Mnesia, Erlang, Grails (framework) Java, Perl, PHP, Python, e.g. Django (web framework), Real Studio Web Edition, Ruby, e.g. Ruby on Rails, Smalltalk e.g. Seaside, AIDA/Web, SSJS Server-Side JavaScript, e.g. Aptana Jaxer, Mozilla Rhino, WebDNA,Websphere ,.NET and .NET MVC Frameworks.
Monday, April 29, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment