|
Revision 1, 2.2 KB
(checked in by anonymous, 7 years ago)
|
|
initial import
|
| Line | |
|---|
| 1 | <?php |
|---|
| 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 | if(is_numeric($token[3]) ) |
|---|
| 29 | { |
|---|
| 30 | $title = stripslashes($_POST['title']); |
|---|
| 31 | $details = stripslashes($_POST['details']); |
|---|
| 32 | $country = stripslashes($_POST['country']); |
|---|
| 33 | $city = stripslashes($_POST['city']); |
|---|
| 34 | $location = stripslashes($_POST['location']); |
|---|
| 35 | $date_event = mktime($_POST['date']['Time_Hour'], $_POST['date']['Time_Minute'], 0, $_POST['date']['Date_Month'], $_POST['date']['Date_Day'], $_POST['date']['Date_Year'] ); |
|---|
| 36 | |
|---|
| 37 | if(strlen($_POST['title']) < 1 || strlen($_POST['details']) < 1 || $_POST['country']=='(null)' ) |
|---|
| 38 | { |
|---|
| 39 | header('Location: /error/event_incorrect'); |
|---|
| 40 | exit(); |
|---|
| 41 | } |
|---|
| 42 | |
|---|
| 43 | $event_values = array( |
|---|
| 44 | 'author' => $_SESSION['my_fname'], |
|---|
| 45 | 'title' => $title, |
|---|
| 46 | 'details' => $details, |
|---|
| 47 | 'location' => $location, |
|---|
| 48 | 'city' => $city, |
|---|
| 49 | 'country' => $country, |
|---|
| 50 | 'date_event'=> $date_event); |
|---|
| 51 | $result = $db->autoExecute('community_event', $event_values, DB_AUTOQUERY_UPDATE, "id_event='".$token[3]."' AND id='".$_SESSION['my_id']."'"); |
|---|
| 52 | if (DB::isError($result)) |
|---|
| 53 | error_log($_SERVER['HTTP_HOST'].' | '.__FILE__.' '.$result->getUserInfo()); |
|---|
| 54 | |
|---|
| 55 | } |
|---|
| 56 | |
|---|
| 57 | header('Location: /communities/viewEvent/'.$token[3]); |
|---|
| 58 | ?> |
|---|