• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP loggedIn函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __construct

 function __construct()
 {
     if (loggedIn()) {
         new MenuItem(array("name" => "reportThis", "label" => "<i class='icon ion-flag'></i>", "menu" => "header_right", "title" => "Report This", "page" => "reportThis?p=" . currentURL()));
     }
     new Admintab("reported_content");
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:7,代码来源:ReportedContentPlugin.php


示例2: __construct

 public function __construct()
 {
     new Accesshandler("friends");
     if (loggedIn()) {
         new MenuItem(array("name" => "friends", "label" => translate("friends"), "page" => "friends", "menu" => "my_account", "weight" => 50));
         new MenuItem(array("name" => "friend_requests", "label" => translate("friend_requests"), "page" => "Friendrequests", "menu" => "my_account", "weight" => 100));
         new Usersetting(array("name" => "notify_when_friend_request_sent", "field_type" => "dropdown", "options" => array("email" => "Email", "site" => "Site", "both" => "Both", "none" => "None"), "tab" => "notifications", "default_value" => "both"));
         new Usersetting(array("name" => "notify_when_friend_request", "field_type" => "dropdown", "options" => array("email" => "Email", "site" => "Site", "both" => "Both", "none" => "None"), "tab" => "notifications", "default_value" => "both"));
         if (currentPage() == "profile" && pageArray(1)) {
             if (pageArray(1) != getLoggedInUserGuid()) {
                 if (!FriendsPlugin::requestSent(getLoggedInUserGuid(), pageArray(1))) {
                     if (!FriendsPlugin::friends(pageArray(1), getLoggedInUserGuid())) {
                         new MenuItem(array("name" => "add_friend", "label" => translate("add_friend"), "page" => addTokenToURL("action/addFriend/" . pageArray(1)), "menu" => "profile", "weight" => 10, "link_class" => "list-group-item list-group-item-info confirm"));
                     } else {
                         new MenuItem(array("name" => "remove_friend", "label" => translate("remove_friend"), "page" => addTokenToURL("action/removeFriend/" . pageArray(1)), "menu" => "profile", "weight" => 10, "link_class" => "list-group-item list-group-item-warning confirm"));
                     }
                 } else {
                     new MenuItem(array("name" => "friend_request_sent", "label" => translate("friendship_requested"), "page" => "friend", "menu" => "profile", "weight" => 20, "link_class" => "list-group-item confirm"));
                 }
             }
         }
     }
     new ViewExtension("profile/left", "friends/profile", "after");
     new ViewExtension('pages/home_stats', 'pages/friend_stats');
     new ViewExtension("user/buttons", "friends/friend_button");
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:26,代码来源:FriendsPlugin.php


示例3: init

 public function init($file)
 {
     if (!loggedIn()) {
         return false;
     }
     if (!is_a($file, "SocialApparatus\\File")) {
         return false;
     }
     $product = getEntity($file->container_guid);
     if (!is_a($product, "SocialApparatus\\Product")) {
         return false;
     }
     $user = getLoggedInUser();
     if ($user->stripe_cust) {
         \Stripe\Stripe::setApiKey(EcommercePlugin::secretKey());
         $orders = \Stripe\Order::all(array("limit" => 300, "customer" => $user->stripe_cust));
         foreach ($orders['data'] as $order) {
             foreach ($order->items as $item) {
                 if ($item->description != "Taxes (included)" && $item->description != "Free shipping") {
                     $sku = $item->parent;
                     if ($sku == $product->stripe_sku) {
                         return true;
                     }
                 }
             }
         }
     }
     return false;
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:29,代码来源:ProductAccessHandler.php


示例4: init

 public function init()
 {
     if (loggedIn()) {
         return true;
     }
     return false;
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:7,代码来源:LoggedInAccessHandler.php


示例5: requireLogin

function requireLogin()
{
    // prevents unauthorised access to the registered users pages...called on the controllers for these pages...
    if (!loggedIn()) {
        header('Location: ?page=redirect');
    }
}
开发者ID:jagfiend,项目名称:college_php_portfolio,代码行数:7,代码来源:functions.php


示例6: __construct

 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));
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:57,代码来源:GroupsPageHandler.php


示例7: __construct

 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));
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:56,代码来源:ForumPageHandler.php


示例8: __construct

 public function __construct()
 {
     new CSS("files", getSitePath() . "core_plugins/files/assets/css/files.css", 600);
     new FooterJS("files", getSiteURL() . "core_plugins/files/assets/js/files.js", 600, true);
     if (loggedIn()) {
         new StorageType("File", "path", "text");
         new StorageType("File", "description", "text");
         new StorageType("File", "filename", "text");
         new StorageType("File", "file_location", "text");
     }
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:11,代码来源:FilesPlugin.php


示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->helper('form');
     $this->load->library('form_validation');
     $this->load->library('hash');
     $this->load->library('email');
     $this->load->library('random');
     if (!loggedIn()) {
         return redirect('home');
     }
 }
开发者ID:iyaad,项目名称:Gestion-Stage,代码行数:12,代码来源:Statistiques.php


示例10: __construct

 function __construct()
 {
     if (loggedIn()) {
         $count = self::countUnread();
         new MenuItem(array("name" => "messages", "page" => "messages", "label" => "Messages <span class='badge'>{$count}</span> ", "menu" => "my_account", "weight" => 100));
     }
     new CSS("messages", getSitePath() . "core_plugins/messages/assets/css/style.css", 400000);
     new FooterJS("messages", getSiteURL() . "core_plugins/messages/assets/js/messages.js", 5000, true);
     new StorageType("MessageElement", "subject", "text");
     new StorageType("MessageElement", "message", "text");
     new StorageType("Message", "subject", "text");
     new Usersetting(array("name" => "notify_when_message", "field_type" => "dropdown", "options" => array("email" => "Email", "site" => "Site", "both" => "Both", "none" => "None"), "tab" => "notifications", "default_value" => "both"));
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:13,代码来源:MessagesPlugin.php


示例11: __construct

 public function __construct()
 {
     if (loggedIn()) {
         new MenuItem(array("name" => "profile", "label" => "My Profile", "page" => "profile/" . getLoggedInUserGuid(), "menu" => "my_account", "weight" => 0));
         if (currentPage() == "profile" && pageArray(1) == getLoggedInUserGuid()) {
             new MenuItem(array("name" => "edit_profile", "label" => "Edit Profile", "menu" => "profile", "page" => "editProfile", "list_class" => "active", "link_class" => "list-group-item list-group-item-danger"));
         } elseif (currentPage() == "home" && loggedIn()) {
             new MenuItem(array("name" => "view_my_profile", "label" => "View My Profile", "menu" => "profile", "page" => "profile/" . getLoggedInUserGuid(), "weight" => 10));
             new MenuItem(array("name" => "edit_profile", "label" => "Edit My Profile", "menu" => "profile", "page" => "editProfile", "link_class" => "list-group-item", "weight" => 20));
             if (isEnabledPlugin("members")) {
                 new MenuItem(array("name" => "members", "label" => "Browse Members", "menu" => "profile", "page" => "members", "weight" => 30));
             }
             if (isEnabledPlugin("inviteFriends")) {
                 new MenuItem(array("name" => "invite_friends", "label" => translate("invite_your_friends"), "menu" => "profile", "page" => "members", "weight" => 40));
             }
         }
         if (currentPage() == "profile" && adminLoggedIn()) {
             if (adminLoggedIn()) {
                 $guid = pageArray(1);
                 $user = getEntity($guid);
                 if (is_a($user, "SocialApparatus\\User")) {
                     if (!isAdmin($user)) {
                         new MenuItem(array("name" => "delete", "label" => "Delete User", "page" => "action/deleteUser/{$guid}", "menu" => "profile", "weight" => 100000, "list_class" => "active", "link_class" => "list-group-item list-group-item-danger confirm"));
                         new MenuItem(array("name" => "login_as", "label" => "Login As", "page" => "action/loginas/{$guid}", "menu" => "profile", "weight" => 90000, "list_class" => "active", "link_class" => "list-group-item list-group-item-danger confirm"));
                         if ($user->banned == "true") {
                             new MenuItem(array("name" => "unban", "label" => "Unban", "page" => "action/unbanUser/{$guid}", "menu" => "profile", "weight" => 80000, "list_class" => "active", "link_class" => "list-group-item list-group-item-danger confirm"));
                         } else {
                             new MenuItem(array("name" => "ban", "label" => "Ban", "page" => "action/banUser/{$guid}", "menu" => "profile", "weight" => 80000, "list_class" => "active", "link_class" => "list-group-item list-group-item-danger confirm"));
                         }
                     }
                 }
             }
         }
     }
     if (currentPage() == "profile") {
         new CSS("profile", getSitePath() . "core_plugins/profile/assets/css/profile.css");
         new FooterJS('profile', getSiteURL() . 'core_plugins/profile/assets/js/profile.js', 900, true);
     }
     if (currentPage() == "admin") {
         new ViewExtension("admin/tabs", "admin_tabs/profile_fields");
     }
     new ProfileField("first_name", "First Name", "text", false, false, "form-control", "default", 10);
     new ProfileField("last_name", "Last Name", "text", false, false, "form-control", "default", 20);
     new ProfileField("gender", "Gender", "dropdown", array("Male" => "Male", "Female" => "Female"));
     new ProfileField("birthday", "Birthday", "date");
     new ProfileField("about", "About Me", "textarea");
     new ProfileField("hobbies", "Hobbies", "tags");
     new StorageType("User", "about", "text");
     new ViewExtension("profile/right", "profile/activity");
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:50,代码来源:ProfilePlugin.php


示例12: importCSV

 public function importCSV($course_code, $course_dep, $filename)
 {
     if (!loggedIn() || privilege() == NULL || privilege() == 'admin') {
         return 0;
     }
     $file = fopen($filename, "r");
     $count = 0;
     while (($data = fgetcsv($file, 10000, ",")) !== FALSE) {
         $count++;
         if ($count > 1) {
             $save = $this->newEntry($data[0], $course_code, $course_dep, $data[1], $data[2]);
         }
     }
     fclose($file);
     return 1;
 }
开发者ID:mkrdip,项目名称:Management-Information-System,代码行数:16,代码来源:Attendance.php


示例13: __construct

 public function __construct()
 {
     global $database;
     $this->competitions = $database->getAllCompetitions();
     $this->pages = $database->getAllPages();
     if (loggedIn()) {
         $this->userGroups = $database->getUserGroups($_SESSION['userID']);
         $this->userGroupNames = array();
         foreach ($this->userGroups as $groupId) {
             $this->userGroupNames[$groupId] = $database->getGroupName($groupId);
         }
         $this->money = $database->getMoney($_SESSION['userID']);
         $user = new \User($_SESSION['userID']);
         $this->score = number_format((double) $user->getScore(), 2, '.', '.');
     }
 }
开发者ID:nsystem1,项目名称:ZeeJong,代码行数:16,代码来源:Header.php


示例14: __construct

 function __construct()
 {
     if (loggedIn()) {
         if (currentPage() == "profile") {
             if (isEnabledPlugin("Friends")) {
                 $user_one = pageArray(1);
                 $user_two = getLoggedInUserGuid();
                 if (FriendsPlugin::friends($user_one, $user_two)) {
                     new MenuItem(array("name" => "chat", "menu" => "profile", "label" => "Chat", "page" => "action/CreateChat/" . $user_one, "link_class" => "list-group-item list-group-item-success"));
                 }
             }
         }
     }
     new ViewExtension("page_elements/foot", "chat/chat_boxes");
     new CSS("chat", getSitePath() . "core_plugins/chat/assets/css/chat.css", 400);
     new FooterJS("chat", getSiteURL() . "core_plugins/chat/assets/js/chat.js", 400, true);
     new Usersetting(array("name" => "notify_offline_chat", "field_type" => "dropdown", "options" => array("yes" => "Yes", "no" => "No"), "default_value" => "yes", "tab" => "notifications"));
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:18,代码来源:ChatPlugin.php


示例15: login

 public function login()
 {
     if (loggedIn()) {
         return redirect('home');
     }
     $this->form_validation->set_rules('username', 'Login', 'required|trim|callback_check_username');
     $this->form_validation->set_rules('password', 'Mot de passe', 'required|trim|callback_check_password');
     $this->form_validation->set_message('required', 'Le champ %s est obligatoire');
     if ($this->form_validation->run() == false) {
         $data['NOTOPBAR'] = true;
         $data['NOSIDEBAR'] = true;
         $data['title'] = 'Connexion';
         $this->render('login', $data);
     } else {
         // Start the session and redirect
         $user = $this->user_model->getUserByUsername($this->input->post('username'));
         $sess_array = array('id' => $user->userId, 'username' => $user->username, 'role' => $user->role);
         $this->session->set_userdata('login', $sess_array);
         return redirect('home');
     }
 }
开发者ID:iyaad,项目名称:Gestion-Stage,代码行数:21,代码来源:Users.php


示例16: get_comments_link

function get_comments_link($comments_allow, $comments, $id)
{
    global $ft, $rewrite;
    /*
    if ($comments_allow == -1) {
      if (isset($_SESSION) && array_key_exists('loggedIn', $_SESSION) && $_SESSION['loggedIn'] == 1) {
        $comments_allow = 1;
      } else {
        $comments_allow = 0;
      }
    }
    */
    if ($comments_allow == 0) {
        $ft->assign(array('COMMENTS_ALLOW' => false, 'COMMENTS' => ''));
    } else {
        if ($comments_allow == -1) {
            if ($comments > 0) {
                $comments_link = (bool) $rewrite ? '1,' . $id . ',2,item.html' : 'index.php?p=2&amp;id=' . $id . '';
                $ft->assign(array('COMMENTS_LINK' => $comments_link, 'COMMENTS_ALLOW' => true, 'COMMENTS' => $comments));
            } else {
                if (loggedIn()) {
                    $comments_link = (bool) $rewrite ? '1,' . $id . ',3,item.html' : 'index.php?p=3&amp;id=' . $id . '';
                    $ft->assign(array('COMMENTS_LINK' => $comments_link, 'COMMENTS_ALLOW' => true, 'COMMENTS' => ''));
                } else {
                    $ft->assign(array('COMMENTS_ALLOW' => false, 'COMMENTS' => ''));
                }
            }
        } else {
            if ($comments == 0) {
                $comments_link = (bool) $rewrite ? '1,' . $id . ',3,item.html' : 'index.php?p=3&amp;id=' . $id . '';
                $ft->assign(array('COMMENTS_LINK' => $comments_link, 'COMMENTS_ALLOW' => true, 'COMMENTS' => ''));
            } else {
                $comments_link = (bool) $rewrite ? '1,' . $id . ',2,item.html' : 'index.php?p=2&amp;id=' . $id . '';
                $ft->assign(array('COMMENTS_LINK' => $comments_link, 'COMMENTS_ALLOW' => true, 'COMMENTS' => $comments));
            }
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:core-svn,代码行数:38,代码来源:main_lib.php


示例17: check

function check()
{
    $dmenu = def_menu();
    $menu = array('Home' => array('Home' => ''), 'Account' => array('Rewards' => 'mpayouts', 'Payments' => 'payments', 'Settings' => 'settings', 'User Settings' => 'userset', '2FA Settings' => '2fa'), 'Workers' => array('Shifts' => 'shifts', 'Shift Graph' => 'usperf', 'Workers' => 'workers', 'Management' => 'workmgt'), 'Pool' => array('Stats' => 'stats', 'Blocks' => 'blocks', 'Graph' => 'psperf', 'Acclaim' => 'userinfo', 'Luck' => 'luck'), 'Admin' => NULL, 'gap' => array('API' => 'api', 'PBlocks' => 'pblocks'), 'Help' => array('Payouts' => 'payout'));
    tryLogInOut();
    $who = loggedIn();
    if ($who === false) {
        $p = getparam('k', true);
        if ($p == 'reset') {
            showPage(NULL, 'reset', $dmenu, '', $who);
        } else {
            if (requestLoginRegReset() == true) {
                showPage(NULL, 'reg', $dmenu, '', $who);
            } else {
                $p = getparam('k', true);
                process($p, $who, $dmenu);
            }
        }
    } else {
        $p = getparam('k', true);
        process($p, $who, $menu);
    }
}
开发者ID:nullivex,项目名称:ckpool,代码行数:23,代码来源:prime.php


示例18: genUserBar

function genUserBar()
{
    if (loggedIn()) {
        ?>
		<!--including script here bad? where should we then?-->
		<script src="js/user.js"></script>
			<div id = "loginDiv">
				<div id = "innerLoginDiv">
					Welcome <?php 
        echo getLoggedInUsername();
        ?>
!
					<button id = 'buttonMyBooks' onClick="document.location.href='mybooks.php'">My Books</button>
					<button id = 'buttonLogout' onclick = "logout()"> Logout </button>
				</div>
			</div>
	<?php 
    } else {
        ?>
			<!--including script here bad? where should we then?-->
			<script src="js/user.js"></script>
			<!--TODO: build css file for this-->
			<div id = "loginDiv">
				<div id = "innerLoginDiv">
					Username:
					<input id = 'usernameInput' type='text' maxlength='30' value=''/>
					Password:
					<input id = 'passwordInput' type='password' maxlength='30' value=''/>
					<button id = 'buttonLogin' onclick='login()'>  Login </button>
					<form id = "signUpForm" action="signup.php">
    					<input type="submit" value="Sign Up">
					</form>
				</div>
			</div>
		<?php 
    }
}
开发者ID:Thulebona,项目名称:Used-books,代码行数:37,代码来源:header.php


示例19: userCanCreateBlog

 static function userCanCreateBlog($user = false)
 {
     if (!loggedIn()) {
         return false;
     }
     if (!$user) {
         $user = getLoggedInUser();
     }
     $setting = Setting::get("who_can_create_blogs");
     if (!$setting) {
         $setting = "everyone";
     }
     switch ($setting) {
         case "everyone":
             return true;
             break;
         case "admin_only":
             if (adminLoggedIn()) {
                 return true;
             }
             break;
     }
     return false;
 }
开发者ID:socialapparatus,项目名称:socialapparatus,代码行数:24,代码来源:BlogsPlugin.php


示例20: sprintf

            $title = $db->f('title');
            $text = $db->f('text');
            $author = $db->f('author');
            if ((bool) $rewrite) {
                $perma_link = sprintf('1,%s,1,item.html', $id);
                $form_link = '1,3,item.html';
            } else {
                $perma_link = 'index.php?p=1&amp;id=' . $id;
                $form_link = 'index.php?p=3&amp;action=add';
            }
            // przypisanie tablicy szablonów::ft
            $ft->assign(array('NEWS_TITLE' => $title, 'NEWS_ID' => $id, 'NEWS_TEXT' => $text, 'NEWS_AUTHOR' => $author, 'QUOTE' => '', 'COMMENT_AUTHOR' => $comment_author, 'STRING' => $page_string, 'PERMA_LINK' => $perma_link, 'FORM_LINK' => $form_link));
        }
        switch ($db->f('comments_allow')) {
            case 0:
                $show_addcomment = false;
                break;
            case 1:
                $show_addcomment = true;
                break;
            case -1:
                $show_addcomment = loggedIn();
                break;
        }
        $ft->assign('SHOW_ADDCOMMENT', $show_addcomment);
        $ft->define('comments_request', 'comments_request.tpl');
        // parsowanie szablonu::ft
        $ft->parse('MAIN', '.comments_request');
        break;
}
$ft->assign(array('STRING' => '', 'PAGINATED' => false, 'MOVE_BACK' => false, 'MOVE_FORWARD' => false));
开发者ID:BackupTheBerlios,项目名称:core-svn,代码行数:31,代码来源:comments_add.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP logged_in函数代码示例发布时间:2022-05-15
下一篇:
PHP logg函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap