<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="javascript" type="text/javascript">
function UnamePwdValidation()
{
if (document.getElementById("Txt_UserName").value=="")
{
alert("Enter Username");
document.getElementById("Txt_UserName").focus();
return false;
}
if(document.getElementById("Txt_Password").value=="")
{
alert("Enter Password");
document.getElementById("Txt_UserName").focus();
return false;
}
}
function checkIt(evt)
{
evt = (evt) ? evt : window.event
var charCode = (evt.which) ? evt.which : evt.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
{
alert("This field accepts numbers only.");
status = "This field accepts numbers only."
return false
}
status = ""
return true
}
function checkChar(event)
{{
var c= event.keyCode;
var c1 = event.keyCode=(!( (c>=65 && c<=90)||(c>=97 && c<=122)|| (c==32)))?0:event.keyCode;
if (c1==false)
{
alert("This field accepts Characters only.");
status = "This field accepts Characters only."
return false
}
status = ""
return true
}
}
</script>
<script type="text/javascript">
<!--
var adOpenDynamic = 2;
var adLockOptimistic = 3;
var strDbPath = "E:\\master1.mdb";
/*
Here is the ConnectionString for Microsoft Access.
If you want to use SQL or other databases, you hav to change the connection string..
eg: SQL => var conn_str = "Provider=sqloledb; Data Source=itdev; Initial Catalog=pubs; User ID=sa;Password=yourpassword";
*/
var conn_str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strDbPath;
function getAdoDb(strAdoType)
{
if (window.ActiveXObject)
{
return new ActiveXObject(strAdoType);
}
else
{
return ActiveXObject(strAdoType);
}
}
function showReports()
{
try
{
var strHtml ="";
strHtml += "<table cellpadding=0 cellspacing=0 border=1 width= '100%' align=center>";
strHtml += "<tr ><td align=center colspan=4><b>Insurance items</b></td></tr>";
//Database Connection
var conn = getAdoDb("ADODB.Connection");
conn.open(conn_str, "", "");
var val2=document.getElementById('txt2').value;
var val3=document.getElementById('txt3').value;
var val4=document.getElementById('txt4').value;
var val5=document.getElementById('txt5').value;
//Recordset
var rs = new ActiveXObject("ADODB.Recordset");
//strQuery = "insert into xxx values (12,'csdfcsd')";
strQuery ="insert into customer values ("+ document.getElementById('txt1').value +",'"+val2+"','"+val3+"','"+val4+"','"+val5+"',"+ document.getElementById('txt6').value +","+ document.getElementById('txt7').value +")";
rs.open(strQuery, conn, adOpenDynamic, adLockOptimistic);
if(!rs.bof)
{
rs.MoveFirst();
while(!rs.eof)
{
strHtml += "<tr>";
strHtml += " <td><Font face ='tahoma'>" + rs.fields(0).value + "</font></td>";
strHtml += " <td><Font face ='tahoma'>" + rs.fields(1).value + "</font></td>";
strHtml += " <td><Font face ='tahoma'>" + rs.fields(2).value + "</font></td>";
strHtml += " <td><Font face ='tahoma'>" + rs.fields(3).value + "</font></td>";
strHtml += " <td><Font face ='tahoma'>" + rs.fields(4).value + "</font></td>";
strHtml += " <td><Font face ='tahoma'>" + rs.fields(5).value + "</font></td>";
strHtml += " <td><Font face ='tahoma'>" + rs.fields(6).value + "</font></td>";
strHtml += "</tr>";
rs.MoveNext();
}
}
else
{
//No Records.
strHtml += "<tr colspan=4><td align=center><font color=red>No Records.</font></td></tr>";
}
conn.close();
strHtml += "</table>";
document.write(strHtml);
}
catch(ex)
{
alert(ex.message);
}
}
//-->
</script>
<title>:: HOME ::</title>
<style type="text/css">
.tabcel1
{
width:30%;
text-align:center;
}
.tabcel2
{
width:70%;
}
.tdbg
{
background-color:#fdc13d;
font-weight:bold;
}
</style>
</head>
<body>
<!--#ffb614-->
<table style="margin-top:5%;background-color:#f0e3c7; height:600;" cellpadding="5" cellspacing="0" width="800" border="0" align="center">
<tr style="background-color:#ffb614">
<td colspan="2">
<br />
</td>
</tr>
<tr style="background-color:#ffb614">
<td colspan="2" align="center" style="font-weight:bold;font-size:larger"> OUTLET SYSTEM MANAGEMENT
</td>
</tr>
<tr style="background-color:#ffb614">
<td colspan="2">
<br />
</td>
</tr>
<tr>
<td class="tdbg" align="center">
</td>
<td class="tabcel2" rowspan="16">
<form id="form1" method="post" action="../new-data/vendor.html">
<div>
<table border="0" width="90%" align="center">
<tr><H2>ADD VENDOR DETAILS </H2>
<td width="40%" style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana">
VENDOR CODE
</td>
<td width="60%">
<input type="text" ID="txt1" onKeyPress="return checkIt()" />
</td>
</tr>
<tr>
<td style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana">
VENDOR NAME
</td>
<td>
<input type="text" ID="txt2" onKeyPress="return checkChar(event)"/>
</td>
</tr>
<tr>
<td style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana">
VENDOR PLACE
</td>
<td>
<input type="text" ID="txt3" onKeyPress="return checkChar(event)"/>
</td>
</tr>
<tr>
<td style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana">
VENDOR DISTRICT
</td>
<td>
<input type="text" ID="txt4" onKeyPress="return checkChar(event)"/>
</td>
</tr>
<tr>
<td style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana">
VENDOR STATE
</td>
<td>
<input type="text" ID="txt5" onKeyPress="return checkChar(event)" />
</td>
</tr>
<tr>
<td style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana">
VENDOR PINCODE
</td>
<td>
<input type="text" ID="txt6" onKeyPress="return checkIt()" />
</td>
</tr>
<tr>
<td style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana">
VENDOR PHONE_NUMBER
</td>
<td>
<input type="text" ID="txt7" onKeyPress="return checkIt()" />
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="submit" onclick="showReports();">
</td>
</tr>
</table>
</div>
</form>
</td>
</tr>
<tr>
<td class="tdbg" align="left">
<a href="../new-data/arrivals.htm">
New Arrivals </a> </td>
</tr>
<tr>
<td class="tdbg" align="left">
<a href="../new-data/purchase.html">
Purchase </a> </td>
</tr>
<tr>
<td class="tdbg" align="left">
<a href="../new-data/vendor.html">
Vendors </a> </td>
</tr>
<tr>
<td class="tdbg" align="left">
<a href="../new-data/sale.html">
Sales </a> </td>
</tr>
<tr>
<td class="tdbg" align="left">
<a href="../new-data/cust.html">
Customers </a> </td>
</tr>
<tr>
<td class="tdbg" align="left">
<a href="../new-data/insertarrivals.htm">
Insert new arrivals details </a> </td>
</tr>
<tr>
<td class="tdbg" align="left">
<a href="../new-data/insertcust.html">
Insert customer details </a> </td>
</tr>
<tr>
<td class="tdbg" align="left">
<a href="../new-data/insertpurchase.html">
Insert purchase details </a> </td>
</tr>
<tr>
<td class="tdbg" align="left">
<a href="../new-data/insertsale.html">
Insert sales details </a> </td>
</tr>
<tr>
<td class="tdbg" align="left">
<a href="../new-data/insertvendor.html">
Insert vendor details</a> </td>
</tr>
<tr>
<td class="tdbg" align="left">
<a href="../new-data/loginpage.html">
Close</a> </td></tr>
<tr>
<td class="tdbg" align="center"><br /></td>
</tr>
<tr>
<td class="tdbg" align="center"><br /></td>
</tr>
<tr>
<td class="tdbg" align="center"><br /></td>
</tr>
<tr>
<td class="tdbg" align="center"><br /></td>
</tr>
<tr>
<td colspan="2" style="background-color:#ffb614">
<br />
</td>
</tr>
</table>
</body>
</html>
No comments:
Post a Comment