-
Notifications
You must be signed in to change notification settings - Fork 1
/
deletesearchlog.php
34 lines (29 loc) · 1.03 KB
/
deletesearchlog.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
<?php
require_once('application.inc.php');
if (!isset($_POST['cancel']) || !setVar($cancel,$_POST['cancel'],'cancel')) unset($cancel);
if (!isset($_POST['save']) || !setVar($save,$_POST['save'],'save')) unset($save);
if (!authorized()) { exit; }
if (!$_SESSION['AUTH_ISCALENDARADMIN']) { exit; } // additional security
if (isset($cancel)) {
redirect2URL("viewsearchlog.php");
exit;
}
if (isset($save) ) {
$result = DBQuery("DELETE FROM ".SCHEMANAME."vtcal_searchlog WHERE calendarid='".sqlescape($_SESSION['CALENDAR_ID'])."'" );
redirect2URL("viewsearchlog.php");
exit;
}
pageheader(lang('clear_search_log'), "Update");
contentsection_begin(lang('clear_search_log'));
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<?php echo lang('clear_search_log_confirm'); ?><br>
<br>
<input type="submit" name="save" value="<?php echo lang('ok_button_text'); ?>">
<input type="submit" name="cancel" value="<?php echo lang('cancel_button_text'); ?>">
</form>
<?php
contentsection_end();
pagefooter();
DBclose();
?>