} 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(); } }
$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>
} elseif ($COMMUNITY_MEMBER && (int) $result["allow_member_read"] == 1 || !(int) $community_details["community_protected"] && (int) $result["allow_public_read"] == 1 || !(int) $community_details["community_registration"] && (int) $result["allow_troll_read"] == 1) { if (count($specificMembers) == 0 || is_array($specificMembers) && in_array($ENTRADA_USER->getActiveId(), $specificMembers)) { $allow_main_load = true; } } if ($allow_main_load) { echo "<tr" . (!$accessible ? " class=\"na\"" : "") . ">\n"; echo "\t<td>\n"; echo "<span id=\"poll-" . $result["cpolls_id"] . "-title\">" . html_encode($result["poll_title"]) . "</span>\n"; if ($show_results) { echo communities_module_access($COMMUNITY_ID, $MODULE_ID, "view-poll") ? " (<a class=\"action\" href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-poll&id=" . $result["cpolls_id"] . "\">results</a>)" : ""; } echo communities_module_access($COMMUNITY_ID, $MODULE_ID, "edit-poll") ? " (<a class=\"action\" href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=edit-poll&id=" . $result["cpolls_id"] . "\">edit</a>)" : ""; echo communities_module_access($COMMUNITY_ID, $MODULE_ID, "vote-poll") ? $allowVote && ((int) $result["release_date"] < time() && ((int) $result["release_until"] > time() || (int) $result["release_until"] == 0)) ? " (<a class=\"action\" href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=vote-poll&id=" . $result["cpolls_id"] . "\">vote</a>)" : "" : ""; echo communities_module_access($COMMUNITY_ID, $MODULE_ID, "delete-poll") ? " (<a class=\"action\" href=\"javascript:pollDelete('" . $result["cpolls_id"] . "')\">delete</a>)" : ""; echo communities_module_access($COMMUNITY_ID, $MODULE_ID, "my-votes") ? isset($vote_record["votes"]) && (int) $vote_record["votes"] > 0 ? " (<a class=\"action\" href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=my-votes&id=" . $result["cpolls_id"] . "\">history</a>)" : "" : ""; echo "\t\t<div class=\"content-small\">" . html_encode(limit_chars($result["poll_description"], 125)) . "</div>\n"; echo "\t</td>\n"; echo "\t<td style=\"text-align: center\">" . $voteInfo["voters"] . "</td>\n"; echo "\t<td style=\"text-align: center\">" . $voteInfo["votes_cast"] . "</td>\n"; echo "\t<td class=\"small\">\n"; echo $result["release_until"] != "0" && isset($result["release_until"]) ? date("Y-m-d", $result["release_until"]) : "No End Date Set"; echo "\t</td>\n"; echo "</tr>\n"; } } ?> </tbody> </table> <?php } else {
$output = array("back" => false, "next" => false); if ($cgphoto_id_search = dimensional_array_search($cgphoto_id, $results)) { $back_key = $cgphoto_id_search[0] - 1; $next_key = $cgphoto_id_search[0] + 1; if (isset($results[$back_key]["cgphoto_id"]) && ($cgphoto_id_back = (int) $results[$back_key]["cgphoto_id"])) { $output["back"] = $cgphoto_id_back; } if (isset($results[$next_key]["cgphoto_id"]) && ($cgphoto_id_next = (int) $results[$next_key]["cgphoto_id"])) { $output["next"] = $cgphoto_id_next; } } } } return $output; } if (communities_module_access($COMMUNITY_ID, $MODULE_ID, $SECTION)) { if (@file_exists($section_to_load = COMMUNITY_ABSOLUTE . DIRECTORY_SEPARATOR . "modules" . DIRECTORY_SEPARATOR . $COMMUNITY_MODULE . DIRECTORY_SEPARATOR . $SECTION . ".inc.php") && @is_readable($section_to_load)) { require_once $section_to_load; } else { $ONLOAD[] = "setTimeout('window.location=\\'" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "\\'', 5000)"; $ERROR++; $ERRORSTR[] = "The action you are looking for does not exist for this module."; echo display_error(); application_log("error", "Communities system tried to load " . $section_to_load . " which does not exist or is not readable by PHP."); } } else { $ONLOAD[] = "setTimeout('window.location=\\'" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "\\'', 5000)"; $ERROR++; $ERRORSTR[] = "You do not have access to this section of this module. Please contact a community administrator for assistance."; echo display_error(); }
if ($result["release_date"] && $result["release_date"] > time() || $result["release_until"] && $result["release_until"] < time()) { $accessible = false; } echo "<td" . (!$accessible ? " class=\"na\"" : "") . " style=\"vertical-align: top; text-align: center\">"; echo "\t<h2 id=\"gallery-" . $result["cgallery_id"] . "-title\" class=\"gallery-heading\"><a href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-gallery&id=" . $result["cgallery_id"] . "\">" . html_encode(limit_chars($result["gallery_title"], 26)) . "</a></h2>\n"; echo "\t<a href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=view-gallery&id=" . $result["cgallery_id"] . "\">" . communities_galleries_fetch_thumbnail($result["gallery_cgphoto_id"]) . "</a>"; echo "\t<div style=\"margin-top: 5px\">\n"; echo communities_module_access($COMMUNITY_ID, $MODULE_ID, "edit-gallery") ? " (<a class=\"action\" href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=edit-gallery&id=" . $result["cgallery_id"] . "\">edit</a>)" : ""; echo communities_module_access($COMMUNITY_ID, $MODULE_ID, "delete-gallery") ? " (<a class=\"action\" href=\"javascript:galleryDelete('" . $result["cgallery_id"] . "')\">delete</a>)" : ""; echo "\t</div>"; echo "</td>"; if ($progress + 1 == $total_galleries && $column != 3) { echo "<td colspan=\"" . (3 - $column) . "\"> </td>\n"; } elseif ($column == 3) { $column = 0; echo "</tr>\n"; echo "<tr>\n"; } } ?> </tr> </tbody> </table> <?php } else { $NOTICE++; $NOTICESTR[] = "There are currently no galleries available in this community.<br /><br />" . (communities_module_access($COMMUNITY_ID, $MODULE_ID, "add-gallery") ? "As a community adminstrator you can add galleries by clicking <a href=\"" . COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL . "?section=add-gallery\">Add Photo Gallery</a>." : "Please check back later."); echo display_notice(); } ?> </div>