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


PHP writelogs函数代码示例

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


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

示例1: apc_compile

function apc_compile()
{
    if (!function_exists('apc_compile_file')) {
        if (posix_getuid() == 0) {
            echo "Starting lighttpd............: Compiling engine no APC engine found\n";
        }
        return;
    }
    if (posix_getuid() == 0) {
        echo "Starting lighttpd............: Please wait, compiling engine to APC\n";
    }
    compile_files(dirname(__FILE__));
    compile_files(dirname(__FILE__) . '/ressources');
    compile_files(dirname(__FILE__) . '/framework');
    compile_files(dirname(__FILE__) . '/user-backup');
    compile_files(dirname(__FILE__) . '/user-backup/framework');
    compile_files(dirname(__FILE__) . '/user-backup/ressources');
    if (is_dir("/usr/share/roundcube")) {
        compile_files(dirname(__FILE__));
        compile_files("/usr/share/roundcube");
        compile_files("/usr/share/roundcube/bin");
        compile_files("/usr/share/roundcube/program");
        compile_files("/usr/share/roundcube/program/lib");
        compile_files("/usr/share/roundcube/program/lib/include");
    }
    if (posix_getuid() == 0) {
        echo "Starting lighttpd............: done: {$GLOBALS["COMPILED"]} APC files compiled\n";
    } else {
        writelogs("{$GLOBALS["COMPILED"]} APC files compiled", __FUNCTION__, __FILE__, __LINE__);
    }
}
开发者ID:brucewu16899,项目名称:artica,代码行数:31,代码来源:exec.apc.compile.php

示例2: save

function save()
{
    $sock = new sockets();
    if ($_POST["ID"] == 0) {
        $ligne = unserialize(base64_decode($sock->GET_INFO("DansGuardianDefaultMainRule")));
        $ligne["bypass"] = $_POST["bypass"];
        $ligne["BypassSecretKey"] = $_POST["BypassSecretKey"];
        writelogs("Default rule, saving DansGuardianDefaultMainRule", __FUNCTION__, __FILE__, __LINE__);
        $sock->SaveConfigFile(base64_encode(serialize($ligne)), "DansGuardianDefaultMainRule");
        writelogs("Ask to compile rule...", __FUNCTION__, __FILE__, __LINE__);
        $sock->getFrameWork("webfilter.php?compile-rules=yes");
        return;
    }
    $q = new mysql_squid_builder();
    $sql = "UPDATE webfilter_rules SET bypass='{$_POST["bypass"]}',BypassSecretKey='{$_POST["bypass"]}' WHERE ID='{$_POST["ID"]}'";
    $q->QUERY_SQL($sql);
    if (!$q->ok) {
        if (strpos($q->mysql_error, "Unknown column") > 0) {
            $q->CheckTables();
            $q->QUERY_SQL($sql);
        }
    }
    if (!$q->ok) {
        echo $q->mysql_error;
        return;
    }
    $sock->getFrameWork("webfilter.php?compile-rules=yes");
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:28,代码来源:dansguardian2.bypass.php

示例3: popup_list

function popup_list(){
	$dhcp=new dhcpd(0);
	writelogs(count($dhcp->routes)." routes in array",__FUNCTION__,__FILE__,__LINE__);
	if(!is_array($dhcp->routes)){
		writelogs(count($dhcp->routes)." -> return null",__FUNCTION__,__FILE__,__LINE__);
		return null;}
	$html="<table style='width:99%'>";
	$array=$dhcp->routes;
	while (list ($ip, $arr) = each ($array) ){
		$delete=imgtootltip("ed_delete.gif","{delete}","DHCPDeleteRoute('$ip')");
		$info=$arr[2];
		
		$html=$html. "
		<tr ". CellRollOver().">
		<td><strong>$ip</strong></td>
		<td><strong>{$arr[0]}</strong></td>
		<td width=1%><img src='img/fw_bold.gif'></td>
		<td><strong>{$arr[1]}</td>
		<td width=1% nowrap><strong>$info</strong></td>
		<td width=1%>$delete</td>
		
		</tr>
		";
	}
	
	$html=$html."</table>";
	$tpl=new templates();
	return $tpl->_ENGINE_parse_body($html);	
	
}
开发者ID:rsd,项目名称:artica-1.5,代码行数:30,代码来源:dhcpd-routes.php

示例4: ParseEvents

function ParseEvents()
{
    $path = "/var/log/artica-postfix/events";
    $f = new filesClasses();
    $hash = $f->DirListTable($path);
    if (!is_array($hash)) {
        return null;
    }
    echo date('Y-m-d h:i:s') . " " . count($hash) . " file(s) notifications...\n";
    $mysql = new mysql();
    while (list($num, $file) = each($hash)) {
        $text = null;
        $processname = null;
        $date = null;
        $context = null;
        $subject = null;
        $recipient = null;
        $bigtext = @file_get_contents($path . '/' . $file);
        echo date('Y-m-d h:i:s') . " Parsing {$file} " . strlen($bigtext) . " bytes text\n";
        $ini = new Bs_IniHandler();
        if (preg_match("#<text>(.+?)</text>#is", $bigtext, $re)) {
            $text = $re[1];
            if (strlen($text) > 0) {
                $bigtext = str_replace($re[0], '', $bigtext);
            }
        }
        if (preg_match("#<attachedfiles>(.+?)</attachedfiles>#is", $bigtext, $re)) {
            $files_text = addslashes($re[1]);
        }
        $ini->loadString($bigtext);
        $processname = $ini->_params["LOG"]["processname"];
        $date = $ini->_params["LOG"]["date"];
        $context = $ini->_params["LOG"]["context"];
        $context = addslashes($context);
        if (strlen($text) < 2) {
            $text = $ini->_params["LOG"]["text"];
        }
        $text = addslashes($text);
        $subject = $ini->_params["LOG"]["subject"];
        $recipient = $ini->_params["LOG"]["recipient"];
        $subject = addslashes($subject);
        echo date('Y-m-d h:i:s') . " Parsing subject {$subject} " . strlen($text) . " bytes text\n";
        writelogs("New notification: {$subject} (" . strlen($text) . " bytes)", __FUNCTION__, __FILE__, __LINE__);
        $sql = "INSERT INTO events (zDate,hostname,\n        \tprocess,text,context,content,attached_files,recipient) VALUES(\n        \t'{$date}',\n        \t'{$mysql->hostname}',\n        \t'{$processname}',\n        \t'{$subject}',\n        \t'{$context}','{$text}','{$files_text}','{$recipient}')";
        echo date('Y-m-d h:i:s') . " run mysql query\n";
        if ($mysql->QUERY_SQL($sql, 'artica_events')) {
            unlink($path . '/' . $file);
        } else {
            error_log("Mysql error keep {$path}/{$file};");
            error_log("{$mysql->mysql_error}");
            if (preg_match("#Unknown column#", $mysql->mysql_error)) {
                error_log("->BuildTables()");
                $mysql->BuildTables();
            }
        }
    }
    if (count($hash) > 0) {
        events(count($hash) . " events queue parsed...");
    }
}
开发者ID:brucewu16899,项目名称:artica,代码行数:60,代码来源:cron.notifs.php

示例5: 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

示例6: status

function status()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $script = null;
    if (is_file("ressources/logs/global.status.ini")) {
        $ini = new Bs_IniHandler("ressources/logs/global.status.ini");
    } else {
        writelogs("ressources/logs/global.status.ini no such file");
        $sock = new sockets();
        $datas = base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes'));
        $ini = new Bs_IniHandler($datas);
    }
    $sock = new sockets();
    $datas = $sock->getFrameWork('cmd.php?refresh-status=yes');
    $status = DAEMON_STATUS_ROUND("CLAMAV", $ini, null, 1);
    $q = new mysql();
    if ($q->TABLE_EXISTS("clamd_mem", "artica_events")) {
        if ($q->COUNT_ROWS("clamd_mem", "artica_events") > 1) {
            $script = "LoadAjax('clamd-graphs','{$page}?clamd-graphs=yes');";
        }
    }
    $html = "\n\t<div style='width:100%'>{$status}</div>\n\t<center style='margin-top:10px' id='clamd-graphs'></center>\n\t\n\t<script>\n\t\t{$script}\n\t</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:25,代码来源:clamd.php

示例7: IMPORT_MEMBERS

function IMPORT_MEMBERS()
{
    $me = $_SERVER["SERVER_NAME"];
    $error = array();
    $members = unserialize(base64_decode($_POST["MEMBERS"]));
    writelogs("Analyze " . count($members) . " members for ou " . $_POST["OU"], __FUNCTION__, __FILE__, __LINE__);
    while (list($uid, $array) = each($members)) {
        writelogs("Analyze {$uid} for ou " . $_POST["OU"], __FUNCTION__, __FILE__, __LINE__);
        $user = new user($uid);
        if ($user->UserExists) {
            $user->password = $array["password"];
            if ($user->add_user()) {
                $success[] = "{$me}::IMPORT_MEMBERS:: Success updating {$uid} in LDAP database";
            } else {
                $error[] = "Failed updating {$uid} in LDAP database\n {$user->ldap_error}";
            }
            continue;
        }
        while (list($key, $value) = each($array)) {
            $user->{$key} = $value;
        }
        if ($user->add_user()) {
            $success[] = "{$me}::IMPORT_MEMBERS:: Success adding {$uid} in LDAP database";
        } else {
            $error[] = "Failed adding {$uid} in LDAP database\n {$user->ldap_error}";
        }
    }
    if (count($error) > 0) {
        echo "<ERROR>" . @implode("\n", $error) . "</ERROR>";
    }
    if (count($success) > 0) {
        echo "<SUCCESS>" . @implode("\n", $success) . "</SUCCESS>";
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:34,代码来源:import.users.listener.php

示例8: start

function start()
{
    $unix = new unix();
    if (!$GLOBALS["VERBOSE"]) {
        $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
        $pid = @file_get_contents($pidfile);
        if ($unix->process_exists($pid)) {
            writelogs("Already running pid {$pid}", __FUNCTION__, __FILE__, __LINE__);
            return;
        }
    }
    $ldap = new clladp();
    $pattern = "(&(objectclass=userAccount))";
    $attr = array();
    $sr = @ldap_search($ldap->ldap_connection, "dc=organizations,{$ldap->suffix}", $pattern, $attr);
    $hash = ldap_get_entries($ldap->ldap_connection, $sr);
    $unix = new unix();
    $users_array = array();
    if (!is_array($hash)) {
        blackwhite_admin_mysql(0, "Unable to obtain users from LDAP server", $ldap->ldap_last_error, __FILE__, __LINE__);
        return;
    }
    for ($i = 0; $i < $hash["count"]; $i++) {
        $usersArray[$hash[$i]["uid"][0]] = true;
    }
    while (list($uid, $none) = each($usersArray)) {
        imapopen_White($uid);
        imapopen_black($uid);
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:30,代码来源:exec.imap.blacklists.php

示例9: 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

示例10: Launch

function Launch()
{
    $sock = new sockets();
    $cmd = "squid2.php?reload-progress=yes";
    writelogs("launch {$cmd}", __FUNCTION__, __FILE__, __LINE__);
    $sock->getFrameWork($cmd);
}
开发者ID:articatech,项目名称:artica,代码行数:7,代码来源:squid.reload.progress.php

示例11: routes_listes

function routes_listes()
{
    $tpl = new templates();
    $html = "<p class=text-error>{routes_goto_miniadm}</p>";
    echo $tpl->_ENGINE_parse_body($html);
    return;
    $page = CurrentPageName();
    $types[1] = "{network_nic}";
    $types[2] = "{host}";
    $ERROR_NO_PRIVS = $tpl->javascript_parse_text("{ERROR_NO_PRIVS}");
    $users = new usersMenus();
    if ($users->AsSystemAdministrator) {
        $AsNetworksAdministrator = 1;
    } else {
        $AsNetworksAdministrator = 0;
    }
    $html = "\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n<thead class='thead'>\n\t<tr>\n\t\t<th>{type}</th>\n\t\t<th>{nic}</th>\n\t\t<th>{pattern}</th>\n\t\t<th>{gateway}</th>\n\t\t<th>&nbsp;</th>\n\t</tr>\n</thead>\n<tbody class='tbody'>";
    $sql = "SELECT * FROM nic_routes ORDER BY `nic`";
    writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
    $q = new mysql();
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        echo "<H2>{$q->mysql_error}</H2>";
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        if ($classtr == "oddRow") {
            $classtr = null;
        } else {
            $classtr = "oddRow";
        }
        $html = $html . "\n\t\t<tr class={$classtr}>\n\t\t<td style='font-size:14px' nowrap>&nbsp;{$types[$ligne["type"]]}</td>\n\t\t<td style='font-size:14px' nowrap>&nbsp;{$ligne["nic"]}</td>\n\t\t<td style='font-size:14px' nowrap>&nbsp;{$ligne["pattern"]}</td>\n\t\t<td style='font-size:14px' nowrap>&nbsp;{$ligne["gateway"]}</td>\n\t\t<td>" . imgtootltip("delete-32.png", "{delete}", "DeleteRouteNicsList('{$ligne["zmd5"]}')") . "</td>\n\t\t</tr>\n\t\t";
    }
    echo $tpl->_ENGINE_parse_body($html . "</table>\n\t<script>\n\t\tvar x_DeleteRouteNicsList= function (obj) {\n\t\t\t\tvar results=obj.responseText;\n\t\t\t\tif(results.length>0){alert(results);return;}\n\t\t\t\tRefreshRoutes();\n\t\t\t}\t\t\n\t\n\t\n\t\tfunction DeleteRouteNicsList(md){\n\t\t\tvar AsNetworksAdministrator='{$AsNetworksAdministrator}';\n\t\t\tif(AsNetworksAdministrator!=='1'){alert('{$ERROR_NO_PRIVS}');return;}\t\t\t\t\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('del-route',md);\n\t\t\tXHR.sendAndLoad('{$page}', 'GET',x_DeleteRouteNicsList);\t\t\n\t\t\n\t\t}\n\t</script>\t\n\t");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:34,代码来源:system.nic.routes.php

示例12: config_popup

function config_popup()
{
    $vpn = new openvpn();
    $config = $vpn->BuildClientconf($_SESSION["uid"]);
    $tbconfig = explode("\n", $config);
    $html_logs[] = htmlentities("VPN config -> " . strlen($config) . " bytes length (" . count($tbconfig) . " lines)");
    $uid = $_SESSION["uid"];
    writelogs("VPN config -> " . strlen($config) . " bytes length (" . count($tbconfig) . " lines)", __FUNCTION__, __FILE__, __LINE__);
    $sock = new sockets();
    if (!$sock->SaveConfigFile($config, "{$uid}.ovpn")) {
        $html_logs[] = htmlentities("Framework error while saving  -> {$uid}.ovpn;" . strlen($config) . " bytes length (" . count($tbconfig) . " lines)");
    }
    writelogs("sockets() OK", __FUNCTION__, __FILE__, __LINE__);
    //$datas=$sock->getfile('OpenVPNGenerate:'.$uid);
    $datas = $sock->getFrameWork("openvpn.php?build-vpn-user={$_SESSION["uid"]}&basepath=" . dirname(__FILE__));
    $tbl = explode("\n", $datas);
    $tbl = array_reverse($tbl);
    while (list($num, $line) = each($tbl)) {
        if (trim($line) == null) {
            continue;
        }
        $html_logs[] = "<div><code style='font-size:10px;color:black;'>" . htmlentities($line) . "</code></div>";
    }
    if (is_file('ressources/logs/' . $uid . '.zip')) {
        $download = "\n\t\t<center>\n\t\t\t<a href='ressources/logs/" . $uid . ".zip'><img src='img/download-64.png' title=\"{DOWNLOAD_CONFIG_FILES}\" style='padding:8Px;border:1px solid #055447;margin:3px'></a>\n\t\t</center>\n\t\t";
    }
    $html = "\n\t\n\t{$download}\n\t<H3>{events}</H3>\n\t" . ParagrapheTXT("<div style='width:100%;height:200px;overflow:auto'>" . implode("\n", $html_logs) . "</div>");
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:30,代码来源:vpn.php

示例13: popup

function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    $q = new mysql();
    $sql = "SELECT * FROM officials_domains ORDER BY domain";
    writelogs("{$sql}", __FUNCTION__, __FILE__, __LINE__);
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        echo "<H2>{$q->mysql_error}</H2>";
    }
    while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
        $domains[$ligne["domain"]] = $ligne["domain"];
    }
    $OverWriteRestrictedDomains = 0;
    if ($users->OverWriteRestrictedDomains) {
        $OverWriteRestrictedDomains = 1;
    }
    if ($OverWriteRestrictedDomains == 1) {
        $over = "\n\t\t<hr>\n\t\t<div class=explain>{OverWriteRestrictedDomains_allow_text}</div>\n\t\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend>{domain}:</td>\n\t\t<td width=100%>" . Field_text("overwrite-domain", null, "font-size:16px;padding:3px;width:320px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{add}", "AddSubdomainOUOver()") . "</td>\n\t</tr>\n\t</table>\n\t\t";
    }
    $_GET["ou"] = urlencode($_GET["ou"]);
    $domains[null] = "{select}";
    $html = "\n\t<div id='add_subdomain_explain'></div>\n\t<div class=explain >{add_subdomain_explain}</div>\n\t\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend>{subdomain}:</td>\n\t\t<td width=50%>" . Field_text("subdomain", null, "font-size:16px;padding:3px;width:220px") . "</td>\n\t\t<td style='font-size:16px;padding:3px' width=1%><strong>.</strong></td>\n\t\t<td width=50%>" . Field_array_Hash($domains, "maindomain", null, "style:font-size:16px;padding:3px;") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=4 align='right'><hr>" . button("{add}", "AddSubdomainOU()") . "</td>\n\t</tr>\n\t</table>\n\t{$over}\n\t<script>\n\tvar x_AddSubdomainOU= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('subdomain').innerHTML='';\n\t\tif(results.length>3){alert(results);return;}\n\t\tYahooWin4Hide();\n\t\tLoadAjax('LocalDomainsList','domains.edit.domains.php?LocalDomainList=yes&ou={$_GET["ou"]}');\n\t}\t\t\n\t\t\n\t\tfunction AddSubdomainOU(){\n\t\t\tvar maindomain=document.getElementById('maindomain').value;\n\t\t\tvar subdomain=document.getElementById('subdomain').value;\n\t\t\tif(maindomain.length<3){return;}\n\t\t\tif(subdomain.length<3){return;}\n\t\t\tvar domain=subdomain+'.'+maindomain;\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('AddNewInternetDomain','{$_GET["ou"]}');\n\t\t\tXHR.appendData('AddNewInternetDomainDomainName',domain);\t\n\t\t\tAnimateDiv('add_subdomain_explain');\n\t\t\tXHR.sendAndLoad('domains.edit.domains.php', 'GET',x_AddSubdomainOU);\n\t\t\t\n\t\t}\n\t\t\n\t\tfunction AddSubdomainOUOver(){\n\t\t\tvar maindomain=document.getElementById('overwrite-domain').value;\n\t\t\tif(maindomain.length<3){return;}\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('AddNewInternetDomain','{$_GET["ou"]}');\n\t\t\tXHR.appendData('AddNewInternetDomainDomainName',maindomain);\t\n\t\t\tAnimateDiv('add_subdomain_explain');\n\t\t\tXHR.sendAndLoad('domains.edit.domains.php', 'GET',x_AddSubdomainOU);\t\t\t\n\t\t}\n\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:27,代码来源:domains.add.localdomain.restricted.php

示例14: getlist

function getlist()
{
    $sock = new sockets();
    $res = base64_decode($sock->getFrameWork("cmd.php?etc-hosts-open=yes"));
    writelogs($res, __FUNCTION__, __FILE__, __LINE__);
    $datas = unserialize($res);
    while (list($num, $ligne) = each($datas)) {
        if (preg_match("#^([0-9\\.\\:]+)\\s+(.+?)\\s+(.+?)\$#", $ligne, $re)) {
            $array[] = array("name" => $re[2], "alias" => $re[3], "ip" => $re[1], "md" => md5($ligne));
            continue;
        }
        if (preg_match("#^([0-9\\.\\:]+)\\s+(.+?)\$#", $ligne, $re)) {
            $array[] = array("name" => $re[2], "ip" => $re[1], "md" => md5($ligne));
            continue;
        }
    }
    if (!is_array($array)) {
        return null;
    }
    $html = "<table style='width:98%' class=table_form>\n\t<tr>\n\t\t<th>&nbsp;</th>\n\t\t<th>{ip_address}</th>\n\t\t<th>{servername}</th>\n\t\t<th>{alias}</th>\n\t\t<th>&nbsp;</th>\n\t</tr>\n\t";
    while (list($num, $ligne) = each($array)) {
        $html = $html . "<tr " . CellRollOver() . ">\n\t\t\t<td width=1% nowrap><img src='img/base.gif'></td>\n\t\t\t<td width=1% nowrap>{$ligne["ip"]}</td>\n\t\t\t<td width=60% nowrap>{$ligne["name"]}</td>\n\t\t\t<td width=1% nowrap>{$ligne["alias"]}</td>\n\t\t\t<td width=1% nowrap>" . imgtootltip("ed_delete.gif", "{delete}", "etc_hosts_del('{$ligne["md"]}')") . "</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t";
    }
    $html = $html . "</table>";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body("{$html}");
}
开发者ID:brucewu16899,项目名称:artica,代码行数:27,代码来源:system-etc-hosts.php

示例15: Connect

function Connect($server, $port, $user, $pass)
{
    writelogs("synchronize {$server}:{$port}", __FUNCTION__, __FILE__, __LINE__);
    $sync = new articaSMTPSync();
    $ldap = new clladp();
    $http = new httpd();
    $array = $sync->GetUsers();
    $field = base64_encode(serialize($array));
    $cred["user"] = $user;
    $cred["pass"] = $pass;
    $curl = new ccurl("https://{$server}:{$port}/exec.smtp.export.users.php");
    $curl->parms["credentials"] = base64_encode(serialize($cred));
    $curl->parms["users"] = $field;
    $curl->parms["local_port"] = $http->https_port;
    $curl->parms["mycred"] = base64_encode(serialize(array($ldap->ldap_admin, $ldap->ldap_password)));
    if (!$curl->get()) {
        writelogs("synchronize {$server}:{$port} failed", __FUNCTION__, __FILE__, __LINE__);
    }
    if (preg_match("#<datas>(.+?)</datas>#is", $curl->data, $re)) {
        $array = unserialize(base64_decode($re[1]));
        $sync->import($array, "{$server}:{$port}");
        $sock = new sockets();
        $sock->getFrameWork("cmd.php?postfix-transport-maps=yes");
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:25,代码来源:exec.smtp.export.users.php


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