当前位置: 首页>>代码示例>>PHP>>正文


PHP limit_chars函数代码示例

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


在下文中一共展示了limit_chars函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: widget

    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;
        }
    }
开发者ID:CoordCulturaDigital-Minc,项目名称:cdigital2014,代码行数:45,代码来源:widget-comentarios.php

示例2: elseif

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;
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:members.inc.php

示例3: the_post_thumbnail

            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 
开发者ID:kalebweb,项目名称:delibera,代码行数:31,代码来源:search.php

示例4: array

 $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&amp;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))) {
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:edit-photo.inc.php

示例5: foreach

			</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 
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:report-on-podcasting.inc.php

示例6: while

                    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;
                ?>
" />
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:index.inc.php

示例7: communities_shares_latest

        $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&amp;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&amp;id=".$result["cshare_id"]
         * "?section=edit-file&amp;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&amp;id=" . $file_uploaded["csfile_id"] : "?section=add-file&amp;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&amp;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>
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:index.inc.php

示例8: elseif

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.";
                    }
                    /**
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:add-post.inc.php

示例9: foreach

						<input type="submit" class="btn btn-primary" value="Browse" />
					</td>
				</tr>
			</tfoot>
			<tbody>
				<tr>
					<td>&nbsp;</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) {
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:index.inc.php

示例10: html_encode

        echo "\t\t\t<td colspan=\"2\">&nbsp;</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"];
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:index.inc.php

示例11: the_permalink

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();
    ?>
开发者ID:CoordCulturaDigital-Minc,项目名称:cdigital2014,代码行数:31,代码来源:loop.php

示例12: CONCAT_WS

     $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&amp;assignment_id=" . $ASSIGNMENT_ID . (isset($assignment_contact) && $assignment_contact ? "&amp;pid=" . $comment_record["file_owner"] : ""), "title" => limit_chars($comment_record["assignment_title"], 32));
     $BREADCRUMB[] = array("url" => ENTRADA_URL . "/profile/gradebook/assignments?section=edit-comment&amp;assignment_id=" . $ASSIGNMENT_ID . "&amp;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"] = "";
         }
         /**
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:edit-comment.inc.php

示例13: foreach

			<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"] ? "&nbsp;(" . $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";
        }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:select.inc.php

示例14: array

                        }
                        $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"]) ? "&rsaquo; " . implode("<br />&rsaquo; ", $objectives) : "&nbsp;") . "</td>\n";
                        echo "\t<td class=\"border-r\">" . (!empty($event["presentations"]) ? "&rsaquo; " . implode("<br />&rsaquo; ", $event["presentations"]) : "&nbsp;") . "</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."));
                }
            }
        }
    }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:curriculum-review.inc.php

示例15: html_encode

                        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 {
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:31,代码来源:view.inc.php


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