Location: PHPKode > projects > PHP OpenTailorShop > phpopentailorshop/customers/manage_address.php
<?php session_start(); ?>

<html>
<head>
<SCRIPT LANGUAGE="Javascript">
<!---
function decision(message, url)
{
  if(confirm(message) )
  {
    location.href = url;
  }
}
// --->
</SCRIPT> 

</head>

<body>
<?php

include ("../settings.php");
include ("../language/$cfg_language");
include ("../classes/db_functions.php");
include ("../classes/security_functions.php");
include ("../classes/display.php");
include ("../classes/form.php");

$lang=new language();
$dbf=new db_functions($cfg_server,$cfg_username,$cfg_password,$cfg_database,$cfg_tableprefix,$cfg_theme,$lang);
$sec=new security_functions($dbf,'Admin',$lang);

if(!$sec->isLoggedIn())
{
	header ("location: ../login.php");
	exit();
}

$display=new display($dbf->conn,$cfg_theme,$cfg_currency_symbol,$lang);
$display->displayTitle("$lang->manageAddress");

$f1=new form('manage_address.php','POST','address','450',$cfg_theme,$lang);
$f1->createInputField("<b>$lang->searchForAddress</b>",'text','search','','24','150');

$option_values2=array('title','salutation','id');
$option_titles2=array("$lang->title","$lang->salutation",'ID');
$f1->createSelectField("<b>$lang->searchBy</b>",'searching_by',$option_values2,$option_titles2,100);


$f1->endForm();


$tableheaders=array("$lang->rowID","$lang->title","$lang->salutation","$lang->updateAddress","$lang->deleteAddress");
$tablefields=array('id','title','salutation');

if(isset($_POST['search']))
{
	$search=$_POST['search'];
	$searching_by =$_POST['searching_by'];
	echo "<center>$lang->searchedForAddress: <b>$search</b> $lang->searchBy <b>$searching_by</b></center>";
	$display->displayManageTable("$cfg_tableprefix",'address',$tableheaders,$tablefields,"$searching_by","$search",'title');
}
else
{
	$display->displayManageTable("$cfg_tableprefix",'address',$tableheaders,$tablefields,'','','title');
}


$dbf->closeDBlink();


?>
</body>
</html>
Return current item: PHP OpenTailorShop