本文整理汇总了PHP中updateEvent函数的典型用法代码示例。如果您正苦于以下问题:PHP updateEvent函数的具体用法?PHP updateEvent怎么用?PHP updateEvent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了updateEvent函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ifcrush_event_handle_form
/**
* Fraternity events are displayed with three action buttons:
* Updated, Delete, and Show PNMs.
* This function is the form handler for all three.
* This function is going to add an event for the passed $frat_letters
* This function is called from ifcrush_frat with $frat_letters
**/
function ifcrush_event_handle_form($frat_letters)
{
global $debug;
if ($debug) {
echo "[ifcrush_event_handle_form] {$frat_letters}";
echo "<pre>";
print_r($_POST);
echo "</pre>";
}
$thisevent = array('eventID' => isset($_POST['eventID']) ? $_POST['eventID'] : "", 'eventDate' => $_POST['eventDate'], 'title' => $_POST['eventTitle'], 'fratID' => $frat_letters);
// put the form input into an array
switch ($_POST['action']) {
case "Update Event":
updateEvent($thisevent);
break;
case "Delete Event":
deleteEvent($thisevent);
break;
case "Add Event":
addEvent($thisevent);
break;
default:
echo "[ifcrush_event_handle_form]: bad action";
}
}
示例2: content
function content()
{
$event = NULL;
if (isset($_GET['name'])) {
$event = new Event($_GET['name']);
eventForm($event);
} elseif (strcmp($_POST['mode'], "Create New Event") == 0) {
if (Player::getSessionPlayer()->isHost()) {
if (isset($_POST['insert'])) {
insertEvent();
eventList();
} else {
eventForm();
}
} else {
authFailed();
}
} elseif (strcmp($_GET['mode'], "create") == 0) {
eventForm();
} elseif (isset($_POST['name'])) {
$event = new Event($_POST['name']);
if (!$event->authCheck($_SESSION['username'])) {
authFailed();
} else {
if (strcmp($_POST['mode'], "Parse DCI Files") == 0) {
dciInput();
} elseif (strcmp($_POST['mode'], "Auto-Input Event Data") == 0) {
autoInput();
} elseif (strcmp($_POST['mode'], "Update Registration") == 0) {
updateReg();
} elseif (strcmp($_POST['mode'], "Update Match Listing") == 0) {
updateMatches();
} elseif (strcmp($_POST['mode'], "Update Medals") == 0) {
updateMedals();
} elseif (strcmp($_POST['mode'], "Upload Trophy") == 0) {
if (insertTrophy()) {
$event->hastrophy = 1;
}
} elseif (strcmp($_POST['mode'], "Update Event Info") == 0) {
$event = updateEvent();
}
eventForm($event);
}
} else {
echo "<table style=\"border-width: 0px;\" align=\"center\">";
echo "<tr><td>";
echo "<form action=\"event.php\" method=\"post\">";
echo "<input type=\"submit\" name=\"mode\" value=\"Create New Event\">";
echo "</form></td><td>";
echo "<form action=\"format.php\" method=\"post\">";
echo "<input type=\"submit\" name=\"mode\" value=\"View/Add Formats\">";
echo "</form></td></tr>";
echo "</table><br><br>";
eventList($_POST['series'], $_POST['season']);
}
}
示例3: session_start
<?php
session_start();
if (!isset($_SESSION['userId'])) {
header("Location: ../index.php");
}
include_once '../database/connection.php';
include_once '../database/events.php';
include_once '../php/formatting.php';
$eventType = filter_var($_POST['eventType'], FILTER_SANITIZE_SPECIAL_CHARS);
$visibility = filter_var($_POST['visibility'], FILTER_SANITIZE_SPECIAL_CHARS);
$imageURL = filter_var($_POST['imageURL'], FILTER_SANITIZE_SPECIAL_CHARS);
$title = filter_var($_POST['title'], FILTER_SANITIZE_SPECIAL_CHARS);
$description = filter_var($_POST['description'], FILTER_SANITIZE_SPECIAL_CHARS);
$eventTime = filter_var($_POST['eventTime'], FILTER_SANITIZE_SPECIAL_CHARS);
$eventId = filter_var($_POST['eventId'], FILTER_SANITIZE_SPECIAL_CHARS);
updateEvent($eventType, $visibility, $imageURL, $title, $description, $eventTime, $eventId);
header("Location: ../pages/event_item.php?id=" . $_POST['eventId'] . "#content");
示例4: die
<?php
if (!isset($_POST['id'])) {
die('No ID');
}
if (!isset($_POST['title']) || trim($_POST['title']) == '') {
die('Title is Mandatory');
}
include_once 'database/connection.php';
include_once 'database/events.php';
include_once 'database/images.php';
try {
$id = addImage();
updateEvent($_POST['id'], $_POST['title'], $_POST['introduction'], $_POST['fulltext'], $id, $_POST['event']);
} catch (PDOException $e) {
die($e->getMessage());
}
header('Location: view_event.php?id=' . $_POST['id']);
示例5: updateEvent
<?php
include 'header.php';
?>
<body>
<?php
include 'functions.php';
?>
<?php
include 'connectdb.php';
?>
<?php
//Getting data from the former page via POST method
$id = $_POST["id"];
$status = $_POST["status"];
$title = $_POST["title"];
$content = $_POST["content"];
$date = $_POST["datetime"];
$place = $_POST["place"];
//Status of the post translating into a numeric value
if ($status == 'Kararlaştırılmış Etkinlik') {
$status = 1;
updateEvent($id, $status, $title, $content, $date, $place);
header("Location: events.php");
} else {
$status = 0;
updateEventSuggestion($id, $status, $title, $content);
header("Location: event-suggestion.php");
}
?>
</body>
</html>
示例6: schedEvent
function schedEvent($postData, $iEventID = '')
{
global $mail;
global $host;
global $docroot;
// take the input vals, call addEvent, and call addAssign
// if we have an event_id, we do an update, else, we just add
if ($iEventID) {
$iEID = $iEventID;
// we update the event, delete the currently assigned emps, and re-add the sub'd ones
updateEvent($iEventID, sanitizeInput($postData['dDate']), sanitizeInput($postData['dStartTime']), sanitizeInput($postData['dEndTime']), sanitizeInput($postData['area']), sanitizeInput($postData['tbName']));
// now do the delete
delAssign($iEventID);
} else {
// first add the event and get back the eventID
$iEID = addEvent(sanitizeInput($postData['dDate']), sanitizeInput($postData['dStartTime']), sanitizeInput($postData['dEndTime']), sanitizeInput($postData['area']), sanitizeInput($postData['tbName']));
}
// now we grab the positions for the area
// and iterate through the emp lists, adding the assignments
$oPositions = getAreaPos($postData['area']);
$oEmps = getMyEmployees($_SESSION['USERID']);
// grab data for email
// get sender details
$oSender = getUserVals($_SESSION['USERID']);
// get event details
$oEventDetails = getEventDetails($iEID);
// set up email basics
$mail->From = $oSender->user_email;
$mail->FromName = $oSender->user_first . ' ' . $oSender->user_last;
// if updated event, change subj line
if ($iEventID) {
$sSubj = "UPDATED: ";
} else {
$sSubj = "";
}
$sSubj .= 'You have been scheduled for ' . $oEventDetails->event_name;
$mail->Subject = $sSubj;
// the message
// handle updated event
if ($iEventID) {
$sBody = "The following event has been UPDATED!\n";
} else {
$sBody = "";
}
$sBody .= "You have been scheduled for the following:\n";
$sBody .= "Event Name: " . $oEventDetails->event_name . "\n";
$sBody .= "Event Date: " . date("l, F jS, Y", strtotime($oEventDetails->event_date)) . "\n";
$sBody .= "From: " . date("g:i a", strtotime($oEventDetails->event_start)) . " To: " . date("g:i a", strtotime($oEventDetails->event_end)) . "\n";
$sBody .= "\nPlease see http://" . $host . $docroot . " for more details.\n";
$sBody .= "Thanks, \n" . $oSender->user_first . " " . $oSender->user_last;
// append to mail
$mail->Body = $sBody;
// iterate list
$bAssigned = false;
// this flag flips once an assignment is made
foreach ($oEmps as $Emp) {
if ($_POST['rad' . $Emp->user_id]) {
$bAssigned = true;
// flip the flag
addAssign($Emp->user_id, $_POST['rad' . $Emp->user_id], $iEID);
$mail->AddAddress($Emp->user_email, $Emp->user_first . " " . $Emp->user_last);
}
}
// now check for curUser assign
if ($_POST['rad' . $_SESSION['USERID']]) {
addAssign($_SESSION['USERID'], $_POST['rad' . $_SESSION['USERID']], $iEID);
}
// send mail if checkbox checked and if >= 1 emp assigned
if ($postData['chkMail'] && $bAssigned) {
// send the mail
if (!$mail->Send()) {
accessDenied("There has been an error sending mail!");
}
$mail->ClearAddresses();
$mail->ClearAttachments();
}
return $iEID;
}
示例7: updateWeight
function updateWeight($eid, $newWeight)
{
$CI = get_instance();
/* $data = array('weight' => $newWeight);
$CI->db->where('eid', $eid);
$CI->db->update('Events', $data);*/
updateEvent($eid, null, null, null, $newWeight);
}
示例8: updateEvent
<section class="index">
<?php
$appID = $_POST['appID'];
$title = $_POST['title'];
$location = $_POST['location'];
$start = $_POST['start_year'] . '-' . $_POST['start_month'] . '-' . $_POST['start_day'] . ' ' . $_POST['start_hour'] . ':' . $_POST['start_min'] . ':00';
$end = $_POST['end_year'] . '-' . $_POST['end_month'] . '-' . $_POST['end_day'] . ' ' . $_POST['end_hour'] . ':' . $_POST['end_min'] . ':00';
$label = $_POST['label'];
$secret = $_POST['secret'];
//$moment = $_POST['start_hour'] . ':' . $_POST['start_min'] . ':00';
//$date = $_POST['date_year'] . '-' . $_POST['date_month'] . '-' . $_POST['date_day'];
updateEvent($appID, $userID, $title, $location, $start, $end, $label, $secret);
echo '<p class="succes">Event successfully updated.</p>';
/*if (amIInAnAppointment($moment, $date, $userID)==false && amIInAnAppointment($moment, $date, $userID)==false && $invitee!=0){
postEvent($userID, $title, $location, $start, $end, $invitee, $label);
postEvent($invitee, $title, $location, $start, $end, $userID, $label);
echo '<p class="succes">Event added to your and your invitees agenda.</p>';
} else if (amIInAnAppointment($moment, $date, $userID)==false && amIInAnAppointment($moment, $date, $userID)==true && $invitee!=0){
postEvent($userID, $title, $location, $start, $end, $invitee, $label);
echo '<p class="succes">The event was added to your agenda. But your colleague seems to already be in an appointment. A mail was sent.</p>';
} else if (amIInAnAppointment($moment, $date, $userID)==false && $invitee==0){
postEvent($userID, $title, $location, $start, $end, $invitee, $label);
echo '<p class="succes">The event was added to your agenda.</p>';
} else {
echo '<p class="succes">The event could not be added, you already have an appointment planned at that time.</p>';
}*/
?>
</section>
示例9: getClientLoginHttpClient
} else {
echo "Usage: php {$argv[0]} {$argv[1]} <username> <password> <fullTextQuery>\n";
}
break;
case 'outputCalendarList':
if ($argc == 4) {
$client = getClientLoginHttpClient($argv[2], $argv[3]);
outputCalendarList($client);
} else {
echo "Usage: php {$argv[0]} {$argv[1]} <username> <password>\n";
}
break;
case 'updateEvent':
if ($argc == 6) {
$client = getClientLoginHttpClient($argv[2], $argv[3]);
updateEvent($client, $argv[4], $argv[5]);
} else {
echo "Usage: php {$argv[0]} {$argv[1]} <username> <password> " . "<eventId> <newTitle>\n";
}
break;
case 'setReminder':
if ($argc == 6) {
$client = getClientLoginHttpClient($argv[2], $argv[3]);
setReminder($client, $argv[4], $argv[5]);
} else {
echo "Usage: php {$argv[0]} {$argv[1]} <username> <password> " . "<eventId> <minutes>\n";
}
break;
case 'addExtendedProperty':
if ($argc == 7) {
$client = getClientLoginHttpClient($argv[2], $argv[3]);
示例10: updateSection
$_POST['error'] = $error;
if ($error == "NoError") {
updateSection($_POST['nom'], $_POST['couleur'], $_POST['image'], $_POST['desc'], $jeu->idjeux);
header('Location : index.php?page=admin');
} else {
echo "<div class='error' >" . $error . "</div>";
}
}
if (isset($_GET['event'])) {
$event = recupEvent($_GET['event']);
}
if (isset($_POST['editerEvent'])) {
$error = checkEventEdition($event);
$_POST['error'] = $error;
if ($error == "NoError") {
updateEvent($_POST['nom'], $_POST['type'], $_POST['date'], $_POST['heure'], $_POST['localisation'], $_POST['image'], $_POST['jeux'], $_POST['desc'], $event->idevent);
header('Location : index.php?page=admin');
} else {
echo "<div class='error' >" . $error . "</div>";
}
}
/******************************************************/
/* Suppression */
/******************************************************/
if (isset($_GET['supprimer'])) {
switch ($_GET['supprimer']) {
case 'User':
$listeUser = recupListeUser();
break;
case 'News':
$listeNews = recupListeNews();
示例11: out
out($matches);
} else {
out(null, 'You must supply a valid start and end date');
}
break;
case 'add':
if (isset($event)) {
// The id column is auto-increment, so remove if passed in
unset($event['id']);
$result = addEvent($event);
}
out($result);
break;
case 'update':
if (isset($event)) {
$result = updateEvent($event);
}
out($result);
break;
case 'delete':
if (isset($event)) {
$result = deleteEvent($event);
}
if ($result === 1) {
// Return the deleted id instead of row count
$result = $event['id'];
}
out($result);
break;
}
} catch (Exception $e) {
示例12: content
//.........这里部分代码省略.........
if (Player::getSessionPlayer()->isSteward()) {
if (mode_is("Create New Event")) {
if (isset($_POST['insert'])) {
$event = insertEvent();
eventForm($event);
} else {
eventForm();
}
return;
} elseif (mode_is("Create Next Event")) {
$oldevent = new Event($_POST['name']);
$newevent = new Event("");
$newevent->season = $oldevent->season;
$newevent->number = $oldevent->number + 1;
$newevent->format = $oldevent->format;
$newevent->start = strftime("%Y-%m-%d %H:00:00", strtotime($oldevent->start) + 86400 * 7);
$newevent->kvalue = $oldevent->kvalue;
$newevent->finalized = 0;
$newevent->player_editdecks = 1;
$newevent->player_reportable = $oldevent->player_reportable;
$newevent->prereg_allowed = $oldevent->prereg_allowed;
$newevent->series = $oldevent->series;
$newevent->host = $oldevent->host;
$newevent->cohost = $oldevent->cohost;
$newevent->mainrounds = $oldevent->mainrounds;
$newevent->mainstruct = $oldevent->mainstruct;
$newevent->finalrounds = $oldevent->finalrounds;
$newevent->finalstruct = $oldevent->finalstruct;
$newevent->name = sprintf("%s %d.%02d", $newevent->series, $newevent->season, $newevent->number);
eventForm($newevent, true);
return;
} else {
if (!isset($event)) {
if (!isset($_POST['series'])) {
$_POST['series'] = '';
}
if (!isset($_POST['season'])) {
$_POST['season'] = '';
}
eventList($_POST['series'], $_POST['season']);
}
}
}
if ($event && $event->authCheck($player)) {
if (strcmp($_GET['action'], "undrop") == 0) {
$event->undropPlayer($_GET['player']);
}
if (mode_is("Start Event")) {
$event->active = 1;
$event->save();
$entries = $event->getEntries();
Standings::startEvent($entries, $event->name);
$event->pairCurrentRound();
}
if (mode_is("Recalculate Standings")) {
$structure = $event->mainstruct;
$event->recalculateScores($structure);
Standings::updateStandings($event->name, $event->mainid, 1);
}
if (mode_is("Reset Event")) {
$event->resetEvent();
}
if (mode_is("Delete Matches and Re-Pair Round")) {
$event->repairRound();
}
if (mode_is("Reactivate Event")) {
$event->active = 1;
$event->player_editdecks = 1;
$event->finalized = 0;
$event->save();
}
if (mode_is("Assign Medals")) {
$event->assignMedals();
}
if (mode_is("Parse DCI Files")) {
dciInput();
} elseif (mode_is("Parse DCIv3 Files")) {
dci3Input();
} elseif (mode_is("Auto-Input Event Data")) {
autoInput();
} elseif (mode_is("Update Registration")) {
updateReg();
} elseif (mode_is("Update Match Listing")) {
updateMatches();
} elseif (mode_is("Update Medals")) {
updateMedals();
} elseif (mode_is("Update Adjustments")) {
updateAdjustments();
} elseif (mode_is("Upload Trophy")) {
if (insertTrophy()) {
$event->hastrophy = 1;
}
} elseif (mode_is("Update Event Info")) {
$event = updateEvent();
}
eventForm($event);
} else {
authFailed();
}
}
示例13: update
public function update()
{
updateEvent($this->name, $this->description, $this->date, $this->public);
}
示例14: newCalendar
newCalendar($user2, 'google');
$ds = createDBdate($today['year'], $today['mon'], 6, 14, 0, 0);
$de = createDBdate($today['year'], $today['mon'], 6, 16, 0, 0);
insertEvent($user2, 'google', 'Autumn', $ds, $de, 1);
addMemberToGroup($kkk, $user3);
// acceptGroup(1,$user3);
rejectGroup($kkk, $user3);
newCalendar($user2, 'outlook');
$ds = createDBdate($today['year'], $today['mon'], 6, 16, 0, 0);
$de = createDBdate($today['year'], $today['mon'], 6, 18, 0, 0);
insertEvent($user2, 'outlook', 'Winter', $ds, $de, 1);
insertUser('noEventGuy', 'password', null);
addMemberToGroup($kkk, 'noEventGuy');
acceptGroup($kkk, 'noEventGuy');
}
updateEvent(5, 'Lunch 3', null, null, null);
displayAllEvents($user, 'unsw');
//$results = getEvents($user,'unsw');
$results = getEventsForAMonth($user, 'unsw', 10, 2014);
//print_r($results);
print "--------------- Calendars of {$user} ---------------\n";
printTable(getCalendars($user));
print_r($results);
print "--------------- All groups {$user} belongs to ---------------\n";
printTable(memberOf($user));
foreach (memberOf($user) as $group) {
if ($group['name'] == 'KKK') {
$kkk = $group['gid'];
}
}
print "---------------------- Members of KKK ---------------\n";
示例15: foreach
}
}
if (!empty($_POST) && !empty($push)) {
// Affiche les champs à jour avec ce qui a été saisi dans le formulaire.
foreach ($push as $cle => $valeur) {
$contents['values'][$cle] = $push[$cle];
}
foreach ($nameTranslation as $cle => $value) {
$contents['values'][$value] = $push[$cle];
}
}
if (empty($errors)) {
$push['id_media_principal'] = $contents['values']['id_media_principal'];
$push['max_type'] = count($contents['types']);
$push['id'] = $_GET['id'];
if (updateEvent($push)) {
alert("info", "Votre évènement a bien été modifié.");
header('Location: ' . getLink(['events', 'display', $_GET['id']]));
exit;
}
} else {
$contents['errors']['general'] = '<p id="mainError">Nous n\'avons pas validé vos changements, il y a au moins une entrée invalide.</p>';
foreach ($errors as $key => $value) {
$contents['errors'][$key] = '<p class="formError">' . $value . '</p>';
}
}
}
// /**** préparation de la vue ****/
$title = 'Modifier mon évènement';
$styles = ['form.css', 'accueil.css', 'search.css', 'prettyform.css'];
$blocks = ['modify'];