function commitCandidate() { $conf = $_POST["conf"]; $candidates = new Candidates(); if ($conf["candidateid"]) { $candidates->update('id=' . $conf["candidateid"], $conf); } else { $conf["candidateid"] = $candidates->create($conf); } updateEvents($conf); if ($conf["note"]) { createCandidateNote($conf["candidateid"], $conf["note"]); } goHere("index.php?mode=maxine/index&action=candidatelist"); }
function blnfmcalsync_page_function() { global $blnfmSyncWarnings; echo '<div class="wrap">'; if (@$_POST['syncnow']) { echo '<div class="updated"> <p>Veranstaltungen sollten jetzt synchronisiert sein.</p> </div>'; update_option('blnfmcalsync-lastsync', time()); updateEvents(); } foreach ($blnfmSyncWarnings as $blnfmSyncWarning) { echo '<div class="notice notice-warning"> <p>' . $blnfmSyncWarning . '</p> </div>'; } echo '</div>'; $lastSynced = get_option('blnfmcalsync-lastsync'); echo '<div class="wrap"> <h1>Mit Google Spreadsheet synchronisieren</h1> <p><b>Spreadsheet URLs:</b> </p> <ul> '; foreach (getSpreadsheets() as $spreadsheet) { echo '<li>' . $spreadsheet . '</li>'; } echo ' <p>Letztes mal synchronisiert: ' . date('d.m.Y H:i', $lastSynced) . ' Uhr</p> <p>Button klicken um die Synchronisation zu starten.</p> <form action="' . $_SERVER['REQUEST_URI'] . '" method="post"> <input type="submit" id="dbem_options_submit" class="button-primary" name="syncnow" value="Jetzt synchronisieren"> </form>'; }