-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetirenler.php
192 lines (175 loc) · 5.93 KB
/
getirenler.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
187
188
189
190
191
192
<?php
session_start();
if((!isset($_SESSION["login"]))||($_SESSION["yetki"]=="0")){
?>
<meta http-equiv="refresh" content="0;URL=giris.php">
<?php
} else
{
?>
<!-- Giriş KONTROL -->
<?php include("header.php") ?>
<?php include("kontrol/veritabani.php") ?>
<!-- PAGE CONTENT -->
<script>
document.getElementById("getirenler").className = "active";
</script>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Getirenler
</h1>
<ol class="breadcrumb">
<li class="active"><a href="#"><i class="fa fa-dashboard"></i> Anasayfa</a></li>
<li><a href="#">Getirenler</a></li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<div class="col-md-12">
<div class="box box-default collapsed-box">
<div class="box-header with-border">
<h3 class="box-title">Yeni Getiren Ekle</h3>
<div class="box-tools">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
</button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
<!-- form -->
<form role="form" method="post" enctype="multipart/form-data" action="getirenler-ekle.php">
<div class="box-body">
<div class="form-group">
<div class="col-md-6">
<input name="getirenAdi" type="text" id="getirenAdi" class="form-control" placeholder="Getiren Adı Girin">
</div>
<div class="col-md-5">
<input name="telefon" type="text" id="telefon" class="form-control" placeholder="Telefon Girin">
</div>
<div class="col-md-1">
<button type="submit" class="btn btn-primary">Getireni Ekle</button>
</div>
</div>
</div>
<!-- /.box-body -->
</form>
<!-- /.form -->
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
<!-- /.box-header -->
<div class="box-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Getiren Adı</th>
<th>Telefon</th>
<th>İşlemler</th>
</tr>
</thead>
<tbody>
<?php
$vericek=$connection->query("select * from getirenler")->fetchAll(PDO::FETCH_ASSOC);
foreach ($vericek as $vcek)
{
?>
<tr>
<td><?=$vcek['getirenAdi'];?></td>
<td><?=$vcek['telefon'];?></td>
<!-- GELİR DÜZENLEME -->
<div class="modal fade bs-example-modal-lg" id="myModalId<?=$vcek['id'];?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form role="form" method="post" enctype="multipart/form-data" action="getirenler-guncelle.php">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Getiren Düzenle</h4>
</div>
<div class="modal-body">
<div class="form-group">
<div class="col-md-6">
<label>Getiren Adı</label>
<input name="getirenAdi" type="text" id="getirenAdi" class="form-control" placeholder="Getiren Adını Girin" value="<?=$vcek['getirenAdi'];?>">
<input name="id" type="text" id="id" hidden="hidden" value="<?=$vcek['id'];?>">
</div>
<div class="col-md-6">
<label>Getiren Telefon</label>
<input name="telefon" type="text" id="telefon" class="form-control" placeholder="Getiren Telefonunu Girin" value="<?=$vcek['telefon'];?>">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">İptal</button>
<button type="submit" class="btn btn-warning">Kaydet</button>
</div>
</form>
</div>
</div>
</div>
<!-- GELİR DÜZENLEME -->
<td>
<span class="button-group">
<button type="button" class="btn btn-warning fa fa-pencil" data-toggle="modal" data-target="#myModalId<?=$vcek['id'];?>"></button>
<a href="getirenler-sil.php?id=<?=$vcek['id'];?>" onclick="return confirm('İçeriği silmek istediğinize emin misiniz? Bu işlem geri alınamaz!');" class="btn btn-danger fa fa-trash"></a>
</span>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- jQuery 2.2.3 -->
<script src="plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js"></script>
<!-- page script -->
<script>
$(function () {
$("#example1").DataTable();
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false
});
});
</script>
<!-- PAGE CONTENT END -->
<?php include("footer.php") ?>
<!-- Giriş KONTROL -->
<?php } ?>