Sie sind auf Seite 1von 50

ADDCONTAINER.

PHP
<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("integratedshipmentmanagement",$con);?>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" >
<title>Add Item</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" method="POST" enctype="multipart/form-data" >
<DIV>
<?php include("header.php");?>
<table style="width:1000px; margin-left:auto; margin-right:auto;">
<tr>
<td valign="top" align="left">
<?php include("adminleftmenu.php");?></td>
<td colspan="5" style="height: 350px;" valign="top" width="900" align="center">
<table class="tableclass">
<tr>
<td colspan="2" style="height: 21px" align="center">
<hr color="#073a71" width="400" />
<h1 Class="myheader">CONTAINER DETAILS</h1>
<hr color="#073a71" width="400" />
</td>
</tr>
<tr>
<td style="width: 193px; height: 21px" align="right">Select Type
</td>
<td style="width: 178px; height: 21px">
<select id="dbtype" name="dbtype">
<option>Select</option>
<option>Ship</option>
<option>Air</option>
<option>Cargo(Lorry)</option>
</select>
</td>
</tr>

<tr>
<td style="width: 193px; height: 21px;" align="right" >Container No.</td>
<td style="width: 178px; height: 21px;" >
<input type="text" ID="TextBox2" name="TextBox2" Width="176px"
MaxLength="50"/></td>
</tr>
<tr>
<td align="right" style="width: 193px; height: 21px">Capacity in Ton</td>
<td style="width: 178px; height: 21px">
<input type="text" ID="TextBox3" name="TextBox3" MaxLength="50"
Width="176px"/></td>
</tr>
<tr>
<td style="width: 178px" align="center" colspan="2" >
<input type="submit" ID="Button1Save" name="Button1Save" value="Save" FontBold="True" Font-Italic="False" /></td>
</tr>
<tr>

<td align="center" colspan="2" style="height: 26px">

<?php
if(isset($_POST['Button1Save']))
{
$sql="insert into Containers (ShipmentType,ContainerNo,CapacityinTon,BalanceinKG)
Values('$_POST[dbtype]','$_POST[TextBox2]','$_POST[TextBox3]',".($_POST["TextBox3"]*1000).")";
mysql_query($sql);
mysql_close($con);
echo "Container Details Saved.";
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</DIV>
</form>
</body>
</html>

APPROVECUSTOMER.PHP
<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("integratedshipmentmanagement",$con);?>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" >
<title>Add Item</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" method="POST" enctype="multipart/form-data" >
<DIV>
<?php include("header.php");?>
<table style="width:1000px; margin-left:auto; margin-right:auto;">
<tr>
<td valign="top" align="left">
<?php include("adminleftmenu.php");?></td>
<td colspan="5" style="height: 350px;" valign="top" width="900" align="center">
<table class="tableclass">
<tr>
<td colspan="2" style="height: 21px" align="center">
<hr color="#073a71" width="400" />
<h1 Class="myheader">APPROVE CUSTOMER</h1>
<hr color="#073a71" width="400" />
</td>
</tr>
<tr>
<td style="width: 193px; height: 21px" align="right">Select Customer
</td>
<td style="width: 178px; height: 21px">
<select ID="ddlCustomerID" name="ddlCustomerID" Width="152px" >
<option value="select">Select</option>
<?php $sql="Select CustomerId,ContactPerson,CompanyName From Customers";
$rs= mysql_query($sql,$con);
while($row = mysql_fetch_array($rs))
{
?>
<option value="<?php echo $row["CustomerId"]; ?>"><?php echo $row["CustomerId"].":".
$row["ContactPerson"].":".$row["CompanyName"];?></option>
<?php
}

?></select>
</td>
</tr>
<tr>
<td style="width: 193px; height: 21px;" align="right" >Type:</td>
<td style="width: 178px; height: 21px;" >
<select id="dbtype" name="dbtype">
<option>Select</option>
<option value="0" >Approve</option>
<option value="1">Approval Pending</option>
<option value="2">Reject</option>
</select></td>
<tr>
<td style="width: 178px" align="center" colspan="2" >
<input type="submit" ID="Button1Save" name="Button1Save" value="Save" FontBold="True" Font-Italic="False" /></td>
</tr>
<tr>
<td align="center" colspan="2" style="height: 26px">
<?php
if(isset($_POST['Button1Save']))
{
if($_POST['dbtype']==0)
{
$sql="Update Customers Set Approved='A' Where CustomerId=".$_POST['ddlCustomerID'];
}
else if($_POST['dbtype']==1)
{
$sql="Update Customers Set Approved='P' Where CustomerId=".
$_POST['ddlCustomerID'];
}
else if($_POST['dbtype']==2)
{

$sql="Update Customers Set Approved='R' Where CustomerId=".


$_POST['ddlCustomerID'];
}
mysql_query($sql);
mysql_close($con);
echo "Status Applied.";
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</DIV>
</form>
</body>
</html>

VIEWCONTAINERS.PHP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
<form id="form1" method="post">
<?php
$con = mysql_connect("localhost","root",'');
mysql_select_db("integratedshipmentmanagement", $con);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
//echo "<html>
echo "<head><link rel='stylesheet' type='text/css' href='StyleSheet.css'></link></head><body>";
include('header.php');
echo "<center>";
echo " <table style='width:1000px; margin-left:auto; margin-right:auto;'>";
echo "
<tr><td>";
include('adminleftmenu.php');
echo "</td>";
echo "<td valign='top' align='center'>";
echo "<h1 align=center>CONTAINERS LOAD DETAILS</h1>";
$sql="Select A.ContainerNo,A.ShipmentNo,B.GoodsTitle,B.WeightsinKG From Bills
A,Shipments B Where A.ShipmentNo=B.SNo and A.ShipmentNo in (Select ShipmentSNo From
UploadingStage Where ShipmentSNo not in (Select ShipmentSNo From IntermediateStage)) Group By
A.ContainerNo,A.ShipmentNo,B.GoodsTitle,B.WeightsinKG";
$rs= mysql_query($sql,$con);
echo "<table width=75% cellpadding='1' cellspacing='0' border='1'>";

echo
"<tr><th>ContainerNo</th><th>ShipmentNo</th><th>GoodsTitle</th><th>WeightsinKG</th></tr>";
while($row = mysql_fetch_array($rs))
{
echo "<tr>
<td> " . $row['ContainerNo']. "</td>
<td> " . $row['ShipmentNo']. "</td>
<td> " . $row['GoodsTitle']. "</td>
<td> " . $row['WeightsinKG']. "</td>

</tr>";
}
echo "</table></td></tr></table></center></body></html>";
mysql_close($con);
?>
</form>
</body>
</html>

VIEWCUSTOMERS.PHP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body><?php
$con = mysql_connect("localhost","root",'');
mysql_select_db("integratedshipmentmanagement", $con);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$sql="select * from customers ";
$rs= mysql_query($sql,$con);
//echo "<html>
echo "<head><link rel='stylesheet' type='text/css' href='StyleSheet.css'></link></head><body>";
include('header.php');
echo "<center>";
echo " <table style='width:1000px; margin-left:auto; margin-right:auto;'>";
echo "
<tr><td>";
include('adminleftmenu.php');
echo "</td>";
echo "<td valign='top' align='center'>";
echo "<h1 align=center>CUSTOMERS LIST</h1>";
echo "<table width=75% cellpadding='1' cellspacing='0' border='1'>";
echo
"<tr><th>CustomerID</th><th>EntryDate</th><th>CompanySize</th><th>CompanyName</th><th>C
ontactPerson</th><th>BillingAddress</th><th>ContactPhone</th><th>MailID</th><th>downPhone</t
h><th>GoodUnloadingAddress</th><th>Approved</th><th></th></tr>";
while($row = mysql_fetch_array($rs))
{
echo "<tr>

<td> " . $row['CustomerID']. "</td>


<td> " . $row['EntryDate']. "</td>
<td> " . $row['CompanySize']. "</td>
<td> " . $row['CompanyName']. "</td>
<td> " . $row['ContactPerson']. "</td>
<td> " . $row['BillingAddress']. "</td>
<td> " . $row['ContactPhone']. "</td>
<td> " . $row['MailID']. "</td>
<td> " . $row['downPhone']. "</td>
<td> " . $row['GoodUnloadingAddress']. "</td>
<td> " . $row['Approved']. "</td>
<td style='border:0px;'><a href='del.php?id=".$row['CustomerID']."'>Delete</a></td>

</tr>";
}
echo "</table></td></tr></table></center></body></html>";
mysql_close($con);
?>
</body>
</html>

Das könnte Ihnen auch gefallen