コード例 #1
0
 $limit_parameter = (int) ($RESULTS_PER_PAGE * $PAGE_CURRENT - $RESULTS_PER_PAGE);
 $query = sprintf($query_search, $limit_parameter, $RESULTS_PER_PAGE);
 $results = $db->GetAll($query);
 if ($results) {
     echo "<div class=\"searchTitle\">\n";
     echo "\t<table style=\"width: 100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
     echo "\t<tbody>\n";
     echo "\t\t<tr>\n";
     echo "\t\t\t<td style=\"font-size: 14px; font-weight: bold; color: #003366\">Search Results:</td>\n";
     echo "\t\t\t<td style=\"text-align: right; font-size: 10px; color: #666666; overflow: hidden; white-space: nowrap\">" . $TOTAL_ROWS . " Result" . ($TOTAL_ROWS != 1 ? "s" : "") . " Found. Results " . ($limit_parameter + 1) . " - " . ($RESULTS_PER_PAGE + $limit_parameter <= $TOTAL_ROWS ? $RESULTS_PER_PAGE + $limit_parameter : $TOTAL_ROWS) . " for &quot;<strong>" . html_encode($SEARCH_QUERY) . "</strong>&quot; shown below.</td>\n";
     echo "\t\t</tr>\n";
     echo "\t</tbody>\n";
     echo "\t</table>\n";
     echo "</div>";
     foreach ($results as $result) {
         $description = search_description($result["event_objectives"] . " " . $result["event_goals"]);
         echo "<div id=\"result-" . $result["event_id"] . "\" style=\"width: 100%; margin-bottom: 10px; line-height: 16px;\">\n";
         echo "\t<a href=\"" . ENTRADA_URL . "/events?id=" . $result["event_id"] . "\" style=\"font-weight: bold\">" . html_encode($result["event_title"]) . "</a> <span class=\"content-small\">Event on " . date(DEFAULT_DATE_FORMAT, $result["event_start"]) . "; " . ($result["audience_type"] == "cohort" ? html_encode(groups_get_name($result["event_cohort"])) : "Group Activity") . "</span><br />\n";
         echo ($description ? $description : "Description not available.") . "\n";
         echo "\t<div style=\"white-space: nowrap; overflow: hidden\"><a href=\"" . ENTRADA_URL . "/events?id=" . $result["event_id"] . "\" style=\"color: green; font-size: 11px\" target=\"_blank\">" . ENTRADA_URL . "/events?id=" . $result["event_id"] . "</a></div>\n";
         echo "</div>\n";
     }
 } else {
     if (strlen($SEARCH_QUERY) > 3) {
         echo "<div class=\"display-notice\" style=\"margin-top: 20px; padding: 15px\">\n";
         echo "\t<div style=\"font-side: 13px; font-weight: bold\">No Matching Teaching Events</div>\n";
         echo "\tThere are no teaching events found which contain matches to &quot;<strong>" . html_encode($SEARCH_QUERY) . "</strong>&quot;.";
         if ($SEARCH_CLASS || $SEARCH_YEAR || $SEARCH_ORGANISATION) {
             echo "<br /><br />\n";
             echo "You may wish to try modifying or removing the Graduating Class, Academic Year, or Organisation limiters.\n";
         }
コード例 #2
0
     echo "\t<table style=\"width: 100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
     echo "\t<tbody>\n";
     echo "\t\t<tr>\n";
     echo "\t\t\t<td style=\"font-size: 13px; font-weight: bold;\">Results:</td>\n";
     echo "\t\t\t<td style=\"text-align: right; font-size: 10px; color: #666666; overflow: hidden; white-space: nowrap\">" . $TOTAL_ROWS . " Result" . ($TOTAL_ROWS != 1 ? "s" : "") . " Found. Results " . ($limit_parameter + 1) . " - " . ($RESULTS_PER_PAGE + $limit_parameter <= $TOTAL_ROWS ? $RESULTS_PER_PAGE + $limit_parameter : $TOTAL_ROWS) . " for &quot;<strong>" . html_encode($SEARCH_QUERY) . "</strong>&quot; shown below.</td>\n";
     echo "\t\t</tr>\n";
     echo "\t\t</tbody>\n";
     echo "\t</table>\n";
     echo "</div>";
     foreach ($results as $result) {
         $category_title = "";
         if ($result["category_id"] && ($category_details = communities_fetch_category($result["category_id"]))) {
             $category_title = $category_details["category_title"];
         }
         if ($result["community_description"]) {
             $description = search_description($result["community_description"]);
         } else {
             $description = "";
         }
         echo "<div id=\"result-" . $result["community_id"] . "\" style=\"width: 100%; margin-bottom: 10px; line-height: 16px;\">\n";
         echo "\t<img src=\"" . ENTRADA_URL . "/images/list-community.gif\" width=\"11\" height=\"11\" alt=\"\" title=\"\" style=\"vertical-align: middle; margin-right: 5px\" /><a href=\"" . ENTRADA_URL . "/community" . $result["community_url"] . "\" style=\"vertical-align: middle; font-weight: bold\">" . html_encode($result["community_title"]) . "</a> <span style=\"color: #666666; font-size: 11px\">(" . html_encode($category_title) . ")</span>\n";
         echo "\t<div style=\"margin-left: 16px\">\n";
         echo ($description ? $description : "Community description not available.") . "\n";
         echo "\t\t<div style=\"white-space: nowrap; overflow: hidden\"><a href=\"" . ENTRADA_URL . "/community" . $result["community_url"] . "\" style=\"color: green; font-size: 11px\" target=\"_blank\">" . ENTRADA_URL . "/community" . $result["community_url"] . "</a></div>\n";
         echo "\t</div>\n";
         echo "</div>\n";
     }
 } else {
     echo "<div class=\"display-notice\" style=\"margin-top: 20px; padding: 15px\">\n";
     echo "\t<div style=\"font-side: 13px; font-weight: bold\">No Matching Communities</div>\n";
     echo "\tWe have found no communities matching your search query in the system. This is a great opportunity for you to <a href=\"" . ENTRADA_URL . "/communities?section=create\" style=\"color: #669900; font-weight: bold\">create a new community</a> to fill this niche!";