本文整理汇总了PHP中usersMenus类的典型用法代码示例。如果您正苦于以下问题:PHP usersMenus类的具体用法?PHP usersMenus怎么用?PHP usersMenus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了usersMenus类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: postfix_status
function postfix_status()
{
$user = new usersMenus();
if (!$user->POSTFIX_INSTALLED) {
return null;
}
$user->LoadModulesEnabled();
$q = new mysql();
$fetchmail_count = 0;
if ($user->fetchmail_installed) {
BuildingExecRightStatus("Building fetchmail statistics...", 25);
$sql = "SELECT COUNT(ID) as tcount FROM `fetchmail_events` WHERE DATE_FORMAT(zDate,'%Y-%m-%d')=DATE_FORMAT( NOW( ) ,'%Y-%m-%d' )";
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_events'));
$fetchmail_count = $ligne["tcount"];
$sql = "SELECT SUM(size) as tcount FROM `fetchmail_events` WHERE DATE_FORMAT(zDate,'%Y-%m-%d')=DATE_FORMAT( NOW( ) ,'%Y-%m-%d' )";
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_events'));
$fetchmail_size = FormatBytes($ligne["tcount"] / 1024);
events("fetchmail_count={$fetchmail_count}, fetchmail_size={$fetchmail_size}");
} else {
events('Fetchmail is not installed');
}
BuildingExecRightStatus("Building storage statistics...", 30);
$sql = "SELECT COUNT( MessageID ) as tcount FROM storage WHERE DATE_FORMAT( zDate, '%Y-%m-%d' ) = DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) ";
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup'));
$backuped_mails = $ligne["tcount"];
BuildingExecRightStatus("Building quarantine statistics...", 35);
$sql = "SELECT COUNT( MessageID ) as tcount FROM quarantine WHERE DATE_FORMAT( zDate, '%Y-%m-%d' ) = DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) ";
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_backup'));
$quarantine_mails = $ligne["tcount"];
BuildingExecRightStatus("Building messages number statistics...", 40);
$sql = "SELECT COUNT(ID) as tcount FROM `smtp_logs` WHERE DATE_FORMAT( time_sended, '%Y-%m-%d' ) = DATE_FORMAT( NOW( ) , '%Y-%m-%d' )";
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_events'));
$flow_mails = $ligne["tcount"];
if ($user->cyrus_imapd_installed) {
BuildingExecRightStatus("Building imap/pop3 number statistics...", 45);
$sql = "SELECT COUNT(ID) as tcount FROM `mbx_con` WHERE DATE_FORMAT( zDate, '%Y-%m-%d' ) = DATE_FORMAT( NOW( ) , '%Y-%m-%d' )";
$ligne = @mysql_fetch_array($q->QUERY_SQL($sql, 'artica_events'));
$mbx_con = $ligne["tcount"];
$mbx_con = "<tr>\n\t\t\t<td class=legend nowrap>{mbx_con}:</td>\n\t\t\t<td style='font-size:12px;font-weight:bold'>{$mbx_con} {connections}</td>\n\t\t</tr>";
}
if ($fetchmail_count > 0) {
$fetchmail = "<tr>\n\t\t\t<td class=legend nowrap>{fetchmail_recup}:</td>\n\t\t\t<td style='font-size:12px;font-weight:bold'>{$fetchmail_count} {emails} ({$fetchmail_size})</td>\n\t\t</tr>";
}
$html = "\n\t<H5>Postfix: {today}</h5>\n\t<table class=table_form>\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{received_mails}:</td>\n\t\t\t<td style='font-size:12px;font-weight:bold'>{$flow_mails}</td>\n\t\t</tr>\n\t\t{$mbx_con}\t\n\t\t{$fetchmail}\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{backuped_mails}:</td>\n\t\t\t<td style='font-size:12px;font-weight:bold'>{$backuped_mails}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend nowrap>{quarantine_mails}:</td>\n\t\t\t<td style='font-size:12px;font-weight:bold'>{$quarantine_mails}</td>\n\t\t</tr>\n\t</table>\n\t\t\t\t\t\t\n\t\n\t";
if ($user->AMAVIS_INSTALLED) {
if ($user->EnableAmavisDaemon) {
BuildingExecRightStatus("Building Amavis statistics...", 50);
$ini = new Bs_IniHandler();
$sock = new sockets();
$ini->loadString($sock->getfile('amavisstatus'));
$status_amavis = DAEMON_STATUS_ROUND("AMAVISD", $ini, null);
$status_amavismilter = DAEMON_STATUS_ROUND("AMAVISD_MILTER", $ini, null);
$status = "<br>{$status_amavis}<br>{$status_amavismilter}";
}
}
$html = RoundedLightGrey($html) . $status . "<br>";
file_put_contents('/usr/share/artica-postfix/ressources/logs/status.postfix.flow.html', $html);
system('/bin/chmod 755 /usr/share/artica-postfix/ressources/logs/status.postfix.flow.html');
BuildingExecRightStatus("Building done...", 100);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:60,代码来源:exec.admin.smtp.flow.status.php
示例2: addressbook_front
function addressbook_front()
{
$server = $_SERVER['SERVER_NAME'];
$ldap = new clladp();
if (preg_match('#^(.+?):#', $server, $re)) {
$server = $re[1];
}
$usr = new usersMenus();
$usr->LoadModulesEnabled();
if ($usr->EnableNonEncryptedLdapSession == 1) {
$portadd = ",389";
}
$users = new user($_SESSION["uid"]);
$settings = "\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td colspan=2><H3>{your_parameters}</h3><p class=caption>{your_parameters_text}</p></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{hostname}:</td>\n\t\t\t<td style='font-size:13px'><strong><code>{$server}</code></strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend>{listen_port}:</td>\n\t\t\t<td style='font-size:13px'><strong><code>636{$portadd}</code></strong></td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td class=legend valign='top'>{base_dn}:</td>\n\t\t\t<td style='font-size:13px'><strong><code>ou={$users->cn},ou=People,dc={$users->ou},dc=NAB,{$ldap->suffix}</code></strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend nowrap valign='top'>{bind_dn}:</td>\n\t\t\t<td style='font-size:13px'><strong><code>{$users->dn}</code></strong></td>\n\t\t</tr>\t\t\t\t\t\t\n\t\t</table>\n\t\n\t\n\t\n\t";
$settings = RoundedLightWhite($settings);
$html = "<H1>{your_address_book}</H1>\n\t<p class=caption>{your_address_book_text}</p>\n\t{$settings}\n\t\n\t\n\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:19,代码来源:users.addressbook.index.php
示例3: checkprivs
function checkprivs()
{
$_POST["userid"] = trim($_POST["userid"]);
include "ressources/settings.inc";
$socks = new sockets();
if (strtolower($_POST["userid"]) == strtolower($_GLOBAL["ldap_admin"])) {
if ($_POST["password"] != $_GLOBAL["ldap_password"]) {
die("bad password");
}
$dans = new dansguardian_rules(null, 1);
$dans->Add_exceptionsitelist(1, $_POST["uri"]);
AddEvents("Manager", $_POST["uri"]);
$sock = new sockets();
$sock->getFrameWork("reload-dansguardian");
die("SUCCESS");
}
$ldap = new clladp();
writelogs('This is not Global admin, so test user...', __FUNCTION__, __FILE__);
$hash = $ldap->UserDatas($_POST["userid"]);
$userPassword = $hash["userPassword"];
if (trim($hash["uid"]) == null) {
writelogs('Unable to get user infos abort', __FUNCTION__, __FILE__);
die("Unknown user");
}
if (trim($_POST["password"]) == trim($userPassword)) {
$users = new usersMenus($ldap->_Get_privileges_userid($_POST["userid"]));
$priv_array = $users->_ParsePrivieleges($ldap->_Get_privileges_userid($_POST["userid"]));
$users->_TranslateRights($priv_array);
if ($users->AllowDansGuardianBanned) {
$dans = new dansguardian_rules(null, 1);
$dans->Add_exceptionsitelist(1, $_POST["uri"]);
$sock = new sockets();
AddEvents($_POST["userid"], $_POST["uri"]);
$sock->getFrameWork("cmd.php?reload-dansguardian");
die("SUCCESS");
}
} else {
die("BAD PASSWORD");
}
die("No privileges");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:41,代码来源:dansguardian.users.index.php
示例4: tabs
function tabs(){
if(!isset($_GET["main"])){$_GET["main"]="network";};
$hostname=$_GET["hostname"];
$ou=$_GET["ou"];
$users=new usersMenus();
$users->LoadModulesEnabled();
$tpl=new templates();
$filters_settings=$tpl->_ENGINE_parse_body('{filters_settings}');
if(strlen($filters_settings)>25){$filters_settings=texttooltip(substr($filters_settings,0,22).'...',$filters_settings,null,null,1);}
$page=CurrentPageName();
$array["status"]='{status}';
$array["transport"]='{transport_settings}';
$array["security"]='{security_settings}';
$array["filters"]=$filters_settings;
while (list ($num, $ligne) = each ($array) ){
$html[]=$tpl->_ENGINE_parse_body("<li><a href=\"$page?$num=yes&hostname=$hostname&ou=$ou\"><span>$ligne</span></a></li>\n");
}
echo "
<div id=main_multi_config_postfix style='width:100%;height:550px;overflow:auto'>
<ul>". implode("\n",$html)."</ul>
</div>
<script>
$(document).ready(function(){
$('#main_multi_config_postfix').tabs();
});
</script>";
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:39,代码来源:domains.postfix.multi.config.php
示例5: login
function login()
{
$tpl = new templates();
$ldap = new clladp();
$att = array("userPassword", "DisplayName");
$sr = @ldap_search($ldap->ldap_connection, "dc=organizations,{$ldap->suffix}", "(uid={$_POST["uid"]})", $att);
if (!$sr) {
echo $sr;
return $tpl->_ENGINE_parse_body('{unknown_user}');
}
$entry_id = ldap_first_entry($ldap->ldap_connection, $sr);
if (!$entry_id) {
writelogs("INFOS: bad value {$entry_id}: (' . {$entry_id} . ') find: (uid={$_POST["uid"]}) -> aborting function search engine doesn`t found the pattern", __LINE__, __FILE__);
return $tpl->_ENGINE_parse_body('{unknown_user}');
}
$attrs = ldap_get_attributes($ldap->ldap_connection, $entry_id);
$passw = $attrs["userPassword"][0];
$passw = md5($passw);
if (!$_GET["credentials"]) {
$_POST["password"] = md5($_POST["password"]);
}
if ($passw != $_POST["password"]) {
return $tpl->_ENGINE_parse_body('{bad_password}');
}
unset($_SESSION["MLDONKEY_{$_POST["uid"]}"]);
$_SESSION["NOM"] = $attrs["DisplayName"][0];
$privs = $ldap->_Get_privileges_userid($_POST["uid"]);
$_SESSION["privileges"]["ArticaGroupPrivileges"] = $privs;
$users = new usersMenus();
$uid_class = new user($_POST["uid"]);
$_SESSION["ou"] = $uid_class->ou;
$_SESSION["privs"] = $users->_ParsePrivieleges($privs);
if ($_SESSION["privs"]["ForceLanguageUsers"] != null) {
$_COOKIE["ArticaForceLanguageUsers"] = $_SESSION["privs"]["ForceLanguageUsers"];
} else {
unset($_COOKIE["ArticaForceLanguageUsers"]);
}
}
开发者ID:brucewu16899,项目名称:artica,代码行数:38,代码来源:logon.php
示例6: USER_FETCHMAIL
function USER_FETCHMAIL($uid)
{
include_once dirname(__FILE__) . '/ressources/class.fdm.inc';
$fdm = new fdm($uid);
$users = new usersMenus();
if (!$users->fdm_installed) {
$warning = "<strong>{fdm_not_installed}</strong>";
}
$users->LoadModulesEnabled();
if ($users->EnableFDMFetch != 1) {
$warning = $warning . "<br><strong>{fdm_not_enabled}</strong>";
}
if (!$users->fdm_cache) {
$warning = $warning . "<br><strong>{fdm_cache_not_exists}</strong>";
}
if (strlen($warning) > 0) {
$warning = RoundedLightYellow($warning);
}
$html = "\n\t<hr>\n\t<H3>{$uid}::{fetch_mails}</H3>{$warning}\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' style='vertical-align:top' style='vertical-align:top'><br><div id='fdm_list' style='width:450px'>" . USER_FETCHMAIL_LIST($uid) . "</div></td>\n\t<td valign='top' style='vertical-align:top' style='vertical-align:top' width=1%>\n\t\n\t<table style='width:100%'><tr>\n\t<td>" . imgtootltip('add-fetchmail-48.png', '{add_rule}', "fdm_addrule('{$uid}')") . "</td>\n\t<td>" . imgtootltip('48-logs.png', '{all_events}', "fdm_events('{$uid}')") . "</td>\n\t\n\t</tr>\n\t</table>\n\t\n\t";
$tpl = new templates();
return $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:22,代码来源:domains.edit.user.php
示例7: main_status_milter
function main_status_milter()
{
if ($_GET["hostname"] == null) {
$hostname = $users->hostname;
$_GET["hostname"] = $hostname;
} else {
$hostname = $_GET["hostname"];
}
$ini = new Bs_IniHandler();
$users = new usersMenus();
$users->LoadModulesEnabled();
$sock = new sockets();
if ($users->MimeDefangEnabled == 1) {
include_once 'ressources/class.mimedefang.inc';
$ini->loadString($sock->getfile('mimedefangstatus', $_GET["hostname"]));
$mime = new mimedefang();
if ($mime->ScriptConf_array["BUILD"]["ENABLE_SA"] == 1) {
$title = "{managed_by_mimedefang}";
$milter_status = DAEMON_STATUS_ROUND('MIMEDEFANG', $ini, $title);
} else {
$title = "{managed_by_mimedefang_not_enabled}";
$milter_status = DAEMON_STATUS_ROUND('MIMEDEFANG', $ini, $title);
}
} else {
$ini->loadString($sock->getfile('MILTER_SPAMASS_STATUS', $_GET["hostname"]));
$milter_status = DAEMON_STATUS_ROUND('SPAMASS_MILTER', $ini);
}
$tpl = new templates();
return $tpl->_ENGINE_parse_body($milter_status);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:30,代码来源:spamassassin.index.php
示例8: organization_management
function organization_management()
{
$ou = $_GET["ou"];
$ou_encoded = base64_encode($ou);
$ldap = new clladp();
$sock = new sockets();
if (trim($ou == null)) {
if (isset($_COOKIE["SwitchOrgTabsOu"])) {
$_GET["ou"] = $_COOKIE["SwitchOrgTabsOu"];
}
}
$usersmenus = new usersMenus();
$usersmenus->LoadModulesEnabled();
if ($usersmenus->AllowAddUsers or $usersmenus->AsOrgAdmin or $usersmenus->AsMessagingOrg) {
$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} ({$ou})", '{manage_groups_text}', "javascript:Loadjs('domains.edit.group.php?ou={$ou_encoded}&js=yes&popup=yes')", null, 210, 100, 0, true);
}
$find_members = Paragraphe('find-members-64.png', '{find_members}', '{find_members_text}', "javascript:Loadjs('domains.find.user.php?ou={$ou}')", null, 210, null, 0, true);
if ($usersmenus->AsArticaAdministrator) {
$delete = Paragraphe('64-cancel.png', "{delete_ou} {$ou}", '{delete_ou_text}', "javascript:Loadjs('domains.delete.org.php?ou={$ou}');", null, 210, 100, 0, true);
}
if ($usersmenus->AsOrgAdmin) {
$img = $ldap->get_organization_picture($ou, 64);
$ad_import = Paragraphe('folder-import-ad-64.png', '{ad_import}', '{ad_import_text}', "javascript:Loadjs('domains.ad.import.php?ou={$ou}')", null, 210, 0, 0, true);
$ldap_import = Paragraphe('database-restore-64.png', '{ldap_importation}', '{ldap_importation_text}', "javascript:Loadjs('domains.ldap.import.php?ou={$ou}')", null, 210, 0, 0, true);
$orgsettings = Paragraphe($img, '{ORG_SETTINGS}', '{ORG_SETTINGS_TEXT}', "javascript:Loadjs('domains.organization-settings.php?ou={$ou}')", null, 210, 0, 0, true);
$orgsduplicate = Paragraphe('org-duplicate-64.png', '{EXPORT_ORG}', '{duplicate_to_remote_server}', "javascript:Loadjs('domains.organization-settings.php?ou={$ou}&js-export=yes')", null, 210, 0, 0, true);
}
if (!isset($_GET["miniadm"])) {
if ($usersmenus->AsOrgAdmin or $usersmenus->AsMessagingOrg) {
$transport = Paragraphe('folder-transport-64.png', '{localdomains}', '{localdomains_text}', "javascript:Loadjs('domains.edit.domains.php?js=yes&ou={$ou}')", null, 210, null, 0, true);
if ($usersmenus->POSTFIX_INSTALLED) {
$sendmail = "<div style='float:left'>" . Buildicon64('DEF_ICO_SENDTOALL', 210, 100, "?ou={$ou}") . "</div>";
}
}
}
if ($usersmenus->ARTICA_META_ENABLED) {
if ($sock->GET_INFO("AllowArticaMetaAddUsers") != 1) {
$add_user = null;
}
}
if ($usersmenus->POSTFIX_INSTALLED) {
$transport = null;
}
if ($usersmenus->EnableManageUsersTroughActiveDirectory or $ldap->IsOUUnderActiveDirectory($ou)) {
$ad_import = Paragraphe('folder-import-ad-64-grey.png', '{ad_import}', '{ad_import_text}');
$orgsduplicate = Paragraphe('org-duplicate-64-grey.png', '{EXPORT_ORG}', '{duplicate_to_remote_server}');
$delete = Paragraphe('64-cancel-grey.png', '{delete_ou}', '{delete_ou_text}');
$add_user = Paragraphe('folder-useradd-64-grey.png', '{create_user}', '{create_user_text}');
$orgsettings = Paragraphe('64-org-settings-grey.png', '{ORG_SETTINGS}', '{ORG_SETTINGS_TEXT}');
$ldap_import = Paragraphe('database-restore-64-grey.png', '{ldap_importation}', '{ldap_importation_text}');
}
$tr[] = $add_user;
$tr[] = $groups;
$tr[] = $find_members;
$tr[] = $transport;
$tr[] = $ad_import;
$tr[] = $ldap_import;
$tr[] = $orgsettings;
$tr[] = $orgsduplicate;
$tr[] = $sendmail;
$tr[] = $delete;
$tables[] = "<table style='width:99%' class=form><tr>";
$t = 0;
while (list($key, $line) = each($tr)) {
$line = trim($line);
if ($line == null) {
continue;
}
$t = $t + 1;
$tables[] = "<td valign='top'>{$line}</td>";
if ($t == 3) {
$t = 0;
$tables[] = "</tr><tr>";
}
}
if ($t < 3) {
for ($i = 0; $i <= $t; $i++) {
$tables[] = "<td valign='top'> </td>";
}
}
$html = "<center><div style='width:700px'>" . implode("\n", $tables) . "</div></center>";
return $html;
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:84,代码来源:domains.manage.org.index.php
示例9: GROUP_SETTINGS_PAGE_CONTENT
function GROUP_SETTINGS_PAGE_CONTENT()
{
$ldap = new clladp();
$page = CurrentPageName();
$num = $_GET["LoadGroupSettings"];
$groupID = $num;
writelogs("Loading group {$num}", __FUNCTION__, __FILE__, __LINE__);
if (is_base64_encoded($_GET["ou"])) {
$_GET["ou"] = base64_decode($_GET["ou"]);
}
$ou_conn = $_GET["ou"];
if (!$ldap->EnableManageUsersTroughActiveDirectory) {
if (!is_numeric($num)) {
return null;
}
}
if (trim($num) == null) {
$num = 0;
}
if ($num == 0) {
if (isset($_GET["byGroupName"])) {
$num = $ldap->GroupIDFromName($_GET["ou"], $_GET["byGroupName"]);
writelogs("Numeric identifier=0, try to get numeric identifier by {$_GET["ou"]}/{$_GET["byGroupName"]}={$num}", __FUNCTION__, __FILE__, __LINE__);
if ($num == 0) {
return;
}
}
}
$group = new groups($num);
if (trim($_GET["ou"]) != null) {
if ($group->ou != $_GET["ou"]) {
$tpl = new templates();
$error = "<center style='border:2px solid red;padding:10px;margin:10px'><span style='font-size:13px;font-weight:bold;color:red'>Group: {$num}/{$_GET["ou"]}<br> {error_group_not_in_your_organization}</span></center>";
//echo $tpl->_ENGINE_parse_body($error);
writelogs("ERROR: group {$num} from organization \"{$group->ou}\" is different from requested organization \"{$_GET["ou"]}\"", __FUNCTION__, __FILE__);
return null;
}
}
$text_disbaled = "{ERROR_NO_PRIVILEGES_OR_PLUGIN_DISABLED}";
$user = new usersMenus();
$user->LoadModulesEnabled();
$sock = new sockets();
$SambaEnabled = $sock->GET_INFO("SambaEnabled");
if (!is_numeric($SambaEnabled)) {
$SambaEnabled = 1;
}
if ($SambaEnabled == 0) {
$user->SAMBA_INSTALLED = false;
}
$SAMBA_GROUP = Paragraphe('64-group-samba-grey.png', '{MK_SAMBA_GROUP}', $text_disbaled, '');
$mailing_list = Paragraphe('64-mailinglist-grey.png', "{mailing_list}", "{$text_disbaled}");
//$hash=$ldap->GroupDatas($num);
$members = count($group->members);
if ($user->POSTFIX_INSTALLED == true) {
$mailing_list_count = $group->CountMailingListes();
$js = "javascript:Loadjs('domains.edit.group.php?LoadMailingList-js={$_GET['ou']}')";
$mailing_list = Paragraphe('64-mailinglist.png', "({$mailing_list_count}) {mailing_list}", "{mailing_list_text}", "{$js}");
}
if ($user->DANSGUARDIAN_INSTALLED == true) {
$DANSGUARDIAN = Paragraphe('icon-chevallier-564.png', '{dansguardian_rules}', '{dansguardian_rules_text}', "javascript:DansGuardianRules({$num})");
//
}
$automount = Paragraphe('folder-64-automount.png', '{shared_folders}', '{shared_folders_text}', "javascript:Loadjs('SharedFolders.groups.php?gpid={$num}')");
if ($user->cyrus_imapd_installed) {
$sieve_auto = Paragraphe('64-learning.png', '{sieve_auto_script}', '{sieve_auto_script_text}', "javascript:Loadjs('{$page}?sieve-js={$num}')");
}
if ($user->SAMBA_INSTALLED) {
$COMPUTERS = Paragraphe('computers-64.png', '{computers}', '{computers_text}', "javascript:LoadComputerGroup({$num})");
$SAMBA_GROUP = Paragraphe('64-group-samba.png', '{MK_SAMBA_GROUP}', '{MK_SAMBA_GROUP_text}', "javascript:Change_group_settings({$num})");
$LOGON_SCRIPT = Paragraphe('script-64.png', '{LOGON_SCRIPT}', '{LOGON_SCRIPT_TEXT}', "javascript:Loadjs('domains.edit.group.login.script.php?gpid={$num}')");
}
if ($DANSGUARDIAN == null) {
$DANSGUARDIAN = Paragraphe('icon-chevallier-564-grey.png', '{dansguardian_rules}', $text_disbaled, '');
}
if ($automount == null) {
$automount = Paragraphe('folder-64-automount-grey.png', '{shared_folders}', $text_disbaled, '');
}
if ($COMPUTERS == null) {
$COMPUTERS = Paragraphe('computers-64-grey.png', '{computers}', $text_disbaled, '');
}
if (!$user->cyrus_imapd_installed) {
if ($user->SAMBA_INSTALLED) {
$sieve_auto = $LOGON_SCRIPT;
$LOGON_SCRIPT = null;
}
}
$RENAME_GROUP = Paragraphe('group_rename-64.png', '{GROUP_RENAME}', '{GROUP_RENAME_TEXT}', "javascript:Loadjs('domains.edit.group.rename.php?group-id={$num}&ou={$_GET["ou"]}')");
$OPTIONS_DEFAULT_PASSWORD = Paragraphe('64-key.png', '{group_default_password}', '{group_default_password_text}', "javascript:YahooWin('400','{$page}?default_password=yes&gpid={$num}')");
$PRIVILEGES = Paragraphe('members-priv-64.png', '{privileges}', '{privileges_text}', "javascript:GroupPrivileges({$num})");
$ou_encoded = base64_encode($_GET["ou"]);
$delete_group = imgtootltip("32-cancel.png", "{delete}::{$group->groupName}", "Loadjs('domains.delete.group.php?gpid={$num}')");
$quotaDisk = Paragraphe("rename-disk-64.png", '{disk_user_quota}', '{disk_group_quota_text}', "javascript:Loadjs('domains.edit.user.quota.php?uid=@{$group->group_id}&ou={$group->ou}&userid=@{$group->group_id}')", null, 210, 'font-size:12px;font-weight:bold');
$quotaDisk_disabled = Paragraphe("rename-disk-64-grey.png", '{disk_user_quota}', '{disk_group_quota_text}');
if (!$user->QUOTA_INSTALLED) {
$quotaDisk = $quotaDisk_disabled;
}
if ($user->EnableManageUsersTroughActiveDirectory) {
$SAMBA_GROUP = Paragraphe('64-group-samba-64.png', '{MK_SAMBA_GROUP}', '{MK_SAMBA_GROUP_text}');
$mailing_list = Paragraphe('64-mailinglist-grey.png', "({$mailing_list_count}) {mailing_list}", "{mailing_list_text}");
$automount = Paragraphe('folder-64-automount-grey.png', '{shared_folders}', '{shared_folders_text}');
//.........这里部分代码省略.........
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:domains.edit.group.php
示例10: page
function page()
{
$usersmenus = new usersMenus();
$usersmenus->LoadModulesEnabled();
$html = $html . "\n<table style='margin:0px;padding:0px;'>\n<tr>\n<td valign='top' style='margin:0px;padding:0px;'>{$awstats_mail}</td>\n<td valign='top' style='margin:0px;padding:0px;'>{$graph_defang}</td>\n<td valign='top' style='margin:0px;padding:0px;'>{$collectd}</td>\n<tr>\n<td valign='top' style='margin:0px;padding:0px;'>{$kas}</td>\n<td valign='top' style='margin:0px;padding:0px;'>{$mailspy}</td>\n<td valign='top' style='margin:0px;padding:0px;'>{$awstats_squid}</td>\n</tr>\n<tr>\n<td valign='top' style='margin:0px;padding:0px;'>{$bind}<td>\n<td valign='top' style='margin:0px;padding:0px;'></td>\n<td valign='top' style='margin:0px;padding:0px;'> </td>\n</tr>\n</table>\n";
$tpl = new template_users('{statistics}', $html);
echo $tpl->web_page;
}
开发者ID:brucewu16899,项目名称:artica,代码行数:8,代码来源:statistics.index.php
示例11: whitelist_global_list
function whitelist_global_list()
{
$tpl = new templates();
$users = new usersMenus();
$users->LoadModulesEnabled();
$q = new mysql();
$EnableAmavisDaemon = $users->EnableAmavisDaemon;
if (!$users->AMAVIS_INSTALLED) {
$EnableAmavisDaemon = 0;
}
if (!is_numeric($EnableAmavisDaemon)) {
$EnableAmavisDaemon = 0;
}
if ($EnableAmavisDaemon == 1) {
$amavis = new amavis();
$max_score = $amavis->main_array["BEHAVIORS"]["sa_tag2_level_deflt"];
}
$max_score_white_text = $tpl->javascript_parse_text("{max_score_white_text}\\n{score}:{$max_score}");
$search = '%';
$table = "postfix_global_whitelist";
$page = 1;
$FORCE_FILTER = "AND `hostname`='{$_GET["hostname"]}' ";
$total = 0;
$MyPage = CurrentPageName();
if (!$q->TestingConnection()) {
json_error_show("Connection to MySQL server failed");
}
if ($q->COUNT_ROWS($table, "artica_backup") == 0) {
json_error_show("{$table} empty");
}
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, "artica_backup"));
if (!$q->ok) {
json_error_show($q->mysql_error . " LINE:" . __LINE__);
}
$total = $ligne["TCOUNT"];
} else {
$sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE 1 {$FORCE_FILTER}";
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
if (!$q->ok) {
json_error_show($q->mysql_error . " LINE:" . __LINE__);
}
$total = $ligne["TCOUNT"];
}
if (isset($_POST['rp'])) {
$rp = $_POST['rp'];
}
$pageStart = ($page - 1) * $rp;
$limitSql = "LIMIT {$pageStart}, {$rp}";
$data = array();
$data['page'] = $page;
$data['total'] = $total;
$data['rows'] = array();
$sql = "SELECT * FROM `{$table}` WHERE 1 {$searchstring} {$FORCE_FILTER} {$ORDER} {$limitSql}";
$results = $q->QUERY_SQL($sql, "artica_backup");
if (!$q->ok) {
json_error_show($q->mysql_error . " LINE:" . __LINE__);
}
if (mysql_num_rows($results) == 0) {
json_error_show("no row");
}
$score = 0;
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
$allmxText = null;
$disable = Field_checkbox("enabled_{$ligne["ID"]}", 1, $ligne["enabled"], "GlobalWhiteDisable('{$ligne["ID"]}')");
$delete = imgsimple("delete-32.png", "{delete}", "GlobalWhiteDelete('{$ligne["ID"]}')");
$modifyScore = "<a href=\"javascript:blur();\" OnClick=\"javascript:GlobalScoreModify('{$ligne["ID"]}','{$score}');\" style='text-decoration:underline;font-weight:bold'>";
$allmx = unserialize($ligne["allmx"]);
if ($score == 0) {
$score = "{no}";
} else {
$score = "-{$ligne["score"]}";
}
$icon = "datasource-32.png";
if ($EnableAmavisDaemon == 0) {
$score = "{disabled}";
}
if (count($allmx) > 0) {
$allmxText = "<div style='font-size:11px'><i>" . @implode(", ", $allmx) . "</i></div>";
}
$data['rows'][] = array('id' => $ligne['ID'], 'cell' => array("<img src='img/{$icon}'>", "<span style='font-size:16px'><code>{$ligne["sender"]}</code></span>{$allmxText}", $tpl->_ENGINE_parse_body("<span style='font-size:14px'><strong style='font-size:14px' id='score_{$ligne["ID"]}'>{$modifyScore}{$score}</a></strong></span>"), "{$disable}", $delete));
}
echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:94,代码来源:whitelists.admin.php
示例12: fetch_index
function fetch_index()
{
$users = new usersMenus();
$tpl = new templates();
$page = CurrentPageName();
$fetchmail_rules_text = $tpl->_ENGINE_parse_body("{fetchmail_rules}");
$users->LoadModulesEnabled();
if ($users->EnableFetchmail == 0) {
echo fetch_popup_enable();
exit;
}
if ($_GET["md"] == null) {
$_GET["md"] = time();
}
$add_fetchmail = Paragraphe('add-fetchmail-64.png', '{add_new_fetchmail_rule}', '{fetchmail_explain}', "javascript:add_fetchmail_rules()", null);
$daemon_settings = Paragraphe('folder-tools2-64.png', '{daemon_settings}', '{daemon_settings_text}', "javascript:YahooWin('550','fetchmail.daemon.settings.php?ajax=yes','{fetchmail_daemon_settings}')");
//$rules=Paragraphe('fetchmail-rule-64.png','{fetchmail_rules}','{fetchmail_rules_text}',"javascript:YahooWin('600','fetchmail.daemon.rules.php?ajax=yes','$fetchmail_rules_text')");
//$logs=Paragraphe('64-logs.png','{events}','{events_text}',"javascript:s_PopUpScroll('fetchmail.index.php?events=true',800,600);");
$update = Paragraphe('64-recycle.png', '{update_now}', '{update_fetchmail_now}', "javascript:ReloadFetchMail();");
$apply = Paragraphe('user-config-download-64.png', '{apply_parameters}', '{compile_rules}', "javascript:Loadjs('fetchmail.compile.progress.php');");
$help = Paragraphe("help-64.png", "{help}", "{online_help}", "javascript:s_PopUpFull('http://www.mail-appliance.org/index.php?cID=126','1024','900');");
$fetchmailrc = Paragraphe('script-view-64.png', '{configuration_file}', '{display_generated_configuration_file}', "javascript:Loadjs('fetchmailrc.php')");
$html = "\n<table style='width:100%'>\n<tr>\n\t<td valign='top'>\n\t\t<div id='{$_GET["md"]}'></div>\n\t\t<div style='width:100%;text-align:right'>" . imgtootltip("refresh-24.png", "{refresh}", "LoadAjax('{$_GET["md"]}','{$page}?fetch_status=yes');") . "</div>\t\n\t</td>\n\t<td valign='top'>\n\n\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t\n\t\t<td valign='top'>{$update}</td>\n\t\t<td valign='top'>{$add_fetchmail}</td>\t\n\t\t\n\t</tr>\n\t<tr>\n\t\t\n\t\t<td valign='top'>{$apply}</td>\n\t\t<td valign='top'>{$fetchmailrc}</td>\t\n\t\t\n\t</tr>\n\t<tr>\n\t\t\n\t\t<td valign='top'>{$help}</td>\n\t\t<td valign='top'> </td>\t\n\t\t\n\t</tr>\t\n\t\n\t\n\t<tr>\n\t\t<td colspan=2><div class=text-info style='text-align:left;font-size:16px'>{fetchmail_about}</div></td>\n\t</tr>\n\t</table>\n\t\n\t</td>\n</tr>\n</table>\n\n<script>\n\t LoadAjax('{$_GET["md"]}','{$page}?fetch_status=yes');\n\t \nvar x_ReloadFetchMail= function (obj) {\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue)}\n\t}\n\nfunction ReloadFetchMail(){\n \t\tvar XHR = new XHRConnection();\n XHR.appendData('reload-fetchmail',1);\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_ReloadFetchMail);\n}\t \n\t \n</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:25,代码来源:fetchmail.index.php
示例13: security2
function security2()
{
$failedtext = "{ERROR_NO_PRIVILEGES_OR_PLUGIN_DISABLED}";
$page = CurrentPageName();
$users = new usersMenus();
$users->LoadModulesEnabled();
$tls = Buildicon64("DEF_ICO_POSTFIX_TLS");
//$security_rules=Paragraphe('folder-rules-64.png','{security_rules}','{security_rules_text}',"javascript:Loadjs('postfix.security.rules.php?js=yes')",null,210,null,0,true);
$messages_restriction = Paragraphe('folder-message-restriction.png', '{messages_restriction}', '{messages_restriction_text}', "javascript:Loadjs('postfix.messages.restriction.php?script=yes')", null, 210, null, 0, true);
$internet_deny = Paragraphe('64-internet-deny.png', '{INTERNET_DENY}', '{INTERNET_DENY_TEXT}', "javascript:Loadjs('postfix.internet.deny.php')", null, 210, 100, 0, true);
$ssl = Paragraphe('folder-64-routing-secure.png', '{SSL_ENABLE}', '{SSL_ENABLE_TEXT}', "javascript:Loadjs('postfix.master.cf.php?script=ssl');", null, 210, null, 0, true);
$ou_encoded = base64_encode("_Global");
//$extensions_block=Paragraphe("bg_forbiden-attachmt-64.png","{attachment_blocking}","{attachment_blocking_text}","javascript:Loadjs('domains.edit.attachblocking.ou.php?ou=$ou_encoded')",null,210,null,0,true);
$plugins_activate = Paragraphe('folder-lego.png', '{POSTFIX_BUNDLE}', '{POSTFIX_BUNDLE_TEXT}', "javascript:Loadjs('postfix.plugins.php?script=yes')", null, 210, 100, 0, true);
$postfixInstantIptables = Buildicon64("DEF_ICO_MAIL_IPABLES");
$backup = icon_backup();
$header_clean = Paragraphe("gomme-64.png", "{HIDE_CLIENT_MUA}", '{HIDE_CLIENT_MUA_TEXT}', "javascript:Loadjs('postfix.hide.headers.php')", null, 210, 100, 0, true);
$vipwatch = Paragraphe("vipwatch-64.png", "VIPTrack", '{VIPTrack_text}', "javascript:Loadjs('postfix.viptrack.php')", null, 210, 100, 0, true);
$tr[] = $backup;
$tr[] = $vipwatch;
$tr[] = $tls;
$tr[] = $messages_restriction;
$tr[] = $sasl;
$tr[] = $ssl;
$tr[] = $internet_deny;
$tr[] = $header_clean;
$table = CompileTr3($tr);
$html = "\n<center>\n<div style='width:700px'>{$table}</div></center>";
$tpl = new templates();
$datas = $tpl->_ENGINE_parse_body($html);
return $datas;
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:32,代码来源:postfix.index.php
示例14: main_pureftpd
function main_pureftpd()
{
//$status=pureftpd_status();
cookies_main();
$users = new usersMenus();
$tpl = new templates();
$users->LoadModulesEnabled();
$pure = Paragraphe('64-pureftpd-grey.png', '{APP_PUREFTPD}', '{feature_not_installed}', '');
$events = Paragraphe('64-spam-grey.png', '{events}', '{feature_not_installed}', '');
$apply = Paragraphe('system-64-grey.png', '{apply}', '{feature_not_installed}', '');
$purewho = Paragraphe('folder-rules2-64-info-grey.png', '{current_connections}', '{feature_not_installed}', '');
if ($users->PUREFTP_INSTALLED) {
$pure = Paragraphe('64-pureftpd.png', '{APP_PUREFTPD}', '{APP_PUREFTPD_TEXT}', "javascript:Loadjs('pureftp.index.php?js=yes')");
$events = Paragraphe('64-spam.png', '{events}', '{events_text}', "javascript:Loadjs('pureftp.events.php')");
$apply = Paragraphe('system-64.png', '{apply}', '{apply_config_pureftpd}', "javascript:ApplyConfig('pure-ftpd');");
$purewho = Paragraphe('folder-rules2-64-info.png', '{current_connections}', '{current_connections_text}', "javascript:Loadjs('pureftp.events.php?who=yes')");
}
$html = "{$tab}\n<table style='width:100%'>\n<tr>\n<td valign='top'>\n\n\t\t<table>\n\t\t\t<tr>\n\t\t\t<td valign='top' >{$pure}</td>\n\t\t\t<td valign='top' >{$events}</td>\n\t\t\t<td valign='top'>{$purewho}</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t<td valign='top' >{$apply}</td>\n\t\t\t<td valign='top' >{$status}</td>\n\t\t\t<td valign='top' > </td>\n\t\t\t</tr>\t\t\t\t\t\n\t\t</table>\n</td>\n<td valign='top' style='width:1%'>{$pureftp_error}\n</td>\n</tr>\n</table>";
return $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:20,代码来源:fileshares.index.php
示例15: build
function build()
{
$users = new usersMenus();
$sock = new sockets();
$unix = new unix();
$SystemLoadNotif = $sock->GET_INFO("SystemLoadNotif");
if (!is_numeric($SystemLoadNotif)) {
$SystemLoadNotif = 0;
}
$EnableSyslogDB = $sock->GET_INFO("EnableSyslogDB");
if (!is_numeric($EnableSyslogDB)) {
$EnableSyslogDB = 0;
}
$MySQLSyslogType = $sock->GET_INFO("MySQLSyslogType");
if (!is_numeric($MySQLSyslogType)) {
$MySQLSyslogType = 1;
}
$SquidPerformance = intval($sock->GET_INFO("SquidPerformance"));
$EnableIntelCeleron = intval(@file_get_contents("/etc/artica-postfix/settings/Daemons/EnableIntelCeleron"));
$python = $unix->find_program("python");
$nice = $unix->EXEC_NICE();
$ps = $unix->find_program("ps");
$sort = $unix->find_program("sort");
$head = $unix->find_program("head");
$echo = $unix->find_program("echo");
$date = $unix->find_program("date");
$mkdir = $unix->find_program("mkdir");
$php5 = $unix->LOCATE_PHP5_BIN();
$ZarafaDedicateMySQLServer = $sock->GET_INFO("ZarafaDedicateMySQLServer");
if (!is_numeric($ZarafaDedicateMySQLServer)) {
$ZarafaDedicateMySQLServer = 0;
}
build_progress_restart("{reconfiguring}", 22);
$ini = new Bs_IniHandler();
$ini->loadFile('/etc/artica-postfix/smtpnotif.conf');
if (!is_numeric($ini->_params["SMTP"]["EnableNotifs"])) {
$ini->_params["SMTP"]["EnableNotifs"] = 0;
}
if (!is_numeric($ini->_params["SMTP"]["tls_enabled"])) {
$ini->_params["SMTP"]["tls_enabled"] = 0;
}
$smtp_server = trim($ini->_params["SMTP"]['smtp_server_name']);
$smtp_server_port = $ini->_params["SMTP"]['smtp_server_port'];
$smtp_dest = $ini->_params["SMTP"]['smtp_dest'];
$smtp_sender = $ini->_params["SMTP"]['smtp_sender'];
$smtp_auth_user = $ini->_params["SMTP"]['smtp_auth_user'];
$smtp_auth_passwd = $ini->_params["SMTP"]['smtp_auth_passwd'];
$tls_enabled = $ini->_params["SMTP"]["tls_enabled"];
$recipientsZ = explode("\n", "/etc/artica-postfix/settings/Daemons/SmtpNotificationConfigCC");
$recipients = array();
while (list($index, $to) = each($recipientsZ)) {
if (trim($to) == null) {
continue;
}
$recipients[] = $to;
}
if ($smtp_server == null) {
$ini->_params["SMTP"]["EnableNotifs"] = 0;
}
if ($smtp_dest == null) {
if (count($recipients) == 0) {
$ini->_params["SMTP"]["EnableNotifs"] = 0;
}
}
if (!is_numeric($smtp_server_port)) {
$smtp_server_port = 25;
}
$EnableNotifs = $ini->_params["SMTP"]["EnableNotifs"];
$monit_not_on = 'instance,action';
$f[] = 'set daemon 60 with start delay 5';
$f[] = 'set idfile /var/run/monit/monit.id';
$cpunum = $unix->CPU_NUMBER();
$normal = $cpunum * 2 + 1;
$normal2 = $cpunum * 2;
$busy = $cpunum * 4;
build_progress_restart("{reconfiguring}", 23);
$EnableMONITSmtpNotif = $sock->GET_INFO("EnableMONITSmtpNotif");
if (!is_numeric($EnableMONITSmtpNotif)) {
$EnableMONITSmtpNotif = 1;
}
$MonitCPUUsage = intval($sock->GET_INFO("MonitCPUUsage"));
$MonitCPUUsageCycles = intval($sock->GET_INFO("MonitCPUUsageCycles"));
$MonitMemUsage = intval($sock->GET_INFO("MonitMemUsage"));
$MonitMemUsageCycles = intval($sock->GET_INFO("MonitMemUsageCycles"));
$MonitReportLoadVG1mn = intval($sock->GET_INFO("MonitReportLoadVG1mn"));
$MonitReportLoadVG1mnCycles = intval($sock->GET_INFO("MonitReportLoadVG1mnCycles"));
if ($MonitReportLoadVG1mnCycles == 0) {
$MonitReportLoadVG1mnCycles = 5;
}
$Mon
|
请发表评论