• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_all_users函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: get_all

function get_all($type, $properties = array())
{
    if ($type == 'user') {
        return get_all_users($properties);
    }
    return get_all_posts($type, $properties);
}
开发者ID:bjorn-ali-goransson,项目名称:Wordpress-Theme,代码行数:7,代码来源:get_all.php


示例2: test_fangodb_getrow

function test_fangodb_getrow()
{
    $db = get_db();
    $all = get_all_users();
    $first_row = $all[0];
    $second_row = $all[1];
    assert($db->getRow('select * from users order by id') == $first_row);
    assert($db->getRow('select * from users where id = :id', array('id' => 2)) == $second_row);
}
开发者ID:agiardina,项目名称:Fango,代码行数:9,代码来源:fangoTest.php


示例3: render_all

    $login_login->set_vars($login_login_render);
    $login_login->parse();
    $content = $login_login->final;
    $login_framework_render['content'] = $content;
    render_all();
}
function render_accounts()
{
    global $login_framework_render;
    global $parameters;
    foreach ($parameters as $parameter) {
        global ${$parameter};
    }
    $content = "";
    $login_account_list = new Template();
    $login_account_list->load('login_account_list');
    $login_account_list_render['accounts'] = '';
    $login_account_row = new Template();
    $login_account_row->load('login_account_row');
    $login_account_row_render['id'] = '';
    $login_account_row_render['username'] = '';
    $login_account_row_render['first_name'] = '';
    $login_account_row_render['last_name'] = '';
    $login_account_row_render['email'] = '';
    $login_account_row_render['access'] = '';
    $users = get_all_users();
    foreach ($users as $user) {
        $login_account_row_render['id'] = $user['userid'];
        $login_account_row_render['username'] = $user['username'];
        $login_account_row_render['first_name'] = $user['first_name'];
        $login_account_row_render['last_name'] = $user['last_name'];
        $login_account_row_render['email'] = $user['email'];
        $login_account_row_render['access'] = $user['access'];
        $login_account_row->set_vars($login_account_row_render);
        $login_account_row->parse();
        $login_account_list_render['accounts'] .= $login_account_row->final;
开发者ID:mwcs01,项目名称:openpantry,代码行数:36,代码来源:login.mod.php


示例4: get_ldap_users

function get_ldap_users()
{
    //TODO get the fucking LDAP server working first
    $users = get_all_users();
    return $users;
}
开发者ID:xmar,项目名称:laclef-webapp,代码行数:6,代码来源:models.php


示例5: rand

}

?>

<fieldset>
<legend>Current Users </legend>

<p> To Change or Delete a user, select it ... </p>
<?

# Setting a session token
$_SESSION["token"] = rand (0, 10000); 
$token = $_SESSION["token"];

$allUsers = get_all_users();
if (count ($allUsers)) {
    
    echo "<TABLE class=\"report\">";
    echo "<TR><TH>User Name</TH><TH>First Name</TH><TH>Last Name</TH><TH>e-mail</TH><TH>Group</TH><TH>Date Created</TH><TH>Last Login</TH></TR>";

    foreach ($allUsers as $indUser) {
        $indUser = str_replace ("___", "\M", $indUser);
        $indUserArray = explode ("\M", $indUser);
        if ($indUserArray[0] == $id) {
            $groupName = "$groupName,$indUserArray[5]";
        }
        else {
            if ($id != "") {
                echo "<TR><TD><a href=\"javascript:populate_users('$userName','$firstName','$lastName','$email', '$groupName')\"</a>$userName</TD><TD>$firstName</TD><TD>$lastName</TD><TD>$emailDisp</TD><TD>$groupName</TD><TD>$dateEntered</TH><TH>$lastLogin</TH></TR>";
                $groupName = "$indUserArray[5]";
开发者ID:joel-advantis,项目名称:PAM,代码行数:30,代码来源:addUser.php


示例6: list_users_action

function list_users_action($uid)
{
    // needed to set the tab active
    $users_active = true;
    //check if the user is admin
    if (user_is_admin($uid)) {
        // dealing with user add form
        if (isset($_POST['lastname'])) {
            $user_added = get_user_by_uid($_POST['uid']);
            // user exists
            if ($user_added) {
                update_user($_POST);
            } else {
                add_user($_POST);
            }
        }
        // list all the users
        $users = get_all_users();
        require 'templates/users.php';
    } else {
        require 'templates/login.php';
    }
}
开发者ID:xmar,项目名称:laclef-webapp,代码行数:23,代码来源:controllers.php


示例7: review_changes_block

/**
 * Print Review Changes Block
 *
 * Prints a block allowing the user review all changes pending approval
 */
function review_changes_block($block = true, $config = "", $side, $index)
{
    global $pgv_lang, $ctype, $QUERY_STRING, $factarray, $PGV_IMAGE_DIR, $PGV_IMAGES;
    global $pgv_changes, $TEXT_DIRECTION, $SHOW_SOURCES, $PGV_BLOCKS;
    global $PHPGEDVIEW_EMAIL;
    if (empty($config)) {
        $config = $PGV_BLOCKS["review_changes_block"]["config"];
    }
    if ($pgv_changes) {
        //-- if the time difference from the last email is greater than 24 hours then send out another email
        $LAST_CHANGE_EMAIL = get_site_setting('LAST_CHANGE_EMAIL');
        if (time() - $LAST_CHANGE_EMAIL > 60 * 60 * 24 * $config["days"]) {
            $LAST_CHANGE_EMAIL = time();
            set_site_setting('LAST_CHANGE_EMAIL', $LAST_CHANGE_EMAIL);
            write_changes();
            if ($config["sendmail"] == "yes") {
                // Which users have pending changes?
                $users_with_changes = array();
                foreach (get_all_users() as $user_id => $user_name) {
                    foreach (get_all_gedcoms() as $ged_id => $ged_name) {
                        if (exists_pending_change($user_id, $ged_id)) {
                            $users_with_changes[$user_id] = $user_name;
                            break;
                        }
                    }
                }
                foreach ($users_with_changes as $user_id => $user_name) {
                    //-- send message
                    $message = array();
                    $message["to"] = $user_name;
                    $message["from"] = $PHPGEDVIEW_EMAIL;
                    $message["subject"] = $pgv_lang["review_changes_subject"];
                    $message["body"] = $pgv_lang["review_changes_body"];
                    $message["method"] = get_user_setting($user_id, 'contactmethod');
                    $message["url"] = PGV_SCRIPT_NAME . "?" . html_entity_decode($QUERY_STRING);
                    $message["no_from"] = true;
                    addMessage($message);
                }
            }
        }
        if (PGV_USER_CAN_EDIT) {
            $id = "review_changes_block";
            $title = print_help_link("review_changes_help", "qm", "", false, true);
            if ($PGV_BLOCKS["review_changes_block"]["canconfig"]) {
                if ($ctype == "gedcom" && PGV_USER_GEDCOM_ADMIN || $ctype == "user" && PGV_USER_ID) {
                    if ($ctype == "gedcom") {
                        $name = PGV_GEDCOM;
                    } else {
                        $name = PGV_USER_NAME;
                    }
                    $title .= "<a href=\"javascript: configure block\" onclick=\"window.open('" . encode_url("index_edit.php?name={$name}&ctype={$ctype}&action=configure&side={$side}&index={$index}") . "', '_blank', 'top=50,left=50,width=600,height=350,scrollbars=1,resizable=1'); return false;\">";
                    $title .= "<img class=\"adminicon\" src=\"{$PGV_IMAGE_DIR}/" . $PGV_IMAGES["admin"]["small"] . "\" width=\"15\" height=\"15\" border=\"0\" alt=\"" . $pgv_lang["config_block"] . "\" /></a>";
                }
            }
            $title .= $pgv_lang["review_changes"];
            $content = "";
            if (PGV_USER_CAN_ACCEPT) {
                $content .= "<a href=\"javascript:;\" onclick=\"window.open('edit_changes.php','_blank','width=600,height=500,resizable=1,scrollbars=1'); return false;\">" . $pgv_lang["accept_changes"] . "</a><br />";
            }
            if ($config["sendmail"] == "yes") {
                $content .= $pgv_lang["last_email_sent"] . format_timestamp($LAST_CHANGE_EMAIL) . "<br />";
                $content .= $pgv_lang["next_email_sent"] . format_timestamp($LAST_CHANGE_EMAIL + 60 * 60 * 24 * $config["days"]) . "<br /><br />";
            }
            foreach ($pgv_changes as $cid => $changes) {
                $change = $changes[count($changes) - 1];
                if ($change["gedcom"] == PGV_GEDCOM) {
                    $record = GedcomRecord::getInstance($change['gid']);
                    if ($record->getType() != 'SOUR' || $SHOW_SOURCES >= PGV_USER_ACCESS_LEVEL) {
                        $content .= '<b>' . PrintReady($record->getFullName()) . '</b> ' . getLRM() . '(' . $record->getXref() . ')' . getLRM();
                        switch ($record->getType()) {
                            case 'INDI':
                            case 'FAM':
                            case 'SOUR':
                            case 'OBJE':
                                $content .= $block ? '<br />' : ' ';
                                $content .= '<a href="' . encode_url($record->getLinkUrl() . '&show_changes=yes') . '">' . $pgv_lang['view_change_diff'] . '</a>';
                                break;
                        }
                        $content .= '<br />';
                    }
                }
            }
            global $THEME_DIR;
            if ($block) {
                require $THEME_DIR . 'templates/block_small_temp.php';
            } else {
                require $THEME_DIR . 'templates/block_main_temp.php';
            }
        }
    }
}
开发者ID:rathervague,项目名称:phpgedview,代码行数:96,代码来源:review_changes.php


示例8: UserForm

    $category_id = '';
}
$simple_search_form = new UserForm(UserForm::TYPE_SIMPLE_SEARCH, null, 'simple_search_form', null, api_get_self() . '?selectcat=' . $category_id);
$values = $simple_search_form->exportValues();
$keyword = '';
if (isset($_GET['search']) && !empty($_GET['search'])) {
    $keyword = Security::remove_XSS($_GET['search']);
}
if ($simple_search_form->validate() && empty($keyword)) {
    $keyword = $values['keyword'];
}
if (!empty($keyword)) {
    $users = find_students($keyword);
} else {
    if (isset($alleval) && isset($alllinks)) {
        $users = get_all_users($alleval, $alllinks);
    } else {
        $users = null;
    }
}
$offset = isset($_GET['offset']) ? $_GET['offset'] : '0';
// Main course category
$mainCourseCategory = Category::load(null, null, api_get_course_id(), null, null, api_get_session_id());
$flatviewtable = new FlatViewTable($cat[0], $users, $alleval, $alllinks, true, $offset, $addparams, $mainCourseCategory[0]);
$parameters = array('selectcat' => intval($_GET['selectcat']));
$flatviewtable->set_additional_parameters($parameters);
$params = array();
if (isset($_GET['export_pdf']) && $_GET['export_pdf'] == 'category') {
    $params['only_total_category'] = true;
    $params['join_firstname_lastname'] = true;
    $params['show_official_code'] = true;
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:31,代码来源:gradebook_flatview.php


示例9: header

# This script creates a new account for a user, and inserts it into the database
#
header('Pragma: no-cache');
require_once 'shared.php';
# Make a connection to the database
$db_read = get_db_read();
$db_write = get_db_write();
$username = mysql_escape_string(htmlentities(trim($_POST['username'])));
$password = $_POST['password'];
$email = mysql_escape_string(htmlentities(trim($_POST['email'])));
$notify_comments = isset($_POST['notify_comments']) ? '1' : '0';
$notify_pictures = isset($_POST['notify_pictures']) ? '1' : '0';
if ($password != $_POST['password2']) {
    show_error_redirect_back("Passwords don't match!");
}
if (count(get_all_users(true, $db_read)) == 0) {
    $admin = '1';
} else {
    $admin = '0';
}
# Validate the variables
if (validate_username($username) == false) {
    show_error_redirect_back("Please enter a username made up of 3 - 14 alpha-numeric characters");
}
if (validate_password($password) == false) {
    show_error_redirect_back("Please enter a password that is at least 6 characters (it's for your own protection!)");
}
if (validate_email($email) == false) {
    show_error_redirect_back("Please enter a valid email address");
}
# Check if the username is being used
开发者ID:shifter,项目名称:ospap,代码行数:31,代码来源:create_account.php


示例10: foreach

$tpl->page_description = site_seo_description;
$tpl->keywords = site_seo_keywords;
$tpl->page_image = main_url . website_logo;
// Send SEO Data
//--PAGINATION--//
foreach ($vars as $var) {
    if (strpos($var, 'p:') === 0) {
        $page_no_var = $var;
        //get the current Page from URL
    }
}
$perpage = poets_per_page;
$paginate = paginate($perpage, $page_no_var);
$next_number = $paginate['next_number'];
//--get all authors--//
$get_user = get_all_users($database, $next_number, $perpage);
$tpl->all_user = $get_user;
$count_records = $database->count("users");
$total_pages = ceil($count_records / $perpage);
$current_count = count($get_user);
$page_array = array();
$page_array['current_page'] = $paginate['page_no'];
$page_array['total_pages'] = $total_pages;
$page_array['total_records'] = $count_records;
$page_array['current_count'] = $current_count;
$page_array['param_vars'] = $vars;
$page_array['page_no_var'] = $page_no_var;
$tpl->page_array = $page_array;
//$all_topics = $database->select("authors","*", array('status'=>1));
//
//$alphabetically = alphabetically($all_topics,['MAX'=>authors_per_alphabet, 'COUNT'=>true]);
开发者ID:ronak2ram,项目名称:fnji,代码行数:31,代码来源:users.php


示例11: print_user_messages


//.........这里部分代码省略.........
			<!--
				function select_all() {
					';
        foreach ($usermessages as $key => $message) {
            if (isset($message["id"])) {
                $key = $message["id"];
            }
            $content .= '
						var cb = document.getElementById("cb_message' . $key . '");
						if (cb) {
							if (!cb.checked) cb.checked = true;
							else cb.checked = false;
						}
						';
        }
        $content .= '
				return false;
			}
			//-->
			</script>
		';
        $content .= "<input type=\"hidden\" name=\"action\" value=\"deletemessage\" />";
        $content .= "<table class=\"list_table\"><tr>";
        $content .= "<td class=\"list_label\">" . $pgv_lang["delete"] . "<br /><a href=\"javascript:;\" onclick=\"return select_all();\">" . $pgv_lang["all"] . "</a></td>";
        $content .= "<td class=\"list_label\">" . $pgv_lang["message_subject"] . "</td>";
        $content .= "<td class=\"list_label\">" . $pgv_lang["date_created"] . "</td>";
        $content .= "<td class=\"list_label\">" . $pgv_lang["message_from"] . "</td>";
        $content .= "</tr>";
        foreach ($usermessages as $key => $message) {
            if (isset($message["id"])) {
                $key = $message["id"];
            }
            $content .= "<tr>";
            $content .= "<td class=\"list_value_wrap\"><input type=\"checkbox\" id=\"cb_message{$key}\" name=\"message_id[]\" value=\"{$key}\" /></td>";
            $showmsg = preg_replace("/(\\w)\\/(\\w)/", "\$1/<span style=\"font-size:1px;\"> </span>\$2", PrintReady($message["subject"]));
            $showmsg = str_replace("@", "@<span style=\"font-size:1px;\"> </span>", $showmsg);
            $content .= "<td class=\"list_value_wrap\"><a href=\"javascript:;\" onclick=\"expand_layer('message{$key}'); return false;\"><img id=\"message{$key}_img\" src=\"" . $PGV_IMAGE_DIR . "/" . $PGV_IMAGES["plus"]["other"] . "\" border=\"0\" alt=\"" . $pgv_lang["show_details"] . "\" title=\"" . $pgv_lang["show_details"] . "\" /> <b>" . $showmsg . "</b></a></td>";
            if (!empty($message["created"])) {
                $time = strtotime($message["created"]);
            } else {
                $time = time();
            }
            $content .= "<td class=\"list_value_wrap\">" . format_timestamp($time) . "</td>";
            $content .= "<td class=\"list_value_wrap\">";
            $user_id = get_user_id($message["from"]);
            if ($user_id) {
                $content .= PrintReady(getUserFullName($user_id));
                if ($TEXT_DIRECTION == "ltr") {
                    $content .= " " . getLRM() . " - " . htmlspecialchars($user_id, ENT_COMPAT, 'UTF-8') . getLRM();
                } else {
                    $content .= " " . getRLM() . " - " . htmlspecialchars($user_id, ENT_COMPAT, 'UTF-8') . getRLM();
                }
            } else {
                $content .= "<a href=\"mailto:" . $message["from"] . "\">" . str_replace("@", "@<span style=\"font-size:1px;\"> </span>", $message["from"]) . "</a>";
            }
            $content .= "</td>";
            $content .= "</tr>";
            $content .= "<tr><td class=\"list_value_wrap\" colspan=\"5\"><div id=\"message{$key}\" style=\"display: none;\">";
            $message["body"] = nl2br(htmlspecialchars($message["body"], ENT_COMPAT, 'UTF-8'));
            $message["body"] = expand_urls($message["body"]);
            $content .= PrintReady($message["body"]) . "<br /><br />";
            if (strpos($message["subject"], "RE:") === false) {
                $message["subject"] = "RE:" . $message["subject"];
            }
            if ($user_id) {
                $content .= "<a href=\"javascript:;\" onclick=\"reply('" . $user_id . "', '" . $message["subject"] . "'); return false;\">" . $pgv_lang["reply"] . "</a> | ";
            }
            $content .= "<a href=\"" . encode_url("index.php?action=deletemessage&message_id={$key}") . "\" onclick=\"return confirm('" . $pgv_lang["confirm_message_delete"] . "');\">" . $pgv_lang["delete"] . "</a></div></td></tr>";
        }
        $content .= "</table>";
        $content .= "<input type=\"submit\" value=\"" . $pgv_lang["delete_selected_messages"] . "\" /><br /><br />";
    }
    if (get_user_count() > 1) {
        $content .= $pgv_lang["message"] . " <select name=\"touser\">";
        if (PGV_USER_IS_ADMIN) {
            $content .= "<option value=\"all\">" . $pgv_lang["broadcast_all"] . "</option>";
            $content .= "<option value=\"never_logged\">" . $pgv_lang["broadcast_never_logged_in"] . "</option>";
            $content .= "<option value=\"last_6mo\">" . $pgv_lang["broadcast_not_logged_6mo"] . "</option>";
        }
        foreach (get_all_users() as $user_id => $user_name) {
            if ($user_id != PGV_USER_ID && get_user_setting($user_id, 'verified_by_admin') == 'yes' && get_user_setting($user_id, 'contactmethod') != 'none') {
                $content .= "<option value=\"" . $user_name . "\">" . PrintReady(getUserFullName($user_id)) . " ";
                if ($TEXT_DIRECTION == "ltr") {
                    $content .= stripLRMRLM(getLRM() . " - " . $user_name . getLRM());
                } else {
                    $content .= stripLRMRLM(getRLM() . " - " . $user_name . getRLM());
                }
                $content .= "</option>";
            }
        }
        $content .= "</select><input type=\"button\" value=\"" . $pgv_lang["send"] . "\" onclick=\"message(document.messageform.touser.options[document.messageform.touser.selectedIndex].value, 'messaging2', ''); return false;\" />";
    }
    $content .= "</form>";
    global $THEME_DIR;
    if ($block) {
        require $THEME_DIR . 'templates/block_small_temp.php';
    } else {
        require $THEME_DIR . 'templates/block_main_temp.php';
    }
}
开发者ID:rathervague,项目名称:phpgedview,代码行数:101,代码来源:user_messages.php


示例12: get_all_users

        get_all_users();
        break;
    case "administrators":
        get_all_users("administrator");
        break;
    case "authors":
        get_all_users("author");
        break;
    case "contributors":
        get_all_users("contributor");
        break;
    case "editors":
        get_all_users("editor");
        break;
    case "subscribers":
        get_all_users("subscriber");
        break;
    default:
        //echo " This value of parameter 'query' is not supported ";
        break;
}
function get_all_posts()
{
    $sites = wp_get_sites();
    foreach ($sites as $site) {
        switch_to_blog($site['blog_id']);
        get_all_posts_on_site();
    }
}
function get_all_posts_on_site()
{
开发者ID:tsDaenor,项目名称:ops3-g02,代码行数:31,代码来源:data-export-csv.php


示例13: userMessages

    static function userMessages()
    {
        global $pgv_lang, $PGV_IMAGE_DIR, $TEXT_DIRECTION, $PGV_STORE_MESSAGES, $PGV_IMAGES;
        $usermessages = getUserMessages(PGV_USER_NAME);
        $content = "<form name=\"messageform\" action=\"\" onsubmit=\"return confirm('{$pgv_lang['confirm_message_delete']}');\">";
        if (count($usermessages) == 0) {
            $content .= "{$pgv_lang['no_messages']}<br />\n";
        } else {
            $content .= '
				<script language="JavaScript" type="text/javascript">
				<!--
					function select_all() {
			';
            foreach ($usermessages as $k => $message) {
                if (isset($message['id'])) {
                    $k = $message['id'];
                }
                $content .= '
					var cb = document.getElementById("cb_message' . $k . '");
					if (cb) {
						if (!cb.checked) cb.checked = true;
						else cb.checked = false;
					}
				';
            }
            $content .= '
					return false;
				}
				//-->
				</script>
			';
            $content .= '<input type="hidden" name="action" value="deletemessage" />' . '<table class="list_table"><tr>' . "<td class=\"list_label\">{$pgv_lang['delete']}<br />\n<a href=\"javascript:;\" onclick=\"return select_all();\">{$pgv_lang['all']}</a></td>\n" . "<td class=\"list_label\">{$pgv_lang['message_subject']}</td>\n" . "<td class=\"list_label\">{$pgv_lang['date_created']}</td>\n" . "<td class=\"list_label\">{$pgv_lang['message_from']}</td>\n" . "</tr>\n";
            foreach ($usermessages as $k => $message) {
                if (isset($message['id'])) {
                    $k = $message['id'];
                }
                $content .= "<tr>\n<td class=\"list_value_wrap\"><input type=\"checkbox\" id=\"cb_message{$k}\" name=\"message_id[]\" value=\"{$k}\" /></td>\n";
                $showmsg = preg_replace("/(\\w)\\/(\\w)/", "\$1/<span style=\"font-size:1px;\"> </span>\$2", PrintReady($message['subject']));
                $showmsg = preg_replace("/@/", "@<span style=\"font-size:1px;\"> </span>", $showmsg);
                $content .= "<td class=\"list_value_wrap\"><a href=\"javascript:;\" onclick=\"expand_layer('message{$k}'); return false;\"><b>{$showmsg}</b> <img id=\"message{$k}_img\" src=\"{$PGV_IMAGE_DIR}/{$PGV_IMAGES['plus']['other']}\" border=\"0\" alt=\"\" title=\"\" /></a></td>\n";
                if (!empty($message['created'])) {
                    $t = strtotime($message['created']);
                } else {
                    $t = time();
                }
                $content .= '<td class="list_value_wrap">' . format_timestamp($t) . "</td>\n" . '<td class="list_value_wrap">';
                $user_id = get_user_id($message['from']);
                if ($user_id) {
                    $content .= PrintReady(getUserFullName($user_id));
                    if ($TEXT_DIRECTION == 'ltr') {
                        $content .= ' ' . getLRM() . ' - ' . htmlspecialchars($user_id, ENT_COMPAT, 'UTF-8') . getLRM();
                    } else {
                        $content .= ' ' . getRLM() . ' - ' . htmlspecialchars($user_id, ENT_COMPAT, 'UTF-8') . getRLM();
                    }
                } else {
                    $content .= "<a href=\"mailto:{$user_id}\">" . preg_replace("/@/", "@<span style=\"font-size:1px;\"> </span>", $user_id) . '</a>';
                }
                $content .= "</td>\n" . "</tr>\n" . "<tr>\n<td class=\"list_value_wrap\" colspan=\"5\"><div id=\"message{$k}\" style=\"display: none;\">";
                $message['body'] = expand_urls(nl2br(htmlspecialchars($message['body'], ENT_COMPAT, 'UTF-8')));
                $content .= PrintReady($message['body']) . "<br />\n<br />\n";
                if (preg_match("/RE:/", $message["subject"]) == 0) {
                    $message['subject'] = "RE:{$message['subject']}";
                }
                if ($user_id) {
                    $content .= "<a href=\"javascript:;\" onclick=\"reply('{$user_id}', '{$message['subject']}'); return false;\">{$pgv_lang['reply']}</a> | ";
                }
                $content .= "<a href=\"" . encode_url("index.php?action=deletemessage&message_id={$k}") . "\" onclick=\"return confirm('{$pgv_lang['confirm_message_delete']}');\">{$pgv_lang['delete']}</a></div></td>\n</tr>\n";
            }
            $content .= "</table>\n" . "<input type=\"submit\" value=\"{$pgv_lang['delete_selected_messages']}\" /><br />\n<br />\n";
        }
        if (get_user_count() > 1) {
            $content .= "{$pgv_lang['message']} <select name=\"touser\">";
            if (PGV_USER_IS_ADMIN) {
                $content .= "<option value=\"all\">{$pgv_lang['broadcast_all']}</option>\n" . "<option value=\"never_logged\">{$pgv_lang['broadcast_never_logged_in']}</option>\n" . "<option value=\"last_6mo\">{$pgv_lang['broadcast_not_logged_6mo']}</option>\n";
            }
            foreach (get_all_users() as $user_id => $user_name) {
                if ($user_id != PGV_USER_ID && get_user_setting($user_id, 'verified_by_admin') == 'yes') {
                    $content .= "<option value=\"{$user_id}\">" . PrintReady(getUserFullName($user_id)) . ' ';
                    if ($TEXT_DIRECTION == 'ltr') {
                        $content .= getLRM() . " - {$user_id}" . getLRM();
                    } else {
                        $content .= getRLM() . " - {$user_id}" . getRLM();
                    }
                    $content .= "</option>\n";
                }
            }
            $content .= "</select>\n<input type=\"button\" value=\"{$pgv_lang['send']}\" onclick=\"message(document.messageform.touser.options[document.messageform.touser.selectedIndex].value, 'messaging2', ''); return false;\" />\n";
        }
        $content .= "</form>\n";
        return $content;
    }
开发者ID:bitweaver,项目名称:phpgedview,代码行数:91,代码来源:class_stats_ui.php


示例14: information

# * If the viewer isn't logged in, it will ask them to log in/register.
# * If the viewer is logged in, it will list their information (categories, pictures).
# * If the viewer is an admin, display a list of users requiring authorization.
# * Display other stats (pictures, categories, etc).
#
header('Pragma: no-cache');
require 'shared.php';
# Make a connection to the database
$db = get_db_read();
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
if ($me) {
    $me['category_count'] = count(get_categories_by_user_id($me['user_id'], true, $db));
    $me['picture_count'] = count(get_pictures_by_user_id($me['user_id'], true, $db));
    $me['url'] = "show_user.php?user_id=" . $me['user_id'];
}
$users = get_all_users($me != null, $db);
# Set up the list of users (add appropriate information to the array)
$full_users = array();
$total_users = array();
$total_users['category_count'] = 0;
$total_users['picture_count'] = 0;
$total_users['url'] = "show_user.php";
while ($user_information = array_shift($users)) {
    $user_information['category_count'] = count(get_categories_by_user_id($user_information['user_id'], $me != null, $db));
    $user_information['picture_count'] = count(get_pictures_by_user_id($user_information['user_id'], $me != null, $db));
    $user_information['url'] = "show_user.php?user_id=" . $user_information['user_id'];
    array_push($full_users, $user_information);
    $total_users['category_count'] += $user_information['category_count'];
    $total_users['picture_count'] += $user_information['picture_count'];
    if (!$me) {
        $user_information['last_updated'] = $user_information['last_updated_public'];
开发者ID:shifter,项目名称:ospap,代码行数:31,代码来源:index.php


示例15: _getLatestUserData

 static function _getLatestUserData($type = 'userid', $params = null)
 {
     global $DATE_FORMAT, $TIME_FORMAT, $pgv_lang;
     static $user = null;
     if ($user === null) {
         $users = get_all_users('DESC', 'reg_timestamp', 'username');
         $user = array_shift($users);
         unset($users);
     }
     switch ($type) {
         default:
         case 'userid':
             return $user;
         case 'username':
             return get_user_name($user);
         case 'fullname':
             return getUserFullName($user);
         case 'firstname':
             return get_user_setting($user, 'firstname');
         case 'lastname':
             return get_user_setting($user, 'lastname');
         case 'regdate':
             if (is_array($params) && isset($params[0]) && $params[0] != '') {
                 $datestamp = $params[0];
             } else {
                 $datestamp = $DATE_FORMAT;
             }
             return date($datestamp, get_user_setting($user, 'reg_timestamp'));
         case 'regtime':
             if (is_array($params) && isset($params[0]) && $params[0] != '') {
                 $datestamp = $params[0];
             } else {
                 $datestamp = $TIME_FORMAT;
             }
             return date($datestamp, get_user_setting($user, 'reg_timestamp'));
         case 'loggedin':
             if (is_array($params) && isset($params[0]) && $params[0] != '') {
                 $yes = $params[0];
             } else {
                 $yes = $pgv_lang['yes'];
             }
             if (is_array($params) && isset($params[1]) && $params[1] != '') {
                 $no = $params[1];
             } else {
                 $no = $pgv_lang['no'];
             }
             return get_user_setting($user, 'loggedin') == 'Y' ? $yes : $no;
     }
 }
开发者ID:bitweaver,项目名称:phpgedview,代码行数:49,代码来源:class_stats.php


示例16: get_content


//.........这里部分代码省略.........
                        if (isset($_POST["topicid"])) {
                            //mar ki van valasztva a modositando topik
                            if (isset($_POST["operation"])) {
                                //kesz a modositas
                                $hiba = db_admin_modify_topic($_POST);
                            }
                            get_admin_modify_topic($hiba, $_POST["topicid"]);
                        } else {
                            get_admin_forum($id, $oldal);
                        }
                    }
                    //h id=0, akkor a topikokat listazza, kulonben egy topikon belul az uzenetekt
                    break;
                case "ki":
                    //kijelentkezesre kattintottak
                    //Bejelentkezést/kijelentkezést megvalósító függvények
                    include "loginout_db.php";
                    include "loginout.php";
                    logout();
                    break;
                case "beallitasok":
                    //beallitasokra kattintott a felhasznalo
                    //Beállítások, opciók módosításához szükséges függvények
                    include "settings_db.php";
                    include "settings.php";
                    $hiba = 0;
                    if (isset($_POST["nev"]) || isset($_POST["jelszo"]) || isset($_POST["jelszo2"]) || isset($_POST["email"]) || isset($_POST["email2"]) || isset($_POST["vnev"]) || isset($_POST["knev"]) || isset($_POST["tel"]) || isset($_POST["cim"])) {
                        $hiba = db_settings_check($_POST);
                    }
                    get_settings($hiba, $_POST);
                    break;
                case "felhasznalok":
                    //a felhasznalokat akarja megtekinteni
                    get_all_users();
                    break;
                case "kepek":
                    //a "Kepek" menupont ill. a kepgaleriak eseten mindig ugyanaz tortenik
                //a "Kepek" menupont ill. a kepgaleriak eseten mindig ugyanaz tortenik
                case "kepek1":
                case "kepek2":
                case "kepek3":
                    //Képgalériák megjelenítéséhez a függvények
                    include "pixgals.php";
                    get_picture_galerys();
                    break;
                case "linkek":
                    //linkek megtekintese
                    //Linkgyüjteményre vonatkozó függvények
                    include "links_db.php";
                    include "links.php";
                    get_links();
                    break;
                case "ujkategoria":
                    //uj linkkategoriat akar valaki letrehozni vagy modositani
                    //Linkgyüjteményre vonatkozó függvények
                    include "links_db.php";
                    include "links.php";
                    $hiba = 0;
                    if (isset($_POST["katnev"])) {
                        //ha mar be voltak irva az uj linkkategoria adatai
                        $hiba = db_add_new_cathegory($_POST["katnev"]);
                        if ($hiba) {
                            get_new_cathegory($hiba);
                        }
                    } else {
                        if (isset($_POST["id"])) {
开发者ID:nagyell,项目名称:Tesztek,代码行数:67,代码来源:__functions.php


示例17: add_simple_tag


//.........这里部分代码省略.........
                        foreach ($STATUS_CODES as $code => $status) {
                            echo "<option value=\"{$code}\"";
                            if ($code == $value) {
                                echo " selected=\"selected\"";
                            }
                            echo ">{$status}</option>\n";
                        }
                        echo "</select>\n";
                    } else {
                        if ($fact == "RELA") {
                            $text = strtolower($value);
                            // add current relationship if not found in default list
                            if (!array_key_exists($text, $assorela)) {
                                $assorela[$text] = $text;
                            }
                            echo "<select tabindex=\"" . $tabkey . "\" id=\"" . $element_id . "\" name=\"" . $element_name . "\" >\n";
                            foreach ($assorela as $key => $value) {
                                echo "<option value=\"" . $key . "\"";
                                if ($key == $text) {
                                    echo " selected=\"selected\"";
                                }
                                echo ">" . $assorela["{$key}"] . "</option>\n";
                            }
                            echo "</select>\n";
                        } else {
                            if ($fact == "_PGVU") {
                                $text = strtolower($value);
                                echo "<select tabindex=\"" . $tabkey . "\" id=\"" . $element_id . "\" name=\"" . $element_name . "\" >\n";
                                echo '<option value=""';
                                if ('' == $text) {
                                    echo ' selected="selected"';
                                }
                                echo ">-</option>\n";
                                foreach (get_all_users('asc', 'username') as $user_id => $user_name) {
                                    echo "<option value=\"" . $user_id . "\"";
                                    if ($user_id == $text) {
                                        echo " selected=\"selected\"";
                                    }
                                    echo ">" . $user_name . "</option>\n";
                                }
                                echo "</select>\n";
                            } else {
                                if ($fact == "RESN") {
                                    ?>
		<script type="text/javascript">
		<!--
		function update_RESN_img(resn_val) {
			document.getElementById("RESN_none").style.display="none";
			document.getElementById("RESN_locked").style.display="none";
			document.getElementById("RESN_privacy").style.display="none";
			document.getElementById("RESN_confidential").style.display="none";
			document.getElementById("RESN_"+resn_val).style.display="inline";
			if (resn_val=='none') resn_val='';
			document 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_alloptions函数代码示例发布时间:2022-05-15
下一篇:
PHP get_all_user_settings函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap