$ret['IsSuccess'] = true; $ret['Msg'] = 'Succefully'; return $ret; } function removeCalendar($id) { $ret = array(); $ret['IsSuccess'] = true; $ret['Msg'] = 'Succefully'; return $ret; } header('Content-type:text/javascript;charset=UTF-8'); $method = $_GET["method"]; switch ($method) { case "add": $ret = addCalendar($_POST["CalendarStartTime"], $_POST["CalendarEndTime"], $_POST["CalendarTitle"], $_POST["IsAllDayEvent"]); break; case "list": $ret = listCalendar($_POST["showdate"], $_POST["viewtype"]); break; case "update": $ret = updateCalendar($_POST["calendarId"], $_POST["CalendarStartTime"], $_POST["CalendarEndTime"]); break; case "remove": $ret = removeCalendar($_POST["calendarId"]); break; case "adddetails": $id = $_GET["id"]; $st = $_POST["stpartdate"] . " " . $_POST["stparttime"]; $et = $_POST["etpartdate"] . " " . $_POST["etparttime"]; if ($id) {
$ret['Msg'] = mysql_error(); } else { $ret['IsSuccess'] = true; $ret['Msg'] = 'Succefully'; } } catch (Exception $e) { $ret['IsSuccess'] = false; $ret['Msg'] = $e->getMessage(); } return $ret; } header('Content-type:text/javascript;charset=UTF-8'); $method = $_GET["method"]; switch ($method) { case "add": $ret = addCalendar($_POST["CalendarStartTime"], $_POST["CalendarEndTime"], $_POST["CalendarTitle"], $_POST["IsAllDayEvent"], $_POST["Guru"], $_POST["id_sekolah"], $_POST["id_mengajar"]); break; case "list": //$ret = listCalendar($_POST["showdate"], $_POST["viewtype"]); $ret = listCalendar('2/12/2013', 'week'); break; case "update": $ret = updateCalendar($_POST["calendarId"], $_POST["CalendarStartTime"], $_POST["CalendarEndTime"]); break; case "remove": $ret = removeCalendar($_POST["calendarId"]); break; case "adddetails": $st = $_POST["stpartdate"] . " " . $_POST["stparttime"]; $et = $_POST["etpartdate"] . " " . $_POST["etparttime"]; if (isset($_GET["id"])) {
$obj_smarty->display(FULLCAL_DIR . '/login.html'); exit; } if (isset($_GET['action'])) { switch ($_GET['action']) { case 'get_calendar': getCalendar(); break; case 'save_calendar': saveCalendar(); break; case 'new_calendar': newCalendar(); break; case 'add_calendar': addCalendar(); break; case 'delete': deleteCalendar(); break; case 'undelete': undeleteCalendar(); break; default: die('no such action available'); } exit; } else { $obj_smarty->assign('active', 'calendars'); $obj_smarty->display(FULLCAL_DIR . '/view/user_panel.tpl'); exit;
public function process() { if ("ajax_calendar" == $_REQUEST['_process'] && module_calendar::can_i('view', 'Calendar')) { // ajax functions from wdCalendar. copied from the datafeed.php sample files. header('Content-type: text/javascript'); $ret = array(); $method = isset($_REQUEST['method']) ? $_REQUEST['method'] : false; switch ($method) { case "quick_add": if (module_calendar::can_i('create', 'Calendar')) { $ret = addCalendar($_POST["CalendarStartTime"], $_POST["CalendarEndTime"], $_POST["CalendarTitle"], $_POST["IsAllDayEvent"]); } break; case "list": $ret = listCalendar($_POST["showdate"], $_POST["viewtype"]); break; case "quick_update": if (module_calendar::can_i('edit', 'Calendar')) { $ret = updateCalendar($_POST["calendarId"], $_POST["CalendarStartTime"], $_POST["CalendarEndTime"]); } break; case "quick_remove": if (module_calendar::can_i('delete', 'Calendar')) { $ret = removeCalendar($_POST["calendarId"]); } break; } echo json_encode($ret); exit; } if ("save_calendar_entry" == $_REQUEST['_process']) { header('Content-type: text/javascript'); $calendar_id = isset($_REQUEST['calendar_id']) ? (int) $_REQUEST['calendar_id'] : 0; $response = array(); if ($calendar_id && module_calendar::can_i('edit', 'Calendar') || !$calendar_id && module_calendar::can_i('create', 'Calendar')) { $data = $_REQUEST; if (isset($data['start'])) { $start_time = $data['start']; if (isset($data['start_time']) && (!isset($data['is_all_day']) || !$data['is_all_day'])) { $data['is_all_day'] = 0; $time_hack = $data['start_time']; $time_hack = str_ireplace(_l("am"), '', $time_hack); $time_hack = str_ireplace(_l("pm"), '', $time_hack); $bits = explode(':', $time_hack); if (strpos($data['end_time'], _l("pm"))) { if ($bits[0] < 12) { $bits[0] += 12; } } // add the time if it exists $start_time .= ' ' . implode(':', $bits) . ':00'; $data['start'] = strtotime(input_date($start_time, true)); } else { $data['start'] = strtotime(input_date($start_time)); } } if (isset($data['end'])) { $end_time = $data['end']; if (isset($data['end_time']) && (!isset($data['is_all_day']) || !$data['is_all_day'])) { $data['is_all_day'] = 0; $time_hack = $data['end_time']; $time_hack = str_ireplace(_l("am"), '', $time_hack); $time_hack = str_ireplace(_l("pm"), '', $time_hack); $bits = explode(':', $time_hack); if (strpos($data['end_time'], _l("pm"))) { if ($bits[0] < 12) { $bits[0] += 12; } } // add the time if it exists $end_time .= ' ' . implode(':', $bits) . ':00'; //echo $end_time; $data['end'] = strtotime(input_date($end_time, true)); } else { $data['end'] = strtotime(input_date($end_time)); } } if (!$data['start'] || !$data['end']) { $response['message'] = 'Missing Date'; } else { //print_r($_REQUEST); print_r($data); exit; $calendar_id = update_insert('calendar_id', $calendar_id, 'calendar', $data); if ($calendar_id) { // save staff members. $staff_ids = isset($_REQUEST['staff_ids']) && is_array($_REQUEST['staff_ids']) ? $_REQUEST['staff_ids'] : array(); delete_from_db('calendar_user_rel', 'calendar_id', $calendar_id); foreach ($staff_ids as $staff_id) { if ((int) $staff_id > 0) { $sql = "INSERT INTO `" . _DB_PREFIX . "calendar_user_rel` SET calendar_id = " . (int) $calendar_id . ", user_id = " . (int) $staff_id; query($sql); } } $response['calendar_id'] = $calendar_id; $response['message'] = 'Success'; } else { $response['message'] = 'Error Saving'; } } } else { $response['message'] = 'Access Denied'; } echo json_encode($response); exit; } }
$ret['Msg'] = $event->error(); } else { $ret['IsSuccess'] = true; $ret['Msg'] = 'Succefully'; } } catch (Exception $e) { $ret['IsSuccess'] = false; $ret['Msg'] = $e->getMessage(); } return $ret; } header('Content-type:text/javascript;charset=UTF-8'); $method = $get["method"]; switch ($method) { case "add": $ret = addCalendar($post["CalendarStartTime"], $post["CalendarEndTime"], $post["CalendarTitle"], $post["IsAllDayEvent"]); break; case "list": $ret = listCalendar($post["showdate"], $post["viewtype"]); break; case "update": $ret = updateCalendar($post["calendarId"], $post["CalendarStartTime"], $post["CalendarEndTime"]); break; case "remove": $ret = removeCalendar($post["calendarId"]); break; case "adddetails": $st = $post["stpartdate"] . " " . $post["stparttime"]; $et = $post["etpartdate"] . " " . $post["etparttime"]; if (isset($get["id"])) { $ret = updateDetailedCalendar($get["id"], $st, $et, $post["Subject"], isset($post["IsAllDayEvent"]) ? 1 : 0, $post["Description"], $post["Location"], $post["colorvalue"], $post["timezone"]);
* GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Multi Calendar for Joomla. If not, see <http://www.gnu.org/licenses/>. * **/ defined('_JEXEC') or die('Restricted access'); require_once JPATH_COMPONENT . '/DC_MultiViewCal/php/functions.php'; require_once JPATH_BASE . '/components/com_multicalendar/DC_MultiViewCal/php/list.inc.php'; $db =& JFactory::getDBO(); header('Content-type:text/javascript;charset=UTF-8'); $method = JRequest::getVar('method'); $calid = JRequest::getVar('calid'); switch ($method) { case "add": $ret = addCalendar($calid, JRequest::getVar("CalendarStartTime"), JRequest::getVar("CalendarEndTime"), JRequest::getVar("CalendarTitle"), JRequest::getVar("IsAllDayEvent"), JRequest::getVar("location")); break; case "list": $d1 = js2PhpTime(JRequest::getVar("startdate")); $d2 = js2PhpTime(JRequest::getVar("enddate")); $d1 = mktime(0, 0, 0, date("m", $d1), date("d", $d1), date("Y", $d1)); $d2 = mktime(0, 0, 0, date("m", $d2), date("d", $d2), date("Y", $d2)) + 24 * 60 * 60 - 1; $ret = listCalendarByRange($calid, $d1, $d2); break; case "update": $ret = updateCalendar(JRequest::getVar("calendarId"), JRequest::getVar("CalendarStartTime"), JRequest::getVar("CalendarEndTime")); break; case "remove": $ret = removeCalendar(JRequest::getVar("calendarId"), JRequest::getVar("rruleType")); break; case "adddetails":
$ret['Msg'] = mysql_error(); } else { $ret['IsSuccess'] = true; $ret['Msg'] = 'Succefully'; } } catch (Exception $e) { $ret['IsSuccess'] = false; $ret['Msg'] = $e->getMessage(); } return $ret; } header('Content-type:text/javascript;charset=UTF-8'); $method = $_GET["method"]; switch ($method) { case "add": $ret = addCalendar($_POST["CalendarStartTime"], $_POST["CalendarEndTime"], $_POST["CalendarTitle"], $_POST["IsAllDayEvent"], $_POST["Departement"], $_POST["Demandeur"], $_POST["trajet"], $_POST["Responsable"], $_POST["Client"]); break; case "list": $ret = listCalendar($_POST["showdate"], $_POST["viewtype"]); break; case "update": $ret = updateCalendar($_POST["calendarId"], $_POST["CalendarStartTime"], $_POST["CalendarEndTime"]); break; case "remove": $ret = removeCalendar($_POST["calendarId"]); break; case "adddetails": $st = $_POST["stpartdate"] . " " . $_POST["stparttime"]; $et = $_POST["etpartdate"] . " " . $_POST["etparttime"]; if (isset($_GET["id"])) { $ret = updateDetailedCalendar($_GET["id"], $st, $et, $_POST["Subject"], isset($_POST["IsAllDayEvent"]) ? 1 : 0, $_POST["Description"], $_POST["Location"], $_POST["colorvalue"], $_POST["timezone"]);
@($album_id = $_REQUEST['album_id']); @($img_path = $_REQUEST['img_path']); if ($act == "register") { $mes = register(); } elseif ($act == "addInfo") { $mes = addInfo(); } elseif ($act == "addLanguage") { $mes = addLanguage(); } elseif ($act == "addAcco") { $mes = addAcco(); } elseif ($act == "addAllAcco") { $mes = addAllAcco(); } elseif ($act == "addLocation") { $mes = addLocation(); } elseif ($act == "addCalendar") { $mes = addCalendar(); } elseif ($act == "addFromDate") { $mes = addFromDate(); } elseif ($act == "addMinDays") { $mes = addMinDays(); } elseif ($act == "addPrice") { $mes = addPrice(); } elseif ($act == "addPhotos") { $mes = addPhotos(); } elseif ($act == "addPic") { $mes = addPic(); } elseif ($act == "addGuestPic") { $mes = addGuestPic; } elseif ($act == "addAmen") { $mes = addAmen(); } elseif ($act == "login") {