本文整理汇总了PHP中user_list函数的典型用法代码示例。如果您正苦于以下问题:PHP user_list函数的具体用法?PHP user_list怎么用?PHP user_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了user_list函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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', '[email protected]');
$jiminy_user_id = user_add('jiminy', 'jiminy', 'Jiminy', 'Cricket', '[email protected]');
// - 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
示例16: user_jelszokuld
break;
case 'jelszokuld':
$tartalom = user_jelszokuld();
break;
case 'list':
if ($user->checkRole('user')) {
$tartalom = user_list();
} else {
addMessage('Nincs jogosultságod megnézni a felhasználók listáját.', 'warning');
$tartalom = array('title' => 'Felhasználók listája');
}
break;
case 'del':
$tartalom = user_del($_REQUEST['uid']);
break;
case 'delete':
if (is_numeric($_REQUEST['uid']) and $user->checkRole('user') and $user->uid != $_REQUEST['uid']) {
$user2delete = new User($_REQUEST['uid']);
$user2delete->delete();
$tartalom = user_list();
} else {
//TODO: elegánsabb hibakezelést!
addMessage('Hiányzó jogosultság miatt nem lehetséges a törlése!', danger);
$tartalom['content'] = '';
$tartalom['template'] = 'layout';
}
break;
default:
$tartalom = user_edit($user->uid);
break;
}
开发者ID:kolesar-andras,项目名称:miserend.hu,代码行数:31,代码来源:regisztracio.php
示例17: foreach
foreach ($ul as $u) {
if ($u != "empty") {
echo '<option value="' . $u . '">' . $u . '</option>';
}
}
?>
</optgroup>
</select>
<button type="submit" class="btn btn-danger">Kill Server</button>
</form>
<form action="admin.php" method="post">
<legend>Switch to a User</legend>
<input type="hidden" name="action" value="user-switch">
<select name="user" style="vertical-align: top;">
<?php
$ul = user_list();
foreach ($ul as $u) {
if ($u != "empty") {
echo '<option value="' . $u . '">' . $u . '</option>';
}
}
?>
</select>
<button type="submit" class="btn btn-danger">Log In</button>
</form>
</div>
<div class="span4">
<form action="admin.php" method="post" autocomplete="off">
<input type="hidden" name="action" value="user-add">
<legend>Add New User</legend>
<div class="control-group">
开发者ID:gilleyj,项目名称:MCHostPanel,代码行数:31,代码来源:admin.php
示例18: start_session
require_once 'src/user_funcs.php';
/* Start the session using our custom session support. */
start_session();
/* Configure Smarty. */
$jag = new Smarty();
$jag->compile_dir = "./compile";
$jag->cache_dir = "./cache";
/* Set up the theme for the user. FIXME should read from the database. */
$template_dir = "themes/default";
$jag->template_dir = $template_dir;
$jag->assign('template_dir', $template_dir);
/* Manage navigation. */
if (isset($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
case 'add_user':
add_user($jag);
break;
case 'register':
$jag->assign('disp', $_REQUEST['action']);
break;
case 'user_list':
$jag->assign('users', user_list($jag));
$jag->assign('disp', $_REQUEST['action']);
break;
default:
$jag->assign('disp', 'index');
}
} else {
$jag->assign('disp', 'index');
}
$jag->display('index.tpl');
开发者ID:BackupTheBerlios,项目名称:jagged-forum,代码行数:31,代码来源:index.php
示例19: profile_link
// Pimped: profile_link added
$class_color = $class % 2 == 0 ? "tbl1" : "tbl2";
$class++;
echo "<tr>\r\n\t\t\t<td class='" . $class_color . "'>\r\n\t\t\t\t" . $locale['forum_stats_106'] . ": " . profile_link($tposter_id, $tposter_name, $tposter_status) . " (" . $tposter_posts . " " . $locale['forum_stats_104'] . ") ::\r\n\t\t\t\t" . $locale['forum_stats_107'] . ": " . profile_link($aposter_id, $aposter_name, $aposter_status) . " (" . round($aposter_ppday, 2) . " " . $locale['forum_stats_105'] . ")\r\n\t\t\t</td>\r\n\t\t</tr>\n";
}
// User Stats
if ($settings['forum_statistics_userstats']) {
// Pimped: profile_link added
$class_color = $class % 2 == 0 ? "tbl1" : "tbl2";
$class++;
pif_cache("total_reg_users");
pif_cache("newest_reg_member");
echo "<tr>\r\n\t\t\t<td class='" . $class_color . "'>\r\n\t\t\t" . $locale['forum_stats_109'] . ": <strong>" . $pif_cache['total_reg_users'] . "</strong> :: " . $locale['forum_stats_111'] . ": " . profile_link($pif_cache['newest_reg_member']['user_id'], $pif_cache['newest_reg_member']['user_name'], $pif_cache['newest_reg_member']['user_status']) . "<br/>\r\n\t\t\t" . $locale['forum_stats_108'] . ": <strong>" . $pif_cache['online_users']['guests'] . "</strong> " . $locale['forum_stats_113'] . ", <strong>" . count($pif_cache['online_users']['members']) . "</strong> " . $locale['forum_stats_112'] . ":\n " . user_list(0, $pif_cache['online_users']['members']) . "<br/>\r\n\t\t\t" . sprintf($locale['forum_stats_110'], "<strong>" . $max_online . "</strong>", showdate("forumdate", $max_online_time)) . "\r\n\t\t\t</td>\r\n\t\t</tr>\n";
}
// Members Today Online
if ($settings['forum_statistics_todayonline']) {
$class_color = $class % 2 == 0 ? "tbl1" : "tbl2";
$class++;
$user_list = user_list(0, $today_online);
echo "<tr>\r\n\t\t\t<td class='" . $class_color . "'>" . ($user_list != "" ? ($today_rows > 1 ? sprintf($locale['forum_stats_116'], $today_rows) : $locale['forum_stats_117']) . $user_list : $locale['forum_stats_118']) . "</td>\r\n\t\t</tr>\n";
}
// Members Today Birthday
if ($settings['forum_statistics_birthday']) {
if ($today_birthday != "") {
$class_color = $class % 2 == 0 ? "tbl1" : "tbl2";
$class++;
echo "<tr><td class='" . $class_color . "'>" . $today_birthday . "</td></tr>\n";
}
}
echo "</table>\n";
closetable();
开发者ID:MichaelFichtner,项目名称:RadioLaFamilia,代码行数:31,代码来源:forum_statistics.php
示例20: user_list
//没达到条件的所有会员变为普通会员
$GLOBALS['db']->query("UPDATE " . $GLOBALS['ecs']->table('users') . " SET is_fenxiao = 2 WHERE is_fenxiao <> 0 AND " . "(" . $fx_where . ")");
//达到条件的所有会员晋级为分销商
$GLOBALS['db']->query("UPDATE " . $GLOBALS['ecs']->table('users') . " SET is_fenxiao = 1 WHERE is_fenxiao <> 0 AND " . "(" . $ex_where . ")");
}
$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']);
$smarty->assign('full_page', 1);
$smarty->assign('sort_user_id', '<img src="images/sort_desc.gif">');
assign_query_info();
$smarty->display('distributor_list.htm');
} elseif ($_REQUEST['act'] == 'query') {
$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('distributor_list.htm'), '', array('filter' => $user_list['filter'], 'page_count' => $user_list['page_count']));
} elseif ($_REQUEST['act'] == 'edit') {
$sql = "SELECT u.user_name, u.sex, u.birthday, u.pay_points, u.rank_points, u.user_rank , u.user_money, u.frozen_money, u.credit_line, u.parent_id, u2.user_name as parent_username, u.qq, u.msn, u.office_phone, u.home_phone, u.mobile_phone" . " FROM " . $ecs->table('users') . " u LEFT JOIN " . $ecs->table('users') . " u2 ON u.parent_id = u2.user_id WHERE u.user_id='{$_GET['id']}'";
$row = $db->GetRow($sql);
$row['user_name'] = addslashes($row['user_name']);
$users =& init_users();
$user = $users->get_user_info($row['user_name']);
$sql = "SELECT u.user_id, u.sex, u.birthday, u.pay_points, u.rank_points, u.user_rank , u.user_money, u.frozen_money, u.credit_line, u.parent_id, u2.user_name as parent_username, u.qq, u.msn,\n u.office_phone, u.home_phone, u.mobile_phone,u.real_name,u.card,u.face_card,u.back_card,u.country,u.province,u.city,u.district,u.address,u.status " . " FROM " . $ecs->table('users') . " u LEFT JOIN " . $ecs->table('users') . " u2 ON u.parent_id = u2.user_id WHERE u.user_id='{$_GET['id']}'";
$row = $db->GetRow($sql);
开发者ID:moonlight-wang,项目名称:feilun,代码行数:31,代码来源:distributor.php
注:本文中的user_list函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论