-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustomer-projects.php
More file actions
173 lines (134 loc) · 7.33 KB
/
customer-projects.php
File metadata and controls
173 lines (134 loc) · 7.33 KB
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
167
168
169
170
171
172
173
<?php
require_once ('./config/loader.php');
include './partials/head/head.php';
$customer_id=$_GET['customer_id'];
$sql = "SELECT * FROM `project` WHERE `customer_id`= :customer_id";
$sql_user = "SELECT * FROM `customers` WHERE `id`= '$customer_id'";
$hasproject = $conn->prepare($sql);
$hasproject->bindParam(':customer_id' , $customer_id);
$hasproject->execute();
$data = $hasproject->fetchAll(PDO::FETCH_OBJ);
$row_member = $hasproject->rowCount();
$user_name = $conn->query($sql_user);
$user_name->execute();
$data_name = $user_name->fetch(PDO::FETCH_OBJ);
?>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
<!-- Navbar Start -->
<?php include './partials/navbar/navbar.php'; ?>
<!-- /.navbar End -->
<!-- Main Sidebar Container -->
<?php include './partials/sidebar/sidebar.php'; ?>
<!-- END Main Sidebar Container -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
</div><!-- /.col -->
<div class="col-sm-6">
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">نام مشتری :<?php echo $data_name->name;?></h3>
<h4 class="card-title" style="float: left;">تعداد پروژه های مشتری : <?php echo $row_member;?></h4>
</div>
<!-- /.card-header -->
<div class="card-body">
<div id="example2_wrapper" class="dataTables_wrapper container-fluid dt-bootstrap4">
<div class="row">
<div class="col-sm-12 col-md-6"></div>
<div class="col-sm-12 col-md-6"></div>
</div>
<div class="row">
<div class="col-sm-12">
<table id="example2" class="table table-bordered table-hover dataTable"
role="grid">
<thead>
<tr role="row">
<th class="sorting_asc" tabindex="0" aria-controls="example2"
rowspan="1" colspan="1" aria-sort="ascending"
aria-label="نام پروژه(نام سایت): activate to sort column descending">
نام پروژه(نام سایت)
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1"
colspan="1"
aria-label="هزینه پروژه(تومان): activate to sort column ascending">
هزینه پروژه(تومان)
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1"
colspan="1" aria-label="درصد تکمیلی پروژه: activate to sort column ascending">
درصد تکمیلی پروژه
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1"
colspan="1"
aria-label="نماد اعتماد: activate to sort column ascending">نماد اعتماد
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1"
colspan="1" aria-label="درگاه پرداخت: activate to sort column ascending">
درگاه پرداخت
</th>
</tr>
</thead>
<tbody>
<?php
foreach ($data
as $key => $item){
?>
<tr role="row" class="odd">
<td class="sorting_1"><?php echo $item->name ?></td>
<td><?php echo $item->price ?></td>
<td>%<?php echo $item->project_status?> </td>
<td><?php if($item->enamad == 0){
echo 'اینمادی ثبت نشده';
}else{
echo 'اینماد ثبت شده';
}?></td>
<td><?php if($item->payment == 0){
echo 'درگاهی ثبت نشده';
}else{
echo 'درگاه ثبت شده';
}?></td>
</tr>
</tbody>
<?php
}
?>
</table>
</div>
</div>
</div>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
<!-- /.card -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- ./wrapper -->
<!-- REQUIRED SCRIPTS -->
<!-- jQuery -->
<script src="plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
</body>
</html>