-
Notifications
You must be signed in to change notification settings - Fork 0
/
RentItem.php
166 lines (134 loc) · 5.83 KB
/
RentItem.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?php include 'header.php';
$searchTemp=get('srch-normal');
$getCompanyTemp=get('CompanyName');
$CategoryNameTemp=get('CategoryName');
$CategoryIDTemp=get('CatID');
?>
<body class="skin-blue">
<!-- header logo: style can be found in header.less -->
<?php include 'nav.php';?>
<!-- Left side column. contains the logo and sidebar -->
<?php include 'menu.php';?>
<!-- Right side column. Contains the navbar and content of the page -->
<aside class="right-side">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
RentItem
<small>RentItem</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">Dashboard</li>
</ol>
</section>
<!-- title row -->
<div class="panel-body">
<div class="dataTable_wrapper">
<div class="row">
<div class="col-xs-12 table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th colspan="12">
<div class="col-md-8">
<a class='iframe' href="RentItem-new.php">
<button style="margin-left:-20px;"type="button" class="btn btn-primary"><i class="fa fa-file-o"></i>New</button>
</a>
</div>
<div class="col-md-4">
<form class="navbar-form" role="search">
<div class=" pull-right" style="margin-top:-8px;">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="srch-normal" id="search.php?dnsname=name&srch-term" <?php echo 'value="'.$searchTemp.'"'?>>
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div><!-- /btn-group -->
</div><!-- /input-group -->
</div><!-- /.col-lg-3 -->
</form>
</div>
</tr>
</thead>
<thead>
<tr style="background-color:#4682B4; color:white;">
<th>No </th>
<th>Item Name</th>
<th>Company</th>
<th>Category</th>
<th>Price</th>
<th>Status</th>
<th>Description</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$db->disconnect();
$db->connect();
// $txtsrch = get('srch-normal');
$_slide1 = $db->query("CALL sp_RentItem_Select_Company('".$searchTemp."','".$getComIDUser."')");
$numrow=$db->dbCountRows($_slide1);
$i = 1;
if($numrow>0)
{
while($row=$db->fetch($_slide1)){
$id=$row->RentItemID;
$ItemName = $row->ItemName;
$CompanyID=$row->CompanyID;
$CompanyName=$row->CompanyName;
$CategoryID=$row->CategoryID;
$CategoryName = $row->CategoryName;
$Price=$row->Price;
$Status=$row->isStatus;
if($Status==1)
$isStatus="Free";
else
$isStatus="Busy";
$Decription = $row->Desciption;
echo'<tr class="gradeA">
<td>'.$i++.'</td>
<td>'.$ItemName.'</td>
<td>'.$CompanyName.'</td>
<td>'.$CategoryName.'</td>
<td>'.$Price.'$</td>
<td>'.$isStatus.'</td>
<td>'.$Decription.'</td>
<td>
<a class="iframe" href="RentItem-Update.php?id='.$id.'&CompanyID='.$CompanyID.'&CompanyName='.$CompanyName.'&ItemName='.$ItemName.'&CategoryID='.$CategoryID.'&CategoryName='.$CategoryName.'&Price='.$Price.'&Status='.$Status.'&Decription='.$Decription.'">
<button class="btn btn-sm btn-primary">
<i class="glyphicon glyphicon-pencil"></i>
Edit
</button>
</a>
</td>
</tr>';
}
}
else
echo'<tr><td colspan="12"><font color =Red>No Record Found.</font></td></tr>';
?>
</tbody>
</table>
</div><!-- /.col -->
</div><!-- /.row -->
<div class="row">
</div>
<script type="text/javascript">
function GetValueCompany(){
var id=document.getElementById("CompanyName").value;
document.getElementById('txtcompanyName').value=id;
}
function GetValueCategory(){
var CategoryName=document.getElementById("Category").value;
document.getElementById('txtCategory').value=CategoryName;
}
function GetCompanyID(){
var id=document.getElementById("CompanyName").value;
return id;
}
</script>
</aside><!-- /.right-side -->
</div><!-- ./wrapper -->
<!-- add new calendar event modal -->
<?php include 'footer.php';?>