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


PHP list_users函数代码示例

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


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

示例1: show_memberlist

function show_memberlist()
{
    cpg_db_query("DELETE FROM {$CONFIG['TABLE_USERS']} WHERE user_name = '' LIMIT 1");
    pageheader($lang_usermgr_php['title']);
    list_users();
    pagefooter();
}
开发者ID:CatBerg-TestOrg,项目名称:coppermine_1.6.x,代码行数:7,代码来源:usermgr.php

示例2: admin_tools

function admin_tools()
{
    if (current_user_can('manage_options')) {
        ?>
		<div id="admin-tools">
			<a class="admin-tools-toggle" href="#" data-toggle="modal" data-target="#admin-tools-modal"><span aria-hidden="true" class="glyphicon glyphicon-plus"></span>Admin Tools</a>
		</div>
		<div class="modal fade" id="admin-tools-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog modal-lg">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h4 class="modal-title">Administrator Tools</h4>
					</div>
					<div class="modal-body"><?php 
        list_users();
        ?>
</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
	<?php 
    }
}
开发者ID:evinw,项目名称:project_gdent,代码行数:27,代码来源:admin-tools.php

示例3: parseRequest

    $formData = parseRequest($_POST);
    $errors = validateFormData($formData);
    if (is_array($errors) && count($errors) > 0) {
    } else {
        $id = $formData['aid'];
        $pw = $formData['pwd'];
        setcookie("devid", $id, time() + 60 * 60 * 24 * 5);
        // 有効期限5日間
        $errors = login_new($id, $pw);
    }
} else {
    if (isset($_REQUEST['error_msg'])) {
        $errors = $_REQUEST['error_msg'];
    }
}
$users = list_users();
if (strlen($formData['aid']) > 0 && $formData['aid'] != '') {
    $id = $formData['aid'];
} else {
    $id = $_COOKIE["devid"];
    //まずクッキーを読み出して変数に格納
}
function parseRequest($lineData)
{
    $formData = array();
    $formData['aid'] = normalizeData($lineData['aid']);
    $formData['pwd'] = normalizeData($lineData['pwd']);
    return $formData;
}
/*
 * データをチェックする。
开发者ID:kaoru-t,项目名称:sample,代码行数:31,代码来源:login.php

示例4: list_users

<?php

$all_users = list_users($db);
if (isset($_GET['error'])) {
    $error = $_GET['error'];
}
?>


<h2 class="sub-header">Users</h2>
<div class="table-responsive">
  <table class="table table-striped">
  <thead>
  <tr>
    <th>Username</th>
    <th>Action</th>
  </tr>
  </thead>
  <tbody>
  <?php 
foreach ($all_users as $user_row) {
    echo "<tr>";
    echo "<td>{$user_row->username}</td><td><a href=\"./includes/user_delete.php?delete={$user_row->username}\" name=\"Delete\">Delete</a> / <a href=\"./?section=user_profile&user={$user_row->username}\">Edit</a></td>";
    echo "</tr>";
}
?>
</tbody>
</table>
<?php 
if (isset($_GET['error'])) {
    $error = $_GET['error'];
开发者ID:ventillo,项目名称:bastartCMS,代码行数:31,代码来源:admin_dashboard.php

示例5: switch

 }
 $matches = CPGPluginAPI::filter('plugin_block', $matches);
 if (is_array($matches)) {
     switch ($matches[1]) {
         case 'breadcrumb':
             // Added breadcrumb as a separate listable block from config
             if (($breadcrumb != '' || count($cat_data) > 0) && $cat != 0) {
                 theme_display_breadcrumb($breadcrumb, $cat_data);
             }
             break;
         case 'catlist':
             if ($breadcrumb != '' || count($cat_data) > 0) {
                 theme_display_cat_list($breadcrumb, $cat_data, $statistics);
             }
             if (isset($cat) && $cat == USER_GAL_CAT) {
                 list_users();
             }
             break;
         case 'alblist':
             list_albums();
             break;
         case 'anycontent':
             if ($cat == 0) {
                 ob_start();
                 /**
                  * Any php code or HTML can be put in this file and will be displayed
                  */
                 include 'anycontent.php';
                 $anycontent = CPGPluginAPI::filter('anycontent', ob_get_contents());
                 ob_end_clean();
                 echo $anycontent;
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:31,代码来源:index.php

示例6: realpath

<?php

require_once realpath($_SERVER['DOCUMENT_ROOT']) . '/includes/init.inc.php';
if (isset($_POST['page']) && isset($_POST['keyword'])) {
    echo list_users($_POST['page'], $_POST['keyword']);
}
开发者ID:spiritwild,项目名称:biorhythm,代码行数:6,代码来源:admin_user.php

示例7: usersMenus

	$user=new usersMenus();
	if($user->AsSambaAdministrator==false){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}
	
	if(isset($_GET["tabs"])){popup_tabs();exit;}
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["popup-acls"])){popup_acls();exit;}
	if(isset($_GET["main"])){popup_main();exit;}
	if(isset($_GET["sharedlist"])){shared_folders_list();exit;}
	if(isset($_GET["acldisks"])){acldisks();exit;}
	if(isset($_GET["aclline"])){aclsave();exit;}
	if(isset($_GET["SearchUser"])){SearchUser();exit;}
	if(isset($_GET["SearchPattern"])){list_users();exit;}
	
	if(isset($_GET["DeleteAllAcls"])){DeleteAllAcls();exit;}
	
	if(isset($_GET["AddAclUser"])){AddAclUser();exit;}
	if(isset($_GET["DeleteAclUser"])){DeleteAclUser();exit;}
	if(isset($_GET["ChangeAclUser"])){ChangeAclUser();exit;}
	
	if(isset($_GET["AddAclGroup"])){AddAclGroup();exit;}
	if(isset($_GET["DeleteAclGroup"])){DeleteAclGroup();exit;}
	if(isset($_GET["ChangeAclGroup"])){ChangeAclGroup();exit;}
	if(isset($_GET["set-recursive"])){SubitemsMode();exit;}
	
	if(isset($_GET["chmod_return_only"])){chmod_return_only();exit;}
	if(isset($_GET["chmod_save"])){chmod_save();exit;}
	if(isset($_GET["config"])){dir_status();exit;}
开发者ID:rsd,项目名称:artica-1.5,代码行数:31,代码来源:samba.acls.php

示例8: isset

<?php

//List users by role
require_once '../includes/functions.inc.php';
require_once '../includes/admin.inc.php';
$rid = isset($_POST['rid']) ? $_POST['rid'] : 0;
$count = isset($_POST['count']) ? $_POST['count'] : 10;
$page = isset($_POST['page']) ? $_POST['page'] : 1;
print list_users($rid, $count, $page);
?>
<script type="text/javascript">
$("a.button.disabled").click(function(){
	openLogin();
});
$('#admin_user_section [title]').qtip({
	style: {
		padding: 7,
		background: '#404041',
		color: 'white',
		fontSize: '10px',
		textAlign: 'center',
		border: {
			width: 2,
			color: 'white'
		},
		tip: 'topLeft',
		name: 'dark' // Inherit the rest of the attributes from the preset dark style
	},
	position: {
		corner: {
		target: 'bottomMiddle',
开发者ID:khanhnnvn,项目名称:OKMS,代码行数:31,代码来源:admin_user.php

示例9: elseif

} elseif (isset($_GET['toggle_reservation_reminder'])) {
    echo toggle_reservation_reminder();
} elseif (isset($_GET['change_user_details'])) {
    $user_name = mysql_real_escape_string(trim($_POST['user_name']));
    $user_email = mysql_real_escape_string($_POST['user_email']);
    $user_password = mysql_real_escape_string($_POST['user_password']);
    echo change_user_details($user_name, $user_email, $user_password);
} else {
    echo '<div class="box_div" id="cp_div"><div class="box_top_div"><a href="#">Start</a> &gt; Control panel</div><div class="box_body_div">';
    if ($_SESSION['user_is_admin'] == '1') {
        ?>

		<h3>User administration</h3>

		<div id="users_div"><?php 
        echo list_users();
        ?>
</div>

		<p class="center_p"><input type="button" class="small_button blue_button" id="reset_user_password_button" value="Reset password"> <input type="button" class="small_button blue_button" id="change_user_permissions_button" value="Change permissions"> <input type="button" class="small_button" id="delete_user_reservations_button" value="Delete reservations"> <input type="button" class="small_button" id="delete_user_button" value="Delete user"></p>
		<p class="center_p" id="user_administration_message_p"></p>

		<hr>

		<h3>Database administration</h3>

		<p class="smalltext_p">These will require a confirmation. Your user and reservations will not be deleted unless you delete everything.</p>

		<p><input type="button" class="small_button" id="delete_all_reservations_button" value="Delete all reservations"> <input type="button" class="small_button" id="delete_all_users_button" value="Delete all users"> <input type="button" class="small_button" id="delete_everything_button" value="Delete everything"></p>

		<p id="database_administration_message_p"></p>
开发者ID:heglem,项目名称:reservasTeatro,代码行数:31,代码来源:cp.php

示例10: json_encode

                        if ($ret) {
                            echo json_encode(array("message" => "done"));
                        } else {
                            echo json_encode(array("message" => "error"));
                        }
                        return;
                    } else {
                        if ($action == "getValue") {
                            $ret = getUserVariable($user_name, $value);
                            if ($ret) {
                                echo json_encode(array("message" => "done"));
                                // value exists
                            } else {
                                echo json_encode(array("message" => "error"));
                            }
                            return;
                        } else {
                            if (!check_role("admin")) {
                                return;
                            }
                            echo json_encode(list_users());
                            return;
                        }
                    }
                }
            }
        }
    }
}
?>
 
开发者ID:ABCD-STUDY,项目名称:ABCDreport,代码行数:30,代码来源:getUser.php

示例11: list_of_categ

     $_SESSION["list"] = $tmpl['mainAdmin'];
 } else {
     if ($_POST["selectoption"] == "Категории") {
         //
         list_of_categ($mysqli, $tmpl['list_categ_admin'], $tmpl['search']);
     } else {
         if ($_POST['DeleteCategory']) {
             DeleteCategory($mysqli, $_POST['select_name_category2']);
             $_SESSION["list"] = $tmpl['mainAdmin'];
         } else {
             if ($_POST['AddCategory']) {
                 AddCategory($mysqli, $_POST['new_categ'], $_POST['select_name_category1']);
                 $_SESSION["list"] = $tmpl['mainAdmin'];
             } else {
                 if ($_POST["selectoption"] == "Пользователи") {
                     list_users($mysqli, $tmpl['usersAdmin']);
                 } else {
                     if ($_POST['selectedUser']) {
                         SelectUser($mysqli, $_POST['selectuser'], $tmpl['user_admin']);
                     } else {
                         if ($_POST['DeleteUser']) {
                             DeleteUser($mysqli);
                             $_SESSION["list"] = $tmpl['mainAdmin'];
                         } else {
                             if ($_POST['ChangeUser']) {
                                 ChangeUser($mysqli, $_POST['group_user'], $_POST['block']);
                                 $_SESSION["list"] = $tmpl['mainAdmin'];
                             } else {
                                 if ($_POST["selectoption"] == "Отчеты") {
                                     //
                                     //CreatePDF($mysqli);
开发者ID:Maksumys,项目名称:lab8,代码行数:31,代码来源:event.php

示例12: list_users

                list_users("users.xml", $form_attrs);
            }
        }
    } elseif ($form_attrs['action'] == "new") {
        /* Display new user form */
        $forms = make_form("newuser.xml", $form_attrs, "");
        /*
         * Make sure that the action value that led to this form being displayed
         * (action=new) is not retained
         */
        $forms[user]->setElementAttrById("action", "elemValue", "add");
        include "templates/user_table.php";
    } elseif ($forms[user]) {
        /* There was not an error with user detail form */
        include "templates/user_table.php";
    } elseif (!$form_attrs['userid'] && !$form_attrs['action']) {
        list_users("users.xml", $form_attrs);
    } elseif ($form_attrs['action'] != "modify") {
        /* && $form_attrs[action] */
        echo "Invalid action requested.<br>\n";
        list_users("users.xml", $form_attrs);
    } else {
        /* elseif( $userid ) */
        echo "Cannot find user record matching the request.<br>\n";
        list_users("users.xml", $form_attrs);
    }
    /* Else list_users() */
} else {
    /* No form type specified - just list all the users */
    list_users("users.xml", $form_attrs);
}
开发者ID:slugbucket,项目名称:jrform,代码行数:31,代码来源:driver.php

示例13: elseif

} elseif (isset($_GET['toggle_reservation_reminder'])) {
    echo toggle_reservation_reminder($conn);
} elseif (isset($_GET['change_user_details'])) {
    $user_name = mysqli_real_escape_string($conn, trim($_POST['user_name']));
    $user_email = mysqli_real_escape_string($conn, $_POST['user_email']);
    $user_password = mysqli_real_escape_string($conn, $_POST['user_password']);
    echo change_user_details($user_name, $user_email, $user_password, $conn);
} else {
    echo '<div class="box_div" id="cp_div"><div class="box_top_div"><a href="#">Start</a> &gt; Control panel</div><div class="box_body_div">';
    if ($_SESSION['user_is_admin'] == '1') {
        ?>

		<h3>User administration</h3>

		<div id="users_div"><?php 
        echo list_users($conn);
        ?>
</div>

		<p class="center_p"><input type="button" class="small_button blue_button" id="reset_user_password_button" value="Reset password"> <input type="button" class="small_button blue_button" id="change_user_permissions_button" value="Change permissions"> <input type="button" class="small_button" id="delete_user_reservations_button" value="Delete reservations"> <input type="button" class="small_button" id="delete_user_button" value="Delete user"></p>
		<p class="center_p" id="user_administration_message_p"></p>

		<hr>

		<h3>Database administration</h3>

		<p class="smalltext_p">These will require a confirmation. Your user and reservations will not be deleted unless you delete everything.</p>

		<p><input type="button" class="small_button" id="delete_all_reservations_button" value="Delete all reservations"> <input type="button" class="small_button" id="delete_all_users_button" value="Delete all users"> <input type="button" class="small_button" id="delete_everything_button" value="Delete everything"></p>

		<p id="database_administration_message_p"></p>
开发者ID:kristijana,项目名称:Administriranje,代码行数:31,代码来源:cp.php

示例14: searchUserSuggestion

<div style="float: right" id="search_bar">
	<form action="" method="POST">
		<input id="search_user_box" type="text" name="keyword" title="Fill in your search query" size="20" placeholder="Search user.." />
	</form>
	<div style="display: none;" id="search_user_suggestion"></div>
</div>
<script type="text/javascript">
function searchUserSuggestion() {
	if ($("input#search_user_box").val() != '') {
		$("#search_user_suggestion").delay(200).load("triggers/search_user.php",{keyword:$("input#search_user_box").val()}).slideDown();
	} else {
		$("#search_user_suggestion").css("display","none");
	}
}
$("input#search_user_box").keyup(searchUserSuggestion).change(searchUserSuggestion);
if ($("input#search_user_box").val() == '') {
	$("#search_user_suggestion").css("display","none");
}
</script>
<?php 
$rid = isset($_POST['rid']) ? $_POST['rid'] : 0;
print select_role('rid', $rid);
print '<div id="admin_user_section">';
print list_users($rid, 10, 1);
print '</div>';
?>
<script type="text/javascript">
$("select#rid").change(function(){
	$("#admin_user_section").load("triggers/admin_user.php",{rid:$(this).val(),count:10,page:1});
});
</script>
开发者ID:khanhnnvn,项目名称:OKMS,代码行数:31,代码来源:index.php

示例15: session_start

<?php

session_start();
require_once '../config.php';
require_once '../database.php';
require_once '../ui.php';
show_header('../');
show_menu('../');
#Authentication:
if (!isset($_SESSION['admin'])) {
    if (!isset($_POST['pwd'])) {
        include 'login.php';
    } else {
        $user = list_users('admin');
        print_r($user);
        print_r($_POST);
        if ($user['upassword'] == $_POST['pwd']) {
            $_SESSION['admin'] = 'yes';
            print 'Access granted.';
        } else {
            print 'Wrong password!';
        }
    }
}
if (isset($_SESSION['admin'])) {
    $devices = list_secrets();
    $settings = list_settings();
    show_settings($settings);
    show_devices($devices);
}
include '../html_footer.html';
开发者ID:ways,项目名称:BigBrotherGPSweb,代码行数:31,代码来源:index.php


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