本文整理汇总了PHP中get_account_data函数的典型用法代码示例。如果您正苦于以下问题:PHP get_account_data函数的具体用法?PHP get_account_data怎么用?PHP get_account_data使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_account_data函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: can_user_add
/**
* @param $keytype e.g. 'blockchain', 'mtgox', 'notification', ...
*/
function can_user_add($user, $keytype, $amount = 1)
{
$summary = user_limits_summary($user['id']);
$data = get_account_data($keytype);
$current_total = $summary['total_' . $data['group']];
$limit = get_premium_value($user, $data['group']);
return $current_total + $amount <= $limit;
throw new Exception("Could not find user limit type '{$keytype}'");
}
开发者ID:phpsource,项目名称:openclerk,代码行数:12,代码来源:premium.php
示例2: display_success
echo display_success();
}
break;
default:
?>
<div class="display-notice" style="vertical-align: middle; padding: 15px;">
<strong>Confirmation:</strong> Are you sure you want to cancel this request? <input type="button" class="btn btn-danger" value="Confirm" style="margin-left: 15px" onclick="window.location='<?php
echo ENTRADA_URL;
?>
/clerkship/electives?section=delete&step=2&id=<?php
echo $EVENT_ID;
?>
'" />
</div>
<?php
$student_name = get_account_data("firstlast", $event_info["etype_id"]);
echo $header_output;
?>
<table style="width: 100%" cellspacing="0" cellpadding="2" border="0" summary="Viewing Elective">
<colgroup>
<col style="width: 25%" />
<col style="width: 75%" />
</colgroup>
<tfoot>
<tr>
<td style="width: 25%; text-align: left">
<input type="button" class="btn" value="Back" onclick="window.location='<?php
echo ENTRADA_URL;
?>
/clerkship/electives?section=edit&id=<?php
echo $EVENT_ID;
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:delete.inc.php
示例3: html_encode
}
});
});
</script>
<h2>Select a Learner and a Time Period:</h2>
<form action="<?php
echo html_encode(ENTRADA_URL);
?>
/admin/evaluations/reports?section=learner-evaluations&step=2" method="POST" id="evaluation-report-form">
<div class="control-group row-fluid">
<label for="course_id" class="form-required span3">Learner</label>
<span class="controls span8">
<?php
echo "<select data-placeholder=\"Choose a learner...\" name=\"proxy_id\" id=\"proxy_id\" class=\"chosen-select\">";
foreach ($students as $student) {
echo "<option value=\"" . (int) $student["proxy_id"] . "\"" . (isset($PROCESSED["proxy_id"]) && $student["proxy_id"] == $PROCESSED["proxy_id"] ? " selected=\"selected\"" : "") . ">" . html_encode(get_account_data("fullname", $student["proxy_id"])) . "</option>";
}
echo "</select>";
?>
</select>
</span>
</div>
<div class="control-group row-fluid">
<label for="course_id" class="form-required span3">Report Start: </label>
<span class="controls span8">
<div class="input-append">
<input type="text" class="input-small datepicker" value="<?php
echo isset($PROCESSED["report_start"]) && $PROCESSED["report_start"] ? date("Y-m-d", $PROCESSED["report_start"]) : "";
?>
" name="report_start" id="report_start" />
<span class="add-on pointer"><i class="icon-calendar"></i></span>
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:learner-evaluations.inc.php
示例4: get_account_data
?>
</a>
</div>
</div>
<?php
}
if ((int) $course_details["studrep_id"]) {
?>
<div class="control-group">
<label for="stud_rep" class="form-nrequired control-label"><strong>Student Rep</strong></label>
<div class="controls">
<a href="mailto:<?php
echo get_account_data("email", $course_details["studrep_id"]);
?>
"><?php
echo get_account_data("fullname", $course_details["studrep_id"]);
?>
</a>
</div>
</div>
<?php
}
if (clean_input($course_details["course_description"], array("notags", "nows")) != "") {
?>
<div class="control-group">
<label for="course_description" class="form-nrequired control-label"> </label>
<div class="controls">
<h3><?php
echo $module_singular_name . " Description";
?>
</h3>
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:index.inc.php
示例5: COUNT
</td>
<td style="border-left: none;">
Tasks Progress
</td>
</tr>
</thead>
<tbody>
<?php
for ($i = ($page_current - 1) * $_SESSION[APPLICATION_IDENTIFIER]["clerkship"]["pp"]; $i < ($page_current * $_SESSION[APPLICATION_IDENTIFIER]["clerkship"]["pp"] < $clerk_count ? $page_current * $_SESSION[APPLICATION_IDENTIFIER]["clerkship"]["pp"] : $clerk_count); $i++) {
$query = "SELECT COUNT(*) FROM `" . CLERKSHIP_DATABASE . "`.`logbook_entries` WHERE `proxy_id` = " . $db->qstr($clerks[$i]["id"]) . " AND `entry_active` = 1 AND\n `rotation_id` IN (Select e.`event_id` FROM `" . CLERKSHIP_DATABASE . "`.`events` as e\n WHERE e.`rotation_id` = " . $db->qstr($rotation["id"]) . ")";
$entries = $db->CacheGetOne(LONG_CACHE_TIMEOUT, $query);
$procedures_required = 0;
$objectives_required = 0;
$objectives_recorded = 0;
$procedures_recorded = 0;
$grad_year = get_account_data("grad_year", $clerks[$i]["id"]);
$query = "SELECT `objective_id`, `lmobjective_id`, MAX(`number_required`) AS `required`\n FROM `" . CLERKSHIP_DATABASE . "`.`logbook_mandatory_objectives`\n WHERE `rotation_id` = " . $db->qstr($rotation["id"]) . "\n AND `grad_year_min` <= " . $db->qstr($grad_year) . "\n AND (`grad_year_max` = 0 OR `grad_year_max` >= " . $db->qstr($grad_year) . ")\n GROUP BY `objective_id`";
$required_objectives = $db->CacheGetAll(LONG_CACHE_TIMEOUT, $query);
if ($required_objectives) {
foreach ($required_objectives as $required_objective) {
$objectives_required += $required_objective["required"];
$llocation_ids_string = "";
if (CLERKSHIP_SETTINGS_REQUIREMENTS) {
$query = "SELECT c.`llocation_id` FROM `" . CLERKSHIP_DATABASE . "`.`logbook_mandatory_objective_locations` AS a\n JOIN `logbook_location_types` AS b\n ON a.`lltype_id` = b.`lltype_id`\n JOIN `logbook_lu_locations` AS c\n ON b.`llocation_id` = c.`llocation_id\n WHERE a.`lmobjective_id` = " . $db->qstr($required_objective["lmobjective_id"]);
$valid_locations = $db->GetAll($query);
if ($valid_locations) {
foreach ($valid_locations as $location) {
if ($llocation_ids_string) {
$llocation_ids_string .= ", " . $db->qstr($location["llocation_id"]);
} else {
$llocation_ids_string = $db->qstr($location["llocation_id"]);
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:index.inc.php
示例6: add_error
if ($evaluation_forms) {
$authors_with_duplicates[] = $author;
}
}
if (count($authors_with_duplicates) >= 1) {
if (count($authors_with_duplicates) == 1) {
if ($authors_with_duplicates[0] == $ENTRADA_USER->getActiveId()) {
add_error("The <strong>Form Title</strong> must be unique for each author. Please ensure that you use a form name which you are not an author for already.<br /><br />Please consider adding a simple identifier to the end of the form name (such as \"" . date("M-Y") . "\") to identify this form compared to any other existing form with the same name.");
} else {
$author_name = get_account_data("wholename", $authors_with_duplicates[0]);
add_error("The <strong>Form Title</strong> must be unique for each author. Please ensure that you use a form name which <strong>" . html_encode($author_name) . "</strong> is not an author for already.<br /><br />Please consider adding a simple identifier to the end of the form name (such as \"" . date("M-Y") . "\") to identify this form compared to any other existing form with the same name.");
}
} else {
$error_string = "The <strong>Form Title</strong> must be unique for each author.<br /><br /> The following list of users are already an author on another form with the same name: <br />\n<ul class=\"menu\">\n";
foreach ($authors_with_duplicates as $author) {
$author_name = get_account_data("wholename", $author);
$error_string .= "<li class=\"user\">" . html_encode($author_name) . "</li>";
}
$error_string .= "</ul>\n";
$error_string .= "<br />Please consider adding a simple identifier to the end of the form name (such as \"" . date("M-Y") . "\") to identify this form compared to any other existing form with the same name.";
add_error($error_string);
}
}
if (!$ERROR) {
$PROCESSED["form_parent"] = 0;
$PROCESSED["form_active"] = 1;
$PROCESSED["updated_date"] = time();
$PROCESSED["organisation_id"] = $ENTRADA_USER->getActiveOrganisation();
$PROCESSED["updated_by"] = $ENTRADA_USER->getID();
if ($db->AutoExecute("evaluation_forms", $PROCESSED, "INSERT") && ($eform_id = $db->Insert_Id())) {
if (is_array($PROCESSED["associated_authors"]) && count($PROCESSED["associated_authors"])) {
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add.inc.php
示例7: get_account_data
?>
"><?php
echo $procedures_recorded;
?>
</a></td>
<td class="date-smallest"><a href="<?php
echo $url;
?>
"><?php
echo $procedures_required;
?>
</a></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</form>
<?php
}
if (!$summary_shown) {
$student_name = get_account_data("firstlast", $PROXY_ID);
add_notice($student_name . " has not begun any core rotations in the system at this time.");
echo "<div style=\"width: 100%; text-align: center; margin-top: 80px;\">\n";
echo display_notice();
echo "</div>\n";
}
}
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:clerkship-summary.api.php
示例8: display_success
echo display_success();
}
if ($NOTICE) {
echo display_notice();
}
if ($ERROR) {
echo display_error();
}
break;
case 1:
default:
$ONLOAD[] = "initDynamicTable()";
$ONLOAD[] = "updatePollTypeIcon('4')";
$ONLOAD[] = "updateColorIcon('1')";
$proxy_id = clean_input($_GET["id"], "int");
$student_name = get_account_data("firstlast", $proxy_id);
echo "<h1>Discipline Breakdown For " . $student_name . "</h1>\n";
if ($ERROR) {
echo display_error();
}
?>
<form name="viewDisciplines" action="<?php
echo ENTRADA_URL;
?>
/clerkship/electives" method="post">
<div>
<div style="float: left; vertical-align: middle;">
<label for="PollingType" class="form-nrequired">Chart Style:</label>
<span id="polling-type-list">
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:disciplines.inc.php
示例9: array
$needToSend = false;
$output = array();
$query = "SELECT COUNT(`event_id`) AS `total` FROM `" . CLERKSHIP_DATABASE . "`.`events` WHERE `event_type` = 'elective' AND `event_status` = 'approval'";
$result = $db->GetRow($query);
if ($result["total"] > 9) {
$needToSend = true;
} else {
$twoWeeksAgo = strtotime("-2 weeks");
$query = "SELECT * FROM `" . CLERKSHIP_DATABASE . "`.`events` WHERE `event_type` = 'elective' AND `event_status` = 'approval' AND `modified_last` < " . $db->qstr($twoWeeksAgo);
if ($result = $db->GetRow($query)) {
$needToSend = true;
}
}
$search = array("%TO_NAME%", "%EVENT_LINK%");
$replace = array($AGENT_CONTACTS["agent-clerkship"]["name"], ENTRADA_URL . "/admin/clerkship/electives");
$mail->setFrom($AGENT_CONTACTS["administrator"]["email"], $AGENT_CONTACTS["administrator"]["name"]);
$mail->setSubject($NOTIFICATION_MESSAGE["subject"]);
$mail->setReplyTo($AGENT_CONTACTS["administrator"]["email"], $AGENT_CONTACTS["administrator"]["name"]);
$mail->setBodyText(str_replace($search, $replace, $NOTIFICATION_MESSAGE["textbody"]));
if ($needToSend) {
$email_address = get_account_data("email", $AGENT_CONTACTS["agent-clerkship"]["director_ids"]["0"]);
$name = get_account_data("firstlast", $AGENT_CONTACTS["agent-clerkship"]["director_ids"]["0"]);
$mail->addTo($email_address, $name);
try {
$mail->send();
application_log("notification", "SUCCESS: Sent electives approval reminder to undergrad.");
} catch (Zend_Mail_Transport_Exception $e) {
application_log("notification", "FAILURE: Unable to send electives approval reminder to undergrad.");
}
}
$mail->clearRecipients();
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:electives-check.php
示例10: require_admin
<?php
/**
* Admin page for displaying the status of accounts in the system, allowing us to see
* if particular classes of accounts are failing.
*/
require_admin();
require __DIR__ . "/../layout/templates.php";
require __DIR__ . "/../layout/graphs.php";
$messages = array();
$errors = array();
// enabling accounts?
if (require_post("enable", false)) {
$exchange = require_post("enable");
$account_data = get_account_data($exchange);
// we re-enable ALL accounts, not just accounts belonging to active users, so that when a disabled user
// logs back in, they automatically get their disabled accounts disabled as well
$q = db()->prepare("SELECT t.*, users.email, user_properties.name AS users_name, user_properties.is_disabled AS user_is_disabled FROM " . $account_data['table'] . " t\n JOIN users ON t.user_id=users.id\n JOIN user_properties ON users.id=user_properties.id\n WHERE t.is_disabled=1");
$q->execute();
$count = 0;
$accounts = $q->fetchAll();
foreach ($accounts as $account) {
// re-enable it
$q = db()->prepare("UPDATE " . $account_data['table'] . " SET is_disabled=0 WHERE id=? AND is_disabled_manually=0");
$q->execute(array($account['id']));
// email the user if their account is not disabled
if (!$account['user_is_disabled']) {
if ($account['email']) {
$user_temp = array('email' => $account['email'], 'name' => $account['users_name']);
send_user_email($user_temp, "reenable", array("name" => $account['users_name'] ? $account['users_name'] : $account['email'], "exchange" => get_exchange_name($exchange), "label" => $account_data['label'], "labels" => $account_data['labels'], "title" => isset($account['title']) && $account['title'] ? "\"" . $account['title'] . "\"" : "untitled", "url" => absolute_url(url_for("wizard_accounts"))));
$messages[] = "Sent enabled message to " . htmlspecialchars($account['email']);
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:admin_accounts.php
示例11: array
}
$editable = false;
$edit_ajax = array();
if ($event_discussions) {
$i = 0;
foreach ($event_discussions as $result) {
if ($result["proxy_id"] == $ENTRADA_USER->getID()) {
$editable = true;
$edit_ajax[] = $result["ediscussion_id"];
} else {
$editable = false;
}
$poster_name = get_account_data("firstlast", $result["proxy_id"]);
echo "<div id=\"event_comment_" . $result["ediscussion_id"] . "\" class=\"discussion\"" . ($i % 2 ? " style=\"background-color: #F3F3F3\"" : "") . ">\n";
echo "\t<span class=\"discussion-title\">" . html_encode($result["discussion_title"]) . "</span>" . ($editable ? " ( <span id=\"edit_mode_" . $result["ediscussion_id"] . "\" style=\"cursor: pointer\">edit</span> )" : "") . "<br />\n";
echo "\t<div class=\"content-small\"><strong>" . get_account_data("firstlast", $result["proxy_id"]) . "</strong>, " . date(DEFAULT_DATE_FORMAT, $result["updated_date"]) . "</div>\n";
echo "\t<div class=\"discussion-comment\" id=\"discussion_comment_" . $result["ediscussion_id"] . "\">" . nl2br(html_encode($result["discussion_comment"])) . "</div>\n";
echo "</div>\n";
$i++;
}
if (@is_array($edit_ajax) && @count($edit_ajax)) {
echo "<script type=\"text/javascript\">\n";
foreach ($edit_ajax as $discussion_id) {
echo "var editor_" . $discussion_id . " = new Ajax.InPlaceEditor('discussion_comment_" . $discussion_id . "', '" . ENTRADA_RELATIVE . "/api/discussions.api.php', { rows: 7, cols: 75, okText: \"Save Changes\", cancelText: \"Cancel Changes\", externalControl: \"edit_mode_" . $discussion_id . "\", callback: function(form, value) { return 'action=edit&sid=" . session_id() . "&id=" . $discussion_id . "&discussion_comment='+escape(value) } });\n";
}
echo "</script>\n";
}
} else {
echo "<div class=\"content-small\">There are no comments or discussions on this event. <strong>Start a conversation</strong>, leave your comment below.</div>\n";
}
echo "\t<br /><br />";
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:events.inc.php
示例12: notify_regional_education
/**
* This function will notify the regional education office of updates / deletes to affected apartment events.
*
* @param string $action
* @param int $event_id
* @return bool $success
*/
function notify_regional_education($action, $event_id)
{
global $db, $AGENT_CONTACTS, $event_info, $ENTRADA_USER;
$query = "\tSELECT * FROM `" . CLERKSHIP_DATABASE . "`.`events` AS a\n\t\t\t\tLEFT JOIN `" . CLERKSHIP_DATABASE . "`.`regions` AS b\n\t\t\t\tON a.`region_id` = b.`region_id`\n\t\t\t\tLEFT JOIN `" . CLERKSHIP_DATABASE . "`.`event_contacts` AS c\n\t\t\t\tON a.`event_id` = c.`event_id`\n\t\t\t\tWHERE a.`event_id` = " . $db->qstr($event_id);
$result = $db->GetRow($query);
if ($result) {
/**
* Don't process this if the event has already ended as there's not need for notifications.
*/
if ($result["event_finish"] > time()) {
$whole_name = get_account_data("firstlast", $result["etype_id"]);
$query = "\tSELECT a.`inhabiting_start`, a.`inhabiting_finish`, b.`apartment_title`\n\t\t\t\t\t\t\t\tFROM `" . CLERKSHIP_DATABASE . "`.`apartment_schedule` AS a\n\t\t\t\t\t\t\t\tLEFT JOIN `" . CLERKSHIP_DATABASE . "`.`apartments` AS b\n\t\t\t\t\t\t\t\tON b.`apartment_id` = a.`apartment_id`\n\t\t\t\t\t\t\t\tWHERE a.`event_id` = " . $db->qstr($event_id);
$apartments = $db->GetAll($query);
if ($apartments) {
switch ($action) {
case "deleted":
$message = "Attention " . $AGENT_CONTACTS["agent-regionaled"]["name"] . ",\n\n";
$message .= $_SESSION["details"]["firstname"] . " " . $_SESSION["details"]["lastname"] . " has removed an event from " . $whole_name . "'s ";
$message .= "clerkship schedule, to which you had previously assigned housing. Due to the removal of this event from the system, ";
$message .= "the housing associated with it has also been removed.\n\n";
$message .= "Information For Reference:\n\n";
$message .= "Event Information:\n";
$message .= "Event Title:\t" . html_decode($result["event_title"]) . "\n";
$message .= "Region:\t\t" . $result["region_name"] . "\n";
$message .= "Start Date:\t" . date(DEFAULT_DATE_FORMAT, $result["event_start"]) . "\n";
$message .= "Finish Date:\t" . date(DEFAULT_DATE_FORMAT, $result["event_finish"]) . "\n\n";
if ($apartments && ($assigned_apartments = @count($apartments))) {
$message .= "Apartment" . ($assigned_apartments != 1 ? "s" : "") . " " . $whole_name . " was removed from:\n";
foreach ($apartments as $apartment) {
$message .= "Apartment Title:\t" . $apartment["apartment_title"] . "\n";
$message .= "Inhabiting Start:\t" . date(DEFAULT_DATE_FORMAT, $apartment["inhabiting_start"]) . "\n";
$message .= "Inhabiting Finish:\t" . date(DEFAULT_DATE_FORMAT, $apartment["inhabiting_finish"]) . "\n\n";
}
}
$message .= "=======================================================\n\n";
$message .= "Deletion Date:\t" . date("r", time()) . "\n";
$message .= "Deleted By:\t" . $_SESSION["details"]["firstname"] . " " . $_SESSION["details"]["lastname"] . " (" . $ENTRADA_USER->getID() . ")\n";
break;
case "change-critical":
$message = "Attention " . $AGENT_CONTACTS["agent-regionaled"]["name"] . ",\n\n";
$message .= $_SESSION["details"]["firstname"] . " " . $_SESSION["details"]["lastname"] . " has updated an event in " . $whole_name . "'s ";
$message .= "clerkship schedule, to which you had previously assigned housing. This update involves a change to the region or the ";
$message .= "dates that the event took place in. Due to this critical change taking place, the housing for this event for this ";
$message .= "student has been removed.\n\n";
if ($result["manage_apartments"]) {
$message .= "Please log into the clerkship system and re-assign housing to this student for this event.\n\n";
} else {
$message .= "Since this event no longer is taking place in a region which is managed by Regional Education, \n";
$message .= "no further action is required on your part in the system.\n\n";
}
$message .= "Information For Reference:\n\n";
$message .= "OLD Event Information:\n";
$message .= "Event Title:\t" . $event_info["event_title"] . "\n";
$message .= "Region:\t\t" . get_region_name($event_info["region_id"]) . "\n";
$message .= "Start Date:\t" . date(DEFAULT_DATE_FORMAT, $event_info["event_start"]) . "\n";
$message .= "Finish Date:\t" . date(DEFAULT_DATE_FORMAT, $event_info["event_finish"]) . "\n\n";
$message .= "NEW Event Information:\n";
$message .= "Event Title:\t" . html_decode($result["event_title"]) . "\n";
$message .= "Region:\t\t" . $result["region_name"] . "\n";
$message .= "Start Date:\t" . date(DEFAULT_DATE_FORMAT, $result["event_start"]) . "\n";
$message .= "Finish Date:\t" . date(DEFAULT_DATE_FORMAT, $result["event_finish"]) . "\n\n";
if ($apartments && ($assigned_apartments = @count($apartments))) {
$message .= "Apartment" . ($assigned_apartments != 1 ? "s" : "") . " " . $whole_name . " was removed from:\n";
foreach ($apartments as $apartment) {
$message .= "Apartment Title:\t" . $apartment["apartment_title"] . "\n";
$message .= "Inhabiting Start:\t" . date(DEFAULT_DATE_FORMAT, $apartment["inhabiting_start"]) . "\n";
$message .= "Inhabiting Finish:\t" . date(DEFAULT_DATE_FORMAT, $apartment["inhabiting_finish"]) . "\n\n";
}
}
$message .= "=======================================================\n\n";
$message .= "Deletion Date:\t" . date("r", time()) . "\n";
$message .= "Deleted By:\t" . $_SESSION["details"]["firstname"] . " " . $_SESSION["details"]["lastname"] . " (" . $ENTRADA_USER->getID() . ")\n";
break;
case "change-non-critical":
case "updated":
default:
$message = "Attention " . $AGENT_CONTACTS["agent-regionaled"]["name"] . ",\n\n";
$message .= $_SESSION["details"]["firstname"] . " " . $_SESSION["details"]["lastname"] . " has updated an event in " . $whole_name . "'s ";
$message .= "clerkship schedule, to which you had previously assigned housing.\n\n";
$message .= "Important:\n";
$message .= "This update does not affect the date or region of this event, as such this change is considered non-critical ";
$message .= "and no action is required on your part.\n\n";
$message .= "Information For Reference:\n\n";
$message .= "OLD Event Information:\n";
$message .= "Event Title:\t" . $event_info["event_title"] . "\n";
$message .= "Region:\t\t" . get_region_name($event_info["region_id"]) . "\n";
$message .= "Start Date:\t" . date(DEFAULT_DATE_FORMAT, $event_info["event_start"]) . "\n";
$message .= "Finish Date:\t" . date(DEFAULT_DATE_FORMAT, $event_info["event_finish"]) . "\n\n";
$message .= "NEW Event Information:\n";
$message .= "Event Title:\t" . html_decode($result["event_title"]) . "\n";
$message .= "Region:\t\t" . $result["region_name"] . "\n";
$message .= "Start Date:\t" . date(DEFAULT_DATE_FORMAT, $result["event_start"]) . "\n";
$message .= "Finish Date:\t" . date(DEFAULT_DATE_FORMAT, $result["event_finish"]) . "\n\n";
//.........这里部分代码省略.........
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:101,代码来源:functions.inc.php
示例13: Exception
break;
case $a['exchange'] . "_wallet":
$balances_wallet[$balance['currency']] = $balance['balance'];
break;
case $a['exchange'] . "_securities":
$balances_securities[$balance['currency']] = $balance['balance'];
break;
default:
throw new Exception("Unknown exchange '" . htmlspecialchars($balance['exchange']) . "' while retrieving account balances");
}
$last_updated = $balance['created_at'];
}
}
}
// get the account type data
$account_type_data = get_account_data($a['exchange']);
// was the last request successful?
$q = db()->prepare("SELECT * FROM jobs\n WHERE user_id=? AND arg_id=? AND job_type=? AND is_executed=1 AND is_recent=1\n ORDER BY jobs.id DESC LIMIT 1");
$q->execute(array(user_id(), $a['id'], $account_type_data['job_type']));
$job = $q->fetch();
if (!$last_updated && $job) {
$last_updated = $job['executed_at'];
}
if ($job && $job['is_error']) {
$q = db()->prepare("SELECT id,message FROM uncaught_exceptions WHERE job_id=? ORDER BY id DESC LIMIT 1");
// select the most recent exception too
$q->execute(array($job['id']));
$ue = $q->fetch();
if ($ue) {
$job['message'] = $ue['message'];
}
开发者ID:phpsource,项目名称:openclerk,代码行数:31,代码来源:_wizard_accounts_rows.php
示例14: fopen
} else {
$publicationCountArray[$departmentMember][4]["In Press"]["N/A"] = 0;
echo "<td class=\"general\" style=\"white-space: normal\">No Abstracts In Press</td>";
}
echo "</tr>";
$lastMember = $departmentMember;
}
}
}
$fp = fopen($txtfname, 'w');
$data = "Name|Articles Published|Articles In Press|Abstracts Published|Abstracts In Press\r\n";
fwrite($fp, $data);
$inPressData = "";
$publishedData = "";
foreach ($publicationCountArray as $key => $value) {
$name = get_account_data("wholename", $key);
$data = $name;
foreach ($value as $newKey => $newValue) {
foreach ($newValue as $newestKey => $newestValue) {
if ($newestKey == "In Press") {
foreach ($newestValue as $newNewestKey => $newNewestValue) {
if ($inPressData == "") {
if ($newNewestKey != "N/A") {
$inPressData = $newNewestKey . "(" . $newNewestValue . ")";
} else {
$inPressData = "N/A";
}
} else {
if ($newNewestKey != "N/A") {
$inPressData .= ", " . $newNewestKey . "(" . $newNewestValue . ")";
} else {
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:my_departmental_publications_by_member_journal.inc.php
示例15: add
/**
* Creates a new notification and returns its id.
*
* @param int $nuser_id
* @param int $proxy_id
* @param int $record_id
* @return int $notification_id
*/
public static function add($nuser_id, $proxy_id, $record_id, $subcontent_id = 0)
{
global $db, $ENTRADA_TEMPLATE;
$notification_user = NotificationUser::getByID($nuser_id);
if ($notification_user) {
if ($notification_user->getDigestMode()) {
$notification_body = $notification_user->getContentBody($record_id);
$sent = false;
$new_notification = array("nuser_id" => $nuser_id, "notification_body" => $notification_body, "proxy_id" => $proxy_id, "sent" => 0, "digest" => 1, "sent_date" => 0);
$db->AutoExecute("notifications", $new_notification, "INSERT");
if (!($notification_id = $db->Insert_Id())) {
application_log("error", "There was an issue attempting to add a notification record to the database. Database said: " . $db->ErrorMsg());
} else {
$new_notification["notification_id"] = $notification_id;
$notification = self::fromArray($new_notification);
$notification_user->setNextNotificationDate();
return $notification;
}
} else {
switch ($notification_user->getContentType()) {
case "logbook_rotation":
$search = array("%AUTHOR_FULLNAME%", "%OWNER_FULLNAME%", "%ROTATION_NAME%", "%CONTENT_BODY%", "%URL%", "%UNSUBSCRIBE_URL%", "%APPLICATION_NAME%", "%ENTRADA_URL%");
$replace = array(html_encode(get_account_data("wholename", $proxy_id)), html_encode(get_account_data("wholename", $notification_user->getRecordProxyID())), html_encode($notification_user->getContentTitle()), html_encode($notification_user->getContentBody($record_id)), html_encode($notification_user->getContentURL()), html_encode(ENTRADA_URL . "/profile?section=notifications&id=" . $nuser_id . "&action=unsubscribe"), html_encode(APPLICATION_NAME), html_encode(ENTRADA_URL));
$notification_body = file_get_contents($ENTRADA_TEMPLATE->absolute() . "/email/notification-logbook-rotation-" . ($notification_user->getProxyID() == $notification_user->getRecordProxyID() ? "student" : "admin") . ".xml");
$notification_body = str_replace($search, $replace, $notification_body);
break;
case "evaluation":
case "evaluation_overdue":
$query = "SELECT * FROM `evaluations` AS a\n JOIN `evaluation_forms` AS b\n ON a.`eform_id` = b.`eform_id`\n JOIN `evaluations_lu_targets` AS c\n ON b.`target_id` = c.`target_id`\n WHERE a.`evaluation_id` = " . $db->qstr($record_id);
$evaluation = $db->GetRow($query);
if ($evaluation) {
$search = array("%UC_CONTENT_TYPE_NAME%", "%CONTENT_TYPE_NAME%", "%CONTENT_TYPE_SHORTNAME%", "%UC_CONTENT_TYPE_SHORTNAME%", "%EVALUATOR_FULLNAME%", "%CONTENT_TITLE%", "%EVENT_TITLE%", "%CONTENT_BODY%", "%CONTENT_START%", "%CONTENT_FINISH%", "%CONTENT_LOCKOUT%", "%MANDATORY_STRING%", "%URL%", "%APPLICATION_NAME%", "%ENTRADA_URL%");
if (strpos($notification_user->getContentTypeName(), "assessment") !== false) {
$content_type_shortname = "assessment";
} else {
$content_type_shortname = "evaluation";
}
if (array_search($evaluation["target_shortname"], array("preceptor", "rotation_core", "rotation_elective")) !== false && $subcontent_id && defined("CLERKSHIP_EVALUATION_LOCKOUT") && CLERKSHIP_EVALUATION_LOCKOUT) {
$query = "SELECT * FROM `" . CLERKSHIP_DATABASE . "`.`events` WHERE `event_id` = " . $db->qstr($subcontent_id);
$clerkship_event = $db->GetRow($query);
if ($clerkship_event) {
if ($evaluation["target_shortname"] != "rotation_elective") {
$evaluation["evaluation_start"] = $clerkship_event["event_finish"] - 86400 * 5;
$evaluation["evaluation_finish"] = $clerkship_event["event_finish"] + CLERKSHIP_EVALUATION_TIMEOUT;
}
$evaluation["evaluation_lockout"] = $clerkship_event["event_finish"] + CLERKSHIP_EVALUATION_LOCKOUT;
$event_title = $clerkship_event["event_title"];
} else {
$event_title = "";
$evaluation["evaluation_lockout"] = $evaluation["evaluation_finish"];
}
} elseif (defined("EVALUATION_LOCKOUT") && EVALUATION_LOCKOUT) {
$event_title = "";
$evaluation["evaluation_lockout"] = $evaluation["evaluation_finish"] + (defined('EVALUATION_LOCKOUT') && EVALUATION_LOCKOUT ? EVALUATION_LOCKOUT : 0);
}
$mandatory = $evaluation["evaluation_mandatory"];
$evaluation_start = date(DEFAULT_DATE_FORMAT, $evaluation["evaluation_start"]);
$evaluation_finish = date(DEFAULT_DATE_FORMAT, $evaluation["evaluation_finish"]);
if (isset($evaluation["evaluation_lockout"])) {
$evaluation_lockout = date(DEFAULT_DATE_FORMAT, $evaluation["evaluation_lockout"]);
} else {
$evaluation_lockout = false;
}
$organisation_id = get_account_data("organisation_id", $proxy_id);
$content_url = $notification_user->getContentURL();
$replace = array(html_encode(ucwords($notification_user->getContentTypeName())), html_encode($notification_user->getContentTypeName()), html_encode($content_type_shortname), html_encode(ucfirst($content_type_shortname)), html_encode(get_account_data("wholename", $notification_user->getProxyID())), html_encode($notification_user->getContentTitle()), html_encode($event_title), html_encode($notification_user->getContentBody($record_id)), html_encode($evaluation_start), html_encode($evaluation_finish), html_encode($evaluation_lockout ? "\nAccess to this evaluation will be closed as of " . $evaluation_lockout . "." : ""), html_encode(isset($mandatory) && $mandatory ? "
|
请发表评论