本文整理汇总了PHP中clladp类的典型用法代码示例。如果您正苦于以下问题:PHP clladp类的具体用法?PHP clladp怎么用?PHP clladp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了clladp类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: WhiteListSender
function WhiteListSender()
{
$sql = "SELECT mail_from,mail_to from messages WHERE zMD5=\"{$_GET["id"]}\"";
$result = QUERY_SQL($sql);
$ligne = @sqlite3_fetch_array(QUERY_SQL($sql));
$mail_from = $ligne["mail_from"];
if ($mail_from == null) {
SinglePage(ParseLogs("ERROR\n"));
exit;
}
$ldap = new clladp();
$upd["KasperkyASDatasAllow"] = $mail_from;
$uid = $ldap->uid_from_email($ligne["mail_to"]);
if ($uid == null) {
SinglePage(ParseLogs("ERROR\n"));
exit;
}
$hash = $ldap->UserDatas($uid);
$dn = $hash["dn"];
if (!$ldap->Ldap_add_mod($dn, $upd)) {
$error = $ldap->ldap_last_error . "\n";
}
$sock = new sockets();
$error = $error . $sock->getfile('releaseallmailfrommd5:' . $_GET["id"]);
SinglePage(ParseLogs($error));
}
开发者ID:brucewu16899,项目名称:artica,代码行数:26,代码来源:cmd.quarantine.php
示例2: find_member
function find_member()
{
$tofind = $_GET["find-member"];
if ($_SESSION["uid"] == -100) {
$ou = $_GET["ou"];
} else {
$ou = $_SESSION["ou"];
}
$ldap = new clladp();
if (is_base64_encoded($ou)) {
$ou = base64_decode($ou);
}
if ($tofind == null) {
$tofind = '*';
} else {
$tofind = "*{$tofind}*";
}
$tofind = str_replace('***', '*', $tofind);
writelogs("FIND {$tofind} IN OU \"{$ou}\"", __FUNCTION__, __FILE__, __LINE__);
$filter = "(&(objectClass=userAccount)(|(cn={$tofind})(mail={$tofind})(displayName={$tofind})(uid={$tofind}) (givenname={$tofind}) ))";
$attrs = array("displayName", "uid", "mail", "givenname", "telephoneNumber", "title", "sn", "mozillaSecondEmail", "employeeNumber");
$dn = "ou={$ou},dc=organizations,{$ldap->suffix}";
$hash = $ldap->Ldap_search($dn, $filter, $attrs, 20);
$users = new user();
$number = $hash["count"];
for ($i = 0; $i < $number; $i++) {
$user = $hash[$i];
$html = $html . formatUser($user);
}
return $html;
}
开发者ID:brucewu16899,项目名称:artica,代码行数:31,代码来源:domains.find.user.php
示例3: SaveCyrusPassword
function SaveCyrusPassword()
{
$ldap = new clladp();
$_POST["SaveCyrusPassword"] = url_decode_special_tool(trim($_POST["SaveCyrusPassword"]));
if ($_POST["SaveCyrusPassword"] == null) {
echo "Error: No password defined\n";
return;
}
if (strpos($_POST["SaveCyrusPassword"], '@') > 0) {
echo "@,: denied character\n";
return;
}
if (strpos($_POST["SaveCyrusPassword"], ':') > 0) {
echo "@,: denied character\n";
return;
}
$attrs["userPassword"][0] = $_POST["SaveCyrusPassword"];
$dn = "cn=cyrus,dc=organizations,{$ldap->suffix}";
if ($ldap->ExistsDN($dn)) {
if (!$ldap->Ldap_modify($dn, $attrs)) {
echo $ldap->ldap_last_error;
return;
}
}
$dn = "cn=cyrus,{$ldap->suffix}";
if ($ldap->ExistsDN($dn)) {
if (!$ldap->Ldap_modify($dn, $attrs)) {
echo $ldap->ldap_last_error;
return;
}
}
$sock = new sockets();
$sock->getFrameWork("cmd.php?cyrus-change-password=" . base64_encode($_POST["SaveCyrusPassword"]));
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:34,代码来源:cyrus.password.php
示例4: save
function save()
{
$email = $_GET["postmaster"];
$ldap = new clladp();
$users = new usersMenus();
$mustcheck = false;
if ($users->cyrus_imapd_installed) {
$mustcheck = true;
}
if ($users->ZARAFA_INSTALLED) {
$mustcheck = true;
}
if ($mustcheck) {
$ldap = new clladp();
$uid = $ldap->uid_from_email($email);
if ($uid == null) {
$tpl = new templates();
echo $tpl->javascript_parse_text("\n{$email}\n{mailbox_does_not_exists}");
return;
}
}
$sock = new sockets();
$sock->SET_INFO("PostfixPostmaster", $email);
$sock->getFrameWork("cmd.php?postfix-hash-aliases=yes");
$sock->getFrameWork("cmd.php?postmaster-cron=yes");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:26,代码来源:postfix.postmaster.php
示例5: search_user
function search_user()
{
header("Pragma: no-cache");
header("Expires: 0");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
$stringtofind = $_GET["search_user"];
$tpl = new templates();
$usermenu = new usersMenus();
$ldap = new clladp();
if ($usermenu->AsAnAdministratorGeneric == true) {
$hash_full = $ldap->UserSearch(null, $stringtofind);
} else {
$us = $ldap->UserDatas($_SESSION["uid"]);
$hash_full = $ldap->UserSearch($us["ou"], $stringtofind);
}
$html = "<table style='width:100%'>";
for ($i = 0; $i < $hash_full[0]["count"]; $i++) {
$displayname = $hash_full[0][$i]["displayname"][0];
$mail = $hash_full[0][$i]["mail"][0];
if (strlen($mail) > 27) {
$mail = substr($mail, 0, 24) . '...';
}
$uid = $hash_full[0][$i]["uid"][0];
$js = "RestoreMbxSelectedUser('{$uid}');";
$html = $html . "<tr " . CellRollOver($js) . ">\n\t\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t\t<td><code nowrap>{$displayname}</code></td>\n\t\t\t<td><code>{$mail}</code></td>\n\t\t</tr>\n\t\t\t\n\t\t";
}
$html = $html . "</table>";
echo $html;
}
开发者ID:brucewu16899,项目名称:artica,代码行数:30,代码来源:dar.restorembx.php
示例6: formulaire
function formulaire()
{
$users = new usersMenus();
$ldap = new clladp();
$tpl = new templates();
$page = CurrentPageName();
if ($users->AsAnAdministratorGeneric) {
$hash = $ldap->hash_get_ou(false);
} else {
$hash = $ldap->Hash_Get_ou_from_users($_SESSION["uid"], 1);
}
if (count($hash) == 1) {
$org = $hash[0];
$hash_groups = $ldap->hash_groups($org, 1);
$hash_domains = $ldap->hash_get_domains_ou($org);
$groups = Field_array_Hash($hash_groups, 'groupid');
$domains = Field_array_Hash($hash_domains, 'domain');
}
$artica = new artica_general();
$EnableVirtualDomainsInMailBoxes = $artica->EnableVirtualDomainsInMailBoxes;
while (list($num, $ligne) = each($hash)) {
$ous[$ligne] = $ligne;
}
$ou = Field_array_Hash($ous, 'organization', null, "ChangeFormValues()");
$form = "\n\t\n\t<input type='hidden' id='EnableVirtualDomainsInMailBoxes' value='{$EnableVirtualDomainsInMailBoxes}'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend>{organization}:</td>\n\t\t\t<td>{$ou}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{group}:</td>\n\t\t\t<td><span id='select_groups'>{$groups}</span>\n\t\t</tr>\n\t\t<tr>\n\t\t<tr>\n\t\t\t<td class=legend>{firstname}:</td>\n\t\t\t<td>" . Field_text('firstname', null, 'width:120px', null, 'ChangeFormValues()') . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td class=legend>{lastname}:</td>\n\t\t\t<td>" . Field_text('lastname', null, 'width:120px', null, "ChangeFormValues()") . "</td>\n\t\t</tr>\t\t\n\t\t\t\n\t\t<tr>\n\t\t\t<td class=legend>{email}:</td>\n\t\t\t<td>" . Field_text('email', null, 'width:120px', null, "ChangeFormValues()") . "@<span id='select_domain'>{$domains}</span></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{login}:</td>\n\t\t\t<td>" . Field_text('login', null, 'width:120px') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{password}:</td>\n\t\t\t<td>" . Field_password('password') . "</td>\n\t\t</tr>\t\n\t\t<tr><td colspan=2><hr></td></tr>\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'>\n\t\t\t\t<input type='button' OnClick=\"javascript:SaveAddUser();\" value='{add} »'>\n\t\t\t</td>\n\t\t</tr>\n\t\t\n\t\t</table>\n\t";
$form = RoundedLightWhite($form);
$html = "<h1>{add_user}</H1>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=1%><div id='ffform'><img src='img/identity-add-96.png'></div></td>\n\t\t<td valign='top'>{$form}</div></td>\n\t</tr>\n\t</table>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:29,代码来源:create-user.php
示例7: export_to_zarafa
function export_to_zarafa($uid)
{
$f[] = "First Name,Middle Name,Last Name,Title,Suffix,Initials,Web Page,Gender,Birthday,Anniversary,Location,Language,Internet Free Busy,Notes,E-mail Address,E-mail 2 Address,E-mail 3 Address,Primary Phone,Home Phone,Home Phone 2,Mobile Phone,Pager,Home Fax,Home Address,Home Street,Home Street 2,Home Street 3,Home Address PO Box,Home City,Home State,Home Postal Code,Home Country,Spouse,Children,Manager's Name,Assistant's Name,Referred By,Company Main Phone,Business Phone,Business Phone 2,Business Fax,Assistant's Phone,Company,Job Title,Department,Office Location,Organizational ID Number,Profession,Account,Business Address,Business Street,Business Street 2,Business Street 3,Business Address PO Box,Business City,Business State,Business Postal Code,Business Country,Other Phone,Other Fax,Other Address,Other Street,Other Street 2,Other Street 3,Other Address PO Box,Other City,Other State,Other Postal Code,Other Country,Callback,Car Phone,ISDN,Radio Phone,TTY/TDD Phone,Telex,User 1,User 2,User 3,User 4,Keywords,Mileage,Hobby,Billing Information,Directory Server,Sensitivity,Priority,Private,Categories";
$ldap = new clladp();
$ct = new user($uid);
$dn = "ou={$uid},ou=People,dc={$ct->ou},dc=NAB,{$ldap->suffix}";
$filter = "(objectClass=inetOrgPerson)";
$attrs = array();
$hash = $ldap->Ldap_search($dn, $filter, array("employeeNumber"));
if ($GLOBALS["VERBOSE"]) {
echo "[{$uid}]: Exporting {$hash["count"]} user(s)\n";
}
for ($i = 0; $i < $hash["count"]; $i++) {
$emp = new contacts(null, $hash[$i]["employeenumber"][0]);
$f[] = @implode(",", $emp->ContactTocsvArray());
}
$tmpfile = "/tmp/{$uid}." . time() . ".csv";
@file_put_contents("{$tmpfile}", @implode("\n", $f));
$unix = new unix();
$php = $unix->LOCATE_PHP5_BIN();
$basename = basename($tmpfile);
$cmd = $php . " " . dirname(__FILE__) . "/exec.zarafa.csv2contacts.php {$uid} \"{$ct->password}\" {$basename} 2>&1";
if ($GLOBALS["VERBOSE"]) {
echo "[{$uid}]: {$cmd}\n";
}
exec($cmd, $results);
if ($GLOBALS["VERBOSE"]) {
while (list($num, $line) = each($results)) {
echo "[{$uid}]: {$line}\n";
}
}
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:32,代码来源:exec.zarafa.contacts-zarafa.php
示例8: save
function save()
{
$email = $_GET["luser_relay"];
$ldap = new clladp();
$users = new usersMenus();
$mustcheck = false;
if ($users->cyrus_imapd_installed) {
$mustcheck = true;
}
if ($users->ZARAFA_INSTALLED) {
$mustcheck = true;
}
if (preg_match("#^@(.+)#", $email, $re)) {
$mustcheck = false;
$email = null;
}
if ($mustcheck) {
$ldap = new clladp();
$uid = $ldap->uid_from_email($email);
if ($uid == null) {
$tpl = new templates();
echo $tpl->javascript_parse_text("\n{$email}\n{mailbox_does_not_exists}");
return;
}
}
$sock = new sockets();
$sock->SET_INFO("luser_relay", $email);
$sock->getFrameWork("cmd.php?postfix-luser-relay=yes");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:29,代码来源:postfix.luser_relay.php
示例9: FindComputerByIP
function FindComputerByIP()
{
if ($_GET["SelectDansGuardianExceptionipList"] == '*') {
$_GET["SelectDansGuardianExceptionipList"] = null;
}
if ($_GET["SelectDansGuardianExceptionipList"] == null) {
$tofind = "*";
} else {
$tofind = "{$_GET["SelectDansGuardianExceptionipList"]}*";
}
$filter_search = "(&(objectClass=ArticaComputerInfos)(|(cn={$tofind})(ComputerIP={$tofind})(uid={$tofind}))(gecos=computer))";
writelogs($filter_search, __FUNCTION__, __FILE__, __LINE__);
$ldap = new clladp();
$attrs = array("uid", "ComputerIP", "ComputerOS", "ComputerMachineType");
$dn = "{$ldap->suffix}";
$hash = $ldap->Ldap_search($dn, $filter_search, $attrs, 10);
$html = "<table style='width:250px' class=table_form>";
for ($i = 0; $i < $hash["count"]; $i++) {
$realuid = $hash[$i]["uid"][0];
$hash[$i]["uid"][0] = str_replace('$', '', $hash[$i]["uid"][0]);
$ip = $hash[$i][strtolower("ComputerIP")][0];
if (trim($ip) == null) {
continue;
}
$js = "AddDansGuardianExceptionipList('{$ip}');";
$html = $html . "<tr " . CellRollOver($js, "{add}") . ">\n\t\t<td width=1%><img src='img/base.gif'></td>\n\t\t<td nowrap><strong>{$hash[$i]["uid"][0]}</strong></td>\n\t\t<td ><strong>{$ip}</strong></td>\n\t</tr>\n\t";
}
$html = $html . "</table>";
$html = "<center><div style='height:300px;overflow:auto'>{$html}</div></center>";
$tpl = new templates();
return $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:32,代码来源:dansguardian.bannediplist.php
示例10: start_parse
function start_parse()
{
if ($GLOBALS["VERBOSE"]) {
"echo Loading...\n";
}
$unix = new unix();
if ($GLOBALS["VERBOSE"]) {
"echo Loading done...\n";
}
$pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
$timefile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".time";
$pid = @file_get_contents($pidfile);
if (!$GLOBALS["FORCE"]) {
if ($pid < 100) {
$pid = null;
}
$unix = new unix();
if ($unix->process_exists($pid, basename(__FILE__))) {
if ($GLOBALS["VERBOSE"]) {
echo "Already executed pid {$pid}\n";
}
return;
}
$timeexec = $unix->file_time_min($timefile);
if ($timeexec < 10) {
return;
}
$mypid = getmypid();
@file_put_contents($pidfile, $mypid);
}
@unlink($timefile);
@file_put_contents($timefile, time());
$ldap = new clladp();
if (!$ldap->IsKerbAuth()) {
return;
}
$q = new mysql_squid_builder();
$sql = "SELECT ID,GroupName FROM webfilters_sqgroups WHERE `enabled`=1 AND `GroupType`='proxy_auth_statad'";
$results = $q->QUERY_SQL($sql);
$REFRESH = false;
$Count = mysql_num_rows($results);
$UPDATED = array();
while ($ligne = mysql_fetch_assoc($results)) {
if (parse_object($ligne["ID"], $ligne["GroupName"])) {
$UPDATED[] = $ligne["GroupName"];
$REFRESH = true;
}
}
if ($REFRESH) {
squid_admin_mysql(1, "Reloading proxy service after updating " . count($UPDATED) . " Active Directory group(s)", @implode("\n", $UPDATED), __FILE__, __LINE__);
$squid = $unix->LOCATE_SQUID_BIN();
system("/etc/init.d/squid reload --force --script=exec.squid.static.ad.groups.php/" . __LINE__);
$sock = new sockets();
$EnableTransparent27 = intval($sock->GET_INFO("EnableTransparent27"));
if ($EnableTransparent27 == 1) {
system("/etc/init.d/squid-nat reload --script=" . basename(__FILE__));
}
}
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:59,代码来源:exec.squid.static.ad.groups.php
示例11: SingleGroup
function SingleGroup()
{
$ldap = new clladp();
$gid = $ldap->ArticaDefaultGroupGid();
$page = "\n{$select_group}\n<script type=\"text/javascript\" language=\"javascript\" src=\"js/users.kav.php.js\"></script>\n<div id='rightInfos'></div>\n<script>LoadKavTab(0,'{$gid}');</script>";
$tpl = new template_users('{antivirus_settings}', $page);
echo $tpl->web_page;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:8,代码来源:kav.group.rules.php
示例12: ORGANISTATION_FROM_USER
function ORGANISTATION_FROM_USER()
{
$ldap = new clladp();
$hash = $ldap->Hash_Get_ou_from_users($_SESSION["uid"], 1);
if (is_array($hash)) {
return $hash[0];
}
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:8,代码来源:domains.manage.org.cookie.php
示例13: popup_list
function popup_list()
{
$ou = base64_decode($_GET["ou"]);
$tpl = new templates();
$gpid = $_GET["gpid"];
if ($_POST["query"] != null) {
$tofind = $_POST["query"];
}
$groups = new groups($gpid);
$group_members = $groups->members_array;
$ldap = new clladp();
if ($tofind == null) {
$tofind = '*';
} else {
$tofind = "*{$tofind}*";
}
$tofind = str_replace("**", "*", $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");
$dn = "ou={$ou},dc=organizations,{$ldap->suffix}";
$hash = $ldap->Ldap_search($dn, $filter, $attrs, 150);
if (strlen(trim($ldap->ldap_last_error)) > 5) {
json_error_show("Error:" . $ldap->ldap_last_error);
}
$number = $hash["count"];
$data = array();
$data['page'] = 1;
$data['total'] = $number;
$data['rows'] = array();
$c = 0;
for ($i = 0; $i < $number; $i++) {
$exist = false;
$userARR = $hash[$i];
$uid = $userARR["uid"][0];
if ($uid == null) {
continue;
}
$md = md5($uid);
$c++;
if ($uid == "squidinternalauth") {
continue;
}
if ($group_members[$uid]) {
$exist = true;
}
$js = "add_already_member_add('" . base64_encode($uid) . "','{$md}');";
$mail = texttooltip($userARR["mail"][0], "{add}:{$uid}", $js, null, 0, "font-size:13px");
$color = "black";
$add = imgsimple("arrow-right-24.png", "{add}:{$uid}", $js);
if ($exist) {
$add = " ";
$color = "#8a8a8a";
}
$data['rows'][] = array('id' => "uidS{$md}", 'cell' => array("<span style='font-size:14px;color:{$color}'>{$uid}</span>", "<span style='font-size:14px;color:{$color}'>{$mail}</span>", "<span style='font-size:14px;color:{$color}'>{$add}</span>"));
}
echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:57,代码来源:domains.import.user.php
示例14: SaveSettings
function SaveSettings()
{
$ou = $_GET["ou"];
$upd["ArticaFakedMailFrom"][0] = $_GET["ArticaFakedMailFrom"];
$upd["ArticaDenyNoMXRecords"][0] = $_GET["ArticaDenyNoMXRecords"];
$upd["OuTrustMyUSers"][0] = $_GET["OuTrustMyUSers"];
$ldap = new clladp();
$dn = "ou={$ou},dc=organizations,{$ldap->suffix}";
$ldap->Ldap_modify($dn, $upd);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:10,代码来源:global-filters.ou.php
示例15: SyncOrg
function SyncOrg($ou)
{
$ldap = new clladp();
$hash = $ldap->UserSearch($ou, "");
for ($i = 0; $i < $hash["count"]; $i++) {
$uid = $hash[$i]["uid"][0];
write_syslog("Checking {$uid}", __FILE__);
$obm = new obm_user($uid);
}
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:10,代码来源:exec.obm.synchro.php
示例16: INDEX
function INDEX()
{
$ldap = new clladp();
$hash = $ldap->UserDatas($_SESSION["uid"]);
$mail = $hash["mail"];
$Graph = InsertChart('js/charts.swf', "js/charts_library", "listener.graphs.php?weekMessagesPerDay={$mail}", 250, 250, "FFFFFF", true, $usermenus->ChartLicence);
$html = $Graph;
$JS["JS"][] = "js/user.quarantine.js";
$tpl = new template_users('{messages_performance}', $html, 0, 0, 0, 0, $JS);
echo $tpl->web_page;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:11,代码来源:user.messages.statistics.php
示例17: export
function export($ou, $path)
{
@file_put_contents($pidfile, getmypid());
//if(strlen($GLOBALS["USER_QUERY"])>0){$filter="(uid={$GLOBALS["USER_QUERY"]})";}
$ldap = new clladp();
$pattern = "(&(objectclass=userAccount){$filter})";
$attr = array();
$sr = @ldap_search($ldap->ldap_connection, "ou={$ou},dc=organizations,{$ldap->suffix}", $pattern, $attr);
$hash = ldap_get_entries($ldap->ldap_connection, $sr);
$unix = new unix();
$gzip = $unix->find_program("gzip");
$users_array = array();
if (is_array($hash)) {
for ($i = 0; $i < $hash["count"]; $i++) {
$usersArray[] = $hash[$i]["uid"][0];
}
}
if (is_array($usersArray)) {
while (list($index, $uid) = each($usersArray)) {
echo "Parsing {$uid}\n";
$u = new user($uid);
$array_user = array();
foreach ($u as $key => $value) {
$array_user[$key] = $value;
}
$array_users_final[] = $array_user;
unset($array_user);
}
}
$groups = $ldap->hash_groups($ou, 1);
while (list($num, $line) = each($groups)) {
echo "Parsing group {$num} {$line}\n";
$u = new groups($num);
$array_group = array();
foreach ($u as $key => $value) {
$array_group[$key] = $value;
}
$array_group_final[] = $array_group;
unset($array_group);
}
$array_final["USERS"] = $array_users_final;
$array_final["GROUPS"] = $array_group_final;
$tempfile = $unix->FILE_TEMP();
$datas = base64_encode(serialize($array_final));
@file_put_contents($tempfile, $datas);
if (is_dir($path)) {
compress($tempfile, $path . "/{$ou}.gz");
echo "Saved in " . $path . "/{$ou}.gz\n";
@chmod($path . "/{$ou}.gz", 0755);
} else {
echo $path . " no such directory...\n";
}
@unlink($tempfile);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:54,代码来源:exec.export-users.php
示例18: page
function page()
{
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$ldap = new clladp();
$t = time();
$ImportAdSettings = unserialize($sock->GET_INFO("ZarafaImportADSettings"));
$OUS = $ldap->hash_get_ou(true);
$html = "\n\t<div style='font-size:30px;margin-bottom:20px'>{active_directory_importation}</div>\n\t<div style='font-size:22px' class=explain>{active_directory_importation_contacts_explain}</div>\n\t\n\t\n\t\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{organization}:</td>\n\t\t<td>" . Field_array_Hash($OUS, "ADOU", $ImportAdSettings["ADOU"], "style:font-size:22px;") . "</td>\n\t\t<td> </td>\n\t</tr>\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{activedirectory_server}:</td>\n\t\t<td>" . Field_text("ADSERVERNAME", $ImportAdSettings["ADSERVERNAME"], "font-size:22px;padding:3px;width:250px") . "</td>\n\t\t<td> </td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{suffix}:</td>\n\t\t<td>" . Field_text("LDAP_SUFFIX", $ImportAdSettings["LDAP_SUFFIX"], "font-size:22px;padding:3px;width:580px") . "</td>\n\t\t<td> </td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{username}:</td>\n\t\t<td>" . Field_text("WINDOWS_SERVER_ADMIN", $ImportAdSettings["WINDOWS_SERVER_ADMIN"], "font-size:22px;padding:3px;width:390px") . "</td>\n\t\t<td> </td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend style='font-size:22px'>{password}:</td>\n\t\t<td>" . Field_password("WINDOWS_SERVER_PASS", $ImportAdSettings["WINDOWS_SERVER_PASS"], "font-size:22px;padding:3px;width:390px") . "</td>\n\t\t<td> </td>\n\t</tr>\t\n\t\n\t<tr style='height:70px'>\n\t\t<td colspan=3 align='right'>" . button("{import_contacts}", "Save{$t}()", 30) . "</td>\n\t</tR>\n\t\n\t</table>\n\t</div>\n\t<script>\n\t\t\n\t\t\n\nvar xSave{$t}=function(obj){\n\tvar tempvalue=obj.responseText;\n if(tempvalue.length>5){alert(tempvalue);}\n Loadjs('zarafa.import-ad-contacts.progress.php');\n}\t\n\t\t\nfunction Save{$t}(){\n\tvar pp=encodeURIComponent(document.getElementById('WINDOWS_SERVER_PASS').value);\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ADOU',document.getElementById('ADOU').value);\n\tXHR.appendData('ADSERVERNAME',document.getElementById('ADSERVERNAME').value);\n\tXHR.appendData('WINDOWS_SERVER_ADMIN',document.getElementById('WINDOWS_SERVER_ADMIN').value);\n\tXHR.appendData('LDAP_SUFFIX',encodeURIComponent(document.getElementById('LDAP_SUFFIX').value));\n\t\n\tXHR.appendData('WINDOWS_SERVER_PASS',pp);\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>\n";
echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:12,代码来源:zarafa.import-ad-contacts.php
示例19: UserEmptyQuarantine
function UserEmptyQuarantine()
{
$ldap = new clladp();
include_once 'ressources/class.mysql.inc';
$hash = $ldap->UserDatas($_SESSION["uid"]);
$mail = $hash["mail"];
$sql = "UPDATE `messages` SET `Deleted` = '1' WHERE mail_to LIKE '%{$mail}%' AND `filter_action`='quarantine' AND Deleted='0'";
QUERY_SQL($sql);
include_once 'ressources/class.sockets.inc';
$sock = new sockets();
$sock->getfile('quarantine_delete_all:' . $_SESSION["uid"]);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:12,代码来源:user.quarantine.php
示例20: Confirm
function Confirm()
{
$ldap = new clladp();
$dn = base64_decode($_GET["dn"]);
if ($dn == null) {
echo "DN IS NULL";
return;
}
if (!$ldap->ldap_delete(base64_decode($_GET["dn"]))) {
echo $ldap->ldap_last_error;
}
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:12,代码来源:domains.delete.userdn.php
注:本文中的clladp类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论