function widget($args, $instance) { global $wpdb; // Extraindo as variáveis dos widgets extract($args); $maxComments = $instance['maxComments'] ? $instance['maxComments'] : 5; // Comentários $comments = $wpdb->get_results("\r\n\t\t SELECT ID, post_title, comment_ID, comment_post_ID, comment_author, comment_content \r\n\t\t FROM {$wpdb->comments} \r\n\t\t INNER JOIN {$wpdb->posts} ON (ID = comment_post_ID) \r\n\t\t WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' \r\n\t\t ORDER BY comment_ID DESC \r\n\t\t LIMIT {$maxComments}\r\n\t\t"); $title = apply_filters('widget_title', $instance['title'] ? $instance['title'] : 'Comentários recentes'); ?> <?php if (!empty($comments)) { print $before_widget; print $before_title . $title . $after_title; ?> <ul> <?php foreach ($comments as $comment) { ?> <li> <p><strong><?php echo $comment->comment_author; ?> </strong> em <a href="<?php echo get_permalink($comment->ID); ?> ">"<?php echo $comment->post_title; ?> "</a></p> <p class="comment_content"><?php limit_chars($comment->comment_content, 120); ?> </p> <div class="clear"></div> </li> <?php } ?> </ul> <?php print $after_widget; } }
if (isset($_GET["type"]) && ($tmp_action_type = clean_input(trim($_GET["type"]), "alphanumeric"))) { $ACTION_TYPE = $tmp_action_type; } elseif (isset($_POST["type"]) && ($tmp_action_type = clean_input(trim($_POST["type"]), "alphanumeric"))) { $ACTION_TYPE = $tmp_action_type; } unset($tmp_action_type); /** * Ensure that the selected community is editable by you. */ if ($COMMUNITY_ID) { $query = "SELECT * FROM `communities` WHERE `community_id` = " . $db->qstr($COMMUNITY_ID) . " AND `community_active` = '1'"; $community_details = $db->GetRow($query); if ($community_details) { $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/picklist.js\"></script>\n"; $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/elementresizer.js\"></script>\n"; $BREADCRUMB[] = array("url" => ENTRADA_URL . "/community" . $community_details["community_url"], "title" => limit_chars($community_details["community_title"], 50)); $BREADCRUMB[] = array("url" => ENTRADA_URL . "/communities?" . replace_query(), "title" => "Manage Members"); if ($ENTRADA_ACL->amIAllowed(new CommunityResource($COMMUNITY_ID), 'update')) { echo "<h1>" . html_encode($community_details["community_title"]) . "</h1>\n"; // Error Checking switch ($STEP) { case 3: case 2: switch ($ACTION_TYPE) { case "addguest": $PROCESSED = array(); $GUEST_PROXY_ID = 0; $GUEST_ACCESS = false; $GUEST_NEW_ACCESS = false; $member_add_success = 0; $member_add_failure = 0;
the_post_thumbnail(); ?> </figure> <?php } ?> <div class="info"><?php the_time('d.m.Y'); ?> </div> <h3><?php the_title(); ?> </h3> <p><?php echo limit_chars(get_the_excerpt(), 240); ?> </p> </a> </article> <?php } ?> </div> <?php echo paginacao(); ?> </section> <?php
$query = "\n\t\t\t\t\tSELECT a.*, b.`gallery_title`, b.`gallery_cgphoto_id`, b.`admin_notifications`, c.`notify_active`\n\t\t\t\t\tFROM `community_gallery_photos` AS a\n\t\t\t\t\tLEFT JOIN `community_galleries` AS b\n\t\t\t\t\tON a.`cgallery_id` = b.`cgallery_id`\n\t\t\t\t\tLEFT JOIN `community_notify_members` AS c\n\t\t\t\t\tON a.`cgphoto_id` = c.`record_id`\n\t\t\t\t\tAND c.`community_id` = a.`community_id`\n\t\t\t\t\tAND c.`notify_type` = 'photo-comment'\n\t\t\t\t\tAND c.`proxy_id` = " . $db->qstr($ENTRADA_USER->getID()) . "\n\t\t\t\t\tWHERE a.`community_id` = " . $db->qstr($COMMUNITY_ID) . "\n\t\t\t\t\tAND a.`cgphoto_id` = " . $db->qstr($RECORD_ID) . "\n\t\t\t\t\tAND a.`photo_active` = '1'\n\t\t\t\t\tAND b.`cpage_id` = " . $db->qstr($PAGE_ID) . " \n\t\t\t\t\tAND b.`gallery_active` = '1'"; $photo_record = $db->GetRow($query); if ($photo_record) { if (isset($photo_record["notify_active"])) { $notifications = $photo_record["notify_active"] ? true : false; if ($photo_record["notify_active"] != null) { $notify_record_exists = true; } } else { $notifications = false; $notify_record_exists = false; } if ((int) $photo_record["photo_active"]) { if (galleries_photo_module_access($RECORD_ID, "edit-photo")) { $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-gallery&id=" . $photo_record["cgallery_id"], "title" => limit_chars($photo_record["gallery_title"], 32)); $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-photo&id=" . $RECORD_ID, "title" => limit_chars($photo_record["photo_title"], 32)); $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=edit-photo&id=" . $RECORD_ID, "title" => "Edit Photo"); /** * Whether or not to process an updated photo. */ $update_photo_file = false; // Error Checking switch ($STEP) { case 2: /** * Not-Required (for edit) field "photo_file" / Select Local Photo. */ if (isset($_FILES["photo_file"])) { switch ($_FILES["photo_file"]["error"]) { case 0: if (@in_array($photo_mimetype = strtolower(trim($_FILES["photo_file"]["type"])), array_keys($VALID_MIME_TYPES))) {
</tr> <tr> <td colspan="3"> <a name="top-podcasts"></a><h2>Top <?php echo $TOP_PODCASTS_NUMBER; ?> Podcast Events</h2> </td> </tr> <?php if (is_array($podcast_stats["top_podcasts"]) && @count($podcast_stats["top_podcasts"])) { foreach ($podcast_stats["top_podcasts"] as $key => $result) { echo "<tr>\n"; echo "\t<td>" . ($key + 1) . ".</td>\n"; echo "\t<td>\n"; echo "\t\t<a href=\"" . ENTRADA_URL . "/events?id=" . $result["event_id"] . "\" style=\"font-weight: bold\" target=\"_blank\">" . html_encode(limit_chars($result["event_title"], 50)) . "</a> <span class=\"content-small\">(" . (int) $result["accesses"] . " time" . ($result["accesses"] != 1 ? "s" : "") . ")</span>\n"; echo "\t\t<div class=\"content-small\">Event on " . date(DEFAULT_DATE_FORMAT, $result["event_start"]) . "; Class of " . $result["event_cohort"] . "</div>\n"; echo "\t</td>\n"; echo "\t<td style=\"vertical-align: top\"><a href=\"" . ENTRADA_URL . "/file-event.php?id=" . $result["podcast_id"] . "\" style=\"font-size: 11px\">" . html_encode($result["file_name"]) . "</a></td>\n"; echo "</tr>\n"; } } else { ?> <tr> <td colspan="3"> <?php echo display_notice(array("The top podcasts are not currently available. There are podcasts in the system; however, it doesn't appear anyone has downloaded them.")); ?> </td> </tr> <?php
while (array_key_exists($category_acronym = substr($result["ctype_name"], 0, $letters), $category_types) && strlen($result["ctype_name"]) <= $letters) { if ($letters > 15) { break; } $letters++; $category_acronym = substr($result["ctype_name"], 0, $letters); } $category_types[$category_acronym] = "<strong>" . html_encode($category_acronym) . "</strong> = " . html_encode($result["ctype_name"]); echo "<tr id=\"event-" . $result["event_id"] . "\" class=\"event\">\n"; echo "\t<td class=\"modified\">" . html_encode($category_acronym) . "</td>\n"; echo "\t<td class=\"teacher\"><a href=\"mailto:" . html_encode($result["email"]) . "\">" . html_encode($result["fullname"]) . "</a></td>\n"; echo "\t<td class=\"phase\">" . html_encode($result["role"]) . "</td>\n"; echo "\t<td class=\"date-smallest\">" . date("D M d/y", $result["event_start"]) . "</td>\n"; echo "\t<td class=\"date-smallest\">" . date("D M d/y", $result["event_finish"]) . "</td>\n"; echo "\t<td class=\"region\">" . html_encode($result["region_name"]) . "</td>\n"; echo "\t<td class=\"title\">" . limit_chars(html_decode($result["event_title"]), 55, true, false) . "</td>\n"; echo "</tr>\n"; } ?> </tbody> </table> <div class="content-small" style="margin-top: 5px"> <?php echo implode(", ", $category_types); ?> </div> <form action="#" method="get"> <input type="hidden" id="dstamp" name="dstamp" value="<?php echo $DATE_START; ?> " />
$accessible = true; $files = communities_shares_latest($result["cshare_id"]); if ($result["release_date"] && $result["release_date"] > time() || $result["release_until"] && $result["release_until"] < time()) { $accessible = false; } echo "<li class=\"folder-" . ((int) $result["folder_icon"] ? (int) $result["folder_icon"] : 1) . "\">\n"; echo "\t<div" . (!$accessible ? " class=\"na\" style=\"padding: 4px\"" : "") . ">\n"; echo "\t\t" . ($COMMUNITY_MEMBER ? !$COMMUNITY_ADMIN ? $result["allow_member_upload"] == 1 && !$result["allow_member_read"] == 1 : false : $result["allow_troll_upload"] == 1 && !$result["allow_troll_read"] == 1 ? "<span id=\"folder-" . (int) $result["cshare_id"] . "-title\" style=\"font-weight: bold\">" . html_encode($result["folder_title"]) . "</span>\n" : "<a id=\"folder-" . (int) $result["cshare_id"] . "-title\" href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-folder&id=" . $result["cshare_id"] . "\" style=\"font-weight: bold\">" . html_encode(limit_chars($result["folder_title"], 58)) . "</a>\n"); echo "\t\t<span class=\"content-small\">(" . $files["total_files"] . " files)</span>"; /** * "?section=add-file&id=".$result["cshare_id"] * "?section=edit-file&id=".$file_uploaded["csfile_id"] * ( $file_uploaded != false ? "" : "") */ echo $COMMUNITY_MEMBER ? !$COMMUNITY_ADMIN ? $result["allow_member_upload"] == 1 : true : $result["allow_troll_upload"] == 1 ? " (<a class=\"action\" href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . ($file_uploaded == true && !$COMMUNITY_ADMIN && !($COMMUNITY_MEMBER ? $result["allow_member_read"] : $result["allow_troll_read"]) ? "?section=add-revision&id=" . $file_uploaded["csfile_id"] : "?section=add-file&id=" . $result["cshare_id"]) . "\">upload</a>)" : ""; echo communities_module_access($COMMUNITY_ID, $MODULE_ID, "edit-folder") ? " (<a class=\"action\" href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=edit-folder&id=" . $result["cshare_id"] . "\">edit</a>)" : ""; echo communities_module_access($COMMUNITY_ID, $MODULE_ID, "delete-folder") ? " (<a class=\"action\" href=\"javascript:folderDelete('" . $result["cshare_id"] . "')\">delete</a>)" : ""; echo "\t\t<div class=\"content-small\">" . ($result["folder_description"] != "" ? html_encode(limit_chars($result["folder_description"], 125)) : "") . "</div>\n"; echo "\t</div>\n"; echo "</li>\n"; } ?> </ul> <?php } else { $NOTICE++; $NOTICESTR[] = "There are currently no shared folders available in this community.<br /><br />" . (communities_module_access($COMMUNITY_ID, $MODULE_ID, "add-folder") ? "As a community adminstrator you can add shared folders by clicking <a href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=add-folder\">Add Shared Folder</a>." : "Please check back later."); echo display_notice(); } ?> </div>
if (!defined("COMMUNITY_INCLUDED") || !defined("IN_DISCUSSIONS")) { exit; } elseif (!$COMMUNITY_LOAD) { exit; } $HEAD[] = "<link href=\"" . ENTRADA_URL . "/javascript/calendar/css/xc2_default.css?release=" . html_encode(APPLICATION_VERSION) . "\" rel=\"stylesheet\" type=\"text/css\" media=\"all\" />"; $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/calendar/config/xc2_default.js?release=" . html_encode(APPLICATION_VERSION) . "\"></script>"; $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/calendar/script/xc2_inpage.js?release=" . html_encode(APPLICATION_VERSION) . "\"></script>"; $HEAD[] = "<script type=\"text/javascript\" src=\"" . COMMUNITY_URL . "/javascript/discussions.js?release=" . html_encode(APPLICATION_VERSION) . "\"></script>"; echo "<h1>New Discussion Post</h1>\n"; if ($RECORD_ID) { $query = "SELECT * FROM `community_discussions` WHERE `cdiscussion_id` = " . $db->qstr($RECORD_ID) . " AND `cpage_id` = " . $db->qstr($PAGE_ID) . " AND `community_id` = " . $db->qstr($COMMUNITY_ID); $discussion_record = $db->GetRow($query); if ($discussion_record) { if (discussions_module_access($RECORD_ID, "add-post")) { $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-forum&id=" . $discussion_record["cdiscussion_id"], "title" => limit_chars($discussion_record["forum_title"], 32)); $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=add-post&id=" . $RECORD_ID, "title" => "New Discussion Post"); communities_load_rte(); // Error Checking switch ($STEP) { case 2: /** * Required field "title" / Forum Title. */ if (isset($_POST["topic_title"]) && ($title = clean_input($_POST["topic_title"], array("notags", "trim")))) { $PROCESSED["topic_title"] = $title; } else { $ERROR++; $ERRORSTR[] = "The <strong>Post Title</strong> field is required."; } /**
<input type="submit" class="btn btn-primary" value="Browse" /> </td> </tr> </tfoot> <tbody> <tr> <td> </td> <td><label for="department" class="form-required">Browse Department:</label></td> <td> <select id="department" name="d" style="width: 95%"> <?php $query = "\n\t\t\t\t\t\t\t\t\tSELECT a.`department_id`, a.`department_title`, a.`organisation_id`, b.`entity_title`, c.`organisation_title`\n\t\t\t\t\t\t\t\t\tFROM `" . AUTH_DATABASE . "`.`departments` AS a\n\t\t\t\t\t\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`entity_type` AS b\n\t\t\t\t\t\t\t\t\tON a.`entity_id` = b.`entity_id`\n\t\t\t\t\t\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`organisations` AS c\n\t\t\t\t\t\t\t\t\tON a.`organisation_id` = c.`organisation_id`\n\t\t\t\t\t\t\t\t\tORDER BY c.`organisation_title` ASC, a.`department_title`"; $results = $db->GetAll($query); if ($results) { foreach ($results as $result) { echo "<option value=\"" . (int) $result["department_id"] . "\"" . (isset($browse_department) && (int) $browse_department && $browse_department == $result["department_id"] ? " selected=\"selected\"" : "") . ">" . html_encode(limit_chars($result["organisation_title"], 11)) . ": " . html_encode($result["department_title"]) . " " . ($result["entity_title"] ? "(" . html_encode($result["entity_title"]) . ")" : "") . "</option>\n"; } } ?> </select> </td> </tr> </tbody> </table> </form> </div> </div> <script type="text/javascript">setupAllTabs(true);</script> <?php if ($search_type && !$ERROR) { if ($total_pages > 1) {
echo "\t\t\t<td colspan=\"2\"> </td>\n"; echo "\t\t</tr>\n"; echo "\t\t<tr>\n"; echo "\t\t\t<td style=\"vertical-align: top\">Key Contact:</td>\n"; echo "\t\t\t<td>" . html_encode($APARTMENT_INFO["keys_firstname"] . " " . $APARTMENT_INFO["keys_lastname"]) . "</td>\n"; echo "\t\t</tr>\n"; if (trim($APARTMENT_INFO["keys_phone"])) { echo "\t<tr>\n"; echo "\t\t<td>Contact Number:</td>\n"; echo "\t\t<td>" . html_encode($APARTMENT_INFO["keys_phone"]) . "</td>\n"; echo "\t</tr>\n"; } if (trim($APARTMENT_INFO["keys_email"])) { echo "\t<tr>\n"; echo "\t\t<td>Contact E-Mail:</td>\n"; echo "\t\t<td><a href=\"mailto:" . html_encode($APARTMENT_INFO["keys_email"]) . "\">" . html_encode(limit_chars($APARTMENT_INFO["keys_email"], 30)) . "</a></td>\n"; echo "\t</tr>\n"; } } echo "\t</tbody>\n"; echo "</table>\n"; ?> </div> <div style="float: right; width: 58%"> <h2>Other Occupants During My Stay</h2> <?php if ($num_occupants) { echo "<ul class=\"menu\">\n"; foreach ($apt_occupants as $result) { echo "<li class=\"" . ($result["group"] == "student" ? "undergrad" : "postgrad") . "\">\n"; echo $result["fullname"] ? ($result["gender"] ? $result["gender"] == 1 ? "F: " : "M: " : "") . "<a href=\"" . ENTRADA_URL . "/people?profile=" . html_encode($result["username"]) . "\" target=\"_blank\">" . $result["fullname"] . "</a>" : $result["occupant_title"];
the_permalink(); ?> " title="<?php the_title(); ?> "><?php the_title(); ?> </a></h2> </header> <div class="post-content"> <?php if ($theme_options['index_excerpt']) { ?> <div class="post-entry"><?php print limit_chars(get_the_excerpt(), 250); ?> </div><?php } ?> </div> <footer class="post-meta clearfix"> <?php if ($theme_options['index_author']) { ?> <div class="post-author"><?php echo get_avatar(get_the_author_meta('user_email'), 30); ?> <?php the_author_posts_link(); ?>
$owner = true; } else { $query = "SELECT * FROM `assignment_contacts` WHERE `assignment_id` = " . $db->qstr($ASSIGNMENT_ID) . " AND `proxy_id` = " . $db->qstr($ENTRADA_USER->getID()); $assignment_contact = $db->GetRow($query); } if (isset($assignment_contact) && $assignment_contact) { $query = "SELECT CONCAT_WS(' ', `firstname`,`lastname`) AS `uploader` FROM `" . AUTH_DATABASE . "`.`user_data` WHERE `id` = " . $db->qstr($comment_record["file_owner"]); $user_name = $db->GetOne($query); $BREADCRUMB = array(); $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/gradebook", "title" => "Gradebooks"); $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/gradebook?" . replace_query(array("section" => "view", "id" => $comment_record["course_id"])), "title" => "Assignments"); $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/gradebook/assignments?" . replace_query(array("section" => "grade", "id" => $comment_record["course_id"], "assignment_id" => $comment_record["assignment_id"], "step" => false)), "title" => $comment_record["assignment_title"]); $BREADCRUMB[] = array("url" => ENTRADA_URL . "/profile/gradebook/assignments?" . replace_query(array("section" => "view", "id" => $ASSIGNMENT_ID, "pid" => $comment_record["file_owner"], "step" => false)), "title" => $user_name . "'s Submission"); $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/gradebook/assignments?" . replace_query(array("section" => "edit-comment", "id" => $ASSIGNMENT_ID, "cid" => $RECORD_ID, "step" => false)), "title" => "Edit Comment"); } else { $BREADCRUMB[] = array("url" => ENTRADA_URL . "/profile/gradebook/assignments?section=view&assignment_id=" . $ASSIGNMENT_ID . (isset($assignment_contact) && $assignment_contact ? "&pid=" . $comment_record["file_owner"] : ""), "title" => limit_chars($comment_record["assignment_title"], 32)); $BREADCRUMB[] = array("url" => ENTRADA_URL . "/profile/gradebook/assignments?section=edit-comment&assignment_id=" . $ASSIGNMENT_ID . "&cid=" . $RECORD_ID, "title" => "Edit Comment"); } communities_load_rte(); // Error Checking switch ($STEP) { case 2: /** * Required field "title" / Comment Title. */ if (isset($_POST["comment_title"]) && ($title = clean_input($_POST["comment_title"], array("notags", "trim")))) { $PROCESSED["comment_title"] = $title; } else { $PROCESSED["comment_title"] = ""; } /**
<td class="completed">Procedures</td> </tr> </thead> <tbody> <tr><td colspan="5"></td></tr> <?php $other = false; foreach ($results as $result) { $click_url = ENTRADA_URL . "/clerkship?core=" . $result["rotation_id"]; $clinical_encounters = clerkship_get_rotation_overview($result["rotation_id"]); if ($clinical_encounters["entries"]) { $click_url = ENTRADA_URL . "/clerkship/logbook?section=view&type=entries&core=" . $result["rotation_id"]; } else { $click_url = ENTRADA_URL . "/clerkship?core=" . $result["rotation_id"]; } echo "<tr><td class=\"region\"><a href=\"" . $click_url . "\" style=\"font-size: 11px\">" . limit_chars(html_decode($result["rotation_title"]), 55, true, false) . "</a></td>\n"; echo "<td class=\"completed\">" . blank_zero($clinical_encounters["entries"]) . "</td>\n"; echo "<td class=\"completed\">" . blank_zero($clinical_encounters["objectives"]) . "</td>\n"; echo "<td class=\"completed\">" . blank_zero($clinical_encounters["mandatories"]) . " " . ($clinical_encounters["other_mandatories"] ? " (" . $clinical_encounters["other_mandatories"] . ")" : '') . "</td>\n"; echo "<td class=\"completed\">" . blank_zero($clinical_encounters["procedures"]) . "</td></tr>\n"; } ?> </tbody> </table> <br /> <?php if ($other) { echo "<div style=\"color:#666; text-align:right;\">"; echo "Parenthisized (value) indicate mandatory objectives seen in other rotations."; echo "</div>\n"; }
} $objectives = array(); if ($event["objectives"]) { foreach ($event["objectives"] as $value) { $firstpart = substr($value, 0, strlen($value) - 1); $letter = substr($value, -1); if (!isset($objectives[$firstpart])) { $objectives[$firstpart] = $firstpart . $letter; } else { $objectives[$firstpart] .= ", " . $letter; } } } echo "<tr>\n"; echo "\t<td class=\"border-r\"><a href=\"" . ENTRADA_URL . "/events?id=" . $event["event_id"] . "\" target=\"_blank\">" . html_encode($event["event_title"]) . "</a></td>\n"; echo "\t<td class=\"border-r\">" . limit_chars($event["event_description"], 376) . "</td>\n"; echo "\t<td class=\"border-r\">" . $event["event_objectives"] . "</td>\n"; echo "\t<td class=\"border-r\">" . (!empty($event["objectives"]) ? "› " . implode("<br />› ", $objectives) : " ") . "</td>\n"; echo "\t<td class=\"border-r\">" . (!empty($event["presentations"]) ? "› " . implode("<br />› ", $event["presentations"]) : " ") . "</td>\n"; echo "</tr>\n"; } ?> </tbody> </table> <?php } else { echo display_notice(array("There are no learning events in this course during the selected duration.")); } } } }
default: $elective_word = ""; $cssclass = ""; break; } $elective = true; } else { $elective = false; $skip = false; } if (!$skip) { echo "<tr" . ($is_here && $cssclass != " class=\"in_draft\"" ? " class=\"current\"" : $cssclass) . ">\n"; echo "\t<td class=\"modified\"><img src=\"" . ENTRADA_URL . "/images/" . ($apartment_available ? "housing-icon-small.gif" : "pixel.gif") . "\" width=\"16\" height=\"16\" alt=\"\" title=\"\" style=\"border: 0px\" /></td>\n"; echo "\t<td class=\"type\">" . ($elective ? "Elective" . ($elective_word != "" ? " (" . $elective_word . ")" : "") : "Core Rotation") . "</td>\n"; echo "\t<td class=\"title\">" . html_encode($result["rotation_title"]) . "</td>\n"; echo "\t<td class=\"region\">" . html_encode($result["city"] == "" ? limit_chars($result["region_name"], 30) : $result["city"]) . "</td>\n"; echo "\t<td class=\"date-smallest\">" . date("D M d/y", $result["event_start"]) . "</td>\n"; echo "\t<td class=\"date-smallest\">" . date("D M d/y", $result["event_finish"]) . "</td>\n"; echo "</tr>\n"; } } ?> </tbody> </table> <?php } else { $NOTICE++; $NOTICESTR[] = $student_name . " has no scheduled clerkship rotations / electives in the system at this time."; echo display_notice(); } } else {
</colgroup> <thead> <tr> <td class="modified"> </td> <td class="title sortedASC"><div class="noLink">Quiz Title</div></td> <td class="completed">Questions</td> </tr> </thead> <tbody> <?php foreach ($results as $result) { echo "<tr id=\"quiz-" . $result["quiz_id"] . "\">\n"; echo "\t<td style=\"vertical-align: top\"><input type=\"radio\" id=\"quiz_id_" . $result["quiz_id"] . "\" name=\"quiz_id\" value=\"" . $result["quiz_id"] . "\"" . (isset($PROCESSED["quiz_id"]) && $PROCESSED["quiz_id"] == $result["quiz_id"] ? " checked=\"checked\"" : "") . " /></td>\n"; echo "\t<td style=\"vertical-align: top\">\n"; echo "\t\t<label for=\"quiz_id_" . $result["quiz_id"] . "\" class=\"form-nrequired\" style=\"font-weight: bold\">" . html_encode($result["quiz_title"]) . "</label>\n"; echo "\t\t<div class=\"content-small\" style=\"white-space: normal\">" . clean_input(limit_chars($result["quiz_description"], 150), "allowedtags") . "</div>\n"; if (in_array($result["quiz_id"], $existing_quiz_relationship)) { echo "<div class=\"display-notice-inline\"><img src=\"" . ENTRADA_URL . "/images/list-notice.gif\" width=\"11\" height=\"11\" alt=\"Notice\" title=\"Notice\" style=\"margin-right: 10px\" />This quiz is already attached to this community page.</div>"; } echo "\t</td>\n"; echo "\t<td style=\"vertical-align: top\" class=\"completed\">" . html_encode($result["question_total"]) . "</td>\n"; echo "</tr>\n"; } ?> </tbody> </table> </div> </div> <div id="footer"> <input type="hidden" name="go_forward" id="go_forward" value="0" /> <button class="btn" id="close-button" onclick="closeWizard()">Close</button>
break; } $elective = true; } else { $elective = false; $skip = false; } if (!$skip) { echo "<tr" . ($is_here && $cssclass != " class=\"in_draft\"" ? " class=\"current\"" : $cssclass) . ">\n"; echo "\t<td class=\"modified\">" . (!empty($click_url) ? "<a href=\"" . $click_url . "\" style=\"font-size: 11px\">" : "") . "<img src=\"" . ENTRADA_URL . "/images/" . ($apartment_available ? "housing-icon-small.gif" : "pixel.gif") . "\" width=\"16\" height=\"16\" alt=\"" . ($apartment_available ? "Detailed apartment information available." : "") . "\" title=\"" . ($apartment_available ? "Detailed apartment information available." : "") . "\" style=\"border: 0px\" />" . (!empty($click_url) ? "</a>" : "") . "</td>\n"; echo "\t<td class=\"type\">" . (!empty($click_url) ? "<a href=\"" . $click_url . "\" style=\"font-size: 11px\">" : "") . "" . ($elective ? "Elective" . ($elective_word != "" ? " (" . $elective_word . ")" : "") : "Core Rotation") . "" . (!empty($click_url) ? "</a>" : "") . "" . "</td>\n"; echo "\t<td class=\"date-smallest\">" . (!empty($click_url) ? "<a href=\"" . $click_url . "\" style=\"font-size: 11px\">" : "") . "" . date("D M d/y", $result["event_start"]) . "" . (!empty($click_url) ? "</a>" : "") . "</td>\n"; echo "\t<td class=\"date-smallest\">" . (!empty($click_url) ? "<a href=\"" . $click_url . "\" style=\"font-size: 11px\">" : "") . "" . date("D M d/y", $result["event_finish"]) . "" . (!empty($click_url) ? "</a>" : "") . "</td>\n"; echo "\t<td class=\"region\">" . (!empty($click_url) ? "<a href=\"" . $click_url . "\" style=\"font-size: 11px\">" : "") . "" . html_encode($result["city"] == "" ? limit_chars($result["region_name"], 30) : $result["city"]) . "" . (!empty($click_url) ? "</a>" : "") . "</td>\n"; echo "\t<td class=\"title\">"; echo "\t\t" . (!empty($click_url) ? "<a href=\"" . $click_url . "\" style=\"font-size: 11px\">" : "") . "<span title=\"" . $event_title . "\">" . limit_chars(html_decode($event_title), 55) . "</span>" . (!empty($click_url) ? "</a>" : ""); echo "\t</td>\n"; echo "</tr>\n"; } } ?> </tbody> </table> </div> <?php $accessible_rotation_ids = clerkship_rotations_access(); if (is_array($accessible_rotation_ids) && count($accessible_rotation_ids)) { $query = "\tSELECT " . $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["sb"] . " AS `sort_by`, a.`lentry_id`, d.`rotation_id`, a.`entry_active`\n FROM `" . CLERKSHIP_DATABASE . "`.`logbook_entries` AS a \n LEFT JOIN `" . CLERKSHIP_DATABASE . "`.`logbook_lu_locations` AS b\n ON a.`llocation_id` = b.`llocation_id`\n LEFT JOIN `" . CLERKSHIP_DATABASE . "`.`logbook_lu_sites` AS c\n ON a.`lsite_id` = c.`lsite_id`\n LEFT JOIN `" . CLERKSHIP_DATABASE . "`.`events` AS d\n ON a.`rotation_id` = d.`event_id`\n LEFT JOIN `" . CLERKSHIP_DATABASE . "`.`global_lu_rotations` AS e\n ON d.`rotation_id` = e.`rotation_id`\n WHERE a.`proxy_id` = " . $db->qstr($PROXY_ID) . "\n ORDER BY " . $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["sb"] . " ASC"; $results = $db->GetAll($query); if ($results) { $rotation_ids = array();
$cssclass = " class=\"rejected\""; break; default: $cssclass = ""; } } $getStudentsQuery = "SELECT `etype_id`\n\t\t\t\tFROM " . CLERKSHIP_DATABASE . ".`event_contacts`\n\t\t\t\tWHERE `event_id` = " . $db->qstr($result["event_id"]); $getStudentsResults = $db->GetAll($getStudentsQuery); foreach ($getStudentsResults as $student) { $name = get_account_data("firstlast", $student["etype_id"]); echo "<tr" . ($is_here ? " class=\"current\"" : $cssclass) . ">\n"; echo "\t<td class=\"modified\"> </td>\n"; echo "\t<td class=\"date\"><a href=\"" . $click_url . "\" style=\"font-size: 11px\">" . $name . "</a></td>\n"; echo "\t<td class=\"date\"><a href=\"" . $click_url . "\" style=\"font-size: 11px\">" . date(DEFAULT_DATE_FORMAT, $result["event_start"]) . "</a></td>\n"; echo "\t<td class=\"region\"><a href=\"" . $click_url . "\" style=\"font-size: 11px\">" . ($result["city"] == "" ? html_encode(limit_chars($result["region_name"], 30)) : $result["city"]) . "</a></td>\n"; echo "\t<td class=\"title\"><a href=\"" . $click_url . "\" style=\"font-size: 11px\">" . limit_chars(html_decode($result["event_title"]), 55, true, false) . "</a></td>\n"; echo "</tr>\n"; } } ?> </tbody> </table> <br /><br /> <?php } // Setup internal variables. $DISPLAY = true; if ($DISPLAY) { if ($_GET["gradyear"] || $_GET["gradyear"] === "0") { $GRADYEAR = trim($_GET["gradyear"]); @app_setcookie("student_search[gradyear]", trim($_GET["gradyear"]));
} elseif (isset($topic_record["parent_notify"])) { $notifications = $topic_record["parent_notify"] ? true : false; if ($topic_record["parent_notify"] != null) { $notify_record_exists = true; } } else { $notifications = false; $notify_record_exists = false; } if (discussion_topic_module_access($RECORD_ID, "edit-post")) { $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-forum&id=" . $topic_record["cdiscussion_id"], "title" => limit_chars($topic_record["forum_title"], 16)); if (!$topic_record["cdtopic_parent"]) { $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-post&id=" . $RECORD_ID, "title" => limit_chars($topic_record["topic_title"], 16)); } else { $parent_title = $db->GetOne("SELECT `topic_title` FROM `community_discussion_topics` WHERE `cdtopic_id` = " . $topic_record["cdtopic_parent"]); $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-post&id=" . $topic_record["cdtopic_parent"], "title" => limit_chars($parent_title, 12) . " Reply"); } $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=edit-post&id=" . $RECORD_ID, "title" => "Edit Post"); /** * This is used to determine what information is displayed to the user * since this one file (edit-post) is used to edit both topic posts and replies. */ $POST_TYPE = !(int) $topic_record["cdtopic_parent"] ? "post" : "reply"; communities_load_rte(); if ($POST_TYPE == "post") { // Error Checking switch ($STEP) { case 2: /** * Required field "title" / Forum Title. */
exit; } elseif ($QUIZ_TYPE == "community_page" && !$community_admin) { application_log("error", "Someone attempted to view the results of an aquiz_id [" . $RECORD_ID . "] that they were not entitled to view."); header("Location: " . ENTRADA_URL . "/community/" . $quiz_record["community_url"] . ":" . $quiz_record["page_url"]); exit; } else { $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/livepipe/progressbar.js?release=" . APPLICATION_VERSION . "\"></script>"; if ($QUIZ_TYPE == "event") { $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/events?section=content&id=" . $quiz_record["content_id"], "title" => limit_chars($quiz_record["content_title"], 32)); if ($ENTRADA_ACL->amIAllowed(new EventContentResource($quiz_record["content_id"], $quiz_record["course_id"], $quiz_record["organisation_id"]), "update")) { $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/" . $MODULE . "?section=edit&id=" . $quiz_record["quiz_id"], "title" => limit_chars($quiz_record["quiz_title"], 32)); } } else { $BREADCRUMB[] = array("url" => ENTRADA_URL . "/community" . $quiz_record["community_url"] . ":" . $quiz_record["page_url"], "title" => limit_chars($quiz_record["content_title"], 32)); if ($community_admin) { $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/" . $MODULE . "?section=edit&id=" . $quiz_record["quiz_id"], "title" => limit_chars($quiz_record["quiz_title"], 32)); } } $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/" . $MODULE . "?section=results&id=" . $RECORD_ID, "title" => "Quiz Results"); if ($QUIZ_TYPE == "event" && $quiz_record["audience_type"] == "cohort") { $event_cohort = $quiz_record["event_cohort"]; } else { $event_cohort = 0; } $calculation_targets = array(); $calculation_targets["all"] = "all quiz respondents"; $calculation_targets["student"] = "all students"; $active_cohorts = groups_get_active_cohorts($ENTRADA_USER->getActiveOrganisation()); if (isset($active_cohorts) && !empty($active_cohorts)) { foreach ($active_cohorts as $cohort) { $calculation_targets["student:" . $cohort["group_id"]] = " " . html_encode($cohort["group_name"]);
*/ } else { $NOTICE++; $NOTICESTR[] = "This announcement was only accessible until <strong>" . date(DEFAULT_DATE_FORMAT, $release_until) . "</strong>.<br /><br />Please contact your community administrators for further assistance."; $allow_to_load = false; } } else { $NOTICE++; $NOTICESTR[] = "This announcement will not be accessible until <strong>" . date(DEFAULT_DATE_FORMAT, $release_date) . "</strong>.<br /><br />Please check back at this time, thank-you."; $allow_to_load = false; } } if (!$allow_to_load) { echo display_notice(); } else { $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?id=" . $RECORD_ID, "title" => limit_chars($result["announcement_title"], 32)); /** * If there is time release properties, display them to the browsing users. */ if (($release_date = (int) $result["release_date"]) && $release_date > time()) { $NOTICE++; $NOTICESTR[] = "This discussion post will not be accessible to others until <strong>" . date(DEFAULT_DATE_FORMAT, $release_date) . "</strong>."; } elseif ($release_until = (int) $result["release_until"]) { if ($release_until > time()) { $NOTICE++; $NOTICESTR[] = "This announcement will be accessible until <strong>" . date(DEFAULT_DATE_FORMAT, $release_until) . "</strong>."; } else { /** * Only administrators or people who wrote the post will get this. */ $NOTICE++;
} if ($question_types && isset($_GET["type"]) && in_array($_GET["type"], $question_type_ids)) { $set_type = true; $type = clean_input($_GET["type"], "numeric"); } else { $set_type = false; $type = 1; } if (isset($_GET["qquestion_id"]) && ($tmp_input = clean_input($_GET["qquestion_id"], "int"))) { $qquestion_group_id = $tmp_input; } if ($RECORD_ID) { $quiz_record = Models_Quiz::fetchRowByID($RECORD_ID); if ($quiz_record && $ENTRADA_ACL->amIAllowed(new QuizResource($quiz_record->getQuizID()), "update")) { if ($ALLOW_QUESTION_MODIFICATIONS) { $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/" . $MODULE . "?section=edit&id=" . $RECORD_ID, "title" => limit_chars($quiz_record->getQuizTitle(), 32)); $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/" . $MODULE . "?section=add-question&id=" . $RECORD_ID, "title" => "Add Quiz Question"); /** * Load the rich text editor. */ load_rte("advanced"); if ($type == "3") { $STEP = 2; $_POST["question_text"] = "Page Break"; $_POST["questiontype_id"] = $type; $_POST["post_action"] = "content"; } // Error Checking switch ($STEP) { case 2: /**
} } else { $query = "SELECT * FROM `community_members` WHERE `community_id` = " . $db->qstr($quiz_record["community_id"]) . " AND `proxy_id` = " . $db->qstr($ENTRADA_USER->getActiveId()) . " AND `member_active` = '1' AND `member_acl` = '1'"; $result = $db->GetRow($query); if ($result) { $is_administrator = true; } } if ($is_administrator || $quiz_record["proxy_id"] == $ENTRADA_USER->getActiveId()) { $respondent_name = get_account_data("firstlast", $quiz_record["proxy_id"]); if ($QUIZ_TYPE == "event") { $BREADCRUMB[] = array("url" => ENTRADA_URL . "/events?id=" . $quiz_record["event_id"], "title" => limit_chars($quiz_record["content_title"], 32)); } else { $BREADCRUMB[] = array("url" => ENTRADA_URL . "/community" . $quiz_record["community_url"] . ":" . $quiz_record["page_url"], "title" => limit_chars($quiz_record["content_title"], 32)); } $BREADCRUMB[] = array("url" => ENTRADA_URL . "/" . $MODULE . "?section=results" . ($QUIZ_TYPE == "community_page" ? "&community=true" : "") . "&id=" . $RECORD_ID, "title" => limit_chars($quiz_record["quiz_title"], 32)); if ($is_administrator) { $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/" . $MODULE . "?section=results" . ($QUIZ_TYPE == "community_page" ? "&community=true" : "") . "&id=" . $quiz_record["aquiz_id"], "title" => "Quiz Results"); $BREADCRUMB[] = array("url" => "", "title" => $respondent_name); } /** * Providing there is no expiry date, or the expiry date is in the * future on both the quiz and the event, allow them to continue. */ if ($is_administrator || $quiz_record["quiztype_code"] == "immediate" || $quiz_record["quiztype_code"] == "delayed" && ((int) $quiz_record["release_until"] === 0 || $quiz_record["release_until"] <= time())) { $quiz_score = $quiz_record["quiz_score"]; $quiz_value = $quiz_record["quiz_value"]; $query = "\tSELECT a.*\n\t\t\t\t\t\t\t\tFROM `quiz_questions` AS a\n\t\t\t\t\t\t\t\tWHERE a.`quiz_id` = " . $db->qstr($quiz_record["quiz_id"]) . "\n\t\t\t\t\t\t\t\tAND a.`question_active` = '1'\n\t\t\t\t\t\t\t\tORDER BY a.`question_order` ASC"; $questions = $db->GetAll($query); $questions = Models_Quiz_Question::fetchAllRecords($quiz_record["quiz_id"]); if ($questions) {
if (isset($_GET["id"]) && ($tmp_input = clean_input($_GET["id"], "int"))) { $ASCHEDULE_ID = $tmp_input; } if ($ASCHEDULE_ID) { $query = "\tSELECT a.*, b.*, c.`region_name`, d.`province`, e.`country`, g.`department_id`, g.`department_title`\n\t\t\t\t\t\tFROM `" . CLERKSHIP_DATABASE . "`.`apartments` AS a\n\t\t\t\t\t\tLEFT JOIN `" . CLERKSHIP_DATABASE . "`.`apartment_schedule` AS b\n\t\t\t\t\t\tON b.`apartment_id` = a.`apartment_id`\n\t\t\t\t\t\tLEFT JOIN `" . CLERKSHIP_DATABASE . "`.`regions` AS c\n\t\t\t\t\t\tON c.`region_id` = a.`region_id`\n\t\t\t\t\t\tLEFT JOIN `global_lu_provinces` AS d\n\t\t\t\t\t\tON d.`province_id` = a.`province_id`\n\t\t\t\t\t\tLEFT JOIN `global_lu_countries` AS e\n\t\t\t\t\t\tON e.`countries_id` = a.`countries_id`\n\t\t\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`departments` AS g\n\t\t\t\t\t\tON a.`department_id` = g.`department_id`\n\t\t\t\t\t\tWHERE b.`aschedule_id` = " . $db->qstr($ASCHEDULE_ID) . "\n\t\t\t\t\t\tAND b.`aschedule_status` = 'published'"; $APARTMENT_INFO = $db->GetRow($query); if ($APARTMENT_INFO) { /** * Check the owner of this event to ensure it's the correct proxy_id. */ if ($APARTMENT_INFO["proxy_id"] == $ENTRADA_USER->getID()) { if ((int) $APARTMENT_INFO["event_id"] && $APARTMENT_INFO["occupant_type"] == "undergrad") { $query = "\tSELECT a.*, b.`etype_id` AS `proxy_id`, c.`rotation_title`\n\t\t\t\t\t\t\t\t\tFROM `" . CLERKSHIP_DATABASE . "`.`events` AS a\n\t\t\t\t\t\t\t\t\tLEFT JOIN `" . CLERKSHIP_DATABASE . "`.`event_contacts` AS b\n\t\t\t\t\t\t\t\t\tON b.`event_id` = a.`event_id`\n\t\t\t\t\t\t\t\t\tLEFT JOIN `" . CLERKSHIP_DATABASE . "`.`global_lu_rotations` AS c\n\t\t\t\t\t\t\t\t\tON c.`rotation_id` = a.`rotation_id`\n\t\t\t\t\t\t\t\t\tWHERE a.`event_id` = " . $db->qstr($APARTMENT_INFO["event_id"]); $EVENT_INFO = $db->GetRow($query); if ($EVENT_INFO) { $BREADCRUMB[] = array("url" => "", "title" => limit_chars($EVENT_INFO["rotation_title"] . " Rotation", 32)); } } else { $EVENT_INFO = false; } /** * All is good, load the requested view section. */ $module_file = $router->getRoute(); if ($module_file) { require_once $module_file; } } else { application_log("error", "Proxy_id [" . $ENTRADA_USER->getID() . "] attempted to view aschedule_id [" . $ASCHEDULE_ID . "] which did not belong to them."); header("Location: " . ENTRADA_URL . "/regionaled"); exit;
*/ if (!defined("COMMUNITY_INCLUDED") || !defined("IN_SHARES")) { exit; } elseif (!$COMMUNITY_LOAD) { exit; } $HEAD[] = "<script type=\"text/javascript\" src=\"" . COMMUNITY_URL . "/javascript/shares.js?release=" . html_encode(APPLICATION_VERSION) . "\"></script>"; echo "<h1>Edit File Comment</h1>\n"; if ($RECORD_ID) { $query = "\n\t\t\t\t\tSELECT a.*, b.`file_title`, c.`folder_title`, c.`admin_notifications`\n\t\t\t\t\tFROM `community_share_comments` AS a\n\t\t\t\t\tLEFT JOIN `community_share_files` AS b\n\t\t\t\t\tON a.`cshare_id` = b.`cshare_id`\n\t\t\t\t\tLEFT JOIN `community_shares` AS c\n\t\t\t\t\tON a.`cshare_id` = c.`cshare_id`\n\t\t\t\t\tWHERE a.`community_id` = " . $db->qstr($COMMUNITY_ID) . "\n\t\t\t\t\tAND a.`cscomment_id` = " . $db->qstr($RECORD_ID) . "\n\t\t\t\t\tAND c.`cpage_id` = " . $db->qstr($PAGE_ID) . "\n\t\t\t\t\tAND a.`comment_active` = '1'\n\t\t\t\t\tAND b.`file_active` = '1'\n\t\t\t\t\tAND c.`folder_active` = '1'"; $comment_record = $db->GetRow($query); if ($comment_record) { if ((int) $comment_record["comment_active"]) { if (shares_comment_module_access($RECORD_ID, "edit-comment")) { $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-folder&id=" . $comment_record["cshare_id"], "title" => limit_chars($comment_record["folder_title"], 32)); $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-file&id=" . $comment_record["csfile_id"], "title" => limit_chars($comment_record["file_title"], 32)); $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=edit-comment&id=" . $RECORD_ID, "title" => "Edit File Comment"); communities_load_rte(); // Error Checking switch ($STEP) { case 2: /** * Required field "title" / Comment Title. */ if (isset($_POST["comment_title"]) && ($title = clean_input($_POST["comment_title"], array("notags", "trim")))) { $PROCESSED["comment_title"] = $title; } else { $PROCESSED["comment_title"] = ""; } /** * Non-Required field "description" / Comment Body
} else { $elective = false; $skip = false; } if (!$click_url) { $click_url = ENTRADA_URL . "/admin/clerkship/electives?section=edit&id=" . $result["event_id"]; } if (!$skip) { echo "<tr" . ($is_here && $cssclass != " class=\"in_draft\"" ? " class=\"current\"" : $cssclass) . ">\n"; echo "\t<td class=\"modified\"><a href=\"" . $click_url . "\" style=\"font-size: 11px\"><img src=\"" . ENTRADA_URL . "/images/" . ($apartment_available ? "housing-icon-small.gif" : "pixel.gif") . "\" width=\"16\" height=\"16\" alt=\"" . ($apartment_available ? "Detailed apartment information available." : "") . "\" title=\"" . ($apartment_available ? "Detailed apartment information available." : "") . "\" style=\"border: 0px\" /></a></td>\n"; echo "\t<td class=\"type\"><a href=\"" . $click_url . "\" style=\"font-size: 11px\">" . ($elective ? "Elective" . ($elective_word != "" ? " (" . $elective_word . ")" : "") : "Core Rotation") . "</a>" . "</td>\n"; echo "\t<td class=\"date-smallest\"><a href=\"" . $click_url . "\" style=\"font-size: 11px\">" . date("D M d/y", $result["event_start"]) . "</a></td>\n"; echo "\t<td class=\"date-smallest\"><a href=\"" . $click_url . "\" style=\"font-size: 11px\">" . date("D M d/y", $result["event_finish"]) . "</a></td>\n"; echo "\t<td class=\"region\"><a href=\"" . $click_url . "\" style=\"font-size: 11px\">" . html_encode($result["city"] == "" ? limit_chars($result["region_name"], 30) : $result["city"]) . "</a></td>\n"; echo "\t<td class=\"title\">"; echo "\t\t<a href=\"" . $click_url . "\" style=\"font-size: 11px\"><span title=\"" . $event_title . "\">" . limit_chars(html_decode($event_title), 55) . "</span></a>"; echo "\t</td>\n"; echo "</tr>\n"; } } ?> </tbody> </table> </div> <div class="tab-page" id="encounters"> <h3 class="tab">Logged Encounters</h3> <?php if (isset($_GET["ids"]) && (int) $_GET["ids"]) { $PROXY_ID = $_GET["ids"]; } if (isset($_GET["sb"])) {
default: $elective_word = ""; $cssclass = ""; break; } $elective = true; } else { $elective = false; $skip = false; } if (!$skip) { echo "<tr" . ($is_here && $cssclass != " class=\"in_draft\"" ? " class=\"current\"" : $cssclass) . ">\n"; echo "\t<td class=\"modified\">" . ($apartment_available ? "<a href=\"" . $click_url . "\">" : "") . "<img src=\"" . ENTRADA_RELATIVE . "/images/" . ($apartment_available ? "housing-icon-small.gif" : "pixel.gif") . "\" width=\"16\" height=\"16\" alt=\"" . ($apartment_available ? "Detailed apartment information available." : "") . "\" title=\"" . ($apartment_available ? "Detailed apartment information available." : "") . "\" style=\"border: 0px\" />" . ($apartment_available ? "</a>" : "") . "</td>\n"; echo "\t<td class=\"type\">" . ($apartment_available || $elective ? "<a href=\"" . $click_url . "\" style=\"font-size: 11px\">" : "") . ($elective ? "Elective" . ($elective_word != "" ? " (" . $elective_word . ")" : "") : "Core Rotation") . ($apartment_available || $elective ? "</a>" : "") . "</td>\n"; echo "\t<td class=\"title\"><span title=\"" . $event_title . "\">" . ($apartment_available ? "<a href=\"" . $click_url . "\" style=\"font-size: 11px\">" : "") . limit_chars(html_decode($event_title), 55) . ($apartment_available ? "</a>" : "") . "</span></td>\n"; echo "\t<td class=\"region\">" . ($apartment_available || $elective ? "<a href=\"" . $click_url . "\" style=\"font-size: 11px\">" : "") . html_encode($result["city"] == "" ? limit_chars($result["region_name"], 30) : $result["city"]) . ($apartment_available || $elective ? "</a>" : "") . "</td>\n"; echo "\t<td class=\"date-smallest\">" . ($apartment_available ? "<a href=\"" . $click_url . "\" style=\"font-size: 11px\">" : "") . date("D M d/y", $result["event_start"]) . ($apartment_available ? "</a>" : "") . "</td>\n"; echo "\t<td class=\"date-smallest\">" . ($apartment_available ? "<a href=\"" . $click_url . "\" style=\"font-size: 11px\">" : "") . date("D M d/y", $result["event_finish"]) . ($apartment_available ? "</a>" : "") . "</td>\n"; echo "</tr>\n"; } } ?> </tbody> </table> <div style="margin-top: 15px; text-align: right"> <a href="<?php echo ENTRADA_RELATIVE; ?> /clerkship" style="font-size: 11px">Click here to view your full schedule.</a> </div> <?php
if (!defined("PARENT_INCLUDED") || !defined("IN_QUIZZES")) { exit; } elseif (!isset($_SESSION["isAuthorized"]) || !$_SESSION["isAuthorized"]) { header("Location: " . ENTRADA_URL); exit; } elseif (!$ENTRADA_ACL->amIAllowed('quiz', 'update', false)) { $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/admin/" . $MODULE . "\\'', 15000)"; $ERRORSTR[] = "Your account does not have the permissions required to use this feature of this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance."; echo display_error(); application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] does not have access to this module [" . $MODULE . "]"); } else { if ($RECORD_ID) { $quiz = Models_Quiz::fetchRowByID($RECORD_ID); $PROCESSED = $quiz->toArray(); if ($PROCESSED && $ENTRADA_ACL->amIAllowed(new QuizResource($PROCESSED["quiz_id"]), "update")) { $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/" . $MODULE . "?section=edit&id=" . $RECORD_ID, "title" => limit_chars($PROCESSED["quiz_title"], 32)); $PROCESSED["associated_proxy_ids"] = array(); /** * Load the rich text editor. */ load_rte(); // Error Checking switch ($STEP) { case 2: /** * Required field "quiz_title" / Quiz Title. */ if (isset($_POST["quiz_title"]) && ($tmp_input = clean_input($_POST["quiz_title"], array("notags", "trim")))) { $PROCESSED["quiz_title"] = $tmp_input; } else { add_error("The <strong>Quiz Title</strong> field is required.");
} echo "<tr>\n"; echo "\t<td style=\"font-family: monospace\">\n"; if (strtotime("00:00:00", $result["event_start"]) != strtotime("00:00:00", $result["event_finish"])) { echo date(DEFAULT_DATE_FORMAT, $result["event_start"]) . "<br />"; echo date(DEFAULT_DATE_FORMAT, $result["event_finish"]); } else { echo date("H:i", $result["event_start"]) . " - " . date("H:i", $result["event_finish"]); } if (isset($result["event_location"]) && trim($result["event_location"]) != "") { echo "\n<br /><br />Location: " . $result["event_location"]; } $RECORD_AUTHOR = $result["proxy_id"]; echo "\t</td>\n"; echo "\t<td style=\"padding-bottom: 15px\">\n"; echo "\t\t<a href=\"" . COMMUNITY_RELATIVE . $COMMUNITY_URL . ":" . $PAGE_URL . "?id=" . $result["cevent_id"] . "\" id=\"event-" . $result["cevent_id"] . "-title\">" . html_encode($result["event_title"]) . "</a>\n"; echo " (<a class=\"action\" href=\"javascript:eventRelease('" . $result["cevent_id"] . "')\">release</a>)"; echo communities_module_access($COMMUNITY_ID, $MODULE_ID, "edit") ? " (<a class=\"action\" href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=edit&id=" . $result["cevent_id"] . "\">edit</a>)" : ""; echo communities_module_access($COMMUNITY_ID, $MODULE_ID, "delete") ? " (<a class=\"action\" href=\"javascript:eventDelete('" . $result["cevent_id"] . "')\">delete</a>)" : ""; echo "\t\t<div class=\"content-small\">" . limit_chars(strip_tags(str_replace("<br />", " ", $result["event_description"])), 150) . "</div>"; echo "\t</td>\n"; echo "</tr>\n"; } echo "</tbody>\n"; echo "</table>\n"; } else { $NOTICE++; $NOTICESTR[] = "<strong>No Events Requiring Moderation</strong><br />There have been no events posted by the users to this page which require moderation, please check again later."; echo display_notice(); } }
*/ if (!defined("COMMUNITY_INCLUDED") || !defined("IN_SHARES")) { exit; } elseif (!$COMMUNITY_LOAD) { exit; } $HEAD[] = "<script type=\"text/javascript\" src=\"" . COMMUNITY_URL . "/javascript/shares.js?release=" . html_encode(APPLICATION_VERSION) . "\"></script>"; echo "<h1>Upload Revised File</h1>\n"; if ($RECORD_ID) { $query = "\n\t\t\t\t\tSELECT a.*, b.`folder_title`, b.`allow_member_read`, \n\t\t\t\t\tb.`allow_troll_read`, b.`allow_member_upload`, b.`allow_troll_upload`\n\t\t\t\t\tFROM `community_share_files` AS a\n\t\t\t\t\tLEFT JOIN `community_shares` AS b\n\t\t\t\t\tON a.`cshare_id` = b.`cshare_id`\n\t\t\t\t\tWHERE a.`community_id` = " . $db->qstr($COMMUNITY_ID) . "\n\t\t\t\t\tAND b.`cpage_id` = " . $db->qstr($PAGE_ID) . "\n\t\t\t\t\tAND a.`csfile_id` = " . $db->qstr($RECORD_ID) . "\n\t\t\t\t\tAND a.`file_active` = '1'\n\t\t\t\t\tAND b.`folder_active` = '1'"; $file_record = $db->GetRow($query); if ($file_record) { if ((int) $file_record["file_active"]) { if (shares_file_module_access($RECORD_ID, "add-revision")) { $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-folder&id=" . $file_record["cshare_id"], "title" => limit_chars($file_record["folder_title"], 25)); $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-file&id=" . $RECORD_ID, "title" => limit_chars($file_record["file_title"], 25)); $BREADCRUMB[] = array("url" => COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=add-revision&id=" . $RECORD_ID, "title" => "Upload Revised File"); // Error Checking switch ($STEP) { case 2: if (isset($_FILES["uploaded_file"])) { switch ($_FILES["uploaded_file"]["error"]) { case 0: if (($file_filesize = (int) trim($_FILES["uploaded_file"]["size"])) <= $VALID_MAX_FILESIZE) { $query = "\n\t\t\t\t\t\t\t\t\t\t\t\tSELECT `file_version`\n\t\t\t\t\t\t\t\t\t\t\t\tFROM `community_share_file_versions`\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE `csfile_id` = " . $db->qstr($RECORD_ID) . "\n\t\t\t\t\t\t\t\t\t\t\t\tAND `cshare_id` = " . $db->qstr($file_record["cshare_id"]) . "\n\t\t\t\t\t\t\t\t\t\t\t\tAND `community_id` = " . $db->qstr($COMMUNITY_ID) . "\n\t\t\t\t\t\t\t\t\t\t\t\tAND `file_active` = '1'\n\t\t\t\t\t\t\t\t\t\t\t\tORDER BY `file_version` DESC\n\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 0, 1"; $result = $db->GetRow($query); if ($result) { $PROCESSED["file_version"] = $result["file_version"] + 1; } else { $PROCESSED["file_version"] = 1; }