当前位置: 首页>>代码示例>>PHP>>正文


PHP display_user_menu函数代码示例

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


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

示例1: session_start

session_start();
//create short variable names
$username = isset($_POST["username"]) ? $_POST["username"] : "";
$password = isset($_POST["password"]) ? $_POST["password"] : "";
//first check whether the user has come from the front page by filling out the form
if ($username && $password) {
    //they have just tried to log in
    try {
        login($username, $password);
        //if they are in the database (as in they are a member), register their username to the session ID variable called valid_user
        $_SESSION["valid_user"] = $username;
    } catch (Exception $e) {
        //unsuccessful login
        do_html_header("Problem: ");
        echo "We could not log you in. You must be logged in to view this page.";
        do_html_url("login.php", "Login");
        do_html_footer();
        exit;
    }
}
//start the display
do_html_header("Home");
check_valid_user();
//get the bookmarks this user has saved
if ($url_array = get_user_urls($_SESSION["valid_user"])) {
    //gilho instead of session valid user
    display_user_urls($url_array);
}
//give menu options
display_user_menu();
do_html_footer();
开发者ID:HoGil,项目名称:phpUrlApp,代码行数:31,代码来源:member.php

示例2: do_page_content_member

function do_page_content_member($current_user)
{
    ?>
<div class="container theme-showcase" role="main">

<div class="page-header">
  <h2>Member Page</h2>
  <p>You are logged in as <?php 
    echo $current_user;
    ?>
.</p>
  <p>On this page you can upload a new learning object, modify your learning objects, or change your password.</p>
</div>
  
<?php 
    display_user_menu();
    ?>
     
</div>
<?php 
}
开发者ID:ychencs,项目名称:LUPersonalLMS,代码行数:21,代码来源:output_fns.php


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