/** * Actually sends the email to all addresses in POST * @param string $subject subject of email * @param string $msg email message * @param array $success array of users that email was successful for */ function print_email_results($subject, $msg, $success) { if (!$success) { CmnFns::do_error_box(translate('problem sending email'), '', false); } else { CmnFns::do_message_box(translate('The email sent successfully.')); } echo '<h4 align="center">' . translate('do not refresh page') . '<br/>' . '<a href="' . $_SERVER['PHP_SELF'] . '?tool=email">' . translate('Return to email management') . '</a></h4>'; }
$msg = Link::getLink('index.php', translate('Login to manage all of your invitiations')); } CmnFns::do_message_box($msg); } else { $resid = $_GET['id']; $action = $_GET['action']; $res = new Reservation($resid); $resource = new Resource(); $max_participants = $resource->get_property('max_participants', $res->get_machid()); // If the total number of users (minus the owner) already participating is less than the max, let this user participate if ($action == INVITE_DECLINE || ($max_participants == '' || count($res->participating_users) < $max_participants)) { $msg = '<h5>' . translate('Confirm reservation participation') . '</h5><br/>'; $word = $_GET['action'] == INVITE_ACCEPT ? 'Accept' : 'Decline'; $msg .= '<input type="submit" class="button" name="y" value="' . translate($word) . '"/>'; $msg .= ' '; $msg .= '<input type="submit" class="button" name="n" value="' . translate('Cancel') . '"/>'; if ($res->is_repeat()) { $msg .= '<br/><input type="checkbox" name="update_all" value="yes"/> ' . translate('Do for all reservations in the group?'); } echo '<form name="inv_mgmt" action="' . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'] . '" method="post">'; CmnFns::do_message_box($msg); echo '</form>'; } else { CmnFns::do_error_box(translate('That reservation is at full capacity.'), '', false); } } } // End main table $t->endMain(); // Print HTML footer $t->printHTMLFooter();
/** * Print success message after changed password * This function simply prints out a message informing * the user that thier password was changed and how to * log in now * @param none */ function printSuccess() { CmnFns::do_message_box(translate('Your new passsword has been emailed to you.'), 'width: 75%;'); }
/** * Prints a message nofiying the user that their reservation was placed * @param string $verb action word of what kind of reservation process just occcured * @param array $dates dates that were added or modified. Deletions are not printed. */ function print_success($verb, $dates = array()) { echo '<script language="JavaScript" type="text/javascript">' . "\n" . 'window.opener.document.location.href = window.opener.document.URL;' . "\n" . '</script>'; $date_text = ''; for ($i = 0; $i < count($dates); $i++) { $date_text .= Time::formatReservationDate($dates[$i], $this->start) . '<br/>'; } CmnFns::do_message_box(translate('Your ' . $this->word . ' was successfully ' . $verb) . ($this->type != 'd' ? ' ' . translate('for the follwing dates') . '<br /><br />' : '.') . $date_text . '<br/><br/>' . '<a href="javascript: window.close();">' . translate('Close') . '</a>', 'width: 90%;'); }
/** * Prints a page with a message notifying the admin of a successful update * @param none */ function print_success() { // Get the name/value of anything that was currently being edited // This will then be flitered out of the link back so that item will not show up in the edit box $return = !empty($_POST['get']) ? preg_replace('/&' . $_POST['get'] . '=[\\d\\w]*/', '', $_SERVER['HTTP_REFERER']) : $_SERVER['HTTP_REFERER']; header("Refresh: 2; URL={$return}"); // Auto send back after 2 seconds $t = new Template(translate('Successful update')); $t->printHTMLHeader(); // $t->printWelcome(); $t->startMain(); CmnFns::do_message_box(translate('Your request was processed successfully.') . '<br />' . '<a href="' . $return . '">' . translate('Go back to system administration') . '</a><br />' . translate('Or wait to be automatically redirected there.')); $t->endMain(); $t->printHTMLFooter(); die; }
/** * Prints out the latest success box * @param none */ function print_success_box() { CmnFns::do_message_box($this->success); }
/** * Prints a message letting the user know that the update was successful * @param none */ function print_success() { $link = CmnFns::getNewLink(); CmnFns::do_message_box(translate('Your email preferences were successfully saved') . '<br />' . $link->getLink('ctrlpnl.php', translate('Return to My Control Panel'))); }
* License: GPL, see LICENSE */ list($s_sec, $s_msec) = explode(' ', microtime()); // Start execution timer /** * Include Template class */ include_once 'lib/Template.class.php'; /** * Include scheduler-specific output functions */ include_once 'lib/Schedule.class.php'; $t = new Template(translate('Online Scheduler [Read-only Mode]')); $s = new Schedule(isset($_GET['scheduleid']) ? $_GET['scheduleid'] : null, READ_ONLY); // Print HTML headers $t->printHTMLHeader(); CmnFns::do_message_box('<a href="index.php">' . translate('Login to view details and place reservations') . '</a>'); // Begin main table $t->startMain(); $s->print_schedule(); // Print out links to jump to new date $s->print_jump_links(); CmnFns::do_message_box('<a href="index.php">' . translate('Login to view details and place reservations') . '</a>'); // End main table $t->endMain(); list($e_sec, $e_msec) = explode(' ', microtime()); // End execution timer $tot = (double) $e_sec + (double) $e_msec - ((double) $s_sec + (double) $s_msec); echo '<!--Schedule printout time: ' . sprintf('%.16f', $tot) . ' seconds-->'; // Print HTML footer $t->printHTMLFooter();
/** * Prints out a thank you message for submitting report * @param none */ function print_thank_you() { global $conf; CmnFns::do_message_box('Thank you for submitting your bug report.<br />' . ' Please be asssured that the issue will be reviewed and remedied as quickly as' . ' possible.<br /><br />' . ' You will be contacted if any additional information is needed.<br /><br />' . ' If you have any questions, please contact tech support at <a href="mailto:' . $conf['app']['techEmail'] . '">' . $conf['app']['techEmail'] . '</a><br /><br />' . '<a href="javascript: window.close();">Finished</a>', 'width: 75%;'); }