-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexecuses.php
186 lines (167 loc) · 11.2 KB
/
execuses.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html>
<head>
<?php require_once('layout/css.php'); ?>
<?php require_once('DBConnection.php'); ?>
<?php require_once('classes/ExecusesClass.php');
$execuse = new ExecusesClass();
?>
<?php require_once('manager/Execuses.php'); ?>
</head>
<body class=" skin-blue sidebar-mini">
<div class=" ">
<?php require_once('layout/header.php'); ?>
<!-- Edit side column. contains the logo and sidebar -->
<?php require_once('layout/sidebar.php'); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
المعاملات
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> الرئيسيه</a></li>
<li class="active">المعاملات</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<?php if (!empty($response_massage)) { ?>
<p class="alert alert-<?php if (str_contains($response_massage, 'Error')) echo 'danger';
else echo 'success'; ?>">
<?php if ($response_massage == 'Done') echo 'تمت العملية بنجاح';
else echo 'خطأ. حدث خطأ اثناء تنفيذ العملية' . "<br/>" . $execuse->message;
if (!str_contains($response_massage, 'Error')) {
echo "<script>document.location='execuses.php';</script>";
}
?>
</p>
<?php } ?>
<!-- Info boxes -->
<div class="row">
<div class="col-xs-12">
<?php if ($manager == "add" || $manager == "edit") { ?>
<?php include('forms/execuse.php'); ?>
<?php } else { ?>
<div class="box">
<div class="box-header">
<h3 class="box-title"></h3>
<?php if (!empty($_SESSION['user_type'])) {
if ($_SESSION['user_type'] == 'Student') { ?>
<div class="" style="float:right;display:inline-block;">
<a href="?manager=add" type="button" class="btn btn-primary">اضافه</a>
</div>
<?php }
} ?>
</div><!-- /.box-header -->
<div class="box-body">
<div id="example1_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
<div class="row">
<div class="col-sm-6">
<div class="dataTables_length" id="example1_length">
</div>
</div>
<div class="col-sm-6">
<div id="example1_filter" class="dataTables_filter">
</div>
</div>
</div>
<div class="row">
<div class="table table-responsive table-striped container">
<table id="example1" class="dataTable-table">
<thead>
<tr role="row">
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="Rendering engine: activate to sort column ascending" style="width: 289px;">رقم المعاملة</th>
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="Rendering engine: activate to sort column ascending" style="width: 289px;"> الطالب</th>
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 360px;"> الجامعة </th>
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 360px;"> القسم </th>
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 360px;"> المستوى </th>
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 360px;"> الترم </th>
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 360px;">اسم المعاملة </th>
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 360px;"> المعاملة </th>
<th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 360px;"> حالة المعاملة </th>
<th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column descending" aria-sort="ascending" style="width: 189px;">ملاحظات</th>
<th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column descending" aria-sort="ascending" style="width: 189px;">التاريخ</th>
<th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column descending" aria-sort="ascending" style="width: 189px;">العمليات</th>
</tr>
</thead>
<tbody>
<?php
if (!empty($data)) {
foreach ($data as $row) { ?>
<tr role="row" class="odd">
<td class=""><?php echo $row->execuse_id; ?></td>
<td><a type="button" class="" href="users.php?id=<?php echo $row->execuse_user_id; ?>&manager=edit"><?php echo $row->execuse_user_id . ": " . $row->user_full_name; ?></a></td>
<td><a type="button" class="" href="unevirsities.php?id=<?php echo $row->unevirsity_id; ?>&manager=edit"><?php echo $row->unevirsity_id . ": " . $row->unevirsity_name; ?></a></td>
<td><a type="button" class="" href="sections.php?id=<?php echo $row->section_id; ?>&manager=edit"><?php echo $row->section_id . ": " . $row->section_name; ?></a></td>
<td><a type="button" class="" href="levels.php?id=<?php echo $row->level_id; ?>&manager=edit"><?php echo $row->execuse_level_id . ": " . $row->level_name; ?></a></td>
<td><?php echo $row->execuse_term; ?></td>
<td><?php echo $row->execuse_name; ?></td>
<td>
<?php
if (!empty($row->execuse_file)) {
if (file_exists("Images/Execuses/" . $row->execuse_file)) { ?>
<a href="<?php echo "Images/Execuses/" . $row->execuse_file; ?>" target="_blank">Show file</a>
<?php }
} ?>
</td>
<td><span style="padding:5px !important;" class="alert alert-<?php if ($row->execuse_status == "Accepted") echo "info";
else if ($row->execuse_status == "Rejected") echo "danger";
else echo "secondary"; ?>"><?php echo $row->execuse_status; ?></span></td>
<td><?php echo $row->execuse_notes; ?></td>
<td><?php echo $row->execuse_date; ?></td>
<td class="sorting_1">
<?php if (($row->execuse_status != "Accepted" && $row->execuse_status != "Rejected") && $_SESSION['user_type'] == "Student") { ?>
<a type="button" class="btn btn-success" href="?id=<?php echo $row->execuse_id; ?>&manager=edit">Edit</a>
<a type="button" class="btn btn-danger" href="?id=<?php echo $row->execuse_id; ?>&manager=delete">Delete</a>
<?php } else if ($_SESSION['user_type'] != "Student") { ?>
<a type="button" class="btn btn-success" href="?id=<?php echo $row->execuse_id; ?>&manager=edit">Edit</a>
<?php } else { ?>
<a type="button" class="btn btn-info" disabled>تم ترحيلها</a>
<?php } ?>
</td>
</tr>
<?php }
} ?>
</tbody>
<tfoot>
<tr>
<th rowspan="1" colspan="1">رقم المعاملة</th>
<th rowspan="1" colspan="1"> الطالب</th>
<th rowspan="1" colspan="1">الجامعة</th>
<th rowspan="1" colspan="1">القسم</th>
<th rowspan="1" colspan="1">السمتوى</th>
<th rowspan="1" colspan="1">الترم</th>
<th rowspan="1" colspan="1">اسم المعاملة</th>
<th rowspan="1" colspan="1"> المعاملة</th>
<th rowspan="1" colspan="1">حالة المعاملة</th>
<th rowspan="1" colspan="1">ملاحظات</th>
<th rowspan="1" colspan="1">التاريخ</th>
<th rowspan="1" colspan="1">العمليات</th>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="row">
<div class="col-sm-5">
</div>
<div class="col-sm-7">
<div class="dataTables_paginate paging_simple_numbers" id="example1_paginate">
</div>
</div>
</div>
</div>
</div><!-- /.box-body -->
</div><!-- /.box -->
<?php } ?>
</div><!-- col-xs-12 -->
</div>
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<?php require_once('layout/footer.php'); ?>
</div><!-- ./wrapper -->
<?php require_once('layout/js.php'); ?>
</body>
</html>