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


PHP MEMBER_JS函数代码示例

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


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

示例1: MEMBER_JS_JS

function MEMBER_JS_JS()
{
    header("content-type: application/x-javascript");
    $comp = new computers();
    $uid = $comp->ComputerIDFromMAC($_GET["MEMBER_JS"]);
    echo MEMBER_JS($uid, 1, 1);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:7,代码来源:domains.computer.autoadd.php

示例2: popup

function popup()
{
    $users = new usersMenus();
    $ct = new user($_GET["uid"]);
    $tpl = new templates();
    $title = $ct->DisplayName;
    $GRPS = $ct->GetGroups($_GET["uid"], 1);
    while (list($num, $GroupName) = each($ct->GroupsOf)) {
        $jsGRP = "Loadjs('domains.edit.group.php?js=yes&group-id={$num}',true)";
        $XTRG[] = "<tr>\n\t\t\t\t\t<td style='width:16px'><img src='img/wingroup.png'></td>\n\t\t\t\t\t<td style='font-size:16px'><a href=\"javascript:blur();\" OnClick=\"javascript:{$jsGRP}\" style='text-decoration:underline'>{$GroupName}</a></td>\n\t\t\t\t</tr>";
    }
    $editjs = MEMBER_JS($_GET["uid"], 1, 1);
    $bouton = button("{edit_member}", $editjs, 18, 185);
    if ($users->cyrus_imapd_installed) {
        include_once dirname(__FILE__) . "/ressources/class.cyrus.inc";
        $cyr = new cyrus();
        $RealMailBox = $cyr->IfMailBoxExists($_GET["uid"]);
        $button2 = "<div style='margin-top:10px'>" . button("{mailbox}", "Loadjs('domain.edit.user.cyrus-mailbox.php?js=yes&uid={$_GET["uid"]}')", 18, 185) . "</div>";
        if (!$RealMailBox) {
            if (preg_match("#Authentication failed#i", $cyr->cyrus_infos)) {
                $error = "<p class=text-error>{authentication_failed_cyrus}</p>";
            } else {
                $error = "<p class=text-error>{user_no_mailbox} !!</p>";
                $button2 = "<div style='margin-top:10px'>" . button("{create_mailbox2}", "Loadjs('domains.edit.user.php?create-mailbox-wizard=yes&uid={$_GET["uid"]}&MailBoxMaxSize=0')", 18, 185) . "</div>";
            }
        }
    }
    $picture_link = "img/impersonate-photo.png";
    $html = "\n\t{$error}\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='width:190px;vertical-align:top'>\n\t\t<center style='margin-top:15px'>\n\t\t<img style='border-radius: 50% 50% 50% 50%;\n    \t\tbox-shadow: 0 0 5px silver;height: 180px;margin: 0 32px;width: 180px;' src='{$picture_link}'></a>\n    <center style='font-size: 24px;line-height: 1.2;word-wrap: break-word;margin-top:30px;margin-bottom:30px'>\n    {$title}</center>\n\n    {$bouton}{$button2}\n    </center>\t\n\t</td>\n\t\t<td style='width:80%;vertical-aglin:top'>\n\t\t\t<table style='width:100%'>\n\t\t\t\t\t</tr>\t\t\t\n\t\t\t\t<tr style='height:70px'>\n\t\t\t\t<td valign=middle style='font-size:26px' class=legend><div>{Contact_Information}:</div>\n\t\t\t\t<i style='font-size:16px'>{$description}</i></td>\n\t\t\t</tr>\n\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{member}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$ct->givenName} {$ct->sn}</strong></td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{account}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$ct->uid}</strong></td>\n\t\t\t</tr>\n\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{email}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$ct->mail}</strong></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{telephoneNumber}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$ct->telephoneNumber}</strong></td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td valign=middle style='font-size:18px' class=legend>{mobile}:</td>\n\t\t\t\t<td valign=middle style='font-size:18px'><strong>{$ct->mobile}</strong></td>\n\t\t\t</tr>\t\t\t\n\t\t\t\t<tr style='height:70px'>\n\t\t\t\t<td valign=middle style='font-size:26px' class=legend>" . count($GRPS) . " {groups}:</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td></td>\n\t\t\t\t<td><table style='width:100%'>" . @implode("", $XTRG) . "</table></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t</table>\n\t<p>&nbsp;</p>\n\t</div>\n\t\t\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:system.member.ldap.php

示例3: formatUser

function formatUser($hash)
{
    $html = "<table style='width:100%'>\n\t<tr>\n\t\t<td colspan=2>\n\t\t\t<span style='font-size:14px;font-weight:bold;text-transform:capitalize'>{$hash["displayname"][0]}</span>&nbsp;-&nbsp;\n\t\t\t<span style='font-size:10px;font-weight:bold;text-transform:capitalize'>{$hash["sn"][0]}&nbsp;{$hash["givenname"][0]}</span>\n\t\t\t\n\t\t\t<hr style='border:1px solid #FFF;margin:3px'>\n\t\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right'><span style='font-size:10px;font-weight:bold'>{$hash["title"][0]}</span>&nbsp;|&nbsp;{$hash["mail"][0]}&nbsp;|&nbsp;{$hash["telephonenumber"][0]}\n\t</table>\n\t\n\t";
    $js = MEMBER_JS($hash["uid"][0], 1);
    $html = RoundedLightGrey($html, $js, 1);
    $html = "<div style='margin:5px;padding-right:10px;padding-left:10px'>{$html}</div>";
    return $html;
}
开发者ID:brucewu16899,项目名称:artica,代码行数:8,代码来源:domains.find.user.php

示例4: local_users

function local_users()
{
    $stringtofind = $_GET["browser-users"];
    $ldap = new clladp();
    $page = CurrentPageName();
    $tpl = new templates();
    if ($_SESSION["ou"] != null) {
        $ou = $_SESSION["ou"];
    }
    $hash = $ldap->UserSearch($ou, $stringtofind);
    $YahooWin = "YahooWin5";
    if (isset($_GET["YahooWin"])) {
        $YahooWin = "YahooWin{$_GET["YahooWin"]}";
    }
    $html = "\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr>\n\t<th colspan=4>{members}</th>\n\t</tr>\n</thead>\n<tbody class='tbody'>";
    for ($i = 0; $i < $hash[0]["count"]; $i++) {
        $ligne = $hash[0][$i];
        $dn = $ligne["dn"];
        if (strpos($ligne["dn"], "dc=pureftpd,dc=organizations") > 0) {
            continue;
        }
        $uid = $ligne["uid"][0];
        if ($uid == null) {
            continue;
        }
        if ($uid == "squidinternalauth") {
            continue;
        }
        if ($array[$uid] != null) {
            continue;
        }
        if ($classtr == "oddRow") {
            $classtr = null;
        } else {
            $classtr = "oddRow";
        }
        $ct = new user($uid);
        $js = MEMBER_JS($uid, 1, 1);
        $img = imgtootltip("contact-48.png", "{view}", $js);
        $add = imgtootltip("plus-24.png", "{add}", "SelectMemberBrowser('{$uid}')");
        $html = $html . "\n\t\t\t<tr class={$classtr}>\n\t\t\t<td width=1%>{$img}</td>\n\t\t\t<td><strong style='font-size:14px'>{$ct->DisplayName}</td>\n\t\t\t<td width=1%>{$add}</td>\n\t\t\t</tr>\n\t\t\t";
    }
    $html = $html . "</tbody></table>\n\t<script>\t\n\t\tfunction SelectMemberBrowser(uid){\n\t\t\tdocument.getElementById('{$_GET["field"]}').value=uid;\n\t\t\t{$YahooWin}Hide();\n\t\t}\n\t</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:45,代码来源:user.browse.php

示例5: computer_list

function computer_list()
{
    if ($_GET["tofind"] == '*') {
        $_GET["tofind"] = null;
    }
    if ($_GET["tofind"] == null) {
        $tofind = "*";
    } else {
        $tofind = "*{$_GET["tofind"]}*";
    }
    $filter_search = "(&(objectClass=ArticaComputerInfos)(|(cn={$tofind})(ComputerIP={$tofind})(uid={$tofind}))(gecos=computer))";
    $ldap = new clladp();
    $attrs = array("uid", "ComputerIP", "ComputerOS");
    $dn = "{$ldap->suffix}";
    $hash = $ldap->Ldap_search($dn, $filter_search, $attrs);
    for ($i = 0; $i < $hash["count"]; $i++) {
        $realuid = $hash[$i]["uid"][0];
        $hash[$i]["uid"][0] = strtolower(str_replace('$', '', $hash[$i]["uid"][0]));
        $js = MEMBER_JS($realuid, 1);
        $finalHash[$hash[$i]["uid"][0]] = $hash[$i][strtolower("ComputerIP")][0];
    }
    return $finalHash;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:23,代码来源:smb.browse.php

示例6: computer_list

function computer_list()
{
    $tofindorg = $_POST["query"];
    $tpl = new templates();
    $_GET["tofind"] = $_POST["query"];
    $MyPage = CurrentPageName();
    if ($_GET["tofind"] == '*') {
        $_GET["tofind"] = null;
    }
    if ($_GET["tofind"] == null) {
        $tofind = "*";
    } else {
        $tofind = "*{$_GET["tofind"]}*";
    }
    $tofind = str_replace("**", "*", $tofind);
    $filter_search = "(&(objectClass=ArticaComputerInfos)(|(cn={$tofind})(ComputerIP={$tofind})(uid={$tofind}))(gecos=computer))";
    $ldap = new clladp();
    $attrs = array("uid", "ComputerIP", "ComputerOS", "ComputerMachineType", "ComputerMacAddress");
    $dn = "{$ldap->suffix}";
    $hash = $ldap->Ldap_search($dn, $filter_search, $attrs, $_POST["rp"]);
    if (IsPhysicalAddress($tofindorg)) {
        $tofind = strtolower($tofindorg);
        $tofind = str_replace('-', ":", $tofind);
        $patternMac = "(&(objectclass=posixAccount)(ComputerMacAddress={$tofind}))";
        $hash2 = $ldap->Ldap_search($dn, $patternMac, $attrs, $_POST["rp"]);
    }
    $spanStyle = "<span style='font-size:14px;font-weight:bold'>";
    $data['page'] = 1;
    $data['total'] = $hash["count"];
    $data['rows'] = array();
    $c = 0;
    $unknown = $tpl->_ENGINE_parse_body("{unknown}");
    for ($i = 0; $i < $hash["count"]; $i++) {
        $realuid = $hash[$i]["uid"][0];
        $hash[$i]["uid"][0] = str_replace('$', '', $hash[$i]["uid"][0]);
        $js = MEMBER_JS($realuid, 1);
        $Alreadyrealuid[$realuid] = true;
        if ($_GET["mode"] == "dansguardian-ip-group") {
            $js_add = "<td width=1%>" . imgtootltip('add-18.png', "{add_computer}", "AddComputerToDansGuardian('{$realuid}','{$_GET["value"]}')") . "</td>";
        }
        if ($_GET["mode"] == "selection") {
            $js = "{$_GET["callback"]}('{$realuid}');";
        }
        $ip = $hash[$i][strtolower("ComputerIP")][0];
        $os = $hash[$i][strtolower("ComputerOS")][0];
        $type = $hash[$i][strtolower("ComputerMachineType")][0];
        $name = $hash[$i]["uid"][0];
        if ($os == "Unknown") {
            if ($type != "Unknown") {
                $os = $type;
            }
        }
        $js = str_replace("javascript:", '', $js);
        $md5S = md5(serialize($hash[$i]));
        if (!preg_match("#^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\$#", $ip)) {
            $ip = gethostbyname($hash[$i]["uid"][0]);
            if (!preg_match("#^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\$#", $ip)) {
                $ip = $unknown;
            } else {
                $computer = new computers($realuid);
                $computer->update_ipaddr($ip);
            }
        }
        if ($os == "UnKnown") {
            $os = $unknown;
        }
        $c++;
        $delete = imgsimple("delete-24.png", null, "Loadjs('{$MyPage}?computer-delete-js=yes&uid={$realuid}&id={$md5S}')");
        $data['rows'][] = array('id' => $md5S, 'cell' => array("<img src='img/computer-32.png'>", "<a href='#' OnClick=\"javascript:{$js}\" style='font-size:14px;text-decoration:underline;font-weight:bold'>{$name}</a>", "{$spanStyle}{$ip}</span>", "{$spanStyle}{$os}</span>", $delete));
    }
    if (is_array($hash2)) {
        for ($i = 0; $i < $hash2["count"]; $i++) {
            $realuid = $hash2[$i]["uid"][0];
            if (isset($Alreadyrealuid[$realuid])) {
                continue;
            }
            $hash2[$i]["uid"][0] = str_replace('$', '', $hash2[$i]["uid"][0]);
            $js = MEMBER_JS($realuid, 1);
            $Alreadyrealuid[$realuid] = true;
            if ($_GET["mode"] == "dansguardian-ip-group") {
                $js_add = "<td width=1%>" . imgtootltip('add-18.png', "{add_computer}", "AddComputerToDansGuardian('{$realuid}','{$_GET["value"]}')") . "</td>";
            }
            if ($_GET["mode"] == "selection") {
                $js = "{$_GET["callback"]}('{$realuid}');";
            }
            $ip = $hash2[$i][strtolower("ComputerIP")][0];
            $os = $hash2[$i][strtolower("ComputerOS")][0];
            $type = $hash2[$i][strtolower("ComputerMachineType")][0];
            $name = $hash2[$i]["uid"][0];
            if (strlen($name) > 25) {
                $name = substr($name, 0, 23) . "...";
            }
            if ($os == "Unknown") {
                if ($type != "Unknown") {
                    $os = $type;
                }
            }
            if (strlen($os) > 20) {
                $os = texttooltip(substr($os, 0, 17) . '...', $os, null, null, 1);
            }
//.........这里部分代码省略.........
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:computer-browse.php

示例7: mailbox_items

function mailbox_items(){
	$tpl=new templates();
	$MyPage=CurrentPageName();
	$q=new mysql();
	
	$t=$_GET["t"];
	$search='%';
	$table="zarafauserss";
	$database="artica_events";
	$page=1;
	$ORDER="";
	
	$total=0;
	if($q->COUNT_ROWS($table,$database)==0){json_error_show("$table, no such table");}
	if(isset($_POST["sortname"])){if($_POST["sortname"]<>null){$ORDER="ORDER BY {$_POST["sortname"]} {$_POST["sortorder"]}";}}	
	if(isset($_POST['page'])) {$page = $_POST['page'];}
	

	if($_POST["query"]<>null){
		$_POST["query"]="*".$_POST["query"]."*";
		$_POST["query"]=str_replace("**", "*", $_POST["query"]);
		$_POST["query"]=str_replace("**", "*", $_POST["query"]);
		$_POST["query"]=str_replace("*", "%", $_POST["query"]);
		$search=$_POST["query"];
		$searchstring="AND (`{$_POST["qtype"]}` LIKE '$search')";
		$sql="SELECT COUNT(*) as TCOUNT FROM `$table` WHERE 1 $searchstring";
		$ligne=mysql_fetch_array($q->QUERY_SQL($sql,$database));
		$total = $ligne["TCOUNT"];
		
	}else{
		$sql="SELECT COUNT(*) as TCOUNT FROM `$table` WHERE 1";
		$ligne=mysql_fetch_array($q->QUERY_SQL($sql,$database));
		$total = $ligne["TCOUNT"];
	}
	
	if (isset($_POST['rp'])) {$rp = $_POST['rp'];}	
	

	
	$pageStart = ($page-1)*$rp;
	$limitSql = "LIMIT $pageStart, $rp";
	if($OnlyEnabled){$limitSql=null;}
	$sql="SELECT *  FROM `$table` WHERE 1 $searchstring $ORDER $limitSql";	
	writelogs($sql,__FUNCTION__,__FILE__,__LINE__);
	$results = $q->QUERY_SQL($sql,$database);
	if(!$q->ok){json_error_show("$q->mysql_error");}
	
	
	$data = array();
	$data['page'] = $page;
	$data['total'] = $total;
	$data['rows'] = array();

	
	while ($ligne = mysql_fetch_assoc($results)) {
		$uid=$ligne["uid"];
		$md5=$ligne["zmd5"];
		$color="black";
		$imglicense="22-key.png";
		if($ligne["license"]==0){$imglicense="ed_delete_grey.gif";}
		$js=MEMBER_JS($uid,1,1);
		$license=imgsimple($imglicense,"{delete}");
		$href="<a href=\"javascript:blur();\" OnClick=\"javascript:$js\" style='font-size:14px;text-decoration:underline'>";
		$span="<span style='font-size:14px'>";
		$ligne["storesize"]=FormatBytes($ligne["storesize"]/1024);
		$data['rows'][] = array(
		'id' => $md5,
		'cell' => array(
			$span.$href.$uid."</a></span>",
			$span.$href.$ligne["mail"]."</a></span>",
			$span.$href.$ligne["ou"]."</a></span>",
			$span.$license."</span>",
			$span.$href.$ligne["NONACTIVETYPE"]."</a></span>",
			$span.$ligne["storesize"]."</a></span>",
			)
		);
	}
	
	
echo json_encode($data);			
	
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:82,代码来源:zarafa.index.php

示例8: users_search_directory

function users_search_directory()
{
    $database = "artica_backup";
    $search = '%';
    $table = "squid_ssl";
    $page = 1;
    $FORCE_FILTER = "AND `type`='ssl-bump-wl'";
    $t = $_GET["t"];
    $dn = urldecode($_GET["dn"]);
    $sock = new sockets();
    if ($_POST["query"] != null) {
        $tofind = $_POST["query"];
    }
    if ($tofind == null) {
        $tofind = '*';
    } else {
        $tofind = "*{$tofind}*";
    }
    if (strpos($dn, ",") > 0) {
        $ou = $dn;
    }
    include_once dirname(__FILE__) . "/ressources/class.external.ad.inc";
    $ad = new external_ad_search();
    $hash = $ad->find_users($ou, $tofind, $_POST['rp']);
    $number = $hash["count"];
    if (!is_numeric($number)) {
        $number = 0;
    }
    $data = array();
    $data['page'] = 1;
    $data['total'] = $number;
    $data['rows'] = array();
    for ($i = 0; $i < $number; $i++) {
        $userARR = $hash[$i];
        $dn = null;
        $uid = $userARR["uid"][0];
        if (isset($userARR["samaccountname"][0])) {
            $uid = $userARR["samaccountname"][0];
        }
        if (isset($userARR["distinguishedname"][0])) {
            $dn = $userARR["distinguishedname"][0];
        }
        if ($uid == "squidinternalauth") {
            continue;
        }
        $js = MEMBER_JS($uid, 1, 1, $dn);
        if ($userARR["sn"][0] == null && $userARR["givenname"][0] == null) {
            $userARR["sn"][0] = $uid;
        }
        $sn = $userARR["sn"][0];
        $givenname = $userARR["givenname"][0];
        $title = $userARR["title"][0];
        $mail = $userARR["mail"][0];
        $telephonenumber = $userARR["telephonenumber"][0];
        if ($userARR["telephonenumber"][0] == null) {
            $userARR["telephonenumber"][0] = "&nbsp;";
        }
        if ($userARR["mail"][0] == null) {
            $userARR["mail"][0] = "&nbsp;";
        }
        $img = imgsimple("contact-24.png", null, $js);
        $href = "<a href=\"javascript:blur();\" OnClick=\"javascript:{$js}\" style='text-decoration:underline'>";
        $dele = "&nbsp;";
        $data['rows'][] = array('id' => $uid, 'cell' => array($img, "<span style='font-size:14px;color:{$color}'>{$href}{$userARR["sn"][0]} {$userARR["givenname"][0]}</a><div><i>{$userARR["title"][0]}</i></span>", "<span style='font-size:14px;color:{$color}'>{$userARR["telephonenumber"][0]}</span>", "<span style='font-size:14px;color:{$color}'>{$href}{$userARR["mail"][0]}</a></span>", $dele));
    }
    echo json_encode($data);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:67,代码来源:miniadm.members.browse.php

示例9: computer_list

function computer_list()
{
    if ($_GET["tofind"] == '*') {
        $_GET["tofind"] = null;
    }
    if ($_GET["tofind"] == null) {
        $tofind = "*";
    } else {
        $tofind = "*{$_GET["tofind"]}*";
    }
    $filter_search = "(&(objectClass=ArticaComputerInfos)(|(cn={$tofind})(ComputerIP={$tofind})(uid={$tofind}))(gecos=computer))";
    $ldap = new clladp();
    $attrs = array("uid", "ComputerIP", "ComputerOS", "ComputerMachineType");
    $dn = "{$ldap->suffix}";
    $hash = $ldap->Ldap_search($dn, $filter_search, $attrs, 20);
    $PowerDNS = "<td width=1%><h3>&nbsp;|&nbsp;</h3></td><td><h3>" . texttooltip('{APP_PDNS}', '{APP_PDNS_TEXT}', "javascript:Loadjs('pdns.php')") . "</h3></td>";
    if ($_GET["mode"] == "selection") {
        $PowerDNS = null;
    }
    $html = "\n\n<input type='hidden' id='mode' value='{$_GET["mode"]}' name='mode'>\n<input type='hidden' id='value' value='{$_GET["value"]}' name='value'>\n<input type='hidden' id='callback' value='{$_GET["callback"]}' name='callback'>\n<table style='width:100%'><tr>\n<td width=1% nowrap><H3>{$hash["count"]} {computers}</H3></td>{$PowerDNS}</tr></table>\n<table style='width:100%'>";
    for ($i = 0; $i < $hash["count"]; $i++) {
        $realuid = $hash[$i]["uid"][0];
        $hash[$i]["uid"][0] = str_replace('$', '', $hash[$i]["uid"][0]);
        $js = MEMBER_JS($realuid, 1);
        if ($_GET["mode"] == "dansguardian-ip-group") {
            $js_add = "<td width=1%>" . imgtootltip('add-18.gif', "{add_computer}", "AddComputerToDansGuardian('{$realuid}','{$_GET["value"]}')") . "</td>";
        }
        if ($_GET["mode"] == "selection") {
            $js = "{$_GET["callback"]}('{$realuid}');";
        }
        $roolover = CellRollOver($js);
        $ip = $hash[$i][strtolower("ComputerIP")][0];
        $os = $hash[$i][strtolower("ComputerOS")][0];
        $type = $hash[$i][strtolower("ComputerMachineType")][0];
        $name = $hash[$i]["uid"][0];
        if (strlen($name) > 25) {
            $name = substr($name, 0, 23) . "...";
        }
        if ($os == "Unknown") {
            if ($type != "Unknown") {
                $os = $type;
            }
        }
        if (strlen($os) > 20) {
            $os = texttooltip(substr($os, 0, 17) . '...', $os, null, null, 1);
        }
        if (strlen($ip) > 20) {
            $ip = texttooltip(substr($ip, 0, 17) . '...', $ip, null, null, 1);
        }
        $html = $html . "<tr>\n\t<td width=1% {$roolover}><img src='img/base.gif'></td>\n\t<td {$roolover} nowrap><strong>{$name}</strong></td>\n\t<td {$roolover}><strong>{$ip}</strong></td>\n\t<td {$roolover}><strong>{$os}</strong></td>\n\t{$js_add}\n\t</tr>\n\t";
    }
    $html = $html . "</table>";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:55,代码来源:computer-browse.php

示例10: showConfig

function showConfig()
{
    echo MEMBER_JS($_GET["userid"], 1, 1);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:4,代码来源:domains.computer.modifyname.php

示例11: notadmin_status

function notadmin_status()
{
    $curs = "OnMouseOver=\"this.style.cursor='pointer';\"\n\tOnMouseOut=\"this.style.cursor='auto'\"";
    include_once dirname(__FILE__) . "/ressources/class.user.inc";
    $users = new usersMenus();
    if (!$users->SQUID_INSTALLED) {
        $_SESSION["ACLS_PRIVILEGES"] = null;
    }
    $icon = "member-128.png";
    $ct = new user($_SESSION["uid"]);
    $squid_acls = null;
    if ($ct->AsActiveDirectoryMember) {
        include_once dirname(__FILE__) . "/ressources/class.external.ad.inc";
        $ad = new external_ad_search();
        $DN = $ad->GetDNFromUserid($_SESSION["uid"]);
        $groupsArray = $ad->GroupsOfMember($DN);
        $MyGroups = "\n\t\t\t<tr>\n\t\t\t<td style='font-size:30px;text-decoration:underline'\n\t\t\t\tOnClick=\"javascript:{$js}\" {$curs}>{$ct->mail}\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td style='font-size:18px;vertical-align:top'>{gidNumber} " . count($groupsArray) . " {groups2}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td style='font-size:18px;vertical-align:top'>{organization} <strong>{$ct->ou}</strong></td>\n\t\t</tr>\n\t\t";
    } else {
        $MEMBER_JS = "javascript:blur();";
        $OU_js = "javascript:blur();";
        $OU_decoration = "none";
        $OU_curs = null;
        if ($users->AllowChangeUserPassword) {
            $MEMBER_JS = MEMBER_JS($_SESSION["uid"]);
        }
        if (VerifyRights_ou()) {
            $OU_js = "javascript:Loadjs('domains.manage.org.index.php?js=yes&ou={$ct->ou}');";
            $OU_decoration = "underline";
            $OU_curs = $curs;
        }
        $MyGroups = "\n\t\t<tr>\n\t\t<td style='font-size:16px;text-decoration:underline'\n\t\tOnClick=\"{$MEMBER_JS}\" {$curs}>{myaccount}: {$ct->mail}\n\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td style='font-size:18px;vertical-align:top'>{my_organization} <strong OnClick=\"{$OU_js}\" {$curs} style='text-decoration:{$OU_decoration}'>{$ct->ou}</strong></td>\n\t\t</tr>\n\t\t";
    }
    if ($users->SQUID_INSTALLED) {
        if (!isset($_SESSION["ACLS_PRIVILEGES"])) {
            include_once dirname(__FILE__) . "/ressources/class.squid.acls.privileges.inc";
            $f = new squid_acls_privileges();
            $_SESSION["ACLS_PRIVILEGES"] = $f->build();
        }
        $squid_acls = $_SESSION["ACLS_PRIVILEGES"];
        if ($squid_acls != null) {
            $squid_acls = "<tr><td>{$squid_acls}</td></tr>";
        }
    }
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' style='width:128px'>\n\t<img src='img/{$icon}'>\n\t</td>\n\t<td style='width:99%'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td style='font-size:30px;vertical-align:top'>{$ct->DisplayName}</td>\n\t</tr>\n\t{$MyGroups}\n\t{$squid_acls}\n\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\n\t";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:47,代码来源:admin.dashboard.proxy.php

示例12: USERS_POPUP_LIST

function USERS_POPUP_LIST()
{
    $page = CurrentPageName();
    $sock = new sockets();
    $tpl = new templates();
    $ou = $_GET["ou"];
    $sql = "SELECT * FROM mbx_migr_users WHERE ou='{$ou}'";
    $q = new mysql();
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        echo "<H3>{$q->mysql_error}</h3>";
    }
    $html = "\n\t<center>\n\t<table style='margin:5px'>\n\t<tr>\n\t\t<td width=50%>" . button("{restart_task}", "RestartMembers('{$_GET["ou"]}')") . "</td>\n\t\t<td width=50%>" . button("{run_task}", "ReloadMembers()") . "</td>\n\t</tr>\n\t</table>\n\t<hr style='width:70%'>\n\t</center>\n\t\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr>\n\t<th>&nbsp;</th>\n\t<th>{member}</th>\n\t<th>{imap_server}</th>\n\t<th>{account}</th>\n\t<th>{terminated}</th>\n\t</tr>\n</thead>\n<tbody class='tbody'>";
    $over = "OnMouseOver=\";this.style.cursor='pointer';\" OnMouseOut=\";this.style.cursor='default';\"";
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        if ($classtr == "oddRow") {
            $classtr = null;
        } else {
            $classtr = "oddRow";
        }
        $PID = $ligne["PID"];
        $status = "<br><strong style='color:#7C7777;font-size:11px'><i>{stopped} PID:{$PID}</i></strong>";
        $showuser = MEMBER_JS($ligne["uid"], 1, 1);
        if ($ligne["imported"] == 0) {
            $imported = "danger24.png";
        } else {
            $imported = "ok24.png";
        }
        if ($sock->getFrameWork("cmd.php?ProcessExists=yes&PID={$PID}")) {
            $status = "<br><strong style='color:#d32d2d;font-size:11px'><i>{running} PID {$PID}</i></strong>";
        }
        $html = $html . "\n\t\t\t<tr class={$classtr}>\n\t\t\t<td width=1%>" . imgtootltip("user-32.png", $ligne["uid"], $showuser) . "</td>\n\t\t\t<td  width=99%><strong style='font-size:14px;text-decoration:underline' {$over} OnClick=\"javascript:MigrShowLogs('{$ligne["zmd5"]}')\">{$ligne["uid"]}</td>\n\t\t\t<td  width=99%><strong style='font-size:14px;' {$over} OnClick=\"javascript:MigrShowLogs('{$ligne["zmd5"]}')\">{$ligne["imap_server"]}{$status}</td>\n\t\t\t<td  width=99%><strong style='font-size:14px;' {$over} OnClick=\"javascript:MigrShowLogs('{$ligne["zmd5"]}')\">{$ligne["username"]}</td>\n\t\t\t<td align='center' width=1%><strong style='font-size:14px'><img src='img/{$imported}'></td>\n\t\t\t</tr>\n\t\t\t";
    }
    $html = $html . "</tbody></table>\n\t<div style='text-align:right;margin-top:8px'>" . imgtootltip("refresh-32.png", "{refresh}", "RefreshTab('main_config_migrmbx')") . "</div>\n\t\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:36,代码来源:domains.mailboxes.migration.php

示例13: search

function search()
{
    $t = $_GET["t"];
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $q = new mysql();
    $sock = new sockets();
    $search = '%';
    $table = "dhcpd_logs";
    $database = "artica_events";
    $page = 1;
    $FORCE_FILTER = "";
    if (isset($_POST["sortname"])) {
        if ($_POST["sortname"] != null) {
            $ORDER = "ORDER BY {$_POST["sortname"]} {$_POST["sortorder"]}";
        }
    }
    if (isset($_POST['page'])) {
        $page = $_POST['page'];
    }
    $searchstring = string_to_flexquery();
    if ($searchstring != null) {
        $sql = "SELECT COUNT(*) as TCOUNT FROM {$table} WHERE 1 {$FORCE_FILTER} {$searchstring}";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql, $database));
        $total = $ligne["TCOUNT"];
    } else {
        $sql = "SELECT COUNT(*) as TCOUNT FROM {$table} WHERE 1 {$FORCE_FILTER}";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql, $database));
        $total = $ligne["TCOUNT"];
    }
    if (isset($_POST['rp'])) {
        $rp = $_POST['rp'];
    }
    $pageStart = ($page - 1) * $rp;
    $limitSql = "LIMIT {$pageStart}, {$rp}";
    $sql = "SELECT *  FROM {$table} WHERE 1 {$searchstring} {$FORCE_FILTER} {$ORDER} {$limitSql}";
    writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
    $results = $q->QUERY_SQL($sql, $database);
    $data = array();
    $data['page'] = $page;
    $data['total'] = $total;
    $data['rows'] = array();
    if (!$q->ok) {
        json_error_show($q->mysql_error);
    }
    $computers = new computers();
    while ($ligne = mysql_fetch_assoc($results)) {
        $color = "black";
        $uid = null;
        $mac = null;
        $js = "zblur()";
        if (preg_match("#to\\s+([0-9a-z:]+)\\s+via#", $ligne["description"], $re)) {
            $mac = $re[1];
        }
        if (preg_match("#from\\s+([0-9a-z:]+)\\s+via#", $ligne["description"], $re)) {
            $mac = $re[1];
        }
        if ($mac != null) {
            $uid = $computers->ComputerIDFromMAC($mac);
            if ($uid != null) {
                $js = MEMBER_JS($uid, 1, 1);
                $uri = "<a href=\"javascript:blur();\" OnClick=\"{$js}\" style='font-size:14px;font-weight:bold;color:{$color};text-decoration:underline'>{$mac}</a>&nbsp;<span style='font-size:11px'>({$uid})</span>";
                $ligne["description"] = str_replace($mac, $uri, $ligne["description"]);
            }
        }
        $data['rows'][] = array('id' => "{$ID}", 'cell' => array("<span style='font-size:14px;color:{$color}'>{$urljs}{$ligne["zDate"]}</a></span>", "<span style='font-size:14px;color:{$color}'>{$ligne["description"]}</a></span>"));
    }
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:69,代码来源:dhcpd.events-sql.php

示例14: organization_users_find_member

function organization_users_find_member()
{
    $t = time();
    $html = "\n\t<div id='{$t}'></div>\n\t<script>\n\t\tLoadAjax('{$t}','domains.manage.org.findusers.php?ou={$ou}');\n\t</script>\n\t";
    echo $html;
    return;
    $keycached = "{$_GET["finduser"]}{$_GET["ou"]}";
    if (GET_CACHED(__FILE__, __FUNCTION__, $keycached)) {
        return true;
    }
    $sock = new sockets();
    $tofind = $_GET["finduser"];
    $tpl = new templates();
    $page = CurrentPageName();
    $EnableManageUsersTroughActiveDirectory = $sock->GET_INFO("EnableManageUsersTroughActiveDirectory");
    if (!is_numeric($EnableManageUsersTroughActiveDirectory)) {
        $EnableManageUsersTroughActiveDirectory = 0;
    }
    if (is_base64_encoded($_GET["ou"])) {
        $ou_encoded = $_GET["ou"];
        $ou = base64_decode($_GET["ou"]);
    } else {
        $ou = $_GET["ou"];
        $ou_encoded = base64_encode($_GET["ou"]);
    }
    writelogs("Find users {$tofind} in {$ou} (encoded={$_GET["ou"]}) EnableManageUsersTroughActiveDirectory:{$EnableManageUsersTroughActiveDirectory}", __FUNCTION__, __FILE__, __LINE__);
    if ($_SESSION["uid"] != -100) {
        $ou = $_SESSION["ou"];
    }
    if ($tofind == null) {
        $tofind = '*';
    } else {
        $tofind = "*{$tofind}*";
    }
    $filter = "(&(objectClass=userAccount)(|(cn={$tofind})(mail={$tofind})(displayName={$tofind})(uid={$tofind}) (givenname={$tofind})))";
    $attrs = array("displayName", "uid", "mail", "givenname", "telephoneNumber", "title", "sn", "mozillaSecondEmail", "employeeNumber", "sAMAccountName");
    if ($EnableManageUsersTroughActiveDirectory == 1) {
        $cc = new ldapAD();
        $hash = $cc->find_users($ou, $tofind);
    } else {
        $ldap = new clladp();
        $dn = "ou={$ou},dc=organizations,{$ldap->suffix}";
        $hash = $ldap->Ldap_search($dn, $filter, $attrs, 150);
    }
    $users = new user();
    $number = $hash["count"];
    if (!is_numeric($number)) {
        $number = 0;
    }
    $bg = "#FFFFFF";
    writelogs("Find users {$tofind} in ou {$ou} DN:\"{$dn}\" (encoded={$_GET["ou"]}) {$number} items", __FUNCTION__, __FILE__, __LINE__);
    $html = "\n\t\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t<div style='width:100%;height:560px;overflow:auto'>\t\n\t\t<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n\t\t<thead class='thead'>\n\t\t\t<tr>\n\t\t\t\t<th colspan=4>{$tofind}</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody class='tbody'>\n\t\t\t\t\n\t";
    $add_user_disabled = Paragraphe('folder-useradd-64-grey.png', '{create_user}', '{create_user_text}');
    $add_user = Paragraphe('folder-useradd-64.png', '{create_user}', '{create_user_text}', "javascript:Loadjs('domains.add.user.php?ou={$ou}')", null, 210, null, 0, true);
    $groups = Paragraphe('folder-group-64.png', '{manage_groups}', '{manage_groups_text}', "javascript:Loadjs('domains.edit.group.php?ou={$ou_encoded}&js=yes')", null, 210, 100, 0, true);
    $delete_all_users = Paragraphe('member-64-delete.png', '{delete_all_users}', '{delete_all_users_text}', "javascript:DeleteAllusers()", null, 210, 100, 0, true);
    if ($EnableManageUsersTroughActiveDirectory == 1) {
        $delete_all_users = Paragraphe('member-64-delete-grey.png', '{delete_all_users}', '{delete_all_users_text}', "", null, 210, 100, 0, true);
    }
    $usermenus = new usersMenus();
    if ($usermenus->ARTICA_META_ENABLED) {
        if ($sock->GET_INFO("AllowArticaMetaAddUsers") != 1) {
            $add_user = $add_user_disabled;
        }
    }
    if ($EnableManageUsersTroughActiveDirectory == 1) {
        $add_user = $add_user_disabled;
    }
    $delete_all_users_warn = $tpl->javascript_parse_text("{delete_all_users_warn}");
    for ($i = 0; $i < $number; $i++) {
        $userARR = $hash[$i];
        $uid = $userARR["uid"][0];
        if ($EnableManageUsersTroughActiveDirectory == 1) {
            $uid = $userARR["samaccountname"][0];
        }
        if ($uid == "squidinternalauth") {
            continue;
        }
        $js = MEMBER_JS($uid, 1, 1);
        if ($userARR["sn"][0] == null && $userARR["givenname"][0] == null) {
            $userARR["sn"][0] = $uid;
        }
        $sn = texttooltip($userARR["sn"][0], "{display}:{$uid}", $js, null, 0, "font-size:13px");
        $givenname = texttooltip($userARR["givenname"][0], "{display}:{$uid}", $js, null, 0, "font-size:13px");
        $title = texttooltip($userARR["title"][0], "{display}:{$uid}", $js, null, 0, "font-size:13px");
        $mail = texttooltip($userARR["mail"][0], "{display}:{$uid}", $js, null, 0, "font-size:13px");
        $telephonenumber = texttooltip($userARR["telephonenumber"][0], "{display}:{$uid}", $js, null, 0, "font-size:13px");
        if ($classtr == "oddRow") {
            $classtr = null;
        } else {
            $classtr = "oddRow";
        }
        $img = imgtootltip("contact-48.png", "{apply}", $js);
        if ($userARR["telephonenumber"][0] == null) {
            $userARR["telephonenumber"][0] = "&nbsp;";
        }
        if ($userARR["mail"][0] == null) {
            $userARR["mail"][0] = "&nbsp;";
        }
        $html = $html . "<tr class={$classtr}>\n\t\t\t\t\t\t<td width=1% style='font-size:12px'>{$img}</td>\n\t\t\t\t\t\t<td width=50% style='font-size:12px'>{$userARR["sn"][0]} {$userARR["givenname"][0]}<div><i>{$userARR["title"][0]}</i></div></td>\n\t\t\t\t\t\t<td width=1% style='font-size:12px'>{$userARR["telephonenumber"][0]}</td>\n\t\t\t\t\t\t<td width=50% style='font-size:12px' nowrap>{$userARR["mail"][0]}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\n\t\t";
//.........这里部分代码省略.........
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:domains.manage.org.index.php

示例15: finduser_list


//.........这里部分代码省略.........
            echo "<strong>Search results ->HASH2 NOT AN ARRAY</strong><br>\n";
        }
    }
    $count = count($hash);
    $data['total'] = $count;
    if ($count == 0) {
        json_error_show("no data", 1);
    }
    if ($GLOBALS["OUTPUT_DEBUG"]) {
        echo "<strong>Search results {$count} items</strong><br>\n";
    }
    if (is_array($hash)) {
        while (list($num, $ligne) = each($hash)) {
            if ($GLOBALS["OUTPUT_DEBUG"]) {
                echo "dn:{$ligne["dn"]}<br>";
            }
            if ($GLOBALS["OUTPUT_DEBUG"]) {
                echo "uid:{$ligne["uid"][0]}<br>";
            }
            if ($GLOBALS["OUTPUT_DEBUG"]) {
                echo "employeenumber:{$ligne["employeenumber"][0]}<br>";
            }
            if ($ligne["uid"][0] == null && $ligne["employeenumber"][0] == null) {
                if ($GLOBALS["OUTPUT_DEBUG"]) {
                    echo "null twice, aborting...<br>";
                }
                continue;
            }
            if ($ligne["uid"][0] == "squidinternalauth") {
                $count = $count - 1;
                continue;
            }
            if ($GLOBALS["OUTPUT_DEBUG"]) {
                echo "edit_config_user={$ligne["uid"][0]}<br>";
            }
            $edit_config_user = MEMBER_JS($ligne["uid"][0], 1, 0, $ligne["dn"]);
            if ($usermenu->AllowAddUsers == true) {
                $uri = $edit_config_user;
            } else {
                $uri = null;
            }
            if ($usermenu->AsOrgAdmin == true) {
                $uri = $edit_config_user;
            } else {
                $uri = null;
            }
            if ($usermenu->AsArticaAdministrator == true) {
                $uri = $edit_config_user;
            } else {
                $uri = null;
            }
            $displayname = trim($ligne["displayname"][0]);
            $givenname = $ligne["givenname"][0];
            $mail = $ligne["mail"][0];
            if ($displayname == null) {
                $displayname = $ligne["uid"][0];
            }
            if ($givenname == null) {
                $givenname = '{unknown}';
            }
            if ($mail == null) {
                $mail = '{unknown}';
            }
            if ($ligne["employeenumber"][0] != null) {
                $array["employeenumber"] = $ligne["employeenumber"][0];
                $user = new contacts($_SESSION["uid"], $ligne["employeenumber"][0]);
                $array["title"] = $user->displayName;
                $uri = "javascript:Loadjs('contact.php?employeeNumber={$ligne["employeenumber"][0]}')";
            } else {
                if ($ligne["uid"][0] != null) {
                    $array["title"] = $ligne["uid"][0];
                    $user = new user($ligne["uid"][0]);
                }
            }
            if (strlen($user->jpegPhoto) > 0) {
                $array["img"] = $user->img_identity;
            } else {
                $array["img"] = "img/contact-unknown-user.png";
            }
            writelogs("identity:{$user->img_identity} ", __FUNCTION__, __FILE__);
            $array["uri"] = $uri;
            $array["mail"] = $ligne["mail"][0];
            $array["phone"] = $ligne["telephonenumber"][0];
            $array["sn"] = $ligne["sn"][0];
            if (!$ldap->EnableManageUsersTroughActiveDirectory) {
                if ($displayname == null) {
                    $displayname = "{$givenname} {$ligne["sn"][0]}";
                }
            }
            $array["displayname"] = $displayname;
            $array["givenname"] = $givenname;
            $array["JS"] = $edit_config_user;
            $array["title"] = $ligne["title"][0];
            $array["ou"] = $user->ou;
            $array["uid"] = $ligne["uid"][0];
            $data['rows'][] = finduser_format($array);
        }
    }
    echo json_encode($data);
}
开发者ID:articatech,项目名称:artica,代码行数:101,代码来源:system.groups.search.php


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