示例#1
0
 function standardPage($node, $maindiv = false)
 {
     global $hierarchy, $include_path, $live_update;
     $display =& new jzDisplay();
     $blocks = new jzBlocks();
     include $include_path . 'frontend/frontends/medialibrary/medialibrary.php';
     if ($node->getLevel() > 0) {
         while ($node->getLevel() > 0 && $hierarchy[$node->getLevel() - 1] == "hidden") {
             $d = $node->getNaturalDepth();
             $node = $node->getParent();
             $node->setNaturalDepth($d + 1);
         }
     }
     if (!$maindiv) {
         if ($node->getName() != "") {
             $display->preheader($node->getName(), $this->width, $this->align);
             $this->pageTop($node->getName());
         } else {
             $display->preheader(false, $this->width, $this->align);
             $this->pageTop();
         }
     }
     if (!$maindiv) {
         echo '<div id="mainDiv">';
     }
     drawPage($node);
     if (!$maindiv) {
         echo '</div>';
         $this->footer($node);
     }
 }
 public function __construct()
 {
     $body = display("pages/search_friends");
     $guid = getInput("guid");
     $button = "<a class='btn btn-success' href='" . getSiteURL() . "profile/{$guid}'>Return</a>";
     $this->html = drawPage(array("header" => "Search Results", "body" => $body, "button" => $button));
 }
 function __construct()
 {
     $invoice_id = pageArray(1);
     $header = "Invoice Details";
     $subheader = "Invoice #" . $invoice_id;
     $body = display("pages/invoice");
     $this->html = drawPage(array("header" => $header, "subheader" => $subheader, "body" => $body));
 }
 function __construct()
 {
     $order_id = pageArray(1);
     $header = "Order Details";
     $subheader = "Order #: " . $order_id;
     $body = display("pages/order");
     $this->html = drawPage(array("header" => $header, "subheader" => $subheader, "body" => $body));
 }
 public function __construct()
 {
     $title = $body = $button = NULL;
     switch (pageArray(1)) {
         case "all":
         default:
             if (loggedIn()) {
                 $admin_groups = Setting::get("admin_groups");
                 if (!$admin_groups) {
                     $admin_groups = "users";
                 }
                 if ($admin_groups == "admin" && adminLoggedIn() || $admin_groups == "user") {
                     $button = "<a href='" . getSiteURL() . "groups/create' class='btn btn-success'>Create a Group</a>";
                 }
             }
             $title = "Groups";
             $body = display("pages/groups");
             break;
         case "create":
             $admin_groups = Setting::get("admin_groups");
             if (!$admin_groups) {
                 $admin_groups = "user";
             }
             if ($admin_groups == "admin" && adminLoggedIn() || $admin_groups == "user") {
                 $title = "Create a Group";
                 $body = drawForm(array("name" => "create_group", "action" => "createGroup", "method" => "post", "files" => true));
             }
             break;
         case "view":
             $guid = pageArray(2);
             $group = getEntity($guid);
             $edit_url = getSiteURL() . "groups/edit/{$guid}";
             $delete_url = addTokenToURL(getSiteURL() . "action/deleteGroup/{$guid}");
             if ($group->ownerIsLoggedIn()) {
                 $button = "<a href='{$edit_url}' class='btn btn-warning'>Edit Group</a>";
                 $button .= "<a href='{$delete_url}' class='btn btn-danger confirm'>Delete Group</a>";
             }
             if (GroupsPlugin::loggedInUserCanJoin($group)) {
                 $join_group_url = addTokenToURL(getSiteURL() . "action/JoinGroup/" . $group->guid);
                 $button .= "<a href='{$join_group_url}' class='btn btn-success confirm'>Join Group</a>";
             }
             if ($group->loggedInUserIsMember() && $group->owner_guid != getLoggedInUserGuid()) {
                 $leave_group_url = addTokenToURL(getSiteURL() . "action/LeaveGroup/" . $group->guid);
                 $button .= "<a href='{$leave_group_url}' class='btn btn-danger confirm'>Leave Group</a>";
             }
             $title = $group->title;
             $body = display("pages/group");
             break;
         case "edit":
             $guid = pageArray(2);
             $group = getEntity($guid);
             $title = "Edit " . $group->title;
             $body = drawForm(array("name" => "edit_group", "action" => "editGroup", "method" => "post", "files" => true));
             break;
     }
     $this->html = drawPage(array("header" => $title, "body" => $body, "button" => $button));
 }
 public function __construct()
 {
     $title = $body = $buttons = $breadcrumbs = NULL;
     switch (pageArray(1)) {
         default:
             $body = display("pages/forum");
             $title = "Forum Categories";
             if (adminLoggedIn()) {
                 $add_category_url = getSiteURL() . "forum/add_category";
                 $buttons = "<a href='{$add_category_url}' class='btn btn-danger'>Add a Category</a>";
             }
             $breadcrumbs = array(array("link" => getSiteURL() . "forum", "label" => "Categories"));
             break;
         case 'add_category':
             adminGateKeeper();
             $body = drawForm(array("name" => "add_category", "method" => "post", "action" => "addCategory"));
             $title = "Add a Forum Category";
             break;
         case 'category':
             $guid = pageArray(2);
             if ($guid) {
                 $category = getEntity($guid);
                 $body = display("forum/category");
                 if (loggedIn()) {
                     $add_topic_url = getSiteURL() . "forum/add_topic/{$guid}";
                     $buttons = "<a href='{$add_topic_url}' class='btn btn-success'>Add Topic</a>";
                 }
             }
             $breadcrumbs = array(array("link" => getSiteURL() . "forum", "label" => "Categories"), array("link" => getSiteURL() . "forum/category/" . $category->guid, "label" => $category->title));
             break;
         case "add_topic":
             gateKeeper();
             $category_guid = pageArray(2);
             $category = getEntity($category_guid);
             $body = drawForm(array("name" => "add_topic", "method" => "post", "action" => "addTopic"));
             $title = "Add a topic to {$category->title}";
             break;
         case "topic":
             $topic = getEntity(pageArray(2));
             $category = getEntity($topic->container_guid);
             $breadcrumbs = array(array("link" => getSiteURL() . "forum", "label" => "Categories"), array("link" => getSiteURL() . "forum/category/" . $category->guid, "label" => $category->title), array("link" => getSiteURL() . "forum/topic/" . $topic->guid, "label" => $topic->title));
             $body = display("forum/topic");
             break;
         case "editCategory":
             adminGateKeeper();
             $title = "Edit Forum Category";
             $body = drawForm(array("name" => "edit_category", "method" => "post", "action" => "editCategory'"));
             break;
         case "editTopic":
             adminGateKeeper();
             $title = "Edit Forum Topic";
             $body = drawForm(array("name" => "edit_topic", "method" => "post", "action" => "editTopic"));
             break;
     }
     $this->html = drawPage(array("header" => $title, "body" => $body, "button" => $buttons, "breadcrumbs" => $breadcrumbs));
 }
 /**
  * Creates html for admin page
  */
 public function __construct()
 {
     adminGateKeeper();
     $tab = pageArray(1);
     if (!$tab) {
         $tab = "general";
     }
     $body = display("pages/admin", array("tab" => $tab));
     $this->html = drawPage(array("header" => translate("title:admin_panel"), "body" => $body));
 }
 public function __construct()
 {
     $limit = getInput("limit", 10);
     $offset = getInput("offset", 0);
     $count = getEntities(array("type" => "File", "count" => true, "metadata_name_value_pairs" => array(array("name" => "owner_guid", "value" => getLoggedInUserGuid()), array("name" => "title", "value" => "NULL", "operand" => "!="))));
     $files = listEntities(array("type" => "File", "limit" => $limit, "offset" => $offset, "metadata_name_value_pairs" => array(array("name" => "owner_guid", "value" => getLoggedInUserGuid()), array("name" => "title", "value" => "NULL", "operand" => "!="))));
     $pagination = display("page_elements/pagination", array("count" => $count, "offset" => $offset, "limit" => $limit, "url" => getSiteURL() . "files"));
     $page = drawPage(array("header" => "Files", "body" => $files, "footer" => $pagination, "button" => "<a href='" . getSiteURL() . "file/upload' class='btn btn-success'>Upload a File</a>"));
     $this->html = $page;
 }
 function __construct()
 {
     $this->html = NULL;
     $name = pageArray(1);
     $page = getEntity(array("type" => "Custompage", "metadata_name" => "name", "metadata_value" => $name));
     if ($page) {
         $title = $page->title;
         $body = display("output/editor", array("value" => $page->body));
         $this->html = drawPage($title, $body);
     }
 }
 public function __construct()
 {
     $guid = pageArray(1);
     if (!$guid) {
         forward("profile/" . getLoggedInUserGuid());
     }
     $user = getEntity($guid);
     classGateKeeper($user, "User");
     $body = display("pages/profile", array("guid" => $guid));
     $this->html = drawPage(NULL, $body);
 }
 /**
  * Creates notification page html
  */
 public function __construct()
 {
     $user_guid = getLoggedInUserGuid();
     $access = getIgnoreAccess();
     setIgnoreAccess();
     $notifications = listEntities(array("type" => "Notification", "metadata_name" => "owner_guid", "metadata_value" => $user_guid));
     setIgnoreAccess($access);
     $buttons = getSiteURL() . "action/deleteAllNotifications/{$user_guid}";
     $buttons = addTokenToURL($buttons);
     $buttons = "<a href='{$buttons}' class='btn btn-danger'>Dismiss All</a>";
     $page = drawPage(array("header" => "Notifications", "body" => $notifications, "button" => $buttons));
     $this->html = $page;
 }
 public function __construct()
 {
     $title = $buttons = $body = NULL;
     if (BlogsPlugin::userCanCreateBlog()) {
         $body = display("page_elements/blogs_tabs");
         $buttons = "<a href='" . getSiteURL() . "blogs/add' class='btn btn-success'>Add a Blog</a>";
     }
     switch (pageArray(1)) {
         case "all_blogs":
         default:
             $title = "Blogs";
             $body .= display("pages/all_blogs");
             break;
         case "friends_blogs":
             $title = translate("friends_blogs");
             $body .= display("pages/friends_blogs");
             break;
         case "my_blogs":
             $title = "My Blogs";
             $body .= display("pages/my_blogs");
             break;
         case "add":
             if (BlogsPlugin::userCanCreateBlog()) {
                 $title = "Add a Blog";
                 $body = drawForm(array("name" => "add_blog", "method" => "post", "action" => "addBlog"));
             }
             break;
         case "view":
             $guid = pageArray(2);
             $blog = getEntity($guid);
             if ($blog) {
                 $title = $blog->title;
             }
             $owner = getEntity($blog->owner_guid);
             $title .= " <small>by {$owner->full_name}</small>";
             $body = display("pages/blog");
             if (getLoggedInUserGuid() == $blog->owner_guid) {
                 $edit_url = getSiteURL() . "blogs/edit/{$guid}";
                 $delete_url = addTokenToURL(getSiteURL() . "action/deleteBlog/{$guid}");
                 $buttons = "<a href='{$edit_url}' class='btn btn-warning'>Edit</a>";
                 $buttons .= "<a href='{$delete_url}' class='btn btn-danger confirm'>Delete</a>";
             }
             break;
         case "edit":
             $buttons = NULL;
             $title = "Edit your blog";
             $body = drawForm(array("name" => "edit_blog", "method" => "post", "action" => "addBlog"));
             break;
     }
     $this->html = drawPage(array("header" => $title, "body" => $body, "button" => $buttons));
 }
 /**
  * Creates html for forgot password page
  */
 public function __construct()
 {
     $code = pageArray(1);
     $email = pageArray(2);
     if ($code && $email) {
         $access = getIgnoreAccess();
         setIgnoreAccess();
         $user = getEntities(array("type" => "User", "metadata_name_value_pairs" => array(array("name" => "email", "value" => $email), array("name" => "password_reset_code", "value" => $code))));
         setIgnoreAccess($access);
         if ($user) {
             $user = $user[0];
             new Vars("guid", $user->guid);
             new Vars("code", $code);
             $form = drawForm(array("name" => "new_password", "method" => "post", "action" => "newPassword"));
             $header = "Enter your new password.";
             $this->html = drawPage($header, $form);
             $this->html = drawPage(array("header" => $header, "body" => $form));
         }
     } else {
         $form = drawForm(array("name" => "forgot_password", "method" => "post", "action" => "ForgotPassword"));
         $this->html = drawPage(array("header" => "Reset Your Password", "body" => $form));
     }
 }
 /**
  * Creates html for activity page
  */
 public function __construct()
 {
     switch (pageArray(1)) {
         default:
         case "all":
             $this->params = array("type" => "Activity", "order_by" => "time_created", "order_reverse" => true, "offset" => getInput("offset", 0));
             break;
         case "mine":
             $this->params = array("type" => "Activity", "order_by" => "time_created", "order_reverse" => true, "offset" => getInput("offset", 0), "metadata_name" => "owner_guid", "metadata_value" => getLoggedInUserGuid());
             break;
         case "friends":
             $this->params = array("type" => "Activity", "order_by" => "time_created", "order_reverse" => true, "offset" => getInput("offset", 0), "metadata_name" => "owner_guid", "metadata_value" => "('" . FriendsPlugin::getFriendGuidCSString(getLoggedInUser()) . "')", "operand" => "IN");
             break;
     }
     $this->params['count'] = true;
     $this->count = getEntities($this->params);
     unset($this->params['count']);
     $this->params['limit'] = 10;
     $entities = listEntities($this->params);
     $pagination = display("page_elements/pagination", array("count" => $this->count, "offset" => getInput("offset"), "limit" => $this->limit, "url" => "activity"));
     $this->tabs = display("page_elements/tabs", array("tabs" => array("All" => getSiteURL() . "activity", "Mine" => getSiteURL() . "activity/mine", "Friends" => getSiteURL() . "activity/friends")));
     $this->html = drawPage(array("header" => "Activity", "body" => $this->tabs . $entities . $pagination));
 }
    public function __construct()
    {
        $page = pageArray();
        switch ($page[1]) {
            case "upload":
                $form = drawForm(array("name" => "file/upload", "method" => "post", "action" => "fileUpload", "enctype" => "multipart/form-data"));
                new Vars("container_guid", pageArray());
                $this->html = drawPage(array("header" => "Upload File", "body" => $form));
                break;
            default:
                if (is_numeric($page[1])) {
                    $guid = $page[1];
                    $file = getEntity($page[1]);
                    $image_url = Image::getImageURL($guid);
                    $image_title = $file->name;
                    $left_content = "<a href='{$image_url}' data-lightbox='image-{$guid}' data-title='{$image_title}'><img src='{$image_url}' class='img-responsive' alt=''/></a>";
                    $right_content = html_entity_decode($file->description);
                    $comments = display("output/block_comments", array("guid" => $guid, "show_form" => true));
                    $download_button = "<a href='" . getSiteURL() . "views/output/file_download.php?guid={$guid}' class='btn btn-success btn-block' style='margin-top:18px;'>Download</a>";
                    $body = <<<HTML
        <div class='col-sm-4'>
            {$left_content}
            {$download_button}
        </div>
        <div class='col-sm-8'>
            <div class='well'>
                {$right_content}
            </div>
            {$comments}
        </div>
HTML;
                    $this->html = drawPage(array("header" => $file->title, "body" => $body));
                }
                return false;
                break;
        }
    }
 function __construct()
 {
     $header = $body = NULL;
     switch (pageArray(1)) {
         default:
             gateKeeper();
             $header = "Report this page to the site admin.";
             $body = drawForm(array("name" => "reportThis", "action" => "reportThis", "method" => "post"));
             break;
         case "reportSent":
             $header = "Your report has been sent.";
             $body = "<p>Thank you for your report.  Our community relies on users like you to keep it safe.</p><p>We will review your report, and make a decision within 24 hours.</p>";
             break;
         case "view":
             switch (pageArray(2)) {
                 default:
                     break;
                 case "":
                     break;
             }
             break;
     }
     $this->html = drawPage(array("header" => $header, "body" => $body));
 }
 public function __construct()
 {
     $body = display("pages/friend_requests");
     $this->html = drawPage(array("header" => "Friend Requests", "body" => $body));
 }
<?php

/* * ***********************************************************************
 * 
 * SocialApparatus CONFIDENTIAL
 * __________________
 * 
 *  [2002] - [2017] SocialApparatus (http://SocialApparatus.co) 
 *  All Rights Reserved.
 * 
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

denyDirect();
adminGateKeeper();
$form = drawForm(array("name" => "add_profile_field", 'method' => 'POST', 'action' => 'add_profile_field'));
echo drawPage(array("header" => 'Add Profile Field', "body" => $form));
 function __construct()
 {
     gateKeeper();
     $page = display("pages/messages");
     $this->html = drawPage(array("header" => NULL, "body" => $page));
 }
示例#20
0
 * 
 *  [2002] - [2017] SocialApparatus (http://SocialApparatus.co) 
 *  All Rights Reserved.
 * 
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

denyDirect();
$home_text = Setting::get("home_page");
if ($home_text) {
    $body = display("output/editor", array("value" => $home_text));
} else {
    $left = display("home/left");
    $right = display("home/right");
    $body = display("page_elements/page_header", array("text" => "Latest Activity"));
    $body .= <<<HTML
<div class='col-lg-9'>{$left}</div>
<div class='col-lg-3'>{$right}</div>
HTML;
}
echo drawPage(array("body" => $body));
示例#21
0
/* * ***********************************************************************
 * 
 * SocialApparatus CONFIDENTIAL
 * __________________
 * 
 *  [2002] - [2017] SocialApparatus (http://SocialApparatus.co) 
 *  All Rights Reserved.
 * 
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

denyDirect();
gateKeeper();
$owner = getLoggedInUser();
$limit = 9;
$offset = getInput("offset", 0);
$filter = getInput("filter", NULL);
$friends = FriendsPlugin::getFriends($owner, $offset, $limit, $filter);
$body = viewEntityList($friends, "list");
echo drawPage(array("header" => translate("friends"), "body" => $body, "button" => drawForm(array("name" => "friend_search", "method" => "get", "page" => "friends"))));
<?php

/* * ***********************************************************************
 * 
 * SocialApparatus CONFIDENTIAL
 * __________________
 * 
 *  [2002] - [2017] SocialApparatus (http://SocialApparatus.co) 
 *  All Rights Reserved.
 * 
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

denyDirect();
gateKeeper();
$form = drawForm(array("name" => "edit_profile", "method" => "post", "action" => "editProfile", "class" => "edit_profile_form"));
echo drawPage(array("header" => "Edit Profile", "body" => $form));
 function __construct()
 {
     $header = "Billing";
     $body = display("pages/billing");
     $this->html = drawPage(array("header" => $header, "body" => $body));
 }
 public function __construct()
 {
     gateKeeper();
     $title = $body = $button = $wrapper_class = NULL;
     switch (pageArray(1)) {
         case "view":
             $guid = pageArray(2);
             $video = getEntity($guid);
             if ($video) {
                 if ($video->title) {
                     $title = $video->title;
                 } else {
                     $title = "&nbsp;";
                 }
                 if (getLoggedInUserGuid() == $video->owner_guid || adminLoggedIn()) {
                     $delete_url = addTokenToURL(getSiteURL() . "action/deleteVideo/{$guid}");
                     $button = "<a class='btn btn-info' href='" . getSiteURL() . "videos/edit/{$guid}'>Edit</a>";
                     $button .= "<a class='btn btn-danger confirm' href='{$delete_url}'>Delete</a>";
                 }
                 $body = display("pages/video");
             } else {
                 forward();
             }
             break;
         case "edit":
             $title = "Edit Video Details";
             $body = drawForm(array("name" => "edit_video", "method" => "post", "action" => "editVideo"));
             break;
         case "add":
             $title = "Add a Video";
             $body = drawForm(array("name" => "add_video", "method" => "post", "action" => "AddVideo", "enctype" => "multipart/form-data"));
             break;
         default:
         case "albums":
             switch (pageArray(2)) {
                 default:
                     $guid = pageArray(1);
                     if (!$guid) {
                         $guid = getLoggedInUserGuid();
                     }
                     $user = getEntity($guid);
                     if ($guid == getLoggedInUserGuid()) {
                         $name = "My";
                     } else {
                         $name = $user->full_name . "'s";
                     }
                     $title = $name . " Video Albums";
                     $body = display("pages/video_albums");
                     $button = "<a class='btn btn-success' href='" . getSiteURL() . "videos/albums/add'>Create an Album</a>";
                     break;
                 case "add":
                     $title = "Add a Video Album";
                     $body = drawForm(array("name" => "add_video_album", "method" => "post", "action" => "addVideoalbum", "class" => "add_video_album_form", "enctype" => "multipart/form-data"));
                     break;
                 case "view":
                     $guid = pageArray(3);
                     $album = getEntity($guid);
                     $title = $album->title;
                     $body = display("pages/video_album");
                     $delete_url = getSiteURL() . "action/deleteVideoalbum/{$guid}";
                     $delete_url = addTokenToURL($delete_url);
                     if (getLoggedInUserGuid() == $album->owner_guid || adminLoggedIn()) {
                         $button = "<a class='btn btn-info' href='" . getSiteURL() . "videos/albums/edit/{$guid}'>Edit Album</a>";
                         $button .= "<a class='btn btn-danger' href='{$delete_url}'>Delete Album</a>";
                     }
                     $button .= "<a class='btn btn-success' href='" . getSiteURL() . "videos/add/{$guid}'>Add Video</a>";
                     $wrapper_class = "masonry4col";
                     break;
                 case "edit":
                     $body = drawForm(array("name" => "edit_video_album", "method" => "post", "action" => "editVideoalbum", "enctype" => "multipart/form-data"));
                     $title = "Edit Album";
                     break;
             }
     }
     $this->html = drawPage(array("header" => $title, "body" => $body, "button" => $button, "wrapper_class" => $wrapper_class));
 }
/* * ***********************************************************************
 * 
 * SocialApparatus CONFIDENTIAL
 * __________________
 * 
 *  [2002] - [2017] SocialApparatus (http://SocialApparatus.co) 
 *  All Rights Reserved.
 * 
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

denyDirect();
$guid = Vars::get('guid');
$lead = translate("verification_email_sent:lead");
$form = drawForm(array("name" => "resend_verification_email", "action" => "ResendEmailVerification", "method" => "post"));
$body = <<<HTML
<p class="lead">{$lead}</p>
<p class="text-center">{$form}</p>
HTML;
echo drawPage(array("header" => translate("verification_email_sent:heading"), "body" => $body));
<?php

/* * ***********************************************************************
 * 
 * SocialApparatus CONFIDENTIAL
 * __________________
 * 
 *  [2002] - [2017] SocialApparatus (http://SocialApparatus.co) 
 *  All Rights Reserved.
 * 
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

denyDirect();
$header = "Password reset instructions sent.";
$body = "<p class='lead'>Instructions to reset your password have been sent to the email address you've entered.</p>";
echo drawPage(array("header" => $header, "body" => $body));
 *  All Rights Reserved.
 * 
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

denyDirect();
gateKeeper();
$owner = getLoggedInUser();
$current_avatar = $owner->icon(EXTRALARGE, "img-responsive");
$form = drawForm(array("name" => "edit_avatar", "action" => "editAvatar", "method" => "post", "enctype" => "multipart/form-data"));
$body = <<<HTML
<div class='row edit_avatar_form'>
    <div class="col-sm-4">
        {$current_avatar}
    </div>
    <div class="col-sm-8">
        {$form}
    </div>
</div>
HTML;
echo drawPage(array("header" => "Edit Avatar", "body" => $body));
 * SocialApparatus CONFIDENTIAL
 * __________________
 * 
 *  [2002] - [2017] SocialApparatus (http://SocialApparatus.co) 
 *  All Rights Reserved.
 * 
 * NOTICE:  All information contained herein is, and remains the property of SocialApparatus 
 * and its suppliers, if any.  The intellectual  and technical concepts contained herein 
 * are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign 
 * Patents, patents in process, and are protected by trade secret or copyright law. 
 * 
 * Dissemination of this information or reproduction of this material is strictly forbidden 
 * unless prior written permission is obtained from SocialApparatus.
 * 
 * Contact Shane Barron admin@socia.us for more information.
 */
namespace SocialApparatus;

denyDirect();
$offset = getInput("offset", 0);
$limit = 10;
$activity = listEntities(array("type" => "Activity", "order_by" => "time_created", "order_reverse" => true, "offset" => $offset, "limit" => $limit));
$count = getEntities(array("type" => "Activity", "count" => true));
$body = <<<HTML
<ul class="timeline clearfix">
    {$activity}
</ul>
HTML;
$footer = display("page_elements/pagination", array("count" => $count, "offset" => $offset, "limit" => $limit, "url" => "activity"));
echo drawPage(array("header" => translate("header:activity"), "body" => $body, "footer" => $footer));
 function __construct()
 {
     $guid = NULL;
     $header = Setting::get("store_name");
     $body = $button = NULL;
     $category = pageArray(1);
     $category_entity = getEntity(array("type" => "Productcategory", "metadata_name" => "short_name", "metadata_value" => $category));
     if ($category_entity) {
         $guid = $category_entity->guid;
     }
     if (!$guid) {
         $first_category = getEntity(array("type" => "Productcategory"));
         if ($first_category) {
             $guid = $first_category->guid;
         }
     }
     if (adminLoggedIn()) {
         $button = "<a href='" . getSiteURL() . "store/create_category' class='btn btn-default'>Create a Category</a>";
         $button .= "<a href='" . getSiteURL() . "store/create_product/{$guid}' class='btn btn-success'>Create Product</a>";
         $button .= "<a href='" . getSiteURL() . "store/edit_category/{$guid}' class='btn btn-info'>Edit Category</a>";
     } else {
         $button = NULL;
     }
     switch (pageArray(1)) {
         case "categories":
         default:
             $body = display("pages/store");
             break;
         case "create_category":
             adminGateKeeper();
             $header = "Create a Category";
             $body = drawForm(array("name" => "create_product_category", "method" => "post", "action" => "CreateProductCategory"));
             break;
         case "create_product":
             adminGateKeeper();
             $guid = pageArray(2);
             $category = getEntity($guid);
             $label = $category->label;
             $header = "Create a new product in the {$label} category";
             $body = drawForm(array("name" => "create_product", "method" => "post", "action" => "CreateProduct", "enctype" => "multipart/form-data"));
             break;
         case "register":
             $header = "Please register to continue.";
             $body = "<h2 class='text-center'>Register</h2>";
             $body .= "<div class='row'>";
             $body .= "<div class='col-md-4 col-md-offset-4'>";
             $body .= drawForm(array("name" => "register", "method" => "post", "action" => "register"));
             $body .= "</div>";
             $body .= "</div>";
             $body .= "<h2 class='text-center'>Already have an account?  <a href='" . getSiteURL() . "login?referer=cart'>Login</a></h2>";
             break;
         case "edit_category":
             $header = "Edit Category";
             $body = drawForm(array("name" => "edit_product_category", "action" => "EditProductCategory", "method" => "post"));
             break;
         case "edit_product":
             $header = "Edit Product";
             $body = drawForm(array("name" => "edit_product", "action" => "EditProduct", "method" => "post", "enctype" => "multipart/form-data"));
             break;
     }
     $this->html = drawPage(array("header" => $header, "body" => $body, "button" => $button));
 }
示例#30
0
<?php

require_once "support.php";
require_once "dbLogin.php";
require_once "sqlconnector.php";
require_once "fileEditor.php";
require_once "personalClassInfo.php";
$fe = new FileEditor('login-info.txt');
$credentials = $fe->readFile();
$user = crypt($credentials[0], "\$2a\$07ausesomesillystringforsalt\$");
$password = crypt($credentials[1], "\$2a\$07ausesomesillystringforsalt\$");
if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']) && hash_equals($user, crypt($_SERVER['PHP_AUTH_USER'], "\$2a\$07ausesomesillystringforsalt\$")) && hash_equals($password, crypt($_SERVER['PHP_AUTH_PW'], "\$2a\$07ausesomesillystringforsalt\$"))) {
    drawPage();
} else {
    header("WWW-Authenticate: Basic realm=\"Example System\"");
    header("HTTP/1.0 401 Unauthorized");
    exit;
}
function drawPage()
{
    global $credentials;
    $body = "";
    $login = new Credentials("terrapintango.cgpkve9uh8yp.us-east-1.rds.amazonaws.com", $credentials[0], $credentials[1], "tangodb");
    $connector = new SQLConnector($login);
    $connector->connect();
    //print_r($result);
    if (isset($_POST['submit'])) {
        $fields = $_POST['field'];
        $fieldsString = implode(", ", $fields);
        foreach ($fields as $table) {
            if ($table == "ConfirmedRegistrants") {