forked from monika-gautam/Bill-App-Latest-version
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up entire code by removing vertical whitespaces (carriage returns) and applied proper indentation.
- Loading branch information
1 parent
c9af59a
commit bc3900c
Showing
15 changed files
with
806 additions
and
1,411 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,75 @@ | ||
<? session_start(); ?><html> | ||
<head> | ||
<title> Bill Claim - Recors Status </title> | ||
|
||
</head> | ||
<body bgcolor="LightGray"> | ||
<form name="myForm" method="post"> | ||
|
||
<?php | ||
$dbhandle = mysqli_connect("localhost", "root", "123456","cabBills") | ||
or die("Unable to connect to MySQL"); | ||
if(isset($_SESSION['id'])){ | ||
// $brdtm = $_POST['brdtm']; | ||
//$amt = $_POST['amt']; | ||
$date = $_POST['date']; | ||
//$sql="delete from temp_collectdata where brdtm='".$brdtm."' and amt=".$amt." and date='".$date."'"; | ||
$sql="delete from temp_collectdata where date='".$date."'"; | ||
$result= mysqli_query($dbhandle,$sql); | ||
|
||
$sql1 = "SELECT * from temp_collectdata "; | ||
|
||
$result1 = mysqli_query( $dbhandle, $sql1); | ||
|
||
|
||
|
||
?> | ||
<br> | ||
|
||
<center> <div style ='font:16px Tahoma;color:Red'><b>Details regarding Date -<font color="blue">"<? echo $date ?>"</font> is permanently removed from the list. </b></div> | ||
<br> | ||
|
||
<center> | ||
|
||
<table cellspacing="2" cellpadding="2" border="1"> | ||
|
||
<tr> | ||
|
||
<th align="right" bgcolor="PeachPuff"><center>Date</center></th> | ||
|
||
<th bgcolor="PeachPuff">Board Time</th> | ||
<th bgcolor="PeachPuff"><center>Amount</center></th> | ||
<th align="right" bgcolor="PeachPuff"><center>Rate</center></th> | ||
<th align="right" bgcolor="PeachPuff"> <center> </center></th> | ||
<th align="right" bgcolor="PeachPuff"> <center> </center></th> | ||
|
||
</tr> | ||
|
||
<? | ||
$i=1; | ||
while ($row = mysqli_fetch_array($result1,MYSQLI_NUM)) | ||
{ | ||
$date = "date".$i; | ||
$brdtm="brdtm".$i; | ||
$amt = "amt".$i; | ||
$rate = "rate".$i; | ||
$update = "update".$i; | ||
$del = "del".$i; | ||
|
||
|
||
<? session_start(); ?> | ||
<html> | ||
<head> | ||
<title> Bill Claim - Recors Status </title> | ||
</head> | ||
<body bgcolor="LightGray"> | ||
<form name="myForm" method="post"> | ||
<?php | ||
$dbhandle = mysqli_connect("localhost", "root", "mysql","cabBills") | ||
or die("Unable to connect to MySQL"); | ||
if(isset($_SESSION['id'])){ | ||
// $brdtm = $_POST['brdtm']; | ||
//$amt = $_POST['amt']; | ||
$date = $_POST['date']; | ||
//$sql="delete from temp_collectdata where brdtm='".$brdtm."' and amt=".$amt." and date='".$date."'"; | ||
$sql="delete from temp_collectdata where date='".$date."'"; | ||
$result= mysqli_query($dbhandle,$sql); | ||
$sql1 = "SELECT * from temp_collectdata "; | ||
$result1 = mysqli_query( $dbhandle, $sql1); | ||
?> | ||
<br> | ||
<center> <div style ='font:16px Tahoma;color:Red'><b>Details regarding Date -<font color="blue">"<? echo $date ?>"</font> is permanently removed from the list. </b></div> | ||
<br> | ||
<center> | ||
<table cellspacing="2" cellpadding="2" border="1"> | ||
<tr> | ||
<th align="right" bgcolor="PeachPuff"><center>Date</center></th> | ||
<th bgcolor="PeachPuff">Board Time</th> | ||
<th bgcolor="PeachPuff"><center>Amount</center></th> | ||
<th align="right" bgcolor="PeachPuff"><center>Rate</center></th> | ||
<th align="right" bgcolor="PeachPuff"> <center> </center></th> | ||
<th align="right" bgcolor="PeachPuff"> <center> </center></th> | ||
</tr> | ||
<? | ||
$i=1; | ||
while ($row = mysqli_fetch_array($result1,MYSQLI_NUM)) | ||
{ | ||
$date = "date".$i; | ||
$brdtm="brdtm".$i; | ||
$amt = "amt".$i; | ||
$rate = "rate".$i; | ||
$update = "update".$i; | ||
$del = "del".$i; | ||
?> | ||
<tr> | ||
<td> <center><input type="text" style="border: 0;" value="<? echo $row{0} ?>" id="<? echo $date ?>" size="10" readonly></center></th> | ||
<td><center><input type="text" style="border: 0;" value="<? echo $row{1} ?>" id="<? echo $brdtm ?>" size="10" readonly></center></th> | ||
<td><center><input type="text" style="border: 0;" value="<? echo $row{2} ?>" id="<? echo $amt ?>" size="4" ></center></th> | ||
<td><center><input type="text" style="border: 0;" value="<? echo $row{3} ?>" id="<? echo $rate ?>" size="3" readonly></center></th> | ||
<td><center><input type="button" id='<? echo $update ?>' style="background-color: PaleGreen;" onMouseOver="this.style.backgroundColor='Red'" onMouseOut="this.style.backgroundColor='PaleGreen'" value="UPDATE" onClick="update()"></center></td> | ||
<? | ||
if($i%2!=0){ | ||
?> | ||
<td rowspan="2"><center><input type="button" id='<? echo $del ?>' style="background-color: PaleGreen;" onMouseOver="this.style.backgroundColor='Red'" onMouseOut="this.style.backgroundColor='PaleGreen'" value="DELETE" onClick="remove()"></center></td> | ||
<? | ||
} | ||
?> | ||
|
||
<tr> | ||
<td> <center><input type="text" style="border: 0;" value="<? echo $row{0} ?>" id="<? echo $date ?>" size="10" readonly></center></th> | ||
|
||
<td><center><input type="text" style="border: 0;" value="<? echo $row{1} ?>" id="<? echo $brdtm ?>" size="10" readonly></center></th> | ||
<td><center><input type="text" style="border: 0;" value="<? echo $row{2} ?>" id="<? echo $amt ?>" size="4" ></center></th> | ||
<td><center><input type="text" style="border: 0;" value="<? echo $row{3} ?>" id="<? echo $rate ?>" size="3" readonly></center></th> | ||
<td><center><input type="button" id='<? echo $update ?>' style="background-color: PaleGreen;" onMouseOver="this.style.backgroundColor='Red'" onMouseOut="this.style.backgroundColor='PaleGreen'" value="UPDATE" onClick="update()"></center></td> | ||
<? | ||
if($i%2!=0){ | ||
?> | ||
<td rowspan="2"><center><input type="button" id='<? echo $del ?>' style="background-color: PaleGreen;" onMouseOver="this.style.backgroundColor='Red'" onMouseOut="this.style.backgroundColor='PaleGreen'" value="DELETE" onClick="remove()"></center></td> | ||
|
||
<? | ||
} | ||
?> | ||
</tr> | ||
|
||
|
||
<? | ||
|
||
$i=$i+1; | ||
</tr> | ||
<? | ||
$i=$i+1; | ||
} | ||
?> | ||
|
||
|
||
</table> | ||
|
||
|
||
</center> | ||
<? | ||
} | ||
else{ | ||
?> | ||
<H1><center><font color="red">Permission Denied !!!</font></center></h1> | ||
<? | ||
} | ||
|
||
?> | ||
</form> | ||
</body> | ||
|
||
</html> | ||
|
||
|
||
|
||
|
||
?> | ||
</table> | ||
</center> | ||
<? | ||
} | ||
else{ | ||
?> | ||
<H1><center><font color="red">Permission Denied !!!</font></center></h1> | ||
<? | ||
} | ||
?> | ||
</form> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,26 +3,20 @@ | |
<title>Bill Claims Management Application</title> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css"> | ||
<script language="javascript"> | ||
|
||
</script> | ||
</head> | ||
<body> | ||
<form class="pure-form pure-form-stacked" name="myForm" method="post"> | ||
|
||
<?php | ||
$dbhandle = mysqli_connect("localhost", "root", "mysql","cabBills") | ||
or die("Unable to connect to MySQL"); | ||
$id = $_POST['id']; | ||
$s1="select distinct id from employee"; | ||
$r1= mysqli_query($dbhandle,$s1); | ||
|
||
$sql="select distinct pmtdt from employee where id='".$id."'"; | ||
$result1= mysqli_query($dbhandle,$sql); | ||
$num=mysqli_num_rows($result1); | ||
|
||
?> | ||
|
||
|
||
<table class="pure-table pure-table-bordered"> | ||
<thead> | ||
<tr> | ||
|
@@ -31,57 +25,38 @@ | |
<select name="id" onchange="sdate()"> | ||
<option selected value="<? echo $id ?>"> <? echo $id ?> </option> | ||
<? | ||
|
||
while ($row11 = mysqli_fetch_array($r1,MYSQLI_NUM)) | ||
{ | ||
?> | ||
|
||
<option value="<? echo $row11{0} ?>"> <? echo $row11{0} ?> </option> | ||
<? | ||
|
||
} | ||
|
||
?> | ||
</select> | ||
</td> | ||
|
||
|
||
</tr> | ||
</thead> | ||
|
||
<tbody> | ||
|
||
<tr> | ||
<th>Bill Submission Date:</th> | ||
|
||
<td> | ||
<select name="dateval"> | ||
<option selected value="none">Choose Date</option> | ||
<? | ||
|
||
while ($row = mysqli_fetch_array($result1,MYSQLI_NUM)) | ||
{ | ||
?> | ||
|
||
<option value="<? echo $row{0} ?>"> <? echo $row{0} ?> </option> | ||
<? | ||
|
||
} | ||
|
||
?> | ||
</select></td> | ||
</tr> | ||
</tbody> | ||
|
||
|
||
|
||
|
||
</table> | ||
<br> | ||
<input type="button" class="pure-button pure-button-primary" value="See History" onClick="myresult()"> | ||
<input type="button" class="pure-button pure-button-primary" value="Back" onClick="home()"/> | ||
|
||
</form> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.