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


PHP imgsimple函数代码示例

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


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

示例1: volumes_list

function volumes_list()
{
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $sock = new sockets();
    $t = $_GET["t"];
    $datas = unserialize(base64_decode($sock->getFrameWork("gluster.php?volume-info=yes")));
    $t = $_GET["t"];
    $data = array();
    $data['page'] = $page;
    $data['total'] = count($datas);
    $data['rows'] = array();
    $sock = new sockets();
    while (list($volume_name, $ligne) = each($datas)) {
        $id = $ligne["ID"];
        $bricks = array();
        while (list($a, $b) = each($ligne["BRICKS"])) {
            $bricks[] = "<div style='padding-left:10px;font-size:14px'>{$b}</div>";
        }
        $volume_nameenc = base64_encode($volume_name);
        $delete = imgsimple("delete-24.png", null, "VolumeDelete{$t}('{$volume_nameenc}','{$id}')");
        $data['rows'][] = array('id' => $id, 'cell' => array("<span style='font-size:16px;'>{$volume_name}</span>", "<span style='font-size:16px;'>{$ligne["TYPE"]}</span>", "<span style='font-size:16px;'>" . @implode(" ", $bricks) . "</span>", "<span style='font-size:16px;'>{$ligne["STATUS"]}</span>", $delete));
    }
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:25,代码来源:samba.clusters.volumes.client.php

示例2: task_list

function task_list()
{
    $tpl = new templates();
    $sock = new sockets();
    $ARRAY = unserialize(base64_decode($sock->getFrameWork("zarafa.php?zarafadb-processlist=yes")));
    $data = array();
    $data['page'] = 1;
    $data['total'] = 0;
    $data['rows'] = array();
    if ($_POST["query"] != null) {
        $tofind = $_POST["query"];
        $tofind = str_replace(".", "\\.", $tofind);
        $tofind = str_replace("[", "\\[", $tofind);
        $tofind = str_replace("]", "\\]", $tofind);
        $tofind = str_replace("*", ".*?", $tofind);
    }
    $c = 0;
    $seconds = $tpl->javascript_parse_text("{seconds}");
    while (list($ID, $ligne) = each($ARRAY)) {
        $color = "black";
        if ($tofind != null) {
            if (!preg_match("#{$tofind}#", $ligne[$_POST["qtype"]])) {
                continue;
            }
        }
        $c++;
        $kill = imgsimple("delete-24.png", null, "KillTHREAD('{$ID}')");
        $data['rows'][] = array('id' => md5(serialize($ligne)), 'cell' => array("<span style='font-size:14px;color:{$color}'>{$ID}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["USER"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["HOST"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["COMMAND"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["TIME"]}&nbsp;{$seconds}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["STATE"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["INFO"]}</span>", "<span style='font-size:14px;color:{$color}'>{$kill}</span>"));
    }
    $data['total'] = $c;
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:32,代码来源:zarafa.dabatase.processlist.php

示例3: interfaces_list

function interfaces_list()
{
    $tpl = new templates();
    $conf = new dnsmasq();
    if (!is_array($conf->array_interface) or count($conf->array_interface) == 0) {
        $data['rows'][] = array('id' => "null", 'cell' => array("<span style='font-size:18px;font-weight:bold'><img src='img/folder-network-48.png'></a></span>", "<span style='font-size:32px'>" . $tpl->_ENGINE_parse_body("{all}") . "</a></span>", null));
        $data['page'] = 1;
        $data['total'] = 1;
        echo json_encode($data);
        return;
    }
    $page = 1;
    $c = 0;
    while (list($index, $line) = each($conf->array_interface)) {
        if (trim($line) == null) {
            continue;
        }
        if (isset($aL[$line])) {
            continue;
        }
        $md5 = md5("{$index}{$line}");
        $aL[$line] = true;
        $net = new system_nic($line);
        $c++;
        $delete = imgsimple('delete-48.png', '{delete}', "DnsmasqDeleteInterface('{$index}');");
        $data['rows'][] = array('id' => $md5, 'cell' => array("<span style='font-size:16px;font-weight:bold'><img src='img/folder-network-48.png'></a></span>", "<span style='font-size:32px'>{$line} - {$net->IPADDR} {$net->NICNAME}</a></span>", $delete));
    }
    if ($c == 0) {
        $data['rows'][] = array('id' => "null", 'cell' => array("<span style='font-size:18px;font-weight:bold'><img src='img/folder-network-48.png'></a></span>", "<span style='font-size:32px'>" . $tpl->_ENGINE_parse_body("{all}") . "</a></span>", null));
        $data['page'] = 1;
        $data['total'] = 1;
        echo json_encode($data);
        return;
    }
    $data['page'] = $page;
    $data['total'] = $c;
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:38,代码来源:dnsmasq.interfaces.php

示例4: servers_list

function servers_list()
{
    $tpl = new templates();
    $main = new maincf_multi($_GET["hostname"], $_GET["ou"]);
    $hash = unserialize(base64_decode($main->GET_BIGDATA("check_client_access")));
    if (!is_array($hash) or count($hash) == 0) {
        json_error_show("no rule");
    }
    $page = 1;
    $search = string_to_flexregex();
    $c = 0;
    while (list($ipaddr, $action) = each($hash)) {
        if (trim($ipaddr) == null) {
            continue;
        }
        if (isset($aL[$ipaddr])) {
            continue;
        }
        $md5 = md5("{$ipaddr}{$action}");
        if ($search != null) {
            if (!preg_match("#{$search}#", $ipaddr)) {
                continue;
            }
        }
        $aL[$md5] = true;
        $img = "48-server.png";
        if ($action == "REJECT") {
            $img = '48-server-ban.png';
        }
        $c++;
        $delete = imgsimple('delete-48.png', '{delete}', "DeleteServer{$_GET["t"]}('{$ipaddr}');");
        $data['rows'][] = array('id' => $md5, 'cell' => array("<span style='font-size:16px;font-weight:bold'><img src='img/{$img}'></a></span>", "<span style='font-size:32px'>{$ipaddr} ({$action})</a></span>", $delete));
    }
    $data['page'] = $page;
    $data['total'] = $c;
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:37,代码来源:domains.postfix.multi.reject.php

示例5: accounts_search

function accounts_search()
{
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $sock = new sockets();
    $q = new mysql_squid_builder();
    $t = $_GET["t"];
    $tt = $_GET["tt"];
    $search = '%';
    $table = "rdpproxy_items";
    $page = 1;
    $data = array();
    $data['rows'] = array();
    $FORCE_FILTER = "userid='{$_GET["ID"]}'";
    if (isset($_POST["sortname"])) {
        if ($_POST["sortname"] != null) {
            $ORDER = "ORDER BY {$_POST["sortname"]} {$_POST["sortorder"]}";
        }
    }
    if (!$q->TABLE_EXISTS($table)) {
        $sql = "CREATE TABLE IF NOT EXISTS `squidlogs`.`rdpproxy_items` (\n\t\t\t`ID` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\t\t`userid` BIGINT(11),\n\t\t\t`service` VARCHAR(128) ,\n\t\t\t`rhost` VARCHAR(128),\n\t\t\t`username` VARCHAR(128),\n\t\t\t`domain` VARCHAR(128),\n\t\t\t`password` VARCHAR(128),\n\t\t\t`servicetype` VARCHAR(15),\n\t\t\t`serviceport` smallint(15),\n\t\t\t`alive` INT UNSIGNED NOT NULL,\n\t\t\t`is_rec` smallint(1),\n\t\t\t KEY `username`(`username`),\n\t\t\t KEY `password`(`password`),\n\t\t\t KEY `service`(`service`),\n\t\t\t KEY `rhost`(`rhost`),\n\t\t\t KEY `userid`(`userid`)\n\t\t\t )  ENGINE = MYISAM;";
        $q->QUERY_SQL($sql);
        if (!$q->ok) {
            json_error_show("{$q->mysql_error}", 1);
        }
    }
    if (isset($_POST['page'])) {
        $page = $_POST['page'];
    }
    $searchstring = string_to_flexquery();
    if ($searchstring != null) {
        $sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE {$FORCE_FILTER} {$searchstring}";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
        if (!$q->ok) {
            json_error_show("{$q->mysql_error}", 1);
        }
        $total = $ligne["TCOUNT"];
    } else {
        $sql = "SELECT COUNT(*) as TCOUNT FROM `rdpproxy_items` WHERE {$FORCE_FILTER}";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
        if (!$q->ok) {
            json_error_show("{$q->mysql_error}", 1);
        }
        $total = $ligne["TCOUNT"];
    }
    if (isset($_POST['rp'])) {
        $rp = $_POST['rp'];
    }
    $pageStart = ($page - 1) * $rp;
    $limitSql = "LIMIT {$pageStart}, {$rp}";
    $sql = "SELECT *  FROM `{$table}` WHERE {$FORCE_FILTER} {$searchstring} {$ORDER} {$limitSql}";
    writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
    $results = $q->QUERY_SQL($sql);
    if (!$q->ok) {
        json_error_show("{$q->mysql_error},{$sql}", 1);
    }
    $data['page'] = $page;
    $data['total'] = $total;
    if (mysql_num_rows($results) == 0) {
        json_error_show("no data", 1);
    }
    while ($ligne = mysql_fetch_assoc($results)) {
        $val = 0;
        $color = "black";
        $download = "&nbsp;";
        $delete = imgsimple("delete-48.png", null, "ItemsDelete{$tt}('{$ligne['ID']}')");
        $href = "<a href=\"javascript:blur();\"\n\t\t\t\t\t\tOnClick=\"javascript:Loadjs('{$MyPage}?accounts-js=yes&userid={$_GET["ID"]}&ID={$ligne['ID']}&t={$t}&tt={$tt}');\"\n\t\t\t\t\t\tstyle=\"font-size:22px;text-decoration:underline;color:{$color}\">";
        $img = "computer-windows-48.png";
        if ($ligne['servicetype'] == "RDP") {
            if (!fsock_perform($ligne['rhost'], 3389)) {
                $img = "computer-windows-48-red.png";
            } else {
                $download = "<a href=\"{$MyPage}?rdp-download={$ligne['ID']}\"><img src='img/download-48.png'></a>";
            }
        }
        $data['rows'][] = array('id' => "ACC{$ligne['ID']}", 'cell' => array("\n\t\t\t\t\t\t<center><img src='img/{$img}'></center>", "{$href}{$ligne['service']}</a>", "{$href}{$ligne['username']}/{$ligne['service']}</a>", "{$href}{$ligne['rhost']}</a>", "<center{$href}{$ligne['servicetype']}</a></center>", "<center>{$download}</center>", "<center>{$delete}</center>"));
    }
    echo json_encode($data);
}
开发者ID:articatech,项目名称:artica,代码行数:79,代码来源:squid.rdpproxy.php

示例6: list_items

function list_items()
{
    $STATUS = unserialize(@file_get_contents("/usr/share/artica-postfix/ressources/logs/web/nginx.status.acl"));
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $all_text = $tpl->_ENGINE_parse_body("{all}");
    $GLOBALS["CLASS_TPL"] = $tpl;
    $q = new mysql_squid_builder();
    $OrgPage = "miniadmin.proxy.reverse.php";
    $sock = new sockets();
    $EnableFreeWeb = intval($sock->GET_INFO("EnableFreeWeb"));
    if (!$q->FIELD_EXISTS("reverse_www", "zOrder")) {
        $q->QUERY_SQL("ALTER TABLE `reverse_www` ADD `zOrder` smallint(100) NOT NULL default '0'");
        if (!$q->ok) {
            echo $q->mysql_error_html();
        }
    }
    $up = imgsimple("arrow-up-32.png", null, "Loadjs('{$MyPage}?move-item-js=yes&ID={$ligne["ID"]}&dir=0&t={$_GET["t"]}')");
    $down = imgsimple("arrow-down-32.png", null, "Loadjs('{$MyPage}?move-item-js=yes&ID={$ligne["ID"]}&dir=1&t={$_GET["t"]}')");
    $FORCE = "cache_peer_id={$_GET["ID"]}";
    $search = '%';
    $table = "reverse_www";
    $page = 1;
    $freeweb_compile_background = $tpl->javascript_parse_text("{freeweb_compile_background}");
    $reset_admin_password = $tpl->javascript_parse_text("{reset_admin_password}");
    $delete_freeweb_text = $tpl->javascript_parse_text("{delete_freeweb_text}");
    $delete_freeweb_nginx_text = $tpl->javascript_parse_text("{delete_freeweb_nginx_text}");
    $delete_freeweb_dnstext = $tpl->javascript_parse_text("{delete_freeweb_dnstext}");
    $total = 0;
    if ($q->COUNT_ROWS($table, "artica_backup") == 0) {
        json_error_show("no data", 1);
    }
    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 {$FORCE} {$searchstring}";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_events"));
        $total = $ligne["TCOUNT"];
    } else {
        if (strlen($FORCE) > 2) {
            $sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE {$FORCE}";
            $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_events"));
            $total = $ligne["TCOUNT"];
        } else {
            $total = $q->COUNT_ROWS($table, "artica_events");
        }
    }
    if (isset($_POST['rp'])) {
        $rp = $_POST['rp'];
    }
    if (!is_numeric($rp)) {
        $rp = 50;
    }
    $pageStart = ($page - 1) * $rp;
    $limitSql = "LIMIT {$pageStart}, {$rp}";
    $sql = "SELECT *  FROM `{$table}` WHERE {$FORCE} {$searchstring} {$ORDER} {$limitSql}";
    writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
    $results = $q->QUERY_SQL($sql, "artica_events");
    if (!$q->ok) {
        json_error_show($q->mysql_error . "<br>{$sql}", 1);
    }
    $data = array();
    $data['page'] = $page;
    $data['total'] = $total;
    $data['rows'] = array();
    $CurrentPage = CurrentPageName();
    if (mysql_num_rows($results) == 0) {
        json_error_show("no data");
    }
    $searchstring = string_to_flexquery();
    if (!AdminPrivs()) {
        $sql = "SELECT reverse_www.* FROM reverse_www,reverse_privs\n\t\tWHERE reverse_privs.servername=reverse_www.servername\n\t\tAND reverse_privs.uid='{$_SESSION["uid"]}' {$searchstring} ORDER BY servername LIMIT 0,250";
    }
    $results = $q->QUERY_SQL($sql, 'artica_backup');
    if (!$q->ok) {
        json_error_show($q->mysql_error . "<br>{$sql}");
    }
    $q1 = new mysql();
    $t = time();
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $servername = $ligne["servername"];
        $explain_text = NGINX_EXPLAIN_REVERSE($ligne["servername"]);
        $icon = "clound-in-64.png";
        $freewebicon = "64-firewall-search.png";
        $color = "black";
        $status = array();
        $portText = null;
        $md = md5(serialize($ligne));
        $RedirectQueries = $ligne["RedirectQueries"];
        $default_server = $ligne["default_server"];
        $SiteEnabled = $ligne["enabled"];
        $servername_enc = urlencode($servername);
        $Compile = imgsimple("apply-48.png", null, "Loadjs('nginx.single.progress.php?servername={$servername_enc}')");
//.........这里部分代码省略.........
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:101,代码来源:nginx.peer.www.php

示例7: hosts

function hosts()
{
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $q = new mysql_squid_builder();
    $t = $_GET["t"];
    $search = '%';
    $table = "dnsmasq_records";
    $page = 1;
    $FORCE_FILTER = null;
    $total = 0;
    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));
        $total = $ligne["TCOUNT"];
    } else {
        $total = $q->COUNT_ROWS("dnsmasq_records");
    }
    if (isset($_POST['rp'])) {
        $rp = $_POST['rp'];
    }
    $pageStart = ($page - 1) * $rp;
    if (is_numeric($rp)) {
        $limitSql = "LIMIT {$pageStart}, {$rp}";
    }
    $sql = "SELECT *  FROM {$table} WHERE 1 {$searchstring} {$FORCE_FILTER} {$ORDER} {$limitSql}";
    $results = $q->QUERY_SQL($sql);
    $no_rule = $tpl->_ENGINE_parse_body("{no data}");
    $data = array();
    $data['page'] = $page;
    $data['total'] = $total;
    $data['rows'] = array();
    if (!$q->ok) {
        if (strpos($q->mysql_error, "doesn't exist") > 0) {
            $q->CheckTables();
            $results = $q->QUERY_SQL($sql);
        }
    }
    if (!$q->ok) {
        json_error_show($q->mysql_error . "<br>{$sql}");
    }
    if (mysql_num_rows($results) == 0) {
        json_error_show("no data");
    }
    $fontsize = "16";
    while ($ligne = mysql_fetch_assoc($results)) {
        $color = "black";
        $delete = imgsimple("delete-32.png", null, "Loadjs('{$MyPage}?delete-host-js=yes&ID={$ligne["ID"]}&t={$t}&tt={$_GET["tt"]}')");
        $editjs = "<a href=\"javascript:blur();\"\n\t\tOnClick=\"javascript:Loadjs('{$MyPage}?host-js=yes&ID={$ligne["ID"]}&t={$t}',true);\"\n\t\tstyle='font-size:{$fontsize}px;font-weight:bold;color:{$color};text-decoration:underline'>";
        $ligne2 = mysql_fetch_array($q->QUERY_SQL("SELECT COUNT(ID) as tcount FROM dnsmasq_cname WHERE recordid='{$ligne["ID"]}'"));
        $hostname = $ligne["hostname"];
        $ipaddr = $ligne["ipaddr"];
        $Items = $ligne2["tcount"];
        $data['rows'][] = array('id' => $ligne['ID'], 'cell' => array("<span style='font-size:{$fontsize}px;font-weight:bold;color:{$color}'>{$editjs}{$hostname}</a><br><i style='font-size:12px'>&nbsp;{$grouptype}</i></span>", "<span style='font-size:{$fontsize}px;font-weight:normal;color:{$color}'>{$ipaddr}</span>", "<span style='font-size:{$fontsize}px;font-weight:normal;color:{$color}'>{$Items}</span>", "<span style='font-size:{$fontsize}px;font-weight:normal;color:{$color}'>{$delete}</span>"));
    }
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:66,代码来源:squid.dns.items.php

示例8: items

function items()
{
    $cyrus = new cyrus();
    $array = $cyrus->ListUsersBoxes($_POST["query"], $_GET["domain"]);
    if (!is_array($array)) {
        json_error_show("No mailbox");
    }
    if (count($array) == 0) {
        json_error_show("No mailbox");
    }
    $t = $_GET["t"];
    $c = 0;
    $data = array();
    $data['page'] = 1;
    $data['total'] = count($array);
    $data['rows'] = array();
    $search = null;
    if ($_POST["query"] != null) {
        $search = string_to_regex($_POST["query"]);
    }
    while (list($mailbox_name, $ligne) = each($array)) {
        $mailbox_name = trim($mailbox_name);
        if ($mailbox_name == null) {
            continue;
        }
        if ($search != null) {
            if (!preg_match("#{$search}#", $ligne)) {
                continue;
            }
        }
        if ($_GET["domain"] != null) {
            $mailbox_name = "{$mailbox_name}@{$_GET["domain"]}";
        }
        $delete = imgsimple("delete-24.png", "", "DeleteRealMailBox{$t}('{$mailbox_name}','" . md5($ligne) . "');");
        $c++;
        $data['rows'][] = array('id' => md5($ligne), 'cell' => array("<span style='font-size:16px;color:{$color}'><img src='img/32-mailbox.png'></span>", "<span style='font-size:16px;color:{$color}'>{$mailbox_name}</a></span>", "<span style='font-size:16px;color:{$color}'>{$delete}</a></span>"));
    }
    if ($c == 0) {
        json_error_show("No mailbox");
    }
    $data['total'] = $c;
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:43,代码来源:cyrus.mailboxes.php

示例9: find_member

function find_member()
{
    $ldap = new clladp();
    if ($ldap->IsKerbAuth()) {
        find_member_active_directory();
        return;
    }
    if ($_POST["qtype"] == "find-member") {
        $tofind = $_POST["query"];
    }
    $t = $_GET["t"];
    $tt = $_GET["tt"];
    if ($_SESSION["uid"] == -100) {
        $ou = $_GET["ou"];
    } else {
        $ou = $_SESSION["ou"];
    }
    $sock = new sockets();
    if (is_base64_encoded($ou)) {
        $ou = base64_decode($ou);
    }
    if ($tofind == null) {
        $tofind = '*';
    } else {
        $tofind = "*{$tofind}*";
    }
    $tofind = str_replace('***', '*', $tofind);
    $tofind = str_replace('**', '*', $tofind);
    $tofind = str_replace('**', '*', $tofind);
    $EnableManageUsersTroughActiveDirectory = $sock->GET_INFO("EnableManageUsersTroughActiveDirectory");
    if (!is_numeric($EnableManageUsersTroughActiveDirectory)) {
        $EnableManageUsersTroughActiveDirectory = 0;
    }
    $tofind = str_replace(".", '\\.', $tofind);
    $tofind = str_replace("*", '.*?', $tofind);
    $ldap = new clladp();
    writelogs("FIND {$tofind} IN OU \"{$ou}\"", __FUNCTION__, __FILE__, __LINE__);
    if (!$ldap->IsOUUnderActiveDirectory($ou)) {
        if ($EnableManageUsersTroughActiveDirectory == 1) {
            $GLOBALS["NOUSERSCOUNT"] = true;
            $ldap = new ldapAD();
            writelogs("[{$tofind}]: ->hash_get_groups_from_ou_mysql({$ou},{$tofind}) ", __FUNCTION__, __FILE__);
            $hash = $ldap->hash_get_groups_from_ou_mysql($ou, $tofind, true);
        } else {
            $ldap = new clladp();
            $hash = $ldap->hash_groups($ou, 1);
        }
    } else {
        $hash = find_member_active_directory();
        $ldap->EnableManageUsersTroughActiveDirectory = true;
        $GLOBALS["NOUSERSCOUNT"] = true;
    }
    $number = count($hash);
    $data = array();
    $data['page'] = 0;
    $data['total'] = $number;
    $data['rows'] = array();
    $styla = "style='font-size:14px;text-decoration:underline;font-weight:bold'";
    $styleNum = "style='font-size:16px;font-weight:bold'";
    $search = string_to_flexregex();
    if (is_array($hash)) {
        while (list($num, $line) = each($hash)) {
            if (strtolower($line) == 'default_group') {
                continue;
            }
            if (strlen($search) > 2) {
                if (!preg_match("#{$search}#", $line)) {
                    continue;
                }
            }
            $text = null;
            $js = "javascript:Loadjs('domains.edit.group.php?js=yes&group-id={$num}&ou={$_GET["ou"]}&encoded=yes&tt={$t}&ttt={$tt}')";
            $delete = imgsimple("delete-24.png", "{delete} {$num}", "Loadjs('domains.delete.group.php?gpid={$num}')");
            if (!$GLOBALS["NOUSERSCOUNT"]) {
                $delete = "&nbsp;";
                $gp = new groups($num);
                $members = count($gp->members_array);
                if ($gp->description != null) {
                    $text = $gp->description;
                }
                $data['rows'][] = array('id' => $line, 'cell' => array("<a href=\"javascript:blur();\" OnClick=\"{$js}\" {$styla}>{$line}</a>", "<span {$styleNum}>{$members}</span>", "<span style='font-size:14px'>{$text}</span>", $delete));
            } else {
                if (is_array($line)) {
                    if ($line["description"] != null) {
                        $text = $line["description"];
                    }
                    if (strlen($search) > 2) {
                        if (!preg_match("#{$search}#", $line["groupname"])) {
                            continue;
                        }
                    }
                    if (!is_numeric($line["gid"])) {
                        $delete = imgsimple("delete-24-grey.png");
                    }
                    $js = "javascript:Loadjs('domains.edit.group.php?js=yes&group-id={$line["gid"]}&ou={$_GET["ou"]}&encoded=yes&tt={$t}&ttt={$tt}')";
                    $data['rows'][] = array('id' => md5($line["groupname"]), 'cell' => array("<a href=\"javascript:blur();\" OnClick=\"{$js}\" {$styla}>{$line["groupname"]}</a>", "<span {$styleNum}>{$line["UsersCount"]}</span>", "<span style='font-size:14px'>{$text}</span>", $delete));
                } else {
                    $data['rows'][] = array('id' => $line, 'cell' => array("<a href=\"javascript:blur();\" OnClick=\"{$js}\" {$styla}>{$line}</a>", "<span {$styleNum}>?</span>", "<span style='font-size:14px'></span>", $delete));
                }
            }
//.........这里部分代码省略.........
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:101,代码来源:domains.find.groups.php

示例10: USER_ALIASES_MAILING_LIST_LIST

function USER_ALIASES_MAILING_LIST_LIST($userid)
{
    $u = new user($userid);
    $page = CurrentPageName();
    $hash = $u->LoadAliasesMailing();
    $t = $_GET["t"];
    while (list($num, $ligne) = each($hash)) {
        if ($ligne == null) {
            continue;
        }
        $array[$ligne] = true;
    }
    $groups = $u->MailingGroupsLoadAliases();
    while (list($num, $ligne) = each($groups)) {
        if ($ligne == null) {
            continue;
        }
        $array[$ligne] = false;
    }
    $data = array();
    $data['page'] = 1;
    $data['total'] = count($array);
    $data['rows'] = array();
    if (trim($_POST["query"]) != null) {
        $search = $_POST["query"];
        $search = str_replace(".", "\\.", $search);
        $search = str_replace("*", ".*?", $search);
    }
    $c = 0;
    while (list($num, $ligne) = each($array)) {
        if ($search != null) {
            if (!preg_match("#{$search}#", $num)) {
                continue;
            }
        }
        $c++;
        $testmail = imgsimple("test-mail-22.png", null, "Loadjs('postfix.sendtest.mail.php?rcpt={$num}')");
        $id = md5($num . $c . time());
        $dele = imgsimple("delete-24.png", null, "Loadjs('{$page}?USER_ALIASES_MAILING_LIST_DEL_JS=yes&mail={$num}&uid={$userid}&ou={$u->ou}&t={$t}&id={$id}')");
        $data['rows'][] = array('id' => $id, 'cell' => array("<span style='font-size:16px;color:{$color}'>{$num}</span>", "<span style='font-size:14px;color:{$color}'>{$testmail}</span>", "<span style='font-size:14px;color:{$color}'>{$dele}</span>"));
    }
    $data['page'] = 1;
    $data['total'] = $c;
    return json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:45,代码来源:domains.edit.user.mailling-list.php

示例11: Bridges_list

function Bridges_list(){
	
	
	$t=$_GET["t"];
	$tpl=new templates();
	$MyPage=CurrentPageName();
	$q=new mysql();
	$users=new usersMenus();
	$sock=new sockets();
	$xtime=$_GET["xtime"];
	$table="iptables_bridge";
	$search='%';
	$database="artica_backup";	
	$page=1;
	$FORCE_FILTER=null;
	$tcp=new networking();
	
	if(!$q->TABLE_EXISTS($table, $database)){json_error_show("`$table` doesn't exists...");}
	if($q->COUNT_ROWS($table, $database)==0){json_error_show("No rule");}

	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);}	

	while ($ligne = mysql_fetch_assoc($results)) {
	$zmd5=md5(serialize($ligne));
	$color="black";
	$ipaddrinfos=VirtualNicInfosIPaddr($ligne["nics_virtuals_id"]);
	$nic_linked=$ligne["nic_linked"];
	$infos=$tcp->GetNicInfos($nic_linked);	
	$rulesIcon=imgsimple("script-32.png","{rules}","BridgeRules({$ligne["ID"]})");
	$delete=imgsimple("delete-24.png","{delete}","BridgeDelete({$ligne["ID"]},'$zmd5')");
	$data['rows'][] = array(
		'id' => "$zmd5",
		'cell' => array(
			"<span style='font-size:16px;color:$color'><img src='img/folder-network-32.png'></span>",
			"<span style='font-size:16px;color:$color'>{$ipaddrinfos["ETH"]} ({$ipaddrinfos["IPADDR"]})</span>",
			"<span style='font-size:16px;color:$color'><img src='img/arrow-right-32.png'></span>",
			"<span style='font-size:16px;color:$color'>$nic_linked ({$infos["IPADDR"]})</strong></span>",
			"<span style='font-size:16px;color:$color'>$rulesIcon</span>",
			"<span style='font-size:16px;color:$color'>$delete</span>",
			)
		);
	}
	
	
echo json_encode($data);

}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:78,代码来源:system.nic.config.php

示例12: items

function items()
{
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $q = new mysql();
    $t = $_GET["tt"];
    $search = '%';
    $table = "texttoldap";
    $page = 1;
    $FORCE_FILTER = null;
    $total = 0;
    if (!$q->TABLE_EXISTS("texttoldap", "artica_backup")) {
        $q->BuildTables();
    }
    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"));
        $total = $ligne["TCOUNT"];
    } else {
        $total = $q->COUNT_ROWS("texttoldap", "artica_backup");
    }
    if (isset($_POST['rp'])) {
        $rp = $_POST['rp'];
    }
    $pageStart = ($page - 1) * $rp;
    if (is_numeric($rp)) {
        $limitSql = "LIMIT {$pageStart}, {$rp}";
    }
    $sql = "SELECT *  FROM {$table} WHERE 1 {$searchstring} {$FORCE_FILTER} {$ORDER} {$limitSql}";
    $results = $q->QUERY_SQL($sql, "artica_backup");
    $no_rule = $tpl->_ENGINE_parse_body("{no_rule}");
    $data = array();
    $data['page'] = $page;
    $data['total'] = $total;
    $data['rows'] = array();
    if (!$q->ok) {
        json_error_show($q->mysql_error . "<br>{$sql}");
    }
    if (mysql_num_rows($results) == 0) {
        json_error_show("no data {$sql}");
    }
    $fontsize = "14";
    while ($ligne = mysql_fetch_assoc($results)) {
        $color = "black";
        $NICNAME = null;
        $delete = imgsimple("delete-32.png", null, "Loadjs('{$MyPage}?remove-connection-js={$ligne["ID"]}&t={$_GET["t"]}&t-rule={$_GET["t-rule"]}&tt={$_GET["tt"]}')");
        $editjs = "<a href=\"javascript:blur();\"\n\t\tOnClick=\"javascript:Loadjs('{$MyPage}?js=yes&connection-id={$ligne['ID']}&t={$_GET["t"]}',true);\"\n\t\tstyle='font-size:{$fontsize}px;font-weight:bold;color:{$color};text-decoration:underline'>";
        $connection = $ligne["connection"];
        $folder = $ligne["folder"];
        $hostname = $ligne["hostname"];
        $filename = $ligne["filename"];
        $ldap_group = $ligne["ldapgroup"];
        $ldap_group_text = "-";
        if ($ligne["ldapgroup"] > 0) {
            $gp = new groups($ligne["ldapgroup"]);
            $ldap_group_text = $gp->groupName;
        }
        $data['rows'][] = array('id' => $ligne['ID'], 'cell' => array("<span style='font-size:{$fontsize}px;font-weight:bold;color:{$color}'>{$editjs}{$connection}</span>", "<span style='font-size:{$fontsize}px;font-weight:bold;color:{$color}'>{$editjs}{$folder}</a></span>", "<span style='font-size:{$fontsize}px;font-weight:normal;color:{$color}'>{$hostname}</span>", "<span style='font-size:{$fontsize}px;font-weight:normal;color:{$color}'>{$filename}</span>", "<span style='font-size:{$fontsize}px;font-weight:normal;color:{$color}'>{$ldap_group_text}</span>", "<span style='font-size:{$fontsize}px;font-weight:normal;color:{$color}'>{$delete}</span>"));
    }
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:70,代码来源:csvToLdap.php

示例13: table_list

function table_list()
{
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $sock = new sockets();
    $q = new mysql_squid_builder();
    $search = '%';
    $table = "(SELECT title,zmd5,values_size FROM reports_cache WHERE report_type='{$_GET["report_type"]}') as t";
    $page = 1;
    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();
    $sql = "SELECT COUNT(*) as TCOUNT FROM {$table} WHERE 1 {$searchstring}";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
    $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} {$ORDER} {$limitSql}";
    $results = $q->QUERY_SQL($sql, "artica_backup");
    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)) {
        $zmd5 = $ligne["zmd5"];
        $title = $tpl->javascript_parse_text($ligne["title"]);
        $values_size = $ligne["values_size"];
        if ($values_size > 1024) {
            $values_size = FormatBytes($values_size / 1024);
        } else {
            $values_size = "{$values_size} Bytes";
        }
        $ligne["title"] = $tpl->javascript_parse_text($ligne["title"]);
        $delete = imgsimple("delete-32.png", null, "Loadjs('squid.statistics.flow.php?remove-cache-js=yes&zmd5={$zmd5}')");
        $data['rows'][] = array('id' => $zmd5, 'cell' => array("<span style='font-size:18px'>{$linkfamily}{$ligne["title"]}</a></span>", "<span style='font-size:18px'>{$values_size}</a></span>", $delete));
    }
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:50,代码来源:squid.statistics.browse-cache.php

示例14: search

function search()
{
    $search = '%';
    $page = 1;
    $q = new mysql();
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $sql_search = string_to_flexquery();
    if (isset($_POST['page'])) {
        $page = $_POST['page'];
    }
    if (isset($_POST["sortname"])) {
        if ($_POST["sortname"] != null) {
            $ORDER = "ORDER BY {$_POST["sortname"]} {$_POST["sortorder"]}";
        }
    }
    if ($sql_search != null) {
        $sql = "SELECT COUNT(*) AS TCOUNT FROM spamasssin_escrap 1 {$sql_search}";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
        $total = $ligne["tcount"];
    } else {
        $sql = "SELECT COUNT(*) AS tcount FROM spamasssin_escrap";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
        $total = $ligne["tcount"];
    }
    if (isset($_POST['rp'])) {
        $rp = $_POST['rp'];
    }
    $pageStart = ($page - 1) * $rp;
    $limitSql = "LIMIT {$pageStart}, {$rp}";
    $sql = "SELECT * FROM spamasssin_escrap WHERE 1 {$sql_search} {$ORDER} {$limitSql}";
    writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        json_error_show($q->mysql_error, 1);
    }
    $data = array();
    $data['page'] = $page;
    $data['total'] = $total;
    $data['rows'] = array();
    if (mysql_num_rows($results) == 0) {
        json_error_show("No data", 1);
    }
    while ($ligne = mysql_fetch_assoc($results)) {
        $ID = $ligne["ID"];
        $pattern = $ligne["pattern"];
        $delete = imgsimple("delete-42.png", null, "RemoveSpamAssassineScrap({$ID})");
        $select = "<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('{$MyPage}?popup-add-js=yes&ID={$ligne["ID"]}');\"\n\t\tstyle='text-decoration:underline;font-size:26px'>";
        $data['rows'][] = array('id' => $ligne['ID'], 'cell' => array("<center style='font-size:26px'>{$ligne["ID"]}</center>", "<strong style='font-size:26px'>{$ligne["zdate"]}</strong>", "<strong style='font-size:26px'>{$select}{$pattern}</a></strong>", "<center>{$delete}</center>"));
    }
    echo json_encode($data);
}
开发者ID:articatech,项目名称:artica,代码行数:52,代码来源:spamassassin.escrap.php

示例15: search

function search()
{
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $table = "squid_reports";
    $q = new mysql_squid_builder();
    $FORCE = 1;
    $t = $_GET["t"];
    $total = 0;
    if ($q->COUNT_ROWS($table, "artica_backup") == 0) {
        json_error_show("no data [" . __LINE__ . "]", 0);
    }
    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 {$FORCE} {$searchstring}";
        $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_events"));
        $total = $ligne["TCOUNT"];
    } else {
        if (strlen($FORCE) > 2) {
            $sql = "SELECT COUNT(*) as TCOUNT FROM `{$table}` WHERE {$FORCE}";
            $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_events"));
            $total = $ligne["TCOUNT"];
        } else {
            $total = $q->COUNT_ROWS($table, "artica_events");
        }
    }
    if (isset($_POST['rp'])) {
        $rp = $_POST['rp'];
    }
    if (!is_numeric($rp)) {
        $rp = 50;
    }
    $pageStart = ($page - 1) * $rp;
    $limitSql = "LIMIT {$pageStart}, {$rp}";
    $sql = "SELECT *  FROM `{$table}` WHERE {$FORCE} {$searchstring} {$ORDER} {$limitSql}";
    writelogs($sql, __FUNCTION__, __FILE__, __LINE__);
    $results = $q->QUERY_SQL($sql, "artica_events");
    if (!$q->ok) {
        json_error_show($q->mysql_error . "<br>{$sql}", 0);
    }
    $data = array();
    $data['page'] = $page;
    $data['total'] = $total;
    $data['rows'] = array();
    $CurrentPage = CurrentPageName();
    if (mysql_num_rows($results) == 0) {
        json_error_show("no data");
    }
    $searchstring = string_to_flexquery();
    $results = $q->QUERY_SQL($sql, 'artica_backup');
    if (!$q->ok) {
        json_error_show($q->mysql_error . "<br>{$sql}");
    }
    $q1 = new mysql();
    $t = time();
    $fontsize = 22;
    $EngineCategorization = EngineCategorization();
    $report = $tpl->javascript_parse_text("{report}");
    $date_range = $tpl->javascript_parse_text("{date_range}");
    $category = $tpl->javascript_parse_text("{category}");
    $from_the_last_time = $tpl->javascript_parse_text("{from_the_last_time}");
    $report_not_categorized_text = $tpl->javascript_parse_text("{report_not_categorized}");
    $error_engine_categorization = $tpl->javascript_parse_text("{error_engine_categorization}");
    $span = "<span style='font-size:{$fontsize}px'>";
    $report_days[2] = "2 {days}";
    $report_days[-1] = "{current_month}";
    $report_days[7] = "1 {week}";
    $report_days[15] = "2 {weeks}";
    $report_days[30] = "1 {month}";
    $report_days[60] = "2 {months}";
    $report_days[90] = "3 {months}";
    $report_days[180] = "6 {months}";
    $report_days[365] = "1 {year}";
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $ID = $ligne["ID"];
        $description_text = null;
        $report_type = null;
        $report_days_text = null;
        $report_cat = null;
        $report_not_categorized = null;
        $report_progress_text = null;
        $report_name = utf8_encode($ligne["report_name"]);
        //32-run-grey.png
        $run = imgsimple("32-run.png", null, "Loadjs('{$MyPage}?run-id=yes&ID={$ligne["ID"]}')");
        $report_icon = "<a href=\"{$MyPage}?report-download={$ligne["ID"]}\"><img src='img/32-download.png'></a>";
        $report_csv = "<a href=\"{$MyPage}?report-csv={$ligne["ID"]}\"><img src='img/csv-32.png'></a>";
        $report_logs = "<center style='margin-top:8px'><a href=\"javascript:blur();\" \n\t\tOnClick=\"javascript:Loadjs('{$MyPage}?report-logs-js={$ligne["ID"]}')\"\n\t\t><img src='img/eye-32.png'></a></center>";
        $js = "Loadjs('{$MyPage}?report-id=yes&ID={$ligne["ID"]}')";
        $description = utf8_encode($ligne["description"]);
        if ($description != null) {
            $description_text = "<br><i style='font-size:16px'>{$description}</i>";
        }
//.........这里部分代码省略.........
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:101,代码来源:squid.stats.reports.php


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