mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
started work on guest invoice view using a url key
This commit is contained in:
16
post.php
16
post.php
@@ -284,14 +284,14 @@ if(isset($_GET['delete_client'])){
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['add_calendar_event'])){
|
||||
if(isset($_POST['add_event'])){
|
||||
|
||||
$calendar_id = intval($_POST['calendar']);
|
||||
$title = strip_tags(mysqli_real_escape_string($mysqli,$_POST['title']));
|
||||
$start = strip_tags(mysqli_real_escape_string($mysqli,$_POST['start']));
|
||||
$end = strip_tags(mysqli_real_escape_string($mysqli,$_POST['end']));
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO calendar_events SET calendar_event_title = '$title', calendar_event_start = '$start', calendar_event_end = '$end', calendar_id = $calendar_id");
|
||||
mysqli_query($mysqli,"INSERT INTO events SET event_title = '$title', event_start = '$start', event_end = '$end', calendar_id = $calendar_id");
|
||||
|
||||
$_SESSION['alert_message'] = "Event added to the calendar";
|
||||
|
||||
@@ -299,15 +299,15 @@ if(isset($_POST['add_calendar_event'])){
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST['edit_calendar_event'])){
|
||||
if(isset($_POST['edit_event'])){
|
||||
|
||||
$calendar_event_id = intval($_POST['calendar_event_id']);
|
||||
$event_id = intval($_POST['event_id']);
|
||||
$calendar_id = intval($_POST['calendar']);
|
||||
$title = strip_tags(mysqli_real_escape_string($mysqli,$_POST['title']));
|
||||
$start = strip_tags(mysqli_real_escape_string($mysqli,$_POST['start']));
|
||||
$end = strip_tags(mysqli_real_escape_string($mysqli,$_POST['end']));
|
||||
|
||||
mysqli_query($mysqli,"UPDATE calendar_events SET calendar_event_title = '$title', calendar_event_start = '$start', calendar_event_end = '$end', calendar_id = $calendar_id WHERE calendar_event_id = $calendar_event_id");
|
||||
mysqli_query($mysqli,"UPDATE events SET event_title = '$title', event_start = '$start', event_end = '$end', calendar_id = $calendar_id WHERE event_id = $event_id");
|
||||
|
||||
$_SESSION['alert_message'] = "Event modified on the calendar";
|
||||
|
||||
@@ -315,10 +315,10 @@ if(isset($_POST['edit_calendar_event'])){
|
||||
|
||||
}
|
||||
|
||||
if(isset($_GET['delete_calendar_event'])){
|
||||
$calendar_event_id = intval($_GET['delete_calendar_event']);
|
||||
if(isset($_GET['delete_event'])){
|
||||
$event_id = intval($_GET['delete_calendar_event']);
|
||||
|
||||
mysqli_query($mysqli,"DELETE FROM calendar_events WHERE calendar_event_id = $calendar_event_id");
|
||||
mysqli_query($mysqli,"DELETE FROM events WHERE event_id = $event_id");
|
||||
|
||||
$_SESSION['alert_message'] = "Event deleted on the calendar";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user