forked from WI13-project/infosaeule
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check_inaktiv.php
95 lines (87 loc) · 4.28 KB
/
check_inaktiv.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
<?php
include("auth-cm.php");
include("header.php");
include("cms_links.php");
echo "<link href='css/bootstrap.min.css' rel='stylesheet'>";
echo "<div id='cms_inaktiv' class='container'>";
echo" <form action='cms_inaktiv.php' method='post' enctype='multipart/form-data'>";
$db = new SQLite3('db/infosaeule.sqlite');
if(!$db)die($db->lastErrorMsg());
else{
$results = $db->query("SELECT name, erstzeit,lfdnr from Bilder where status='2' order by 'lfdnr'");
if($row = $results->fetchArray())
{ echo " <b><h3>zu löschende Inhalte</h3></b>";
echo "<table class='table table-striped table-bordered'> ";
echo "<thead><th>Name</th>";
echo "<th>Bild</th>";
echo "<th>Erstellt am</th>";
echo "<th> Aktivieren? </th>";
echo "<th> nichts </th>";
echo "<th> Löschen? </th></thead>";
echo "<tbody>";
if ((isset($_POST[$row['lfdnr']])) && ($_POST[$row['lfdnr']]=='loeschen'))
{
echo "<tr><td>Bild: ".$row['name']."</td>";
echo "<td><img src='thumbnail/".$row['erstzeit']."-".$row['name']."' alt='".$row['name']."'</td>";
echo "<td>".$row['erstzeit']."</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='aktivieren'>A</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='' > ---</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='loeschen'checked>L</td>";
echo "</tr>";
}
while (($row = $results->fetchArray()) )
if ((isset($_POST[$row['lfdnr']])) && ($_POST[$row['lfdnr']]=='loeschen'))
{
echo "<tr><td>Bild: ".$row['name']."</td>";
echo "<td><img src='thumbnail/".$row['erstzeit']."-".$row['name']."' alt='".$row['name']."'</td>";
echo "<td>".$row['erstzeit']."</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='aktivieren'>A</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='' > ---</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='loeschen'checked>L</td>";
echo "</tr>";
}
echo "</table> ";
} else echo "Keine Bilder zum löschen ausgewählt!";
$results = $db->query("SELECT name, erstzeit,lfdnr from Bilder where status='2' order by 'lfdnr'");
if($row = $results->fetchArray())
{ echo " <b><h3>zu aktivierende Inhalte</h3></b>";
echo "<table class='table table-striped table-bordered'> ";
echo "<thead><th>Name</th>";
echo "<th>Bild</th>";
echo "<th>Erstellt am</th>";
echo "<th> Aktivieren? </th>";
echo "<th> nichts </th>";
echo "<th> Löschen? </th></thead>";
echo "<tbody>";
if ((isset($_POST[$row['lfdnr']])) && ($_POST[$row['lfdnr']]=='aktivieren'))
{
echo "<tr><td>Bild: ".$row['name']."</td>";
echo "<td><img src='thumbnail/".$row['erstzeit']."-".$row['name']."' alt='".$row['name']."'</td>";
echo "<td>".$row['erstzeit']."</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='aktivieren'checked>A</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='' >-</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='loeschen'>L</td>";
echo "</tr>";
}
while (($row = $results->fetchArray()) )
if ((isset($_POST[$row['lfdnr']])) && ($_POST[$row['lfdnr']]=='aktivieren'))
{
echo "<tr><td>Bild: ".$row['name']."</td>";
echo "<td><img src='thumbnail/".$row['erstzeit']."-".$row['name']."' alt='".$row['name']."'</td>";
echo "<td>".$row['erstzeit']."</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='aktivieren'checked>A</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='' >-</td>";
echo "<td><input type='radio' name='".$row['lfdnr']."' value='loeschen'>L</td>";
echo "</tr>";
}
echo "</table> ";
}
else echo "Keine Bilder zum aktivieren ausgewählt!";
$db->close();
}
?>
<br>
<input type="hidden" value="lb" name="lb" >
<input class="btn btn-default btn-file" type="submit" value="ok!">
</form>
</div>