• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP updateEvent函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中updateEvent函数的典型用法代码示例。如果您正苦于以下问题:PHP updateEvent函数的具体用法?PHP updateEvent怎么用?PHP updateEvent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了updateEvent函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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";
    }
}
开发者ID:jlowrie,项目名称:ifcrush,代码行数:32,代码来源:ifcrush_event.php


示例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']);
    }
}
开发者ID:OldVig,项目名称:gatherling,代码行数:56,代码来源:event.php


示例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");
开发者ID:ei12134,项目名称:event-manager,代码行数:18,代码来源:action_edit_event.php


示例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']);
开发者ID:Jabst,项目名称:WebPage,代码行数:18,代码来源:save_event.php


示例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>
开发者ID:kaanburaksener,项目名称:bicycle-rent-app,代码行数:31,代码来源:update-event.php


示例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;
}
开发者ID:atrommer,项目名称:ESS,代码行数:78,代码来源:common.php


示例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);
}
开发者ID:tonyward,项目名称:Teameet,代码行数:8,代码来源:events_db.php


示例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>
开发者ID:emircg,项目名称:UCPMv3.0,代码行数:28,代码来源:edit_post.php


示例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]);
开发者ID:jon9872,项目名称:zend-framework,代码行数:31,代码来源:Calendar-expanded.php


示例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();
开发者ID:sebspas,项目名称:AFK-WEB,代码行数:31,代码来源:admin.php


示例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) {
开发者ID:awpcomnet,项目名称:Extensible,代码行数:31,代码来源:events-recurrence.php


示例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();
    }
}
开发者ID:jamuraa,项目名称:gatherling,代码行数:101,代码来源:event.php


示例13: update

 public function update()
 {
     updateEvent($this->name, $this->description, $this->date, $this->public);
 }
开发者ID:andrelago13,项目名称:LTW,代码行数:4,代码来源:events.php


示例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";
开发者ID:tonyward,项目名称:Teameet,代码行数:31,代码来源:dbtest.php


示例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'];
开发者ID:aurelienshz,项目名称:g1a,代码行数:31,代码来源:modify.php


示例16: updateEvents

function updateEvents()
{
    foreach (getSpreadsheets() as $spreadsheet) {
        $events = spreadsheetToArray($spreadsheet);
        foreach ($events as $event) {
            // reload locations as we dynamically create them if missing
            /*
            $locations = getLocationIDs();
            
            $event['locationid'] = @$locations[$event['venue']];
            if($event['locationid'] == '') $event['locationid'] = addLocation($event['venue']);
            */
            updateEvent($event);
        }
    }
}
开发者ID:NicoKnoll,项目名称:BLNFMCalSync,代码行数:16,代码来源:blnfmcalsync.php


示例17: EventCalendar

 case "changeMonth":
     $cal_obj = new EventCalendar($request_obj);
     echo $cal_obj->createTable();
     break;
 case "eventDay":
     switch ($request_obj->action) {
         case "POST":
             if ($request_obj->account_priv == "Officer" or $request_obj->account_priv == "Admin") {
                 createNewEvent($request_obj);
             }
             $cal_obj = new EventCalendar($request_obj);
             echo $cal_obj->createTable();
             break;
         case "PUT":
             if ($request_obj->account_priv == "Officer" or $request_obj->account_priv == "Admin") {
                 updateEvent($request_obj);
             }
             $cal_obj = new EventCalendar($request_obj);
             echo $cal_obj->createTable();
             break;
         case "GET":
             $event_day = new EventDay($request_obj);
             $event = getEventInfo($request_obj);
             $event_day->fillEventInfo($event);
             echo $event_day->displayEvent();
             break;
         case "DELETE":
             if ($request_obj->account_priv == "Officer" or $request_obj->account_priv == "Admin") {
                 deleteEvent($request_obj);
             }
             $cal_obj = new EventCalendar($request_obj);
开发者ID:alicimustafa,项目名称:CSFWG,代码行数:31,代码来源:calendar.php


示例18: header

if (!isset($_SESSION['authUser'])) {
    $cancelProcess = true;
    header("Location: login.php");
}
if (isset($_POST['saveevent']) && !$cancelProcess) {
    $eventname = $_POST['eventname'];
    $startdate = $_POST['startdate'];
    $enddate = $_POST['enddate'];
    $userid = $_SESSION['UserID'];
    $capacity = $_POST['capacity'];
    $displaycapacity = $_POST['displaycapacity'];
    $eventid = $_POST['eventid'];
    if ($eventid == "") {
        $task = createEvent($eventname, $startdate, $enddate, $userid, $capacity, $displaycapacity);
    } else {
        $task = updateEvent($eventname, $startdate, $enddate, $userid, $capacity, $displaycapacity, $eventid);
    }
    if (!$task) {
        $data = array("success" => false, "message" => "Error!");
    } else {
        $data = array("success" => true, "message" => "Success!", "id" => $task);
    }
    echo json_encode($data);
}
//saveevent
if (isset($_POST['deleteEvent']) && !$cancelProcess) {
    $userid = $_SESSION['UserID'];
    $eventid = $_POST['eventid'];
    $task = deleteEvent($userid, $eventid);
    if (!$task) {
        $data = array("success" => false, "message" => "Error!");
开发者ID:misumoo,项目名称:bascomb,代码行数:31,代码来源:events_handle.php


示例19: json_encode

    if (ALLOW_ACCESS_BY == 'login' || ADMIN_CAN_LOGIN_FROM_ADMIN_URL === true && stristr($_SERVER['SCRIPT_NAME'], '/admin')) {
        if (!User::isLoggedIn()) {
            echo json_encode(array('success' => false, 'notloggedin' => true, 'error' => 'You are not logged in'));
            exit;
        }
    }
}
switch ($_GET['action']) {
    case 'start':
        getEvents();
        break;
    case 'add':
        addEvent();
        break;
    case 'update':
        updateEvent();
        break;
    case 'resize':
        resizeEvent();
        break;
    case 'del':
        deleteEvent();
        break;
    case 'get_cal':
        getCalendar();
        break;
    case 'mail_event':
        mailEvent();
        break;
    default:
        break;
开发者ID:ramant15,项目名称:ektimo,代码行数:31,代码来源:cal_events.php


示例20: json_ModifyEvent

 public function json_ModifyEvent()
 {
     //function updateEvent($eid,$ename,$estart,$eend,$weight){
     $data = json_decode(file_get_contents('php://input'), true);
     if (!(isset($data['id']) && $data['id'] > 0)) {
         $return['error'] = -3;
         $return['value'] = "Event id is not set/valid!";
         $return['passed'] = $data;
     } else {
         $title = null;
         $start = null;
         $end = null;
         $weight = null;
         $eid = $data['id'];
         if (isset($data['title'])) {
             $title = $data['title'];
         }
         if (isset($data['start'])) {
             $start = $data['start'];
         }
         if (isset($data['end'])) {
             $end = $data['end'];
         }
         if (isset($data['weight'])) {
             $weight = $data['weight'];
         }
         updateEvent($eid, $title, $start, $end, $weight);
         //$data['id'], $data['title'], $data['start'], $data['end'], $data['weight']);
         $return['error'] = 0;
     }
     $jsonstring = json_encode($return);
     echo $jsonstring;
 }
开发者ID:tonyward,项目名称:Teameet,代码行数:33,代码来源:events.php



注:本文中的updateEvent函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP updateInfo函数代码示例发布时间:2022-05-23
下一篇:
PHP updateEmployerData函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap