本文整理汇总了PHP中getAllUsers函数的典型用法代码示例。如果您正苦于以下问题:PHP getAllUsers函数的具体用法?PHP getAllUsers怎么用?PHP getAllUsers使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getAllUsers函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getSearchedUsers
function getSearchedUsers($search)
{
$found = false;
$allusers = getAllUsers();
if (!empty($allusers)) {
foreach ($allusers as $row) {
if (strpos(strtolower($row['user_name']), strtolower($search)) !== false) {
$found = true;
$link = '"profile.php?id=' . $row['id'] . '"';
?>
<a class="user-link" href=<?php
echo $link;
?>
><?php
echo $row['user_name'];
?>
</a> <?php
}
}
}
if ($found == false) {
?>
<span class="no-results">There were no users found with the word "<?php
echo $search;
?>
".</span> <?php
}
}
开发者ID:up201306506,项目名称:LTW20152016,代码行数:28,代码来源:search.php
示例2: showHtml
function showHtml()
{
$errMsgs = [];
$html = "\n <head><title>Big Yaad Tree</title><meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'><script src=\"../../js/go.js\"></script><script id='code' src='../../js/tree.js'></script>" . "<link rel=\"stylesheet\" href=\"../../css/reset.css\"><link rel=\"shortcut icon\" href=\"../../img/favicon.ico\" type=\"image/x-icon\">" . "<link rel=\"icon\" href=\"../../img/favicon.ico\" type=\"image/x-icon\"><script src='../../js/sweetalert.min.js'></script><script src='../../js/jquery-2.1.4.min.js'></script><script src='../../js/index.js'></script>" . "<link rel='stylesheet prefetch' href='../../css/font-awesome.min.css'><link rel='stylesheet' href='../../css/sweetalert.css'><link rel=\"stylesheet\" href=\"../../css/style.css\"><link rel=\"stylesheet\" href=\"../../css/animate.css\"></head>\n <div class=\"animated slideInDown\">\n <div class=\"nav\">\n <ul>\n <li class=\"logo\"><img class='animated infinite pulse' src=\"../../img/logo.png\"></li>\n <li class=\"home\"><a href=\"super.php\">REMOVE USER</a></li>\n <li class=\"searchMenu\"><a href=\"removeRelation.php\">REMOVE RELATIONSHIP</a></li>\n <li class=\"childMenu\"><a class=\"active\" href=\"changePassword.php\">CHANGE PASSWORD</a></li>\n <li class=\"logout\"><a href=\"../../index.php\">LOGOUT</a></li>\n </ul>\n </div></div>" . "<body><div class=\"panel\" style='max-width: 580px;'>";
if (!isset($_GET) || strtoupper($_GET['by']) !== "FNAME" && strtoupper($_GET['by']) !== 'LNAME') {
$_GET['by'] = 'FNAME';
$nextSortBy = 'FNAME';
} else {
if (strtoupper($_GET['by']) === "LNAME") {
$nextSortBy = "LNAME";
} else {
$nextSortBy = "FNAME";
}
}
if (!isset($_GET) || strtoupper($_GET['sort']) !== "ASC" && strtoupper($_GET['sort']) !== 'DESC') {
$_GET['sort'] = 'DESC';
$nextSort = "ASC";
} else {
if (strtoupper($_GET['sort']) === "ASC") {
$nextSort = "DESC";
} else {
$nextSort = "ASC";
}
}
$html .= createUserTable(getAllUsers($_GET['sort'], $_GET['by']), $errMsgs, $nextSort, $nextSortBy) . "</div></body>";
echo $html;
}
开发者ID:tipsycoder,项目名称:familytree_php,代码行数:27,代码来源:changePassword.php
示例3: doallwork
function doallwork($data, $user)
{
$pg = '<h1>All Workers</h1>';
$pg .= worktable();
$totshare = 0;
$totdiff = 0;
$totshrate = 0;
$totinvalid = 0;
$totrate = 0;
$offset = 0;
$blockacc = 0;
$blockreward = 0;
$instances = 0;
$pg .= worktitle($data, $user);
$pg .= '<tbody>';
$ans = getAllUsers($user);
if ($ans['STATUS'] == 'ok') {
$count = $ans['rows'];
$title = NULL;
for ($i = 0; $i < $count; $i++) {
$pg .= workuser($data, $ans['username:' . $i], $offset, $totshare, $totdiff, $totshrate, $totinvalid, $totrate, $blockacc, $blockreward, 3600, false, false, $title, $instances);
}
}
$pg .= '</tbody>';
$pg .= worktotal($offset, $totshare, $totdiff, $totshrate, $totinvalid, $totrate, $blockacc, $blockreward, $instances);
$pg .= "</table>\n";
return $pg;
}
开发者ID:ctubio,项目名称:ckpool,代码行数:28,代码来源:page_allwork.php
示例4: getUserData
function getUserData($userId)
{
$users = getAllUsers();
if (isset($users[$userId])) {
$userData = $users[$userId];
return [$userId => $userData];
} else {
throw new Exception('Unable to fetch user');
}
}
开发者ID:omoloro,项目名称:falcor-demo,代码行数:10,代码来源:index.php
示例5: getUsers
function getUsers()
{
$array_users = getAllUsers();
foreach ($array_users as $user) {
$username = $user["username"];
$email = $user["email"];
$join = $user["join_date"];
echo "<tr><td>{$username}</td><td>{$email}</td><td>{$join}</td><td><a href='App_Code/cmsView.php?type=user&delete={$username}'>DELETE</a></td></tr>";
}
}
开发者ID:KonstantinKirchev,项目名称:PHP,代码行数:10,代码来源:cmsView.php
示例6: getUsers
/**
* \brief Obtener usuarios
* \details Devuelve todos los usuarios de la base de datos.
* \return JSON
*/
function getUsers()
{
header('HTTP/1.1 200 OK');
header('Content-type: application/json');
$users = array();
foreach (getAllUsers() as $user) {
$addedUser['username'] = $user['USERNAME'];
$addedUser['password'] = $user['PASSWORD'];
$addedUser['email'] = $user['EMAIL'];
$addedUser['genre'] = $user['GENRE'];
$addedUser['autonomous_community'] = $user['AUTONOMOUS_COMMUNITY'];
$addedUser['age'] = $user['AGE'];
$users[] = $addedUser;
}
echo json_encode($users);
}
开发者ID:AgoraUS1516,项目名称:G03,代码行数:21,代码来源:index.php
示例7: addUser
/**
* 添加新用户,并更新到缓存
*/
function addUser()
{
global $memcache, $actcls;
$u_data = array();
//用户信息
$u_data = array('aid' => AID, 'username' => $_POST['openid'], 'name' => $_POST['realname'], 'mobile' => $_POST['mobile'], 'email' => $_POST['email'], 'company' => $_POST['company'], 'zhiwu' => $_POST['zhiwu'], 'guanzhu_txt' => $_POST['guanzhu_txt'], 'datetime' => time(), 'ip' => $_SERVER["REMOTE_ADDR"]);
$insert_id = $actcls->addUsers($u_data, AID);
if ($insert_id) {
//将新用户更新到缓存
$user_list = getAllUsers();
if (is_array($user_list)) {
$u_data['id'] = $insert_id;
$user_list[$_POST['openid']] = $u_data;
$memcache->set(MEM_USER_KEY, $user_list);
}
}
return $insert_id;
}
开发者ID:breezelife0,项目名称:mycode,代码行数:21,代码来源:index.php
示例8: array
<?php
require_once '../phpInclude/dbconn.php';
require_once '../phpInclude/AdminClass.php';
$token = $_REQUEST['token'];
$searchkey = $_REQUEST['searchkey'];
$data = array();
if (!empty($token) && !empty($searchkey)) {
$users_id1 = getUsersId($token);
if (!empty($users_id1)) {
$result = getAllUsers($searchkey, $users_id1);
if (!empty($result)) {
$success = "1";
$msg = "users exist!";
$data = $result;
} else {
$success = "0";
$msg = "No user exist with this name!";
}
} else {
$success = "0";
$msg = "No such user exist!";
}
} else {
$success = "0";
$msg = "Incomplete Parameters!";
}
echo json_encode(array("success" => $success, "msg" => $msg, "data" => $data));
开发者ID:Gameonn,项目名称:curler-class,代码行数:28,代码来源:search_user.php
示例9: and
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bigou - Usuarios Registrados</title>
<link href="style/bigou_style.css" rel="stylesheet" type="text/css" />
<!--<link rel='stylesheet' type='text/css' media='only screen and (max-width: 480px)' href='estilos/smartphone.css'/>-->
</head>
<body>
<body>
<div class="Canvas">
<?php
echo menuHeader(isset($_SESSION['nick']), $_SESSION['nick'], $_SESSION['role']);
?>
<div class="GeneralDisplay">
<?php
echo "<table align=center>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td><p>Usuario<p></td>\n\t\t\t\t\t\t\t\t<td><p>Avatar<p></td>\n\t\t\t\t\t\t\t\t<td><p>Perfil<p></td>\n\t\t\t\t\t\t\t</tr>";
$usersList = getAllUsers();
foreach ($usersList as $user) {
$nick = $user['nick'];
$avatar = $user['avatar'];
echo "<tr>\n\t\t\t\t\t\t\t\t<td>{$nick}</td>\n\t\t\t\t\t\t\t\t<td><img src='{$avatar}' width=40px/></td>\n\t\t\t\t\t\t\t\t<td><a href='profile.php?nick={$nick}'>Ver Perfil</a></td>\n\t\t\t\t\t\t\t </tr>";
}
echo "</table>";
?>
</div>
<br/><br/>
</div>
</body>
</html>
开发者ID:jagumiel,项目名称:bigou-Album,代码行数:31,代码来源:users.php
示例10: getUserCount
<strong>Users: </strong>' . getUserCount() . '<br />
<strong>Paid: </strong>' . getPaidCount() . '<br />
<strong>Teams: </strong>' . getTotalTeamCount() . '<br />' . '</div>';
?>
<div class="col-md-10" style=""> <strong>Philip better get a free t-shirt</strong>
<table class="table table-hover table-condensed">
<tr>
<th>Name</th>
<th>Phone</th>
<th>Email</th>
<th>Team</th>
<th>Size</th>
<th>Paid?</th>
</tr>
<?php
$result = getAllUsers();
while ($row = mysql_fetch_array($result)) {
echo '<tr><td>' . $row['userName'] . '</td>';
echo '<td>' . $row['email'] . '</td>';
echo '<td>' . $row['phone'] . '</td>';
echo '<td>' . $row['name'] . '</td>';
echo '<td>' . $row['shirt'] . '</td>';
echo '<td>' . ($row['paid'] ? "Yes" : "No") . '</td></tr>';
}
?>
</table>
<br />
<br />
<table class="table table-hover table-condensed">
<tr>
<th>Id</th>
开发者ID:GTKappaSig,项目名称:Kappa-sigma-games,代码行数:31,代码来源:index.php
示例11: getUserInfoByUserID
$navbar_signup_login = "";
$header_tag_extras = "";
$header_section_styles = "";
$header_section_metas = "";
$header_section_scripts = "";
$header_section_extras = "";
$body_tag_extras = "";
$body_section_styles = "";
$body_section_scripts = "";
//require('../database/selectQuires.php');
require '../database/models.php';
$loggedin_user_info = getUserInfoByUserID($_SESSION['user_id']);
$logged_in_name = "Welcome " . $loggedin_user_info['name'];
$result_pending = getAllPendingUsers();
$body_section_content = '<h1>List of pending users</h1>';
$body_section_content .= '<ol>';
foreach ($result_pending as $val) {
$body_section_content .= '<li><a href="user.php?page_user_id=' . $val['ID'] . '">' . $val['name'] . "</a></li>";
}
$body_section_content .= '</ol>';
// Selected value in pending drop down
$result_allusers = getAllUsers();
$body_section_content .= '<h1>List of all users</h1>';
$body_section_content .= '<ol>';
foreach ($result_allusers as $val) {
$body_section_content .= '<li><a href="user.php?page_user_id=' . $val['ID'] . '">' . $val['name'] . "</a></li>";
}
$body_section_content .= '</ol>';
$navbar_signup_login = false;
$navbar_content = array(array("../index.php", "Home"), array("index.php", "DashBoard"), array("../about.php", "About"), array("../contact.php", "Contact"));
include "../templates/base.php";
开发者ID:mohamed-moanis,项目名称:qa,代码行数:31,代码来源:index.php
示例12: dostats
function dostats($data, $user)
{
$pg = '<h1>Pool Stats</h1>';
if (isset($data['info']) && $data['info'] !== false) {
$info = $data['info'];
$pe = false;
if (isset($info['p_elapsed'])) {
$dspel = howlongago($info['p_elapsed']);
$pg .= "Pool Uptime: {$dspel}";
$pe = true;
}
if (isset($info['ckdb_elapsed'])) {
if ($pe) {
$pg .= ' ';
}
$dspel = howlongago($info['ckdb_elapsed']);
$pg .= "CKDB Uptime: {$dspel}";
}
$dsp = '?THs';
$dsp5m = '?THs';
$dsp1hr = '?THs';
$dsp24hr = '?THs';
if (isset($info['p_hashrate'])) {
$hr = $info['p_hashrate'];
if ($hr != '?') {
$dsp = dsprate($hr);
}
}
if (isset($info['p_hashrate5m'])) {
$hr = $info['p_hashrate5m'];
if ($hr != '?') {
$dsp5m = dsprate($hr);
}
}
if (isset($info['p_hashrate1hr'])) {
$hr = $info['p_hashrate1hr'];
if ($hr != '?') {
$dsp1hr = dsprate($hr);
}
}
if (isset($info['p_hashrate24hr'])) {
$hr = $info['p_hashrate24hr'];
if ($hr != '?') {
$dsp24hr = dsprate($hr);
}
}
$pg .= '<table cellpadding=8 cellspacing=0 border=0><tr>';
$pg .= "<td>Pool Hashrate: {$dsp}</td>";
$pg .= "<td>5m: {$dsp5m}</td>";
$pg .= "<td>1hr: {$dsp1hr}</td>";
$pg .= "<td>24hr: {$dsp24hr}</td>";
$pg .= '</tr></table><br>';
}
$ans = getAllUsers($user);
$pg .= "<table cellpadding=0 cellspacing=0 border=0>\n";
$pg .= '<thead><tr class=title>';
$pg .= '<td class=dl>Username</td>';
$pg .= '<td class=dr>Hash Rate 5m</td>';
$pg .= "</tr></thead>\n";
if ($ans['STATUS'] == 'ok') {
$pg .= '<tbody>';
$all = array();
$count = $ans['rows'];
for ($i = 0; $i < $count; $i++) {
$all[] = array('username' => $ans['username:' . $i], 'userid' => $ans['userid:' . $i], 'u_hashrate5m' => $ans['u_hashrate5m:' . $i]);
}
usort($all, 'allusersort');
for ($i = 0; $i < $count; $i++) {
if ($i % 2 == 0) {
$row = 'even';
} else {
$row = 'odd';
}
$pg .= "<tr class={$row}>";
$pg .= '<td class=dl>' . htmlspecialchars($all[$i]['username']) . '</td>';
$uhr = $all[$i]['u_hashrate5m'];
if ($uhr == '?') {
$dsp = '?GHs';
} else {
$dsp = dsprate($uhr);
}
$pg .= "<td class=dr>{$dsp}</td>";
$pg .= "</tr>\n";
}
$pg .= '</tbody>';
}
$pg .= "</table>\n";
return $pg;
}
开发者ID:ctubio,项目名称:ckpool,代码行数:89,代码来源:page_stats.php
示例13: stdClass
$msg .= '<tr><td style="width:180px; background-color: gray; color: white; padding: 10px;">Question/Comment</td><td style="width: 600px; padding: 10px;">' . $comment . '</td></tr>';
$msg .= "</table></body></html>";
$ret = new stdClass();
$ret->response = true;
$ret->mail = false;
if ($ret->response) {
$ret->mail = Util::send_mail("[email protected]", "New question/comment from: " . $name, $msg);
}
print json_encode($ret);
}
} else {
if (isset($_POST['query'])) {
$query = $_POST['query'];
if ($query === "sr_version") {
$ret = new stdClass();
$ret->response = $_SESSION["user"]->uses_sr === 1;
print json_encode($ret);
}
} else {
if (isset($_POST['survey_complete'])) {
updateSurveyStatus($_POST['survey_complete']);
} else {
if (isset($_POST['all_users'])) {
print getAllUsers($_POST['all_users']);
}
}
}
}
}
}
}
开发者ID:anudeep3998,项目名称:uds,代码行数:31,代码来源:getStandards.php
示例14: getUserFromCache
function getUserFromCache($user_id)
{
global $config;
$basedir = $config['basedir'];
$file = $basedir . '/temp/all_users.txt';
if (file_exists($file)) {
$data = json_decode(file_get_contents($file), true);
return $data[$user_id];
} else {
// write to cache
$users = array();
$users = getAllUsers();
file_put_contents($file, json_encode($users));
return $users[$user_id];
}
return array();
}
开发者ID:msports,项目名称:online-sports-betting,代码行数:17,代码来源:functions.php
示例15: updateUser
updateUser($_GET['id'], $_POST['email'], $_POST['username'], $_POST['password'], $_POST['role']);
// variables set for updateUser function to update values on db
header('Location: ?page=cmsUpdated&goto=cmsUsersTable');
} else {
// if empty string in the password field then update function without password change called....
updateUserNoPassword($_GET['id'], $_POST['email'], $_POST['username'], $_POST['role']);
header('Location: ?page=cmsUpdated&goto=cmsUsersTable');
}
}
$id = $_GET['id'];
$user = getUserById($id);
include VIEWS . 'contentCMSUpdate.php';
break;
case 'delete':
$id = $_GET['id'];
if (!empty($_POST)) {
if ($_POST['deleteConf'] == 'Yes') {
deleteUser($id);
header('Location: ?page=cmsUpdated&goto=cmsUsersTable');
} elseif ($_POST['deleteConf'] == 'No') {
header('Location: ?page=cmsUsersTable');
}
}
$user = getUserById($id);
include VIEWS . 'contentCMSDelete.php';
break;
}
} else {
$users = getAllUsers();
include VIEWS . 'contentCMSUsersTable.php';
}
开发者ID:jagfiend,项目名称:college_php_portfolio,代码行数:31,代码来源:cmsUsersTable.php
示例16: dirname
<?php
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '../template/header.php';
showHeader();
require_once BASE_PATH . 'public/usuarios/queries.php';
require_once BASE_PATH . 'src/pagination.php';
//configurções para montar a paginação
$recordsPerPage = 10;
$totalRows = countRowsUsers();
$limit = returnLimitToQuery(['recordsPerPage' => $recordsPerPage]);
$users = getAllUsers(['limit' => $limit, 'offset' => $recordsPerPage]);
$params = ['recordsPerPage' => $recordsPerPage, 'totalRows' => $totalRows, 'url' => SITE_URL . 'usuarios/index.php'];
showMessage();
?>
<div class="container">
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading"><h2>Listagem de usuários</h2></div>
<div class="panel-body text-right">
<a href="<?php
echo SITE_URL;
?>
usuarios/form.php"
class="btn btn-primary" title="Novo registro">
<span class="glyphicon glyphicon-plus"></span> Novo
</a>
<?php
showTotalRegisters($totalRows);
?>
</div>
开发者ID:Calcio,项目名称:CursoPHPBasico,代码行数:30,代码来源:index.php
示例17: getAllUsers
<?php
require_once 'loader.php';
$resultUsers = getAllUsers();
if ($resultUsers != false) {
$NumOfUsers = mysql_num_rows($resultUsers);
} else {
$NumOfUsers = 0;
}
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
});
function sendPushNotification(id){
var data = $('form#'+id).serialize();
$('form#'+id).unbind('submit');
$.ajax({
url: "send_push_notification_message.php",
type: 'GET',
data: data,
beforeSend: function() {
},
success: function(data, textStatus, xhr) {
开发者ID:keyhook,项目名称:Android-Push-Notification,代码行数:31,代码来源:index.php
示例18: getAllTransactions
<?php
require_once "../../include/config.php";
require_once $basedir . "/admin/include/functions.php";
include $basedir . '/admin/include/isadmin.php';
$walletmenu = 'active';
$datatables = 'active';
$transactions = getAllTransactions();
$file = $basedir . '/temp/all_users.txt';
if (file_exists($file)) {
$all_users = json_decode(file_get_contents($file), true);
} else {
$temp = getAllUsers();
foreach ($temp as $t) {
$all_users[$t['user_id']] = $t;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<?php
include $basedir . '/admin/include/header.php';
?>
</head>
<body class="skin-blue">
<!-- header logo: style can be found in header.less -->
<header class="header">
<?php
include $basedir . '/admin/include/header_menu.php';
开发者ID:msports,项目名称:online-sports-betting,代码行数:31,代码来源:index.php
示例19: getAllUsers
<?php
require_once './jsonwrapper/jsonwrapper.php';
$mailTemplatePath = 'mailTemplate.html';
$fileUsersPath = "users.json";
$users = getAllUsers($fileUsersPath);
$now = time();
$oneMoreDay = 24 * 60 * 60;
//(h x min x seg)
$tomorrow = $now + $oneMoreDay;
$myOwnDailyTipsMail = "[email protected]";
$template = file_get_contents($mailTemplatePath);
for ($i = 0; $i < count($users); $i++) {
if (isset($users[$i]->nextSendingTime)) {
if ($users[$i]->nextSendingTime < $now) {
$tip = getTipToSend($users[$i]);
if (isset($tip)) {
send($users[$i], $tip, $myOwnDailyTipsMail, $template);
}
$users[$i]->nextSendingTime = getRandomDateBetweenHours($tomorrow, 8, 23);
}
} else {
$users[$i]->nextSendingTime = $tomorrow;
}
}
saveAllUsers($users, $fileUsersPath);
// FUNCIONES
function getAllUsers($fileUsersPath)
{
if (file_exists($fileUsersPath) or die("Error: Users data is not available!\n")) {
return json_decode(file_get_contents($fileUsersPath));
开发者ID:juanmadlg,项目名称:coopTip,代码行数:31,代码来源:emailSender.php
示例20: getUsers
function getUsers()
{
header('HTTP/1.1 200 OK');
$users = json_encode(getAllUsers());
echo $users;
}
开发者ID:Joseperez94M,项目名称:EGC-Autenticacion-14-15,代码行数:6,代码来源:index.php
注:本文中的getAllUsers函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论