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


PHP do_html_url函数代码示例

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


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

示例1: getcomEvents

    function getcomEvents()
    {
        // извлекаем события сегодняшнего дня и будущие,  которые пользователь разрешил показывать гостям,  формируем список и ссылки на них
        $query = "SELECT event_name,  event_startdate,  event_city, event_address, event_id FROM events WHERE event_startdate >= CURDATE( ) and event_show_guest = 'yes' limit 10";
        $result = $this->mMysqli->query($query);
        while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
            $event_id = $row['event_id'];
            $event_names = $row['event_name'];
            $url = "event.php?event_id=" . $event_id;
            $title = $event_names;
            ?>
		  <div class="comment">
		  <div class="comment-avatar"></div>
		  <div class="comment-name">Название мероприятия
		  <?php 
            do_html_url($url, $title);
            ?>
 </div>
          <div class="comment-text">
		  <?php 
            $this->event_city = $row['event_city'];
            $this->event_address = $row['event_address'];
            echo ' ' . $row['event_city'] . ' ' . $row['event_address'] . '<br/>';
            ?>
		   <div class="comment-date">
		   <?php 
            $this->event_startdate = $row['event_startdate'];
            echo ' ' . $row['event_startdate'] . '<br/>';
            ?>
</div></div>
		   </div>
          <?php 
        }
        $result->close();
    }
开发者ID:eka13,项目名称:git-s,代码行数:35,代码来源:class_comevents.php

示例2: check_valid_user

function check_valid_user()
{
    if (isset($_SESSION['valid_user'])) {
        echo "Logged in as " . $_SESSION['valid_user'] . ".<br />";
    } else {
        do_html_heading('Problem:');
        echo 'You are not logged in.<br />';
        do_html_url('login.php', 'Login');
        do_html_footer();
        exit;
    }
}
开发者ID:EJSohn,项目名称:-BookStoreProject,代码行数:12,代码来源:user_auth_fns.php

示例3: check_valid_user

function check_valid_user()
{
    if (isset($_SESSION['valid_user'])) {
        echo 'Logged in as ' . $_SESSION['valid_user'] . '.';
        echo '<br />';
    } else {
        // they are not logged in
        do_html_heading('Problem:');
        echo 'You are not logged in.<br />';
        do_html_url('login', 'Login');
        exit;
    }
}
开发者ID:jamaBHacker,项目名称:bookmarker,代码行数:13,代码来源:user_auth_fns.php

示例4: register

function register($name, $passwd)
{
    $db = db_connect();
    $query = "select * from members where name='" . $name . "'";
    $result = $db->query($query);
    if ($result->num_rows > 0) {
        echo "the name already exits.";
        do_html_url('blog/register', 'Back to register');
        exit;
    }
    $query = "insert into members(name, passwd) values('" . $name . "','" . $passwd . "')";
    $result = $db->query($query);
    return $result;
}
开发者ID:pyhale,项目名称:PHPblog,代码行数:14,代码来源:user_auth_fns.php

示例5: getFriends

 function getFriends($user_id)
 {
     // друзья пользователя
     $query = "SELECT concat (user_name, ' ', family_name) AS fr, user_id from users" . " WHERE user_id IN " . "(SELECT friend_number FROM friends" . " WHERE user_number  =\"{$user_id}\")";
     $result = $this->mMysqli->query($query);
     while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
         $user_id = $row['user_id'];
         $spisok = $row['fr'];
         $url = "user.php?user_id=" . $user_id;
         $title = $spisok;
         do_html_url($url, $title);
     }
     $result->close();
 }
开发者ID:eka13,项目名称:git-s,代码行数:14,代码来源:class_user.php

示例6: check_valid_user

function check_valid_user()
{
    global $HTTP_SESSION_VARS;
    if (isset($HTTP_SESSION_VARS['valid_user'])) {
        echo 'Logged in as ' . $HTTP_SESSION_VARS['valid_user'] . '.';
        echo '<br />';
    } else {
        // they are not logged in
        do_html_heading('Problem:');
        echo 'You are not logged in.<br />';
        do_html_url('login.php', 'Login');
        do_html_footer();
        exit;
    }
}
开发者ID:andersonbporto,项目名称:programacao_internet_2015_1,代码行数:15,代码来源:user_auth_fns.php

示例7: check_valid_user

function check_valid_user()
{
    global $valid_user;
    if (session_is_registered("valid_user")) {
        echo "Logged in como {$valid_user}.";
        echo "<br>";
    } else {
        // they are not logged in
        do_html_heading("Problema:");
        echo "No estás logged in.<br>";
        do_html_url("login.php", "Login");
        do_html_footer();
        exit;
    }
}
开发者ID:sebasotelo,项目名称:Arica.cl,代码行数:15,代码来源:user_auth_fns.php

示例8: getUsers

 function getUsers()
 {
     // получаем список пользователей и их номер
     $query = "SELECT concat (user_name, ' ', family_name) AS fr, user_id from users";
     // execute the query
     $result = $this->mMysqli->query($query);
     while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
         $user_id = $row['user_id'];
         $spisok = $row['fr'];
         $url = "user.php?user_id=" . $user_id;
         $title = $spisok;
         // функция из библиотеки функций, формирует страницы пользователей и ссылки на них
         do_html_url($url, $title);
     }
     $result->close();
 }
开发者ID:eka13,项目名称:git-s,代码行数:16,代码来源:class_users.php

示例9: check_valid_user

function check_valid_user()
{
    //checks that current user has a registered session. This is aimed at users who have not just logged in,
    //but are mid-session. So does not connect to db again
    //see if somebody is logged in and notify them if not
    if (isset($_SESSION["valid_user"])) {
        echo "";
        echo "Logged in as " . $_SESSION["valid_user"] . ".<br /n>";
    } else {
        //they are not logged in
        do_html_header("Problem: ");
        echo "You are not logged in. <br />";
        do_html_url("login.php", "Login");
        do_html_footer();
        exit;
    }
}
开发者ID:HoGil,项目名称:phpUrlApp,代码行数:17,代码来源:user_auth_fns.php

示例10: getEvents

 function getEvents()
 {
     // what SQL query you want executed?
     $query = "SELECT event_name,  event_startdate,  event_city, event_address, event_id FROM events WHERE event_startdate >= CURDATE( )";
     // execute the query
     $result = $this->mMysqli->query($query);
     while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
         $event_id = $row['event_id'];
         $event_names = $row['event_name'];
         $url = "event.php?event_id=" . $event_id;
         $title = $event_names;
         do_html_url($url, $title);
         $this->event_startdate = $row['event_startdate'];
         $this->event_city = $row['event_city'];
         $this->event_address = $row['event_address'];
         echo ' ' . $row['event_startdate'] . '<br/>';
         echo ' ' . $row['event_city'] . ' ' . $row['event_address'] . '<br/>';
         $a = $row['event_startdate'];
         $b = $row['event_city'];
         echo $a . $b;
     }
     $result->close();
 }
开发者ID:eka13,项目名称:git-s,代码行数:23,代码来源:class_events.php

示例11: session_start

<?php

include 'functions.php';
session_start();
do_html_header('Register');
if ($_POST['name'] && $_POST['passwd']) {
    $name = $_POST['name'];
    $passwd = $_POST['passwd'];
    $result = register($name, $passwd);
    if ($result) {
        echo "register successfully.";
        $_SESSION['author'] = $name;
        header('Location:http://127.0.0.1/blog');
    } else {
        echo "Can't register now, please try again later.";
        do_html_url('blog/register.php', 'Back to register');
    }
}
?>

<form action="register.php" method="post">
Username:<input type="text" name="name" /><br>
Password:<input type="password" name="passwd" /><br>
<input type="submit" value="submit" />
</form>

<?php 
do_html_footer();
开发者ID:pyhale,项目名称:PHPblog,代码行数:28,代码来源:register.php

示例12: session_start

<?php

include 'functions.php';
session_start();
check_valid_user();
do_html_header('Blog', array('ajax_functions.js'));
$_SESSION['author_id'] = get_authorid($_SESSION['author']);
$result = get_entries($_SESSION['author_id']);
display_entries($result);
do_html_url('blog/write_post.php', 'Write post');
do_html_url('blog/logout.php', 'logout');
do_html_footer();
开发者ID:pyhale,项目名称:PHPblog,代码行数:12,代码来源:index.php

示例13: db_connect

    $password = $_POST['password'];
    // echo "请输入用户名或密码";
    // do_html_url('login.php','请重新登录');
    $db = db_connect();
    $query = "select * from user where username = '" . $username . "' and passwd = '" . $password . "'";
    $result = $db->query($query);
    //var_dump($result);
    $result_num = $result->num_rows;
    if ($result_num > 0) {
        //成功执行SELECT, SHOW, DESCRIBE或 EXPLAIN查询会返回一个mysqli_result 对象,其他查询则返回TRUE
        //SELECT查询后即使是没有找到结果,也会返回对象,所以if判断结果集的行数,才能判断有没有找到
        $rows = $result->fetch_assoc();
        $_SESSION['valid_user'] = $username;
        echo "Welcome " . $rows['username'] . "";
    } else {
        do_html_url('login.php', '用户名或密码错误,请重新登录');
        exit;
    }
}
// if (!$result) {
// 	echo "找不到此用户.";
// 	exit();
// }
check_valid_user();
if (!($url_array = get_user_urls($_SESSION['valid_user']))) {
    echo "您还没有添加书签,请<a href='addbm.php'>添加书签</a>";
} else {
    display_user_urls($url_array);
}
display_user_menu();
do_html_footer();
开发者ID:jimlucn,项目名称:tag,代码行数:31,代码来源:member.php

示例14: session_start

<?php

require_once 'functions.php';
session_start();
$username = $_POST['username'];
$password = $_POST['password'];
do_html_header('登录');
if (!isset($_SESSION['valid_user'])) {
    if (!filled_out($_POST)) {
        do_html_url('login.php', '请填写用户名和密码。');
        exit;
    }
    if (is_user($username, $password)) {
        $_SESSION['valid_user'] = $username;
        do_html_url('index.php', '登录成功,去购物');
    } else {
        do_html_url('login.php', '用户名或密码错误');
        exit;
    }
}
do_html_footer();
开发者ID:jimlucn,项目名称:cart,代码行数:21,代码来源:member.php

示例15: do_html_header

<?php

//session_start();
do_html_header('Changing password');
check_admin_user();
if (!filled_out($_POST)) {
    echo 'You have not filled out the form completely.
         Please try again.';
    do_html_url(baseurl() . 'cart/admin', 'Back to administration menu');
    exit;
} else {
    $new_passwd = $_POST['new_passwd'];
    $new_passwd2 = $_POST['new_passwd2'];
    $old_passwd = $_POST['old_passwd'];
    if ($new_passwd != $new_passwd2) {
        echo 'Passwords entered were not the same.  Not changed.';
    } else {
        if (strlen($new_passwd) > 16 || strlen($new_passwd) < 6) {
            echo 'New password must be between 6 and 16 characters.  Try again.';
        } else {
            // attempt update
            if (change_password($_SESSION['admin_user'], $old_passwd, $new_passwd)) {
                echo 'Password changed.';
            } else {
                echo 'Password could not be changed.';
            }
        }
    }
}
do_html_url(baseurl() . 'cart/admin', 'Back to administration menu');
开发者ID:jamaBHacker,项目名称:cart,代码行数:30,代码来源:change_password.php


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