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


PHP clladp::Hash_GetALLUsers方法代码示例

本文整理汇总了PHP中clladp::Hash_GetALLUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP clladp::Hash_GetALLUsers方法的具体用法?PHP clladp::Hash_GetALLUsers怎么用?PHP clladp::Hash_GetALLUsers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在clladp的用法示例。


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

示例1: SSHD_KEYS_SERVER_FORM

function SSHD_KEYS_SERVER_FORM($error=null){
	$sock=new sockets();
	$ldap=new clladp();
	$hash=$ldap->Hash_GetALLUsers();
	$users=unserialize(base64_decode($sock->getFrameWork("cmd.php?unixLocalUsers=yes")));
	
	$page=CurrentPageName();
	while (list ($uid, $mail) = each ($hash) ){
		if(strpos($uid,"$")>0){continue;}
		$users[$uid]=$uid;
	}
	$users[null]="{select}";
	ksort($users);	
		$userF=Field_array_Hash($users,"uid",$_POST["uid"],null,null,0,"font-size:13px;padding:3px");
	$html="
	<div style='color:red;font-size:14px;font-weight:bold'>$error</div>
	<form method=\"post\" enctype=\"multipart/form-data\" action=\"$page\">
	<table style='width:100%'>
	<tr>
		<td class=legend style='font-size:13px' nowrap>{ArticaProxyServerUsername}:</td>
		<td>$userF</td>	
	</tr>	
	</table>
	$hidden
	<p>
	<input type=\"file\" name=\"id_rsa\" size=\"30\">
	<input type='submit' name='upload' value='{upload_a_file}&nbsp;&raquo;' style='width:190px'>
	</p>
	</form>
	
	";
	$tpl=new templates();
	echo iframe($tpl->_ENGINE_parse_body($html),0,0);
	
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:35,代码来源:sshd.php

示例2: count

}
if ($argv[1] == "--calendar") {
    plugin_calendar();
    die;
}
if ($argv[1] == "--database") {
    check_databases($bd);
    die;
}
if (!$_GLOBAL["roundcube_installed"]) {
    die("Roundcube is not installed, aborting");
}
$mailhost = $_GLOBAL["fqdn_hostname"];
echo "Get user list....\n";
$ldap = new clladp();
$users = $ldap->Hash_GetALLUsers();
echo count($users) . " user(s) to scan\n";
$q = new mysql();
while (list($num, $val) = each($users)) {
    $user_id = GetidFromUser($bd, $num);
    echo " user \"{$num}\" {$val} user_id={$user_id}\n";
    $sql = "UPDATE identities SET `email`='{$val}', `reply-to`='{$val}' WHERE name='{$num}';";
    echo $sql . "\n";
    $q->QUERY_SQL($sql, $bd);
    if (!$q->ok) {
        echo "{$sql} \n{$q->mysql_error}\n";
    }
    if ($user_id == 0) {
        CreateRoundCubeUser($bd, $num, $val, '127.0.0.1');
        $user_id = GetidFromUser($bd, $num);
    }
开发者ID:brucewu16899,项目名称:artica,代码行数:31,代码来源:exec.roundcube.php

示例3: popuplate

function popuplate()
{
    $unix = new unix();
    if (!is_dir($unix->LOCATE_ROUNDCUBE_WEBFOLDER())) {
        if ($GLOBALS["OUTPUT"]) {
            echo "Starting......: " . date("H:i:s") . " [INIT]: Not installed\n";
        }
        die;
    }
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $pidTime = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".time";
    $unix = new unix();
    $pid = $unix->get_pid_from_file($pidfile);
    if ($unix->process_exists($pid)) {
        if ($GLOBALS["OUTPUT"]) {
            echo "Starting......: " . date("H:i:s") . " [INIT]: Already pid running {$pid}\n";
        }
        die;
    }
    $timExc = $unix->file_time_min($pidTime);
    if (!$GLOBALS["FORCE"]) {
        if ($timExc < 120) {
            return;
        }
        @unlink($pidTime);
        @file_put_contents($pidTime, time());
    }
    $pid = getmypid();
    @file_put_contents($pidfile, $pid);
    if ($GLOBALS["OUTPUT"]) {
        echo "Starting......: " . date("H:i:s") . " [INIT]: Get user list....\n";
    }
    $ldap = new clladp();
    $GLOBALS["LDAP_USERS"] = $ldap->Hash_GetALLUsers();
    if ($GLOBALS["OUTPUT"]) {
        echo "Starting......: " . date("H:i:s") . " [INIT]: " . count($GLOBALS["LDAP_USERS"]) . " user(s) to scan\n";
    }
    if (!is_array($GLOBALS["LDAP_USERS"])) {
        writelogs("No users stored in local database, aborting ", "MAIN", __FILE__, __LINE__);
        die;
    }
    popuplate_db();
    $q = new mysql();
    $sql = "SELECT mysql_database FROM freeweb WHERE groupware='ROUNDCUBE'";
    $results = $q->QUERY_SQL($sql, "artica_backup");
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        popuplate_db($ligne["mysql_database"]);
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:49,代码来源:exec.roundcube.php


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