YaWK  24.1
Yet another WebKit
tourdates-delete.php
Go to the documentation of this file.
1 <?php
2 // check if language is set
3 if (!isset($language) || (!isset($lang)))
4 { // inject (add) language tags to core $lang array
5  $lang = \YAWK\language::inject(@$lang, "../system/plugins/tourdates/language/");
6 }
7 
8 include '../system/plugins/tourdates/classes/tourdates.php';
9 if (!isset($tourdates))
10 { // create new obj
11 
13  if (isset($_GET['id']))
14  { // escape var
15  $id = $db->quote($_GET['id']);
16  $tourdates->loadProperties($db, $id);
17  }
18 }
19 if ($_GET['delete'] === '1')
20 { // delete entry
21  if ($tourdates->delete($db))
22  { // success
23  print \YAWK\alert::draw("success", "Success!", "The event " . $_GET['id'] . " is deleted!","plugin=tourdates","2000");
24  }
25  else
26  { // delete failed
27  print \YAWK\alert::draw("danger", "Error!", "The event " . $_GET['id'] . " could not be deleted!","plugin=tourdates","4200");
28  }
29 }
print $lang['FILEMAN_UPLOAD']
$tourdates
Definition: tourdates.php:80
Tour Dates Plugin hands you a simple but nice, clean bootstraped & sortable Data Table....
Definition: tourdates.php:22
static inject(array $lang, string $pathToFile)
allow plugins to inject language tags to $lang array
Definition: language.php:439
if(!isset($db)) $id
print $_GET['id']
Definition: page-edit.php:357