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


PHP user_row函数代码示例

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


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

示例1: handle_list

function handle_list()
{
    page_head("Job submission access control");
    echo "The following users are allowed to submit jobs.\n        <p>\n    ";
    $us = BoincUserSubmit::enum("");
    start_table();
    table_header("User<br><p class=\"text-muted\">Click to change permissions or quota</p>", "Can submit jobs for", "Quota", "Max jobs in progress<br><p class=\"text-muted\">0 means no limit</p>", "Current priority<br><p class=\"text-muted\">Later time = lower priority</p>");
    foreach ($us as $u) {
        user_row($u);
    }
    end_table();
    show_button("manage_project.php?action=add_form", "Add user", "Allow a new user to submit jobs");
    page_tail();
}
开发者ID:CalvinZhu,项目名称:boinc,代码行数:14,代码来源:manage_project.php

示例2: handle_list

function handle_list()
{
    page_head("Project-wide management functions");
    echo "<h3>User permissions and quotas</h3>\n        The following users are allowed to submit jobs.\n        <p>\n    ";
    show_button("manage_project.php?action=add_form", "Add user", "Allow a new user to submit jobs");
    $us = BoincUserSubmit::enum("");
    start_table();
    table_header("User", "Can submit jobs for", "Quota");
    foreach ($us as $u) {
        user_row($u);
    }
    end_table();
    page_tail();
}
开发者ID:nicolas17,项目名称:boincgit-test,代码行数:14,代码来源:manage_project.php

示例3: _e

                ?>
</th>
	<th colspan="2" style="text-align: center"><?php 
                _e('Actions');
                ?>
</th>
</tr>
</tbody>
<tbody id="role-<?php 
                echo $role;
                ?>
"><?php 
                $style = '';
                foreach ((array) $roleclass as $user_object) {
                    $style = ' class="alternate"' == $style ? '' : ' class="alternate"';
                    echo "\n\t" . user_row($user_object, $style);
                }
                ?>

</tbody>
<?php 
            }
            ?>
</table>

<?php 
            if ($wp_user_search->results_are_paged()) {
                ?>
	<div class="user-paging-text"><p><?php 
                $wp_user_search->page_links();
                ?>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:users.php

示例4: foreach

</tr>
</tfoot>

<tbody id="users" class="list:user user-list">
<?php 
            $style = '';
            foreach ($wp_user_search->get_results() as $userid) {
                $user_object = new WP_User($userid);
                $roles = $user_object->roles;
                $role = array_shift($roles);
                $wallet = $user_object->wallet;
                if (is_multisite() && empty($role)) {
                    continue;
                }
                $style = ' class="alternate"' == $style ? '' : ' class="alternate"';
                echo "\n\t", user_row($user_object, $style, $role, $wallet);
            }
            ?>
</tbody>
</table>

<div class="tablenav">

<?php 
            if ($wp_user_search->results_are_paged()) {
                ?>
	<div class="tablenav-pages"><?php 
                $wp_user_search->page_links();
                ?>
</div>
<?php 
开发者ID:laiello,项目名称:cartonbank,代码行数:31,代码来源:users.php

示例5: check_ajax_referer

     $x->send();
     break;
 case 'add-user':
     check_ajax_referer($action);
     if (!current_user_can('create_users')) {
         die('-1');
     }
     require_once ABSPATH . WPINC . '/registration.php';
     if (!($user_id = add_user())) {
         die('0');
     } elseif (is_wp_error($user_id)) {
         $x = new WP_Ajax_Response(array('what' => 'user', 'id' => $user_id));
         $x->send();
     }
     $user_object = new WP_User($user_id);
     $x = new WP_Ajax_Response(array('what' => 'user', 'id' => $user_id, 'data' => user_row($user_object, '', $user_object->roles[0]), 'supplemental' => array('show-link' => sprintf(__('User <a href="#%s">%s</a> added'), "user-{$user_id}", $user_object->user_login), 'role' => $user_object->roles[0])));
     $x->send();
     break;
 case 'autosave':
     // The name of this action is hardcoded in edit_post()
     define('DOING_AUTOSAVE', true);
     $nonce_age = check_ajax_referer('autosave', 'autosavenonce');
     global $current_user;
     $_POST['post_category'] = explode(",", $_POST['catslist']);
     if ($_POST['post_type'] == 'page' || empty($_POST['post_category'])) {
         unset($_POST['post_category']);
     }
     $do_autosave = (bool) $_POST['autosave'];
     $do_lock = true;
     $data = '';
     /* translators: draft saved date format, see http://php.net/date */
开发者ID:nagyist,项目名称:laura-wordpress,代码行数:31,代码来源:admin-ajax.php

示例6: is_wp_error

case 'add-user' :
	if ( !current_user_can('edit_users') )
		die('-1');
	require_once(ABSPATH . WPINC . '/registration.php');
	if ( !$user_id = add_user() )
		die('0');
	elseif ( is_wp_error( $user_id ) ) {
		foreach( $user_id->get_error_messages() as $message )
			echo "<p>$message<p>";
		exit;
	}
	$user_object = new WP_User( $user_id );
	$x = new WP_Ajax_Response( array(
		'what' => 'user',
		'id' => $user_id,
		'data' => user_row( $user_object ),
		'supplemental' => array('show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login))
	) );
	$x->send();
	break;
case 'autosave' : // The name of this action is hardcoded in edit_post()
	$_POST['post_content'] = $_POST['content'];
	$_POST['post_excerpt'] = $_POST['excerpt'];
	$_POST['post_status'] = 'draft';
	$_POST['post_category'] = explode(",", $_POST['catslist']);
	if($_POST['post_type'] == 'page' || empty($_POST['post_category']))
		unset($_POST['post_category']);

	if($_POST['post_ID'] < 0) {
		$_POST['temp_ID'] = $_POST['post_ID'];
		$id = wp_write_post();
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:admin-ajax.php

示例7: is_wp_error

	require_once(ABSPATH . WPINC . '/registration.php');
	if ( !$user_id = add_user() )
		die('0');
	elseif ( is_wp_error( $user_id ) ) {
		$x = new WP_Ajax_Response( array(
			'what' => 'user',
			'id' => $user_id
		) );
		$x->send();
	}
	$user_object = new WP_User( $user_id );

	$x = new WP_Ajax_Response( array(
		'what' => 'user',
		'id' => $user_id,
		'data' => user_row( $user_object, '', $user_object->roles[0] ),
		'supplemental' => array(
			'show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login),
			'role' => $user_object->roles[0]
		)
	) );
	$x->send();
	break;
case 'autosave' : // The name of this action is hardcoded in edit_post()
	define( 'DOING_AUTOSAVE', true );

	$nonce_age = check_ajax_referer( 'autosave', 'autosavenonce' );

	$_POST['post_category'] = explode(",", $_POST['catslist']);
	if ( $_POST['post_type'] == 'page' || empty($_POST['post_category']) )
		unset($_POST['post_category']);
开发者ID:realfluid,项目名称:umbaugh,代码行数:31,代码来源:admin-ajax.php

示例8: foreach

            ?>
</tr>
</tfoot>

<tbody id="users" class="list:user user-list">
<?php 
            $style = '';
            foreach ($wp_user_search->get_results() as $userid) {
                $user_object = new WP_User($userid);
                $roles = $user_object->roles;
                $role = array_shift($roles);
                if (is_multisite() && empty($role)) {
                    continue;
                }
                $style = ' class="alternate"' == $style ? '' : ' class="alternate"';
                echo "\n\t", user_row($user_object, $style, $role, $post_counts[$userid]);
            }
            ?>
</tbody>
</table>

<div class="tablenav">

<?php 
            if ($wp_user_search->results_are_paged()) {
                ?>
	<div class="tablenav-pages"><?php 
                $wp_user_search->page_links();
                ?>
</div>
<?php 
开发者ID:beaucollins,项目名称:wp,代码行数:31,代码来源:users.php

示例9: db_fetch_all

$users = db_fetch_all('SELECT * FROM ' . KFM_DB_PREFIX . 'users WHERE id>1');
if (!is_array($users)) {
    die('error retrieving user list');
}
$lhtml = '<table id="kfm_admin_users_table">
<thead>
	<tr>
		<th>Name</th>
		<th></th>
		<th>Status</th>
	</tr>
</thead>
<tbody>
';
foreach ($users as $user) {
    $lhtml .= user_row($user['id'], $user['username'], $user['status']);
}
$lhtml .= "</tbody>\n</table>\n";
if (count($users) == 0) {
    $lhtml = '<span class="message">No users found</span>';
}
?>
<script type="text/javascript">
/* User functions */
function new_user(){
	input_props='size=12 maxsize=16';
	fc='<h3>New user</h3>';
	fc+='Username <input type="text" id="newuser_username" '+input_props+'/><br/>';
	fc+='Password <input type="password" id="newuser_password" '+input_props+'/>';
	$.prompt(fc,{
		buttons:{cancel:false, OK:true},
开发者ID:Bandeira,项目名称:sps,代码行数:31,代码来源:users.php

示例10: die

<?php

require_once 'initialise.php';
require_once 'functions.php';
if ($kfm->user_status != 1) {
    die('error("No authorization aquired")');
}
if (!(isset($_POST['username']) && isset($_POST['password']))) {
    die('error("error with new user request");');
}
$res = db_fetch_all('SELECT id FROM ' . KFM_DB_PREFIX . 'users WHERE username="' . sql_escape($_POST['username']) . '"');
if ($res && count($res)) {
    die('error("Name already exists.");');
}
$kfm->db->query('INSERT INTO ' . KFM_DB_PREFIX . 'users (username, password,status) VALUES ("' . sql_escape($_POST['username']) . '", "' . sha1($_POST['password']) . '", 2)');
if (PEAR::isError($kfmdb)) {
    die('error("error with database interactions");');
}
$uhtml = user_row($kfm->db->lastInsertId(), $_POST['username'], 2);
$uhtml = preg_replace('/\\n/', '', $uhtml);
$uhtml = str_replace("'", "\\'", $uhtml);
echo '$("#kfm_admin_users_table tbody").append(\'' . $uhtml . '\');';
?>
message('user created');
开发者ID:esquarenews,项目名称:MortgageBlog,代码行数:24,代码来源:user_new.php


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