$page = "user_event_edit_members";
include "header.php";
$task = !empty($_POST['task']) ? $_POST['task'] : (!empty($_GET['task']) ? $_GET['task'] : NULL);
$event_id = !empty($_POST['event_id']) ? $_POST['event_id'] : (!empty($_GET['event_id']) ? $_GET['event_id'] : NULL);
$search = !empty($_POST['search']) ? $_POST['search'] : (!empty($_GET['search']) ? $_GET['search'] : NULL);
$p = !empty($_POST['p']) ? $_POST['p'] : (!empty($_GET['p']) ? $_GET['p'] : 1);
$s = !empty($_POST['s']) ? $_POST['s'] : (!empty($_GET['s']) ? $_GET['s'] : NULL);
$v = isset($_POST['v']) ? $_POST['v'] : (isset($_GET['v']) ? $_GET['v'] : NULL);
// ENSURE EVENT CREATION IS ENABLED FOR THIS USER
if (3 & ~$user->level_info['level_event_allow']) {
    header("Location: user_home.php");
    exit;
}
// INITIALIZE EVENT OBJECT
$event = new se_event($user->user_info['user_id'], $event_id);
if (!$event->event_exists) {
    header("Location: user_event.php");
    exit;
}
if ($event->event_info['event_user_id'] != $user->user_info['user_id']) {
    header("Location: user_event.php");
    exit;
}
// SET VARS
$result = FALSE;
$where = NULL;
$where_clause = array();
if ($s != "se_users.user_dateupdated DESC" && $s != "se_users.user_lastlogindate DESC") {
    $s = "se_users.user_dateupdated DESC";
}
Esempio n. 2
0
<?php

$page = "event_ajax";
include "header.php";
$task = !empty($_POST['task']) ? $_POST['task'] : NULL;
$view = !empty($_POST['view']) ? $_POST['view'] : NULL;
$date = !empty($_POST['date']) ? $_POST['date'] : NULL;
$user_id = !empty($_POST['user_id']) ? $_POST['user_id'] : NULL;
$event_id = !empty($_POST['event_id']) ? $_POST['event_id'] : NULL;
$invites = !empty($_POST['invites']) ? $_POST['invites'] : NULL;
$event = new se_event($user->user_exists ? $user->user_info['user_id'] : NULL, $event_id);
// LIST
if ($task == "eventcalendar") {
    $eventlist = $event->event_calendar_generate($date, $view);
    echo json_encode($eventlist);
    exit;
} elseif ($task == "eventinfo") {
    if (!$event->event_exists) {
        echo json_encode(array('result' => FALSE));
    } else {
        echo json_encode(array('result' => TRUE, 'event_info' => $event->event_info, 'eventmember_info' => $event->eventmember_info));
    }
    exit;
} elseif ($task == "eventdelete") {
    if ($user->user_exists && $event->event_delete()) {
        echo json_encode(array('result' => TRUE));
    } else {
        echo json_encode(array('result' => FALSE, 'error' => SE_Language::get($event->is_error)));
    }
    exit;
} elseif ($task == "eventjoin" || $task == "eventrequestsend") {
Esempio n. 3
0
$task = !empty($_POST['task']) ? $_POST['task'] : (!empty($_GET['task']) ? $_GET['task'] : NULL);
$view = !empty($_POST['view']) ? $_POST['view'] : (!empty($_GET['view']) ? $_GET['view'] : 'list');
$date = !empty($_POST['date']) ? $_POST['date'] : (!empty($_GET['date']) ? $_GET['date'] : NULL);
$search = !empty($_POST['search']) ? $_POST['search'] : (!empty($_GET['search']) ? $_GET['search'] : NULL);
$p = !empty($_POST['p']) ? $_POST['p'] : (!empty($_GET['p']) ? $_GET['p'] : 1);
$s = !empty($_POST['s']) ? $_POST['s'] : (!empty($_GET['s']) ? $_GET['s'] : NULL);
$show_notification = !empty($_GET['show_notification']);
if (!empty($search)) {
    $view = "list";
}
if (!$s) {
    $s = "se_events.event_date_start DESC";
}
$where = NULL;
$events_per_page = 10;
$event = new se_event($user->user_info[user_id]);
// BEGIN DATE PROCESSING
if (!$date || !is_numeric($date)) {
    $date = time();
}
// VIEW: CALENDAR - MONTH
if ($view == "month") {
    // GET THIS, LAST AND NEXT MONTHS
    $date = mktime(0, 0, 0, date("m", $date), 1, date("Y", $date));
    $date_next = mktime(0, 0, 0, date("m", $date) + 1, 1, date("Y", $date));
    $date_last = mktime(0, 0, 0, date("m", $date) - 1, 1, date("Y", $date));
    // GET NUMBER OF DAYS IN MONTH
    $days_in_month = date('t', $date);
    // GET FIRST AND LAST DAY OF THE MONTH
    $month_text = htmlentities($datetime->cdate("F", $date), NULL, 'utf-8');
    $month_year = htmlentities($datetime->cdate("Y", $date), NULL, 'utf-8');
Esempio n. 4
0
    $event_id = $_POST['event_id'];
} elseif (isset($_GET['event_id'])) {
    $event_id = $_GET['event_id'];
} else {
    $event_id = 0;
}
if (isset($_POST['delete_events'])) {
    $delete_events = $_POST['delete_events'];
} elseif (isset($_GET['delete_events'])) {
    $delete_events = $_GET['delete_events'];
} else {
    $delete_events = NULL;
}
// CREATE EVENT OBJECT
$events_per_page = 100;
$event = new se_event();
// DELETE ALBUM
if ($task == "deleteevents" && is_array($delete_events) && !empty($delete_events)) {
    $event->event_delete($delete_events);
}
// SET EVENT SORT-BY VARIABLES FOR HEADING LINKS
$i = "id";
// EVENT_ID
$t = "t";
// EVENT_TITLE
$o = "o";
// CREATOR OF EVENT
$m = "m";
// TOTAL GUESTLIST FOR EVENT
$d = "d";
// START DATE OF EVENT
Esempio n. 5
0
<?php

$page = "user_event_upload";
include "header.php";
$task = !empty($_POST['task']) ? $_POST['task'] : (!empty($_GET['task']) ? $_GET['task'] : NULL);
$event_id = !empty($_POST['event_id']) ? $_POST['event_id'] : (!empty($_GET['event_id']) ? $_GET['event_id'] : NULL);
// DISPLAY ERROR PAGE IF USER IS NOT LOGGED IN AND ADMIN SETTING REQUIRES REGISTRATION
if (!$user->user_exists && !$setting['setting_permission_event']) {
    exit;
}
// ENSURE EVENTS ARE ENABLED FOR THIS USER
if (1 & ~$user->level_info['level_event_allow']) {
    exit;
}
// INITIALIZE EVENT OBJECT
$event = new se_event($user->user_info['user_id'], $event_id);
if (!$event->event_exists) {
    exit;
}
// CHECK IF USER IS ALLOWED TO UPLOAD PHOTOS
$privacy_max = $event->event_privacy_max($user);
if ($privacy_max & ~$event->event_info['event_privacy']) {
    exit;
}
if ($privacy_max & ~$event->event_info['event_upload']) {
    exit;
}
// GET ALBUM INFO
$sql = "SELECT * FROM se_eventalbums WHERE eventalbum_event_id='{$event->event_info['event_id']}' LIMIT 1";
$resource = $database->database_query($sql);
$eventalbum_info = $database->database_fetch_assoc($resource);
<?php

$page = "profile_event_calendar";
include "header.php";
// GET DATE VARS
$now_adjusted = $datetime->timezone(time(), $global_timezone);
$date = isset($_GET['date']) && is_numeric($_GET['date']) ? $_GET['date'] : $now_adjusted;
// SELECT MONTH
$date = mktime(0, 0, 0, date("m", $date), 1, date("Y", $date));
$date_next = mktime(0, 0, 0, date("m", $date) + 1, 1, date("Y", $date));
$date_last = mktime(0, 0, 0, date("m", $date) - 1, 1, date("Y", $date));
// SET VARIABLES AND INITIALIZE EVENT OBJECT
$event = new se_event($owner->user_info['user_id']);
$sort_by = "se_events.event_date_start ASC";
$where = "(se_events.event_date_start>='" . $datetime->untimezone($date, $global_timezone) . "' AND se_events.event_date_start<'" . $datetime->untimezone($date_next, $global_timezone) . "' AND se_eventmembers.eventmember_status<>'0' AND se_eventmembers.eventmember_status<>'3')";
// GET NUMBER OF DAYS IN MONTH
$days_in_month = date('t', $date);
// GET FIRST AND LAST DAY OF THE MONTH
$month_text = htmlentities($datetime->cdate("F", $date), NULL, 'utf-8');
$month_year = htmlentities($datetime->cdate("Y", $date), NULL, 'utf-8');
$first_day_of_month = date("w", $date);
if ($first_day_of_month == 0) {
    $first_day_of_month = 7;
}
$last_day_of_month = $first_day_of_month - 1 + $days_in_month;
// GET TOTAL NUMBER OF CELLS ON TABLE
$total_cells = (floor($last_day_of_month / 7) + 1) * 7;
// GET TOTAL EVENTS
$total_events = $event->event_total($where);
// GET EVENTS ARRAY
$event_array = $event->event_list(0, $total_events, $sort_by, $where, 1);
Esempio n. 7
0
<?php

$page = "user_event_edit";
include "header.php";
$task = !empty($_POST['task']) ? $_POST['task'] : (!empty($_GET['task']) ? $_GET['task'] : NULL);
$event_id = !empty($_POST['event_id']) ? $_POST['event_id'] : (!empty($_GET['event_id']) ? $_GET['event_id'] : NULL);
$justadded = !empty($_POST['justadded']) ? $_POST['justadded'] : (!empty($_GET['justadded']) ? $_GET['justadded'] : NULL);
// ENSURE EVENT CREATION IS ENABLED FOR THIS USER
if (3 & ~$user->level_info['level_event_allow']) {
    header("Location: user_home.php");
    exit;
}
// INITIALIZE EVENT OBJECT
$event = new se_event($user->user_info['user_id'], $event_id);
if (!$event->event_exists) {
    header("Location: user_event.php");
    exit;
}
if ($event->event_info['event_user_id'] != $user->user_info['user_id']) {
    header("Location: user_event.php");
    exit;
}
// Get a date and time format that we can use
$compatible_input_dateformat = $setting['setting_dateformat'];
switch ($compatible_input_dateformat) {
    //US
    default:
    case 'n/j/Y':
    case 'n.j.Y':
    case 'n-j-Y':
    case 'M. j, Y':
Esempio n. 8
0
/*
echo $_SERVER['REQUEST_URI'];
print_r($_SERVER);
print_r($_GET);
print_r($_POST);
*/
// DISPLAY ERROR PAGE IF USER IS NOT LOGGED IN AND ADMIN SETTING REQUIRES REGISTRATION
if (!$user->user_exists && !$setting['setting_permission_event'] || $user->user_exists && 1 & ~$user->level_info['level_event_allow']) {
    $page = "error";
    $smarty->assign('error_header', 639);
    $smarty->assign('error_message', 656);
    $smarty->assign('error_submit', 641);
    include "footer.php";
}
// DISPLAY ERROR PAGE IF NO OWNER
$event = new se_event($user->user_info[user_id], $event_id);
if (!$event->event_exists) {
    $page = "error";
    $smarty->assign('error_header', 639);
    $smarty->assign('error_message', 2000219);
    $smarty->assign('error_submit', 641);
    include "footer.php";
}
// MAKE SURE MEDIA EXISTS
$sql = "SELECT se_eventmedia.*, se_eventalbums.*, se_users.user_id, se_users.user_username, se_users.user_fname, se_users.user_lname FROM se_eventmedia LEFT JOIN se_eventalbums ON se_eventmedia.eventmedia_eventalbum_id=se_eventalbums.eventalbum_id LEFT JOIN se_users ON se_eventmedia.eventmedia_user_id WHERE se_eventmedia.eventmedia_id='{$eventmedia_id}' AND se_eventalbums.eventalbum_event_id={$event->event_info[event_id]} LIMIT 1";
$resource = $database->database_query($sql) or die($database->database_error() . " <b>SQL was: </b>{$sql}");
if (!$database->database_num_rows($resource)) {
    header("Location: " . $url->url_create('event', NULL, $event->event_info['event_id']));
    exit;
}
$media_info = $database->database_fetch_assoc($resource);
Esempio n. 9
0
$task = !empty($_POST['task']) ? $_POST['task'] : (!empty($_GET['task']) ? $_GET['task'] : NULL);
$event_id = !empty($_POST['event_id']) ? $_POST['event_id'] : (!empty($_GET['event_id']) ? $_GET['event_id'] : NULL);
$v = !empty($_POST['v']) ? $_POST['v'] : (!empty($_GET['v']) ? $_GET['v'] : NULL);
$p = !empty($_POST['p']) ? $_POST['p'] : (!empty($_GET['p']) ? $_GET['p'] : 1);
$v_members = isset($_POST['v_members']) ? $_POST['v_members'] : (isset($_GET['v_members']) ? $_GET['v_members'] : NULL);
$search_members = !empty($_POST['search_members']) ? $_POST['search_members'] : (!empty($_GET['search_members']) ? $_GET['search_members'] : NULL);
// DISPLAY ERROR PAGE IF USER IS NOT LOGGED IN AND ADMIN SETTING REQUIRES REGISTRATION
if (!$user->user_exists && !$setting['setting_permission_event'] || $user->user_exists && 1 & ~$user->level_info['level_event_allow']) {
    $page = "error";
    $smarty->assign('error_header', 639);
    $smarty->assign('error_message', 656);
    $smarty->assign('error_submit', 641);
    include "footer.php";
}
// DISPLAY ERROR PAGE IF NO OWNER
$event = new se_event($user->user_info['user_id'], $event_id);
if (!$event->event_exists) {
    $page = "error";
    $smarty->assign('error_header', 639);
    $smarty->assign('error_message', 828);
    $smarty->assign('error_submit', 641);
    include "footer.php";
}
// GET PRIVACY LEVEL
$privacy_max = $event->event_privacy_max($user);
$allowed_to_view = (bool) ($privacy_max & $event->event_info['event_privacy']);
$allowed_to_comment = (bool) ($privacy_max & $event->event_info['event_comments']);
$allowed_to_upload = (bool) ($privacy_max & $event->event_info['event_upload']);
$allowed_to_invite = (bool) ($event->event_info['event_user_id'] == $user->user_info['user_id']);
// UPDATE EVENT VIEWS IF EVENT VISIBLE
if ($allowed_to_view) {
Esempio n. 10
0
        if (!$eventcat['eventcat_dependency']) {
            $cat_ids[] = $eventcat['eventcat_id'];
            $depcats = $database->database_query("SELECT eventcat_id FROM se_eventcats WHERE eventcat_id='{$eventcat['eventcat_id']}' OR eventcat_dependency='{$eventcat['eventcat_id']}'");
            while ($depcat_info = $database->database_fetch_assoc($depcats)) {
                $cat_ids[] = $depcat_info['eventcat_id'];
            }
            $where .= " AND se_events.event_eventcat_id IN('" . implode("', '", $cat_ids) . "')";
        } else {
            $where .= " AND se_events.event_eventcat_id={$eventcat[eventcat_id]}";
            $eventsubcat = $eventcat;
            $eventcat = $database->database_fetch_assoc($database->database_query("SELECT eventcat_id, eventcat_title FROM se_eventcats WHERE eventcat_id='{$eventcat['eventcat_dependency']}' LIMIT 1"));
        }
    }
}
// CREATE EVENT OBJECT
$event = new se_event();
// GET TOTAL EVENTS
$total_events = $event->event_total($where);
// MAKE ENTRY PAGES
$events_per_page = 10;
$page_vars = make_page($total_events, $events_per_page, $p);
// GET EVENT ARRAY
$event_array = $event->event_list($page_vars[0], $events_per_page, $s, $where, TRUE);
// GET CATS
$field = new se_field("event");
$field->cat_list(0, 0, 0, "", "", "eventfield_id=0");
$cat_array = $field->cats;
// SET GLOBAL PAGE TITLE
$global_page_title[0] = 3000274;
$global_page_description[0] = 3000275;
// ASSIGN SMARTY VARIABLES AND DISPLAY EVENTS PAGE
<?php

$page = "user_event_edit_settings";
include "header.php";
$task = !empty($_POST['task']) ? $_POST['task'] : (!empty($_GET['task']) ? $_GET['task'] : NULL);
$event_id = !empty($_POST['event_id']) ? $_POST['event_id'] : (!empty($_GET['event_id']) ? $_GET['event_id'] : NULL);
// ENSURE EVENTS ARE ENABLED FOR THIS USER
if (3 & ~$user->level_info['level_event_allow']) {
    header("Location: user_home.php");
    exit;
}
// INITIALIZE EVENT OBJECT
$event = new se_event($user->user_info['user_id'], $event_id);
if (!$event->event_exists || $event->event_info['event_user_id'] != $user->user_info['user_id']) {
    header("Location: user_event.php");
    exit;
}
// SET EMPTY VARS
$result = FALSE;
// GET PRIVACY SETTINGS
$level_event_privacy = unserialize($user->level_info['level_event_privacy']);
rsort($level_event_privacy);
for ($c = 0; $c < count($level_event_privacy); $c++) {
    if (event_privacy_levels($level_event_privacy[$c]) != "") {
        SE_Language::_preload(event_privacy_levels($level_event_privacy[$c]));
        $privacy_options[$level_event_privacy[$c]] = event_privacy_levels($level_event_privacy[$c]);
    }
}
$level_event_comments = unserialize($user->level_info['level_event_comments']);
rsort($level_event_comments);
for ($c = 0; $c < count($level_event_comments); $c++) {
Esempio n. 12
0
// INCLUDE EVENT FILES
include "./include/class_event.php";
include "./include/functions_event.php";
// PRELOAD LANGUAGE
SE_Language::_preload(3000007);
// SET MENU VARS
if ($user->user_exists && $user->level_info['level_event_allow'] & 1 || !$user->user_exists && $setting['setting_permission_event']) {
    $plugin_vars['menu_main'] = array('file' => 'browse_events.php', 'title' => 3000007);
}
if ($user->level_info['level_event_allow'] & 1) {
    $plugin_vars['menu_user'] = array('file' => 'user_event.php', 'icon' => 'event_event16.gif', 'title' => 3000007);
}
// SET PROFILE MENU VARS
if ($owner->level_info['level_event_allow'] & 6 && $page == "profile") {
    // START CLASSIFIED
    $event = new se_event($owner->user_info['user_id']);
    $events_per_page = 5;
    $sort = "event_date_start DESC";
    // GET PRIVACY LEVEL AND SET WHERE
    $privacy_max = $owner->user_privacy_max($user);
    $where = "(event_privacy & {$privacy_max})";
    // GET TOTAL LISTINGS
    $total_events = $event->event_total($where);
    // GET LISTING ARRAY
    $events = $event->event_list(0, $events_per_page, $sort, $where);
    // ASSIGN ENTRIES SMARY VARIABLE
    $smarty->assign_by_ref('events', $events);
    $smarty->assign('total_events', $total_events);
    if ($total_events) {
        $plugin_vars['menu_profile_tab'] = array('file' => 'profile_event_list.tpl', 'title' => 3000007, 'name' => 'event');
        $plugin_vars['menu_profile_side'] = array('file' => 'profile_event.tpl', 'title' => 3000007, 'name' => 'event');
Esempio n. 13
0
for ($c = 0; $c < count($level_event_upload); $c++) {
    if (event_privacy_levels($level_event_upload[$c]) != "") {
        SE_Language::_preload(event_privacy_levels($level_event_upload[$c]));
        $upload_options[$level_event_upload[$c]] = event_privacy_levels($level_event_upload[$c]);
    }
}
$level_event_tag = unserialize($user->level_info['level_event_tag']);
rsort($level_event_tag);
for ($c = 0; $c < count($level_event_tag); $c++) {
    if (event_privacy_levels($level_event_tag[$c]) != "") {
        SE_Language::_preload(event_privacy_levels($level_event_tag[$c]));
        $tag_options[$level_event_tag[$c]] = event_privacy_levels($level_event_tag[$c]);
    }
}
// INITIALIZE EVENT OBJECT
$event = new se_event($user->user_info['user_id'], NULL);
// INITIALIZE VARIABLES
$is_error = FALSE;
$event->event_info = array('event_title' => NULL, 'event_desc' => NULL, 'event_host' => NULL, 'event_location' => NULL, 'event_privacy' => $level_event_privacy[0], 'event_comments' => $level_event_comments[0], 'event_upload' => $level_event_upload[0], 'event_tag' => $level_event_tag[0], 'event_search' => 1, 'event_eventcat_id' => NULL, 'event_eventsubcat_id' => NULL, 'event_date_start' => time() + 60 * 60, 'event_date_end' => time() + 60 * 60 * 2, 'event_inviteonly' => 0, 'event_invite' => 1);
// ATTEMPT TO ADD EVENT
if ($task == "doadd") {
    $event->event_info['event_title'] = $_POST['event_title'];
    $event->event_info['event_desc'] = $_POST['event_desc'];
    $event->event_info['event_host'] = $_POST['event_host'];
    $event->event_info['event_location'] = $_POST['event_location'];
    $event->event_info['event_eventcat_id'] = $_POST['event_eventcat_id'];
    $event->event_info['event_eventsubcat_id'] = $_POST['event_eventsubcat_id'];
    $event->event_info['event_invite'] = $_POST['event_invite'];
    $event->event_info['event_inviteonly'] = $_POST['event_inviteonly'];
    $event->event_info['event_search'] = $_POST['event_search'];
    $event->event_info['event_privacy'] = $_POST['event_privacy'];
Esempio n. 14
0
function deleteuser_event($user_id)
{
    global $database;
    // INITATE EVENT OBJECT
    $event = new se_event($user_id);
    // LOOP OVER EVENTS AND DELETE THEM
    $events = $database->database_query("SELECT event_id FROM se_events WHERE event_user_id='{$user_id}'");
    while ($event_info = $database->database_fetch_assoc($events)) {
        $event->event_delete($event_info['event_id']);
    }
    // DELETE USER FROM EVENT GUESTLISTS
    $database->database_query("DELETE FROM se_eventmembers WHERE eventmember_user_id='{$user_id}'");
    // DELETE USER'S COMMENTS
    $database->database_query("DELETE FROM se_eventcomments WHERE eventcomment_authoruser_id='{$user_id}'");
    $database->database_query("DELETE FROM se_eventmediacomments WHERE eventmediacomment_authoruser_id='{$user_id}'");
}