本文整理汇总了PHP中getUserList函数的典型用法代码示例。如果您正苦于以下问题:PHP getUserList函数的具体用法?PHP getUserList怎么用?PHP getUserList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getUserList函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetUserList
public function testGetUserList()
{
// count there is 7 users
$this->assertEquals(count(getUserList()), 7);
// test some username
$this->assertEquals(getUserList()[0], "user_with_allPermissions");
$this->assertEquals(getUserList()[1], "user_with_listtaskpermission");
// test the last username
$this->assertEquals(getUserList()[6], "user_with_nonepermissions");
}
示例2: knockKnock
function knockKnock($userName, $callerID)
{
$user_list = getUserList();
$users = json_decode($user_list);
if (count($users->rows) == 0) {
return false;
} else {
foreach ($users->rows as $user) {
$channel = $user->value->channel;
$network = $user->value->network;
$name = $user->value->name;
$address = $user->key;
$msg = "{$userName} is outside knocking, please let them in.";
if ($channel == 'VOICE') {
$address = 'tel:+1' . $address;
}
message($msg, array("to" => $address, "network" => $network));
}
return true;
}
}
示例3: get_view
public function get_view()
{
ob_start();
?>
<form method="post" action="<?php
echo $_SERVER['PHP_SELF'];
?>
">
<label>Username</label>
<select name="id" class="form-control">
<?php
foreach (getUserList() as $uid => $name) {
echo "<option>" . $name . "</option>";
}
?>
</select>
<p>
<button class="btn btn-defaut" type="submit">Pose as User</button>
</p>
</form>
<?php
$this->add_onload_command("\$('select.form-control').focus();\n");
return ob_get_clean();
}
示例4: updateUser
/**
* 设置人员属性
*/
function updateUser($userId, $matchId, $groupId = -1, $apply_follow = -1, $apply_match = -1, $apply_group = -1, $pass_apply_match = -1, $pass_apply_group = -1)
{
global $wpdb;
$_userId = intval($userId);
$_matchId = intval($matchId);
$_groupId = intval($groupId);
$_apply_follow = intval($apply_follow);
$_apply_match = intval($apply_match);
$_apply_group = intval($apply_group);
$_pass_apply_match = intval($pass_apply_match);
$_pass_apply_group = intval($pass_apply_group);
$columns = array();
if ($_groupId > -1) {
$columns['group_id'] = intval($_groupId);
}
if ($_apply_follow > -1) {
$columns['apply_follow'] = intval($_apply_follow);
}
if ($_apply_match > -1) {
$columns['apply_match'] = intval($_apply_match);
}
if ($_apply_group > -1) {
$columns['apply_group'] = intval($_apply_group);
}
if ($_pass_apply_match > -1) {
$columns['pass_apply_match'] = intval($_pass_apply_match);
}
if ($_pass_apply_group > -1) {
$columns['pass_apply_group'] = intval($_pass_apply_group);
}
if ($_userId > 0 && $_matchId > 0) {
$users = getUserList($userId, $matchId);
if (empty($users)) {
return $wpdb->insert('wp_likedome_match_user', array('uid' => $_userId, 'match_id' => $_matchId) + $columns);
}
$result = $wpdb->update('wp_likedome_match_user', $columns, array('uid' => $_userId, 'match_id' => $_matchId));
}
return $result;
}
示例5: wp_reset_postdata
}
wp_reset_postdata();
} else {
?>
<li style="width: 100%; float: left;">
* 目前你还没有参加过任何比赛
</li>
<?php
}
?>
</ul>
</div>
<div class="tab_main">
<ul class="joinList margin-t13" style="width: 100%; float: left;">
<?php
$users = getUserList($current_user->ID, -1, -1, 1);
if (count($users)) {
foreach ($users as $user) {
$args = get_match_post($user->match_id);
query_posts($args);
if (have_posts()) {
while (have_posts()) {
the_post();
?>
<li style="width: 100%; float: left;">
<a href="?p=77&matchid=<?php
echo $user->match_id;
?>
"><?php
the_post_thumbnail();
?>
示例6: getSurveyUserList
/**
* Retrieve a HTML <OPTION> list of survey admin users
*
* @param mixed $bIncludeOwner If the survey owner should be included
* @param mixed $bIncludeSuperAdmins If Super admins should be included
* @param int surveyid
* @return string
*/
function getSurveyUserList($bIncludeOwner = true, $bIncludeSuperAdmins = true, $surveyid)
{
$surveyid = sanitize_int($surveyid);
$sSurveyIDQuery = "SELECT a.uid, a.users_name, a.full_name FROM {{users}} AS a\n LEFT OUTER JOIN (SELECT uid AS id FROM {{permissions}} WHERE entity_id = {$surveyid} and entity='survey') AS b ON a.uid = b.id\n WHERE id IS NULL ";
if (!$bIncludeSuperAdmins) {
// @todo: Adjust for new permission system - not urgent since it it just display
// $sSurveyIDQuery.='and superadmin=0 ';
}
$sSurveyIDQuery .= 'ORDER BY a.users_name';
$oSurveyIDResult = Yii::app()->db->createCommand($sSurveyIDQuery)->query();
//Checked
$aSurveyIDResult = $oSurveyIDResult->readAll();
$surveyselecter = "";
if (Yii::app()->getConfig('usercontrolSameGroupPolicy') == true) {
$authorizedUsersList = getUserList('onlyuidarray');
}
foreach ($aSurveyIDResult as $sv) {
if (Yii::app()->getConfig('usercontrolSameGroupPolicy') == false || in_array($sv['uid'], $authorizedUsersList)) {
$surveyselecter .= "<option";
$surveyselecter .= " value='{$sv['uid']}'>{$sv['users_name']} {$sv['full_name']}</option>\n";
}
}
if (!isset($svexist)) {
$surveyselecter = "<option value='-1' selected='selected'>" . gT("Please choose...") . "</option>\n" . $surveyselecter;
} else {
$surveyselecter = "<option value='-1'>" . gT("None") . "</option>\n" . $surveyselecter;
}
return $surveyselecter;
}
示例7: getUserList
<?php
include 'functions.php';
include 'header.php';
$get = getUserList();
setlocale(LC_TIME, 'Estonia');
date_default_timezone_set('Europe/Tallinn');
$praegu = time();
$algus = strtotime("01-03-2016 10:00:00");
$kulunud = $praegu - $algus;
echo "Kursuse algusest on möödunud " . $kulunud . " sekundit<br>";
echo "Tänane kuupäev: " . strftime("%Y. %B %d.");
?>
<div class="page-header pool">
<h1>Tabel</h1>
</div>
<form action="new.php" method="post">
<button type="submit" class="btn btn-default">Lisa</button>
</form>
<div class="row">
<div class="col-md-6">
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>Nimi</th>
<th>Kasutaja</th>
<th>E-mail</th>
<th>Tel</th>
<th>Sugu</th>
<th>Muudetud</th>
示例8: array
} else {
$userInfo = array('ip' => $ip, 'addtime' => microtime());
$redis->rPush('userlist', json_encode($userInfo));
$redis->decr('goods_count');
$arr['succ'] = 'T';
$arr['msg'] = $userInfo['ip'] . '恭喜您,抢到了商品!';
}
} else {
// 不存在商品了,直接返回数据
$arr['msg'] = '商品已经抢光了,谢谢您的参与,下次再来吧';
}
backjson($arr);
} elseif ($act == 'user') {
//获取中奖用户
$msg = "";
$userArr = getUserList();
if (!empty($userArr)) {
foreach ($userArr as $user) {
$msg .= "<tr>\r\n <td>" . $user['ip'] . "</td>\r\n <td>" . $user['addtime'] . "</td>\r\n </tr>";
}
} else {
$msg .= "<tr colspan='2'>没有查询到用户</tr>";
}
$arr['succ'] = 'T';
$arr['msg'] = $msg;
backjson($arr);
} elseif ($act == 'gettime') {
$time = date("Y-m-d H:i:s");
}
function backjson($data)
{
示例9: switch
echo "\n</form>";
} else {
switch (getVAR("action")) {
case "create_notice":
if (strtolower($username) == "student") {
echo send_notice("ERROR", "Students may not create notices.");
} else {
echo "\n<form method=\"POST\" action=\"{$PHP_SELF}?action=create_notice_add&display_date={$display_date}&username={$username}&password={$password}\">";
echo "\n<table bgcolor={$table_heading_bgcolour} width=100%>";
echo "\n<tr><td colspan=2><h2>Create New Notice</h2></td></tr>";
echo "\n<tr><td>Date(s):</td><td><table><tr><td>" . getDateList(true, "") . "</td><td>Note: CTRL + click to select multiple days.</td></tr></table></td></tr>";
echo "\n<tr><td>Title:</td><td><input type=\"text\" size=40 name=\"txttitle\"></td></tr>";
echo "\n<tr><td>Notice:</td><td><textarea rows=5 cols=40 name=\"txtnotice\"></textarea></td></tr>";
echo "\n<tr><td>Author:</td><td><input type=\"text\" size=40 name=\"txtauthor\"></td></tr>";
echo "\n<tr><td>Importance:</td><td>" . getImportanceList() . "</td></tr>";
echo "\n<tr><td>Who should see this notice?:</td><td>" . getUserList() . "</td></tr>";
echo "\n<tr><td>Typeface:</td><td>" . getTypeFaceList() . "</td></tr>";
echo "\n<tr><td>Size:</td><td>" . getFontSizeList() . "<p>";
echo "\n<input type=\"submit\" value=\"Create\" name=\"B1\"></td></tr>";
echo "\n</table>";
echo "\n</form>";
}
break;
case "create_notice_add":
if (!getVAR("lstdate")) {
echo send_notice("ERROR", "No date was specified.");
continue;
}
$tempDate = getVAR("lstdate");
$tempTitle = mysql_real_escape_string(getVAR("txttitle"));
$tempNotice = mysql_real_escape_string(getVAR("txtnotice"));
示例10: setusertemplates
function setusertemplates()
{
App()->getClientScript()->registerPackage('jquery-tablesorter');
App()->getClientScript()->registerScriptFile(App()->getAssetManager()->publish(ADMIN_SCRIPT_PATH . 'users.js'));
$postuserid = (int) Yii::app()->request->getPost("uid");
$aData['postuser'] = flattenText(Yii::app()->request->getPost("user"));
$aData['postemail'] = flattenText(Yii::app()->request->getPost("email"));
$aData['postuserid'] = $postuserid;
$aData['postfull_name'] = flattenText(Yii::app()->request->getPost("full_name"));
$this->_refreshtemplates();
$templaterights = array();
foreach (getUserList() as $usr) {
if ($usr['uid'] == $postuserid) {
$trights = Permission::model()->findAllByAttributes(array('uid' => $usr['uid'], 'entity' => 'template'));
foreach ($trights as $srow) {
$templaterights[$srow["permission"]] = array("use" => $srow["read_p"]);
}
$templates = Template::model()->findAll();
$aData['list'][] = array('templaterights' => $templaterights, 'templates' => $templates);
}
}
$aData['fullpagebar']['savebutton']['form'] = 'modtemplaterightsform';
$aData['fullpagebar']['closebutton']['url'] = 'admin/user/sa/index';
$this->_renderWrappedTemplate('user', 'setusertemplates', $aData);
}
示例11: unset
$insertlog->execute();
$template_file = $spracheResponse->table_add;
}
// No update or insert failed
} else {
$template_file = $spracheResponse->error_table;
}
}
}
// An error occurred during validation
// unset the redirect information and display the form again
if (!$ui->smallletters('action', 2, 'post') or count($errors) != 0) {
unset($header, $text);
// Gather data for adding if needed and define add template
if ($ui->st('d', 'get') == 'ad') {
$table = getUserList($resellerLockupID);
$query = $sql->prepare("SELECT m.`id`,m.`ssh2ip`,m.`description`, COUNT(d.`dnsID`)/(m.`max_dns`/100) AS `usedpercent` FROM `voice_tsdns` AS m LEFT JOIN `voice_dns` AS d ON d.`tsdnsID`=m.`id` WHERE m.`resellerid`=? AND m.`active`='Y' GROUP BY m.`id` HAVING `usedpercent`<100 ORDER BY `usedpercent` ASC");
$query->execute(array($resellerLockupID));
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$table2[$row['id']] = trim($row['ssh2ip'] . ' ' . $row['description']);
}
$template_file = 'admin_voice_dns_add.tpl';
// Gather data for modding in case we have an ID and define mod template
} else {
if ($ui->st('d', 'get') == 'md' and $id) {
// Check if database entry exists and if not display 404 page
$template_file = isset($oldActive) ? 'admin_voice_dns_md.tpl' : 'admin_404.tpl';
// Show 404 if GET parameters did not add up or no ID was given with mod
} else {
$template_file = 'admin_404.tpl';
}
示例12: intval
$messageAuthor = intval($_POST['messageAuthor']);
$content = trim($_POST['content']);
$message = addMessage($messageAuthor, $content);
header("location:index.php?ac=userinfo");
} else {
if ($ac == 'search') {
$type = !empty($_GET['type']) ? intval($_GET['key']) : 1;
if ($type == 1) {
$key = !empty($_GET['key']) ? trim($_GET['key']) : null;
$memberid = !empty($_GET['memberid']) ? intval($_GET['memberid']) : null;
$title = $memberid ? '我的问题' : '';
$questions = getQuestionList($memberid, $key);
include 'tpl/main.php';
} else {
$key = !empty($_GET['key']) ? trim($_GET['key']) : null;
$users = getUserList($key);
include 'tpl/userlist.php';
}
} else {
if ($ac == 'myanswers') {
$memberid = !empty($_GET['memberid']) ? intval($_GET['memberid']) : null;
$myanswers = getAnswerList($memberid);
include 'tpl/myanswer.php';
} else {
if ($ac == 'userinfo') {
$usersession = $_SESSION['userinfo'];
$info = getOneUser($usersession['username']);
include 'tpl/userinfo.php';
} else {
if ($ac == 'good') {
$qid = intval($_GET['qid']);
示例13: adduser
/**
* surveypermission::adduser()
* Function responsible to add user.
* @param mixed $surveyid
* @return void
*/
function adduser($surveyid)
{
$aData['surveyid'] = $surveyid = sanitize_int($surveyid);
$aViewUrls = array();
$action = $_POST['action'];
$clang = Yii::app()->lang;
$imageurl = Yii::app()->getConfig('imageurl');
$postuserid = $_POST['uid'];
if ($action == "addsurveysecurity") {
$addsummary = "<div class='header ui-widget-header'>" . $clang->gT("Add User") . "</div>\n";
$addsummary .= "<div class=\"messagebox ui-corner-all\">\n";
$result = Survey::model()->findAll('sid = :sid AND owner_id = :owner_id AND owner_id != :postuserid', array(':sid' => $surveyid, ':owner_id' => Yii::app()->session['loginID'], ':postuserid' => $postuserid));
if (count($result) > 0 && in_array($postuserid, getUserList('onlyuidarray')) || Yii::app()->session['USER_RIGHT_SUPERADMIN'] == 1) {
if ($postuserid > 0) {
$isrresult = Survey_permissions::model()->insertSomeRecords(array('sid' => $surveyid, 'uid' => $postuserid, 'permission' => 'survey', 'read_p' => 1));
if ($isrresult) {
$addsummary .= "<div class=\"successheader\">" . $clang->gT("User added.") . "</div>\n";
$addsummary .= "<br />" . CHtml::form(array("admin/surveypermission/sa/set/surveyid/{$surveyid}"), 'post') . "<input type='submit' value='" . $clang->gT("Set survey permissions") . "' />" . "<input type='hidden' name='action' value='setsurveysecurity' />" . "<input type='hidden' name='uid' value='{$postuserid}' />" . "</form>\n";
} else {
// Username already exists.
$addsummary .= "<div class=\"warningheader\">" . $clang->gT("Failed to add user.") . "</div>\n" . "<br />" . $clang->gT("Username already exists.") . "<br />\n";
$addsummary .= "<br/><input type=\"submit\" onclick=\"window.open('" . $this->getController()->createUrl('admin/surveypermission/sa/view/surveyid/' . $surveyid) . "', '_top')\" value=\"" . $clang->gT("Continue") . "\"/>\n";
}
} else {
$addsummary .= "<div class=\"warningheader\">" . $clang->gT("Failed to add user.") . "</div>\n" . "<br />" . $clang->gT("No Username selected.") . "<br />\n";
$addsummary .= "<br/><input type=\"submit\" onclick=\"window.open('" . $this->getController()->createUrl('admin/surveypermission/sa/view/surveyid/' . $surveyid) . "', '_top')\" value=\"" . $clang->gT("Continue") . "\"/>\n";
}
} else {
accessDenied();
}
$addsummary .= "</div>\n";
$aViewUrls['output'] = $addsummary;
}
$this->_renderWrappedTemplate('authentication', $aViewUrls, $aData);
}
示例14: getUserList
$stmt = $db->prepare($pre_user_1);
$stmt->execute();
$pre_all_1 = $stmt->fetchAll(PDO::FETCH_NUM);
$stmt = $db->prepare($pre_user_2);
$stmt->execute();
$pre_all_2 = $stmt->fetchAll(PDO::FETCH_NUM);
$stmt = $db->prepare($this_user_1);
$stmt->execute();
$this_all_1 = $stmt->fetchAll(PDO::FETCH_NUM);
$stmt = $db->prepare($this_user_2);
$stmt->execute();
$this_all_2 = $stmt->fetchAll(PDO::FETCH_NUM);
$data->user_create_pre = getUserList($pre_all_1);
$data->user_desgin_pre = getUserList($pre_all_2);
$data->user_create_this = getUserList($this_all_1);
$data->user_desgin_this = getUserList($this_all_2);
}
$db = null;
//echo $pre_lin;
echo '{"summary":' . json_encode($data) . '}';
} catch (PDOException $e) {
echo '{"error":{"text":"' . $e->getMessage() . '"}}';
}
});
/**
* 获取需求属性
*/
$app->get('/users/:power', function ($power) use($app) {
$sql = "SELECT * FROM `tb_users` WHERE `user_power` =" . $power;
try {
$db = getConnection();
示例15: setFavorite
case 'setFavorite':
setFavorite();
break;
case 'getBonusHistory':
getBonusHistory();
break;
case 'getMultipleBidList':
getMultipleBidList();
break;
case 'getProjects':
$userId = isset($_SESSION['userid']) ? $_SESSION['userid'] : 0;
$currentUser = User::find($userId);
getProjects(!$currentUser->isInternal());
break;
case 'getUserList':
getUserList();
break;
case 'getUsersList':
getUsersList();
break;
case 'payBonus':
payBonus();
break;
case 'pingTask':
pingTask();
break;
case 'userReview':
userReview();
break;
case 'visitQuery':
echo json_encode(VisitQueryTools::visitQuery((int) $_GET['jobid']));