function getPageEditLinks($area, $additional_button = "") { if (IsUserLoggedIn()) { echo "<div id=\"admin-pane-controls\">\n"; echo "\t<h3>Admin Controls:</h3>\n"; echo "\t<a href=\"" . get_link("admin/") . "\">Dashboard</a>\n"; echo "\t<a href=\"" . get_link("admin/edit_page/" . $this->id) . "\">Edit this Page</a>\n"; if ($area->id != "1") { echo "\t<a href=\"" . get_link("admin/edit_area/" . $area->id) . "\">Edit this Area</a>\n"; } echo "\t<a href=\"" . get_link("admin/list_pages/") . "\">List Pages</a>\n"; echo "\t<a href=\"" . get_link("admin/add_page") . "\">Add a Page</a>\n"; echo "\t<a href=\"" . get_link("admin/edit_area/add") . "\">Add an Area</a>\n"; if ($additional_button != "") { echo $additional_button; } echo "\t<a href=\"" . get_link("admin/logout") . "\">Logout</a>\n"; echo "</div>\n"; } }
function initialize_page() { if (IsUserLoggedIn()) { } else { redirect('/'); } }
function initialize_page() { if (IsUserLoggedIn()) { ?> <script type="text/javascript"> //<![CDATA[ $().ready(function() { console.log('Logged In:Featured Options'); }); </script> <?php } else { redirect('/'); } }
?> ">View <?php echo SITE_URL; ?> </a></div> <h1><?php echo SITE_NAME . $maintenancemode; ?> <small>Content Management System</small></h1> <h4>Developed by Highchair designhaus and Peter Landry, Providence RI</h4> </div> <div id="document"> <div id="navigation"> <?php if (IsUserLoggedIn()) { ?> <a class="droplink" href="<?php echo get_link("admin/"); ?> ">Dashboard</a> <div id="buttons"> <?php include_snippet("admin_nav_level1"); echo "\n"; include_snippet("admin_nav_level2"); echo "\n"; include_snippet("admin_nav_level3"); ?>
function getPageEditLinks($area = "", $additional_button = "", $item = "") { if (IsUserLoggedIn()) { echo "<div id=\"admin-pane-controls\">\n"; echo "\t<h3>Admin Controls:</h3>\n"; echo "\t<a href=\"" . get_link("admin/") . "\">Dashboard</a>\n"; if ($item) { echo "\t<a href=\"" . get_link("admin/portfolio_edit/" . $this->name . "/" . $item->id) . "\">Edit this Item</a>\n"; } echo "\t<a href=\"" . get_link("admin/portfolio_edit_section/" . $this->id) . "\">Edit this Section</a>\n"; echo "\t<a href=\"" . get_link("admin/portfolio_edit_area/" . $area->id) . "\">Edit this Area</a>\n"; echo "\t<a href=\"" . get_link("admin/portfolio_list") . "\">List Portfolio</a>\n"; echo "\t<a href=\"" . get_link("admin/portfolio_add_item") . "\">Add an Item</a>\n"; echo "\t<a href=\"" . get_link("admin/portfolio_add_section") . "\">Add a Section</a>\n"; echo "\t<a href=\"" . get_link("admin/portfolio_add_area/") . "\">Add an Area</a>\n"; if ($additional_button != "") { echo $additional_button; } echo "\t<a href=\"" . get_link("admin/logout") . "\">Logout</a>\n"; echo "</div>\n"; } }
function getCalendarEditLinks($event = "", $additional_button = "") { if (IsUserLoggedIn()) { echo "<div id=\"admin-pane-controls\">\n"; echo "\t<h3>Admin Controls:</h3>\n"; echo "\t<a href=\"" . get_link("admin/") . "\">Dashboard</a>\n"; echo "\t<a href=\"" . get_link("admin/list_events") . "\">List Events</a>\n"; if ($event) { list($month, $day, $year) = explode("/", $event->getDateStart("date")); echo "\t<a href=\"" . get_link("admin/edit_event/{$year}/{$month}/" . $event->id) . "\">Edit this Event</a>\n"; } echo "\t<a href=\"" . get_link("admin/add_event") . "\">Add an Event</a>\n"; echo "\t<a href=\"" . get_link("admin/list_event_types") . "\">List Event Types</a>\n"; echo "\t<a href=\"" . get_link("admin/add_type") . "\">Add Events Type</a>\n"; if ($additional_button != "") { echo $additional_button; } echo "\t<a href=\"" . get_link("admin/logout") . "\">Logout</a>\n"; echo "</div>\n"; } }
function LoginRequired($login_page = "/admin/login/", $required_roles = array()) { if (!IsUserLoggedIn()) { setFlash("<h3>You must have a valid login to access these pages</h3>"); redirect($login_page); } /* IF this install needs more than two users (Admin and Staff) then the User table needs more roles added and this code below needs to check the user and the roles allowed. Add the additional roles to the array in the CONF file as well. */ $user = Users::GetCurrentUser(); // the user is logged in, make sure they have the correct roles. Admins always have any role $has_role = false; if (count($required_roles) > 1) { foreach ($required_roles as $required_role) { if ($user->has_role($required_role)) { $has_role = true; } } } else { $has_role = true; } if (!$has_role) { $_SESSION[LOGIN_TICKET_NAME] = NULL; setFlash("<h3>Your User Role does not have access to these pages</h3>"); redirect($login_page, $optionalredirect); } }
function DisplayBlogEditLinks($the_blog = "", $entry = "", $additional_button = "") { if (!$the_blog) { $the_blog = Blogs::FindById("1"); } if (IsUserLoggedIn()) { echo "<div id=\"admin-pane-controls\">\n"; echo "\t<h3>Admin Controls:</h3>\n"; echo "\t<a href=\"" . get_link("admin/list_entries/") . "\">List Blog Entries</a>\n"; if ($entry) { echo "\t<a href=\"" . get_link("admin/edit_entry/" . $entry->id) . "\">Edit this Entry</a>\n"; } echo "\t<a href=\"" . get_link("admin/edit_entry/add") . "\">Add an Entry</a>\n"; if ($additional_button != "") { echo $additional_button; } echo "\t<a href=\"" . get_link("admin/logout") . "\">Logout</a>\n"; echo "</div>\n"; } }