-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheventedit.php
113 lines (102 loc) · 2.99 KB
/
eventedit.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
<!DOCTYPE html>
<?php
require 'essential.inc.php';
?>
<?php
if(isset($_POST['Name'])&&!empty($_POST['Name'])){
require 'connect.inc.php';
$str = "";
$flag = 0;
if(isset($_POST['Broadway'])){
if($flag == 0){
$str = "Broadway";
$flag = 1;
}
else
$str = "Broadway" . ", " . $str;
}
if(isset($_POST['Dance'])){
if($flag == 0){
$str = "Dance";
$flag = 1;
}
else
$str = "Dance" . ", " . $str;
}
if(isset($_POST['Family'])){
if($flag == 0){
$str = "Family";
$flag = 1;
}
else
$str = "Family" . ", " . $str;
}
if(isset($_POST['Opera'])){
if($flag == 0){
$str = "Opera";
$flag = 1;
}
else
$str = "Opera" . ", " . $str;
}
if(isset($_POST['Music'])){
if($flag == 0){
$str = "Music";
$flag = 1;
}
else
$str = "Music" . ", " . $str;
}
if(isset($_POST['Theatre'])){
if($flag == 0){
$str = "Theatre";
$flag = 1;
}
else
$str = "Theatre" . ", " . $str;
}
$query="UPDATE `Event` SET `Name`='".$_POST['Name']."',`Address`='".$_POST['Address']."',`City`='".$_POST['City']."',`State`='".$_POST['State']."',`Country`='".$_POST['Country']."',`Presenter`='".$_POST['Presenter']."',`Ticket`='".$_POST['Ticket']."',`Description`='".$_POST['Description']."',`EventStart`='".$_POST['EventStart']."',`EventEnd`='".$_POST['EventEnd']."',`Pincode`='".$_POST['Pincode']."', `Genre`='".$str."',`EventVerified`='2' WHERE EventID=".$_REQUEST['id']."";
if($run=mysqli_query($link,$query)){
header('Location: DisplayEvents.php');
}
else{
echo '<script>alert("Please Fill all details");</script>';
}
}
?>
<html lang="en">
<head>
<title>Event Edit</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="main_body" >
<div class="container">
<h2>Dynamic Tabs</h2>
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#home">Profile</a></li>
</ul>
<div class="tab-content">
<div id="home" class="tab-pane fade in active">
<div class="panel panel-default">
<div class="panel-body"><form role="form" action="eventedit.php" id="login" method="POST" >
<?php
require 'functions.php';
geteventedit();
?>
<br><button style="float:right;"type="submit" class="btn btn-info">Save</span></button>
</form></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>