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


PHP user_list函数代码示例

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


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

示例1: cadmin

function cadmin()
{
    global $phpc_cal;
    if (!$phpc_cal->can_admin()) {
        permission_error(__('You must be logged in as an admin.'));
    }
    $index = tag('ul', tag('li', tag('a', attrs('href="#phpc-config"'), __('Calendar Configuration'))), tag('li', tag('a', attrs('href="#phpc-users"'), __('Users'))), tag('li', tag('a', attrs('href="#phpc-categories"'), __('Categories'))), tag('li', tag('a', attrs('href="#phpc-groups"'), __('Groups'))));
    return tag('div', attrs("class=\"phpc-tabs\""), $index, config_form(), user_list(), category_list(), group_list());
}
开发者ID:Godjqb,项目名称:Php-test,代码行数:9,代码来源:cadmin.php

示例2: admin

function admin()
{
    global $phpc_version;
    if (!is_admin()) {
        permission_error(__('You must be logged in as an admin.'));
    }
    $menu = tag('ul', tag('li', tag('a', attrs('href="#phpc-admin-calendars"'), __('Calendars'))), tag('li', tag('a', attrs('href="#phpc-admin-users"'), __('Users'))), tag('li', tag('a', attrs('href="#phpc-admin-import"'), __('Import'))), tag('li', tag('a', attrs('href="#phpc-admin-translate"'), __('Translate'))));
    $version = tag('div', attrs('class="phpc-bar ui-widget-content"'), __('Version') . ": {$phpc_version}");
    return tag('', tag('div', attrs('class="phpc-tabs"'), $menu, calendar_list(), user_list(), import(), translation_link()), $version);
}
开发者ID:php-calendar,项目名称:php-calendar,代码行数:10,代码来源:admin.php

示例3: whoishere_show

function whoishere_show($forum_place, $id, $tr = false)
{
    global $locale;
    if ($forum_place == "index" || $forum_place == "forum") {
        $res = dbquery("SELECT " . DB_FORUM_OBSERVER . ".user_id, forum_id, thread_id, user_name, user_level FROM " . DB_FORUM_OBSERVER . "\r\n\t\t\tLEFT JOIN " . DB_USERS . " ON " . DB_USERS . ".user_id = " . DB_FORUM_OBSERVER . ".user_id\r\n\t\t\tWHERE forum_id='" . (int) $id . "'");
        $guests = 0;
        $members = array();
        while ($data = dbarray($res)) {
            if (empty($data['user_name'])) {
                $guests++;
            } else {
                $members[] = array("user_id" => $data['user_id'], "user_name" => $data['user_name'], "user_level" => $data['user_level']);
            }
        }
        $whoishere = user_list($guests, $members);
        if ($forum_place == "index" && $whoishere) {
            echo "<span class='small'><strong>" . $locale['wih100'] . "</strong> {$whoishere}</span><br />";
        } elseif ($forum_place == "forum" && $whoishere) {
            if ($tr) {
                echo "<td><strong>" . $locale['wih100'] . "</strong> {$whoishere}</td>";
            } else {
                echo "<div style='padding: 5px;'><strong>" . $locale['wih100'] . "</strong> {$whoishere}</div>";
            }
        }
    } elseif ($forum_place == "thread") {
        $res = dbquery("SELECT " . DB_FORUM_OBSERVER . ".user_id, forum_id, thread_id, user_name, user_level FROM " . DB_FORUM_OBSERVER . "\r\n\t\t\tLEFT JOIN " . DB_USERS . " ON " . DB_USERS . ".user_id = " . DB_FORUM_OBSERVER . ".user_id\r\n\t\t\tWHERE thread_id='" . (int) $_GET['thread_id'] . "'");
        $guests = 0;
        $members = array();
        while ($data = dbarray($res)) {
            if (empty($data['user_name'])) {
                $guests++;
            } else {
                $members[] = array("user_id" => $data['user_id'], "user_name" => $data['user_name'], "user_level" => $data['user_level']);
            }
        }
        $whoishere = user_list($guests, $members);
        if ($whoishere) {
            if ($tr) {
                echo "<td>" . $locale['wih100'] . " {$whoishere}</td>";
            } else {
                echo "<div style='padding: 5px;'>" . $locale['wih100'] . " {$whoishere}</div>";
            }
        }
    }
}
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:45,代码来源:forum_observer.php

示例4: action_query

function action_query()
{
    // 全局变量
    $user = $GLOBALS['user'];
    $_CFG = $GLOBALS['_CFG'];
    $_LANG = $GLOBALS['_LANG'];
    $smarty = $GLOBALS['smarty'];
    $db = $GLOBALS['db'];
    $ecs = $GLOBALS['ecs'];
    $user_id = $_SESSION['user_id'];
    $user_list = user_list();
    $smarty->assign('user_list', $user_list['user_list']);
    $smarty->assign('filter', $user_list['filter']);
    $smarty->assign('record_count', $user_list['record_count']);
    $smarty->assign('page_count', $user_list['page_count']);
    $sort_flag = sort_flag($user_list['filter']);
    $smarty->assign($sort_flag['tag'], $sort_flag['img']);
    make_json_result($smarty->fetch('users_list.htm'), '', array('filter' => $user_list['filter'], 'page_count' => $user_list['page_count']));
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:19,代码来源:users.php

示例5: getConnection

<?php

require_once './header.php';
require_once './commonlib.php';
$conn = getConnection('ibabymall');
$user_list = user_list($conn);
?>
<form class="form-inline" id="new_account">
    <label class="control-label">新增帳號</label>
    <div class="form-group">
        <label class="control-label">帳號:</label>
        <input class="form-control" name="account" type="text">
    </div>
    <div class="form-group">
        <label class="control-label">密碼:</label>
        <input class="form-control" name="password" type="password">
    </div>
    <button class="btn btn-success">新增</button>
</form>
<script>
$(document).ready(function(){
    $("#new_account").submit(function(){
        form = $(this);
        $.ajax({
            url: 'register_ajax.php',
            type: 'post',
            data: form.serialize(),
            success: function(msg){
                form[0].reset();
                location.reload(false);
            }
开发者ID:itri980112,项目名称:dashboard,代码行数:31,代码来源:register.php

示例6: jury_user

function jury_user($db)
{
    global $text;
    $uploader = "";
    if (isset($_POST["user"])) {
        $uploader .= create_user($db, "");
    } else {
        $uploader .= create_user_form($db, "j=s", $text['jury']);
    }
    $uploader .= user_list($db, "");
    return $uploader;
}
开发者ID:pixelhaufen,项目名称:Wiki-Loves-Jurytool,代码行数:12,代码来源:user.php

示例7: mysql_real_escape_string

{
    $user_name = mysql_real_escape_string($user_name);
    mysql_query("DELETE FROM users WHERE user_name ='{$user_name}'");
}
function user_list()
{
    $user_list = array();
    $users_query = mysql_query("SELECT user_name FROM users");
    while ($users_row = mysql_fetch_assoc($users_query)) {
        $users_list[] = $users_row['user_name'];
    }
    return $user_list;
}
if (isset($_POST['user_name'], $_POST['action']) || isset($_POST['action'])) {
    $user_name = $_POST['user_name'];
    $action = $_POST['action'];
    if ($action == 'joined') {
        echo 'Joined reached';
        user_joined($user_name);
    } else {
        if ($action == 'list') {
            foreach (user_list() as $user) {
                echo $user, '<br>';
            }
        } else {
            if ($action == 'left') {
                user_left($user_name);
            }
        }
    }
}
开发者ID:vanstorm9,项目名称:WannaStudy,代码行数:31,代码来源:users.php

示例8: switch

<?php

require_once '../core/init.php';
$choice = Input::get('access');
switch ($choice) {
    case 'user_list':
        user_list();
        break;
    case 'insert_user_data':
        insert_user_data();
        break;
    case 'delete':
        delete();
        break;
    case 'place_details':
        place_details();
        break;
    default:
        # code...
        break;
}
function user_list()
{
    if (Input::exists()) {
        $db = DB::getInstance();
        $search_term = Input::get('search_term');
        $search_term = "%{$search_term}%";
        $get_list = $db->quert("SELECT * FROM authorized_doctors_list WHERE doctor_name LIKE {$search_term}");
        if ($get_list->count() > 0) {
            foreach ($get_list->results() as $doctors_list => $doctor) {
                echo "<option>{$doctor['doctor_name']}</option>";
开发者ID:tapas08,项目名称:NRHM,代码行数:31,代码来源:common_functions.php

示例9: user_created

function user_created()
{
    $ret = 'Creation/update successful!<br/><br/>';
    $ret = $ret . user_list();
    return $ret;
}
开发者ID:robmat,项目名称:samplebator,代码行数:6,代码来源:admin_system_users.php

示例10: display_users

function display_users()
{
    $list = user_list();
    foreach ($list as $user) {
        print '<option value="' . $user . '">' . $user . '</option>';
    }
}
开发者ID:avallete,项目名称:PHPool,代码行数:7,代码来源:admin.php

示例11: switch

/*
 * Sending calls to the view
 * Call functions on {yourmodule}.controller.php
 */
switch ($_GET['fn']) {
    case 'user_list':
        print user_list($_GET['row_id']);
        break;
    case 'user_list_pager':
        print user_list(NULL, $_GET['search'], $_GET['sort'], $_GET['page']);
        break;
    case 'user_list_sort':
        print user_list(NULL, $_GET['search'], $_GET['sort'], 1);
        break;
    case 'user_list_search':
        print user_list(NULL, $_GET['search']);
        break;
    case 'user_edit_form':
        print user_edit_form($_GET['user_id']);
        break;
    case 'user_edit_form_submit':
        print user_edit_form_submit($_GET);
        break;
    case 'user_delete_form':
        print user_delete_form($_GET['user_id']);
        break;
    case 'user_delete_form_submit':
        print user_delete_form_submit($_GET);
        break;
    case 'user_create_form':
        print user_create_form();
开发者ID:enettolima,项目名称:ceva-finance,代码行数:31,代码来源:index.php

示例12: all_func

function all_func()
{
    submit_buttons_remove_get_var();
    user_list();
}
开发者ID:alicankustemur,项目名称:LoginCrudPHPExample,代码行数:5,代码来源:functions.php

示例13: user_edit_form_submit

/**
 * User Edit Form Submit.
 */
function user_edit_form_submit($data)
{
    $user = new User();
    $user->byID($data['id']);
    // Validate User Fields
    $error = user_validate_fields($data);
    if (!empty($error)) {
        foreach ($error as $msg) {
            natural_set_message($msg, 'error');
        }
        return FALSE;
    } else {
        foreach ($user as $field => $value) {
            if ($field != 'dashboard_1' && $field != 'dashboard_2' && $field != 'id') {
                $user->{$field} = $data[$field];
            }
        }
        $user->dashboard_1 = $user->dashboard_1;
        $user->dashboard_2 = $user->dashboard_2;
        $update = $user->update($data['id']);
        if ($update['code'] == 200) {
            natural_set_message('User ' . $data['first_name'] . ' ' . $data['last_name'] . ' was updated successfully!', 'success');
            return user_list($data['id']);
        } else {
            natural_set_message($update['message'], 'error');
        }
    }
}
开发者ID:enettolima,项目名称:ceva-finance,代码行数:31,代码来源:user.controller.php

示例14: switch

    if (isset($_POST['project']) && isset($_POST['language'])) {
        if (in_array($_POST['project'], array('wikipedia', 'wikinews', 'wikibooks', 'wiktionary', 'wikiquote', 'wikivoyage', 'wikidata', 'wikimedia', 'wikiversity', 'wikisource', 'mediawiki'))) {
            $settings['wikiroot'] = "http://" . $_POST['language'] . "." . $_POST['project'] . ".org/";
        }
    }
    switch ($_POST['type']) {
        case 'rc':
            $limit = isset($_POST['limit']) ? $_POST['limit'] : '';
            $from = isset($_POST['from']) ? $_POST['from'] : '';
            $to = isset($_POST['to']) ? $_POST['to'] : '';
            $rc = recent_changes($limit, $from, $to);
            echo json_encode($rc['query']['recentchanges']);
            break;
        case 'log':
            // None yet
            throw new Exception("Feature not implemented");
            break;
        case 'user':
            $user_list = user_list($_POST['group']);
            $user_list = $user_list['query']['allusers'];
            echo json_encode($user_list);
            break;
        case 'stat':
            $statistics = statistics();
            $statistics = $statistics['query']['statistics'];
            echo json_encode($statistics);
            break;
    }
} catch (Exception $e) {
    die("FAILED: " . $e->getMessage());
}
开发者ID:halfak,项目名称:Raun,代码行数:31,代码来源:api-polling.php

示例15: user_cnx_in_out

 */
// UC1 : Connexion utilisateur 'gp'
user_cnx_in_out($gp_user_info['id'], '_gp_', CNX_STATE_LOGIN);
// UC2 : Déconexion utilisateur 'gp'
user_cnx_in_out($gp_user_info['id'], '_gp_', CNX_STATE_LOGOUT);
// UCS3 :
// - Ajout de deux nouveaux utilisateurs puis connexion du premier de ceux-ci
// - Reconnexion de l'utilisateur 'gp'
// - Listage des utilisateurs connctés (2 le sont)
$pinocchio_user_id = user_add('pinocchio', 'pinocchio', 'Pinocchio', 'La marionetta', 'pinocchio.marionetta@isi-mtl.com');
$jiminy_user_id = user_add('jiminy', 'jiminy', 'Jiminy', 'Cricket', 'jiminy.cricket@isi-mtl.com');
// - Connection de l'utilisateur 'jiminy' et re-connexion de l'utilisateur 'gp'
user_cnx_in_out($jiminy_user_id, '_jiminy_', CNX_STATE_LOGIN);
user_cnx_in_out($gp_user_info['id'], '_gp_', CNX_STATE_LOGIN);
// - Listage des utilisateurs connctés (2 le sont)
$utilisateurs_connectes = user_list();
var_dump($utilisateurs_connectes);
?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
</head>
<body>

<?php 
echo "<ul>";
echo "</ul>";
?>
</body>
开发者ID:jordangauthier,项目名称:phpat,代码行数:31,代码来源:_test_uc_user.php


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