Merge remote-tracking branch 'ispc/master'
85 files deleted
1 files renamed
932 files modified
294 files added
| | |
| | | //###################################################################################################### |
| | | |
| | | |
| | | $sql = "SELECT domain_id, domain, document_root FROM web_domain WHERE server_id = ".$conf["server_id"]; |
| | | $records = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT domain_id, domain, document_root FROM web_domain WHERE server_id = ?"; |
| | | $records = $app->db->queryAllRecords($sql, $conf["server_id"]); |
| | | foreach($records as $rec) { |
| | | $domain = escapeshellcmd($rec["domain"]); |
| | | $logdir = escapeshellcmd($rec["document_root"].'/log'); |
New file |
| | |
| | | #! /bin/sh |
| | | # |
| | | # metronome Start/stop metronome server |
| | | # |
| | | |
| | | ### BEGIN INIT INFO |
| | | # Provides: metronome |
| | | # Required-Start: $remote_fs $network $named $time |
| | | # Required-Stop: $remote_fs $network $named $time |
| | | # Default-Start: 2 3 4 5 |
| | | # Default-Stop: 0 1 6 |
| | | # Short-Description: Starts metronome server |
| | | # Description: Starts metronome server, an XMPP server written in Lua. |
| | | ### END INIT INFO |
| | | |
| | | METRONOME=/usr/bin/metronomectl |
| | | PIDDIR=/var/run/metronome |
| | | NAME=metronome |
| | | |
| | | test -e $METRONOME || exit 0 |
| | | |
| | | start() |
| | | { |
| | | mkdir $PIDDIR -p |
| | | chown metronome:metronome $PIDDIR |
| | | chmod 750 $PIDDIR |
| | | |
| | | $METRONOME start >> /dev/null |
| | | } |
| | | |
| | | stop() |
| | | { |
| | | $METRONOME stop >> /dev/null |
| | | } |
| | | |
| | | reload() |
| | | { |
| | | &METRONOME reload >> /dev/null |
| | | } |
| | | |
| | | restart() |
| | | { |
| | | &METRONOME restart >> /dev/null |
| | | } |
| | | |
| | | case "$1" in |
| | | start) |
| | | echo -n "Starting Metronome..." |
| | | start & |
| | | ;; |
| | | stop) |
| | | echo -n "Stopping Metronome..." |
| | | stop & |
| | | ;; |
| | | reload) |
| | | echo -n "Reloading Metronome config..." |
| | | reload & |
| | | ;; |
| | | restart) |
| | | echo -n "Restarting Metronome..." |
| | | restart & |
| | | ;; |
| | | *) |
| | | echo "Usage: $0 {start|stop|reload|restart}" >&2 |
| | | exit 1 |
| | | ;; |
| | | esac |
| | | |
| | | if [ $? -eq 0 ]; then |
| | | echo . |
| | | else |
| | | echo " failed!" |
| | | fi |
| | | |
| | | exit 0 |
New file |
| | |
| | | #!/bin/bash |
| | | |
| | | IFS=":" |
| | | AUTH_OK=1 |
| | | AUTH_FAILED=0 |
| | | LOGFILE="/var/log/metronome/auth.log" |
| | | USELOG=true |
| | | |
| | | while read ACTION USER HOST PASS ; do |
| | | |
| | | [ $USELOG == true ] && { echo "Date: $(date) Action: $ACTION User: $USER Host: $HOST" >> $LOGFILE; } |
| | | |
| | | case $ACTION in |
| | | "auth") |
| | | if [ `/usr/bin/php /usr/lib/metronome/isp-modules/mod_auth_external/db_auth.php $USER $HOST $PASS 2>/dev/null` == 1 ] ; then |
| | | echo $AUTH_OK |
| | | [ $USELOG == true ] && { echo "AUTH OK" >> $LOGFILE; } |
| | | else |
| | | echo $AUTH_FAILED |
| | | [ $USELOG == true ] && { echo "AUTH FAILED" >> $LOGFILE; } |
| | | fi |
| | | ;; |
| | | "isuser") |
| | | if [ `/usr/bin/php /usr/lib/metronome/isp-modules/mod_auth_external/db_isuser.php $USER $HOST 2>/dev/null` == 1 ] ; then |
| | | echo $AUTH_OK |
| | | [ $USELOG == true ] && { echo "ISUSER OK" >> $LOGFILE; } |
| | | else |
| | | echo $AUTH_FAILED |
| | | [ $USELOG == true ] && { echo "ISUSER FAILED" >> $LOGFILE; } |
| | | fi |
| | | ;; |
| | | *) |
| | | echo $AUTH_FAILED |
| | | [ $USELOG == true ] && { echo "UNKNOWN ACTION GIVEN: $ACTION" >> $LOGFILE; } |
| | | ;; |
| | | esac |
| | | |
| | | done |
New file |
| | |
| | | <?php |
| | | ini_set('display_errors', false); |
| | | require_once('db_conf.inc.php'); |
| | | |
| | | try{ |
| | | // Connect database |
| | | $db = new mysqli($db_host, $db_user, $db_pass, $db_name); |
| | | result_false(mysqli_connect_errno()); |
| | | |
| | | // Get arguments |
| | | $arg_email = ''; |
| | | $arg_password = ''; |
| | | |
| | | result_false(count($argv) != 4); |
| | | $arg_email = $argv[1].'@'.$argv[2]; |
| | | $arg_password = $argv[3]; |
| | | |
| | | // check for existing user |
| | | $dbmail = $db->real_escape_string($arg_email); |
| | | $result = $db->query("SELECT jid, password FROM xmpp_user WHERE jid LIKE ? AND active='y' AND server_id=?", $dbmail, $isp_server_id); |
| | | result_false($result->num_rows != 1); |
| | | |
| | | $user = $result->fetch_object(); |
| | | |
| | | // check for domain autologin api key |
| | | $domain_key = 'f47kmm5Yh5hJzSws2KTS'; |
| | | |
| | | checkAuth($argv[1], $argv[2], $arg_password, $user->password, $domain_key); |
| | | }catch(Exception $ex){ |
| | | echo 0; |
| | | exit(); |
| | | } |
| | | |
| | | function result_false($cond = true){ |
| | | if(!$cond) return; |
| | | echo 0; |
| | | exit(); |
| | | } |
| | | function result_true(){ |
| | | echo 1; |
| | | exit(); |
| | | } |
| | | function checkAuth($user, $domain, $pw_arg, $pw_db, $domain_key){ |
| | | if(crypt($pw_arg, $pw_db) == $pw_db) |
| | | result_true(); |
| | | |
| | | if($domain_key){ |
| | | $datetime = new DateTime(); |
| | | $datetime->setTimezone(new DateTimeZone("UTC")); |
| | | for($t = $datetime->getTimestamp(); $t >= $datetime->getTimestamp()-30; $t--){ |
| | | $pw_api = md5($domain.'@'.$domain_key.'@'.$user.'@'.$t); |
| | | if($pw_api == $pw_arg) |
| | | result_true(); |
| | | } |
| | | } |
| | | result_false(); |
| | | } |
| | | ?> |
New file |
| | |
| | | <?php |
| | | $db_user = '{mysql_server_ispconfig_user}'; |
| | | $db_pass = '{mysql_server_ispconfig_password}'; |
| | | $db_name = '{mysql_server_database}'; |
| | | $db_host = '{mysql_server_ip}'; |
| | | $isp_server_id = '{server_id}'; |
New file |
| | |
| | | <?php |
| | | ini_set('display_errors', false); |
| | | require_once('db_conf.inc.php'); |
| | | |
| | | try{ |
| | | // Connect database |
| | | $db = new mysqli($db_host, $db_user, $db_pass, $db_name); |
| | | result_false(mysqli_connect_errno()); |
| | | |
| | | // Get arguments |
| | | $arg_email = ''; |
| | | |
| | | result_false(count($argv) != 3); |
| | | $arg_email = $argv[1].'@'.$argv[2]; |
| | | |
| | | // check for existing user |
| | | $dbmail = $db->real_escape_string($arg_email); |
| | | $result = $db->query("SELECT jid, password FROM xmpp_user WHERE jid LIKE ? AND active='y' AND server_id=?", $dbmail, $isp_server_id); |
| | | result_false($result->num_rows != 1); |
| | | result_true(); |
| | | |
| | | }catch(Exception $ex){ |
| | | echo 0; |
| | | exit(); |
| | | } |
| | | |
| | | function result_false($cond = true){ |
| | | if(!$cond) return; |
| | | echo 0; |
| | | exit(); |
| | | } |
| | | function result_true(){ |
| | | echo 1; |
| | | exit(); |
| | | } |
| | | |
| | | ?> |
New file |
| | |
| | | local nodeprep = require "util.encodings".stringprep.nodeprep; |
| | | local lpc = require "lpc"; |
| | | |
| | | local config = require "core.configmanager"; |
| | | local log = module._log; |
| | | local host = module.host; |
| | | local script_type = config.get(host, "external_auth_protocol") or "generic"; |
| | | assert(script_type == "ejabberd" or script_type == "generic"); |
| | | local command = config.get(host, "external_auth_command") or ""; |
| | | assert(type(command) == "string"); |
| | | assert(not host:find(":")); |
| | | local usermanager = require "core.usermanager"; |
| | | local jid_bare = require "util.jid".bare; |
| | | local new_sasl = require "util.sasl".new; |
| | | |
| | | local pid; |
| | | local readfile; |
| | | local writefile; |
| | | |
| | | local function send_query(text) |
| | | if pid and lpc.wait(pid,1) ~= nil then |
| | | log("debug","error, process died, force reopen"); |
| | | pid=nil; |
| | | end |
| | | if not pid then |
| | | log("debug", "Opening process " .. command); |
| | | pid, writefile, readfile = lpc.run(command); |
| | | end |
| | | if not pid then |
| | | log("debug", "Process failed to open"); |
| | | return nil; |
| | | end |
| | | |
| | | writefile:write(text); |
| | | writefile:flush(); |
| | | if script_type == "ejabberd" then |
| | | return readfile:read(4); |
| | | elseif script_type == "generic" then |
| | | return readfile:read(); |
| | | end |
| | | end |
| | | |
| | | function do_query(kind, username, password) |
| | | if not username then return nil, "not-acceptable"; end |
| | | username = nodeprep(username); |
| | | if not username then return nil, "jid-malformed"; end |
| | | |
| | | local query = (password and "%s:%s:%s:%s" or "%s:%s:%s"):format(kind, username, host, password); |
| | | local len = #query |
| | | if len > 1000 then return nil, "policy-violation"; end |
| | | |
| | | if script_type == "ejabberd" then |
| | | local lo = len % 256; |
| | | local hi = (len - lo) / 256; |
| | | query = string.char(hi, lo)..query; |
| | | end |
| | | if script_type == "generic" then |
| | | query = query..'\n'; |
| | | end |
| | | |
| | | local response = send_query(query); |
| | | if (script_type == "ejabberd" and response == "\0\2\0\0") or |
| | | (script_type == "generic" and response == "0") then |
| | | return nil, "not-authorized"; |
| | | elseif (script_type == "ejabberd" and response == "\0\2\0\1") or |
| | | (script_type == "generic" and response == "1") then |
| | | return true; |
| | | else |
| | | log("debug", "Nonsense back"); |
| | | return nil, "internal-server-error"; |
| | | end |
| | | end |
| | | |
| | | function new_external_provider(host) |
| | | local provider = { name = "external" }; |
| | | |
| | | function provider.test_password(username, password) |
| | | return do_query("auth", username, password); |
| | | end |
| | | |
| | | function provider.set_password(username, password) |
| | | return do_query("setpass", username, password); |
| | | end |
| | | |
| | | function provider.user_exists(username) |
| | | return do_query("isuser", username); |
| | | end |
| | | |
| | | function provider.create_user(username, password) return nil, "Account creation/modification not available."; end |
| | | |
| | | function provider.get_sasl_handler() |
| | | local testpass_authentication_profile = { |
| | | plain_test = function(sasl, username, password, realm) |
| | | return usermanager.test_password(username, realm, password), true; |
| | | end, |
| | | }; |
| | | return new_sasl(module.host, testpass_authentication_profile); |
| | | end |
| | | |
| | | function provider.is_admin(jid) |
| | | local admins = config.get(host, "admins"); |
| | | if admins ~= config.get("*", "admins") then |
| | | if type(admins) == "table" then |
| | | jid = jid_bare(jid); |
| | | for _,admin in ipairs(admins) do |
| | | if admin == jid then return true; end |
| | | end |
| | | elseif admins then |
| | | log("error", "Option 'admins' for host '%s' is not a table", host); |
| | | end |
| | | end |
| | | return usermanager.is_admin(jid); |
| | | end |
| | | |
| | | return provider; |
| | | end |
| | | |
| | | module:add_item("auth-provider", new_external_provider(host)); |
New file |
| | |
| | | -- * Metronome IM * |
| | | -- |
| | | -- This file is part of the Metronome XMPP server and is released under the |
| | | -- ISC License, please see the LICENSE file in this source package for more |
| | | -- information about copyright and licensing. |
| | | -- |
| | | -- As per the sublicensing clause, this file is also MIT/X11 Licensed. |
| | | -- ** Copyright (c) 2009, Waqas Hussain |
| | | |
| | | local st = require "util.stanza"; |
| | | |
| | | local result_query = st.stanza("query", {xmlns = "http://jabber.org/protocol/disco#items"}); |
| | | for _, item in ipairs(module:get_option("disco_items") or {}) do |
| | | result_query:tag("item", {jid = item[1], name = item[2]}):up(); |
| | | end |
| | | |
| | | module:hook("iq/host/http://jabber.org/protocol/disco#items:query", function(event) |
| | | local stanza = event.stanza; |
| | | local query = stanza.tags[1]; |
| | | if stanza.attr.type == "get" and not query.attr.node then |
| | | event.origin.send(st.reply(stanza):add_child(result_query)); |
| | | return true; |
| | | end |
| | | end, 100); |
New file |
| | |
| | | module:depends("http"); |
| | | |
| | | local jid_split = require "util.jid".prepped_split; |
| | | local b64 = require "util.encodings".base64.encode; |
| | | local sha1 = require "util.hashes".sha1; |
| | | local stanza = require "util.stanza".stanza; |
| | | local json = require "util.json".encode_ordered; |
| | | |
| | | local function require_resource(name) |
| | | local icon_path = module:get_option_string("presence_icons", "icons"); |
| | | local f, err = module:load_resource(icon_path.."/"..name); |
| | | if f then |
| | | return f:read("*a"); |
| | | end |
| | | module:log("warn", "Failed to open image file %s", icon_path..name); |
| | | return ""; |
| | | end |
| | | |
| | | local statuses = { online = {}, away = {}, xa = {}, dnd = {}, chat = {}, offline = {} }; |
| | | |
| | | local function handle_request(event, path) |
| | | local status, message; |
| | | local jid, type = path:match("([^/]+)/?(.*)$"); |
| | | if jid then |
| | | local user, host = jid_split(jid); |
| | | if host and not user then |
| | | user, host = host, event.request.headers.host; |
| | | if host then host = host:gsub(":%d+$", ""); end |
| | | end |
| | | if user and host then |
| | | local user_sessions = hosts[host] and hosts[host].sessions[user]; |
| | | if user_sessions then |
| | | status = user_sessions.top_resources[1]; |
| | | if status and status.presence then |
| | | message = status.presence:child_with_name("status"); |
| | | status = status.presence:child_with_name("show"); |
| | | if not status then |
| | | status = "online"; |
| | | else |
| | | status = status:get_text(); |
| | | end |
| | | if message then |
| | | message = message:get_text(); |
| | | end |
| | | end |
| | | end |
| | | end |
| | | end |
| | | status = status or "offline"; |
| | | |
| | | statuses[status].image = function() |
| | | return { status_code = 200, headers = { content_type = "image/png" }, |
| | | body = require_resource("status_"..status..".png") |
| | | }; |
| | | end; |
| | | statuses[status].html = function() |
| | | local jid_hash = sha1(jid, true); |
| | | return { status_code = 200, headers = { content_type = "text/html" }, |
| | | body = [[<!DOCTYPE html>]].. |
| | | tostring( |
| | | stanza("html") |
| | | :tag("head") |
| | | :tag("title"):text("XMPP Status Page for "..jid):up():up() |
| | | :tag("body") |
| | | :tag("div", { id = jid_hash.."_status", class = "xmpp_status" }) |
| | | :tag("img", { id = jid_hash.."_img", class = "xmpp_status_image xmpp_status_"..status, |
| | | src = "data:image/png;base64,"..b64(require_resource("status_"..status..".png")) }):up() |
| | | :tag("span", { id = jid_hash.."_status_name", class = "xmpp_status_name" }) |
| | | :text("\194\160"..status):up() |
| | | :tag("span", { id = jid_hash.."_status_message", class = "xmpp_status_message" }) |
| | | :text(message and "\194\160"..message.."" or "") |
| | | ) |
| | | }; |
| | | end; |
| | | statuses[status].text = function() |
| | | return { status_code = 200, headers = { content_type = "text/plain" }, |
| | | body = status |
| | | }; |
| | | end; |
| | | statuses[status].message = function() |
| | | return { status_code = 200, headers = { content_type = "text/plain" }, |
| | | body = (message and message or "") |
| | | }; |
| | | end; |
| | | statuses[status].json = function() |
| | | return { status_code = 200, headers = { content_type = "application/json" }, |
| | | body = json({ |
| | | jid = jid, |
| | | show = status, |
| | | status = (message and message or "null") |
| | | }) |
| | | }; |
| | | end; |
| | | statuses[status].xml = function() |
| | | return { status_code = 200, headers = { content_type = "application/xml" }, |
| | | body = [[<?xml version="1.0" encoding="utf-8"?>]].. |
| | | tostring( |
| | | stanza("result") |
| | | :tag("jid"):text(jid):up() |
| | | :tag("show"):text(status):up() |
| | | :tag("status"):text(message) |
| | | ) |
| | | }; |
| | | end |
| | | |
| | | if ((type == "") or (not statuses[status][type])) then |
| | | type = "image" |
| | | end; |
| | | |
| | | return statuses[status][type](); |
| | | end |
| | | |
| | | module:provides("http", { |
| | | default_path = "/status"; |
| | | route = { |
| | | ["GET /*"] = handle_request; |
| | | }; |
| | | }); |
| | |
| | | $conf['bind']['installed'] = false; // will be detected automatically during installation |
| | | $conf['bind']['bind_user'] = 'named'; |
| | | $conf['bind']['bind_group'] = 'named'; |
| | | $conf['bind']['bind_zonefiles_dir'] = '/var/named/chroot/var/named/'; |
| | | $conf['bind']['named_conf_path'] = '/var/named/chroot/etc/named.conf'; |
| | | $conf['bind']['named_conf_local_path'] = '/var/named/chroot/var/named/named.local'; |
| | | $conf['bind']['bind_zonefiles_dir'] = '/var/named'; |
| | | $conf['bind']['named_conf_path'] = '/etc/named.conf'; |
| | | $conf['bind']['named_conf_local_path'] = '/etc/named.conf.local'; |
| | | $conf['bind']['init_script'] = 'named'; |
| | | |
| | | //* Jailkit |
| | |
| | | $conf['jailkit']['config_dir'] = '/etc/jailkit'; |
| | | $conf['jailkit']['jk_init'] = 'jk_init.ini'; |
| | | $conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini'; |
| | | $conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico'; |
| | | $conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico /usr/bin/mysql /usr/bin/mysqldump /usr/bin/git /usr/bin/git-receive-pack /usr/bin/git-upload-pack /usr/bin/unzip /usr/bin/zip /bin/tar /bin/rm /usr/bin/patch'; |
| | | $conf['jailkit']['jailkit_chroot_cron_programs'] = '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php'; |
| | | |
| | | //* Squid |
| | |
| | | $conf['jailkit']['config_dir'] = '/etc/jailkit'; |
| | | $conf['jailkit']['jk_init'] = 'jk_init.ini'; |
| | | $conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini'; |
| | | $conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico'; |
| | | $conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico /usr/bin/mysql /usr/bin/mysqldump /usr/bin/git /usr/bin/git-receive-pack /usr/bin/git-upload-pack /usr/bin/unzip /usr/bin/zip /bin/tar /bin/rm /usr/bin/patch'; |
| | | $conf['jailkit']['jailkit_chroot_cron_programs'] = '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php'; |
| | | |
| | | //* Squid |
| | |
| | | $conf['cron']['crontab_dir'] = '/etc/cron.d'; |
| | | $conf['cron']['wget'] = '/usr/bin/wget'; |
| | | |
| | | //* Metronome XMPP |
| | | $conf['xmpp']['installed'] = false; |
| | | $conf['xmpp']['init_script'] = 'metronome'; |
| | | |
| | | |
| | | ?> |
| | |
| | | $content = str_replace('{hostname}', $conf['hostname'], $content); |
| | | $content = str_replace('/var/spool/amavisd/clamd.sock', '/tmp/clamd.socket', $content); |
| | | wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); |
| | | chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); |
| | | |
| | | |
| | | // Adding the amavisd commands to the postfix configuration |
| | |
| | | $content = str_replace('{hostname}', $conf['hostname'], $content); |
| | | $content = str_replace('/var/spool/amavisd/clamd.sock', '/var/run/clamav/clamd.sock', $content); |
| | | wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); |
| | | chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); |
| | | |
| | | |
| | | // Adding the amavisd commands to the postfix configuration |
| | |
| | | $content = str_replace('{hostname}', $conf['hostname'], $content); |
| | | $content = str_replace('/var/spool/amavisd/clamd.sock', '/var/run/clamav/clamd.sock', $content); |
| | | wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); |
| | | chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); |
| | | |
| | | |
| | | // Adding the amavisd commands to the postfix configuration |
| | |
| | | |
| | | // check if virtual_transport must be changed |
| | | if ($this->is_update) { |
| | | $tmp = $this->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); |
| | | $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); |
| | | $ini_array = ini_to_array(stripslashes($tmp['config'])); |
| | | // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni() |
| | | |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | wf($config_dir.'/'.$configfile, $content); |
| | | |
| | |
| | | //* mysql-virtual_sender.cf |
| | | $this->process_postfix_config('mysql-virtual_sender.cf'); |
| | | |
| | | //* mysql-virtual_sender_login_maps.cf |
| | | $this->process_postfix_config('mysql-virtual_sender_login_maps.cf'); |
| | | |
| | | //* mysql-virtual_client.cf |
| | | $this->process_postfix_config('mysql-virtual_client.cf'); |
| | | |
| | |
| | | |
| | | //* mysql-virtual_relayrecipientmaps.cf |
| | | $this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf'); |
| | | |
| | | //* mysql-virtual_policy_greylist.cf |
| | | $this->process_postfix_config('mysql-virtual_policy_greylist.cf'); |
| | | |
| | | //* postfix-dkim |
| | | $full_file_name=$config_dir.'/tag_as_originating.re'; |
| | |
| | | if(!is_user($cf['vmail_username'])) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); |
| | | |
| | | //* These postconf commands will be executed on installation and update |
| | | $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ".$conf['server_id']); |
| | | $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ?", $conf['server_id']); |
| | | $server_ini_array = ini_to_array(stripslashes($server_ini_rec['config'])); |
| | | unset($server_ini_rec); |
| | | |
| | |
| | | } |
| | | } |
| | | unset($rbl_hosts); |
| | | |
| | | //* If Postgrey is installed, configure it |
| | | $greylisting = ''; |
| | | if($conf['postgrey']['installed'] == true) { |
| | | $greylisting = ', check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; |
| | | } |
| | | |
| | | $reject_sender_login_mismatch = ''; |
| | | if(isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) { |
| | | $reject_sender_login_mismatch = ', reject_authenticated_sender_login_mismatch'; |
| | | } |
| | | unset($server_ini_array); |
| | | |
| | | //* These postconf commands will be executed on installation and update |
| | | |
| | | $postconf_placeholders = array('{config_dir}' => $config_dir, |
| | | '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'], |
| | | '{vmail_userid}' => $cf['vmail_userid'], |
| | | '{vmail_groupid}' => $cf['vmail_groupid'], |
| | | '{rbl_list}' => $rbl_list); |
| | | |
| | | '{rbl_list}' => $rbl_list, |
| | | '{greylisting}' => $greylisting, |
| | | '{reject_slm}' => $reject_sender_login_mismatch, |
| | | ); |
| | | |
| | | $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_postfix.conf.master', 'tpl/fedora_postfix.conf.master'); |
| | | $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders); |
| | | $postconf_commands = array_filter(explode("\n", $postconf_tpl)); // read and remove empty lines |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | wf("$config_dir/$configfile", $content); |
| | | |
| | | exec("chmod 660 $config_dir/$configfile"); |
| | |
| | | |
| | | // check if virtual_transport must be changed |
| | | if ($this->is_update) { |
| | | $tmp = $this->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); |
| | | $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); |
| | | $ini_array = ini_to_array(stripslashes($tmp['config'])); |
| | | // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni() |
| | | |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | wf("$config_dir/$configfile", $content); |
| | | |
| | |
| | | $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content); |
| | | $content = str_replace('{hostname}', $conf['hostname'], $content); |
| | | wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); |
| | | chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); |
| | | |
| | | |
| | | // Adding the amavisd commands to the postfix configuration |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf["mysql"]["host"], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf["mysql"]["port"], $content); |
| | | $content = str_replace('{server_id}', $conf["server_id"], $content); |
| | | wf($conf["mydns"]["config_dir"].'/'.$configfile, $content); |
| | | exec('chmod 600 '.$conf["mydns"]["config_dir"].'/'.$configfile); |
| | |
| | | |
| | | //* Chown the slave subdirectory to $conf['bind']['bind_user'] |
| | | exec('chown '.$conf['bind']['bind_user'].':'.$conf['bind']['bind_group'].' '.$content); |
| | | exec('chmod 770 '.$content); |
| | | exec('chmod 2770 '.$content); |
| | | |
| | | } |
| | | |
| | |
| | | $tpl = new tpl('apache_ispconfig.conf.master'); |
| | | $tpl->setVar('apache_version',getapacheversion()); |
| | | |
| | | $records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'"); |
| | | $records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']); |
| | | $ip_addresses = array(); |
| | | |
| | | if(is_array($records) && count($records) > 0) { |
| | |
| | | if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); |
| | | } |
| | | |
| | | public function configure_firewall() |
| | | public function configure_bastille_firewall() |
| | | { |
| | | global $conf; |
| | | |
| | |
| | | $tcp_public_services = ''; |
| | | $udp_public_services = ''; |
| | | |
| | | $row = $this->db->queryOneRecord('SELECT * FROM '.$conf["mysql"]["database"].'.firewall WHERE server_id = '.intval($conf['server_id'])); |
| | | $row = $this->db->queryOneRecord('SELECT * FROM ?? WHERE server_id = ?', $conf["mysql"]["database"] . '.firewall', $conf['server_id']); |
| | | |
| | | if(trim($row["tcp_port"]) != '' || trim($row["udp_port"]) != ''){ |
| | | $tcp_public_services = trim(str_replace(',', ' ', $row["tcp_port"])); |
| | |
| | | } |
| | | if(!stristr($tcp_public_services, $conf['apache']['vhost_port'])) { |
| | | $tcp_public_services .= ' '.intval($conf['apache']['vhost_port']); |
| | | if($row["tcp_port"] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ',".intval($conf['apache']['vhost_port'])."' WHERE server_id = ".intval($conf['server_id'])); |
| | | if($row["tcp_port"] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ? WHERE server_id = ?", ',' . intval($conf['apache']['vhost_port']), $conf['server_id']); |
| | | } |
| | | |
| | | $content = str_replace("{TCP_PUBLIC_SERVICES}", $tcp_public_services, $content); |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | |
| | | $content = str_replace('{mysql_master_server_ispconfig_user}', $conf['mysql']['master_ispconfig_user'], $content); |
| | | $content = str_replace('{mysql_master_server_ispconfig_password}', $conf['mysql']['master_ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_master_server_database}', $conf['mysql']['master_database'], $content); |
| | | $content = str_replace('{mysql_master_server_host}', $conf['mysql']['master_host'], $content); |
| | | $content = str_replace('{mysql_master_server_port}', $conf['mysql']['master_port'], $content); |
| | | |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content); |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | |
| | | $content = str_replace('{mysql_master_server_ispconfig_user}', $conf['mysql']['master_ispconfig_user'], $content); |
| | | $content = str_replace('{mysql_master_server_ispconfig_password}', $conf['mysql']['master_ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_master_server_database}', $conf['mysql']['master_database'], $content); |
| | | $content = str_replace('{mysql_master_server_host}', $conf['mysql']['master_host'], $content); |
| | | $content = str_replace('{mysql_master_server_port}', $conf['mysql']['master_port'], $content); |
| | | |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content); |
| | |
| | | $file_server_enabled = ($conf['services']['file'])?1:0; |
| | | $db_server_enabled = ($conf['services']['db'])?1:0; |
| | | $vserver_server_enabled = ($conf['services']['vserver'])?1:0; |
| | | $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled' WHERE server_id = ".intval($conf['server_id']); |
| | | $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ?, vserver_server = ? WHERE server_id = ?"; |
| | | |
| | | $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); |
| | | if($conf['mysql']['master_slave_setup'] == 'y') { |
| | | $this->dbmaster->query($sql); |
| | | $this->db->query($sql); |
| | | } else { |
| | | $this->db->query($sql); |
| | | $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); |
| | | } |
| | | |
| | | // chown install dir to root and chmod 755 |
| | |
| | | |
| | | // Add symlink for patch tool |
| | | if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch'); |
| | | |
| | | |
| | | // Change mode of a few files from amavisd |
| | | if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640); |
| | | if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400); |
| | | if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); |
| | | if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | //* These postconf commands will be executed on installation and update |
| | | $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"].'.server', $conf['server_id']); |
| | | $server_ini_array = ini_to_array(stripslashes($server_ini_rec['config'])); |
| | | unset($server_ini_rec); |
| | | |
| | | //* If there are RBL's defined, format the list and add them to smtp_recipient_restrictions to prevent removeal after an update |
| | | $rbl_list = ''; |
| | | if (@isset($server_ini_array['mail']['realtime_blackhole_list']) && $server_ini_array['mail']['realtime_blackhole_list'] != '') { |
| | | $rbl_hosts = explode(",", str_replace(" ", "", $server_ini_array['mail']['realtime_blackhole_list'])); |
| | | foreach ($rbl_hosts as $key => $value) { |
| | | $rbl_list .= ", reject_rbl_client ". $value; |
| | | } |
| | | } |
| | | unset($rbl_hosts); |
| | | |
| | | //* If Postgrey is installed, configure it |
| | | $greylisting = ''; |
| | | if($conf['postgrey']['installed'] == true) { |
| | | $greylisting = ', check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; |
| | | } |
| | | |
| | | $reject_sender_login_mismatch = ''; |
| | | if(isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) { |
| | | $reject_sender_login_mismatch = ', reject_authenticated_sender_login_mismatch'; |
| | | } |
| | | unset($server_ini_array); |
| | | |
| | | $postconf_placeholders = array('{config_dir}' => $config_dir, |
| | | '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'], |
| | | '{vmail_userid}' => $cf['vmail_userid'], |
| | | '{vmail_groupid}' => $cf['vmail_groupid'], |
| | | '{rbl_list}' => $rbl_list); |
| | | '{rbl_list}' => $rbl_list, |
| | | '{greylisting}' => $greylisting, |
| | | '{reject_slm}' => $reject_sender_login_mismatch, |
| | | ); |
| | | |
| | | $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/gentoo_postfix.conf.master', 'tpl/gentoo_postfix.conf.master'); |
| | | $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders); |
| | |
| | | |
| | | // check if virtual_transport must be changed |
| | | if ($this->is_update) { |
| | | $tmp = $this->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); |
| | | $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"].".server", $conf['server_id']); |
| | | $ini_array = ini_to_array(stripslashes($tmp['config'])); |
| | | // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni() |
| | | |
| | |
| | | global $conf; |
| | | |
| | | //* Create the database |
| | | if(!$this->db->query('CREATE DATABASE IF NOT EXISTS '.$conf['powerdns']['database'].' DEFAULT CHARACTER SET '.$conf['mysql']['charset'])) { |
| | | if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['powerdns']['database'], $conf['mysql']['charset'])) { |
| | | $this->error('Unable to create MySQL database: '.$conf['powerdns']['database'].'.'); |
| | | } |
| | | |
| | | //* Create the ISPConfig database user in the local database |
| | | $query = 'GRANT ALL ON `'.$conf['powerdns']['database'].'` . * TO \''.$conf['mysql']['ispconfig_user'].'\'@\'localhost\';'; |
| | | if(!$this->db->query($query)) { |
| | | $query = 'GRANT ALL ON ??.* TO ?@?'; |
| | | if(!$this->db->query($query, $conf['powerdns']['database'], $conf['mysql']['ispconfig_user'], 'localhost')) { |
| | | $this->error('Unable to create user for powerdns database Error: '.$this->db->errorMessage); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | //* Copy the ISPConfig configuration include |
| | | /* |
| | | $content = $this->get_template_file('apache_ispconfig.conf', true); |
| | | |
| | | $records = $this->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ".$conf["server_id"]." AND virtualhost = 'y'"); |
| | | if(is_array($records) && count($records) > 0) |
| | | { |
| | | foreach($records as $rec) { |
| | | $content .= "NameVirtualHost ".$rec["ip_address"].":80\n"; |
| | | $content .= "NameVirtualHost ".$rec["ip_address"].":443\n"; |
| | | } |
| | | } |
| | | |
| | | $this->write_config_file($conf['apache']['vhost_conf_dir'].'/000-ispconfig.conf', $content); |
| | | */ |
| | | |
| | | $tpl = new tpl('apache_ispconfig.conf.master'); |
| | | $tpl->setVar('apache_version',getapacheversion()); |
| | | |
| | | $records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'"); |
| | | $records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']); |
| | | $ip_addresses = array(); |
| | | |
| | | if(is_array($records) && count($records) > 0) { |
| | |
| | | $content = str_replace('{mysql_master_server_ispconfig_password}', $conf['mysql']['master_ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_master_server_database}', $conf['mysql']['master_database'], $content); |
| | | $content = str_replace('{mysql_master_server_host}', $conf['mysql']['master_host'], $content); |
| | | $content = str_replace('{mysql_master_server_port}', $conf['mysql']['master_port'], $content); |
| | | |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content); |
| | |
| | | $db_server_enabled = ($conf['services']['db'])?1:0; |
| | | $vserver_server_enabled = ($conf['services']['vserver'])?1:0; |
| | | |
| | | $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled' WHERE server_id = ".intval($conf['server_id']); |
| | | $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ?, vserver_server = ? WHERE server_id = ?"; |
| | | |
| | | $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); |
| | | if($conf['mysql']['master_slave_setup'] == 'y') { |
| | | $this->dbmaster->query($sql); |
| | | $this->db->query($sql); |
| | | } else { |
| | | $this->db->query($sql); |
| | | $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); |
| | | } |
| | | |
| | | // chown install dir to root and chmod 755 |
| | |
| | | |
| | | // Add symlink for patch tool |
| | | if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch'); |
| | | |
| | | |
| | | // Change mode of a few files from amavisd |
| | | if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640); |
| | | if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400); |
| | | if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); |
| | | if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | //* mysql-virtual_sender.cf |
| | | $this->process_postfix_config('mysql-virtual_sender.cf'); |
| | | |
| | | //* mysql-virtual_sender_login_maps.cf |
| | | $this->process_postfix_config('mysql-virtual_sender_login_maps.cf'); |
| | | |
| | | //* mysql-virtual_client.cf |
| | | $this->process_postfix_config('mysql-virtual_client.cf'); |
| | | |
| | |
| | | |
| | | //* mysql-virtual_relayrecipientmaps.cf |
| | | $this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf'); |
| | | |
| | | //* mysql-virtual_policy_greylist.cf |
| | | $this->process_postfix_config('mysql-virtual_policy_greylist.cf'); |
| | | |
| | | //* postfix-dkim |
| | | $full_file_name=$config_dir.'/tag_as_originating.re'; |
| | |
| | | if($cf['vmail_mailbox_base'] != '' && strlen($cf['vmail_mailbox_base']) >= 10 && $this->is_update === false) exec('chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base']); |
| | | |
| | | //* These postconf commands will be executed on installation and update |
| | | $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ".$conf['server_id']); |
| | | $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ?", $conf['server_id']); |
| | | $server_ini_array = ini_to_array(stripslashes($server_ini_rec['config'])); |
| | | unset($server_ini_rec); |
| | | |
| | |
| | | } |
| | | } |
| | | unset($rbl_hosts); |
| | | unset($server_ini_array); |
| | | |
| | | //* These postconf commands will be executed on installation and update |
| | | //* If Postgrey is installed, configure it |
| | | $greylisting = ''; |
| | | if($conf['postgrey']['installed'] == true) { |
| | | $greylisting = ', check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; |
| | | } |
| | | |
| | | $reject_sender_login_mismatch = ''; |
| | | if(isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) { |
| | | $reject_sender_login_mismatch = ', reject_authenticated_sender_login_mismatch'; |
| | | } |
| | | unset($server_ini_array); |
| | | |
| | | $postconf_placeholders = array('{config_dir}' => $config_dir, |
| | | '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'], |
| | | '{vmail_userid}' => $cf['vmail_userid'], |
| | | '{vmail_groupid}' => $cf['vmail_groupid'], |
| | | '{rbl_list}' => $rbl_list); |
| | | |
| | | '{rbl_list}' => $rbl_list, |
| | | '{greylisting}' => $greylisting, |
| | | '{reject_slm}' => $reject_sender_login_mismatch, |
| | | ); |
| | | |
| | | $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_postfix.conf.master', 'tpl/opensuse_postfix.conf.master'); |
| | | $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders); |
| | | $postconf_commands = array_filter(explode("\n", $postconf_tpl)); // read and remove empty lines |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | wf("$config_dir/$configfile", $content); |
| | | |
| | | exec("chmod 660 $config_dir/$configfile"); |
| | |
| | | |
| | | // check if virtual_transport must be changed |
| | | if ($this->is_update) { |
| | | $tmp = $this->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); |
| | | $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); |
| | | $ini_array = ini_to_array(stripslashes($tmp['config'])); |
| | | // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni() |
| | | |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | wf("$config_dir/$configfile", $content); |
| | | |
| | |
| | | $content = str_replace('{mysql_server_port}', $conf["mysql"]["port"], $content); |
| | | $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content); |
| | | wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); |
| | | chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); |
| | | |
| | | |
| | | // Adding the amavisd commands to the postfix configuration |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf["mysql"]["host"], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | $content = str_replace('{server_id}', $conf["server_id"], $content); |
| | | wf($conf["mydns"]["config_dir"].'/'.$configfile, $content); |
| | | exec('chmod 600 '.$conf["mydns"]["config_dir"].'/'.$configfile); |
| | |
| | | $tpl = new tpl('apache_ispconfig.conf.master'); |
| | | $tpl->setVar('apache_version',getapacheversion()); |
| | | |
| | | $records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'"); |
| | | $records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']); |
| | | $ip_addresses = array(); |
| | | |
| | | if(is_array($records) && count($records) > 0) { |
| | |
| | | if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); |
| | | } |
| | | |
| | | public function configure_firewall() |
| | | public function configure_bastille_firewall() |
| | | { |
| | | global $conf; |
| | | |
| | |
| | | $tcp_public_services = ''; |
| | | $udp_public_services = ''; |
| | | |
| | | $row = $this->db->queryOneRecord('SELECT * FROM '.$conf["mysql"]["database"].'.firewall WHERE server_id = '.intval($conf['server_id'])); |
| | | $row = $this->db->queryOneRecord('SELECT * FROM ?? WHERE server_id = ?', $conf["mysql"]["database"] . '.firewall', $conf['server_id']); |
| | | |
| | | if(trim($row["tcp_port"]) != '' || trim($row["udp_port"]) != ''){ |
| | | $tcp_public_services = trim(str_replace(',', ' ', $row["tcp_port"])); |
| | |
| | | |
| | | if(!stristr($tcp_public_services, $conf['apache']['vhost_port'])) { |
| | | $tcp_public_services .= ' '.intval($conf['apache']['vhost_port']); |
| | | if($row["tcp_port"] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ',".intval($conf['apache']['vhost_port'])."' WHERE server_id = ".intval($conf['server_id'])); |
| | | if($row["tcp_port"] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ? WHERE server_id = ?", ',' . intval($conf['apache']['vhost_port']), $conf['server_id']); |
| | | } |
| | | |
| | | $content = str_replace("{TCP_PUBLIC_SERVICES}", $tcp_public_services, $content); |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | |
| | | $content = str_replace('{mysql_master_server_ispconfig_user}', $conf['mysql']['master_ispconfig_user'], $content); |
| | | $content = str_replace('{mysql_master_server_ispconfig_password}', $conf['mysql']['master_ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_master_server_database}', $conf['mysql']['master_database'], $content); |
| | | $content = str_replace('{mysql_master_server_host}', $conf['mysql']['master_host'], $content); |
| | | $content = str_replace('{mysql_master_server_port}', $conf['mysql']['master_port'], $content); |
| | | |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content); |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | |
| | | $content = str_replace('{mysql_master_server_ispconfig_user}', $conf['mysql']['master_ispconfig_user'], $content); |
| | | $content = str_replace('{mysql_master_server_ispconfig_password}', $conf['mysql']['master_ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_master_server_database}', $conf['mysql']['master_database'], $content); |
| | | $content = str_replace('{mysql_master_server_host}', $conf['mysql']['master_host'], $content); |
| | | $content = str_replace('{mysql_master_server_port}', $conf['mysql']['master_port'], $content); |
| | | |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content); |
| | |
| | | $file_server_enabled = ($conf['services']['file'])?1:0; |
| | | $db_server_enabled = ($conf['services']['db'])?1:0; |
| | | $vserver_server_enabled = ($conf['services']['vserver'])?1:0; |
| | | $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled' WHERE server_id = ".intval($conf['server_id']); |
| | | $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ?, vserver_server = ? WHERE server_id = ?"; |
| | | |
| | | $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); |
| | | if($conf['mysql']['master_slave_setup'] == 'y') { |
| | | $this->dbmaster->query($sql); |
| | | $this->db->query($sql); |
| | | } else { |
| | | $this->db->query($sql); |
| | | $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); |
| | | } |
| | | |
| | | // chown install dir to root and chmod 755 |
| | |
| | | |
| | | // Add symlink for patch tool |
| | | if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch'); |
| | | |
| | | |
| | | |
| | | // Change mode of a few files from amavisd |
| | | if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640); |
| | | if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400); |
| | | if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); |
| | | if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400); |
| | | } |
| | | |
| | | } |
| | |
| | | //** Get the hostname |
| | | $tmp_out = array(); |
| | | exec('hostname -f', $tmp_out); |
| | | $conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg server1.domain.tld ', @$tmp_out[0],'hostname'); |
| | | $conf['hostname'] = @$tmp_out[0]; |
| | | unset($tmp_out); |
| | | //** Prevent empty hostname |
| | | $check = false; |
| | | do { |
| | | $conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg server1.domain.tld ', $conf['hostname'], 'hostname'); |
| | | $conf['hostname']=trim($conf['hostname']); |
| | | $check = @($conf['hostname'] !== '')?true:false; |
| | | if(!$check) swriteln('Hostname may not be empty.'); |
| | | } while (!$check); |
| | | |
| | | // Check if the mysql functions are loaded in PHP |
| | | if(!function_exists('mysql_connect')) die('No PHP MySQL functions available. Please ensure that the PHP MySQL module is loaded.'); |
| | |
| | | $finished = false; |
| | | do { |
| | | $tmp_mysql_server_host = $inst->free_query('MySQL server hostname', $conf['mysql']['host'],'mysql_hostname'); |
| | | $tmp_mysql_server_port = $inst->free_query('MySQL server port', $conf['mysql']['port'],'mysql_port'); |
| | | $tmp_mysql_server_admin_user = $inst->free_query('MySQL root username', $conf['mysql']['admin_user'],'mysql_root_user'); |
| | | $tmp_mysql_server_admin_password = $inst->free_query('MySQL root password', $conf['mysql']['admin_password'],'mysql_root_password'); |
| | | $tmp_mysql_server_database = $inst->free_query('MySQL database to create', $conf['mysql']['database'],'mysql_database'); |
| | |
| | | } |
| | | |
| | | //* Initialize the MySQL server connection |
| | | if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) { |
| | | if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, (int)$tmp_mysql_server_port)) { |
| | | $conf['mysql']['host'] = $tmp_mysql_server_host; |
| | | $conf['mysql']['port'] = $tmp_mysql_server_port; |
| | | $conf['mysql']['admin_user'] = $tmp_mysql_server_admin_user; |
| | | $conf['mysql']['admin_password'] = $tmp_mysql_server_admin_password; |
| | | $conf['mysql']['database'] = $tmp_mysql_server_database; |
| | |
| | | $inst->db = new db(); |
| | | |
| | | //** Begin with standard or expert installation |
| | | |
| | | $conf['services']['mail'] = false; |
| | | $conf['services']['web'] = false; |
| | | $conf['services']['dns'] = false; |
| | | $conf['services']['file'] = false; |
| | | $conf['services']['db'] = true; |
| | | $conf['services']['vserver'] = false; |
| | | $conf['services']['firewall'] = false; |
| | | $conf['services']['proxy'] = false; |
| | | $conf['services']['xmpp'] = false; |
| | | |
| | | if($install_mode == 'standard') { |
| | | |
| | | //* Create the MySQL database |
| | | $inst->configure_database(); |
| | | |
| | | //* Insert the Server record into the database |
| | | $inst->add_database_server_record(); |
| | | |
| | | //* Configure Postgrey |
| | | $force = @($conf['postgrey']['installed']) ? true : $inst->force_configure_app('Postgrey'); |
| | | if($force) swriteln('Configuring Postgrey'); |
| | | |
| | | //* Configure Postfix |
| | | $force = @($conf['postfix']['installed']) ? true : $inst->force_configure_app('Postfix'); |
| | | if($force) { |
| | | swriteln('Configuring Postfix'); |
| | | $inst->configure_postfix(); |
| | | $conf['services']['mail'] = true; |
| | | } |
| | | |
| | | if($conf['services']['mail']) { |
| | | |
| | | //* Configure Mailman |
| | | $force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman'); |
| | | if($force) { |
| | | swriteln('Configuring Mailman'); |
| | | $inst->configure_mailman(); |
| | | } |
| | | |
| | | //* Check for Dovecot and Courier |
| | | if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) { |
| | | $conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot'); |
| | | $conf['courier']['installed'] = $inst->force_configure_app('Courier'); |
| | | } |
| | | //* Configure Mailserver - Dovecot or Courier |
| | | if($conf['dovecot']['installed'] && $conf['courier']['installed']) { |
| | | $mail_server_to_use = $inst->simple_query('Dovecot and Courier detected. Select server to use with ISPConfig:', array('dovecot', 'courier'), 'dovecot','mail_server'); |
| | | if($mail_server_to_use == 'dovecot'){ |
| | | $conf['courier']['installed'] = false; |
| | | } else { |
| | | $conf['dovecot']['installed'] = false; |
| | | } |
| | | } |
| | | //* Configure Dovecot |
| | | if($conf['dovecot']['installed']) { |
| | | swriteln('Configuring Dovecot'); |
| | | $inst->configure_dovecot(); |
| | | } |
| | | //* Configure Courier |
| | | if($conf['courier']['installed']) { |
| | | swriteln('Configuring Courier'); |
| | | $inst->configure_courier(); |
| | | swriteln('Configuring SASL'); |
| | | $inst->configure_saslauthd(); |
| | | swriteln('Configuring PAM'); |
| | | $inst->configure_pam(); |
| | | } |
| | | |
| | | //* Configure Spamasassin |
| | | $force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin'); |
| | | if($force) { |
| | | swriteln('Configuring Spamassassin'); |
| | | $inst->configure_spamassassin(); |
| | | } |
| | | |
| | | //* Configure Amavis |
| | | $force = @($conf['amavis']['installed']) ? true : $inst->force_configure_app('Amavisd'); |
| | | if($force) { |
| | | swriteln('Configuring Amavisd'); |
| | | $inst->configure_amavis(); |
| | | } |
| | | |
| | | //* Configure Getmail |
| | | $force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail'); |
| | | if($force) { |
| | | swriteln('Configuring Getmail'); |
| | | $inst->configure_getmail(); |
| | | } |
| | | |
| | | } else swriteln('[ERROR] Postfix not installed - skipping Mail'); |
| | | |
| | | //* Check for DNS |
| | | if(!$conf['powerdns']['installed'] && !$conf['bind']['installed'] && !$conf['mydns']['installed']) { |
| | | $conf['powerdns']['installed'] = $inst->force_configure_app('PowerDNS'); |
| | | $conf['bind']['installed'] = $inst->force_configure_app('BIND'); |
| | | $conf['mydns']['installed'] = $inst->force_configure_app('MyDNS'); |
| | | } |
| | | //* Configure PowerDNS |
| | | if($conf['powerdns']['installed']) { |
| | | swriteln('Configuring PowerDNS'); |
| | | $inst->configure_powerdns(); |
| | | $conf['services']['dns'] = true; |
| | | } |
| | | //* Configure Bind |
| | | if($conf['bind']['installed']) { |
| | | swriteln('Configuring BIND'); |
| | | $inst->configure_bind(); |
| | | $conf['services']['dns'] = true; |
| | | } |
| | | //* Configure MyDNS |
| | | if($conf['mydns']['installed']) { |
| | | swriteln('Configuring MyDNS'); |
| | | $inst->configure_mydns(); |
| | | $conf['services']['dns'] = true; |
| | | } |
| | | |
| | | //* Configure Jailkit |
| | | $force = @($conf['jailkit']['installed']) ? true : $inst->force_configure_app('Jailkit'); |
| | | if($force) { |
| | | swriteln('Configuring Jailkit'); |
| | | $inst->configure_jailkit(); |
| | | } |
| | | |
| | | //* Configure Pureftpd |
| | | $force = @($conf['pureftpd']['installed']) ? true : $inst->force_configure_app('pureftpd'); |
| | | if($force) { |
| | | swriteln('Configuring Pureftpd'); |
| | | $inst->configure_pureftpd(); |
| | | } |
| | | |
| | | //* Check for Web-Server |
| | | if(!$conf['apache']['installed'] && !$conf['nginx']['installed']) { |
| | | $conf['apache']['installed'] = $inst->force_configure_app('Apache'); |
| | | $conf['nginx']['installed'] = $inst->force_configure_app('nginx'); |
| | | } |
| | | |
| | | //* Configure Webserver - Apache or nginx |
| | | if($conf['apache']['installed'] == true && $conf['nginx']['installed'] == true) { |
| | | if($conf['apache']['installed'] && $conf['nginx']['installed']) { |
| | | $http_server_to_use = $inst->simple_query('Apache and nginx detected. Select server to use for ISPConfig:', array('apache', 'nginx'), 'apache','http_server'); |
| | | if($http_server_to_use == 'apache'){ |
| | | $conf['nginx']['installed'] = false; |
| | |
| | | } |
| | | } |
| | | |
| | | //* Insert the Server record into the database |
| | | $inst->add_database_server_record(); |
| | | |
| | | //* Configure Postfix |
| | | $inst->configure_postfix(); |
| | | |
| | | //* Configure Mailman |
| | | if($conf['mailman']['installed'] == true) { |
| | | $inst->configure_mailman('install'); |
| | | } |
| | | |
| | | //* Configure jailkit |
| | | swriteln('Configuring Jailkit'); |
| | | $inst->configure_jailkit(); |
| | | |
| | | if($conf['dovecot']['installed'] == true) { |
| | | //* Configure Dovecot |
| | | swriteln('Configuring Dovecot'); |
| | | $inst->configure_dovecot(); |
| | | } else { |
| | | //* Configure saslauthd |
| | | swriteln('Configuring SASL'); |
| | | $inst->configure_saslauthd(); |
| | | |
| | | //* Configure PAM |
| | | swriteln('Configuring PAM'); |
| | | $inst->configure_pam(); |
| | | |
| | | //* Configure Courier |
| | | swriteln('Configuring Courier'); |
| | | $inst->configure_courier(); |
| | | } |
| | | |
| | | //* Configure Spamasassin |
| | | swriteln('Configuring Spamassassin'); |
| | | $inst->configure_spamassassin(); |
| | | |
| | | //* Configure Amavis |
| | | if($conf['amavis']['installed'] == true) { |
| | | swriteln('Configuring Amavisd'); |
| | | $inst->configure_amavis(); |
| | | } |
| | | |
| | | //* Configure Getmail |
| | | swriteln('Configuring Getmail'); |
| | | $inst->configure_getmail(); |
| | | |
| | | //* Configure Pureftpd |
| | | swriteln('Configuring Pureftpd'); |
| | | $inst->configure_pureftpd(); |
| | | |
| | | //* Configure DNS |
| | | if($conf['powerdns']['installed'] == true) { |
| | | swriteln('Configuring PowerDNS'); |
| | | $inst->configure_powerdns(); |
| | | } elseif($conf['bind']['installed'] == true) { |
| | | swriteln('Configuring BIND'); |
| | | $inst->configure_bind(); |
| | | } else { |
| | | swriteln('Configuring MyDNS'); |
| | | $inst->configure_mydns(); |
| | | } |
| | | |
| | | //* Configure Apache |
| | | if($conf['apache']['installed'] == true){ |
| | | if($conf['apache']['installed']){ |
| | | swriteln('Configuring Apache'); |
| | | $inst->configure_apache(); |
| | | $conf['services']['web'] = true; |
| | | $conf['services']['file'] = true; |
| | | //* Configure Vlogger |
| | | $force = @($conf['vlogger']['installed']) ? true : $inst->force_configure_app('vlogger'); |
| | | if($force) { |
| | | swriteln('Configuring vlogger'); |
| | | $inst->configure_vlogger(); |
| | | } |
| | | //* Configure squid |
| | | /* |
| | | $force = @($conf['squid']['installed']) ? true : $inst->force_configure_app('squid'); |
| | | if($force) { |
| | | swriteln('Configuring Squid'); |
| | | $inst->configure_squid(); |
| | | $conf['services']['proxy'] = true; |
| | | } |
| | | */ |
| | | } |
| | | |
| | | //* Configure nginx |
| | | if($conf['nginx']['installed'] == true){ |
| | | if($conf['nginx']['installed']){ |
| | | swriteln('Configuring nginx'); |
| | | $inst->configure_nginx(); |
| | | $conf['services']['web'] = true; |
| | | } |
| | | |
| | | //** Configure Vlogger |
| | | swriteln('Configuring Vlogger'); |
| | | $inst->configure_vlogger(); |
| | | //* Configure XMPP |
| | | $force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server'); |
| | | if($force) { |
| | | swriteln('Configuring Metronome XMPP Server'); |
| | | $inst->configure_xmpp(); |
| | | $conf['services']['xmpp'] = true; |
| | | } |
| | | |
| | | //** Configure apps vhost |
| | | swriteln('Configuring Apps vhost'); |
| | | $inst->configure_apps_vhost(); |
| | | |
| | | //* Configure Firewall |
| | | if($conf['ufw']['installed'] == true) { |
| | | //* Configure Ubuntu Firewall |
| | | $conf['services']['firewall'] = true; |
| | | //* Check for Firewall |
| | | if(!$conf['ufw']['installed'] && !$conf['firewall']['installed']) { |
| | | $conf['ufw']['installed'] = $inst->force_configure_app('Ubuntu Firewall'); |
| | | $conf['firewall']['installed'] = $inst->force_configure_app('Bastille Firewall'); |
| | | } |
| | | //* Configure Firewall - Ubuntu or Bastille |
| | | if($conf['ufw']['installed'] && $conf['firewall']['installed']) { |
| | | $firewall_to_use = $inst->simple_query('Ubuntu and Bastille Firewall detected. Select firewall to use with ISPConfig:', array('bastille', 'ubuntu'), 'bastille','firewall_server'); |
| | | if($firewall_to_use == 'bastille'){ |
| | | $conf['ufw']['installed'] = false; |
| | | } else { |
| | | $conf['firewall']['installed'] = false; |
| | | } |
| | | } |
| | | //* Configure Ubuntu Firewall |
| | | if($conf['ufw']['installed']){ |
| | | swriteln('Configuring Ubuntu Firewall'); |
| | | $inst->configure_ufw_firewall(); |
| | | } else { |
| | | //* Configure Bastille Firewall |
| | | $conf['services']['firewall'] = true; |
| | | } |
| | | //* Configure Bastille Firewall |
| | | if($conf['firewall']['installed']){ |
| | | swriteln('Configuring Bastille Firewall'); |
| | | $inst->configure_bastille_firewall(); |
| | | $conf['services']['firewall'] = true; |
| | | } |
| | | |
| | | //* Configure Fail2ban |
| | | if($conf['fail2ban']['installed'] == true) { |
| | | $force = @($conf['fail2ban']['installed']) ? true : $inst->force_configure_app('Fail2ban'); |
| | | if($force) { |
| | | swriteln('Configuring Fail2ban'); |
| | | $inst->configure_fail2ban(); |
| | | } |
| | | |
| | | /* |
| | | if($conf['squid']['installed'] == true) { |
| | | $conf['services']['proxy'] = true; |
| | | swriteln('Configuring Squid'); |
| | | $inst->configure_squid(); |
| | | } else if($conf['nginx']['installed'] == true) { |
| | | $conf['services']['proxy'] = true; |
| | | swriteln('Configuring Nginx'); |
| | | $inst->configure_nginx(); |
| | | //* Configure OpenVZ |
| | | $force = @($conf['openvz']['installed']) ? true : $inst->force_configure_app('OpenVZ'); |
| | | if($force) { |
| | | $conf['services']['vserver'] = true; |
| | | swriteln('Configuring OpenVZ'); |
| | | } |
| | | */ |
| | | |
| | | //** Configure apps vhost |
| | | swriteln('Configuring Apps vhost'); |
| | | $inst->configure_apps_vhost(); |
| | | |
| | | //* Configure ISPConfig |
| | | swriteln('Installing ISPConfig'); |
| | | |
| | | //** Customize the port ISPConfig runs on |
| | | $ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port'); |
| | | $conf['interface_password'] = $inst->free_query('Admin password', 'admin'); |
| | | if($conf['interface_password'] != 'admin') { |
| | | $check = false; |
| | | do { |
| | | unset($temp_password); |
| | | $temp_password = $inst->free_query('Re-enter admin password', ''); |
| | | $check = @($temp_password == $conf['interface_password'])?true:false; |
| | | if(!$check) swriteln('Passwords do not match.'); |
| | | } while (!$check); |
| | | } |
| | | unset($check); |
| | | unset($temp_password); |
| | | if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port; |
| | | if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port; |
| | | unset($ispconfig_vhost_port); |
| | |
| | | $inst->configure_dbserver(); |
| | | |
| | | //* Configure ISPConfig |
| | | swriteln('Installing ISPConfig crontab'); |
| | | $inst->install_crontab(); |
| | | if($conf['cron']['installed']) { |
| | | swriteln('Installing ISPConfig crontab'); |
| | | $inst->install_crontab(); |
| | | } else swriteln('[ERROR] Cron not found'); |
| | | |
| | | swriteln('Restarting services ...'); |
| | | if($conf['mysql']['installed'] == true && $conf['mysql']['init_script'] != '') system($inst->getinitcommand($conf['mysql']['init_script'], 'restart').' >/dev/null 2>&1'); |
| | |
| | | //if($conf['squid']['installed'] == true && $conf['squid']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['squid']['init_script'])) system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); |
| | | if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'restart').' &> /dev/null'); |
| | | if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '') system($inst->getinitcommand($conf['ufw']['init_script'], 'restart').' &> /dev/null'); |
| | | if($conf['xmpp']['installed'] == true && $conf['xmpp']['init_script'] != '') system($inst->getinitcommand($conf['xmpp']['init_script'], 'restart').' &> /dev/null'); |
| | | |
| | | } else { |
| | | |
| | | //* In expert mode, we select the services in the following steps, only db is always available |
| | | $conf['services']['mail'] = false; |
| | | $conf['services']['web'] = false; |
| | | $conf['services']['dns'] = false; |
| | | $conf['services']['db'] = true; |
| | | $conf['services']['firewall'] = false; |
| | | $conf['services']['proxy'] = false; |
| | | |
| | | } else { //* expert mode |
| | | |
| | | //** Get Server ID |
| | | // $conf['server_id'] = $inst->free_query('Unique Numeric ID of the server','1'); |
| | |
| | | $finished = false; |
| | | do { |
| | | $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname'); |
| | | $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port'); |
| | | $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user'); |
| | | $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password'); |
| | | $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); |
| | | |
| | | //* Initialize the MySQL server connection |
| | | if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) { |
| | | if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, (int)$tmp_mysql_server_port)) { |
| | | $conf['mysql']['master_host'] = $tmp_mysql_server_host; |
| | | $conf['mysql']['master_port'] = $tmp_mysql_server_port; |
| | | $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; |
| | | $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password; |
| | | $conf['mysql']['master_database'] = $tmp_mysql_server_database; |
| | |
| | | // initialize the connection to the master database |
| | | $inst->dbmaster = new db(); |
| | | if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); |
| | | $inst->dbmaster->dbHost = $conf['mysql']["master_host"]; |
| | | $inst->dbmaster->dbName = $conf['mysql']["master_database"]; |
| | | $inst->dbmaster->dbUser = $conf['mysql']["master_admin_user"]; |
| | | $inst->dbmaster->dbPass = $conf['mysql']["master_admin_password"]; |
| | | $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"]); |
| | | $inst->dbmaster->setDBName($conf['mysql']["master_database"]); |
| | | |
| | | } else { |
| | | // the master DB is the same then the slave DB |
| | |
| | | //* Create the mysql database |
| | | $inst->configure_database(); |
| | | |
| | | //* Check for Web-Server |
| | | if($conf['apache']['installed'] != true && $conf['nginx']['installed'] != true) { |
| | | $conf['apache']['installed'] = $inst->force_configure_app('Apache'); |
| | | $conf['nginx']['installed'] = $inst->force_configure_app('nginx'); |
| | | } |
| | | //* Configure Webserver - Apache or nginx |
| | | if($conf['apache']['installed'] == true && $conf['nginx']['installed'] == true) { |
| | | $http_server_to_use = $inst->simple_query('Apache and nginx detected. Select server to use for ISPConfig:', array('apache', 'nginx'), 'apache','http_server'); |
| | | if($http_server_to_use == 'apache'){ |
| | | $conf['nginx']['installed'] = false; |
| | | $conf['services']['file'] = true; |
| | | } else { |
| | | $conf['apache']['installed'] = false; |
| | | } |
| | |
| | | |
| | | $conf['services']['mail'] = true; |
| | | |
| | | //* Configure Postgrey |
| | | $force = @($conf['postgrey']['installed']) ? true : $inst->force_configure_app('Postgrey'); |
| | | if($force) swriteln('Configuring Postgrey'); |
| | | |
| | | //* Configure Postfix |
| | | swriteln('Configuring Postfix'); |
| | | $inst->configure_postfix(); |
| | | $force = @($conf['postfix']['installed']) ? true : $inst->force_configure_app('Postfix'); |
| | | if($force) { |
| | | swriteln('Configuring Postfix'); |
| | | $inst->configure_postfix(); |
| | | } |
| | | |
| | | //* Configure Mailman |
| | | swriteln('Configuring Mailman'); |
| | | $inst->configure_mailman(); |
| | | $force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman'); |
| | | if($force) { |
| | | swriteln('Configuring Mailman'); |
| | | $inst->configure_mailman(); |
| | | } |
| | | |
| | | if($conf['dovecot']['installed'] == true) { |
| | | //* Configure dovecot |
| | | //* Check for Dovecot and Courier |
| | | if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) { |
| | | $conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot'); |
| | | $conf['courier']['installed'] = $inst->force_configure_app('Courier'); |
| | | } |
| | | //* Configure Mailserver - Dovecot or Courier |
| | | if($conf['dovecot']['installed'] && $conf['courier']['installed']) { |
| | | $mail_server_to_use = $inst->simple_query('Dovecot and Courier detected. Select server to use with ISPConfig:', array('dovecot', 'courier'), 'dovecot','mail_server'); |
| | | if($mail_server_to_use == 'dovecot'){ |
| | | $conf['courier']['installed'] = false; |
| | | } else { |
| | | $conf['dovecot']['installed'] = false; |
| | | } |
| | | } |
| | | //* Configure Dovecot |
| | | if($conf['dovecot']['installed']) { |
| | | swriteln('Configuring Dovecot'); |
| | | $inst->configure_dovecot(); |
| | | } else { |
| | | |
| | | //* Configure saslauthd |
| | | swriteln('Configuring SASL'); |
| | | $inst->configure_saslauthd(); |
| | | |
| | | //* Configure PAM |
| | | swriteln('Configuring PAM'); |
| | | $inst->configure_pam(); |
| | | |
| | | //* Configure courier |
| | | } |
| | | //* Configure Courier |
| | | if($conf['courier']['installed']) { |
| | | swriteln('Configuring Courier'); |
| | | $inst->configure_courier(); |
| | | swriteln('Configuring SASL'); |
| | | $inst->configure_saslauthd(); |
| | | swriteln('Configuring PAM'); |
| | | $inst->configure_pam(); |
| | | } |
| | | |
| | | //* Configure Spamasassin |
| | | swriteln('Configuring Spamassassin'); |
| | | $inst->configure_spamassassin(); |
| | | |
| | | $force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin'); |
| | | if($force) { |
| | | swriteln('Configuring Spamassassin'); |
| | | $inst->configure_spamassassin(); |
| | | } |
| | | |
| | | //* Configure Amavis |
| | | swriteln('Configuring Amavisd'); |
| | | $inst->configure_amavis(); |
| | | $force = @($conf['amavis']['installed']) ? true : $inst->force_configure_app('Amavisd'); |
| | | if($force) { |
| | | swriteln('Configuring Amavisd'); |
| | | $inst->configure_amavis(); |
| | | } |
| | | |
| | | //* Configure Getmail |
| | | swriteln('Configuring Getmail'); |
| | | $inst->configure_getmail(); |
| | | $force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail'); |
| | | if($force) { |
| | | swriteln('Configuring Getmail'); |
| | | $inst->configure_getmail(); |
| | | } |
| | | |
| | | if($conf['postfix']['installed'] == true && $conf['postfix']['init_script'] != '') system($inst->getinitcommand($conf['postfix']['init_script'], 'restart')); |
| | | if($conf['saslauthd']['installed'] == true && $conf['saslauthd']['init_script'] != '') system($inst->getinitcommand($conf['saslauthd']['init_script'], 'restart')); |
| | |
| | | if($conf['mailman']['installed'] == true && $conf['mailman']['init_script'] != '') system('nohup '.$inst->getinitcommand($conf['mailman']['init_script'], 'restart').' >/dev/null 2>&1 &'); |
| | | } |
| | | |
| | | //** Configure Jailkit |
| | | if(strtolower($inst->simple_query('Configure Jailkit', array('y', 'n'), 'y','configure_jailkit') ) == 'y') { |
| | | //* Configure Jailkit |
| | | $force = @($conf['jailkit']['installed']) ? true : $inst->force_configure_app('Jailkit'); |
| | | if($force) { |
| | | swriteln('Configuring Jailkit'); |
| | | $inst->configure_jailkit(); |
| | | } |
| | | |
| | | //** Configure Pureftpd |
| | | if(strtolower($inst->simple_query('Configure FTP Server', array('y', 'n'), 'y','configure_ftp') ) == 'y') { |
| | | //* Configure Pureftpd |
| | | $force = @($conf['pureftpd']['installed']) ? true : $inst->force_configure_app('pureftpd'); |
| | | if($force) { |
| | | swriteln('Configuring Pureftpd'); |
| | | $inst->configure_pureftpd(); |
| | | if($conf['pureftpd']['installed'] == true && $conf['pureftpd']['init_script'] != '') system($inst->getinitcommand($conf['pureftpd']['init_script'], 'restart')); |
| | | } |
| | | |
| | | //** Configure DNS |
| | | if(strtolower($inst->simple_query('Configure DNS Server', array('y', 'n'), 'y','configure_dns')) == 'y') { |
| | | $conf['services']['dns'] = true; |
| | | //* Configure DNS |
| | | if($conf['powerdns']['installed'] == true) { |
| | | |
| | | //* Check for DNS |
| | | if(!$conf['powerdns']['installed'] && !$conf['bind']['installed'] && !$conf['mydns']['installed']) { |
| | | $conf['powerdns']['installed'] = $inst->force_configure_app('PowerDNS'); |
| | | $conf['bind']['installed'] = $inst->force_configure_app('BIND'); |
| | | $conf['mydns']['installed'] = $inst->force_configure_app('MyDNS'); |
| | | } |
| | | //* Configure PowerDNS |
| | | if($conf['powerdns']['installed']) { |
| | | swriteln('Configuring PowerDNS'); |
| | | $inst->configure_powerdns(); |
| | | if($conf['powerdns']['init_script'] != '') system($inst->getinitcommand($conf['powerdns']['init_script'], 'restart').' &> /dev/null'); |
| | | } elseif($conf['bind']['installed'] == true) { |
| | | $conf['services']['dns'] = true; |
| | | } |
| | | //* Configure Bind |
| | | if($conf['bind']['installed']) { |
| | | swriteln('Configuring BIND'); |
| | | $inst->configure_bind(); |
| | | if($conf['bind']['init_script'] != '') system($inst->getinitcommand($conf['bind']['init_script'], 'restart').' &> /dev/null'); |
| | | } else { |
| | | $conf['services']['dns'] = true; |
| | | } |
| | | //* Configure MyDNS |
| | | if($conf['mydns']['installed']) { |
| | | swriteln('Configuring MyDNS'); |
| | | $inst->configure_mydns(); |
| | | if($conf['mydns']['init_script'] != '') system($inst->getinitcommand($conf['mydns']['init_script'], 'restart').' &> /dev/null'); |
| | | $conf['services']['dns'] = true; |
| | | } |
| | | |
| | | } |
| | | |
| | | /* |
| | | //** Configure Squid |
| | | if(strtolower($inst->simple_query('Configure Proxy Server', array('y','n'),'y') ) == 'y') { |
| | | if($conf['squid']['installed'] == true) { |
| | | $conf['services']['proxy'] = true; |
| | | swriteln('Configuring Squid'); |
| | | $inst->configure_squid(); |
| | | if($conf['squid']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['squid']['init_script']))system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); |
| | | } else if($conf['nginx']['installed'] == true) { |
| | | $conf['services']['proxy'] = true; |
| | | swriteln('Configuring Nginx'); |
| | | $inst->configure_nginx(); |
| | | if($conf['nginx']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['nginx']['init_script']))system($conf['init_scripts'].'/'.$conf['nginx']['init_script'].' restart &> /dev/null'); |
| | | } |
| | | } |
| | | */ |
| | | if(strtolower($inst->simple_query('Configure Web Server', array('y', 'n'), 'y','configure_webserver')) == 'y') { |
| | | $conf['services']['web'] = true; |
| | | |
| | | //** Configure Apache |
| | | if($conf['apache']['installed'] == true){ |
| | | swriteln("\nHint: If this server shall run the ISPConfig interface, select 'y' in the 'Configure Apache Server' option.\n"); |
| | | if(strtolower($inst->simple_query('Configure Apache Server', array('y', 'n'), 'y','configure_apache')) == 'y') { |
| | | $conf['services']['web'] = true; |
| | | //* Configure Apache |
| | | if($conf['apache']['installed']){ |
| | | swriteln('Configuring Apache'); |
| | | $inst->configure_apache(); |
| | | |
| | | //** Configure Vlogger |
| | | swriteln('Configuring Vlogger'); |
| | | $inst->configure_vlogger(); |
| | | |
| | | //** Configure apps vhost |
| | | swriteln('Configuring Apps vhost'); |
| | | $inst->configure_apps_vhost(); |
| | | $conf['services']['file'] = true; |
| | | //* Configure Vlogger |
| | | $force = @($conf['vlogger']['installed']) ? true : $inst->force_configure_app('vlogger'); |
| | | if($force) { |
| | | swriteln('Configuring vlogger'); |
| | | $inst->configure_vlogger(); |
| | | } |
| | | //* Configure squid |
| | | /* |
| | | $force = @($conf['squid']['installed']) ? true : $inst->force_configure_app('squid'); |
| | | if($force) { |
| | | swriteln('Configuring Squid'); |
| | | $inst->configure_squid(); |
| | | $conf['services']['proxy'] = true; |
| | | if($conf['squid']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['squid']['init_script']))system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); |
| | | } |
| | | */ |
| | | } |
| | | } |
| | | |
| | | //** Configure nginx |
| | | if($conf['nginx']['installed'] == true){ |
| | | swriteln("\nHint: If this server shall run the ISPConfig interface, select 'y' in the 'Configure nginx Server' option.\n"); |
| | | if(strtolower($inst->simple_query('Configure nginx Server', array('y', 'n'), 'y','configure_nginx')) == 'y') { |
| | | $conf['services']['web'] = true; |
| | | //* Configure nginx |
| | | if($conf['nginx']['installed']){ |
| | | swriteln('Configuring nginx'); |
| | | $inst->configure_nginx(); |
| | | |
| | | //** Configure Vlogger |
| | | //swriteln('Configuring Vlogger'); |
| | | //$inst->configure_vlogger(); |
| | | |
| | | //** Configure apps vhost |
| | | swriteln('Configuring Apps vhost'); |
| | | $inst->configure_apps_vhost(); |
| | | } |
| | | } |
| | | |
| | | //** Configure Firewall |
| | | if($conf['openvz']['installed'] = true && strtolower($inst->simple_query('Enable Openvz-Server', array('y', 'n'), 'y','configure_openvz')) == 'y') |
| | | $conf['services']['vserver'] = true; |
| | | |
| | | if(strtolower($inst->simple_query('Configure Firewall Server', array('y', 'n'), 'y','configure_firewall')) == 'y') { |
| | | //if($conf['bastille']['installed'] == true) { |
| | | //* Configure Bastille Firewall |
| | | $conf['services']['firewall'] = true; |
| | | swriteln('Configuring Bastille Firewall'); |
| | | $inst->configure_firewall(); |
| | | /*} elseif($conf['ufw']['installed'] == true) { |
| | | //* Configure Ubuntu Firewall |
| | | $conf['services']['firewall'] = true; |
| | | //* Check for Firewall |
| | | if(!$conf['ufw']['installed'] && !$conf['firewall']['installed']) { |
| | | $conf['ufw']['installed'] = $inst->force_configure_app('Ubuntu Firewall'); |
| | | $conf['firewall']['installed'] = $inst->force_configure_app('Bastille Firewall'); |
| | | } |
| | | //* Configure Firewall - Ubuntu or Bastille |
| | | if($conf['ufw']['installed'] && $conf['firewall']['installed']) { |
| | | $firewall_to_use = $inst->simple_query('Ubuntu and Bastille Firewall detected. Select firewall to use with ISPConfig:', array('bastille', 'ubuntu'), 'bastille','firewall_server'); |
| | | if($firewall_to_use == 'bastille'){ |
| | | $conf['ufw']['installed'] = false; |
| | | } else { |
| | | $conf['firewall']['installed'] = false; |
| | | } |
| | | } |
| | | //* Configure Ubuntu Firewall |
| | | if($conf['ufw']['installed']){ |
| | | swriteln('Configuring Ubuntu Firewall'); |
| | | $inst->configure_ufw_firewall(); |
| | | } else { |
| | | //* Configure Bastille Firewall |
| | | $conf['services']['firewall'] = true; |
| | | } |
| | | //* Configure Bastille Firewall |
| | | if($conf['firewall']['installed']){ |
| | | swriteln('Configuring Bastille Firewall'); |
| | | $inst->configure_bastille_firewall(); |
| | | $conf['services']['firewall'] = true; |
| | | } |
| | | */ |
| | | } |
| | | |
| | | //** Configure Firewall |
| | | /*if(strtolower($inst->simple_query('Configure Firewall Server',array('y','n'),'y')) == 'y') { |
| | | swriteln('Configuring Firewall'); |
| | | $inst->configure_firewall(); |
| | | }*/ |
| | | //* Configure XMPP |
| | | $force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server'); |
| | | if($force) { |
| | | swriteln('Configuring Metronome XMPP Server'); |
| | | $inst->configure_xmpp(); |
| | | $conf['services']['xmpp'] = true; |
| | | } |
| | | |
| | | //** Configure ISPConfig :-) |
| | | $install_ispconfig_interface_default = ($conf['mysql']['master_slave_setup'] == 'y')?'n':'y'; |
| | |
| | | |
| | | //** Customise the port ISPConfig runs on |
| | | $ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port'); |
| | | $conf['interface_password'] = $inst->free_query('Admin password', 'admin'); |
| | | if($conf['interface_password'] != 'admin') { |
| | | $check = false; |
| | | do { |
| | | unset($temp_password); |
| | | $temp_password = $inst->free_query('Re-enter admin password', ''); |
| | | $check = @($temp_password == $conf['interface_password'])?true:false; |
| | | if(!$check) swriteln('Passwords do not match.'); |
| | | } while (!$check); |
| | | } |
| | | unset($check); |
| | | unset($temp_password); |
| | | if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port; |
| | | if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port; |
| | | unset($ispconfig_vhost_port); |
| | |
| | | |
| | | } //* << $install_mode / 'Standard' or Genius |
| | | |
| | | $inst->create_mount_script(); |
| | | |
| | | //* Create md5 filelist |
| | | $md5_filename = '/usr/local/ispconfig/security/data/file_checksums_'.date('Y-m-d_h-i').'.md5'; |
| | | exec('find /usr/local/ispconfig -type f -print0 | xargs -0 md5sum > '.$md5_filename); |
| | |
| | | echo "Installation completed.\n"; |
| | | |
| | | |
| | | ?> |
| | | ?> |
| | |
| | | $mainver = array_filter($mainver); |
| | | $mainver = current($mainver).'.'.next($mainver); |
| | | switch ($mainver){ |
| | | case "15.04": |
| | | $relname = "(Vivid Vervet)"; |
| | | break; |
| | | case "14.10": |
| | | $relname = "(Utopic Unicorn)"; |
| | | break; |
| | |
| | | $distid = 'debian60'; |
| | | $distbaseid = 'debian'; |
| | | swriteln("Operating System: Debian 7.0 (Wheezy/Sid) or compatible\n"); |
| | | } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '8') || substr(trim(file_get_contents('/etc/debian_version')),0,1) == '8') { |
| | | $distname = 'Debian'; |
| | | $distver = 'Jessie'; |
| | | $distid = 'debian60'; |
| | | $distbaseid = 'debian'; |
| | | swriteln("Operating System: Debian 8.0 (Jessie) or compatible\n"); |
| | | } else { |
| | | $distname = 'Debian'; |
| | | $distver = 'Unknown'; |
| | |
| | | |
| | | if(is_installed('mysql') || is_installed('mysqld')) $conf['mysql']['installed'] = true; |
| | | if(is_installed('postfix')) $conf['postfix']['installed'] = true; |
| | | if(is_installed('mailman')) $conf['mailman']['installed'] = true; |
| | | if(is_installed('postgrey')) $conf['postgrey']['installed'] = true; |
| | | if(is_installed('mailman') || is_installed('mmsitepass')) $conf['mailman']['installed'] = true; |
| | | if(is_installed('apache') || is_installed('apache2') || is_installed('httpd') || is_installed('httpd2')) $conf['apache']['installed'] = true; |
| | | if(is_installed('getmail')) $conf['getmail']['installed'] = true; |
| | | if(is_installed('courierlogger')) $conf['courier']['installed'] = true; |
| | |
| | | if(is_installed('iptables') && is_installed('ufw')) $conf['ufw']['installed'] = true; |
| | | if(is_installed('fail2ban-server')) $conf['fail2ban']['installed'] = true; |
| | | if(is_installed('vzctl')) $conf['openvz']['installed'] = true; |
| | | if(is_dir("/etc/Bastille")) $conf['bastille']['installed'] = true; |
| | | if(is_installed('iptables') && is_installed('bastille-netfilter')) $conf['bastille']['installed'] = true; |
| | | if(is_installed('metronome') && is_installed('metronomectl')) $conf['xmpp']['installed'] = true; |
| | | if(is_installed('spamassassin')) $conf['spamassasin']['installed'] = true; |
| | | if(is_installed('vlogger')) $conf['vlogger']['installed'] = true; |
| | | if(is_installed('cron')) $conf['cron']['installed'] = true; |
| | | |
| | | if ($conf['services']['web'] && (($conf['apache']['installed'] && is_file($conf['apache']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")) || ($conf['nginx']['installed'] && is_file($conf['nginx']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")))) $this->ispconfig_interface_installed = true; |
| | | } |
| | | |
| | | public function force_configure_app($service) { |
| | | $force = false; |
| | | swriteln("[WARN] autodetect for $service failed"); |
| | | if(strtolower($this->simple_query("Force configure $service", array('y', 'n'), 'n') ) == 'y') { |
| | | // swriteln("Configure $service"); |
| | | $force = true; |
| | | } else swriteln("Skipping $service\n"); |
| | | return $force; |
| | | } |
| | | |
| | | |
| | | /** Create the database for ISPConfig */ |
| | | |
| | |
| | | global $conf; |
| | | |
| | | //** Create the database |
| | | if(!$this->db->query('CREATE DATABASE IF NOT EXISTS '.$conf['mysql']['database'].' DEFAULT CHARACTER SET '.$conf['mysql']['charset'])) { |
| | | if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['mysql']['database'], $conf['mysql']['charset'])) { |
| | | $this->error('Unable to create MySQL database: '.$conf['mysql']['database'].'.'); |
| | | } |
| | | |
| | | //* Set the database name in the DB library |
| | | $this->db->dbName = $conf['mysql']['database']; |
| | | $this->db->setDBName($conf['mysql']['database']); |
| | | |
| | | //* Load the database dump into the database, if database contains no tables |
| | | $db_tables = $this->db->getTables(); |
| | |
| | | } |
| | | |
| | | //* Load system.ini into the sys_ini table |
| | | $system_ini = $this->db->quote(rf('tpl/system.ini.master')); |
| | | $this->db->query("UPDATE sys_ini SET config = '$system_ini' WHERE sysini_id = 1"); |
| | | $system_ini = rf('tpl/system.ini.master'); |
| | | $this->db->query("UPDATE sys_ini SET config = ? WHERE sysini_id = 1", $system_ini); |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | // Delete ISPConfig user in the local database, in case that it exists |
| | | $this->db->query("DELETE FROM mysql.user WHERE User = '".$conf['mysql']['ispconfig_user']."' AND Host = '".$from_host."';"); |
| | | $this->db->query("DELETE FROM mysql.db WHERE Db = '".$conf['mysql']['database']."' AND Host = '".$from_host."';"); |
| | | $this->db->query('FLUSH PRIVILEGES;'); |
| | | $this->db->query("DELETE FROM mysql.user WHERE User = ? AND Host = ?", $conf['mysql']['ispconfig_user'], $from_host); |
| | | $this->db->query("DELETE FROM mysql.db WHERE Db = ? AND Host = ?", $conf['mysql']['database'], $from_host); |
| | | $this->db->query('FLUSH PRIVILEGES'); |
| | | |
| | | //* Create the ISPConfig database user in the local database |
| | | $query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$conf['mysql']['database'].".* " |
| | | ."TO '".$conf['mysql']['ispconfig_user']."'@'".$from_host."' " |
| | | ."IDENTIFIED BY '".$conf['mysql']['ispconfig_password']."';"; |
| | | if(!$this->db->query($query)) { |
| | | $query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON ?? TO ?@? IDENTIFIED BY ?'; |
| | | if(!$this->db->query($query, $conf['mysql']['database'] . ".*", $conf['mysql']['ispconfig_user'], $from_host, $conf['mysql']['ispconfig_password'])) { |
| | | $this->error('Unable to create database user: '.$conf['mysql']['ispconfig_user'].' Error: '.$this->db->errorMessage); |
| | | } |
| | | |
| | |
| | | $this->db->query('FLUSH PRIVILEGES;'); |
| | | |
| | | //* Set the database name in the DB library |
| | | $this->db->dbName = $conf['mysql']['database']; |
| | | $this->db->setDBName($conf['mysql']['database']); |
| | | |
| | | $tpl_ini_array = ini_to_array(rf('tpl/server.ini.master')); |
| | | |
| | |
| | | } |
| | | |
| | | $server_ini_content = array_to_ini($tpl_ini_array); |
| | | $server_ini_content = mysql_real_escape_string($server_ini_content); |
| | | |
| | | |
| | | $mail_server_enabled = ($conf['services']['mail'])?1:0; |
| | | $web_server_enabled = ($conf['services']['web'])?1:0; |
| | | $dns_server_enabled = ($conf['services']['dns'])?1:0; |
| | |
| | | if($conf['mysql']['master_slave_setup'] == 'y') { |
| | | |
| | | //* Insert the server record in master DB |
| | | $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', '".$conf['hostname']."', '$mail_server_enabled', '$web_server_enabled', '$dns_server_enabled', '$file_server_enabled', '$db_server_enabled', '$vserver_server_enabled', '$server_ini_content', 0, 1, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);"; |
| | | $this->dbmaster->query($sql); |
| | | $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);"; |
| | | $this->dbmaster->query($sql, $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled); |
| | | $conf['server_id'] = $this->dbmaster->insertID(); |
| | | $conf['server_id'] = $conf['server_id']; |
| | | |
| | | //* Insert the same record in the local DB |
| | | $sql = "INSERT INTO `server` (`server_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES ('".$conf['server_id']."',1, 1, 'riud', 'riud', 'r', '".$conf['hostname']."', '$mail_server_enabled', '$web_server_enabled', '$dns_server_enabled', '$file_server_enabled', '$db_server_enabled', '$vserver_server_enabled', '$server_ini_content', 0, 1, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);"; |
| | | $this->db->query($sql); |
| | | $sql = "INSERT INTO `server` (`server_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (?,1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);"; |
| | | $this->db->query($sql, $conf['server_id'], $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled); |
| | | |
| | | //* username for the ispconfig user |
| | | $conf['mysql']['master_ispconfig_user'] = 'ispcsrv'.$conf['server_id']; |
| | |
| | | |
| | | } else { |
| | | //* Insert the server, if its not a mster / slave setup |
| | | $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', '".$conf['hostname']."', '$mail_server_enabled', '$web_server_enabled', '$dns_server_enabled', '$file_server_enabled', '$db_server_enabled', '$vserver_server_enabled', '$server_ini_content', 0, 1, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);"; |
| | | $this->db->query($sql); |
| | | $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);"; |
| | | $this->db->query($sql, $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled); |
| | | $conf['server_id'] = $this->db->insertID(); |
| | | $conf['server_id'] = $conf['server_id']; |
| | | } |
| | |
| | | * if not, the user already exists and we do not need the pwd |
| | | */ |
| | | if ($value['pwd'] != ''){ |
| | | $query = "CREATE USER '".$value['user']."'@'".$host."' IDENTIFIED BY '" . $value['pwd'] . "'"; |
| | | $query = "CREATE USER ?@? IDENTIFIED BY ?"; |
| | | if ($verbose){ |
| | | echo "\n\n" . $query ."\n"; |
| | | } |
| | | $this->dbmaster->query($query); // ignore the error |
| | | $this->dbmaster->query($query, $value['user'], $host, $value['pwd']); // ignore the error |
| | | } |
| | | |
| | | /* |
| | | * Try to delete all rights of the user in case that it exists. |
| | | * In Case that it will not exist, do nothing (ignore the error!) |
| | | */ |
| | | $query = "REVOKE ALL PRIVILEGES, GRANT OPTION FROM '".$value['user']."'@'".$host."' "; |
| | | $query = "REVOKE ALL PRIVILEGES, GRANT OPTION FROM ?@?"; |
| | | if ($verbose){ |
| | | echo "\n\n" . $query ."\n"; |
| | | } |
| | | $this->dbmaster->query($query); // ignore the error |
| | | $this->dbmaster->query($query, $value['user'], $host); // ignore the error |
| | | |
| | | //* Create the ISPConfig database user in the remote database |
| | | $query = "GRANT SELECT ON ".$value['db'].".`server` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.server', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, INSERT ON ".$value['db'].".`sys_log` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, INSERT ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.sys_log', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, UPDATE(`status`, `error`) ON ".$value['db'].".`sys_datalog` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, UPDATE(`status`, `error`) ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.sys_datalog', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, UPDATE(`status`) ON ".$value['db'].".`software_update_inst` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, UPDATE(`status`) ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.software_update_inst', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, UPDATE(`updated`) ON ".$value['db'].".`server` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, UPDATE(`updated`) ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.server', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, UPDATE (`ssl_request`, `ssl_cert`, `ssl_action`, `ssl_key`) ON ".$value['db'].".`web_domain` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, UPDATE (`ssl_request`, `ssl_cert`, `ssl_action`, `ssl_key`) ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.web_domain', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT ON ".$value['db'].".`sys_group` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.sys_group', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, UPDATE (`action_state`, `response`) ON ".$value['db'].".`sys_remoteaction` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, UPDATE (`action_state`, `response`) ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.sys_remoteaction', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, INSERT , DELETE ON ".$value['db'].".`monitor_data` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, INSERT , DELETE ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.monitor_data', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, INSERT, UPDATE ON ".$value['db'].".`mail_traffic` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, INSERT, UPDATE ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.mail_traffic', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, INSERT, UPDATE ON ".$value['db'].".`web_traffic` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, INSERT, UPDATE ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.web_traffic', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, UPDATE, DELETE ON ".$value['db'].".`aps_instances` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, UPDATE, DELETE ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.aps_instances', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, DELETE ON ".$value['db'].".`aps_instances_settings` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, DELETE ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.aps_instances_settings', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, INSERT, DELETE ON ".$value['db'].".`web_backup` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, INSERT, DELETE ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.web_backup', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | |
| | | $query = "GRANT SELECT, INSERT, DELETE ON ".$value['db'].".`mail_backup` TO '".$value['user']."'@'".$host."' "; |
| | | $query = "GRANT SELECT, INSERT, DELETE ON ?? TO ?@?"; |
| | | if ($verbose){ |
| | | echo $query ."\n"; |
| | | } |
| | | if(!$this->dbmaster->query($query)) { |
| | | if(!$this->dbmaster->query($query, $value['db'] . '.mail_backup', $value['user'], $host)) { |
| | | $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); |
| | | } |
| | | } |
| | |
| | | /* |
| | | * It is all done. Relod the rights... |
| | | */ |
| | | $this->dbmaster->query('FLUSH PRIVILEGES;'); |
| | | $this->dbmaster->query('FLUSH PRIVILEGES'); |
| | | } |
| | | |
| | | } |
| | |
| | | //* mysql-virtual_sender.cf |
| | | $this->process_postfix_config('mysql-virtual_sender.cf'); |
| | | |
| | | //* mysql-virtual_sender_login_maps.cf |
| | | $this->process_postfix_config('mysql-virtual_sender_login_maps.cf'); |
| | | |
| | | //* mysql-virtual_client.cf |
| | | $this->process_postfix_config('mysql-virtual_client.cf'); |
| | | |
| | |
| | | |
| | | //* mysql-virtual_outgoing_bcc.cf |
| | | $this->process_postfix_config('mysql-virtual_outgoing_bcc.cf'); |
| | | |
| | | //* mysql-virtual_policy_greylist.cf |
| | | $this->process_postfix_config('mysql-virtual_policy_greylist.cf'); |
| | | |
| | | //* postfix-dkim |
| | | $full_file_name=$config_dir.'/tag_as_originating.re'; |
| | |
| | | if(!is_user($cf['vmail_username'])) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); |
| | | |
| | | //* These postconf commands will be executed on installation and update |
| | | $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM `" . $this->db->quote($conf["mysql"]["database"]) . "`.`server` WHERE server_id = ".$conf['server_id']); |
| | | $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']); |
| | | $server_ini_array = ini_to_array(stripslashes($server_ini_rec['config'])); |
| | | unset($server_ini_rec); |
| | | |
| | |
| | | } |
| | | } |
| | | unset($rbl_hosts); |
| | | unset($server_ini_array); |
| | | |
| | | //* If Postgrey is installed, configure it |
| | | $greylisting = ''; |
| | | if($conf['postgrey']['installed'] == true) { |
| | | $greylisting = ', check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; |
| | | } |
| | | |
| | | $reject_sender_login_mismatch = ''; |
| | | if(isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) { |
| | | $reject_sender_login_mismatch = ', reject_authenticated_sender_login_mismatch'; |
| | | } |
| | | unset($server_ini_array); |
| | | |
| | | $postconf_placeholders = array('{config_dir}' => $config_dir, |
| | | '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'], |
| | | '{vmail_userid}' => $cf['vmail_userid'], |
| | | '{vmail_groupid}' => $cf['vmail_groupid'], |
| | | '{rbl_list}' => $rbl_list); |
| | | '{rbl_list}' => $rbl_list, |
| | | '{greylisting}' => $greylisting, |
| | | '{reject_slm}' => $reject_sender_login_mismatch, |
| | | ); |
| | | |
| | | $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_postfix.conf.master', 'tpl/debian_postfix.conf.master'); |
| | | $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders); |
| | |
| | | caselog($command." &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); |
| | | |
| | | } |
| | | |
| | | |
| | | public function configure_saslauthd() { |
| | | global $conf; |
| | | |
| | |
| | | unset($parts); |
| | | unset($out); |
| | | |
| | | if(version_compare($saslversion , '2.1.23') > 0) { |
| | | //* Configfile for saslauthd versions 2.1.24 and newer |
| | | $configfile = 'sasl_smtpd2.conf'; |
| | | } else { |
| | | if(version_compare($saslversion , '2.1.23', '<=')) { |
| | | //* Configfile for saslauthd versions up to 2.1.23 |
| | | $configfile = 'sasl_smtpd.conf'; |
| | | } else { |
| | | //* Configfile for saslauthd versions 2.1.24 and newer |
| | | $configfile = 'sasl_smtpd2.conf'; |
| | | } |
| | | |
| | | if(is_file($conf['postfix']['config_dir'].'/sasl/smtpd.conf')) copy($conf['postfix']['config_dir'].'/sasl/smtpd.conf', $conf['postfix']['config_dir'].'/sasl/smtpd.conf~'); |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | wf($config_dir.'/'.$configfile, $content); |
| | | |
| | | chmod($config_dir.'/'.$configfile, 0660); |
| | |
| | | |
| | | // check if virtual_transport must be changed |
| | | if ($this->is_update) { |
| | | $tmp = $this->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); |
| | | $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); |
| | | $ini_array = ini_to_array(stripslashes($tmp['config'])); |
| | | // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni() |
| | | |
| | |
| | | unset($tmp); |
| | | |
| | | //* Copy dovecot configuration file |
| | | if(version_compare($dovecot_version,2) >= 0) { |
| | | if(version_compare($dovecot_version,1, '<=')) { //* Dovecot 1.x |
| | | if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master')) { |
| | | copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master', $config_dir.'/'.$configfile); |
| | | } else { |
| | | copy('tpl/debian_dovecot.conf.master', $config_dir.'/'.$configfile); |
| | | } |
| | | } else { //* Dovecot 2.x |
| | | if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot2.conf.master')) { |
| | | copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot2.conf.master', $config_dir.'/'.$configfile); |
| | | } else { |
| | | copy('tpl/debian_dovecot2.conf.master', $config_dir.'/'.$configfile); |
| | | } |
| | | replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0); |
| | | if(version_compare($dovecot_version,2.1) < 0) { |
| | | if(version_compare($dovecot_version, 2.1, '<')) { |
| | | removeLine($config_dir.'/'.$configfile, 'ssl_protocols ='); |
| | | } |
| | | } else { |
| | | if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master')) { |
| | | copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master', $config_dir.'/'.$configfile); |
| | | } else { |
| | | copy('tpl/debian_dovecot.conf.master', $config_dir.'/'.$configfile); |
| | | } |
| | | } |
| | | |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | wf($config_dir.'/'.$configfile, $content); |
| | | |
| | |
| | | // amavisd user config file |
| | | $configfile = 'amavisd_user_config'; |
| | | if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) copy($conf['amavis']['config_dir'].'/conf.d/50-user', $conf['amavis']['config_dir'].'/50-user~'); |
| | | if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user~')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user~', 0400); |
| | | if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400); |
| | | $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master'); |
| | | $content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content); |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content); |
| | | wf($conf['amavis']['config_dir'].'/conf.d/50-user', $content); |
| | | chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640); |
| | | |
| | | // TODO: chmod and chown on the config file |
| | | |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | wf($conf['mydns']['config_dir'].'/'.$configfile, $content); |
| | | chmod($conf['mydns']['config_dir'].'/'.$configfile, 0600); |
| | |
| | | global $conf; |
| | | |
| | | //* Create the database |
| | | if(!$this->db->query('CREATE DATABASE IF NOT EXISTS '.$conf['powerdns']['database'].' DEFAULT CHARACTER SET '.$conf['mysql']['charset'])) { |
| | | if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['powerdns']['database'], $conf['mysql']['charset'])) { |
| | | $this->error('Unable to create MySQL database: '.$conf['powerdns']['database'].'.'); |
| | | } |
| | | |
| | | //* Create the ISPConfig database user in the local database |
| | | $query = "GRANT ALL ON `".$conf['powerdns']['database']."` . * TO '".$conf['mysql']['ispconfig_user']."'@'localhost';"; |
| | | if(!$this->db->query($query)) { |
| | | $query = "GRANT ALL ON ?? TO ?@'localhost'"; |
| | | if(!$this->db->query($query, $conf['powerdns']['database'] . '.*', $conf['mysql']['ispconfig_user'])) { |
| | | $this->error('Unable to create user for powerdns database Error: '.$this->db->errorMessage); |
| | | } |
| | | |
| | | //* Reload database privelages |
| | | $this->db->query('FLUSH PRIVILEGES;'); |
| | | $this->db->query('FLUSH PRIVILEGES'); |
| | | |
| | | //* load the powerdns databse dump |
| | | if($conf['mysql']['admin_password'] == '') { |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{powerdns_database}', $conf['powerdns']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | wf($conf['powerdns']['config_dir'].'/'.$configfile, $content); |
| | | chmod($conf['powerdns']['config_dir'].'/'.$configfile, 0600); |
| | | chown($conf['powerdns']['config_dir'].'/'.$configfile, 'root'); |
| | |
| | | |
| | | //* Create the slave subdirectory |
| | | $content .= 'slave'; |
| | | if(!@is_dir($content)) mkdir($content, 0770, true); |
| | | if(!@is_dir($content)) mkdir($content, 2770, true); |
| | | |
| | | //* Chown the slave subdirectory to $conf['bind']['bind_user'] |
| | | chown($content, $conf['bind']['bind_user']); |
| | | chgrp($content, $conf['bind']['bind_group']); |
| | | chmod($content, 2770); |
| | | |
| | | } |
| | | |
| | | |
| | | public function configure_xmpp($options = '') { |
| | | global $conf; |
| | | |
| | | if($conf['xmpp']['installed'] == false) return; |
| | | //* Create the logging directory for xmpp server |
| | | if(!@is_dir('/var/log/metronome')) mkdir('/var/log/metronome', 0755, true); |
| | | chown('/var/log/metronome', 'metronome'); |
| | | if(!@is_dir('/var/run/metronome')) mkdir('/var/run/metronome', 0755, true); |
| | | chown('/var/run/metronome', 'metronome'); |
| | | if(!@is_dir('/var/lib/metronome')) mkdir('/var/lib/metronome', 0755, true); |
| | | chown('/var/lib/metronome', 'metronome'); |
| | | if(!@is_dir('/etc/metronome/hosts')) mkdir('/etc/metronome/hosts', 0755, true); |
| | | if(!@is_dir('/etc/metronome/status')) mkdir('/etc/metronome/status', 0755, true); |
| | | unlink('/etc/metronome/metronome.cfg.lua'); |
| | | |
| | | $row = $this->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $conf["server_id"]); |
| | | $server_name = $row["server_name"]; |
| | | |
| | | $tpl = new tpl('metronome_conf_main.master'); |
| | | wf('/etc/metronome/metronome.cfg.lua', $tpl->grab()); |
| | | unset($tpl); |
| | | |
| | | $tpl = new tpl('metronome_conf_global.master'); |
| | | $tpl->setVar('xmpp_admins',''); |
| | | wf('/etc/metronome/global.cfg.lua', $tpl->grab()); |
| | | unset($tpl); |
| | | |
| | | // Copy isp libs |
| | | if(!@is_dir('/usr/lib/metronome/isp-modules')) mkdir('/usr/lib/metronome/isp-modules', 0755, true); |
| | | caselog('cp -rf apps/metronome_libs/* /usr/lib/metronome/isp-modules/', __FILE__, __LINE__); |
| | | // Process db config |
| | | $full_file_name = '/usr/lib/metronome/isp-modules/mod_auth_external/db_conf.inc.php'; |
| | | $content = rf($full_file_name); |
| | | $content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content); |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content); |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | wf($full_file_name, $content); |
| | | |
| | | if(!stristr($options, 'dont-create-certs')){ |
| | | // Create SSL Certificate for localhost |
| | | echo "writing new private key to 'localhost.key'\n-----\n"; |
| | | $ssl_country = $this->free_query('Country Name (2 letter code)', 'AU'); |
| | | $ssl_locality = $this->free_query('Locality Name (eg, city)', ''); |
| | | $ssl_organisation = $this->free_query('Organization Name (eg, company)', 'Internet Widgits Pty Ltd'); |
| | | $ssl_organisation_unit = $this->free_query('Organizational Unit Name (eg, section)', ''); |
| | | $ssl_domain = $this->free_query('Common Name (e.g. server FQDN or YOUR name)', $conf['hostname']); |
| | | $ssl_email = $this->free_query('Email Address', ''); |
| | | |
| | | $tpl = new tpl('metronome_conf_ssl.master'); |
| | | $tpl->setVar('ssl_country',$ssl_country); |
| | | $tpl->setVar('ssl_locality',$ssl_locality); |
| | | $tpl->setVar('ssl_organisation',$ssl_organisation); |
| | | $tpl->setVar('ssl_organisation_unit',$ssl_organisation_unit); |
| | | $tpl->setVar('domain',$ssl_domain); |
| | | $tpl->setVar('ssl_email',$ssl_email); |
| | | wf('/etc/metronome/certs/localhost.cnf', $tpl->grab()); |
| | | unset($tpl); |
| | | // Generate new key, csr and cert |
| | | exec("(cd /etc/metronome/certs && make localhost.key)"); |
| | | exec("(cd /etc/metronome/certs && make localhost.csr)"); |
| | | exec("(cd /etc/metronome/certs && make localhost.cert)"); |
| | | exec('chmod 0400 /etc/metronome/certs/localhost.key'); |
| | | exec('chown metronome /etc/metronome/certs/localhost.key'); |
| | | }else{ |
| | | echo "-----\n"; |
| | | echo "Metronome XMPP SSL server certificate is not renewed. Run the following command manual as root to recreate it:\n"; |
| | | echo "# (cd /etc/metronome/certs && make localhost.key && make localhost.csr && make localhost.cert && chmod 0400 localhost.key && chown metronome localhost.key)\n"; |
| | | echo "-----\n"; |
| | | } |
| | | |
| | | // Copy init script |
| | | caselog('cp -f apps/metronome-init /etc/init.d/metronome', __FILE__, __LINE__); |
| | | caselog('chmod u+x /etc/init.d/metronome', __FILE__, __LINE__); |
| | | caselog('update-rc.d metronome defaults', __FILE__, __LINE__); |
| | | |
| | | exec($this->getinitcommand('xmpp', 'restart')); |
| | | |
| | | /* |
| | | writing new private key to 'smtpd.key' |
| | | ----- |
| | | You are about to be asked to enter information that will be incorporated |
| | | into your certificate request. |
| | | What you are about to enter is what is called a Distinguished Name or a DN. |
| | | There are quite a few fields but you can leave some blank |
| | | For some fields there will be a default value, |
| | | If you enter '.', the field will be left blank. |
| | | ----- |
| | | Country Name (2 letter code) [AU]: |
| | | State or Province Name (full name) [Some-State]: |
| | | Locality Name (eg, city) []: |
| | | Organization Name (eg, company) [Internet Widgits Pty Ltd]: |
| | | Organizational Unit Name (eg, section) []: |
| | | Common Name (e.g. server FQDN or YOUR name) []: |
| | | Email Address []: |
| | | * */ |
| | | |
| | | /*// Dont just copy over the virtualhost template but add some custom settings |
| | | $tpl = new tpl('apache_apps.vhost.master'); |
| | | |
| | | $tpl->setVar('apps_vhost_port',$conf['web']['apps_vhost_port']); |
| | | $tpl->setVar('apps_vhost_dir',$conf['web']['website_basedir'].'/apps'); |
| | | $tpl->setVar('apps_vhost_basedir',$conf['web']['website_basedir']); |
| | | $tpl->setVar('apps_vhost_servername',$apps_vhost_servername); |
| | | $tpl->setVar('apache_version',getapacheversion()); |
| | | |
| | | |
| | | // comment out the listen directive if port is 80 or 443 |
| | | if($conf['web']['apps_vhost_ip'] == 80 or $conf['web']['apps_vhost_ip'] == 443) { |
| | | $tpl->setVar('vhost_port_listen','#'); |
| | | } else { |
| | | $tpl->setVar('vhost_port_listen',''); |
| | | } |
| | | |
| | | wf($vhost_conf_dir.'/apps.vhost', $tpl->grab()); |
| | | unset($tpl);*/ |
| | | } |
| | | |
| | | |
| | | public function configure_apache() { |
| | |
| | | $tpl = new tpl('apache_ispconfig.conf.master'); |
| | | $tpl->setVar('apache_version',getapacheversion()); |
| | | |
| | | $records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'"); |
| | | $records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']); |
| | | $ip_addresses = array(); |
| | | |
| | | if(is_array($records) && count($records) > 0) { |
| | |
| | | //* add a sshusers group |
| | | $command = 'groupadd sshusers'; |
| | | if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); |
| | | |
| | | /* |
| | | $row = $this->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ".$conf["server_id"].""); |
| | | $ip_address = gethostbyname($row["server_name"]); |
| | | $server_name = $row["server_name"]; |
| | | |
| | | //setup proxy.conf |
| | | $configfile = 'proxy.conf'; |
| | | if(is_file($conf["nginx"]["config_dir"].'/'.$configfile)) copy($conf["nginx"]["config_dir"].'/'.$configfile,$conf["nginx"]["config_dir"].'/'.$configfile.'~'); |
| | | if(is_file($conf["nginx"]["config_dir"].'/'.$configfile.'~')) exec('chmod 400 '.$conf["nginx"]["config_dir"].'/'.$configfile.'~'); |
| | | $content = rf("tpl/nginx_".$configfile.".master"); |
| | | wf($conf["nginx"]["config_dir"].'/'.$configfile,$content); |
| | | exec('chmod 600 '.$conf["nginx"]["config_dir"].'/'.$configfile); |
| | | exec('chown root:root '.$conf["nginx"]["config_dir"].'/'.$configfile); |
| | | |
| | | //setup conf.d/cache.conf |
| | | $configfile = 'cache.conf'; |
| | | if(is_file($conf["nginx"]["config_dir"].'/conf.d/'.$configfile)) copy($conf["nginx"]["config_dir"].'/conf.d/'.$configfile,$conf["nginx"]["config_dir"].'/conf.d/'.$configfile.'~'); |
| | | if(is_file($conf["nginx"]["config_dir"].'/conf.d/'.$configfile.'~')) exec('chmod 400 '.$conf["nginx"]["config_dir"].'/conf.d/'.$configfile.'~'); |
| | | $content = rf("tpl/nginx_".$configfile.".master"); |
| | | wf($conf["nginx"]["config_dir"].'/conf.d/'.$configfile,$content); |
| | | exec('chmod 600 '.$conf["nginx"]["config_dir"].'/conf.d/'.$configfile); |
| | | exec('chown root:root '.$conf["nginx"]["config_dir"].'/conf.d/'.$configfile); |
| | | |
| | | //setup cache directories |
| | | mkdir('/var/cache/nginx/cache'); |
| | | exec('chown www-data:www-data /var/cache/nginx/cache'); |
| | | mkdir('/var/cache/nginx/temp'); |
| | | exec('chown www-data:www-data /var/cache/nginx/temp'); |
| | | */ |
| | | } |
| | | |
| | | public function configure_fail2ban() { |
| | |
| | | public function configure_squid() |
| | | { |
| | | global $conf; |
| | | $row = $this->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ".$conf["server_id"].""); |
| | | $row = $this->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $conf["server_id"]); |
| | | $ip_address = gethostbyname($row["server_name"]); |
| | | $server_name = $row["server_name"]; |
| | | |
| | |
| | | $tcp_public_services = ''; |
| | | $udp_public_services = ''; |
| | | |
| | | $row = $this->db->queryOneRecord('SELECT * FROM '.$conf["mysql"]["database"].'.firewall WHERE server_id = '.intval($conf['server_id'])); |
| | | $row = $this->db->queryOneRecord('SELECT * FROM ?? WHERE server_id = ?', $conf["mysql"]["database"] . '.firewall', $conf['server_id']); |
| | | |
| | | if(trim($row['tcp_port']) != '' || trim($row['udp_port']) != '') { |
| | | $tcp_public_services = trim(str_replace(',', ' ', $row['tcp_port'])); |
| | |
| | | |
| | | if(!stristr($tcp_public_services, $conf['apache']['vhost_port'])) { |
| | | $tcp_public_services .= ' '.intval($conf['apache']['vhost_port']); |
| | | if($row['tcp_port'] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ',".intval($conf['apache']['vhost_port'])."' WHERE server_id = ".intval($conf['server_id'])); |
| | | if($row['tcp_port'] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ? WHERE server_id = ?", ',' . intval($conf['apache']['vhost_port']), $conf['server_id']); |
| | | } |
| | | |
| | | $content = str_replace('{TCP_PUBLIC_SERVICES}', $tcp_public_services, $content); |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | |
| | | $content = str_replace('{mysql_master_server_ispconfig_user}', $conf['mysql']['master_ispconfig_user'], $content); |
| | | $content = str_replace('{mysql_master_server_ispconfig_password}', $conf['mysql']['master_ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_master_server_database}', $conf['mysql']['master_database'], $content); |
| | | $content = str_replace('{mysql_master_server_host}', $conf['mysql']['master_host'], $content); |
| | | $content = str_replace('{mysql_master_server_port}', $conf['mysql']['master_port'], $content); |
| | | |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content); |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content); |
| | | $content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content); |
| | | $content = str_replace('{mysql_server_port}', $conf['mysql']['port'], $content); |
| | | |
| | | $content = str_replace('{mysql_master_server_ispconfig_user}', $conf['mysql']['master_ispconfig_user'], $content); |
| | | $content = str_replace('{mysql_master_server_ispconfig_password}', $conf['mysql']['master_ispconfig_password'], $content); |
| | | $content = str_replace('{mysql_master_server_database}', $conf['mysql']['master_database'], $content); |
| | | $content = str_replace('{mysql_master_server_host}', $conf['mysql']['master_host'], $content); |
| | | $content = str_replace('{mysql_master_server_port}', $conf['mysql']['master_port'], $content); |
| | | |
| | | $content = str_replace('{server_id}', $conf['server_id'], $content); |
| | | $content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content); |
| | |
| | | $vserver_server_enabled = ($conf['openvz']['installed'])?1:0; |
| | | $proxy_server_enabled = ($conf['services']['proxy'])?1:0; |
| | | $firewall_server_enabled = ($conf['services']['firewall'])?1:0; |
| | | $xmpp_server_enabled = ($conf['services']['xmpp'])?1:0; |
| | | |
| | | $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled', proxy_server = '$proxy_server_enabled', firewall_server = '$firewall_server_enabled' WHERE server_id = ".intval($conf['server_id']); |
| | | $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled', proxy_server = '$proxy_server_enabled', firewall_server = '$firewall_server_enabled', xmpp_server = '.$xmpp_server_enabled.' WHERE server_id = ?"; |
| | | |
| | | $this->db->query($sql, $conf['server_id']); |
| | | if($conf['mysql']['master_slave_setup'] == 'y') { |
| | | $this->dbmaster->query($sql); |
| | | $this->db->query($sql); |
| | | } else { |
| | | $this->db->query($sql); |
| | | $this->dbmaster->query($sql, $conf['server_id']); |
| | | } |
| | | |
| | | |
| | |
| | | //* Make the shell scripts executable |
| | | $command = "chmod +x $install_dir/server/scripts/*.sh"; |
| | | caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); |
| | | |
| | | if ($this->install_ispconfig_interface == true && isset($conf['interface_password']) && $conf['interface_password']!='admin') { |
| | | $sql = "UPDATE sys_user SET passwort = md5(?) WHERE username = 'admin';"; |
| | | $this->db->query($sql, $conf['interface_password']); |
| | | } |
| | | |
| | | if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){ |
| | | //* Copy the ISPConfig vhost for the controlpanel |
| | |
| | | // Add symlink for patch tool |
| | | if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch'); |
| | | |
| | | // Change mode of a few files from amavisd |
| | | if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640); |
| | | if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400); |
| | | if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); |
| | | if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400); |
| | | } |
| | | |
| | | public function configure_dbserver() { |
| | |
| | | |
| | | } |
| | | |
| | | public function create_mount_script(){ |
| | | global $app, $conf; |
| | | $mount_script = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh'; |
| | | $mount_command = ''; |
| | | |
| | | if(is_file($mount_script)) return; |
| | | if(is_file('/etc/rc.local')){ |
| | | $rc_local = file('/etc/rc.local'); |
| | | if(is_array($rc_local) && !empty($rc_local)){ |
| | | foreach($rc_local as $line){ |
| | | $line = trim($line); |
| | | if(substr($line, 0, 1) == '#') continue; |
| | | if(strpos($line, 'sshfs') !== false && strpos($line, '/var/backup') !== false){ |
| | | $mount_command = "#!/bin/sh\n\n"; |
| | | $mount_command .= $line."\n\n"; |
| | | file_put_contents($mount_script, $mount_command); |
| | | chmod($mount_script, 0755); |
| | | chown($mount_script, 'root'); |
| | | chgrp($mount_script, 'root'); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // This function is called at the end of the update process and contains code to clean up parts of old ISPCONfig releases |
| | | public function cleanup_ispconfig() { |
| | | global $app,$conf; |
| | |
| | | if(is_file('/usr/local/ispconfig/interface/lib/classes/db_firebird.inc.php')) unlink('/usr/local/ispconfig/interface/lib/classes/db_firebird.inc.php'); |
| | | if(is_file('/usr/local/ispconfig/interface/lib/classes/form.inc.php')) unlink('/usr/local/ispconfig/interface/lib/classes/form.inc.php'); |
| | | |
| | | |
| | | // Change mode of a few files from amavisd |
| | | if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user', 0640); |
| | | if(is_file($conf['amavis']['config_dir'].'/50-user~')) chmod($conf['amavis']['config_dir'].'/50-user~', 0400); |
| | | if(is_file($conf['amavis']['config_dir'].'/amavisd.conf')) chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); |
| | | if(is_file($conf['amavis']['config_dir'].'/amavisd.conf~')) chmod($conf['amavis']['config_dir'].'/amavisd.conf~', 0400); |
| | | |
| | | } |
| | | |
| | |
| | | $tContents = str_replace('{mysql_server_database}', $conf["mysql"]["database"], $tContents); |
| | | $tContents = str_replace('{mysql_server_ip}', $conf["mysql"]["ip"], $tContents); |
| | | $tContents = str_replace('{mysql_server_host}', $conf['mysql']['host'], $tContents); |
| | | $tContents = str_replace('{mysql_server_port}', $conf['mysql']['port'], $tContents); |
| | | $tContents = str_replace('{mysql_server_port}', $conf["mysql"]["port"], $tContents); |
| | | |
| | | return $tContents; |
| | |
| | | <?php |
| | | |
| | | /* |
| | | Copyright (c) 2007, Till Brehm, projektfarm Gmbh |
| | | All rights reserved. |
| | | Copyright (c) 2005, Till Brehm, projektfarm Gmbh |
| | | All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without modification, |
| | | are permitted provided that the following conditions are met: |
| | | Redistribution and use in source and binary forms, with or without modification, |
| | | are permitted provided that the following conditions are met: |
| | | |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright notice, |
| | | this list of conditions and the following disclaimer in the documentation |
| | | and/or other materials provided with the distribution. |
| | | * Neither the name of ISPConfig nor the names of its contributors |
| | | may be used to endorse or promote products derived from this software without |
| | | specific prior written permission. |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright notice, |
| | | this list of conditions and the following disclaimer in the documentation |
| | | and/or other materials provided with the distribution. |
| | | * Neither the name of ISPConfig nor the names of its contributors |
| | | may be used to endorse or promote products derived from this software without |
| | | specific prior written permission. |
| | | |
| | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| | | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| | | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| | | IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
| | | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| | | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| | | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| | | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| | | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| | | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| | | */ |
| | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| | | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| | | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| | | IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
| | | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| | | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| | | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| | | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| | | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| | | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| | | */ |
| | | |
| | | class db |
| | | class db extends mysqli |
| | | { |
| | | var $dbHost = ""; // hostname of the MySQL server |
| | | var $dbName = ""; // logical database name on that server |
| | | var $dbUser = ""; // database authorized user |
| | | var $dbPass = ""; // user's password |
| | | var $dbCharset = ""; // what charset comes and goes to mysql: utf8 / latin1 |
| | | var $linkId = false; // last result of mysql_connect() |
| | | var $queryId = 0; // last result of mysql_query() |
| | | var $record = array(); // last record fetched |
| | | var $autoCommit = 1; // Autocommit Transactions |
| | | var $currentRow; // current row number |
| | | var $errorNumber = 0; // last error number |
| | | var $errorMessage = ""; // last error message |
| | | var $errorLocation = ""; // last error location |
| | | var $show_error_messages = false; |
| | | /**#@+ |
| | | * @access private |
| | | */ |
| | | private $_iQueryId; |
| | | private $_iConnId; |
| | | |
| | | // constructor |
| | | function db() |
| | | { |
| | | private $dbHost = ''; // hostname of the MySQL server |
| | | private $dbName = ''; // logical database name on that server |
| | | private $dbUser = ''; // database authorized user |
| | | private $dbPass = ''; // user's password |
| | | private $dbCharset = 'utf8';// Database charset |
| | | private $dbNewLink = false; // Return a new linkID when connect is called again |
| | | private $dbClientFlags = 0; // MySQL Client falgs |
| | | /**#@-*/ |
| | | |
| | | public $show_error_messages = false; // false in server, true in interface |
| | | |
| | | |
| | | /* old things - unused now //// |
| | | private $linkId = 0; // last result of mysqli_connect() |
| | | private $queryId = 0; // last result of mysqli_query() |
| | | private $record = array(); // last record fetched |
| | | private $autoCommit = 1; // Autocommit Transactions |
| | | private $currentRow; // current row number |
| | | public $errorNumber = 0; // last error number |
| | | public $errorMessage = ''; // last error message |
| | | private $errorLocation = '';// last error location |
| | | private $isConnected = false; // needed to know if we have a valid mysqli object from the constructor |
| | | //// |
| | | */ |
| | | |
| | | public function __destruct() { |
| | | if($this->_iConnId) mysqli_close($this->_iConnId); |
| | | } |
| | | |
| | | private function do_connect() { |
| | | global $conf; |
| | | |
| | | if($this->_iConnId) return true; |
| | | $this->dbHost = $conf["mysql"]["host"]; |
| | | //$this->dbName = $conf["mysql"]["database"]; |
| | | $this->dbName = false;//$conf["mysql"]["database"]; |
| | | $this->dbUser = $conf["mysql"]["admin_user"]; |
| | | $this->dbPass = $conf["mysql"]["admin_password"]; |
| | | $this->dbCharset = $conf["mysql"]["charset"]; |
| | | //$this->connect(); |
| | | } |
| | | $this->dbNewLink = false; |
| | | $this->dbClientFlags = null; |
| | | |
| | | $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); |
| | | $try = 0; |
| | | while((!is_object($this->_iConnId) || mysqli_connect_error()) && $try < 5) { |
| | | if($try > 0) sleep(1); |
| | | |
| | | // error handler |
| | | function updateError($location) |
| | | { |
| | | $this->errorNumber = mysqli_errno($this->linkId); |
| | | $this->errorMessage = mysqli_error($this->linkId); |
| | | $this->errorLocation = $location; |
| | | if($this->errorNumber && $this->show_error_messages) |
| | | { |
| | | echo '<br /><b>'.$this->errorLocation.'</b><br />'.$this->errorMessage; |
| | | flush(); |
| | | $try++; |
| | | $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); |
| | | } |
| | | |
| | | if(!is_object($this->_iConnId) || mysqli_connect_error()) { |
| | | $this->_iConnId = null; |
| | | $this->_sqlerror('Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!'); |
| | | return false; |
| | | } |
| | | |
| | | if($this->dbName) $this->setDBName($this->dbName); |
| | | |
| | | $this->_setCharset(); |
| | | } |
| | | |
| | | public function setDBData($host, $user, $password) { |
| | | $this->dbHost = $host; |
| | | $this->dbUser = $user; |
| | | $this->dbPass = $password; |
| | | } |
| | | |
| | | public function setDBName($name) { |
| | | $this->dbName = $name; |
| | | if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) { |
| | | $this->close(); |
| | | $this->_sqlerror('Datenbank nicht gefunden / Database not found'); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public function close() { |
| | | if($this->_iConnId) mysqli_close($this->_iConnId); |
| | | $this->_iConnId = null; |
| | | } |
| | | |
| | | function connect() |
| | | { |
| | | if(!$this->linkId) |
| | | { |
| | | $this->linkId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); |
| | | /* This allows our private variables to be "read" out side of the class */ |
| | | public function __get($var) { |
| | | return isset($this->$var) ? $this->$var : NULL; |
| | | } |
| | | |
| | | if(!$this->linkId) |
| | | { |
| | | $this->updateError('DB::connect()<br />mysqli_connect'); |
| | | return false; |
| | | public function _build_query_string($sQuery = '') { |
| | | $iArgs = func_num_args(); |
| | | if($iArgs > 1) { |
| | | $aArgs = func_get_args(); |
| | | |
| | | if($iArgs == 3 && $aArgs[1] === true && is_array($aArgs[2])) { |
| | | $aArgs = $aArgs[2]; |
| | | $iArgs = count($aArgs); |
| | | } else { |
| | | array_shift($aArgs); // delete the query string that is the first arg! |
| | | } |
| | | $this->queryId = @mysqli_query($this->linkId, 'SET NAMES '.$this->dbCharset); |
| | | |
| | | $iPos = 0; |
| | | $iPos2 = 0; |
| | | foreach($aArgs as $sKey => $sValue) { |
| | | $iPos2 = strpos($sQuery, '??', $iPos2); |
| | | $iPos = strpos($sQuery, '?', $iPos); |
| | | |
| | | if($iPos === false && $iPos2 === false) break; |
| | | |
| | | if($iPos2 !== false && ($iPos === false || $iPos2 <= $iPos)) { |
| | | $sTxt = $this->escape($sValue); |
| | | |
| | | if(strpos($sTxt, '.') !== false) { |
| | | $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); |
| | | $sTxt = str_replace('.`*`', '.*', $sTxt); |
| | | } else $sTxt = '`' . $sTxt . '`'; |
| | | |
| | | $sQuery = substr_replace($sQuery, $sTxt, $iPos2, 2); |
| | | $iPos2 += strlen($sTxt); |
| | | $iPos = $iPos2; |
| | | } else { |
| | | if(is_int($sValue) || is_float($sValue)) { |
| | | $sTxt = $sValue; |
| | | } elseif(is_string($sValue) && (strcmp($sValue, '#NULL#') == 0)) { |
| | | $sTxt = 'NULL'; |
| | | } elseif(is_array($sValue)) { |
| | | $sTxt = ''; |
| | | foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\''; |
| | | $sTxt = '(' . substr($sTxt, 1) . ')'; |
| | | if($sTxt == '()') $sTxt = '(0)'; |
| | | } else { |
| | | $sTxt = '\'' . $this->escape($sValue) . '\''; |
| | | } |
| | | |
| | | $sQuery = substr_replace($sQuery, $sTxt, $iPos, 1); |
| | | $iPos += strlen($sTxt); |
| | | $iPos2 = $iPos; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return $sQuery; |
| | | } |
| | | |
| | | /**#@-*/ |
| | | |
| | | |
| | | /**#@+ |
| | | * @access private |
| | | */ |
| | | private function _setCharset() { |
| | | mysqli_query($this->_iConnId, 'SET NAMES '.$this->dbCharset); |
| | | mysqli_query($this->_iConnId, "SET character_set_results = '".$this->dbCharset."', character_set_client = '".$this->dbCharset."', character_set_connection = '".$this->dbCharset."', character_set_database = '".$this->dbCharset."', character_set_server = '".$this->dbCharset."'"); |
| | | } |
| | | |
| | | private function _query($sQuery = '') { |
| | | $this->do_connect(); |
| | | |
| | | if ($sQuery == '') { |
| | | $this->_sqlerror('Keine Anfrage angegeben / No query given'); |
| | | return false; |
| | | } |
| | | |
| | | $try = 0; |
| | | do { |
| | | $try++; |
| | | $ok = mysqli_ping($this->_iConnId); |
| | | if(!$ok) { |
| | | if(!mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, $this->dbName)) { |
| | | if($this->errorNumber == '111') { |
| | | // server is not available |
| | | if($try > 9) { |
| | | $this->_sqlerror('DB::query -> error connecting'); |
| | | exit; |
| | | } |
| | | sleep(30); // additional seconds, please! |
| | | } |
| | | |
| | | if($try > 9) { |
| | | $this->_sqlerror('DB::query -> reconnect'); |
| | | return false; |
| | | } else { |
| | | sleep(($try > 7 ? 5 : 1)); |
| | | } |
| | | } else { |
| | | $this->_setCharset(); |
| | | $ok = true; |
| | | } |
| | | } |
| | | } while($ok == false); |
| | | |
| | | $aArgs = func_get_args(); |
| | | $sQuery = call_user_func_array(array(&$this, '_build_query_string'), $aArgs); |
| | | |
| | | $this->_iQueryId = mysqli_query($this->_iConnId, $sQuery); |
| | | if (!$this->_iQueryId) { |
| | | $this->_sqlerror('Falsche Anfrage / Wrong Query', false, 'SQL-Query = ' . $sQuery); |
| | | return false; |
| | | } |
| | | |
| | | return is_bool($this->_iQueryId) ? $this->_iQueryId : new db_result($this->_iQueryId, $this->_iConnId); |
| | | } |
| | | |
| | | /**#@-*/ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Executes a query |
| | | * |
| | | * Executes a given query string, has a variable amount of parameters: |
| | | * - 1 parameter |
| | | * executes the given query |
| | | * - 2 parameters |
| | | * executes the given query, replaces the first ? in the query with the second parameter |
| | | * - 3 parameters |
| | | * if the 2nd parameter is a boolean true, the 3rd parameter has to be an array containing all the replacements for every occuring ? in the query, otherwise the second parameter replaces the first ?, the third parameter replaces the second ? in the query |
| | | * - 4 or more parameters |
| | | * all ? in the query are replaced from left to right by the parameters 2 to x |
| | | * |
| | | * @access public |
| | | * @param string $sQuery query string |
| | | * @param mixed ... one or more parameters |
| | | * @return db_result the result object of the query |
| | | */ |
| | | |
| | | |
| | | public function query($sQuery = '') { |
| | | $aArgs = func_get_args(); |
| | | return call_user_func_array(array(&$this, '_query'), $aArgs); |
| | | } |
| | | |
| | | /** |
| | | * Execute a query and get first result array |
| | | * |
| | | * Executes a query and returns the first result row as an array |
| | | * This is like calling $result = $db->query(), $result->get(), $result->free() |
| | | * Use of this function @see query |
| | | * |
| | | * @access public |
| | | * @param string $sQuery query to execute |
| | | * @param ... further params (see query()) |
| | | * @return array result row or NULL if none found |
| | | */ |
| | | public function queryOneRecord($sQuery = '') { |
| | | if(!preg_match('/limit \d+\s*,\s*\d+$/i', $sQuery)) $sQuery .= ' LIMIT 0,1'; |
| | | |
| | | $aArgs = func_get_args(); |
| | | $oResult = call_user_func_array(array(&$this, 'query'), $aArgs); |
| | | if(!$oResult) return null; |
| | | |
| | | $aReturn = $oResult->get(); |
| | | $oResult->free(); |
| | | |
| | | return $aReturn; |
| | | } |
| | | |
| | | public function queryOne($sQuery = '') { |
| | | return call_user_func_array(array(&$this, 'queryOneRecord'), func_get_args()); |
| | | } |
| | | |
| | | public function query_one($sQuery = '') { |
| | | return call_user_func_array(array(&$this, 'queryOneRecord'), func_get_args()); |
| | | } |
| | | |
| | | /** |
| | | * Execute a query and return all rows |
| | | * |
| | | * Executes a query and returns all result rows in an array |
| | | * <strong>Use this with extreme care!!!</strong> Uses lots of memory on big result sets. |
| | | * |
| | | * @access public |
| | | * @param string $sQuery query to execute |
| | | * @param ... further params (see query()) |
| | | * @return array all the rows in the result set |
| | | */ |
| | | public function queryAllRecords($sQuery = '') { |
| | | $aArgs = func_get_args(); |
| | | $oResult = call_user_func_array(array(&$this, 'query'), $aArgs); |
| | | if(!$oResult) return array(); |
| | | |
| | | $aResults = array(); |
| | | while($aRow = $oResult->get()) { |
| | | $aResults[] = $aRow; |
| | | } |
| | | $oResult->free(); |
| | | |
| | | return $aResults; |
| | | } |
| | | |
| | | public function queryAll($sQuery = '') { |
| | | return call_user_func_array(array(&$this, 'queryAllRecords'), func_get_args()); |
| | | } |
| | | |
| | | public function query_all($sQuery = '') { |
| | | return call_user_func_array(array(&$this, 'queryAllRecords'), func_get_args()); |
| | | } |
| | | |
| | | /** |
| | | * Execute a query and return all rows as simple array |
| | | * |
| | | * Executes a query and returns all result rows in an array with elements |
| | | * <strong>Only first column is returned</strong> Uses lots of memory on big result sets. |
| | | * |
| | | * @access public |
| | | * @param string $sQuery query to execute |
| | | * @param ... further params (see query()) |
| | | * @return array all the rows in the result set |
| | | */ |
| | | public function queryAllArray($sQuery = '') { |
| | | $aArgs = func_get_args(); |
| | | $oResult = call_user_func_array(array(&$this, 'query'), $aArgs); |
| | | if(!$oResult) return array(); |
| | | |
| | | $aResults = array(); |
| | | while($aRow = $oResult->get()) { |
| | | $aResults[] = reset($aRow); |
| | | } |
| | | $oResult->free(); |
| | | |
| | | return $aResults; |
| | | } |
| | | |
| | | public function query_all_array($sQuery = '') { |
| | | return call_user_func_array(array(&$this, 'queryAllArray'), func_get_args()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Get id of last inserted row |
| | | * |
| | | * Gives you the id of the last inserted row in a table with an auto-increment primary key |
| | | * |
| | | * @access public |
| | | * @return int id of last inserted row or 0 if none |
| | | */ |
| | | public function insert_id() { |
| | | $iRes = mysqli_query($this->_iConnId, 'SELECT LAST_INSERT_ID() as `newid`'); |
| | | if(!is_object($iRes)) return false; |
| | | |
| | | $aReturn = mysqli_fetch_assoc($iRes); |
| | | mysqli_free_result($iRes); |
| | | |
| | | return $aReturn['newid']; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * get affected row count |
| | | * |
| | | * Gets the amount of rows affected by the previous query |
| | | * |
| | | * @access public |
| | | * @return int affected rows |
| | | */ |
| | | public function affected() { |
| | | if(!is_object($this->_iConnId)) return 0; |
| | | $iRows = mysqli_affected_rows($this->_iConnId); |
| | | if(!$iRows) $iRows = 0; |
| | | return $iRows; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * check if a utf8 string is valid |
| | | * |
| | | * @access public |
| | | * @param string $string the string to check |
| | | * @return bool true if it is valid utf8, false otherwise |
| | | */ |
| | | private function check_utf8($str) { |
| | | $len = strlen($str); |
| | | for($i = 0; $i < $len; $i++){ |
| | | $c = ord($str[$i]); |
| | | if ($c > 128) { |
| | | if (($c > 247)) return false; |
| | | elseif ($c > 239) $bytes = 4; |
| | | elseif ($c > 223) $bytes = 3; |
| | | elseif ($c > 191) $bytes = 2; |
| | | else return false; |
| | | if (($i + $bytes) > $len) return false; |
| | | while ($bytes > 1) { |
| | | $i++; |
| | | $b = ord($str[$i]); |
| | | if ($b < 128 || $b > 191) return false; |
| | | $bytes--; |
| | | } |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | } // end of check_utf8 |
| | | |
| | | function query($queryString) |
| | | { |
| | | if(!$this->connect()) |
| | | { |
| | | return false; |
| | | /** |
| | | * Escape a string for usage in a query |
| | | * |
| | | * @access public |
| | | * @param string $sString query string to escape |
| | | * @return string escaped string |
| | | */ |
| | | public function escape($sString) { |
| | | if(!is_string($sString) && !is_numeric($sString)) { |
| | | $sString = ''; |
| | | } |
| | | if($this->dbName != '') { |
| | | if(!mysqli_select_db($this->linkId, $this->dbName)) |
| | | { |
| | | $this->updateError('DB::connect()<br />mysqli_select_db'); |
| | | return false; |
| | | |
| | | $cur_encoding = mb_detect_encoding($sString); |
| | | if($cur_encoding != "UTF-8") { |
| | | if($cur_encoding != 'ASCII') { |
| | | if($cur_encoding) $sString = mb_convert_encoding($sString, 'UTF-8', $cur_encoding); |
| | | else $sString = mb_convert_encoding($sString, 'UTF-8'); |
| | | } |
| | | } elseif(!$this->check_utf8($sString)) { |
| | | $sString = utf8_encode($sString); |
| | | } |
| | | $this->queryId = @mysqli_query($this->linkId, $queryString); |
| | | $this->updateError('DB::query('.$queryString.')<br />mysqli_query'); |
| | | if(!$this->queryId) |
| | | { |
| | | return false; |
| | | } |
| | | $this->currentRow = 0; |
| | | return $this->queryId; |
| | | |
| | | if($this->_iConnId) return mysqli_real_escape_string($this->_iConnId, $sString); |
| | | else return addslashes($sString); |
| | | } |
| | | |
| | | // returns all records in an array |
| | | function queryAllRecords($queryString) |
| | | { |
| | | if(!$this->query($queryString)) |
| | | { |
| | | return false; |
| | | /** |
| | | * |
| | | * |
| | | * @access private |
| | | */ |
| | | private function _sqlerror($sErrormsg = 'Unbekannter Fehler', $sAddMsg = '') { |
| | | global $conf; |
| | | |
| | | $mysql_error = (is_object($this->_iConnId) ? mysqli_error($this->_iConnId) : mysqli_connect_error()); |
| | | $mysql_errno = (is_object($this->_iConnId) ? mysqli_errno($this->_iConnId) : mysqli_connect_errno()); |
| | | |
| | | //$sAddMsg .= getDebugBacktrace(); |
| | | |
| | | if($this->show_error_messages && $conf['demo_mode'] === false) { |
| | | echo $sErrormsg . $sAddMsg; |
| | | } |
| | | $ret = array(); |
| | | while($line = $this->nextRecord()) |
| | | { |
| | | $ret[] = $line; |
| | | } |
| | | return $ret; |
| | | } |
| | | |
| | | // returns one record in an array |
| | | function queryOneRecord($queryString) |
| | | { |
| | | if(!$this->query($queryString) || $this->numRows() == 0) |
| | | { |
| | | return false; |
| | | } |
| | | return $this->nextRecord(); |
| | | } |
| | | |
| | | // returns the next record in an array |
| | | function nextRecord() |
| | | { |
| | | $this->record = mysqli_fetch_assoc($this->queryId); |
| | | $this->updateError('DB::nextRecord()<br />mysqli_fetch_array'); |
| | | if(!$this->record || !is_array($this->record)) |
| | | { |
| | | return false; |
| | | } |
| | | $this->currentRow++; |
| | | return $this->record; |
| | | } |
| | | |
| | | // returns number of rows returned by the last select query |
| | | function numRows() |
| | | { |
| | | return mysqli_num_rows($this->queryId); |
| | | } |
| | | |
| | | function affectedRows() |
| | | { |
| | | return mysqli_affected_rows($this->linkId); |
| | | public function affectedRows() { |
| | | return $this->affected(); |
| | | } |
| | | |
| | | // returns mySQL insert id |
| | | function insertID() |
| | | { |
| | | return mysqli_insert_id($this->linkId); |
| | | public function insertID() { |
| | | return $this->insert_id(); |
| | | } |
| | | |
| | | // Check der variablen |
| | | // deprecated, now use quote |
| | | function check($formfield) |
| | | { |
| | | return $this->quote($formfield); |
| | | |
| | | //* Function to quote strings |
| | | public function quote($formfield) { |
| | | return $this->escape($formfield); |
| | | } |
| | | |
| | | // Check der variablen |
| | | function quote($formfield) |
| | | { |
| | | return mysqli_real_escape_string($this->linkId, $formfield); |
| | | } |
| | | |
| | | // Check der variablen |
| | | function unquote($formfield) |
| | | { |
| | | //* Function to unquotae strings |
| | | public function unquote($formfield) { |
| | | return stripslashes($formfield); |
| | | } |
| | | |
| | | function toLower($record) { |
| | | public function toLower($record) { |
| | | if(is_array($record)) { |
| | | foreach($record as $key => $val) { |
| | | $key = strtolower($key); |
| | |
| | | return $out; |
| | | } |
| | | |
| | | |
| | | /* TODO: rewrite SQL */ |
| | | function insert($tablename, $form, $debug = 0) |
| | | { |
| | | if(is_array($form)){ |
| | |
| | | if($debug == 1) echo "mySQL Error Message: ".$this->errorMessage; |
| | | } |
| | | } |
| | | |
| | | |
| | | /* TODO: rewrite SQL */ |
| | | function update($tablename, $form, $bedingung, $debug = 0) |
| | | { |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | function closeConn() { |
| | | |
| | | } |
| | | |
| | | function freeResult() { |
| | | |
| | | |
| | | } |
| | | |
| | | function delete() { |
| | | |
| | | } |
| | | |
| | | function Transaction($action) { |
| | | //action = begin, commit oder rollback |
| | | |
| | | } |
| | | |
| | | /* |
| | | $columns = array(action => add | alter | drop |
| | | name => Spaltenname |
| | | name_new => neuer Spaltenname, nur bei 'alter' belegt |
| | | type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob |
| | | typeValue => Wert z.B. bei Varchar |
| | | defaultValue => Default Wert |
| | | notNull => true | false |
| | | autoInc => true | false |
| | | option => unique | primary | index) |
| | | $columns = array(action => add | alter | drop |
| | | name => Spaltenname |
| | | name_new => neuer Spaltenname, nur bei 'alter' belegt |
| | | type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob |
| | | typeValue => Wert z.B. bei Varchar |
| | | defaultValue => Default Wert |
| | | notNull => true | false |
| | | autoInc => true | false |
| | | option => unique | primary | index) |
| | | |
| | | |
| | | */ |
| | | |
| | | function createTable($table_name, $columns) { |
| | | $index = ""; |
| | | $sql = "CREATE TABLE $table_name ("; |
| | | */ |
| | | /* TODO: rewrite SQL */ |
| | | public function createTable($table_name, $columns) { |
| | | $index = ''; |
| | | $sql = "CREATE TABLE ?? ("; |
| | | foreach($columns as $col){ |
| | | $sql .= $col["name"]." ".$this->mapType($col["type"], $col["typeValue"])." "; |
| | | $sql .= $col['name'].' '.$this->mapType($col['type'], $col['typeValue']).' '; |
| | | |
| | | if($col["defaultValue"] != "") { |
| | | if($col["defaultValue"] == "NULL" or $col["defaultValue"] == "NOT NULL") { |
| | | $sql .= "DEFAULT ".$col["defaultValue"]." "; |
| | | } else { |
| | | $sql .= "DEFAULT '".$col["defaultValue"]."' "; |
| | | } |
| | | |
| | | } elseif($col["defaultValue"] != false) { |
| | | $sql .= "DEFAULT '' "; |
| | | if($col['defaultValue'] != '') $sql .= "DEFAULT '".$col['defaultValue']."' "; |
| | | if($col['notNull'] == true) { |
| | | $sql .= 'NOT NULL '; |
| | | } else { |
| | | $sql .= 'NULL '; |
| | | } |
| | | if($col["defaultValue"] != "NULL" && $col["defaultValue"] != "NOT NULL") { |
| | | if($col["notNull"] == true) { |
| | | $sql .= "NOT NULL "; |
| | | } else { |
| | | $sql .= "NULL "; |
| | | } |
| | | } |
| | | if($col["autoInc"] == true) $sql .= "auto_increment "; |
| | | $sql.= ","; |
| | | if($col['autoInc'] == true) $sql .= 'auto_increment '; |
| | | $sql.= ','; |
| | | // key Definitionen |
| | | if($col["option"] == "primary") $index .= "PRIMARY KEY (".$col["name"]."),"; |
| | | if($col["option"] == "index") $index .= "INDEX (".$col["name"]."),"; |
| | | if($col["option"] == "unique") $index .= "UNIQUE (".$col["name"]."),"; |
| | | if($col['option'] == 'primary') $index .= 'PRIMARY KEY ('.$col['name'].'),'; |
| | | if($col['option'] == 'index') $index .= 'INDEX ('.$col['name'].'),'; |
| | | if($col['option'] == 'unique') $index .= 'UNIQUE ('.$col['name'].'),'; |
| | | } |
| | | $sql .= $index; |
| | | $sql = substr($sql, 0, -1); |
| | | $sql .= ")"; |
| | | |
| | | $this->query($sql); |
| | | $sql .= ')'; |
| | | /* TODO: secure parameters */ |
| | | $this->query($sql, $table_name); |
| | | return true; |
| | | } |
| | | |
| | | /* |
| | | $columns = array(action => add | alter | drop |
| | | name => Spaltenname |
| | | name_new => neuer Spaltenname, nur bei 'alter' belegt |
| | | type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob |
| | | typeValue => Wert z.B. bei Varchar |
| | | defaultValue => Default Wert |
| | | notNull => true | false |
| | | autoInc => true | false |
| | | option => unique | primary | index) |
| | | $columns = array(action => add | alter | drop |
| | | name => Spaltenname |
| | | name_new => neuer Spaltenname, nur bei 'alter' belegt |
| | | type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob |
| | | typeValue => Wert z.B. bei Varchar |
| | | defaultValue => Default Wert |
| | | notNull => true | false |
| | | autoInc => true | false |
| | | option => unique | primary | index) |
| | | |
| | | |
| | | */ |
| | | function alterTable($table_name, $columns) { |
| | | $index = ""; |
| | | $sql = "ALTER TABLE $table_name "; |
| | | */ |
| | | /* TODO: rewrite SQL */ |
| | | public function alterTable($table_name, $columns) { |
| | | $index = ''; |
| | | $sql = "ALTER TABLE ?? "; |
| | | foreach($columns as $col){ |
| | | if($col["action"] == 'add') { |
| | | $sql .= "ADD ".$col["name"]." ".$this->mapType($col["type"], $col["typeValue"])." "; |
| | | } elseif ($col["action"] == 'alter') { |
| | | $sql .= "CHANGE ".$col["name"]." ".$col["name_new"]." ".$this->mapType($col["type"], $col["typeValue"])." "; |
| | | } elseif ($col["action"] == 'drop') { |
| | | $sql .= "DROP ".$col["name"]." "; |
| | | if($col['action'] == 'add') { |
| | | $sql .= 'ADD '.$col['name'].' '.$this->mapType($col['type'], $col['typeValue']).' '; |
| | | } elseif ($col['action'] == 'alter') { |
| | | $sql .= 'CHANGE '.$col['name'].' '.$col['name_new'].' '.$this->mapType($col['type'], $col['typeValue']).' '; |
| | | } elseif ($col['action'] == 'drop') { |
| | | $sql .= 'DROP '.$col['name'].' '; |
| | | } |
| | | if($col["action"] != 'drop') { |
| | | if($col["defaultValue"] != "") $sql .= "DEFAULT '".$col["defaultValue"]."' "; |
| | | if($col["notNull"] == true) { |
| | | $sql .= "NOT NULL "; |
| | | if($col['action'] != 'drop') { |
| | | if($col['defaultValue'] != '') $sql .= "DEFAULT '".$col['defaultValue']."' "; |
| | | if($col['notNull'] == true) { |
| | | $sql .= 'NOT NULL '; |
| | | } else { |
| | | $sql .= "NULL "; |
| | | $sql .= 'NULL '; |
| | | } |
| | | if($col["autoInc"] == true) $sql .= "auto_increment "; |
| | | $sql.= ","; |
| | | // key Definitionen |
| | | if($col["option"] == "primary") $index .= "PRIMARY KEY (".$col["name"]."),"; |
| | | if($col["option"] == "index") $index .= "INDEX (".$col["name"]."),"; |
| | | if($col["option"] == "unique") $index .= "UNIQUE (".$col["name"]."),"; |
| | | if($col['autoInc'] == true) $sql .= 'auto_increment '; |
| | | $sql.= ','; |
| | | // Index definitions |
| | | if($col['option'] == 'primary') $index .= 'PRIMARY KEY ('.$col['name'].'),'; |
| | | if($col['option'] == 'index') $index .= 'INDEX ('.$col['name'].'),'; |
| | | if($col['option'] == 'unique') $index .= 'UNIQUE ('.$col['name'].'),'; |
| | | } |
| | | } |
| | | $sql .= $index; |
| | | $sql = substr($sql, 0, -1); |
| | | |
| | | /* TODO: secure parameters */ |
| | | //die($sql); |
| | | $this->query($sql); |
| | | $this->query($sql, $table_name); |
| | | return true; |
| | | } |
| | | |
| | | function dropTable($table_name) { |
| | | public function dropTable($table_name) { |
| | | $this->check($table_name); |
| | | $sql = "DROP TABLE '". $table_name."'"; |
| | | return $this->query($sql); |
| | | $sql = "DROP TABLE ??"; |
| | | return $this->query($sql, $table_name); |
| | | } |
| | | |
| | | // gibt Array mit Tabellennamen zur�ck |
| | | function getTables($database_name = '') { |
| | | |
| | | if($database_name == ''){ |
| | | $database_name = $this->dbName; |
| | | } |
| | | |
| | | $tables = $this->queryAllRecords("SHOW TABLES FROM `$database_name`"); |
| | | $tb_names = array(); |
| | | if(is_array($tables) && !empty($tables)){ |
| | | for($i = 0; $i < sizeof($tables); $i++){ |
| | | $tb_names[$i] = $tables[$i]['Tables_in_'.$database_name]; |
| | | } |
| | | } |
| | | |
| | | /* |
| | | $result = mysqli_query("SHOW TABLES FROM `$database_name`"); |
| | | $tb_names = array(); |
| | | for ($i = 0; $i < mysqli_num_rows($result); $i++) { |
| | | $tb_names[$i] = mysql_tablename($result, $i); |
| | | } |
| | | */ |
| | | public function getTables($database_name = '') { |
| | | if(!is_object($this->_iConnId)) return false; |
| | | if($database_name == '') $database_name = $this->dbName; |
| | | $tb_names = $this->queryAllArray("SHOW TABLES FROM ??", $database_name); |
| | | return $tb_names; |
| | | } |
| | | |
| | | // gibt Feldinformationen zur Tabelle zur�ck |
| | | /* |
| | | $columns = array(action => add | alter | drop |
| | | name => Spaltenname |
| | | name_new => neuer Spaltenname, nur bei 'alter' belegt |
| | | type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob |
| | | typeValue => Wert z.B. bei Varchar |
| | | defaultValue => Default Wert |
| | | notNull => true | false |
| | | autoInc => true | false |
| | | option => unique | primary | index) |
| | | $columns = array(action => add | alter | drop |
| | | name => Spaltenname |
| | | name_new => neuer Spaltenname, nur bei 'alter' belegt |
| | | type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob |
| | | typeValue => Wert z.B. bei Varchar |
| | | defaultValue => Default Wert |
| | | notNull => true | false |
| | | autoInc => true | false |
| | | option => unique | primary | index) |
| | | |
| | | |
| | | */ |
| | | |
| | | */ |
| | | /* TODO: rewrite SQL */ |
| | | function tableInfo($table_name) { |
| | | |
| | | global $go_api, $go_info; |
| | | // Tabellenfelder einlesen |
| | | |
| | | if($rows = $go_api->db->queryAllRecords("SHOW FIELDS FROM ".$table_name)){ |
| | | if($rows = $go_api->db->queryAllRecords('SHOW FIELDS FROM ??', $table_name)){ |
| | | foreach($rows as $row) { |
| | | $name = $row[0]; |
| | | $default = $row[4]; |
| | | $key = $row[3]; |
| | | $extra = $row[5]; |
| | | $isnull = $row[2]; |
| | | $type = $row[1]; |
| | | $name = $row['Field']; |
| | | $default = $row['Default']; |
| | | $key = $row['Key']; |
| | | $extra = $row['Extra']; |
| | | $isnull = $row['Null']; |
| | | $type = $row['Type']; |
| | | |
| | | |
| | | $column = array(); |
| | | |
| | | $column["name"] = $name; |
| | | //$column["type"] = $type; |
| | | $column["defaultValue"] = $default; |
| | | if(stristr($key, "PRI")) $column["option"] = "primary"; |
| | | if(stristr($isnull, "YES")) { |
| | | $column["notNull"] = false; |
| | | $column['name'] = $name; |
| | | //$column['type'] = $type; |
| | | $column['defaultValue'] = $default; |
| | | if(stristr($key, 'PRI')) $column['option'] = 'primary'; |
| | | if(stristr($isnull, 'YES')) { |
| | | $column['notNull'] = false; |
| | | } else { |
| | | $column["notNull"] = true; |
| | | $column['notNull'] = true; |
| | | } |
| | | if($extra == 'auto_increment') $column["autoInc"] = true; |
| | | if($extra == 'auto_increment') $column['autoInc'] = true; |
| | | |
| | | |
| | | // Type in Metatype umsetzen |
| | | |
| | | if(stristr($type, "int(")) $metaType = 'int32'; |
| | | if(stristr($type, "bigint")) $metaType = 'int64'; |
| | | if(stristr($type, "char")) { |
| | | if(stristr($type, 'int(')) $metaType = 'int32'; |
| | | if(stristr($type, 'bigint')) $metaType = 'int64'; |
| | | if(stristr($type, 'char')) { |
| | | $metaType = 'char'; |
| | | $tmp_typeValue = explode('(', $type); |
| | | $column["typeValue"] = substr($tmp_typeValue[1], 0, -1); |
| | | $column['typeValue'] = substr($tmp_typeValue[1], 0, -1); |
| | | } |
| | | if(stristr($type, "varchar")) { |
| | | if(stristr($type, 'varchar')) { |
| | | $metaType = 'varchar'; |
| | | $tmp_typeValue = explode('(', $type); |
| | | $column["typeValue"] = substr($tmp_typeValue[1], 0, -1); |
| | | $column['typeValue'] = substr($tmp_typeValue[1], 0, -1); |
| | | } |
| | | if(stristr($type, "text")) $metaType = 'text'; |
| | | if(stristr($type, "double")) $metaType = 'double'; |
| | | if(stristr($type, "blob")) $metaType = 'blob'; |
| | | if(stristr($type, 'text')) $metaType = 'text'; |
| | | if(stristr($type, 'double')) $metaType = 'double'; |
| | | if(stristr($type, 'blob')) $metaType = 'blob'; |
| | | |
| | | |
| | | $column["type"] = $metaType; |
| | | $column['type'] = $metaType; |
| | | |
| | | $columns[] = $column; |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | function mapType($metaType, $typeValue) { |
| | | public function mapType($metaType, $typeValue) { |
| | | global $go_api; |
| | | $metaType = strtolower($metaType); |
| | | switch ($metaType) { |
| | |
| | | return 'char'; |
| | | break; |
| | | case 'varchar': |
| | | if($typeValue < 1) die("Datenbank Fehler: F�r diesen Datentyp ist eine L�ngenangabe notwendig."); |
| | | if($typeValue < 1) die('Database failure: Lenght required for these data types.'); |
| | | return 'varchar('.$typeValue.')'; |
| | | break; |
| | | case 'text': |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * database query result class |
| | | * |
| | | * @package pxFramework |
| | | * |
| | | */ |
| | | class db_result { |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * @access private |
| | | */ |
| | | private $_iResId = null; |
| | | private $_iConnection = null; |
| | | |
| | | |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * @access private |
| | | */ |
| | | public function db_result($iResId, $iConnection) { |
| | | $this->_iResId = $iResId; |
| | | $this->_iConnection = $iConnection; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * get count of result rows |
| | | * |
| | | * Returns the amount of rows in the result set |
| | | * |
| | | * @access public |
| | | * @return int amount of rows |
| | | */ |
| | | public function rows() { |
| | | if(!is_object($this->_iResId)) return 0; |
| | | $iRows = mysqli_num_rows($this->_iResId); |
| | | if(!$iRows) $iRows = 0; |
| | | return $iRows; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Get number of affected rows |
| | | * |
| | | * Returns the amount of rows affected by the previous query |
| | | * |
| | | * @access public |
| | | * @return int amount of affected rows |
| | | */ |
| | | public function affected() { |
| | | if(!is_object($this->_iConnection)) return 0; |
| | | $iRows = mysqli_affected_rows($this->_iConnection); |
| | | if(!$iRows) $iRows = 0; |
| | | return $iRows; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Frees the result set |
| | | * |
| | | * @access public |
| | | */ |
| | | public function free() { |
| | | if(!is_object($this->_iResId)) return; |
| | | |
| | | mysqli_free_result($this->_iResId); |
| | | return; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Get a result row (associative) |
| | | * |
| | | * Returns the next row in the result set. To be used in a while loop like while($currow = $result->get()) { do something ... } |
| | | * |
| | | * @access public |
| | | * @return array result row |
| | | */ |
| | | public function get() { |
| | | $aItem = null; |
| | | |
| | | if(is_object($this->_iResId)) { |
| | | $aItem = mysqli_fetch_assoc($this->_iResId); |
| | | if(!$aItem) $aItem = null; |
| | | } |
| | | return $aItem; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Get a result row (array with numeric index) |
| | | * |
| | | * @access public |
| | | * @return array result row |
| | | */ |
| | | public function getAsRow() { |
| | | $aItem = null; |
| | | |
| | | if(is_object($this->_iResId)) { |
| | | $aItem = mysqli_fetch_row($this->_iResId); |
| | | if(!$aItem) $aItem = null; |
| | | } |
| | | return $aItem; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * database query result class |
| | | * |
| | | * emulates a db result set out of an array so you can use array results and db results the same way |
| | | * |
| | | * @package pxFramework |
| | | * @see db_result |
| | | * |
| | | * |
| | | */ |
| | | class fakedb_result { |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * @access private |
| | | */ |
| | | private $aResultData = array(); |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * @access private |
| | | */ |
| | | private $aLimitedData = array(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * @access private |
| | | */ |
| | | public function fakedb_result($aData) { |
| | | $this->aResultData = $aData; |
| | | $this->aLimitedData = $aData; |
| | | reset($this->aLimitedData); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * get count of result rows |
| | | * |
| | | * Returns the amount of rows in the result set |
| | | * |
| | | * @access public |
| | | * @return int amount of rows |
| | | */ |
| | | // Gibt die Anzahl Zeilen zurück |
| | | public function rows() { |
| | | return count($this->aLimitedData); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Frees the result set |
| | | * |
| | | * @access public |
| | | */ |
| | | // Gibt ein Ergebnisset frei |
| | | public function free() { |
| | | $this->aResultData = array(); |
| | | $this->aLimitedData = array(); |
| | | return; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Get a result row (associative) |
| | | * |
| | | * Returns the next row in the result set. To be used in a while loop like while($currow = $result->get()) { do something ... } |
| | | * |
| | | * @access public |
| | | * @return array result row |
| | | */ |
| | | // Gibt eine Ergebniszeile zurück |
| | | public function get() { |
| | | $aItem = null; |
| | | |
| | | if(!is_array($this->aLimitedData)) return $aItem; |
| | | |
| | | if(list($vKey, $aItem) = each($this->aLimitedData)) { |
| | | if(!$aItem) $aItem = null; |
| | | } |
| | | return $aItem; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Get a result row (array with numeric index) |
| | | * |
| | | * @access public |
| | | * @return array result row |
| | | */ |
| | | public function getAsRow() { |
| | | return $this->get(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Limit the result (like a LIMIT x,y in a SQL query) |
| | | * |
| | | * @access public |
| | | * @param int $iStart offset to start read |
| | | * @param int iLength amount of datasets to read |
| | | */ |
| | | public function limit_result($iStart, $iLength) { |
| | | $this->aLimitedData = array_slice($this->aResultData, $iStart, $iLength, true); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | ?> |
| | |
| | | global $inst, $conf; |
| | | |
| | | //* Update $conf array with values from the server.ini that shall be preserved |
| | | $tmp = $inst->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); |
| | | $tmp = $inst->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']); |
| | | $ini_array = ini_to_array(stripslashes($tmp['config'])); |
| | | $current_db_version = (isset($tmp['dbversion']))?intval($tmp['dbversion']):0; |
| | | |
| | |
| | | } |
| | | |
| | | //* update the database version in server table |
| | | $inst->db->query("UPDATE ".$conf["mysql"]["database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']); |
| | | if($inst->db->dbHost != $inst->dbmaster->dbHost) $inst->dbmaster->query("UPDATE ".$conf["mysql"]["master_database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']); |
| | | $inst->db->query("UPDATE ?? SET dbversion = ? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $current_db_version, $conf['server_id']); |
| | | if($inst->db->dbHost != $inst->dbmaster->dbHost) $inst->dbmaster->query("UPDATE ?? SET dbversion = ? WHERE server_id = ?", $conf["mysql"]["master_database"] . ".server", $current_db_version, $conf['server_id']); |
| | | |
| | | |
| | | //* If ISPConfig Version < 3.0.3, we will do a full db update |
| | |
| | | swriteln($inst->lng('Starting full database update.')); |
| | | |
| | | //** Delete the old database |
| | | if( !$inst->db->query('DROP DATABASE IF EXISTS '.$conf['mysql']['database']) ) { |
| | | if( !$inst->db->query('DROP DATABASE IF EXISTS ??', $conf['mysql']['database']) ) { |
| | | $inst->error('Unable to drop MySQL database: '.$conf['mysql']['database'].'.'); |
| | | } |
| | | |
| | |
| | | $db_tables = $inst->db->getTables(); |
| | | |
| | | foreach($db_tables as $table) { |
| | | $inst->db->query("TRUNCATE $table"); |
| | | $inst->db->query("TRUNCATE ??", $table); |
| | | } |
| | | |
| | | //** load old data back into database |
| | |
| | | } |
| | | |
| | | //* update the database version in server table |
| | | $inst->db->query("UPDATE ".$conf["mysql"]["database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']); |
| | | if($inst->db->dbHost != $inst->dbmaster->dbHost) $inst->dbmaster->query("UPDATE ".$conf["mysql"]["master_database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']); |
| | | $inst->db->query("UPDATE ?? SET dbversion = ? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $current_db_version, $conf['server_id']); |
| | | if($inst->db->dbHost != $inst->dbmaster->dbHost) $inst->dbmaster->query("UPDATE ?? SET dbversion = ? WHERE server_id = ?", $conf["mysql"]["master_database"] . ".server", $current_db_version, $conf['server_id']); |
| | | |
| | | if ($conf['powerdns']['installed']) { |
| | | |
| | | swriteln($inst->lng('Starting full PowerDNS database update.')); |
| | | |
| | | //** Delete the old PowerDNS database |
| | | if( !$inst->db->query('DROP DATABASE IF EXISTS '.$conf['powerdns']['database']) ) { |
| | | if( !$inst->db->query('DROP DATABASE IF EXISTS ??', $conf['powerdns']['database']) ) { |
| | | $inst->error('Unable to drop MySQL database: '.$conf['powerdns']['database'].'.'); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | //** Update server ini |
| | | $tmp_server_rec = $inst->db->queryOneRecord("SELECT config FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); |
| | | $tmp_server_rec = $inst->db->queryOneRecord("SELECT config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); |
| | | $old_ini_array = ini_to_array(stripslashes($tmp_server_rec['config'])); |
| | | unset($tmp_server_rec); |
| | | $tpl_ini_array = ini_to_array(rf('tpl/server.ini.master')); |
| | |
| | | } |
| | | |
| | | $new_ini = array_to_ini($tpl_ini_array); |
| | | $sql = "UPDATE ".$conf["mysql"]["database"].".server SET config = '".mysql_real_escape_string($new_ini)."' WHERE server_id = ".$conf['server_id']; |
| | | $inst->db->query($sql); |
| | | $sql = "UPDATE ?? SET config = ? WHERE server_id = ?"; |
| | | $inst->db->query($sql, $conf["mysql"]["database"] . ".server", $new_ini, $conf['server_id']); |
| | | |
| | | if($inst->db->dbHost != $inst->dbmaster->dbHost) { |
| | | $sql = "UPDATE ".$conf["mysql"]["master_database"].".server SET config = '".mysql_real_escape_string($new_ini)."' WHERE server_id = ".$conf['server_id']; |
| | | $inst->dbmaster->query($sql); |
| | | $sql = "UPDATE ?? SET config = ? WHERE server_id = ?"; |
| | | $inst->dbmaster->query($sql, $conf["mysql"]["master_database"].".server", $new_ini, $conf['server_id']); |
| | | } |
| | | unset($old_ini_array); |
| | | unset($tpl_ini_array); |
| | |
| | | |
| | | |
| | | //** Update system ini |
| | | $tmp_server_rec = $inst->db->queryOneRecord("SELECT config FROM ".$conf["mysql"]["database"].".sys_ini WHERE sysini_id = 1"); |
| | | $tmp_server_rec = $inst->db->queryOneRecord("SELECT config FROM ?? WHERE sysini_id = 1", $conf["mysql"]["database"] . ".sys_ini"); |
| | | $old_ini_array = ini_to_array(stripslashes($tmp_server_rec['config'])); |
| | | unset($tmp_server_rec); |
| | | $tpl_ini_array = ini_to_array(rf('tpl/system.ini.master')); |
| | |
| | | } |
| | | |
| | | $new_ini = array_to_ini($tpl_ini_array); |
| | | $tmp = $inst->db->queryOneRecord('SELECT count(sysini_id) as number FROM '.$conf["mysql"]["database"].'.sys_ini WHERE 1'); |
| | | $tmp = $inst->db->queryOneRecord('SELECT count(sysini_id) as number FROM ?? WHERE 1', $conf["mysql"]["database"] . '.sys_ini'); |
| | | if($tmp['number'] == 0) { |
| | | $inst->db->query("INSERT INTO ".$conf["mysql"]["database"].".sys_ini (sysini_id, config) VALUES (1,'".mysql_real_escape_string($new_ini)."')"); |
| | | $inst->db->query("INSERT INTO ?? (sysini_id, config) VALUES (1,?)", $conf["mysql"]["database"] . ".sys_ini", $new_ini); |
| | | } else { |
| | | $inst->db->query("UPDATE ".$conf["mysql"]["database"].".sys_ini SET config = '".mysql_real_escape_string($new_ini)."' WHERE sysini_id = 1"); |
| | | $inst->db->query("UPDATE ?? SET config = ? WHERE sysini_id = 1", $conf["mysql"]["database"] . ".sys_ini", $new_ini); |
| | | } |
| | | unset($old_ini_array); |
| | | unset($tpl_ini_array); |
| | |
| | | |
| | | |
| | | |
| | | function setDefaultServers(){ |
| | | global $inst, $conf; |
| | | |
| | | // clients |
| | | $clients = $inst->db->queryAllRecords("SELECT * FROM ".$conf["mysql"]["database"].".client"); |
| | | if(is_array($clients) && !empty($clients)){ |
| | | foreach($clients as $client){ |
| | | // mailserver |
| | | if(trim($client['mail_servers']) == '') $inst->db->query("UPDATE ?? SET mail_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_mailserver']), $client['client_id']); |
| | | // webserver |
| | | if(trim($client['web_servers']) == '') $inst->db->query("UPDATE ?? SET web_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_webserver']), $client['client_id']); |
| | | // dns server |
| | | if(trim($client['dns_servers']) == '') $inst->db->query("UPDATE ?? SET dns_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_dnsserver']), $client['client_id']); |
| | | // db server |
| | | if(trim($client['db_servers']) == '') $inst->db->query("UPDATE ?? SET db_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_dbserver']), $client['client_id']); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | ?> |
New file |
| | |
| | | ALTER TABLE `directive_snippets` ADD `customer_viewable` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `snippet`; |
| | | ALTER TABLE `web_domain` ADD `directive_snippets_id` int(11) unsigned NOT NULL default '0'; |
New file |
| | |
| | | ALTER TABLE `web_domain` ADD COLUMN `enable_spdy` ENUM('y','n') NULL DEFAULT 'n' AFTER `proxy_directives`; |
| | |
| | | CHANGE `uid` `uid` int(11) NOT NULL DEFAULT '5000', |
| | | CHANGE `gid` `gid` int(11) NOT NULL DEFAULT '5000'; |
| | | |
| | | ALTER TABLE `mail_user` |
| | | ADD COLUMN `sender_cc` varchar(255) NOT NULL DEFAULT '' AFTER `cc`; |
| | | |
| | | ALTER TABLE `client_template` ADD `default_mailserver` INT(11) NOT NULL DEFAULT 1; |
| | | ALTER TABLE `client_template` ADD `default_webserver` INT(11) NOT NULL DEFAULT 1; |
| | | ALTER TABLE `client_template` ADD `default_dnsserver` INT(11) NOT NULL DEFAULT 1; |
| | | ALTER TABLE `client_template` ADD `default_slave_dnsserver` INT(11) NOT NULL DEFAULT 1; |
| | | ALTER TABLE `client_template` ADD `default_dbserver` INT(11) NOT NULL DEFAULT 1; |
| | | ALTER TABLE `client` ADD `contact_firstname` VARCHAR( 64 ) NOT NULL DEFAULT '' AFTER `gender`; |
| | | |
| | | UPDATE `dns_template` SET `fields` = 'DOMAIN,IP,NS1,NS2,EMAIL,DKIM' WHERE `dns_template`.`template_id` =1; |
| | | UPDATE `dns_template` SET `template` = '[ZONE] |
| | | origin={DOMAIN}. |
| | | ns={NS1}. |
| | | mbox={EMAIL}. |
| | | refresh=7200 |
| | | retry=540 |
| | | expire=604800 |
| | | minimum=3600 |
| | | ttl=3600 |
| | | |
| | | [DNS_RECORDS] |
| | | A|{DOMAIN}.|{IP}|0|3600 |
| | | A|www|{IP}|0|3600 |
| | | A|mail|{IP}|0|3600 |
| | | NS|{DOMAIN}.|{NS1}.|0|3600 |
| | | NS|{DOMAIN}.|{NS2}.|0|3600 |
| | | MX|{DOMAIN}.|mail.{DOMAIN}.|10|3600 |
| | | TXT|{DOMAIN}.|v=spf1 mx a ~all|0|3600' WHERE `dns_template`.`template_id` = 1; |
| | | |
| | | ALTER TABLE `mail_backup` CHANGE `filesize` `filesize` VARCHAR(20) NOT NULL DEFAULT ''; |
| | | ALTER TABLE `web_backup` CHANGE `filesize` `filesize` VARCHAR(20) NOT NULL DEFAULT ''; |
| | | |
| | | ALTER TABLE `sys_datalog` ADD INDEX `dbtable` (`dbtable` (25), `dbidx` (25)), ADD INDEX (`action`); |
| | | ALTER TABLE `mail_user` ADD `greylisting` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `postfix`; |
| | | ALTER TABLE `mail_user` ADD `maildir_format` varchar(255) NOT NULL default 'maildir' AFTER `maildir`; |
| | | ALTER TABLE `mail_forwarding` ADD `greylisting` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `active`; |
| | | |
| | | ALTER TABLE `openvz_ip` CHANGE `ip_address` `ip_address` VARCHAR(39) DEFAULT NULL; |
| | | |
| | | -- XMPP Support |
| | | |
| | | ALTER TABLE `server` ADD COLUMN `xmpp_server` tinyint(1) NOT NULL default '0' AFTER `firewall_server`; |
| | | |
| | | ALTER TABLE `client` |
| | | ADD COLUMN `default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1', |
| | | ADD COLUMN `xmpp_servers` blob, |
| | | ADD COLUMN `limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1', |
| | | ADD COLUMN `limit_xmpp_user` int(11) NOT NULL DEFAULT '-1', |
| | | ADD COLUMN `limit_xmpp_muc` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | ADD COLUMN `limit_xmpp_anon` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | ADD COLUMN `limit_xmpp_auth_options` varchar(255) NOT NULL DEFAULT 'plain,hashed,isp', |
| | | ADD COLUMN `limit_xmpp_vjud` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | ADD COLUMN `limit_xmpp_proxy` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | ADD COLUMN `limit_xmpp_status` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | ADD COLUMN `limit_xmpp_pastebin` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | ADD COLUMN `limit_xmpp_httparchive` ENUM( 'n', 'y' ) NOT NULL default 'n'; |
| | | |
| | | |
| | | CREATE TABLE `xmpp_domain` ( |
| | | `domain_id` int(11) unsigned NOT NULL auto_increment, |
| | | `sys_userid` int(11) unsigned NOT NULL default '0', |
| | | `sys_groupid` int(11) unsigned NOT NULL default '0', |
| | | `sys_perm_user` varchar(5) NOT NULL default '', |
| | | `sys_perm_group` varchar(5) NOT NULL default '', |
| | | `sys_perm_other` varchar(5) NOT NULL default '', |
| | | `server_id` int(11) unsigned NOT NULL default '0', |
| | | `domain` varchar(255) NOT NULL default '', |
| | | |
| | | `management_method` ENUM( 'normal', 'maildomain' ) NOT NULL default 'normal', |
| | | `public_registration` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | `registration_url` varchar(255) NOT NULL DEFAULT '', |
| | | `registration_message` varchar(255) NOT NULL DEFAULT '', |
| | | `domain_admins` text, |
| | | |
| | | `use_pubsub` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `use_proxy` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `use_anon_host` enum('n','y') NOT NULL DEFAULT 'n', |
| | | |
| | | `use_vjud` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `vjud_opt_mode` enum('in', 'out') NOT NULL DEFAULT 'in', |
| | | |
| | | `use_muc_host` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `muc_name` varchar(30) NOT NULL DEFAULT '' |
| | | `muc_restrict_room_creation` enum('n', 'y', 'm') NOT NULL DEFAULT 'm', |
| | | `muc_admins` text, |
| | | `use_pastebin` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `pastebin_expire_after` int(3) NOT NULL DEFAULT 48, |
| | | `pastebin_trigger` varchar(10) NOT NULL DEFAULT '!paste', |
| | | `use_http_archive` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `http_archive_show_join` enum('n', 'y') NOT NULL DEFAULT 'n', |
| | | `http_archive_show_status` enum('n', 'y') NOT NULL DEFAULT 'n', |
| | | `use_status_host` enum('n','y') NOT NULL DEFAULT 'n', |
| | | |
| | | `ssl_state` varchar(255) NULL, |
| | | `ssl_locality` varchar(255) NULL, |
| | | `ssl_organisation` varchar(255) NULL, |
| | | `ssl_organisation_unit` varchar(255) NULL, |
| | | `ssl_country` varchar(255) NULL, |
| | | `ssl_email` varchar(255) NULL, |
| | | `ssl_request` mediumtext NULL, |
| | | `ssl_cert` mediumtext NULL, |
| | | `ssl_bundle` mediumtext NULL, |
| | | `ssl_key` mediumtext NULL, |
| | | `ssl_action` varchar(16) NULL, |
| | | |
| | | `active` enum('n','y') NOT NULL DEFAULT 'n', |
| | | PRIMARY KEY (`domain_id`), |
| | | KEY `server_id` (`server_id`,`domain`), |
| | | KEY `domain_active` (`domain`,`active`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
| | | |
| | | -- |
| | | -- Table structure for table `xmpp_user` |
| | | -- |
| | | |
| | | CREATE TABLE `xmpp_user` ( |
| | | `xmppuser_id` int(11) unsigned NOT NULL auto_increment, |
| | | `sys_userid` int(11) unsigned NOT NULL default '0', |
| | | `sys_groupid` int(11) unsigned NOT NULL default '0', |
| | | `sys_perm_user` varchar(5) NOT NULL default '', |
| | | `sys_perm_group` varchar(5) NOT NULL default '', |
| | | `sys_perm_other` varchar(5) NOT NULL default '', |
| | | `server_id` int(11) unsigned NOT NULL default '0', |
| | | `jid` varchar(255) NOT NULL default '', |
| | | `password` varchar(255) NOT NULL default '', |
| | | `active` enum('n','y') NOT NULL DEFAULT 'n', |
| | | PRIMARY KEY (`xmppuser_id`), |
| | | KEY `server_id` (`server_id`,`jid`), |
| | | KEY `jid_active` (`jid`,`active`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | UPDATE `dbispconfig`.`sys_ini` SET `default_logo` = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABBCAYAAACU5+uOAAAItUlEQVR42u1dCWwVVRStUJZCK6HsFNAgWpaCJkKICZKApKUFhURQpEnZF4EEUJZYEEpBIamgkQpUQBZRW7YCBqQsggsQEAgKLbIGCYsSCNqyQ8D76h18Hd/MvJk/n/bXc5KT+TNz79vPzNv+/2FhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAe++s0akTsRZxMnE6cGkKcxkwhPofaBPwWRzxxB/EO8UGI8xhxEGoV8EscY8qBKFRcgdoFAhXHC+VUHAbHo5aBQASyrZwL5DoxEjUNeBXI9XIuEMEE1DTgVSA3FA3qIDEtBLnTQiBDUNOAV4EUKhpURojmZQQEAjwKgSwK0bykWQgEU74ABAKBABAIBOIJffoNrkRsS0whDiMO5uNw4gBiSxvfGOJrbDtMOgr2JNa18HmZmETsopnGp4h9xdF0TcQRb8NEPkawTzv2qaWIoybnZYRUBoJD+difGAuBlCy0qsRM4mfERcTFfGygsBUF/xFxE/EQ8RixwIbi/j7il8R3iE8qwuxAXMJxuuFiTvNMYleb/E0gXiI+cOBaISTJrzLxcw2/+8Q5pjjfNNkM0RDILLadpbimw+bsc4DPkxRpuqkZ1orisoBAiguuhkUhPSvZRBA3u6gsK94g9jDFP9aHcAV3EKNNYX8i3RcNJ4M4nTiROJCYykIzbGZKvouk68vYbyS/cUbz+RrJZpzkO5Sv3eajaJhRDvUwg21nKK4VcF5WKPgFH6PZZw/7dJXC6S6lczunfbIQLpeDkZ+lJcoCAikuvChioaLBtfD4JHPiXSFKKexBPoa9Wwr3ael6skMZDGO7K3z+uOSb5OA7mu2KiOGmPH3ADVh8/sohnDS2S1NcG+uiO/kd+8RL146YRWzj359tb0Eg+gIpsHkjFNrQqiF3DZJABDtyuCP5/FuNRlHN8Ofz9nx+XLNR3jR1c4w8TSFGSmnr4FEgU7wKhI51jAeTpv+/ZQGBOAuEu1d/Ku6LV35t9rdigkUjHuMgkHPEecQsxdjjUx4zHbMI+10OdzqfZ2o0iiqSfzgPfMXnzZqN6iTbJ5jytMTU0E97FEhaAAJ5kc/PuJjQOCoIgegJpKbUl5b5vGaBT+A+vOgn5/JYIdFBIOs1wo1kIZl93+P70/h8oUZYFXkmKInPU9h3m2YeT8lvRilPyyWbi3xt4iMWSDc+P4lp3uAIRDxdryjui6dmuujXcr91IDcMmaJv31WISfTrLeJXCUT3yb1a4Ztmalyu61MaZG/XtD9tapRGnpZKNp2lNNZ3KZARAQgk3untBYEEPgbJ92FsIAax34v1AQ2B5Go2BlW60n0QyCC/BWISdJ5LgewWU8k86DdTzMyNh0BKVyAzfB5I93YQyBGeTlW9lQbwIle2Rdgzy7BAxJT6Hb6X6EIgTrznRSCiHli02cwcPor1pbkQiL5AKvOA+ZZPAtkfxFms3j4IZHAwBGJaRPxdjH00BSImJRqKOlEwjtjUo0Dm2pWla4HMzsyqQIxSMKI8C8RkL9YXuhDf5gqcw4NweaZJiGkh8UeLwi+Utkb4KZCrYszkVSDiQRDMN4hkf5DvZ2gKZJyLPJgFkmAjEDEF3EYSWzPeklO8Q8CLQGKJhQquK+eDdLFNZBJxFLEf8XUXFTbcYv2kRhAEIq+vGNO88zTTKVaRzxPrSSvPW11O8yZqCiROSnMsX0sP0ixWops1Hfbx/AaJIz5QcFc5n+ZVNcbxmoWtEsBNB4EU8Tgk32Gv1wneEybeWG1N8RoNbplmOo2neiyxE3/eoun7G9t31hGIqXuzl8/HB0kgxhvhD03/KoEIpIWFQPLK+UJhkWpgKLZP8IKhajNhJg8A7yt8/5K6QoFM8z5mc68Ph3VWM6wTbN+a+AR/vqThV13KYyMXAgmXps9FnK8GSSA17KaXFf7R3gUyd8H/TiBss9fngfQehzfMpkDLgxcS73J4k1y85WrxtTtOjZPuVZA2O55RhLfUId5XpI2UHwZDIHxtp7HtRrVL25SfhWy7z7VAMuYvipszd0FJcfxzHspdrMctGnGcZNPTZ4F0VszqyPSlPHm8JG9f2SDtgF3Nq/rnJZssyXeUdP0CN64c9l/FDfGyZNNNkaeVGmnMM+Vdtd19los8/2e7Ow/E70lxiG7pRmkn8AaeULlcoo4sBDLfKvL0nLUxablfX0hfmfuQ01avI65fUQYEkupRIJHcAMwbDWNNdmLgupV4zeMO3stcIZ1M4aYo4vZt0oO7Locd0ndGTEQofN+QxiZ22+y7W+RpgUb66vOU7232SZXupZqvaYT3Dfu8ZLrejtc47mvkJ9FoVEWKBmW7dyc7ZXD1Nb2TH3JVn5Tqa3r1repzY6/gwWeqhUCGO/XjWSTmjYYVLOzFoP0Z/qJTks033brxrtjmxCbGtK4ivEqKuH2fNuc0tDatIYgna4yGbz2eeTL8WhJbic2aDnmqqpm2KlLeK5vWn0pc0wirGvtUtBkzNdPKDzWe24oGdZX4CzGfWCD4U93GBQdqNSw4Uiny8K9h4buOhlU2scq+Q1G1i233k63hFwBPEfcS04l1FGJoynbH+fgz8ZKFQJLDAMDjk/psCPzw20XxE6mmdLd24d8KNQ14FciUEPl1xHvEhlK6W2j65aOWgUAEUpV4NEREstyDQNqjloFARVKL/xukrAvkGjGC09zGwfYKsQdqF/BTKMnEJcTtxC3EPAU3iic5cRkfjc/ZFvZuuZm4gXjOouG35LQ2Yfutkq/4pfpN/E9TDVCjQGkJqQExho+CjYlRPseRiQE3EIriaMZTw4K3mOJv23J8jme23RsEAMqqQJrb9PnnEbPEVpUAuJD4Mf/PoCqeONQCUJYFElGKf7ojpnqjUQtAWRdJaf1t2w8ofSAUBNKulATSEaUPhIpIRj9icbyFUgdCTSRTeR0i2HwfpQ0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQBnG392D9QU+JXhxAAAAAElFTkSuQmCC' WHERE `sys_ini`.`sysini_id` = 1; |
| | | |
| | | ALTER TABLE `directive_snippets` ADD `required_php_snippets` VARCHAR(255) NOT NULL DEFAULT '' AFTER `customer_viewable`; |
| | | ALTER TABLE `dns_rr` CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600'; |
| | | ALTER TABLE `dns_soa` CHANGE `minimum` `minimum` INT(11) UNSIGNED NOT NULL DEFAULT '3600', CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600'; |
| | | ALTER TABLE `client` CHANGE `web_php_options` `web_php_options` VARCHAR(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp,php-fpm,hhvm'; |
| | | |
| | | ALTER TABLE openvz_template ADD COLUMN `features` varchar(255) DEFAULT NULL AFTER `capability`; |
| | | ALTER TABLE openvz_vm ADD COLUMN `features` TEXT DEFAULT NULL AFTER `capability`; |
| | | ALTER TABLE openvz_template ADD COLUMN `iptables` varchar(255) DEFAULT NULL AFTER `features`; |
| | | ALTER TABLE openvz_vm ADD COLUMN `iptables` TEXT DEFAULT NULL AFTER `features`; |
| | |
| | | `limit_spamfilter_wblist` int(11) NOT NULL DEFAULT '0', |
| | | `limit_spamfilter_user` int(11) NOT NULL DEFAULT '0', |
| | | `limit_spamfilter_policy` int(11) NOT NULL DEFAULT '0', |
| | | `default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1', |
| | | `xmpp_servers` blob, |
| | | `limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1', |
| | | `limit_xmpp_user` int(11) NOT NULL DEFAULT '-1', |
| | | `limit_xmpp_muc` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | `limit_xmpp_anon` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | `limit_xmpp_auth_options` varchar(255) NOT NULL DEFAULT 'plain,hashed,isp', |
| | | `limit_xmpp_vjud` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | `limit_xmpp_proxy` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | `limit_xmpp_status` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | `limit_xmpp_pastebin` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | `limit_xmpp_httparchive` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | `default_webserver` int(11) unsigned NOT NULL DEFAULT '1', |
| | | `web_servers` blob, |
| | | `limit_web_ip` text, |
| | | `limit_web_domain` int(11) NOT NULL DEFAULT '-1', |
| | | `limit_web_quota` int(11) NOT NULL DEFAULT '-1', |
| | | `web_php_options` varchar(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp,php-fpm', |
| | | `web_php_options` varchar(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp,php-fpm,hhvm', |
| | | `limit_cgi` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `limit_ssi` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `limit_perl` enum('n','y') NOT NULL DEFAULT 'n', |
| | |
| | | `name` varchar(255) DEFAULT NULL, |
| | | `type` varchar(255) DEFAULT NULL, |
| | | `snippet` mediumtext, |
| | | `customer_viewable` ENUM('n','y') NOT NULL DEFAULT 'n', |
| | | `required_php_snippets` varchar(255) NOT NULL DEFAULT '', |
| | | `active` enum('n','y') NOT NULL DEFAULT 'y', |
| | | PRIMARY KEY (`directive_snippets_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
| | |
| | | `type` enum('A','AAAA','ALIAS','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT') default NULL, |
| | | `data` TEXT NOT NULL DEFAULT '', |
| | | `aux` int(11) unsigned NOT NULL default '0', |
| | | `ttl` int(11) unsigned NOT NULL default '86400', |
| | | `ttl` int(11) unsigned NOT NULL default '3600', |
| | | `active` enum('N','Y') NOT NULL default 'Y', |
| | | `stamp` timestamp NOT NULL default CURRENT_TIMESTAMP, |
| | | `serial` int(10) unsigned default NULL, |
| | |
| | | `refresh` int(11) unsigned NOT NULL default '28800', |
| | | `retry` int(11) unsigned NOT NULL default '7200', |
| | | `expire` int(11) unsigned NOT NULL default '604800', |
| | | `minimum` int(11) unsigned NOT NULL default '86400', |
| | | `ttl` int(11) unsigned NOT NULL default '86400', |
| | | `minimum` int(11) unsigned NOT NULL default '3600', |
| | | `ttl` int(11) unsigned NOT NULL default '3600', |
| | | `active` enum('N','Y') NOT NULL DEFAULT 'N', |
| | | `xfer` varchar(255) NOT NULL DEFAULT '', |
| | | `also_notify` varchar(255) default NULL, |
| | |
| | | `backup_mode` varchar(64) NOT NULL DEFAULT '', |
| | | `tstamp` int(10) unsigned NOT NULL DEFAULT '0', |
| | | `filename` varchar(255) NOT NULL DEFAULT '', |
| | | `filesize` VARCHAR(10) NOT NULL DEFAULT '', |
| | | `filesize` VARCHAR(20) NOT NULL DEFAULT '', |
| | | PRIMARY KEY (`backup_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
| | | |
| | |
| | | `uid` int(11) NOT NULL default '5000', |
| | | `gid` int(11) NOT NULL default '5000', |
| | | `maildir` varchar(255) NOT NULL default '', |
| | | `maildir_format` varchar(255) NOT NULL default 'maildir', |
| | | `quota` bigint(20) NOT NULL default '-1', |
| | | `cc` varchar(255) NOT NULL default '', |
| | | `sender_cc` varchar(255) NOT NULL default '', |
| | |
| | | `sys_perm_group` varchar(5) DEFAULT NULL, |
| | | `sys_perm_other` varchar(5) DEFAULT NULL, |
| | | `server_id` int(11) NOT NULL DEFAULT '0', |
| | | `ip_address` varchar(15) DEFAULT NULL, |
| | | `ip_address` varchar(39) DEFAULT NULL, |
| | | `vm_id` int(11) NOT NULL DEFAULT '0', |
| | | `reserved` varchar(255) NOT NULL DEFAULT 'n', |
| | | PRIMARY KEY (`ip_address_id`) |
| | |
| | | `nameserver` varchar(255) DEFAULT NULL, |
| | | `create_dns` varchar(1) NOT NULL DEFAULT 'n', |
| | | `capability` varchar(255) DEFAULT NULL, |
| | | `features` varchar(255) DEFAULT NULL, |
| | | `iptables` varchar(255) DEFAULT NULL, |
| | | PRIMARY KEY (`template_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; |
| | | |
| | |
| | | -- Dumping data for table `openvz_template` |
| | | -- |
| | | |
| | | INSERT INTO `openvz_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `template_name`, `diskspace`, `traffic`, `bandwidth`, `ram`, `ram_burst`, `cpu_units`, `cpu_num`, `cpu_limit`, `io_priority`, `active`, `description`, `numproc`, `numtcpsock`, `numothersock`, `vmguarpages`, `kmemsize`, `tcpsndbuf`, `tcprcvbuf`, `othersockbuf`, `dgramrcvbuf`, `oomguarpages`, `privvmpages`, `lockedpages`, `shmpages`, `physpages`, `numfile`, `avnumproc`, `numflock`, `numpty`, `numsiginfo`, `dcachesize`, `numiptent`, `swappages`, `hostname`, `nameserver`, `create_dns`, `capability`) VALUES(1, 1, 1, 'riud', 'riud', '', 'small', 10, -1, -1, 256, 512, 1000, 4, 400, 4, 'y', '', '999999:999999', '7999992:7999992', '7999992:7999992', '65536:65536', '2147483646:2147483646', '214748160:396774400', '214748160:396774400', '214748160:396774400', '214748160:396774400', '65536:65536', '131072:131072', '999999:999999', '65536:65536', '0:2147483647', '23999976:23999976', '180:180', '999999:999999', '500000:500000', '999999:999999', '2147483646:2147483646', '999999:999999', '256000:256000', 'v{VEID}.test.tld', '8.8.8.8 8.8.4.4', 'n', ''); |
| | | INSERT INTO `openvz_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `template_name`, `diskspace`, `traffic`, `bandwidth`, `ram`, `ram_burst`, `cpu_units`, `cpu_num`, `cpu_limit`, `io_priority`, `active`, `description`, `numproc`, `numtcpsock`, `numothersock`, `vmguarpages`, `kmemsize`, `tcpsndbuf`, `tcprcvbuf`, `othersockbuf`, `dgramrcvbuf`, `oomguarpages`, `privvmpages`, `lockedpages`, `shmpages`, `physpages`, `numfile`, `avnumproc`, `numflock`, `numpty`, `numsiginfo`, `dcachesize`, `numiptent`, `swappages`, `hostname`, `nameserver`, `create_dns`, `capability`, `features`, `iptables`) VALUES(1, 1, 1, 'riud', 'riud', '', 'small', 10, -1, -1, 256, 512, 1000, 4, 400, 4, 'y', '', '999999:999999', '7999992:7999992', '7999992:7999992', '65536:65536', '2147483646:2147483646', '214748160:396774400', '214748160:396774400', '214748160:396774400', '214748160:396774400', '65536:65536', '131072:131072', '999999:999999', '65536:65536', '0:2147483647', '23999976:23999976', '180:180', '999999:999999', '500000:500000', '999999:999999', '2147483646:2147483646', '999999:999999', '256000:256000', 'v{VEID}.test.tld', '8.8.8.8 8.8.4.4', 'n', '', '', ''); |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | |
| | | `nameserver` varchar(255) NOT NULL DEFAULT '8.8.8.8 8.8.4.4', |
| | | `create_dns` varchar(1) NOT NULL DEFAULT 'n', |
| | | `capability` text, |
| | | `features` text, |
| | | `iptabless` text, |
| | | `config` mediumtext, |
| | | PRIMARY KEY (`vm_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; |
| | |
| | | `vserver_server` tinyint(1) NOT NULL default '0', |
| | | `proxy_server` tinyint(1) NOT NULL default '0', |
| | | `firewall_server` tinyint(1) NOT NULL default '0', |
| | | `xmpp_server` tinyint(1) NOT NULL default '0', |
| | | `config` text, |
| | | `updated` bigint(20) unsigned NOT NULL default '0', |
| | | `mirror_server_id` int(11) unsigned NOT NULL default '0', |
| | |
| | | CREATE TABLE `sys_ini` ( |
| | | `sysini_id` int(11) unsigned NOT NULL auto_increment, |
| | | `config` longtext, |
| | | `default_logo` text NOT NULL, |
| | | `custom_logo` text NOT NULL, |
| | | PRIMARY KEY (`sysini_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
| | | |
| | |
| | | `backup_mode` varchar(64) NOT NULL DEFAULT '', |
| | | `tstamp` int(10) unsigned NOT NULL DEFAULT '0', |
| | | `filename` varchar(255) NOT NULL DEFAULT '', |
| | | `filesize` VARCHAR(10) NOT NULL DEFAULT '', |
| | | `filesize` VARCHAR(20) NOT NULL DEFAULT '', |
| | | PRIMARY KEY (`backup_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
| | | |
| | |
| | | `traffic_quota_lock` enum('n','y') NOT NULL default 'n', |
| | | `fastcgi_php_version` varchar(255) DEFAULT NULL, |
| | | `proxy_directives` mediumtext, |
| | | `enable_spdy` ENUM('y','n') NULL DEFAULT 'n', |
| | | `last_quota_notification` date NULL default NULL, |
| | | `rewrite_rules` mediumtext, |
| | | `added_date` date NOT NULL DEFAULT '0000-00-00', |
| | | `added_by` varchar(255) DEFAULT NULL, |
| | | `directive_snippets_id` int(11) unsigned NOT NULL default '0', |
| | | PRIMARY KEY (`domain_id`), |
| | | UNIQUE KEY `serverdomain` ( `server_id` , `ip_address`, `domain` ) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
| | |
| | | `traffic_bytes` bigint(32) unsigned NOT NULL default '0', |
| | | PRIMARY KEY (`hostname`,`traffic_date`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- |
| | | -- Table structure for table `xmpp_domain` |
| | | -- |
| | | |
| | | CREATE TABLE `xmpp_domain` ( |
| | | `domain_id` int(11) unsigned NOT NULL auto_increment, |
| | | `sys_userid` int(11) unsigned NOT NULL default '0', |
| | | `sys_groupid` int(11) unsigned NOT NULL default '0', |
| | | `sys_perm_user` varchar(5) NOT NULL default '', |
| | | `sys_perm_group` varchar(5) NOT NULL default '', |
| | | `sys_perm_other` varchar(5) NOT NULL default '', |
| | | `server_id` int(11) unsigned NOT NULL default '0', |
| | | `domain` varchar(255) NOT NULL default '', |
| | | |
| | | `management_method` ENUM( 'normal', 'maildomain' ) NOT NULL default 'normal', |
| | | `public_registration` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | | `registration_url` varchar(255) NOT NULL DEFAULT '', |
| | | `registration_message` varchar(255) NOT NULL DEFAULT '', |
| | | `domain_admins` text, |
| | | |
| | | `use_pubsub` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `use_proxy` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `use_anon_host` enum('n','y') NOT NULL DEFAULT 'n', |
| | | |
| | | `use_vjud` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `vjud_opt_mode` enum('in', 'out') NOT NULL DEFAULT 'in', |
| | | |
| | | `use_muc_host` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `muc_name` varchar(30) NOT NULL DEFAULT '', |
| | | `muc_restrict_room_creation` enum('n', 'y', 'm') NOT NULL DEFAULT 'm', |
| | | `muc_admins` text, |
| | | `use_pastebin` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `pastebin_expire_after` int(3) NOT NULL DEFAULT 48, |
| | | `pastebin_trigger` varchar(10) NOT NULL DEFAULT '!paste', |
| | | `use_http_archive` enum('n','y') NOT NULL DEFAULT 'n', |
| | | `http_archive_show_join` enum('n', 'y') NOT NULL DEFAULT 'n', |
| | | `http_archive_show_status` enum('n', 'y') NOT NULL DEFAULT 'n', |
| | | `use_status_host` enum('n','y') NOT NULL DEFAULT 'n', |
| | | |
| | | `ssl_state` varchar(255) NULL, |
| | | `ssl_locality` varchar(255) NULL, |
| | | `ssl_organisation` varchar(255) NULL, |
| | | `ssl_organisation_unit` varchar(255) NULL, |
| | | `ssl_country` varchar(255) NULL, |
| | | `ssl_email` varchar(255) NULL, |
| | | `ssl_request` mediumtext NULL, |
| | | `ssl_cert` mediumtext NULL, |
| | | `ssl_bundle` mediumtext NULL, |
| | | `ssl_key` mediumtext NULL, |
| | | `ssl_action` varchar(16) NULL, |
| | | |
| | | `active` enum('n','y') NOT NULL DEFAULT 'n', |
| | | PRIMARY KEY (`domain_id`), |
| | | KEY `server_id` (`server_id`,`domain`), |
| | | KEY `domain_active` (`domain`,`active`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- |
| | | -- Table structure for table `xmpp_user` |
| | | -- |
| | | |
| | | CREATE TABLE `xmpp_user` ( |
| | | `xmppuser_id` int(11) unsigned NOT NULL auto_increment, |
| | | `sys_userid` int(11) unsigned NOT NULL default '0', |
| | | `sys_groupid` int(11) unsigned NOT NULL default '0', |
| | | `sys_perm_user` varchar(5) NOT NULL default '', |
| | | `sys_perm_group` varchar(5) NOT NULL default '', |
| | | `sys_perm_other` varchar(5) NOT NULL default '', |
| | | `server_id` int(11) unsigned NOT NULL default '0', |
| | | `jid` varchar(255) NOT NULL default '', |
| | | `password` varchar(255) NOT NULL default '', |
| | | `active` enum('n','y') NOT NULL DEFAULT 'n', |
| | | PRIMARY KEY (`xmppuser_id`), |
| | | KEY `server_id` (`server_id`,`jid`), |
| | | KEY `jid_active` (`jid`,`active`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- -------------------------------------------------------- |
| | | -- -------------------------------------------------------- |
| | |
| | | -- Dumping data for table `dns_template` |
| | | -- |
| | | |
| | | INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `name`, `fields`, `template`, `visible`) VALUES (1, 1, 1, 'riud', 'riud', '', 'Default', 'DOMAIN,IP,NS1,NS2,EMAIL', '[ZONE]\norigin={DOMAIN}.\nns={NS1}.\nmbox={EMAIL}.\nrefresh=7200\nretry=540\nexpire=604800\nminimum=86400\nttl=3600\n\n[DNS_RECORDS]\nA|{DOMAIN}.|{IP}|0|3600\nA|www|{IP}|0|3600\nA|mail|{IP}|0|3600\nNS|{DOMAIN}.|{NS1}.|0|3600\nNS|{DOMAIN}.|{NS2}.|0|3600\nMX|{DOMAIN}.|mail.{DOMAIN}.|10|3600', 'y'); |
| | | INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `name`, `fields`, `template`, `visible`) VALUES (1, 1, 1, 'riud', 'riud', '', 'Default', 'DOMAIN,IP,NS1,NS2,EMAIL,DKIM', '[ZONE]\norigin={DOMAIN}.\nns={NS1}.\nmbox={EMAIL}.\nrefresh=7200\nretry=540\nexpire=604800\nminimum=3600\nttl=3600\n\n[DNS_RECORDS]\nA|{DOMAIN}.|{IP}|0|3600\nA|www|{IP}|0|3600\nA|mail|{IP}|0|3600\nNS|{DOMAIN}.|{NS1}.|0|3600\nNS|{DOMAIN}.|{NS2}.|0|3600\nMX|{DOMAIN}.|mail.{DOMAIN}.|10|3600\nTXT|{DOMAIN}.|v=spf1 mx a ~all|0|3600', 'y'); |
| | | |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | |
| | | -- Dumping data for table `sys_ini` |
| | | -- |
| | | |
| | | INSERT INTO `sys_ini` (`sysini_id`, `config`) VALUES (1, ''); |
| | | INSERT INTO `sys_ini` (`sysini_id`, `config`, `default_logo`, `custom_logo`) VALUES (1, '', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABBCAYAAACU5+uOAAAItUlEQVR42u1dCWwVVRStUJZCK6HsFNAgWpaCJkKICZKApKUFhURQpEnZF4EEUJZYEEpBIamgkQpUQBZRW7YCBqQsggsQEAgKLbIGCYsSCNqyQ8D76h18Hd/MvJk/n/bXc5KT+TNz79vPzNv+/2FhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAe++s0akTsRZxMnE6cGkKcxkwhPofaBPwWRzxxB/EO8UGI8xhxEGoV8EscY8qBKFRcgdoFAhXHC+VUHAbHo5aBQASyrZwL5DoxEjUNeBXI9XIuEMEE1DTgVSA3FA3qIDEtBLnTQiBDUNOAV4EUKhpURojmZQQEAjwKgSwK0bykWQgEU74ABAKBABAIBOIJffoNrkRsS0whDiMO5uNw4gBiSxvfGOJrbDtMOgr2JNa18HmZmETsopnGp4h9xdF0TcQRb8NEPkawTzv2qaWIoybnZYRUBoJD+difGAuBlCy0qsRM4mfERcTFfGygsBUF/xFxE/EQ8RixwIbi/j7il8R3iE8qwuxAXMJxuuFiTvNMYleb/E0gXiI+cOBaISTJrzLxcw2/+8Q5pjjfNNkM0RDILLadpbimw+bsc4DPkxRpuqkZ1orisoBAiguuhkUhPSvZRBA3u6gsK94g9jDFP9aHcAV3EKNNYX8i3RcNJ4M4nTiROJCYykIzbGZKvouk68vYbyS/cUbz+RrJZpzkO5Sv3eajaJhRDvUwg21nKK4VcF5WKPgFH6PZZw/7dJXC6S6lczunfbIQLpeDkZ+lJcoCAikuvChioaLBtfD4JHPiXSFKKexBPoa9Wwr3ael6skMZDGO7K3z+uOSb5OA7mu2KiOGmPH3ADVh8/sohnDS2S1NcG+uiO/kd+8RL146YRWzj359tb0Eg+gIpsHkjFNrQqiF3DZJABDtyuCP5/FuNRlHN8Ofz9nx+XLNR3jR1c4w8TSFGSmnr4FEgU7wKhI51jAeTpv+/ZQGBOAuEu1d/Ku6LV35t9rdigkUjHuMgkHPEecQsxdjjUx4zHbMI+10OdzqfZ2o0iiqSfzgPfMXnzZqN6iTbJ5jytMTU0E97FEhaAAJ5kc/PuJjQOCoIgegJpKbUl5b5vGaBT+A+vOgn5/JYIdFBIOs1wo1kIZl93+P70/h8oUZYFXkmKInPU9h3m2YeT8lvRilPyyWbi3xt4iMWSDc+P4lp3uAIRDxdryjui6dmuujXcr91IDcMmaJv31WISfTrLeJXCUT3yb1a4Ztmalyu61MaZG/XtD9tapRGnpZKNp2lNNZ3KZARAQgk3untBYEEPgbJ92FsIAax34v1AQ2B5Go2BlW60n0QyCC/BWISdJ5LgewWU8k86DdTzMyNh0BKVyAzfB5I93YQyBGeTlW9lQbwIle2Rdgzy7BAxJT6Hb6X6EIgTrznRSCiHli02cwcPor1pbkQiL5AKvOA+ZZPAtkfxFms3j4IZHAwBGJaRPxdjH00BSImJRqKOlEwjtjUo0Dm2pWla4HMzsyqQIxSMKI8C8RkL9YXuhDf5gqcw4NweaZJiGkh8UeLwi+Utkb4KZCrYszkVSDiQRDMN4hkf5DvZ2gKZJyLPJgFkmAjEDEF3EYSWzPeklO8Q8CLQGKJhQquK+eDdLFNZBJxFLEf8XUXFTbcYv2kRhAEIq+vGNO88zTTKVaRzxPrSSvPW11O8yZqCiROSnMsX0sP0ixWops1Hfbx/AaJIz5QcFc5n+ZVNcbxmoWtEsBNB4EU8Tgk32Gv1wneEybeWG1N8RoNbplmOo2neiyxE3/eoun7G9t31hGIqXuzl8/HB0kgxhvhD03/KoEIpIWFQPLK+UJhkWpgKLZP8IKhajNhJg8A7yt8/5K6QoFM8z5mc68Ph3VWM6wTbN+a+AR/vqThV13KYyMXAgmXps9FnK8GSSA17KaXFf7R3gUyd8H/TiBss9fngfQehzfMpkDLgxcS73J4k1y85WrxtTtOjZPuVZA2O55RhLfUId5XpI2UHwZDIHxtp7HtRrVL25SfhWy7z7VAMuYvipszd0FJcfxzHspdrMctGnGcZNPTZ4F0VszqyPSlPHm8JG9f2SDtgF3Nq/rnJZssyXeUdP0CN64c9l/FDfGyZNNNkaeVGmnMM+Vdtd19los8/2e7Ow/E70lxiG7pRmkn8AaeULlcoo4sBDLfKvL0nLUxablfX0hfmfuQ01avI65fUQYEkupRIJHcAMwbDWNNdmLgupV4zeMO3stcIZ1M4aYo4vZt0oO7Locd0ndGTEQofN+QxiZ22+y7W+RpgUb66vOU7232SZXupZqvaYT3Dfu8ZLrejtc47mvkJ9FoVEWKBmW7dyc7ZXD1Nb2TH3JVn5Tqa3r1repzY6/gwWeqhUCGO/XjWSTmjYYVLOzFoP0Z/qJTks033brxrtjmxCbGtK4ivEqKuH2fNuc0tDatIYgna4yGbz2eeTL8WhJbic2aDnmqqpm2KlLeK5vWn0pc0wirGvtUtBkzNdPKDzWe24oGdZX4CzGfWCD4U93GBQdqNSw4Uiny8K9h4buOhlU2scq+Q1G1i233k63hFwBPEfcS04l1FGJoynbH+fgz8ZKFQJLDAMDjk/psCPzw20XxE6mmdLd24d8KNQ14FciUEPl1xHvEhlK6W2j65aOWgUAEUpV4NEREstyDQNqjloFARVKL/xukrAvkGjGC09zGwfYKsQdqF/BTKMnEJcTtxC3EPAU3iic5cRkfjc/ZFvZuuZm4gXjOouG35LQ2Yfutkq/4pfpN/E9TDVCjQGkJqQExho+CjYlRPseRiQE3EIriaMZTw4K3mOJv23J8jme23RsEAMqqQJrb9PnnEbPEVpUAuJD4Mf/PoCqeONQCUJYFElGKf7ojpnqjUQtAWRdJaf1t2w8ofSAUBNKulATSEaUPhIpIRj9icbyFUgdCTSRTeR0i2HwfpQ0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQBnG392D9QU+JXhxAAAAAElFTkSuQmCC', ''); |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | |
| | | export PHPRC |
| | | export PHP_FCGI_MAX_REQUESTS=5000 |
| | | export PHP_FCGI_CHILDREN=1 |
| | | exec {fastcgi_bin} -d magic_quotes_gpc=off |
| | | exec {fastcgi_bin} -d \ |
| | | -d disable_classes= \ |
| | | -d disable_functions= \ |
| | | -d magic_quotes_gpc=off \ |
| | | -d open_basedir= |
| | |
| | | export PHPRC |
| | | export PHP_FCGI_MAX_REQUESTS=5000 |
| | | export PHP_FCGI_CHILDREN=1 |
| | | exec {fastcgi_bin} -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfig/interface/temp |
| | | exec {fastcgi_bin} \ |
| | | -d disable_classes= \ |
| | | -d disable_functions= \ |
| | | -d magic_quotes_gpc=off \ |
| | | -d open_basedir= \ |
| | | -d session.save_path=/usr/local/ispconfig/interface/temp |
| | |
| | | MYSQL_SERVER {mysql_server_host} |
| | | MYSQL_USERNAME {mysql_server_ispconfig_user} |
| | | MYSQL_PASSWORD {mysql_server_ispconfig_password} |
| | | MYSQL_PORT 0 |
| | | MYSQL_PORT {mysql_server_port} |
| | | MYSQL_DATABASE {mysql_server_database} |
| | | MYSQL_USER_TABLE mail_user |
| | | MYSQL_CRYPT_PWFIELD password |
| | |
| | | # use the "\" continuation character (so Bastille can change the |
| | | # values if it is run more than once) |
| | | TRUSTED_IFACES="lo" # MINIMAL/SAFEST |
| | | PUBLIC_IFACES="eth+ ppp+ slip+ venet+ bond+" # SAFEST |
| | | PUBLIC_IFACES="eth+ ppp+ slip+ venet+ bond+ en+" # SAFEST |
| | | INTERNAL_IFACES="" # SAFEST |
| | | |
| | | |
| | |
| | | //** Database |
| | | $conf['db_type'] = 'mysql'; |
| | | $conf['db_host'] = '{mysql_server_host}'; |
| | | $conf['db_port'] = '{mysql_server_port}'; |
| | | $conf['db_database'] = '{mysql_server_database}'; |
| | | $conf['db_user'] = '{mysql_server_ispconfig_user}'; |
| | | $conf['db_password'] = '{mysql_server_ispconfig_password}'; |
| | |
| | | |
| | | define('DB_TYPE',$conf['db_type']); |
| | | define('DB_HOST',$conf['db_host']); |
| | | define('DB_PORT',$conf['db_port']); |
| | | define('DB_DATABASE',$conf['db_database']); |
| | | define('DB_USER',$conf['db_user']); |
| | | define('DB_PASSWORD',$conf['db_password']); |
| | |
| | | //** Database settings for the master DB. This setting is only used in multiserver setups |
| | | $conf['dbmaster_type'] = 'mysql'; |
| | | $conf['dbmaster_host'] = '{mysql_master_server_host}'; |
| | | $conf['dbmaster_port'] = '{mysql_master_server_port}'; |
| | | $conf['dbmaster_database'] = '{mysql_master_server_database}'; |
| | | $conf['dbmaster_user'] = '{mysql_master_server_ispconfig_user}'; |
| | | $conf['dbmaster_password'] = '{mysql_master_server_ispconfig_password}'; |
| | |
| | | # ); |
| | | |
| | | driver = mysql |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} port={mysql_server_port} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | # password-query with prefetch |
| | | password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | |
| | | # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. |
| | | # Do not enable it on Dovecot 1.x servers |
| | |
| | | ssl_cert = </etc/postfix/smtpd.cert |
| | | ssl_key = </etc/postfix/smtpd.key |
| | | ssl_protocols = !SSLv2 !SSLv3 |
| | | mail_max_userip_connections = 100 |
| | | passdb { |
| | | args = /etc/dovecot/dovecot-sql.conf |
| | | driver = sql |
| | | } |
| | | userdb { |
| | | driver = prefetch |
| | | } |
| | | userdb { |
| | | args = /etc/dovecot/dovecot-sql.conf |
| | |
| | | plugin { |
| | | quota = dict:user::file:/var/vmail/%d/%n/.quotausage |
| | | sieve=/var/vmail/%d/%n/.sieve |
| | | sieve_max_redirects = 25 |
| | | } |
| | | service auth { |
| | | unix_listener /var/spool/postfix/private/auth { |
| | |
| | | } |
| | | service imap-login { |
| | | client_limit = 1000 |
| | | process_limit = 500 |
| | | process_limit = 512 |
| | | } |
| | | protocol imap { |
| | | mail_plugins = quota imap_quota |
| | |
| | | #password_query = SELECT userid as user, password, home as userdb_home, uid as userdb_uid, gid as userdb_gid FROM users WHERE userid = '%u' |
| | | |
| | | driver = mysql |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} port={mysql_server_port} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '{server_id}' |
| | | # password-query with prefetch |
| | | password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | |
| | | # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. |
| | | # Do not enable it on Dovecot 1.x servers |
| | |
| | | # This can be made to work with SQL and LDAP databases, see their example |
| | | # configuration files for more information how to do it. |
| | | # <doc/wiki/UserDatabase.Prefetch.txt> |
| | | #userdb prefetch { |
| | | #} |
| | | userdb prefetch { |
| | | } |
| | | |
| | | # User to use for the process. This user needs access to only user and |
| | | # password databases, nothing else. Only shadow and pam authentication |
| | |
| | | ssl_cert = </etc/postfix/smtpd.cert |
| | | ssl_key = </etc/postfix/smtpd.key |
| | | ssl_protocols = !SSLv2 !SSLv3 |
| | | mail_max_userip_connections = 100 |
| | | passdb { |
| | | args = /etc/dovecot/dovecot-sql.conf |
| | | driver = sql |
| | | } |
| | | userdb { |
| | | driver = prefetch |
| | | } |
| | | userdb { |
| | | args = /etc/dovecot/dovecot-sql.conf |
| | |
| | | plugin { |
| | | quota = dict:user::file:/var/vmail/%d/%n/.quotausage |
| | | sieve=/var/vmail/%d/%n/.sieve |
| | | sieve_max_redirects = 25 |
| | | } |
| | | service auth { |
| | | unix_listener /var/spool/postfix/private/auth { |
| | |
| | | } |
| | | service imap-login { |
| | | client_limit = 1000 |
| | | process_limit = 500 |
| | | process_limit = 512 |
| | | } |
| | | protocol imap { |
| | | mail_plugins = quota imap_quota |
| | |
| | | smtpd_sasl_auth_enable = yes |
| | | broken_sasl_auth_clients = yes |
| | | smtpd_sasl_authenticated_header = yes |
| | | smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf{rbl_list} |
| | | smtpd_restriction_classes = greylisting |
| | | greylisting = check_policy_service inet:127.0.0.1:10023 |
| | | smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf{rbl_list}{greylisting} |
| | | smtpd_use_tls = yes |
| | | smtpd_tls_security_level = may |
| | | smtpd_tls_cert_file = {config_dir}/smtpd.cert |
| | |
| | | transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf |
| | | relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf |
| | | relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re{reject_slm}, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
| | |
| | | smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 |
| | | smtpd_tls_protocols = !SSLv2,!SSLv3 |
| | | smtp_tls_protocols = !SSLv2,!SSLv3 |
| | | smtpd_tls_exclude_ciphers = RC4, aNULL |
| | | smtp_tls_exclude_ciphers = RC4, aNULL |
| | |
| | | # FROM users WHERE userid = '%u' |
| | | |
| | | driver = mysql |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} port={mysql_server_port} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | # password-query with prefetch |
| | | password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | |
| | | # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. |
| | | # Do not enable it on Dovecot 1.x servers |
| | |
| | | # This can be made to work with SQL and LDAP databases, see their example |
| | | # configuration files for more information how to do it. |
| | | # <doc/wiki/UserDatabase.Prefetch.txt> |
| | | #userdb prefetch { |
| | | #} |
| | | userdb prefetch { |
| | | } |
| | | |
| | | # System users (NSS, /etc/passwd, or similiar). In many systems nowadays this |
| | | # uses Name Service Switch, which is configured in /etc/nsswitch.conf. |
| | |
| | | driver = sql |
| | | } |
| | | userdb { |
| | | driver = prefetch |
| | | } |
| | | userdb { |
| | | args = /etc/dovecot-sql.conf |
| | | driver = sql |
| | | } |
| | |
| | | protocol lmtp { |
| | | postmaster_address = webmaster@localhost |
| | | mail_plugins = quota sieve |
| | | } |
| | | } |
| | |
| | | smtpd_sasl_auth_enable = yes |
| | | broken_sasl_auth_clients = yes |
| | | smtpd_sasl_authenticated_header = yes |
| | | smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf{rbl_list} |
| | | smtpd_restriction_classes = greylisting |
| | | greylisting = check_policy_service inet:127.0.0.1:10023 |
| | | smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf{rbl_list}{greylisting} |
| | | smtpd_use_tls = yes |
| | | smtpd_tls_security_level = may |
| | | smtpd_tls_cert_file = {config_dir}/smtpd.cert |
| | |
| | | transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf |
| | | relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf |
| | | relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re{reject_slm}, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
| | |
| | | smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 |
| | | smtpd_tls_protocols = !SSLv2,!SSLv3 |
| | | smtp_tls_protocols = !SSLv2,!SSLv3 |
| | | smtpd_tls_exclude_ciphers = RC4, aNULL |
| | | smtp_tls_exclude_ciphers = RC4, aNULL |
| | |
| | | smtpd_sasl_auth_enable = yes |
| | | broken_sasl_auth_clients = yes |
| | | smtpd_sasl_authenticated_header = yes |
| | | smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf{rbl_list} |
| | | smtpd_restriction_classes = greylisting |
| | | greylisting = check_policy_service inet:127.0.0.1:10023 |
| | | smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf{rbl_list}{greylisting} |
| | | smtpd_use_tls = yes |
| | | smtpd_tls_security_level = may |
| | | smtpd_tls_cert_file = {config_dir}/smtpd.cert |
| | |
| | | transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf |
| | | relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf |
| | | relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re{reject_slm}, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
| | |
| | | smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 |
| | | smtpd_tls_protocols = !SSLv2,!SSLv3 |
| | | smtp_tls_protocols = !SSLv2,!SSLv3 |
| | | smtpd_tls_exclude_ciphers = RC4, aNULL |
| | | smtp_tls_exclude_ciphers = RC4, aNULL |
New file |
| | |
| | | pidfile = "/var/run/metronome/metronome.pid"; |
| | | metronome_max_files_soft = 200000; |
| | | metronome_max_files_hard = 300000; |
| | | plugin_paths = { |
| | | "/usr/lib/metronome/isp-modules", |
| | | }; |
| | | use_libevent = true; |
| | | log = { |
| | | debug = "/var/log/metronome/metronome.dbg", |
| | | info = "/var/log/metronome/metronome.log", |
| | | error = "/var/log/metronome/metronome.err", |
| | | }; |
| | | use_ipv6 = true; |
| | | http_ports = { |
| | | 5290, |
| | | }; |
| | | https_ports = { |
| | | 5291, |
| | | }; |
| | | pastebin_ports = { |
| | | 5292, |
| | | }; |
| | | bosh_ports = { |
| | | 5280, |
| | | }; |
| | | admins = { |
| | | {tmpl_var xmpp_admins} |
| | | }; |
| | | modules_enabled = { |
| | | "saslauth", |
| | | "tls", |
| | | "dialback", |
| | | "disco", |
| | | "discoitems", |
| | | "version", |
| | | "uptime", |
| | | "time", |
| | | "ping", |
| | | "admin_adhoc", |
| | | "admin_telnet", |
| | | "bosh", |
| | | "posix", |
| | | "announce", |
| | | "offline", |
| | | "webpresence", |
| | | "mam", |
| | | "stream_management", |
| | | "message_carbons" |
| | | }; |
| | | modules_disabled = { |
| | | }; |
| | | bosh_max_inactivity = 30; |
| | | consider_bosh_secure = true; |
| | | cross_domain_bosh = true; |
| | | allow_registration = false; |
| | | ssl = { |
| | | key = "/etc/metronome/certs/localhost.key", |
| | | certificate = "/etc/metronome/certs/localhost.cert", |
| | | }; |
| | | c2s_require_encryption = false; |
| | | s2s_secure = true; |
| | | s2s_insecure_domains = { |
| | | "gmail.com", |
| | | }; |
| | | authentication = "internal_plain"; |
New file |
| | |
| | | Include "/etc/metronome/global.cfg.lua" |
| | | Include "/etc/metronome/hosts/*.lua" |
| | | Include "/etc/metronome/status/*.lua" |
New file |
| | |
| | | oid_section = new_oids |
| | | |
| | | [ new_oids ] |
| | | |
| | | # RFC 3920 section 5.1.1 defines this OID |
| | | xmppAddr = 1.3.6.1.5.5.7.8.5 |
| | | |
| | | # RFC 4985 defines this OID |
| | | SRVName = 1.3.6.1.5.5.7.8.7 |
| | | |
| | | [ req ] |
| | | |
| | | default_bits = 4096 |
| | | default_keyfile = {tmpl_var name='domain'}.key |
| | | distinguished_name = distinguished_name |
| | | req_extensions = v3_extensions |
| | | x509_extensions = v3_extensions |
| | | |
| | | # ask about the DN? |
| | | prompt = no |
| | | |
| | | [ distinguished_name ] |
| | | |
| | | commonName = {tmpl_var name='domain'} |
| | | countryName = {tmpl_var name='ssl_country'} |
| | | localityName = {tmpl_var name='ssl_locality'} |
| | | organizationName = {tmpl_var name='ssl_organisation'} |
| | | organizationalUnitName = {tmpl_var name='ssl_organisation_unit'} |
| | | emailAddress = {tmpl_var name='ssl_email'} |
| | | |
| | | [ v3_extensions ] |
| | | |
| | | # for certificate requests (req_extensions) |
| | | # and self-signed certificates (x509_extensions) |
| | | |
| | | basicConstraints = CA:FALSE |
| | | keyUsage = digitalSignature,keyEncipherment |
| | | extendedKeyUsage = serverAuth,clientAuth |
| | | subjectAltName = @subject_alternative_name |
| | | |
| | | [ subject_alternative_name ] |
| | | |
| | | # See http://tools.ietf.org/html/draft-ietf-xmpp-3920bis#section-13.7.1.2 for more info. |
| | | |
| | | DNS.0 = {tmpl_var name='domain'} |
| | | otherName.0 = xmppAddr;FORMAT:UTF8,UTF8:{tmpl_var name='domain'} |
| | | otherName.1 = SRVName;IA5STRING:_xmpp-client.{tmpl_var name='domain'} |
| | | otherName.2 = SRVName;IA5STRING:_xmpp-server.{tmpl_var name='domain'} |
| | |
| | | db-user = {mysql_server_ispconfig_user} # SQL server username |
| | | db-password = {mysql_server_ispconfig_password} # SQL server password |
| | | database = {mysql_server_database} # MyDNS database name |
| | | db-port = {mysql_server_port} # SQL server port |
| | | |
| | | |
| | | # GENERAL OPTIONS |
New file |
| | |
| | | user = {mysql_server_ispconfig_user}
|
| | | password = {mysql_server_ispconfig_password}
|
| | | dbname = {mysql_server_database}
|
| | | table = mail_user
|
| | | select_field = sender_cc
|
| | | where_field = email
|
| | | additional_conditions = and postfix = 'y' and disabledeliver = 'n' and disablesmtp = 'n'
|
| | | hosts = 127.0.0.1 |
New file |
| | |
| | | user = {mysql_server_ispconfig_user} |
| | | password = {mysql_server_ispconfig_password} |
| | | dbname = {mysql_server_database} |
| | | query = SELECT 'greylisting' FROM (SELECT greylisting, source AS email FROM mail_forwarding WHERE server_id = {server_id} UNION SELECT greylisting, email FROM mail_user WHERE server_id = {server_id}) addresses WHERE addresses.email='%s' AND addresses.greylisting='y' |
| | | hosts = {mysql_server_ip} |
New file |
| | |
| | | user = {mysql_server_ispconfig_user} |
| | | password = {mysql_server_ispconfig_password} |
| | | dbname = {mysql_server_database} |
| | | query = SELECT destination FROM mail_forwarding WHERE source = '%s' AND active = 'y' AND type = 'alias' AND server_id = {server_id} UNION SELECT email FROM mail_user WHERE email = '%s' AND disablesmtp = 'n' AND server_id = {server_id}; |
| | | hosts = {mysql_server_ip} |
| | |
| | | } |
| | | |
| | | # serve static files directly |
| | | location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ { |
| | | location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ { |
| | | access_log off; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | # serve static files directly |
| | | location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ { |
| | | location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ { |
| | | access_log off; |
| | | } |
| | | |
| | |
| | | # FROM users WHERE userid = '%u' |
| | | |
| | | driver = mysql |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} port={mysql_server_port} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | # password-query with prefetch |
| | | password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | |
| | | # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. |
| | | # Do not enable it on Dovecot 1.x servers |
| | |
| | | # This can be made to work with SQL and LDAP databases, see their example |
| | | # configuration files for more information how to do it. |
| | | # <doc/wiki/UserDatabase.Prefetch.txt> |
| | | #userdb prefetch { |
| | | #} |
| | | userdb prefetch { |
| | | } |
| | | |
| | | # System users (NSS, /etc/passwd, or similiar). In many systems nowadays this |
| | | # uses Name Service Switch, which is configured in /etc/nsswitch.conf. |
| | |
| | | driver = sql |
| | | } |
| | | userdb { |
| | | driver = prefetch |
| | | } |
| | | userdb { |
| | | args = /etc/dovecot/dovecot-sql.conf |
| | | driver = sql |
| | | } |
| | |
| | | smtpd_sasl_auth_enable = yes |
| | | broken_sasl_auth_clients = yes |
| | | smtpd_sasl_authenticated_header = yes |
| | | smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf{rbl_list} |
| | | smtpd_restriction_classes = greylisting |
| | | greylisting = check_policy_service inet:127.0.0.1:10023 |
| | | smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf{rbl_list}{greylisting} |
| | | smtpd_use_tls = yes |
| | | smtpd_tls_security_level = may |
| | | smtpd_tls_cert_file = {config_dir}/smtpd.cert |
| | |
| | | transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf |
| | | relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf |
| | | relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re{reject_slm}, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
| | |
| | | smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 |
| | | smtpd_tls_protocols = !SSLv2,!SSLv3 |
| | | smtp_tls_protocols = !SSLv2,!SSLv3 |
| | | smtpd_tls_exclude_ciphers = RC4, aNULL |
| | | smtp_tls_exclude_ciphers = RC4, aNULL |
| | |
| | | gmysql-user={mysql_server_ispconfig_user} |
| | | gmysql-password={mysql_server_ispconfig_password} |
| | | gmysql-dbname={powerdns_database} |
| | | gmysql-port={mysql_server_port} |
| | | |
| | | slave=yes |
| | | master=yes |
| | |
| | | |
| | | chdir = / |
| | | |
| | | ; php_admin_value[open_basedir] = /usr/local/ispconfig/interface:/usr/share |
| | | ; php_admin_value[open_basedir] = /usr/local/ispconfig/interface:/usr/local/ispconfig/security:/usr/share:/var/lib/roundcube:/etc/roundcube:/usr/share/roundcube |
| | | php_admin_value[session.save_path] = /usr/local/ispconfig/interface/temp |
| | | php_admin_flag[magic_quotes_gpc] = off |
| | |
| | | loglevel=2 |
| | | admin_notify_events=1 |
| | | backup_dir=/var/backup |
| | | backup_dir_is_mount=n |
| | | backup_dir_is_mount=y |
| | | backup_mode=rootgz |
| | | backup_delete=y |
| | | monit_url= |
| | |
| | | apps_vhost_servername= |
| | | php_open_basedir=[website_path]/web:[website_path]/private:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin |
| | | htaccess_allow_override=All |
| | | enable_spdy=y |
| | | awstats_conf_dir=/etc/awstats |
| | | awstats_data_dir=/var/lib/awstats |
| | | awstats_pl=/usr/lib/cgi-bin/awstats.pl |
| | |
| | | php_ini_path_cgi=/etc/php5/cgi/php.ini |
| | | check_apache_config=y |
| | | enable_sni=y |
| | | enable_spdy=n |
| | | enable_ip_wildcard=y |
| | | overtraffic_notify_admin=y |
| | | overtraffic_notify_client=y |
| | |
| | | [jailkit] |
| | | jailkit_chroot_home=/home/[username] |
| | | jailkit_chroot_app_sections=basicshell editors extendedshell netutils ssh sftp scp groups jk_lsh |
| | | jailkit_chroot_app_programs=/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico |
| | | jailkit_chroot_app_programs=/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico /usr/bin/mysql /usr/bin/mysqldump /usr/bin/git /usr/bin/git-receive-pack /usr/bin/git-upload-pack /usr/bin/unzip /usr/bin/zip /bin/tar /bin/rm /usr/bin/patch |
| | | jailkit_chroot_cron_programs=/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php |
| | | |
| | | [vlogger] |
| | |
| | | do_not_try_rescue_mysql=n |
| | | do_not_try_rescue_mail=n |
| | | |
| | | [xmpp] |
| | | xmpp_use_ispv6=n |
| | | xmpp_bosh_max_inactivity=30 |
| | | xmpp_server_admins=admin@service.com, superuser@service.com |
| | | xmpp_modules_enabled=saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons |
| | | xmpp_port_http=5290 |
| | | xmpp_port_https=5291 |
| | | xmpp_port_pastebin=5292 |
| | | xmpp_port_bosh=5280 |
| | |
| | | |
| | | [mail] |
| | | enable_custom_login=n |
| | | mailbox_show_autoresponder_tab=y |
| | | mailbox_show_mail_filter_tab=y |
| | | mailbox_show_custom_rules_tab=y |
| | | mailboxlist_webmail_link=y |
| | | webmail_url=/webmail |
| | | dkim_path=/var/lib/amavis/dkim |
| | |
| | | dblist_phpmyadmin_link=y |
| | | phpmyadmin_url=/phpmyadmin |
| | | webftp_url= |
| | | vhost_subdomains=n |
| | | vhost_aliasdomains=n |
| | | client_username_web_check_disabled=n |
| | | backups_include_into_web_quota=n |
| | | reseller_can_use_options=n |
| | | |
| | | |
| | | [tools] |
| | | |
| | | [domains] |
| | |
| | | |
| | | echo "\n\n>> Uninstalling ISPConfig 3... \n\n"; |
| | | |
| | | // Delete the ISPConfig database |
| | | // $app->db->query("DROP DATABASE '".$conf["db_database"]."'"); |
| | | // $app->db->query("DELETE FROM mysql.user WHERE User = 'ispconfig'"); |
| | | |
| | | // exec("/etc/init.d/mysql stop"); |
| | | // exec("rm -rf /var/lib/mysql/".$conf["db_database"]); |
| | | // exec("/etc/init.d/mysql start"); |
| | | |
| | | $link = mysql_connect($clientdb_host, $clientdb_user, $clientdb_password); |
| | | if (!$link) { |
| | | echo "Unable to connect to the database'.mysql_error($link)"; |
| | |
| | | $finished = false; |
| | | do { |
| | | $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname'); |
| | | $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port'); |
| | | $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user'); |
| | | $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password'); |
| | | $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); |
| | | |
| | | //* Initialize the MySQL server connection |
| | | if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) { |
| | | if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, (int)$tmp_mysql_server_port)) { |
| | | $conf['mysql']['master_host'] = $tmp_mysql_server_host; |
| | | $conf['mysql']['master_port'] = $tmp_mysql_server_port; |
| | | $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; |
| | | $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password; |
| | | $conf['mysql']['master_database'] = $tmp_mysql_server_database; |
| | |
| | | // initialize the connection to the master database |
| | | $inst->dbmaster = new db(); |
| | | if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); |
| | | $inst->dbmaster->dbHost = $conf['mysql']["master_host"]; |
| | | $inst->dbmaster->dbName = $conf['mysql']["master_database"]; |
| | | $inst->dbmaster->dbUser = $conf['mysql']["master_admin_user"]; |
| | | $inst->dbmaster->dbPass = $conf['mysql']["master_admin_password"]; |
| | | $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"]); |
| | | $inst->dbmaster->setDBName($conf['mysql']["master_database"]); |
| | | } else { |
| | | $inst->dbmaster = $inst->db; |
| | | } |
| | |
| | | $inst->configure_apps_vhost(); |
| | | } |
| | | |
| | | if($conf['services']['xmpp']) { |
| | | //** Configure Metronome XMPP |
| | | $inst->configure_xmpp('dont-create-certs'); |
| | | } |
| | | |
| | | |
| | | //* Configure DBServer |
| | | swriteln('Configuring Database'); |
| | |
| | | if($conf['bind']['installed'] == true && $conf['bind']['init_script'] != '') system($inst->getinitcommand($conf['bind']['init_script'], 'restart').' &> /dev/null'); |
| | | } |
| | | |
| | | if($conf['services']['xmpp']) { |
| | | if($conf['xmpp']['installed'] == true && $conf['xmpp']['init_script'] != '') system($inst->getinitcommand($conf['xmpp']['init_script'], 'restart').' &> /dev/null'); |
| | | } |
| | | |
| | | if($conf['services']['proxy']) { |
| | | // if($conf['squid']['installed'] == true && $conf['squid']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['squid']['init_script'])) system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); |
| | | if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'restart').' &> /dev/null'); |
| | |
| | | } |
| | | } |
| | | |
| | | //* Set default servers |
| | | setDefaultServers(); |
| | | |
| | | $inst->create_mount_script(); |
| | | |
| | | //* Create md5 filelist |
| | | $md5_filename = '/usr/local/ispconfig/security/data/file_checksums_'.date('Y-m-d_h-i').'.md5'; |
| | | exec('find /usr/local/ispconfig -type f -print0 | xargs -0 md5sum > '.$md5_filename); |
| | |
| | | |
| | | $this->uses('session'); |
| | | $sess_timeout = $this->conf('interface', 'session_timeout'); |
| | | $cookie_domain = (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST']); |
| | | $cookie_secure = ($_SERVER["HTTPS"] == 'on')?true:false; |
| | | if($sess_timeout) { |
| | | /* check if user wants to stay logged in */ |
| | | if(isset($_POST['s_mod']) && isset($_POST['s_pg']) && $_POST['s_mod'] == 'login' && $_POST['s_pg'] == 'index' && isset($_POST['stay']) && $_POST['stay'] == '1') { |
| | |
| | | $tmp = $this->ini_parser->parse_ini_string(stripslashes($tmp['config'])); |
| | | if(!isset($tmp['misc']['session_allow_endless']) || $tmp['misc']['session_allow_endless'] != 'y') { |
| | | $this->session->set_timeout($sess_timeout); |
| | | session_set_cookie_params(3600 * 24 * 365); // cookie timeout is never updated, so it must not be short |
| | | session_set_cookie_params(3600 * 24 * 365,'/',$cookie_domain,$cookie_secure,true); // cookie timeout is never updated, so it must not be short |
| | | } else { |
| | | // we are doing login here, so we need to set the session data |
| | | $this->session->set_permanent(true); |
| | | $this->session->set_timeout(365 * 24 * 3600); // one year |
| | | session_set_cookie_params(3600 * 24 * 365); // cookie timeout is never updated, so it must not be short |
| | | $this->session->set_timeout(365 * 24 * 3600,'/',$cookie_domain,$cookie_secure,true); // one year |
| | | session_set_cookie_params(3600 * 24 * 365,'/',$cookie_domain,$cookie_secure,true); // cookie timeout is never updated, so it must not be short |
| | | } |
| | | } else { |
| | | $this->session->set_timeout($sess_timeout); |
| | | session_set_cookie_params(3600 * 24 * 365); // cookie timeout is never updated, so it must not be short |
| | | session_set_cookie_params(3600 * 24 * 365,'/',$cookie_domain,$cookie_secure,true); // cookie timeout is never updated, so it must not be short |
| | | } |
| | | } else { |
| | | session_set_cookie_params(0); // until browser is closed |
| | | session_set_cookie_params(0,'/',$cookie_domain,$cookie_secure,true); // until browser is closed |
| | | } |
| | | |
| | | session_set_save_handler( array($this->session, 'open'), |
| | |
| | | |
| | | public function conf($plugin, $key, $value = null) { |
| | | if(is_null($value)) { |
| | | $tmpconf = $this->db->queryOneRecord("SELECT `value` FROM `sys_config` WHERE `group` = '" . $this->db->quote($plugin) . "' AND `name` = '" . $this->db->quote($key) . "'"); |
| | | $tmpconf = $this->db->queryOneRecord("SELECT `value` FROM `sys_config` WHERE `group` = ? AND `name` = ?", $plugin, $key); |
| | | if($tmpconf) return $tmpconf['value']; |
| | | else return null; |
| | | } else { |
| | | if($value === false) { |
| | | $this->db->query("DELETE FROM `sys_config` WHERE `group` = '" . $this->db->quote($plugin) . "' AND `name` = '" . $this->db->quote($key) . "'"); |
| | | $this->db->query("DELETE FROM `sys_config` WHERE `group` = ? AND `name` = ?", $plugin, $key); |
| | | return null; |
| | | } else { |
| | | $this->db->query("REPLACE INTO `sys_config` (`group`, `name`, `value`) VALUES ('" . $this->db->quote($plugin) . "', '" . $this->db->quote($key) . "', '" . $this->db->quote($value) . "')"); |
| | | $this->db->query("REPLACE INTO `sys_config` (`group`, `name`, `value`) VALUES (?, ?, ?)", $plugin, $key, $value); |
| | | return $value; |
| | | } |
| | | } |
| | |
| | | $server_id = 0; |
| | | $priority = $this->functions->intval($priority); |
| | | $tstamp = time(); |
| | | $msg = $this->db->quote('[INTERFACE]: '.$msg); |
| | | $this->db->query("INSERT INTO sys_log (server_id,datalog_id,loglevel,tstamp,message) VALUES ($server_id,0,$priority,$tstamp,'$msg')"); |
| | | $msg = '[INTERFACE]: '.$msg; |
| | | $this->db->query("INSERT INTO sys_log (server_id,datalog_id,loglevel,tstamp,message) VALUES (?, 0, ?, ?, ?)", $server_id, $priority,$tstamp,$msg); |
| | | /* |
| | | if (is_writable($this->_conf['log_file'])) { |
| | | if (!$fp = fopen ($this->_conf['log_file'], 'a')) { |
| | |
| | | curl_setopt($conn[$i], CURLOPT_TIMEOUT, 0); |
| | | curl_setopt($conn[$i], CURLOPT_FAILONERROR, 1); |
| | | curl_setopt($conn[$i], CURLOPT_FOLLOWLOCATION, 1); |
| | | curl_setopt($conn[$i], CURLOPT_SSL_VERIFYHOST, 1); |
| | | curl_setopt($conn[$i], CURLOPT_SSL_VERIFYPEER, false); |
| | | |
| | | curl_multi_add_handle($mh, $conn[$i]); |
| | | } |
| | |
| | | $apps_count = substr_count($apps[$j], '<opensearch:totalResults>0</opensearch:totalResults>'); |
| | | if($apps_count == 0) // obviously this vendor provides one or more apps |
| | | { |
| | | // Rename namespaces and register them |
| | | $xml = str_replace("xmlns=", "ns=", $apps[$j]); |
| | | $sxe = new SimpleXMLElement($xml); |
| | | $namespaces = $sxe->getDocNamespaces(true); |
| | | foreach($namespaces as $ns => $url) $sxe->registerXPathNamespace($ns, $url); |
| | | try { |
| | | // Rename namespaces and register them |
| | | $xml = str_replace("xmlns=", "ns=", $apps[$j]); |
| | | $sxe = new SimpleXMLElement($xml); |
| | | $namespaces = $sxe->getDocNamespaces(true); |
| | | foreach($namespaces as $ns => $url) $sxe->registerXPathNamespace($ns, $url); |
| | | |
| | | //Find highest version |
| | | $app_version = "0.0.0"; |
| | | $entry_pos = 1; |
| | | for ($p = 1; ; $p++) { |
| | | $app_version_tmp = parent::getXPathValue($sxe, 'entry[position()=' . $p . ']/a:version'); |
| | | if (strlen($app_version_tmp) < 1) break; |
| | | if (version_compare($app_version_tmp, $app_version) >= 0) { |
| | | $app_version = $app_version_tmp; |
| | | $entry_pos = $p; |
| | | //Find highest version |
| | | $app_version = "0.0.0"; |
| | | $entry_pos = 1; |
| | | for ($p = 1; ; $p++) { |
| | | $app_version_tmp = parent::getXPathValue($sxe, 'entry[position()=' . $p . ']/a:version'); |
| | | if (strlen($app_version_tmp) < 1) break; |
| | | if (version_compare($app_version_tmp, $app_version) >= 0) { |
| | | $app_version = $app_version_tmp; |
| | | $entry_pos = $p; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // Fetching values of interest |
| | | //$app_name = parent::getXPathValue($sxe, 'entry[position()=1]/a:name'); |
| | | //$app_version = parent::getXPathValue($sxe, 'entry[position()=1]/a:version'); |
| | | //$app_release = parent::getXPathValue($sxe, 'entry[position()=1]/a:release'); |
| | | $app_name = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/a:name"); |
| | | $app_version = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/a:version"); |
| | | $app_release = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/a:release"); |
| | | // Fetching values of interest |
| | | //$app_name = parent::getXPathValue($sxe, 'entry[position()=1]/a:name'); |
| | | //$app_version = parent::getXPathValue($sxe, 'entry[position()=1]/a:version'); |
| | | //$app_release = parent::getXPathValue($sxe, 'entry[position()=1]/a:release'); |
| | | $app_name = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/a:name"); |
| | | $app_version = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/a:version"); |
| | | $app_release = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/a:release"); |
| | | |
| | | // Find out a (possibly) existing package version |
| | | $ex_ver = ''; |
| | | /* |
| | | array_walk($existing_apps, |
| | | create_function('$v, $k, $ex_ver', 'if($v["Name"] == "'.$app_name.'") $ex_ver = $v["CurrentVersion"];'), &$ex_ver); |
| | | */ |
| | | if(is_array($existing_apps)) { |
| | | foreach($existing_apps as $k => $v) { |
| | | if($v["Name"] == $app_name) $ex_ver = $v["CurrentVersion"]; |
| | | // Find out a (possibly) existing package version |
| | | $ex_ver = ''; |
| | | /* |
| | | array_walk($existing_apps, |
| | | create_function('$v, $k, $ex_ver', 'if($v["Name"] == "'.$app_name.'") $ex_ver = $v["CurrentVersion"];'), &$ex_ver); |
| | | */ |
| | | if(is_array($existing_apps)) { |
| | | foreach($existing_apps as $k => $v) { |
| | | if($v["Name"] == $app_name) $ex_ver = $v["CurrentVersion"]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | $new_ver = $app_version.'-'.$app_release; |
| | | $local_intf_folder = $this->interface_pkg_dir.'/'.$app_name.'-'.$new_ver.'.app.zip/'; |
| | | $new_ver = $app_version.'-'.$app_release; |
| | | $local_intf_folder = $this->interface_pkg_dir.'/'.$app_name.'-'.$new_ver.'.app.zip/'; |
| | | |
| | | // Proceed if a newer or at least equal version has been found with server mode or |
| | | // interface mode is activated and there are no valid APP-META.xml and PKG_URL existing yet |
| | | if((!$this->interface_mode && version_compare($new_ver, $ex_ver) >= 0) || ($this->interface_mode && (!file_exists($local_intf_folder.'APP-META.xml') || filesize($local_intf_folder.'APP-META.xml') == 0 || !file_exists($local_intf_folder.'PKG_URL') || filesize($local_intf_folder.'PKG_URL') == 0))){ |
| | | // Check if we already have an old version of this app |
| | | if(!empty($ex_ver) && version_compare($new_ver, $ex_ver) == 1) $apps_updated++; |
| | | // Proceed if a newer or at least equal version has been found with server mode or |
| | | // interface mode is activated and there are no valid APP-META.xml and PKG_URL existing yet |
| | | if((!$this->interface_mode && version_compare($new_ver, $ex_ver) >= 0) || ($this->interface_mode && (!file_exists($local_intf_folder.'APP-META.xml') || filesize($local_intf_folder.'APP-META.xml') == 0 || !file_exists($local_intf_folder.'PKG_URL') || filesize($local_intf_folder.'PKG_URL') == 0))){ |
| | | // Check if we already have an old version of this app |
| | | if(!empty($ex_ver) && version_compare($new_ver, $ex_ver) == 1) $apps_updated++; |
| | | |
| | | //$app_dl = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='aps']/@href"); |
| | | //$app_filesize = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='aps']/@length"); |
| | | //$app_metafile = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='meta']/@href"); |
| | | $app_dl = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='aps']/@href"); |
| | | $app_filesize = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='aps']/@length"); |
| | | $app_metafile = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='meta']/@href"); |
| | | //$app_dl = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='aps']/@href"); |
| | | //$app_filesize = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='aps']/@length"); |
| | | //$app_metafile = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='meta']/@href"); |
| | | $app_dl = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='aps']/@href"); |
| | | $app_filesize = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='aps']/@length"); |
| | | $app_metafile = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='meta']/@href"); |
| | | |
| | | //$this->app_download_url_list[$app_name.'-'.$new_ver.'.app.zip'] = $app_dl; |
| | | // Skip ASP.net packages because they can't be used at all |
| | | $asp_handler = parent::getXPathValue($sxe, '//aspnet:handler'); |
| | | $asp_permissions = parent::getXPathValue($sxe, '//aspnet:permissions'); |
| | | $asp_version = parent::getXPathValue($sxe, '//aspnet:version'); |
| | | if(!empty($asp_handler) || !empty($asp_permissions) || !empty($asp_version)) continue; |
| | | //$this->app_download_url_list[$app_name.'-'.$new_ver.'.app.zip'] = $app_dl; |
| | | // Skip ASP.net packages because they can't be used at all |
| | | $asp_handler = parent::getXPathValue($sxe, '//aspnet:handler'); |
| | | $asp_permissions = parent::getXPathValue($sxe, '//aspnet:permissions'); |
| | | $asp_version = parent::getXPathValue($sxe, '//aspnet:version'); |
| | | if(!empty($asp_handler) || !empty($asp_permissions) || !empty($asp_version)) continue; |
| | | |
| | | // Interface mode (download only parts) |
| | | if($this->interface_mode) |
| | | { |
| | | // Delete an obviously out-dated version from the system and DB |
| | | if(!empty($ex_ver) && version_compare($new_ver, $ex_ver) == 1) |
| | | // Interface mode (download only parts) |
| | | if($this->interface_mode) |
| | | { |
| | | $old_folder = $this->interface_pkg_dir.'/'.$app_name.'-'.$ex_ver.'.app.zip'; |
| | | if(file_exists($old_folder)) $this->removeDirectory($old_folder); |
| | | |
| | | /* |
| | | $app->db->query("UPDATE aps_packages SET package_status = '".PACKAGE_OUTDATED."' WHERE name = '". |
| | | $app->db->quote($app_name)."' AND CONCAT(version, '-', CAST(`release` AS CHAR)) = '". |
| | | $app->db->quote($ex_ver)."';"); |
| | | */ |
| | | $tmp = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE name = '". |
| | | $app->db->quote($app_name)."' AND CONCAT(version, '-', CAST(`release` AS CHAR)) = '". |
| | | $app->db->quote($ex_ver)."';"); |
| | | $app->db->datalogUpdate('aps_packages', "package_status = ".PACKAGE_OUTDATED, 'id', $tmp['id']); |
| | | unset($tmp); |
| | | } |
| | | |
| | | // Create the local folder if not yet existing |
| | | if(!file_exists($local_intf_folder)) @mkdir($local_intf_folder, 0777, true); |
| | | |
| | | // Save the package URL in an extra file because it's not part of the APP-META.xml file |
| | | @file_put_contents($local_intf_folder.'PKG_URL', $app_dl); |
| | | |
| | | // Download the meta file |
| | | $local_metafile = $local_intf_folder.'APP-META.xml'; |
| | | if(!file_exists($local_metafile) || filesize($local_metafile) == 0) |
| | | { |
| | | $apps_to_dl[] = array('name' => 'APP-META.xml', |
| | | 'url' => $app_metafile, |
| | | 'filesize' => 0, |
| | | 'localtarget' => $local_metafile); |
| | | $apps_downloaded++; |
| | | } |
| | | |
| | | // Download package license |
| | | //$license = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='eula']/@href"); |
| | | $license = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='eula']/@href"); |
| | | if($license != '') |
| | | { |
| | | $local_license = $local_intf_folder.'LICENSE'; |
| | | if(!file_exists($local_license) || filesize($local_license) == 0) |
| | | // Delete an obviously out-dated version from the system and DB |
| | | if(!empty($ex_ver) && version_compare($new_ver, $ex_ver) == 1) |
| | | { |
| | | $apps_to_dl[] = array('name' => basename($license), |
| | | 'url' => $license, |
| | | 'filesize' => 0, |
| | | 'localtarget' => $local_license); |
| | | $old_folder = $this->interface_pkg_dir.'/'.$app_name.'-'.$ex_ver.'.app.zip'; |
| | | if(file_exists($old_folder)) $this->removeDirectory($old_folder); |
| | | |
| | | $tmp = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE name = ? AND CONCAT(version, '-', CAST(`release` AS CHAR)) = ?", $app_name, $ex_ver); |
| | | $app->db->datalogUpdate('aps_packages', array("package_status" => PACKAGE_OUTDATED), 'id', $tmp['id']); |
| | | unset($tmp); |
| | | } |
| | | } |
| | | |
| | | // Download package icon |
| | | //$icon = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='icon']/@href"); |
| | | $icon = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='icon']/@href"); |
| | | if($icon != '') |
| | | { |
| | | $local_icon = $local_intf_folder.basename($icon); |
| | | if(!file_exists($local_icon) || filesize($local_icon) == 0) |
| | | // Create the local folder if not yet existing |
| | | if(!file_exists($local_intf_folder)) @mkdir($local_intf_folder, 0777, true); |
| | | |
| | | // Save the package URL in an extra file because it's not part of the APP-META.xml file |
| | | @file_put_contents($local_intf_folder.'PKG_URL', $app_dl); |
| | | |
| | | // Download the meta file |
| | | $local_metafile = $local_intf_folder.'APP-META.xml'; |
| | | if(!file_exists($local_metafile) || filesize($local_metafile) == 0) |
| | | { |
| | | $apps_to_dl[] = array('name' => basename($icon), |
| | | 'url' => $icon, |
| | | $apps_to_dl[] = array('name' => 'APP-META.xml', |
| | | 'url' => $app_metafile, |
| | | 'filesize' => 0, |
| | | 'localtarget' => $local_icon); |
| | | 'localtarget' => $local_metafile); |
| | | $apps_downloaded++; |
| | | } |
| | | } |
| | | |
| | | // Download available screenshots |
| | | //$screenshots = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='screenshot']", true); |
| | | $screenshots = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='screenshot']", true); |
| | | if(!empty($screenshots)) |
| | | { |
| | | foreach($screenshots as $screen) |
| | | // Download package license |
| | | //$license = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='eula']/@href"); |
| | | $license = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='eula']/@href"); |
| | | if($license != '') |
| | | { |
| | | $local_screen = $local_intf_folder.basename($screen['href']); |
| | | if(!file_exists($local_screen) || filesize($local_screen) == 0) |
| | | $local_license = $local_intf_folder.'LICENSE'; |
| | | if(!file_exists($local_license) || filesize($local_license) == 0) |
| | | { |
| | | $apps_to_dl[] = array('name' => basename($screen['href']), |
| | | 'url' => $screen['href'], |
| | | $apps_to_dl[] = array('name' => basename($license), |
| | | 'url' => $license, |
| | | 'filesize' => 0, |
| | | 'localtarget' => $local_screen); |
| | | 'localtarget' => $local_license); |
| | | } |
| | | } |
| | | |
| | | // Download package icon |
| | | //$icon = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='icon']/@href"); |
| | | $icon = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='icon']/@href"); |
| | | if($icon != '') |
| | | { |
| | | $local_icon = $local_intf_folder.basename($icon); |
| | | if(!file_exists($local_icon) || filesize($local_icon) == 0) |
| | | { |
| | | $apps_to_dl[] = array('name' => basename($icon), |
| | | 'url' => $icon, |
| | | 'filesize' => 0, |
| | | 'localtarget' => $local_icon); |
| | | } |
| | | } |
| | | |
| | | // Download available screenshots |
| | | //$screenshots = parent::getXPathValue($sxe, "entry[position()=1]/link[@a:type='screenshot']", true); |
| | | $screenshots = parent::getXPathValue($sxe, "entry[position()=" . $entry_pos . "]/link[@a:type='screenshot']", true); |
| | | if(!empty($screenshots)) |
| | | { |
| | | foreach($screenshots as $screen) |
| | | { |
| | | $local_screen = $local_intf_folder.basename($screen['href']); |
| | | if(!file_exists($local_screen) || filesize($local_screen) == 0) |
| | | { |
| | | $apps_to_dl[] = array('name' => basename($screen['href']), |
| | | 'url' => $screen['href'], |
| | | 'filesize' => 0, |
| | | 'localtarget' => $local_screen); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else // Server mode (download whole ZIP archive) |
| | | { |
| | | // Delete an obviously out-dated version from the system |
| | | if(!empty($ex_ver) && version_compare($new_ver, $ex_ver) == 1) |
| | | { |
| | | $old_file = $this->packages_dir.'/'.$app_name.'-'.$ex_ver.'.app.zip'; |
| | | if(file_exists($old_file)) $this->removeDirectory($old_file); |
| | | } |
| | | else // Server mode (download whole ZIP archive) |
| | | { |
| | | // Delete an obviously out-dated version from the system |
| | | if(!empty($ex_ver) && version_compare($new_ver, $ex_ver) == 1) |
| | | { |
| | | $old_file = $this->packages_dir.'/'.$app_name.'-'.$ex_ver.'.app.zip'; |
| | | if(file_exists($old_file)) $this->removeDirectory($old_file); |
| | | } |
| | | |
| | | // Attention: $new_ver can also be == $ex_ver (according to version_compare >= 0) |
| | | $local_zip = $this->packages_dir.'/'.$app_name.'-'.$new_ver.'.app.zip'; |
| | | // Attention: $new_ver can also be == $ex_ver (according to version_compare >= 0) |
| | | $local_zip = $this->packages_dir.'/'.$app_name.'-'.$new_ver.'.app.zip'; |
| | | |
| | | // Before re-downloading a file, make sure it's not yet existing on HDD (due to DB inconsistency) |
| | | if((file_exists($local_zip) && (filesize($local_zip) == $app_filesize)) === false) |
| | | { |
| | | $apps_to_dl[] = array('name' => $app_name, |
| | | 'url' => $app_dl, |
| | | 'filesize' => $app_filesize, |
| | | 'localtarget' => $local_zip); |
| | | $apps_downloaded++; |
| | | // Before re-downloading a file, make sure it's not yet existing on HDD (due to DB inconsistency) |
| | | if((file_exists($local_zip) && (filesize($local_zip) == $app_filesize)) === false) |
| | | { |
| | | $apps_to_dl[] = array('name' => $app_name, |
| | | 'url' => $app_dl, |
| | | 'filesize' => $app_filesize, |
| | | 'localtarget' => $local_zip); |
| | | $apps_downloaded++; |
| | | } |
| | | } |
| | | } |
| | | |
| | | unset($sxe); |
| | | $apps_in_repo++; |
| | | } catch (Exception $e) { |
| | | // We dont want the crawler to fail on xml parse errors |
| | | $app->log($this->log_prefix.$e->getMessage(), LOGLEVEL_WARN); |
| | | //echo 'Caught exception: ', $e->getMessage(), "\n"; |
| | | } |
| | | |
| | | unset($sxe); |
| | | $apps_in_repo++; |
| | | } |
| | | } |
| | | //var_dump($apps); |
| | | //echo print_r($apps_to_dl).'<br>-------------------<br>'; |
| | | |
| | | // For memory reasons, unset the current vendor and his apps |
| | | unset($apps); |
| | |
| | | |
| | | // Get registered packages and mark non-existant packages with an error code to omit the install |
| | | $existing_packages = array(); |
| | | $path_query = $app->db->queryAllRecords('SELECT path AS Path FROM aps_packages;'); |
| | | $path_query = $app->db->queryAllRecords('SELECT path AS Path FROM aps_packages'); |
| | | foreach($path_query as $path) $existing_packages[] = $path['Path']; |
| | | $diff = array_diff($existing_packages, $pkg_list); |
| | | foreach($diff as $todelete) { |
| | | /*$app->db->query("UPDATE aps_packages SET package_status = '".PACKAGE_ERROR_NOMETA."' |
| | | WHERE path = '".$app->db->quote($todelete)."';");*/ |
| | | $tmp = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE path = '".$app->db->quote($todelete)."';"); |
| | | $app->db->datalogUpdate('aps_packages', "package_status = ".PACKAGE_ERROR_NOMETA, 'id', $tmp['id']); |
| | | $tmp = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE path = ?", $todelete); |
| | | $app->db->datalogUpdate('aps_packages', array("package_status" => PACKAGE_ERROR_NOMETA), 'id', $tmp['id']); |
| | | unset($tmp); |
| | | } |
| | | |
| | |
| | | //$pkg_url = $this->app_download_url_list[$pkg]; |
| | | $pkg_url = @file_get_contents($this->interface_pkg_dir.'/'.$pkg.'/PKG_URL'); |
| | | |
| | | /* |
| | | $app->db->query("INSERT INTO `aps_packages` |
| | | (`path`, `name`, `category`, `version`, `release`, `package_status`) VALUES |
| | | ('".$app->db->quote($pkg)."', '".$app->db->quote($pkg_name)."', |
| | | '".$app->db->quote($pkg_category)."', '".$app->db->quote($pkg_version)."', |
| | | ".$app->db->quote($pkg_release).", ".PACKAGE_ENABLED.");"); |
| | | */ |
| | | // Insert only if data is complete |
| | | if($pkg != '' && $pkg_name != '' && $pkg_category != '' && $pkg_version != '' && $pkg_release != '' && $pkg_url){ |
| | | $insert_data = "(`path`, `name`, `category`, `version`, `release`, `package_url`, `package_status`) VALUES |
| | | ('".$app->db->quote($pkg)."', '".$app->db->quote($pkg_name)."', |
| | | '".$app->db->quote($pkg_category)."', '".$app->db->quote($pkg_version)."', |
| | | ".$app->db->quote($pkg_release).", '".$app->db->quote($pkg_url)."', ".PACKAGE_ENABLED.");"; |
| | | |
| | | $insert_data = array( |
| | | "path" => $pkg, |
| | | "name" => $pkg_name, |
| | | "category" => $pkg_category, |
| | | "version" => $pkg_version, |
| | | "release" => $pkg_release, |
| | | "package_url" => $pkg_url, |
| | | "package_status" => PACKAGE_ENABLED |
| | | ); |
| | | $app->db->datalogInsert('aps_packages', $insert_data, 'id'); |
| | | } else { |
| | | if(file_exists($this->interface_pkg_dir.'/'.$pkg)) $this->removeDirectory($this->interface_pkg_dir.'/'.$pkg); |
| | |
| | | // This method must be used in interface mode |
| | | if(!$this->interface_mode) return false; |
| | | |
| | | $incomplete_pkgs = $app->db->queryAllRecords("SELECT * FROM aps_packages WHERE package_url = ''"); |
| | | $incomplete_pkgs = $app->db->queryAllRecords("SELECT * FROM aps_packages WHERE package_url = ?", ''); |
| | | if(is_array($incomplete_pkgs) && !empty($incomplete_pkgs)){ |
| | | foreach($incomplete_pkgs as $incomplete_pkg){ |
| | | $pkg_url = @file_get_contents($this->interface_pkg_dir.'/'.$incomplete_pkg['path'].'/PKG_URL'); |
| | | if($pkg_url != ''){ |
| | | $app->db->datalogUpdate('aps_packages', "package_url = '".$app->db->quote($pkg_url)."'", 'id', $incomplete_pkg['id']); |
| | | $app->db->datalogUpdate('aps_packages', array("package_url" => $pkg_url), 'id', $incomplete_pkg['id']); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | $customerdata = $app->db->queryOneRecord("SELECT client_id FROM sys_group, web_domain |
| | | WHERE web_domain.sys_groupid = sys_group.groupid |
| | | AND web_domain.domain = '".$app->db->quote($domain)."';"); |
| | | AND web_domain.domain = ?", $domain); |
| | | if(!empty($customerdata)) $customerid = $customerdata['client_id']; |
| | | |
| | | return $customerid; |
| | |
| | | |
| | | $websrv = $app->db->queryOneRecord("SELECT server_id FROM web_domain |
| | | WHERE domain = (SELECT value FROM aps_instances_settings |
| | | WHERE name = 'main_domain' AND instance_id = ".$app->db->quote($instanceid).");"); |
| | | WHERE name = 'main_domain' AND instance_id = ?)", $instanceid); |
| | | |
| | | // If $websrv is empty, an error has occured. Domain no longer existing? Settings table damaged? |
| | | // Anyhow, remove this instance record because it's not useful at all |
| | | if(empty($websrv)) |
| | | { |
| | | $app->db->query("DELETE FROM aps_instances WHERE id = ".$app->db->quote($instanceid).";"); |
| | | $app->db->query("DELETE FROM aps_instances_settings WHERE instance_id = ".$app->db->quote($instanceid).";"); |
| | | $app->db->query("DELETE FROM aps_instances WHERE id = ?", $instanceid); |
| | | $app->db->query("DELETE FROM aps_instances_settings WHERE instance_id = ?", $instanceid); |
| | | } |
| | | else $webserver_id = $websrv['server_id']; |
| | | |
| | |
| | | $result = $app->db->queryOneRecord("SELECT id, name, |
| | | CONCAT(version, '-', CAST(`release` AS CHAR)) AS current_version |
| | | FROM aps_packages |
| | | WHERE name = (SELECT name FROM aps_packages WHERE id = ".$app->db->quote($id).") |
| | | WHERE name = (SELECT name FROM aps_packages WHERE id = ?) |
| | | AND package_status = 2 |
| | | ORDER BY REPLACE(version, '.', '')+0 DESC, `release` DESC"); |
| | | ORDER BY REPLACE(version, '.', '')+0 DESC, `release` DESC", $id); |
| | | |
| | | if(!empty($result) && ($id != $result['id'])) return $result['id']; |
| | | |
| | |
| | | 'package_status = '.PACKAGE_ENABLED.' AND' : |
| | | '(package_status = '.PACKAGE_ENABLED.' OR package_status = '.PACKAGE_LOCKED.') AND'; |
| | | |
| | | $result = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE ".$sql_ext." id = ".$app->db->quote($id).";"); |
| | | $result = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE ".$sql_ext." id = ?", $id); |
| | | if(!$result) return false; |
| | | |
| | | return true; |
| | |
| | | if(preg_match('/^[0-9]+$/', $id) != 1) return false; |
| | | |
| | | // Only filter if not admin |
| | | $sql_ext = (!$is_admin) ? 'customer_id = '.$app->db->quote($client_id).' AND' : ''; |
| | | |
| | | $result = $app->db->queryOneRecord('SELECT id FROM aps_instances WHERE '.$sql_ext.' id = '.$app->db->quote($id).';'); |
| | | $params = array(); |
| | | $sql_ext = ''; |
| | | if(!$is_admin) { |
| | | $sql_ext = 'customer_id = ? AND '; |
| | | $params[] = $client_id; |
| | | } |
| | | $params[] = $id; |
| | | |
| | | $result = $app->db->queryOneRecord('SELECT id FROM aps_instances WHERE '.$sql_ext.' id = ?', true, $params); |
| | | if(!$result) return false; |
| | | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | public function createDatabaseForPackageInstance(&$settings, $websrv) { |
| | | global $app; |
| | | |
| | | $app->uses('tools_sites'); |
| | | |
| | | $global_config = $app->getconf->get_global_config('sites'); |
| | | |
| | | $tmp = array(); |
| | | $tmp['parent_domain_id'] = $websrv['domain_id']; |
| | | $tmp['sys_groupid'] = $websrv['sys_groupid']; |
| | | $dbname_prefix = $app->tools_sites->replacePrefix($global_config['dbname_prefix'], $tmp); |
| | | $dbuser_prefix = $app->tools_sites->replacePrefix($global_config['dbuser_prefix'], $tmp); |
| | | unset($tmp); |
| | | |
| | | // get information if the webserver is a db server, too |
| | | $web_server = $app->db->queryOneRecord("SELECT server_id,server_name,db_server FROM server WHERE server_id = ?", $websrv['server_id']); |
| | | if($web_server['db_server'] == 1) { |
| | | // create database on "localhost" (webserver) |
| | | $mysql_db_server_id = $app->functions->intval($websrv['server_id']); |
| | | $settings['main_database_host'] = 'localhost'; |
| | | $mysql_db_remote_access = 'n'; |
| | | $mysql_db_remote_ips = ''; |
| | | } else { |
| | | //* get the default database server of the client |
| | | $client = $app->db->queryOneRecord("SELECT default_dbserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $websrv['sys_groupid']); |
| | | if(is_array($client) && $client['default_dbserver'] > 0 && $client['default_dbserver'] != $websrv['server_id']) { |
| | | $mysql_db_server_id = $app->functions->intval($client['default_dbserver']); |
| | | $dbserver_config = $web_config = $app->getconf->get_server_config($app->functions->intval($mysql_db_server_id), 'server'); |
| | | $settings['main_database_host'] = $dbserver_config['ip_address']; |
| | | $mysql_db_remote_access = 'y'; |
| | | $webserver_config = $app->getconf->get_server_config($app->functions->intval($websrv['server_id']), 'server'); |
| | | $mysql_db_remote_ips = $webserver_config['ip_address']; |
| | | } else { |
| | | /* I left this in place for a fallback that should NEVER! happen. |
| | | * if we reach this point it means that there is NO default db server for the client |
| | | * AND the webserver has NO db service enabled. |
| | | * We have to abort the aps installation here... so I added a return false |
| | | * although this does not present any error message to the user. |
| | | */ |
| | | return false; |
| | | |
| | | /*$mysql_db_server_id = $websrv['server_id']; |
| | | $settings['main_database_host'] = 'localhost'; |
| | | $mysql_db_remote_access = 'n'; |
| | | $mysql_db_remote_ips = '';*/ |
| | | } |
| | | } |
| | | |
| | | if (empty($settings['main_database_name'])) { |
| | | //* Find a free db name for the app |
| | | for($n = 1; $n <= 1000; $n++) { |
| | | $mysql_db_name = ($dbname_prefix != '' ? $dbname_prefix.'aps'.$n : uniqid('aps')); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(database_id) as number FROM web_database WHERE database_name = ?", $mysql_db_name); |
| | | if($tmp['number'] == 0) break; |
| | | } |
| | | $settings['main_database_name'] = $mysql_db_name; |
| | | } |
| | | if (empty($settings['main_database_login'])) { |
| | | //* Find a free db username for the app |
| | | for($n = 1; $n <= 1000; $n++) { |
| | | $mysql_db_user = ($dbuser_prefix != '' ? $dbuser_prefix.'aps'.$n : uniqid('aps')); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(database_user_id) as number FROM web_database_user WHERE database_user = ?", $mysql_db_user); |
| | | if($tmp['number'] == 0) break; |
| | | } |
| | | $settings['main_database_login'] = $mysql_db_user; |
| | | } |
| | | |
| | | //* Create the mysql database user if not existing |
| | | $tmp = $app->db->queryOneRecord("SELECT database_user_id FROM web_database_user WHERE database_user = ?", $settings['main_database_login']); |
| | | if(!$tmp) { |
| | | $insert_data = array("sys_userid" => $websrv['sys_userid'], |
| | | "sys_groupid" => $websrv['sys_groupid'], |
| | | "sys_perm_user" => 'riud', |
| | | "sys_perm_group" => $websrv['sys_perm_group'], |
| | | "sys_perm_other" => '', |
| | | "server_id" => 0, |
| | | "database_user" => $settings['main_database_login'], |
| | | "database_user_prefix" => $dbuser_prefix, |
| | | "database_password" => "PASSWORD('" . $settings['main_database_password'] . "')" |
| | | ); |
| | | $mysql_db_user_id = $app->db->datalogInsert('web_database_user', $insert_data, 'database_user_id'); |
| | | } |
| | | else $mysql_db_user_id = $tmp['database_user_id']; |
| | | |
| | | //* Create the mysql database if not existing |
| | | $tmp = $app->db->queryOneRecord("SELECT count(database_id) as number FROM web_database WHERE database_name = ?", $settings['main_database_name']); |
| | | if($tmp['number'] == 0) { |
| | | $insert_data = array("sys_userid" => $websrv['sys_userid'], |
| | | "sys_groupid" => $websrv['sys_groupid'], |
| | | "sys_perm_user" => 'riud', |
| | | "sys_perm_group" => $websrv['sys_perm_group'], |
| | | "sys_perm_other" => '', |
| | | "server_id" => $mysql_db_server_id, |
| | | "parent_domain_id" => $websrv['domain_id'], |
| | | "type" => 'mysql', |
| | | "database_name" => $settings['main_database_name'], |
| | | "database_name_prefix" => $dbname_prefix, |
| | | "database_user_id" => $mysql_db_user_id, |
| | | "database_ro_user_id" => 0, |
| | | "database_charset" => '', |
| | | "remote_access" => $mysql_db_remote_access, |
| | | "remote_ips" => $mysql_db_remote_ips, |
| | | "backup_copies" => $websrv['backup_copies'], |
| | | "active" => 'y', |
| | | "backup_interval" => $websrv['backup_interval'] |
| | | ); |
| | | $app->db->datalogInsert('web_database', $insert_data, 'database_id'); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * Creates a new database record for the package instance and |
| | | * an install task |
| | |
| | | $app->uses('tools_sites'); |
| | | |
| | | $webserver_id = 0; |
| | | $websrv = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain = '".$app->db->quote($settings['main_domain'])."';"); |
| | | $websrv = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain = ?", $settings['main_domain']); |
| | | if(!empty($websrv)) $webserver_id = $websrv['server_id']; |
| | | $customerid = $this->getCustomerIDFromDomain($settings['main_domain']); |
| | | |
| | |
| | | //* Set PHP mode to php-fcgi and enable suexec in website on apache servers / set PHP mode to PHP-FPM on nginx servers |
| | | if($web_config['server_type'] == 'apache') { |
| | | if(($websrv['php'] != 'fast-cgi' || $websrv['suexec'] != 'y') && $websrv['php'] != 'php-fpm') { |
| | | $app->db->datalogUpdate('web_domain', "php = 'fast-cgi', suexec = 'y'", 'domain_id', $websrv['domain_id']); |
| | | $app->db->datalogUpdate('web_domain', array("php" => 'fast-cgi', "suexec" => 'y'), 'domain_id', $websrv['domain_id']); |
| | | } |
| | | } else { |
| | | // nginx |
| | | if($websrv['php'] != 'php-fpm' && $websrv['php'] != 'fast-cgi') { |
| | | $app->db->datalogUpdate('web_domain', "php = 'php-fpm'", 'domain_id', $websrv['domain_id']); |
| | | $app->db->datalogUpdate('web_domain', array("php" => 'php-fpm'), 'domain_id', $websrv['domain_id']); |
| | | } |
| | | } |
| | | |
| | | |
| | | //* Create the MySQL database for the application |
| | | $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($packageid).';'); |
| | | //* Create the MySQL database for the application if necessary |
| | | $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = ?', $packageid); |
| | | $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml'; |
| | | $sxe = $this->readInMetaFile($metafile); |
| | | |
| | | $db_id = parent::getXPathValue($sxe, '//db:id'); |
| | | if (!empty($db_id)) { |
| | | $global_config = $app->getconf->get_global_config('sites'); |
| | | |
| | | $tmp = array(); |
| | | $tmp['parent_domain_id'] = $websrv['domain_id']; |
| | | $tmp['sys_groupid'] = $websrv['sys_groupid']; |
| | | $dbname_prefix = $app->tools_sites->replacePrefix($global_config['dbname_prefix'], $tmp); |
| | | $dbuser_prefix = $app->tools_sites->replacePrefix($global_config['dbuser_prefix'], $tmp); |
| | | unset($tmp); |
| | | |
| | | // get information if the webserver is a db server, too |
| | | $web_server = $app->db->queryOneRecord("SELECT server_id,server_name,db_server FROM server WHERE server_id = ".$app->functions->intval($websrv['server_id'])); |
| | | if($web_server['db_server'] == 1) { |
| | | // create database on "localhost" (webserver) |
| | | $mysql_db_server_id = $app->functions->intval($websrv['server_id']); |
| | | $mysql_db_host = 'localhost'; |
| | | $mysql_db_remote_access = 'n'; |
| | | $mysql_db_remote_ips = ''; |
| | | } else { |
| | | //* get the default database server of the client |
| | | $client = $app->db->queryOneRecord("SELECT default_dbserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ".$app->functions->intval($websrv['sys_groupid'])); |
| | | if(is_array($client) && $client['default_dbserver'] > 0 && $client['default_dbserver'] != $websrv['server_id']) { |
| | | $mysql_db_server_id = $app->functions->intval($client['default_dbserver']); |
| | | $dbserver_config = $web_config = $app->getconf->get_server_config($app->functions->intval($mysql_db_server_id), 'server'); |
| | | $mysql_db_host = $dbserver_config['ip_address']; |
| | | $mysql_db_remote_access = 'y'; |
| | | $webserver_config = $app->getconf->get_server_config($app->functions->intval($websrv['server_id']), 'server'); |
| | | $mysql_db_remote_ips = $webserver_config['ip_address']; |
| | | } else { |
| | | /* I left this in place for a fallback that should NEVER! happen. |
| | | * if we reach this point it means that there is NO default db server for the client |
| | | * AND the webserver has NO db service enabled. |
| | | * We have to abort the aps installation here... so I added a return false |
| | | * although this does not present any error message to the user. |
| | | */ |
| | | return false; |
| | | |
| | | /*$mysql_db_server_id = $websrv['server_id']; |
| | | $mysql_db_host = 'localhost'; |
| | | $mysql_db_remote_access = 'n'; |
| | | $mysql_db_remote_ips = '';*/ |
| | | } |
| | | } |
| | | |
| | | //* Find a free db name for the app |
| | | for($n = 1; $n <= 1000; $n++) { |
| | | $mysql_db_name = $app->db->quote(($dbname_prefix != '' ? $dbname_prefix.'aps'.$n : uniqid('aps'))); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(database_id) as number FROM web_database WHERE database_name = '".$app->db->quote($mysql_db_name)."'"); |
| | | if($tmp['number'] == 0) break; |
| | | } |
| | | //* Find a free db username for the app |
| | | for($n = 1; $n <= 1000; $n++) { |
| | | $mysql_db_user = $app->db->quote(($dbuser_prefix != '' ? $dbuser_prefix.'aps'.$n : uniqid('aps'))); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(database_user_id) as number FROM web_database_user WHERE database_user = '".$app->db->quote($mysql_db_user)."'"); |
| | | if($tmp['number'] == 0) break; |
| | | } |
| | | |
| | | $mysql_db_password = $settings['main_database_password']; |
| | | |
| | | //* Create the mysql database user |
| | | $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `database_user`, `database_user_prefix`, `database_password`) |
| | | VALUES( ".$app->functions->intval($websrv['sys_userid']).", ".$app->functions->intval($websrv['sys_groupid']).", 'riud', '".$app->functions->intval($websrv['sys_perm_group'])."', '', 0, '$mysql_db_user', '".$app->db->quote($dbuser_prefix) . "', PASSWORD('$mysql_db_password'))"; |
| | | $mysql_db_user_id = $app->db->datalogInsert('web_database_user', $insert_data, 'database_user_id'); |
| | | |
| | | //* Create the mysql database |
| | | $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `parent_domain_id`, `type`, `database_name`, `database_name_prefix`, `database_user_id`, `database_ro_user_id`, `database_charset`, `remote_access`, `remote_ips`, `backup_copies`, `active`, `backup_interval`) |
| | | VALUES( ".$app->functions->intval($websrv['sys_userid']).", ".$app->functions->intval($websrv['sys_groupid']).", 'riud', '".$app->functions->intval($websrv['sys_perm_group'])."', '', $mysql_db_server_id, ".$app->functions->intval($websrv['domain_id']).", 'mysql', '$mysql_db_name', '" . $app->db->quote($dbname_prefix) . "', '$mysql_db_user_id', 0, '', '$mysql_db_remote_access', '$mysql_db_remote_ips', ".$app->functions->intval($websrv['backup_copies']).", 'y', '".$app->functions->intval($websrv['backup_interval'])."')"; |
| | | $app->db->datalogInsert('web_database', $insert_data, 'database_id'); |
| | | |
| | | //* Add db details to package settings |
| | | $settings['main_database_host'] = $mysql_db_host; |
| | | $settings['main_database_name'] = $mysql_db_name; |
| | | $settings['main_database_login'] = $mysql_db_user; |
| | | |
| | | // mysql-database-name is updated inside if not set already |
| | | if (!$this->createDatabaseForPackageInstance($settings, $websrv)) return false; |
| | | } |
| | | |
| | | |
| | | //* Insert new package instance |
| | | $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `customer_id`, `package_id`, `instance_status`) VALUES (".$app->functions->intval($websrv['sys_userid']).", ".$app->functions->intval($websrv['sys_groupid']).", 'riud', '".$app->db->quote($websrv['sys_perm_group'])."', '', ".$app->db->quote($webserver_id).",".$app->db->quote($customerid).", ".$app->db->quote($packageid).", ".INSTANCE_PENDING.")"; |
| | | $insert_data = array( |
| | | "sys_userid" => $websrv['sys_userid'], |
| | | "sys_groupid" => $websrv['sys_groupid'], |
| | | "sys_perm_user" => 'riud', |
| | | "sys_perm_group" => $websrv['sys_perm_group'], |
| | | "sys_perm_other" => '', |
| | | "server_id" => $webserver_id, |
| | | "customer_id" => $customerid, |
| | | "package_id" => $packageid, |
| | | "instance_status" => INSTANCE_PENDING |
| | | ); |
| | | $InstanceID = $app->db->datalogInsert('aps_instances', $insert_data, 'id'); |
| | | |
| | | //* Insert all package settings |
| | | if(is_array($settings)) { |
| | | foreach($settings as $key => $value) { |
| | | $insert_data = "(server_id, instance_id, name, value) VALUES (".$app->db->quote($webserver_id).",".$app->db->quote($InstanceID).", '".$app->db->quote($key)."', '".$app->db->quote($value)."')"; |
| | | $insert_data = array( |
| | | "server_id" => $webserver_id, |
| | | "instance_id" => $InstanceID, |
| | | "name" => $key, |
| | | "value" => $value |
| | | ); |
| | | $app->db->datalogInsert('aps_instances_settings', $insert_data, 'id'); |
| | | } |
| | | } |
| | | |
| | | //* Set package status to install afetr we inserted the settings |
| | | $app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_INSTALL, 'id', $InstanceID); |
| | | $app->db->datalogUpdate('aps_instances', array("instance_status" => INSTANCE_INSTALL), 'id', $InstanceID); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the status of an instance to "should be removed" and creates a |
| | |
| | | * |
| | | * @param $instanceid the instance to delete |
| | | */ |
| | | public function deleteInstance($instanceid) |
| | | { |
| | | global $app; |
| | | /* |
| | | $app->db->query("UPDATE aps_instances SET instance_status = ".INSTANCE_REMOVE." WHERE id = ".$instanceid.";"); |
| | | |
| | | $webserver_id = $this->getInstanceDataForDatalog($instanceid); |
| | | if($webserver_id == '') return; |
| | | |
| | | // Create a sys_datalog entry for deletion |
| | | $datalog = array('Instance_id' => $instanceid, 'server_id' => $webserver_id); |
| | | $app->db->datalogSave('aps', 'DELETE', 'id', $instanceid, array(), $datalog); |
| | | */ |
| | | |
| | | $sql = "SELECT web_database.database_id as database_id, web_database.database_user_id as `database_user_id` FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ".$instanceid." LIMIT 0,1"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']); |
| | | |
| | | $database_user = $tmp['database_user_id']; |
| | | $tmp = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `database_user_id` = '" . $app->functions->intval($database_user) . "' OR `database_ro_user_id` = '" . $app->functions->intval($database_user) . "'"); |
| | | if($tmp['cnt'] < 1) $app->db->datalogDelete('web_database_user', 'database_user_id', $database_user); |
| | | |
| | | $app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_REMOVE, 'id', $instanceid); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the status of an instance to "installation planned" and creates a |
| | | * datalog entry to re-install the package. The existing package is simply overwritten. |
| | | * |
| | | * @param $instanceid the instance to delete |
| | | */ |
| | | public function reinstallInstance($instanceid) |
| | | public function deleteInstance($instanceid, $keepdatabase = false) |
| | | { |
| | | global $app; |
| | | |
| | | /* |
| | | $app->db->query("UPDATE aps_instances SET instance_status = ".INSTANCE_INSTALL." WHERE id = ".$instanceid.";"); |
| | | if (!$keepdatabase) { |
| | | $sql = "SELECT web_database.database_id as database_id, web_database.database_user_id as `database_user_id` FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ? LIMIT 0,1"; |
| | | $tmp = $app->db->queryOneRecord($sql, $instanceid); |
| | | if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']); |
| | | |
| | | $database_user = $tmp['database_user_id']; |
| | | $tmp = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `database_user_id` = ? OR `database_ro_user_id` = ?", $database_user, $database_user); |
| | | if($tmp['cnt'] < 1) $app->db->datalogDelete('web_database_user', 'database_user_id', $database_user); |
| | | } |
| | | |
| | | $webserver_id = $this->getInstanceDataForDatalog($instanceid); |
| | | if($webserver_id == '') return; |
| | | $app->db->datalogUpdate('aps_instances', array("instance_status" => INSTANCE_REMOVE), 'id', $instanceid); |
| | | |
| | | // Create a sys_datalog entry for re-installation |
| | | $datalog = array('instance_id' => $instanceid, 'server_id' => $webserver_id); |
| | | $app->db->datalogSave('aps', 'INSERT', 'id', $instanceid, array(), $datalog); |
| | | */ |
| | | |
| | | $sql = "SELECT web_database.database_id as database_id FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.value = aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ".$app->db->quote($instanceid)." LIMIT 0,1"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']); |
| | | |
| | | $app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_INSTALL, 'id', $instanceid); |
| | | } |
| | | |
| | | /** |
| | |
| | | { |
| | | global $app; |
| | | |
| | | $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($id).';'); |
| | | $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = ?', $id); |
| | | |
| | | // Load in meta file if existing and register its namespaces |
| | | $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml'; |
| | |
| | | if(in_array($postinput['main_domain'], $domains)) |
| | | { |
| | | $docroot = $app->db->queryOneRecord("SELECT document_root FROM web_domain |
| | | WHERE domain = '".$app->db->quote($postinput['main_domain'])."';"); |
| | | WHERE domain = ?", $postinput['main_domain']); |
| | | $new_path = $docroot['document_root']; |
| | | if(substr($new_path, -1) != '/') $new_path .= '/'; |
| | | $new_path .= $main_location; |
| | |
| | | $instance_domains = $app->db->queryAllRecords("SELECT instance_id, s.value AS domain |
| | | FROM aps_instances AS i, aps_instances_settings AS s |
| | | WHERE i.id = s.instance_id AND s.name = 'main_domain' |
| | | AND i.customer_id = '".$app->db->quote($customerid)."';"); |
| | | AND i.customer_id = ?", $customerid); |
| | | for($i = 0; $i < count($instance_domains); $i++) |
| | | { |
| | | $used_path = ''; |
| | | |
| | | $doc_root = $app->db->queryOneRecord("SELECT document_root FROM web_domain |
| | | WHERE domain = '".$app->db->quote($instance_domains[$i]['domain'])."';"); |
| | | WHERE domain = ?", $instance_domains[$i]['domain']); |
| | | |
| | | // Probably the domain settings were changed later, so make sure the doc_root |
| | | // is not empty for further validation |
| | |
| | | |
| | | $location_for_domain = $app->db->queryOneRecord("SELECT value |
| | | FROM aps_instances_settings WHERE name = 'main_location' |
| | | AND instance_id = '".$app->db->quote($instance_domains[$i]['instance_id'])."';"); |
| | | AND instance_id = ?", $instance_domains[$i]['instance_id']); |
| | | |
| | | // The location might be empty but the DB return must not be false! |
| | | if($location_for_domain) $used_path .= $location_for_domain['value']; |
| | |
| | | if(isset($pkg_details['Requirements Database']) |
| | | && $pkg_details['Requirements Database'] != '') |
| | | { |
| | | if (isset($postinput['main_database_host'])) $input['main_database_host'] = $postinput['main_database_host']; |
| | | if (isset($postinput['main_database_name'])) $input['main_database_name'] = $postinput['main_database_name']; |
| | | if (isset($postinput['main_database_login'])) $input['main_database_login'] = $postinput['main_database_login']; |
| | | |
| | | if(isset($postinput['main_database_password'])) |
| | | { |
| | | if($postinput['main_database_password'] == '') $error[] = $app->lng('error_no_database_pw'); |
| | |
| | | { |
| | | global $app; |
| | | |
| | | $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($id).';'); |
| | | $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = ?', $id); |
| | | |
| | | // Load in meta file if existing and register its namespaces |
| | | $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml'; |
| | |
| | | global $app, $conf; |
| | | |
| | | $userid = $app->functions->intval($userid); |
| | | $client = $app->db->queryOneRecord("SELECT client.limit_client FROM sys_user, client WHERE sys_user.userid = $userid AND sys_user.client_id = client.client_id"); |
| | | $client = $app->db->queryOneRecord("SELECT client.limit_client FROM sys_user, client WHERE sys_user.userid = ? AND sys_user.client_id = client.client_id", $userid); |
| | | if($client['limit_client'] != 0) { |
| | | return true; |
| | | } else { |
| | |
| | | $groupid = $app->functions->intval($groupid); |
| | | |
| | | if($userid > 0 && $groupid > 0) { |
| | | $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = $userid"); |
| | | $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = ?", $userid); |
| | | $groups = explode(',', $user['groups']); |
| | | if(!in_array($groupid, $groups)) $groups[] = $groupid; |
| | | $groups_string = implode(',', $groups); |
| | | $sql = "UPDATE sys_user SET groups = '$groups_string' WHERE userid = $userid"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET groups = ? WHERE userid = ?"; |
| | | $app->db->query($sql, $groups_string, $userid); |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | |
| | | // simple query cache |
| | | if($this->client_limits===null) |
| | | $this->client_limits = $app->db->queryOneRecord("SELECT client.* FROM sys_user, client WHERE sys_user.userid = $userid AND sys_user.client_id = client.client_id"); |
| | | $this->client_limits = $app->db->queryOneRecord("SELECT client.* FROM sys_user, client WHERE sys_user.userid = ? AND sys_user.client_id = client.client_id", $userid); |
| | | |
| | | // isn't client -> no limit |
| | | if(!$this->client_limits) |
| | |
| | | $groupid = $app->functions->intval($groupid); |
| | | |
| | | if($userid > 0 && $groupid > 0) { |
| | | $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = $userid"); |
| | | $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = ?", $userid); |
| | | $groups = explode(',', $user['groups']); |
| | | $key = array_search($groupid, $groups); |
| | | unset($groups[$key]); |
| | | $groups_string = implode(',', $groups); |
| | | $sql = "UPDATE sys_user SET groups = '$groups_string' WHERE userid = $userid"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET groups = ? WHERE userid = ?"; |
| | | $app->db->query($sql, $groups_string, $userid); |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | |
| | | public function check_module_permissions($module) { |
| | | // Check if the current user has the permissions to access this module |
| | | $module = trim(preg_replace('@\s+@', '', $module)); |
| | | $user_modules = explode(',',$_SESSION["s"]["user"]["modules"]); |
| | | if(!in_array($module,$user_modules)) { |
| | | // echo "LOGIN_REDIRECT:/index.php"; |
| | | header("Location: /index.php"); |
| | | exit; |
| | | if(strpos($module, ',') !== false){ |
| | | $can_use_module = false; |
| | | $tmp_modules = explode(',', $module); |
| | | if(is_array($tmp_modules) && !empty($tmp_modules)){ |
| | | foreach($tmp_modules as $tmp_module){ |
| | | if($tmp_module != ''){ |
| | | if(in_array($tmp_module,$user_modules)) { |
| | | $can_use_module = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if(!$can_use_module){ |
| | | // echo "LOGIN_REDIRECT:/index.php"; |
| | | header("Location: /index.php"); |
| | | exit; |
| | | } |
| | | } else { |
| | | if(!in_array($module,$user_modules)) { |
| | | // echo "LOGIN_REDIRECT:/index.php"; |
| | | header("Location: /index.php"); |
| | | exit; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | public function get_random_password($length = 8) { |
| | | $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; |
| | | $password = ''; |
| | | for ($n=0;$n<$length;$n++) { |
| | | $password.=$base64_alphabet[mt_rand(0, 63)]; |
| | | public function get_random_password($minLength = 8, $special = false) { |
| | | $minLength = $minLength || 10; |
| | | if($minLength < 8) $minLength = 8; |
| | | $maxLength = $minLength + 5; |
| | | $length = mt_rand($minLength, $maxLength); |
| | | |
| | | $alphachars = "abcdefghijklmnopqrstuvwxyz"; |
| | | $upperchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; |
| | | $numchars = "1234567890"; |
| | | $specialchars = "!@#_"; |
| | | |
| | | $num_special = 0; |
| | | if($special == true) { |
| | | $num_special = intval(mt_rand(0, round($length / 4))) + 1; |
| | | } |
| | | return $password; |
| | | $numericlen = mt_rand(1, 2); |
| | | $alphalen = $length - $num_special - $numericlen; |
| | | $upperlen = intval($alphalen / 2); |
| | | $alphalen = $alphalen - $upperlen; |
| | | $password = ''; |
| | | |
| | | for($i = 0; $i < $alphalen; $i++) { |
| | | $password .= substr($alphachars, mt_rand(0, strlen($alphachars) - 1), 1); |
| | | } |
| | | |
| | | for($i = 0; $i < $upperlen; $i++) { |
| | | $password .= substr($upperchars, mt_rand(0, strlen($upperchars) - 1), 1); |
| | | } |
| | | |
| | | for($i = 0; $i < $num_special; $i++) { |
| | | $password .= substr($specialchars, mt_rand(0, strlen($specialchars) - 1), 1); |
| | | } |
| | | |
| | | for($i = 0; $i < $numericlen; $i++) { |
| | | $password .= substr($numchars, mt_rand(0, strlen($numchars) - 1), 1); |
| | | } |
| | | |
| | | return str_shuffle($password); |
| | | } |
| | | |
| | | public function crypt_password($cleartext_password) { |
| | |
| | | |
| | | if($old_style == true) { |
| | | // we have to take care of this in an other way |
| | | $in_db = $app->db->queryAllRecords('SELECT `assigned_template_id`, `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $app->functions->intval($clientId)); |
| | | $in_db = $app->db->queryAllRecords('SELECT `assigned_template_id`, `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ?', $clientId); |
| | | if(is_array($in_db) && count($in_db) > 0) { |
| | | foreach($in_db as $item) { |
| | | if(array_key_exists($item['client_template_id'], $needed_types) == false) $needed_types[$item['client_template_id']] = 0; |
| | |
| | | if($count > 0) { |
| | | // add new template to client (includes those from old-style without assigned_template_id) |
| | | for($i = $count; $i > 0; $i--) { |
| | | $app->db->query('INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (' . $app->functions->intval($clientId) . ', ' . $app->functions->intval($tpl_id) . ')'); |
| | | $app->db->query('INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (?, ?)', $clientId, $tpl_id); |
| | | } |
| | | } elseif($count < 0) { |
| | | // remove old ones |
| | | for($i = $count; $i < 0; $i++) { |
| | | $app->db->query('DELETE FROM `client_template_assigned` WHERE client_id = ' . $app->functions->intval($clientId) . ' AND client_template_id = ' . $app->functions->intval($tpl_id) . ' LIMIT 1'); |
| | | $app->db->query('DELETE FROM `client_template_assigned` WHERE client_id = ? AND client_template_id = ? LIMIT 1', $clientId, $tpl_id); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | // we have to take care of this in an other way |
| | | $in_db = $app->db->queryAllRecords('SELECT `assigned_template_id`, `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $app->functions->intval($clientId)); |
| | | $in_db = $app->db->queryAllRecords('SELECT `assigned_template_id`, `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ?', $clientId); |
| | | if(is_array($in_db) && count($in_db) > 0) { |
| | | // check which templates were removed from this client |
| | | foreach($in_db as $item) { |
| | | if(in_array($item['assigned_template_id'], $used_assigned) == false) { |
| | | // delete this one |
| | | $app->db->query('DELETE FROM `client_template_assigned` WHERE `assigned_template_id` = ' . $app->functions->intval($item['assigned_template_id'])); |
| | | $app->db->query('DELETE FROM `client_template_assigned` WHERE `assigned_template_id` = ?', $item['assigned_template_id']); |
| | | } |
| | | } |
| | | } |
| | |
| | | if(count($new_tpl) > 0) { |
| | | foreach($new_tpl as $item) { |
| | | // add new template to client (includes those from old-style without assigned_template_id) |
| | | $app->db->query('INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (' . $app->functions->intval($clientId) . ', ' . $app->functions->intval($item) . ')'); |
| | | $app->db->query('INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (?, ?)', $clientId, $item); |
| | | } |
| | | } |
| | | } |
| | |
| | | /* |
| | | * Get the master-template for the client |
| | | */ |
| | | $sql = "SELECT template_master, template_additional,limit_client FROM client WHERE client_id = " . $app->functions->intval($clientId); |
| | | $record = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT template_master, template_additional,limit_client FROM client WHERE client_id = ?"; |
| | | $record = $app->db->queryOneRecord($sql, $clientId); |
| | | $masterTemplateId = $record['template_master']; |
| | | $is_reseller = ($record['limit_client'] != 0)?true:false; |
| | | |
| | |
| | | // we have to call the update_client_templates function |
| | | $templates = explode('/', $record['template_additional']); |
| | | $this->update_client_templates($clientId, $templates); |
| | | $app->db->query('UPDATE `client` SET `template_additional` = \'\' WHERE `client_id` = ' . $app->functions->intval($clientId)); |
| | | $app->db->query('UPDATE `client` SET `template_additional` = \'\' WHERE `client_id` = ?', $clientId); |
| | | } |
| | | |
| | | /* |
| | | * if the master-Template is custom there is NO changing |
| | | */ |
| | | if ($masterTemplateId > 0){ |
| | | $sql = "SELECT * FROM client_template WHERE template_id = " . $app->functions->intval($masterTemplateId); |
| | | $limits = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM client_template WHERE template_id = ?"; |
| | | $limits = $app->db->queryOneRecord($sql, $masterTemplateId); |
| | | } else { |
| | | // if there is no master template it makes NO SENSE adding sub templates. |
| | | // adding subtemplates are stored in client limits, so they would add up |
| | |
| | | * if != -1) |
| | | */ |
| | | $addTpl = explode('/', $additionalTemplateStr); |
| | | $addTpls = $app->db->queryAllRecords('SELECT `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $app->functions->intval($clientId)); |
| | | $addTpls = $app->db->queryAllRecords('SELECT `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ?', $clientId); |
| | | foreach ($addTpls as $addTpl){ |
| | | $item = $addTpl['client_template_id']; |
| | | $sql = "SELECT * FROM client_template WHERE template_id = " . $app->functions->intval($item); |
| | | $addLimits = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM client_template WHERE template_id = ?"; |
| | | $addLimits = $app->db->queryOneRecord($sql, $item); |
| | | $app->log('Template processing subtemplate ' . $item . ' for client ' . $clientId, LOGLEVEL_DEBUG); |
| | | /* maybe the template is deleted in the meantime */ |
| | | if (is_array($addLimits)){ |
| | |
| | | * Write all back to the database |
| | | */ |
| | | $update = ''; |
| | | $update_values = array(); |
| | | if(!$is_reseller) unset($limits['limit_client']); // Only Resellers may have limit_client set in template to ensure that we do not convert a client to reseller accidently. |
| | | foreach($limits as $k => $v){ |
| | | if (strpos($k, 'default') !== false and $v == 0) { |
| | |
| | | } |
| | | if ((strpos($k, 'limit') !== false or strpos($k, 'default') !== false or $k == 'ssh_chroot' or $k == 'web_php_options' or $k == 'force_suexec') && !is_array($v)){ |
| | | if ($update != '') $update .= ', '; |
| | | $update .= '`' . $k . "`='" . $v . "'"; |
| | | $update .= '?? = ?'; |
| | | $update_values[] = $k; |
| | | $update_values[] = $v; |
| | | } |
| | | } |
| | | $update_values[] = $clientId; |
| | | $app->log('Template processed for client ' . $clientId . ', update string: ' . $update, LOGLEVEL_DEBUG); |
| | | if($update != '') { |
| | | $sql = 'UPDATE client SET ' . $update . " WHERE client_id = " . $app->functions->intval($clientId); |
| | | $app->db->query($sql); |
| | | $sql = 'UPDATE client SET ' . $update . " WHERE client_id = ?"; |
| | | $app->db->query($sql, true, $update_values); |
| | | } |
| | | unset($form); |
| | | } |
| | |
| | | if($_SESSION["s"]["user"]["typ"] == 'user') { |
| | | // Get the limits of the client |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT default_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $sql = "SELECT server_id,server_name FROM server WHERE server_id = ".$app->functions->intval($client['default_dnsserver']); |
| | | $client = $app->db->queryOneRecord("SELECT default_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | $sql = "SELECT server_id,server_name FROM server WHERE server_id = ?"; |
| | | } else { |
| | | $sql = "SELECT server_id,server_name FROM server WHERE dns_server = 1 ORDER BY server_name"; |
| | | } |
| | | $records = $app->db->queryAllRecords($sql); |
| | | $records = $app->db->queryAllRecords($sql, $client['default_dnsserver']); |
| | | $records_new = array(); |
| | | if(is_array($records)) { |
| | | foreach($records as $rec) { |
| | |
| | | if($_SESSION["s"]["user"]["typ"] == 'user') { |
| | | // Get the limits of the client |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT default_slave_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $sql = "SELECT server_id,server_name FROM server WHERE server_id = ".$app->functions->intval($client['default_slave_dnsserver']); |
| | | $client = $app->db->queryOneRecord("SELECT default_slave_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | $sql = "SELECT server_id,server_name FROM server WHERE server_id = ?"; |
| | | } else { |
| | | $sql = "SELECT server_id,server_name FROM server WHERE dns_server = 1 ORDER BY server_name"; |
| | | } |
| | | $records = $app->db->queryAllRecords($sql); |
| | | $records = $app->db->queryAllRecords($sql, $client['default_slave_dnsserver']); |
| | | $records_new = array(); |
| | | if(is_array($records)) { |
| | | foreach($records as $rec) { |
| | |
| | | } |
| | | if(count($server_ids) == 0) return array(); |
| | | $server_ids = implode(',', $server_ids); |
| | | $records = $app->db->queryAllRecords("SELECT web_domain.domain_id, CONCAT(web_domain.domain, ' :: ', server.server_name) AS parent_domain FROM web_domain, server WHERE web_domain.type = 'vhost' AND web_domain.server_id IN (".$app->db->quote($server_ids).") AND web_domain.server_id = server.server_id AND ".$app->tform->getAuthSQL('r', 'web_domain')." ORDER BY web_domain.domain"); |
| | | $records = $app->db->queryAllRecords("SELECT web_domain.domain_id, CONCAT(web_domain.domain, ' :: ', server.server_name) AS parent_domain FROM web_domain, server WHERE web_domain.type = 'vhost' AND web_domain.server_id IN ? AND web_domain.server_id = server.server_id AND ".$app->tform->getAuthSQL('r', 'web_domain')." ORDER BY web_domain.domain", $server_ids); |
| | | |
| | | $records_new = array(); |
| | | if(is_array($records)) { |
| | |
| | | if($_SESSION["s"]["user"]["typ"] == 'user') { |
| | | // Get the limits of the client |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $sql = "SELECT $server_type as server_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"; |
| | | $client = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT $server_type as server_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?"; |
| | | $client = $app->db->queryOneRecord($sql, $client_group_id); |
| | | if($client['server_id'] > 0) { |
| | | //* Select the default server for the client |
| | | $sql = "SELECT server_id,server_name FROM server WHERE server_id = ".$app->functions->intval($client['server_id']); |
| | | $sql = "SELECT server_id,server_name FROM server WHERE server_id = ?"; |
| | | $records = $app->db->queryAllRecords($sql, $client['server_id']); |
| | | } else { |
| | | //* Not able to find the clients defaults, use this as fallback and add a warning message to the log |
| | | $app->log('Unable to find default server for client in custom_datasource.inc.php', 1); |
| | | $sql = "SELECT server_id,server_name FROM server WHERE $field = 1 ORDER BY server_name"; |
| | | $sql = "SELECT server_id,server_name FROM server WHERE ?? = 1 ORDER BY server_name"; |
| | | $records = $app->db->queryAllRecords($sql, $field); |
| | | } |
| | | } else { |
| | | //* The logged in user is admin, so we show him all available servers of a specific type. |
| | | $sql = "SELECT server_id,server_name FROM server WHERE $field = 1 ORDER BY server_name"; |
| | | $sql = "SELECT server_id,server_name FROM server WHERE ?? = 1 ORDER BY server_name"; |
| | | $records = $app->db->queryAllRecords($sql, $field); |
| | | } |
| | | |
| | | $records = $app->db->queryAllRecords($sql); |
| | | |
| | | $records_new = array(); |
| | | if(is_array($records)) { |
| | | foreach($records as $rec) { |
| | |
| | | private $_iConnId; |
| | | |
| | | private $dbHost = ''; // hostname of the MySQL server |
| | | private $dbPort = ''; // port of the MySQL server |
| | | private $dbName = ''; // logical database name on that server |
| | | private $dbUser = ''; // database authorized user |
| | | private $dbPass = ''; // user's password |
| | |
| | | private $autoCommit = 1; // Autocommit Transactions |
| | | private $currentRow; // current row number |
| | | private $errorNumber = 0; // last error number |
| | | */ |
| | | public $errorMessage = ''; // last error message |
| | | /* |
| | | private $errorLocation = '';// last error location |
| | | private $isConnected = false; // needed to know if we have a valid mysqli object from the constructor |
| | | //// |
| | |
| | | global $conf; |
| | | if($prefix != '') $prefix .= '_'; |
| | | $this->dbHost = $conf[$prefix.'db_host']; |
| | | $this->dbPort = $conf[$prefix.'db_port']; |
| | | $this->dbName = $conf[$prefix.'db_database']; |
| | | $this->dbUser = $conf[$prefix.'db_user']; |
| | | $this->dbPass = $conf[$prefix.'db_password']; |
| | |
| | | $this->dbNewLink = $conf[$prefix.'db_new_link']; |
| | | $this->dbClientFlags = $conf[$prefix.'db_client_flags']; |
| | | |
| | | $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); |
| | | $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, (int)$this->dbPort); |
| | | $try = 0; |
| | | while((!is_object($this->_iConnId) || mysqli_connect_error()) && $try < 5) { |
| | | if($try > 0) sleep(1); |
| | | |
| | | $try++; |
| | | $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); |
| | | $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, (int)$this->dbPort); |
| | | } |
| | | |
| | | if(!is_object($this->_iConnId) || mysqli_connect_error()) { |
| | |
| | | $this->_sqlerror('Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!'); |
| | | return false; |
| | | } |
| | | if(!((bool)mysqli_query( $this->_iConnId, "USE $this->dbName"))) { |
| | | if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) { |
| | | $this->close(); |
| | | $this->_sqlerror('Datenbank nicht gefunden / Database not found'); |
| | | return false; |
| | |
| | | $sTxt = $this->escape($sValue); |
| | | |
| | | $sTxt = str_replace('`', '', $sTxt); |
| | | if(strpos($sTxt, '.') !== false) $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); |
| | | else $sTxt = '`' . $sTxt . '`'; |
| | | if(strpos($sTxt, '.') !== false) { |
| | | $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); |
| | | $sTxt = str_replace('.`*`', '.*', $sTxt); |
| | | } else $sTxt = '`' . $sTxt . '`'; |
| | | |
| | | $sQuery = substr_replace($sQuery, $sTxt, $iPos2, 2); |
| | | $iPos2 += strlen($sTxt); |
| | |
| | | } else { |
| | | if(is_int($sValue) || is_float($sValue)) { |
| | | $sTxt = $sValue; |
| | | } elseif(is_string($sValue) && (strcmp($sValue, '#NULL#') == 0)) { |
| | | } elseif(is_null($sValue) || (is_string($sValue) && (strcmp($sValue, '#NULL#') == 0))) { |
| | | $sTxt = 'NULL'; |
| | | } elseif(is_array($sValue)) { |
| | | $sTxt = ''; |
| | | foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\''; |
| | | $sTxt = '(' . substr($sTxt, 1) . ')'; |
| | | if($sTxt == '()') $sTxt = '(0)'; |
| | | if(isset($sValue['SQL'])) { |
| | | $sTxt = $sValue['SQL']; |
| | | } else { |
| | | $sTxt = ''; |
| | | foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\''; |
| | | $sTxt = '(' . substr($sTxt, 1) . ')'; |
| | | if($sTxt == '()') $sTxt = '(0)'; |
| | | } |
| | | } else { |
| | | $sTxt = '\'' . $this->escape($sValue) . '\''; |
| | | } |
| | |
| | | $try++; |
| | | $ok = mysqli_ping($this->_iConnId); |
| | | if(!$ok) { |
| | | if(!mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, $this->dbName)) { |
| | | if(!mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, $this->dbName, (int)$this->dbPort)) { |
| | | if($try > 4) { |
| | | $this->_sqlerror('DB::query -> reconnect'); |
| | | return false; |
| | |
| | | $sQuery = call_user_func_array(array(&$this, '_build_query_string'), $aArgs); |
| | | $this->securityScan($sQuery); |
| | | |
| | | $this->_iQueryId = mysqli_query($this->_iConnId, $sQuery); |
| | | $this->_iQueryId = @mysqli_query($this->_iConnId, $sQuery); |
| | | if (!$this->_iQueryId) { |
| | | $this->_sqlerror('Falsche Anfrage / Wrong Query', false, 'SQL-Query = ' . $sQuery); |
| | | return false; |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * check if a utf8 string is valid |
| | | * |
| | | * @access public |
| | | * @param string $string the string to check |
| | | * @return bool true if it is valid utf8, false otherwise |
| | | */ |
| | | private function check_utf8($str) { |
| | | $len = strlen($str); |
| | | for($i = 0; $i < $len; $i++){ |
| | | $c = ord($str[$i]); |
| | | if ($c > 128) { |
| | | if (($c > 247)) return false; |
| | | elseif ($c > 239) $bytes = 4; |
| | | elseif ($c > 223) $bytes = 3; |
| | | elseif ($c > 191) $bytes = 2; |
| | | else return false; |
| | | if (($i + $bytes) > $len) return false; |
| | | while ($bytes > 1) { |
| | | $i++; |
| | | $b = ord($str[$i]); |
| | | if ($b < 128 || $b > 191) return false; |
| | | $bytes--; |
| | | } |
| | | } |
| | | } |
| | | return true; |
| | | } // end of check_utf8 |
| | | |
| | | /** |
| | | * Escape a string for usage in a query |
| | |
| | | $sString = ''; |
| | | } |
| | | |
| | | /*$cur_encoding = mb_detect_encoding($sString); |
| | | $cur_encoding = mb_detect_encoding($sString); |
| | | if($cur_encoding != "UTF-8") { |
| | | if($cur_encoding != 'ASCII') { |
| | | $app->log('String ' . substr($sString, 0, 25) . '... is ' . $cur_encoding . '.', LOGLEVEL_WARN); |
| | | $app->log('String ' . substr($sString, 0, 25) . '... is ' . $cur_encoding . '.', LOGLEVEL_INFO); |
| | | if($cur_encoding) $sString = mb_convert_encoding($sString, 'UTF-8', $cur_encoding); |
| | | else $sString = mb_convert_encoding($sString, 'UTF-8'); |
| | | } |
| | | } elseif(!PXBase::check_utf8($sString)) { |
| | | } elseif(!$this->check_utf8($sString)) { |
| | | $sString = utf8_encode($sString); |
| | | }*/ |
| | | } |
| | | |
| | | if($this->_iConnId) return mysqli_real_escape_string($this->_iConnId, $sString); |
| | | else return addslashes($sString); |
| | |
| | | |
| | | $mysql_error = (is_object($this->_iConnId) ? mysqli_error($this->_iConnId) : mysqli_connect_error()); |
| | | $mysql_errno = (is_object($this->_iConnId) ? mysqli_errno($this->_iConnId) : mysqli_connect_errno()); |
| | | $this->errorMessage = $mysql_error; |
| | | |
| | | //$sAddMsg .= getDebugBacktrace(); |
| | | |
| | |
| | | } |
| | | return $out; |
| | | } |
| | | |
| | | |
| | | public function insertFromArray($tablename, $data) { |
| | | if(!is_array($data)) return false; |
| | | |
| | | $k_query = ''; |
| | | $v_query = ''; |
| | | |
| | | $params = array($tablename); |
| | | $v_params = array(); |
| | | |
| | | foreach($data as $key => $value) { |
| | | $k_query .= ($k_query != '' ? ', ' : '') . '??'; |
| | | $v_query .= ($v_query != '' ? ', ' : '') . '?'; |
| | | $params[] = $key; |
| | | $v_params[] = $value; |
| | | } |
| | | |
| | | $query = 'INSERT INTO ?? (' . $k_query . ') VALUES (' . $v_query . ')'; |
| | | return $this->query($query, true, $params + $v_params); |
| | | } |
| | | |
| | | public function diffrec($record_old, $record_new) { |
| | | $diffrec_full = array(); |
| | | $diff_num = 0; |
| | |
| | | if(!preg_match('/^[a-zA-Z0-9\-\_\.]{1,64}$/',$db_table)) $app->error('Invalid table name '.$db_table); |
| | | if(!preg_match('/^[a-zA-Z0-9\-\_]{1,64}$/',$primary_field)) $app->error('Invalid primary field '.$primary_field.' in table '.$db_table); |
| | | |
| | | $primary_field = $this->quote($primary_field); |
| | | $primary_id = intval($primary_id); |
| | | |
| | | if($force_update == true) { |
| | |
| | | if(is_array($insert_data)) { |
| | | $key_str = ''; |
| | | $val_str = ''; |
| | | $params = array($tablename); |
| | | $v_params = array(); |
| | | foreach($insert_data as $key => $val) { |
| | | $key_str .= "`".$key ."`,"; |
| | | $val_str .= "'".$this->escape($val)."',"; |
| | | $key_str .= '??,'; |
| | | $params[] = $key; |
| | | |
| | | $val_str .= '?,'; |
| | | $v_params[] = $val; |
| | | } |
| | | $key_str = substr($key_str, 0, -1); |
| | | $val_str = substr($val_str, 0, -1); |
| | | $insert_data_str = '('.$key_str.') VALUES ('.$val_str.')'; |
| | | $this->query("INSERT INTO ?? $insert_data_str", true, $params + $v_params); |
| | | } else { |
| | | /* TODO: deprecate this method! */ |
| | | $insert_data_str = $insert_data; |
| | | $this->query("INSERT INTO ?? $insert_data_str", $tablename); |
| | | $app->log("deprecated use of passing values to datalogInsert() - table " . $tablename, 1); |
| | | } |
| | | /* TODO: reduce risk of insert_data_str! */ |
| | | |
| | | |
| | | $old_rec = array(); |
| | | $this->query("INSERT INTO ?? $insert_data_str", $tablename); |
| | | $index_value = $this->insertID(); |
| | | $new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ? = ?", $tablename, $index_field, $index_value); |
| | | $this->datalogSave($tablename, 'INSERT', $index_field, $index_value, $old_rec, $new_rec); |
| | |
| | | $old_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); |
| | | |
| | | if(is_array($update_data)) { |
| | | $params = array($tablename); |
| | | $update_data_str = ''; |
| | | foreach($update_data as $key => $val) { |
| | | $update_data_str .= "`".$key ."` = '".$this->escape($val)."',"; |
| | | $update_data_str .= '?? = ?,'; |
| | | $params[] = $key; |
| | | $params[] = $val; |
| | | } |
| | | $params[] = $index_field; |
| | | $params[] = $index_value; |
| | | $update_data_str = substr($update_data_str, 0, -1); |
| | | $this->query("UPDATE ?? SET $update_data_str WHERE ?? = ?", true, $params); |
| | | } else { |
| | | /* TODO: deprecate this method! */ |
| | | $update_data_str = $update_data; |
| | | $this->query("UPDATE ?? SET $update_data_str WHERE ?? = ?", $tablename, $index_field, $index_value); |
| | | $app->log("deprecated use of passing values to datalogUpdate() - table " . $tablename, 1); |
| | | } |
| | | /* TODO: reduce risk of update_data_str */ |
| | | |
| | | $this->query("UPDATE ?? SET $update_data_str WHERE ?? = ?", $tablename, $index_field, $index_value); |
| | | $new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); |
| | | $this->datalogSave($tablename, 'UPDATE', $index_field, $index_value, $old_rec, $new_rec, $force_update); |
| | | |
| | |
| | | } |
| | | |
| | | $ips = array(); |
| | | $results = $app->db->queryAllRecords("SELECT ip_address AS ip, server_id FROM server_ip WHERE ip_type = '".$app->db->quote($type)."'"); |
| | | $results = $app->db->queryAllRecords("SELECT ip_address AS ip, server_id FROM server_ip WHERE ip_type = ?", $type); |
| | | if(!empty($results) && is_array($results)){ |
| | | foreach($results as $result){ |
| | | if(preg_match($regex, $result['ip'])){ |
| | |
| | | if(preg_match($regex, $result['ip'])) $ips[] = $result['ip']; |
| | | } |
| | | } |
| | | |
| | | /* |
| | | $results = $app->db->queryAllRecords("SELECT xfer FROM dns_slave WHERE xfer != ''"); |
| | | if(!empty($results) && is_array($results)){ |
| | | foreach($results as $result){ |
| | | $tmp_ips = explode(',', $result['xfer']); |
| | | foreach($tmp_ips as $tmp_ip){ |
| | | $tmp_ip = trim($tmp_ip); |
| | | if(preg_match($regex, $tmp_ip)) $ips[] = $tmp_ip; |
| | | } |
| | | } |
| | | } |
| | | $results = $app->db->queryAllRecords("SELECT xfer FROM dns_soa WHERE xfer != ''"); |
| | | if(!empty($results) && is_array($results)){ |
| | | foreach($results as $result){ |
| | | $tmp_ips = explode(',', $result['xfer']); |
| | | foreach($tmp_ips as $tmp_ip){ |
| | | $tmp_ip = trim($tmp_ip); |
| | | if(preg_match($regex, $tmp_ip)) $ips[] = $tmp_ip; |
| | | } |
| | | } |
| | | } |
| | | $results = $app->db->queryAllRecords("SELECT also_notify FROM dns_soa WHERE also_notify != ''"); |
| | | if(!empty($results) && is_array($results)){ |
| | | foreach($results as $result){ |
| | | $tmp_ips = explode(',', $result['also_notify']); |
| | | foreach($tmp_ips as $tmp_ip){ |
| | | $tmp_ip = trim($tmp_ip); |
| | | if(preg_match($regex, $tmp_ip)) $ips[] = $tmp_ip; |
| | | } |
| | | } |
| | | } |
| | | */ |
| | | |
| | | $results = $app->db->queryAllRecords("SELECT remote_ips FROM web_database WHERE remote_ips != ''"); |
| | | if(!empty($results) && is_array($results)){ |
| | |
| | | |
| | | return true; |
| | | } |
| | | |
| | | public function getimagesizefromstring($string){ |
| | | if (!function_exists('getimagesizefromstring')) { |
| | | $uri = 'data://application/octet-stream;base64,' . base64_encode($string); |
| | | return getimagesize($uri); |
| | | } else { |
| | | return getimagesizefromstring($string); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | if(!isset($this->config[$server_id])) { |
| | | $app->uses('ini_parser'); |
| | | $server_id = $app->functions->intval($server_id); |
| | | $server = $app->db->queryOneRecord('SELECT config FROM server WHERE server_id = '.$server_id); |
| | | $server = $app->db->queryOneRecord('SELECT config FROM server WHERE server_id = ?', $server_id); |
| | | $this->config[$server_id] = $app->ini_parser->parse_ini_string(stripslashes($server['config'])); |
| | | } |
| | | return ($section == '') ? $this->config[$server_id] : $this->config[$server_id][$section]; |
| | |
| | | return $this->pagingValues[$key]; |
| | | } |
| | | |
| | | /* TODO: maybe rewrite sql */ |
| | | public function getPagingSQL($sql_where = '1') |
| | | { |
| | | global $app, $conf; |
| | |
| | | if($this->searchChanged == 1) $_SESSION['search'][$list_name]['page'] = 0; |
| | | |
| | | $sql_von = $app->functions->intval($_SESSION['search'][$list_name]['page'] * $records_per_page); |
| | | $record_count = $app->db->queryOneRecord("SELECT count(*) AS anzahl FROM $table".($app->listform->listDef['additional_tables'] != ''? ','.$app->listform->listDef['additional_tables'] : '')." WHERE $sql_where"); |
| | | $record_count = $app->db->queryOneRecord("SELECT count(*) AS anzahl FROM ??".($app->listform->listDef['additional_tables'] != ''? ','.$app->listform->listDef['additional_tables'] : '')." WHERE $sql_where", $table); |
| | | $pages = $app->functions->intval(($record_count['anzahl'] - 1) / $records_per_page); |
| | | |
| | | |
| | |
| | | |
| | | sort($show_pages); |
| | | $show_pages = array_unique($show_pages); |
| | | |
| | | |
| | | $content = '<nav> |
| | | <ul class="pagination">'; |
| | | |
| | | //* Show Back |
| | | if(isset($vars['show_page_back']) && $vars['show_page_back'] == 1){ |
| | | $content = '<a class="btn-page first-page" href="'."javascript:loadContent('".$vars['list_file'].'?page=0'.$vars['page_params']."');".'">' |
| | | .'<img src="themes/'.$_SESSION['s']['theme'].'/icons/x16/arrow_stop_180.png"></a> '; |
| | | $content .= '<a class="btn-page previous-page" href="'."javascript:loadContent('".$vars['list_file'].'?page='.$vars['last_page'].$vars['page_params']."');".'">' |
| | | .'<img src="themes/'.$_SESSION['s']['theme'].'/icons/x16/arrow_180.png"></a> '; |
| | | $content .= '<li><a href="#" data-load-content="'.$vars['list_file'].'?page=0'.$vars['page_params'].'" aria-label="First"> |
| | | <span aria-hidden="true">«</span></a></li>'; |
| | | $content .= '<li><a href="#" data-load-content='.$vars['list_file'].'?page='.$vars['last_page'].$vars['page_params'].'" aria-label="Previous"> |
| | | <span aria-hidden="true">‹</span></a></li>'; |
| | | } |
| | | $content .= ' '.$this->lng('page_txt').' '; |
| | | $prev = -1; |
| | | foreach($show_pages as $p) { |
| | | if($prev != -1 && $p > $prev + 1) $content .= '<span class="page-spacer">...</span>'; |
| | | $content .= '<a class="link-page' . ($p == $vars['page'] ? ' current-page' : '') . '" href="'."javascript:loadContent('".$vars['list_file'].'?page='.$p.$vars['page_params']."');".'">'. ($p+1) .'</a>'; |
| | | if($prev != -1 && $p > $prev + 1) $content .= '<li class="disabled"><a href="#">…</a></li>'; |
| | | $content .= '<li' . ($p == $vars['page'] ? ' class="active"' : '') . '><a href="#" data-load-content="'.$vars['list_file'].'?page='.$p.$vars['page_params'].'">'. ($p+1) .'</a></li>'; |
| | | $prev = $p; |
| | | } |
| | | //.$vars['next_page'].' '.$this->lng('page_of_txt').' '.$vars['max_pages'].' '; |
| | | //* Show Next |
| | | if(isset($vars['show_page_next']) && $vars['show_page_next'] == 1){ |
| | | $content .= '<a class="btn-page next-page" href="'."javascript:loadContent('".$vars['list_file'].'?page='.$vars['next_page'].$vars['page_params']."');".'">' |
| | | .'<img src="themes/'.$_SESSION['s']['theme'].'/icons/x16/arrow.png"></a> '; |
| | | $content .= '<a class="btn-page last-page" href="'."javascript:loadContent('".$vars['list_file'].'?page='.$vars['pages'].$vars['page_params']."');".'">' |
| | | .'<img src="themes/'.$_SESSION['s']['theme'].'/icons/x16/arrow_stop.png"></a>'; |
| | | $content .= '<li><a href="#" data-load-content="'.$vars['list_file'].'?page='.$vars['next_page'].$vars['page_params'].'" aria-label="Next"> |
| | | <span aria-hidden="true">›</span></a></li>'; |
| | | $content .= '<li><a href="#" data-load-content="'.$vars['list_file'].'?page='.$vars['pages'].$vars['page_params'].'" aria-label="Last"> |
| | | <span aria-hidden="true">»</span></a></li>'; |
| | | } |
| | | $content .= '</ul></nav>'; |
| | | |
| | | return $content; |
| | | } |
| | | |
| | |
| | | } |
| | | return $record; |
| | | } |
| | | |
| | | |
| | | /* TODO: check double quoting of SQL */ |
| | | public function encode($record) |
| | | { |
| | | global $app; |
| | |
| | | return $rec; |
| | | } |
| | | |
| | | /* TODO: maybe rewrite SQL */ |
| | | public function getQueryString($no_limit = false) { |
| | | global $app; |
| | | $sql_where = ''; |
| | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="iconstxt icoAdd" type="button" onclick="'."loadContent('".$module."/".$listDef["edit_file"]."');".'"> |
| | | <button class="iconstxt icoAdd" type="button" data-load-content="'.$module."/".$listDef["edit_file"].'"> |
| | | <span>{tmpl_var name="add_new_record_txt"}</span> |
| | | </button> |
| | | </div> |
| | |
| | | foreach($listDef["item"] as $field) { |
| | | $key = $field["field"]; |
| | | if($field["formtype"] == 'SELECT') { |
| | | $html .= " <td class=\"tbl_col_".$key."\"><select name=\"".$listDef["search_prefix"].$key."\" onChange=\"submitForm('pageForm','".$module."/".$listDef["file"]."');\">{tmpl_var name='".$listDef["search_prefix"].$key."'}</select></td>\n"; |
| | | $html .= " <td class=\"tbl_col_".$key."\"><select name=\"".$listDef["search_prefix"].$key."\" onChange=\"ISPConfig.submitForm('pageForm','".$module."/".$listDef["file"]."');\">{tmpl_var name='".$listDef["search_prefix"].$key."'}</select></td>\n"; |
| | | } else { |
| | | $html .= " <td class=\"tbl_col_".$key."\"><input type=\"text\" name=\"".$listDef["search_prefix"].$key."\" value=\"{tmpl_var name='".$listDef["search_prefix"].$key."'}\" /></td>\n"; |
| | | } |
| | | } |
| | | |
| | | $html .= ' <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="'."submitForm('pageForm','".$module."/".$listDef["file"]."');".'"><span>{tmpl_var name="filter_txt"}</span></button></div></td> |
| | | $html .= ' <td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="'."ISPConfig.submitForm('pageForm','".$module."/".$listDef["file"]."');".'"><span>{tmpl_var name="filter_txt"}</span></button></div></td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | |
| | | |
| | | foreach($listDef["item"] as $field) { |
| | | $key = $field["field"]; |
| | | $html .= " <td class=\"tbl_col_".$key."\"><a href=\"#\" onclick=\"loadContent('".$module."/".$listDef["edit_file"]."?id={tmpl_var name='id'}');\">{tmpl_var name=\"".$key."\"}</a></td>\n"; |
| | | $html .= " <td class=\"tbl_col_".$key."\"><a href=\"#\" data-load-content=\"".$module."/".$listDef["edit_file"]."?id={tmpl_var name='id'}\">{tmpl_var name=\"".$key."\"}</a></td>\n"; |
| | | } |
| | | |
| | | $html .= " <td class=\"tbl_col_buttons\"> |
| | |
| | | $backup_id = $app->functions->intval($_GET['backup_id']); |
| | | |
| | | //* check if the user is owner of the parent domain |
| | | $domain_backup = $app->db->queryOneRecord("SELECT parent_domain_id FROM web_backup WHERE backup_id = ".$backup_id); |
| | | $domain_backup = $app->db->queryOneRecord("SELECT parent_domain_id FROM web_backup WHERE backup_id = ?", $backup_id); |
| | | |
| | | $check_perm = 'u'; |
| | | if($_GET['backup_action'] == 'download') $check_perm = 'r'; // only check read permissions on download, not update permissions |
| | | |
| | | $get_domain = $app->db->queryOneRecord("SELECT domain_id FROM web_domain WHERE domain_id = ".$app->functions->intval($domain_backup["parent_domain_id"])." AND ".$app->tform->getAuthSQL($check_perm)); |
| | | $get_domain = $app->db->queryOneRecord("SELECT domain_id FROM web_domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL($check_perm), $domain_backup["parent_domain_id"]); |
| | | if(empty($get_domain) || !$get_domain) { |
| | | $app->error($app->tform->lng('no_domain_perm')); |
| | | } |
| | | |
| | | if($_GET['backup_action'] == 'download' && $backup_id > 0) { |
| | | $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_download' AND action_param = '$backup_id'"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | $server_id = $this->form->dataRecord['server_id']; |
| | | $backup = $app->db->queryOneRecord("SELECT * FROM web_backup WHERE backup_id = ?", $backup_id); |
| | | if($backup['server_id'] > 0) $server_id = $backup['server_id']; |
| | | $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_download' AND action_param = ?"; |
| | | $tmp = $app->db->queryOneRecord($sql, $backup_id); |
| | | if($tmp['number'] == 0) { |
| | | $message .= $wb['download_info_txt']; |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (". |
| | | (int)$this->form->dataRecord['server_id'] . ", " . |
| | | time() . ", " . |
| | | "'backup_download', " . |
| | | "'".$backup_id."', " . |
| | | "'pending', " . |
| | | "''" . |
| | | ")"; |
| | | $app->db->query($sql); |
| | | "VALUES (?, UNIX_TIMESTAMP(), 'backup_download', ?, 'pending', '')"; |
| | | $app->db->query($sql, $server_id, $backup_id); |
| | | } else { |
| | | $error .= $wb['download_pending_txt']; |
| | | } |
| | | } |
| | | if($_GET['backup_action'] == 'restore' && $backup_id > 0) { |
| | | $server_id = $this->form->dataRecord['server_id']; |
| | | $backup = $app->db->queryOneRecord("SELECT * FROM web_backup WHERE backup_id = ?", $backup_id); |
| | | if($backup['server_id'] > 0) $server_id = $backup['server_id']; |
| | | $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_restore' AND action_param = '$backup_id'"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | if($tmp['number'] == 0) { |
| | | $message .= $wb['restore_info_txt']; |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (". |
| | | (int)$this->form->dataRecord['server_id'] . ", " . |
| | | time() . ", " . |
| | | "'backup_restore', " . |
| | | "'".$backup_id."', " . |
| | | "'pending', " . |
| | | "''" . |
| | | ")"; |
| | | $app->db->query($sql); |
| | | "VALUES (?, UNIX_TIMESTAMP(), 'backup_restore', ?, 'pending', '')"; |
| | | $app->db->query($sql, $server_id, $backup_id); |
| | | } else { |
| | | $error .= $wb['restore_pending_txt']; |
| | | } |
| | |
| | | } |
| | | |
| | | //* Get the data |
| | | $web = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE domain_id = ".$app->functions->intval($this->form->id)); |
| | | $sql = "SELECT * FROM web_backup WHERE parent_domain_id = ".$app->functions->intval($this->form->id)." AND server_id = ".$app->functions->intval($web['server_id'])." ORDER BY tstamp DESC, backup_type ASC"; |
| | | $records = $app->db->queryAllRecords($sql); |
| | | $server_ids = array(); |
| | | $web = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE domain_id = ?", $this->form->id); |
| | | $databases = $app->db->queryAllRecords("SELECT server_id FROM web_database WHERE parent_domain_id = ?", $this->form->id); |
| | | if($app->functions->intval($web['server_id']) > 0) $server_ids[] = $app->functions->intval($web['server_id']); |
| | | if(is_array($databases) && !empty($databases)){ |
| | | foreach($databases as $database){ |
| | | if($app->functions->intval($database['server_id']) > 0) $server_ids[] = $app->functions->intval($database['server_id']); |
| | | } |
| | | } |
| | | $server_ids = array_unique($server_ids); |
| | | $sql = "SELECT * FROM web_backup WHERE parent_domain_id = ? AND server_id IN ? ORDER BY tstamp DESC, backup_type ASC"; |
| | | $records = $app->db->queryAllRecords($sql, $this->form->id, $server_ids); |
| | | |
| | | $bgcolor = "#FFFFFF"; |
| | | if(is_array($records)) { |
| | |
| | | |
| | | $rec['date'] = date($app->lng('conf_format_datetime'), $rec['tstamp']); |
| | | $rec['backup_type'] = $wb[('backup_type_'.$rec['backup_type'])]; |
| | | |
| | | $rec['download_available'] = true; |
| | | if($rec['server_id'] != $web['server_id']) $rec['download_available'] = false; |
| | | |
| | | if($rec['filesize'] > 0){ |
| | | $rec['filesize'] = $app->functions->currency_format($rec['filesize']/(1024*1024), 'client').' MB'; |
| | | } |
| | | |
| | | $records_new[] = $rec; |
| | | } |
| | |
| | | |
| | | function onShow() { |
| | | global $app; |
| | | |
| | | $app->uses('functions'); |
| | | |
| | | $listTpl = new tpl; |
| | | $listTpl->newTemplate('templates/mail_user_backup_list.htm'); |
| | | |
| | |
| | | |
| | | if(isset($_GET['backup_action'])) { |
| | | $backup_id = $app->functions->intval($_GET['backup_id']); |
| | | /* |
| | | if($_GET['backup_action'] == 'download' && $backup_id > 0) { |
| | | $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_download' AND action_param = '$backup_id'"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | if($tmp['number'] == 0) { |
| | | $message .= $wb['download_info_txt']; |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (". |
| | | (int)$this->form->dataRecord['server_id'] . ", " . |
| | | time() . ", " . |
| | | "'backup_download', " . |
| | | "'".$backup_id."', " . |
| | | "'pending', " . |
| | | "''" . |
| | | ")"; |
| | | $app->db->query($sql); |
| | | } else { |
| | | $error .= $wb['download_pending_txt']; |
| | | } |
| | | } |
| | | */ |
| | | if($_GET['backup_action'] == 'restore' && $backup_id > 0) { |
| | | $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_restore' AND action_param = '$backup_id'"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | |
| | | if($_GET['backup_action'] == 'restore_mail' && $backup_id > 0) { |
| | | $sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_restore_mail' AND action_param = ?"; |
| | | $tmp = $app->db->queryOneRecord($sql, $backup_id); |
| | | if($tmp['number'] == 0) { |
| | | $message .= $wb['restore_info_txt']; |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (". |
| | | (int)$this->form->dataRecord['server_id'] . ", " . |
| | | time() . ", " . |
| | | "'backup_restore', " . |
| | | "'".$backup_id."', " . |
| | | "'pending', " . |
| | | "''" . |
| | | ")"; |
| | | $app->db->query($sql); |
| | | "VALUES (?, ? 'backup_restore_mail', ?, 'pending','')"; |
| | | $app->db->query($sql, $this->form->dataRecord['server_id'], time(), $backup_id); |
| | | } else { |
| | | $error .= $wb['restore_pending_txt']; |
| | | } |
| | |
| | | } |
| | | |
| | | //* Get the data |
| | | $sql = "SELECT * FROM mail_backup WHERE mailuser_id = ".$this->form->id." ORDER BY tstamp DESC"; |
| | | $records = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT * FROM mail_backup WHERE mailuser_id = ? ORDER BY tstamp DESC"; |
| | | $records = $app->db->queryAllRecords($sql, $this->form->id); |
| | | $bgcolor = "#FFFFFF"; |
| | | if(is_array($records)) { |
| | | foreach($records as $rec) { |
| | |
| | | $rec["bgcolor"] = $bgcolor; |
| | | $rec['date'] = date($app->lng('conf_format_datetime'),$rec['tstamp']); |
| | | $rec['backup_type'] = $wb[('backup_type_'.$rec['backup_type'])]; |
| | | $rec['filesize'] = $app->functions->formatBytes($rec['filesize']); |
| | | $records_new[] = $rec; |
| | | } |
| | | } |
| | |
| | | $db_table_idx = $app->tform->formDef["db_table_idx"]; |
| | | $primary_id = $this->form->id; |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin') { |
| | | $sql = "SELECT action, tstamp, user, data FROM sys_datalog WHERE dbtable = '".$db_table."' AND dbidx = '".$db_table_idx.":".$primary_id."'"; |
| | | $sql = "SELECT action, tstamp, user, data FROM sys_datalog WHERE dbtable = ? AND dbidx = ?"; |
| | | $records = $app->db->queryAllRecords($sql, $db_table, $db_table_idx.":".$primary_id); |
| | | } else { |
| | | $sql = "SELECT action, tstamp, user, data FROM sys_datalog WHERE user = '".$_SESSION["s"]["user"]["username"]."' dbtable = '".$db_table."' AND dbidx = '".$db_table_idx.":".$primary_id."'"; |
| | | $sql = "SELECT action, tstamp, user, data FROM sys_datalog WHERE user = ? AND dbtable = ? AND dbidx = ?"; |
| | | $records = $app->db->queryAllRecords($sql, $_SESSION["s"]["user"]["username"], $db_table, $db_table_idx.":".$primary_id); |
| | | } |
| | | |
| | | $records = $app->db->queryAllRecords($sql); |
| | | if(is_array($records)) { |
| | | $content .= '<table>'; |
| | | foreach($records as $rec) { |
New file |
| | |
| | | <?php
|
| | |
|
| | |
|
| | | class plugin_directive_snippets extends plugin_base
|
| | | {
|
| | | var $module;
|
| | | var $form;
|
| | | var $tab;
|
| | | var $record_id;
|
| | | var $formdef;
|
| | | var $options;
|
| | |
|
| | | public function onShow()
|
| | | {
|
| | | global $app;
|
| | |
|
| | | $listTpl = new tpl;
|
| | | $listTpl->newTemplate('templates/web_directive_snippets.htm');
|
| | |
|
| | | //* Loading language file
|
| | | $lng_file = "lib/lang/".$_SESSION["s"]["language"]."_web_directive_snippets.lng";
|
| | |
|
| | | include $lng_file;
|
| | | $listTpl->setVar($wb);
|
| | |
|
| | | $message = '';
|
| | | $error = '';
|
| | |
|
| | | $server_type = $app->getconf->get_server_config($this->form->dataRecord['server_id'], 'web');
|
| | | $server_type = $server_type['server_type'];
|
| | | $records = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND type = ? ORDER BY name ASC", $server_type);
|
| | |
|
| | | for ($i = 0, $c = count($records); $i < $c; $i++)
|
| | | {
|
| | | $records[$i]['is_selected'] = false;
|
| | |
|
| | | if ($this->form->dataRecord['directive_snippets_id'] === $records[$i]['directive_snippets_id'])
|
| | | $records[$i]['is_selected'] = true;
|
| | | }
|
| | |
|
| | | $listTpl->setLoop('records', $records);
|
| | |
|
| | | $list_name = 'directive_snippets_list';
|
| | | $_SESSION["s"]["list"][$list_name]["parent_id"] = $this->form->id;
|
| | | $_SESSION["s"]["list"][$list_name]["parent_name"] = $app->tform->formDef["name"];
|
| | | $_SESSION["s"]["list"][$list_name]["parent_tab"] = $_SESSION["s"]["form"]["tab"];
|
| | | $_SESSION["s"]["list"][$list_name]["parent_script"] = $app->tform->formDef["action"];
|
| | | $_SESSION["s"]["form"]["return_to"] = $list_name;
|
| | |
|
| | | return $listTpl->grab();
|
| | | }
|
| | | |
| | | public function onUpdate()
|
| | | {
|
| | | global $app, $conf;
|
| | |
|
| | | if (isset($this->form->dataRecord['directive_snippets_id']) && $this->form->oldDataRecord['directive_snippets_id'] !== $this->form->dataRecord['directive_snippets_id']) {
|
| | | $app->db->query('UPDATE web_domain SET directive_snippets_id = ? WHERE domain_id = ?', $this->form->dataRecord['directive_snippets_id'], $this->form->id);
|
| | | }
|
| | | }
|
| | |
|
| | | public function onInsert()
|
| | | {
|
| | | global $app, $conf;
|
| | |
|
| | | if (isset($this->form->dataRecord['directive_snippets_id'])) {
|
| | | $app->db->query('UPDATE web_domain SET directive_snippets_id = ? WHERE domain_id = ?', $this->form->dataRecord['directive_snippets_id'], $this->form->id);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | ?> |
| | |
| | | |
| | | |
| | | // Get the data |
| | | $records = $app->db->queryAllRecords("SELECT * FROM ".$app->listform->listDef["table"]." WHERE $sql_where $sql_order_by $limit_sql"); |
| | | $records = $app->db->queryAllRecords("SELECT * FROM ?? WHERE $sql_where $sql_order_by $limit_sql", $app->listform->listDef["table"]); |
| | | |
| | | $bgcolor = "#FFFFFF"; |
| | | if(is_array($records)) { |
| | |
| | | $_SESSION["s"]["form"]["return_to"] = $list_name; |
| | | //die(print_r($_SESSION["s"]["list"][$list_name])); |
| | | |
| | | // defaults |
| | | $listTpl->setVar('app_title', $app->_conf['app_title']); |
| | | if(isset($_SESSION['s']['user'])) { |
| | | $listTpl->setVar('app_version', $app->_conf['app_version']); |
| | | // get pending datalog changes |
| | | $datalog = $app->db->datalogStatus(); |
| | | $listTpl->setVar('datalog_changes_txt', $app->lng('datalog_changes_txt')); |
| | | $listTpl->setVar('datalog_changes_end_txt', $app->lng('datalog_changes_end_txt')); |
| | | $listTpl->setVar('datalog_changes_count', $datalog['count']); |
| | | $listTpl->setLoop('datalog_changes', $datalog['entries']); |
| | | } else { |
| | | $listTpl->setVar('app_version', ''); |
| | | } |
| | | $listTpl->setVar('app_link', $app->_conf['app_link']); |
| | | |
| | | $listTpl->setVar('app_logo', $app->_conf['logo']); |
| | | |
| | | $listTpl->setVar('phpsessid', session_id()); |
| | | |
| | | $listTpl->setVar('theme', $_SESSION['s']['theme']); |
| | | $listTpl->setVar('html_content_encoding', $app->_conf['html_content_encoding']); |
| | | |
| | | $listTpl->setVar('delete_confirmation', $app->lng('delete_confirmation')); |
| | | //print_r($_SESSION); |
| | | if(isset($_SESSION['s']['module']['name'])) { |
| | | $listTpl->setVar('app_module', $_SESSION['s']['module']['name']); |
| | | } |
| | | if(isset($_SESSION['s']['user']) && $_SESSION['s']['user']['typ'] == 'admin') { |
| | | $listTpl->setVar('is_admin', 1); |
| | | } |
| | | if(isset($_SESSION['s']['user']) && $app->auth->has_clients($_SESSION['s']['user']['userid'])) { |
| | | $listTpl->setVar('is_reseller', 1); |
| | | } |
| | | /* Show username */ |
| | | if(isset($_SESSION['s']['user'])) { |
| | | $listTpl->setVar('cpuser', $_SESSION['s']['user']['username']); |
| | | $listTpl->setVar('logout_txt', $app->lng('logout_txt')); |
| | | /* Show search field only for normal users, not mail users */ |
| | | if(stristr($_SESSION['s']['user']['username'], '@')){ |
| | | $listTpl->setVar('usertype', 'mailuser'); |
| | | } else { |
| | | $listTpl->setVar('usertype', 'normaluser'); |
| | | } |
| | | } |
| | | |
| | | /* Global Search */ |
| | | $listTpl->setVar('globalsearch_resultslimit_of_txt', $app->lng('globalsearch_resultslimit_of_txt')); |
| | | $listTpl->setVar('globalsearch_resultslimit_results_txt', $app->lng('globalsearch_resultslimit_results_txt')); |
| | | $listTpl->setVar('globalsearch_noresults_text_txt', $app->lng('globalsearch_noresults_text_txt')); |
| | | $listTpl->setVar('globalsearch_noresults_limit_txt', $app->lng('globalsearch_noresults_limit_txt')); |
| | | $listTpl->setVar('globalsearch_searchfield_watermark_txt', $app->lng('globalsearch_searchfield_watermark_txt')); |
| | | |
| | | return $listTpl->grab(); |
| | | |
| | | } |
| | |
| | | //print_r($monitor_data); |
| | | |
| | | // select all websites or websites belonging to client |
| | | $sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'".(($clientid != null)?" AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)":''), $app->functions->intval($client_id)); |
| | | $sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'".(($clientid != null)?" AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)":''), $clientid); |
| | | |
| | | //print_r($sites); |
| | | if(is_array($sites) && !empty($sites)){ |
| | |
| | | if (!is_numeric($sites[$i]['soft'])) $sites[$i]['soft']=$sites[$i]['soft'][1]; |
| | | if (!is_numeric($sites[$i]['hard'])) $sites[$i]['hard']=$sites[$i]['hard'][1]; |
| | | if (!is_numeric($sites[$i]['files'])) $sites[$i]['files']=$sites[$i]['files'][1]; |
| | | |
| | | |
| | | $sites[$i]['used_raw'] = $sites[$i]['used']; |
| | | $sites[$i]['soft_raw'] = $sites[$i]['soft']; |
| | | $sites[$i]['hard_raw'] = $sites[$i]['hard']; |
| | | $sites[$i]['files_raw'] = $sites[$i]['files']; |
| | | $sites[$i]['used_percentage'] = ($sites[$i]['soft'] > 0 && $sites[$i]['used'] > 0 ? round($sites[$i]['used'] * 100 / $sites[$i]['soft']) : 0); |
| | | |
| | | if ($readable) { |
| | | // colours |
| | | $sites[$i]['display_colour'] = '#000000'; |
| | |
| | | |
| | | return $sites; |
| | | } |
| | | |
| | | |
| | | public function get_trafficquota_data($clientid = null, $lastdays = 0) { |
| | | global $app; |
| | | |
| | | $traffic_data = array(); |
| | | |
| | | // select vhosts (belonging to client) |
| | | if($clientid != null){ |
| | | $sql_where = " AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)"; |
| | | } |
| | | $sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias')".$sql_where, $clientid); |
| | | |
| | | $hostnames = array(); |
| | | $traffic_data = array(); |
| | | |
| | | foreach ($sites as $site) { |
| | | $hostnames[] = $site['domain']; |
| | | $traffic_data[$site['domain']]['domain_id'] = $site['domain_id']; |
| | | } |
| | | |
| | | // fetch all traffic-data of selected vhosts |
| | | if (!empty($hostnames)) { |
| | | $tmp_year = date('Y'); |
| | | $tmp_month = date('m'); |
| | | // This Month |
| | | $tmp_recs = $app->db->queryAllRecords("SELECT hostname, SUM(traffic_bytes) as t FROM web_traffic WHERE YEAR(traffic_date) = ? AND MONTH(traffic_date) = ? AND hostname IN ? GROUP BY hostname", $tmp_year, $tmp_month, $hostnames); |
| | | foreach ($tmp_recs as $tmp_rec) { |
| | | $traffic_data[$tmp_rec['hostname']]['this_month'] = $tmp_rec['t']; |
| | | } |
| | | // This Year |
| | | $tmp_recs = $app->db->queryAllRecords("SELECT hostname, SUM(traffic_bytes) as t FROM web_traffic WHERE YEAR(traffic_date) = ? AND hostname IN ? GROUP BY hostname", $tmp_year, $hostnames); |
| | | foreach ($tmp_recs as $tmp_rec) { |
| | | $traffic_data[$tmp_rec['hostname']]['this_year'] = $tmp_rec['t']; |
| | | } |
| | | |
| | | $tmp_year = date('Y', mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); |
| | | $tmp_month = date('m', mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); |
| | | // Last Month |
| | | $tmp_recs = $app->db->queryAllRecords("SELECT hostname, SUM(traffic_bytes) as t FROM web_traffic WHERE YEAR(traffic_date) = ? AND MONTH(traffic_date) = ? AND hostname IN ? GROUP BY hostname", $tmp_year, $tmp_month, $hostnames); |
| | | foreach ($tmp_recs as $tmp_rec) { |
| | | $traffic_data[$tmp_rec['hostname']]['last_month'] = $tmp_rec['t']; |
| | | } |
| | | |
| | | $tmp_year = date('Y', mktime(0, 0, 0, date("m"), date("d"), date("Y")-1)); |
| | | // Last Year |
| | | $tmp_recs = $app->db->queryAllRecords("SELECT hostname, SUM(traffic_bytes) as t FROM web_traffic WHERE YEAR(traffic_date) = ? AND hostname IN ? GROUP BY hostname", $tmp_year, $hostnames); |
| | | foreach ($tmp_recs as $tmp_rec) { |
| | | $traffic_data[$tmp_rec['hostname']]['last_year'] = $tmp_rec['t']; |
| | | } |
| | | |
| | | if (is_int($lastdays) && ($lastdays > 0)) { |
| | | // Last xx Days |
| | | $tmp_recs = $app->db->queryAllRecords("SELECT hostname, SUM(traffic_bytes) as t FROM web_traffic WHERE (traffic_date >= DATE_SUB(NOW(), INTERVAL ? DAY)) AND hostname IN ? GROUP BY hostname", $lastdays, $hostnames); |
| | | foreach ($tmp_recs as $tmp_rec) { |
| | | $traffic_data[$tmp_rec['hostname']]['lastdays'] = $tmp_rec['t']; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return $traffic_data; |
| | | } |
| | | |
| | | public function get_mailquota_data($clientid = null, $readable = true) { |
| | | global $app; |
| | | |
| | |
| | | //print_r($monitor_data); |
| | | |
| | | // select all email accounts or email accounts belonging to client |
| | | $emails = $app->db->queryAllRecords("SELECT * FROM mail_user".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : ''), $app->functions->intval($client_id)); |
| | | $emails = $app->db->queryAllRecords("SELECT * FROM mail_user".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : ''), $clientid); |
| | | |
| | | //print_r($emails); |
| | | if(is_array($emails) && !empty($emails)){ |
| | |
| | | $emails[$i]['used'] = isset($monitor_data[$email]['used']) ? $monitor_data[$email]['used'] : array(1 => 0); |
| | | |
| | | if (!is_numeric($emails[$i]['used'])) $emails[$i]['used']=$emails[$i]['used'][1]; |
| | | |
| | | $emails[$i]['quota_raw'] = $emails[$i]['quota']; |
| | | $emails[$i]['used_raw'] = $emails[$i]['used']; |
| | | $emails[$i]['used_percentage'] = ($emails[$i]['quota'] > 0 && $emails[$i]['used'] > 0 ? round($emails[$i]['used'] * 100 / $emails[$i]['quota']) : 0); |
| | | |
| | | |
| | | if ($readable) { |
| | | // colours |
| | |
| | | |
| | | return $emails; |
| | | } |
| | | |
| | | public function get_databasequota_data($clientid = null, $readable = true) { |
| | | global $app; |
| | | |
| | | $tmp_rec = $app->db->queryAllRecords("SELECT data from monitor_data WHERE type = 'database_size' ORDER BY created DESC"); |
| | | $monitor_data = array(); |
| | | if(is_array($tmp_rec)) { |
| | | foreach ($tmp_rec as $tmp_mon) { |
| | | $tmp_array = unserialize($app->db->unquote($tmp_mon['data'])); |
| | | if(is_array($tmp_array)) { |
| | | foreach($tmp_array as $key => $data) { |
| | | if(!isset($monitor_data[$data['database_name']]['size'])) $monitor_data[$data['database_name']]['size'] = $data['size']; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //print_r($monitor_data); |
| | | |
| | | // select all databases belonging to client |
| | | $databases = $app->db->queryAllRecords("SELECT * FROM web_database".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : ''), $clientid); |
| | | |
| | | //print_r($databases); |
| | | if(is_array($databases) && !empty($databases)){ |
| | | for($i=0;$i<sizeof($databases);$i++){ |
| | | $databasename = $databases[$i]['database_name']; |
| | | |
| | | $databases[$i]['used'] = isset($monitor_data[$databasename]['size']) ? $monitor_data[$databasename]['size'] : 0; |
| | | |
| | | $databases[$i]['quota_raw'] = $databases[$i]['database_quota']; |
| | | $databases[$i]['used_raw'] = $databases[$i]['used']; |
| | | $databases[$i]['used_percentage'] = (($databases[$i]['database_quota'] > 0) && ($databases[$i]['used'] > 0)) ? round($databases[$i]['used'] * 100 / $databases[$i]['database_quota']) : 0; |
| | | |
| | | if ($readable) { |
| | | // colours |
| | | $databases[$i]['display_colour'] = '#000000'; |
| | | if($databases[$i]['database_quota'] > 0){ |
| | | $used_ratio = $databases[$i]['used']/$databases[$i]['database_quota']; |
| | | } else { |
| | | $used_ratio = 0; |
| | | } |
| | | if($used_ratio >= 0.8) $databases[$i]['display_colour'] = '#fd934f'; |
| | | if($used_ratio >= 1) $databases[$i]['display_colour'] = '#cc0000'; |
| | | |
| | | if($databases[$i]['database_quota'] == 0){ |
| | | $databases[$i]['database_quota'] = $app->lng('unlimited'); |
| | | } else { |
| | | $databases[$i]['database_quota'] = round($databases[$i]['database_quota'] / 1048576, 4).' MB'; |
| | | } |
| | | |
| | | |
| | | if($databases[$i]['used'] < 1544000) { |
| | | $databases[$i]['used'] = round($databases[$i]['used'] / 1024, 4).' KB'; |
| | | } else { |
| | | $databases[$i]['used'] = round($databases[$i]['used'] / 1048576, 4).' MB'; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return $databases; |
| | | } |
| | | |
| | | } |
| | |
| | | switch($key) { |
| | | case 'sys_userid': |
| | | // check if userid is valid |
| | | $check = $app->db->queryOneRecord('SELECT userid FROM sys_user WHERE userid = ' . $app->functions->intval($value)); |
| | | $check = $app->db->queryOneRecord('SELECT userid FROM sys_user WHERE userid = ?', $app->functions->intval($value)); |
| | | if(!$check || !$check['userid']) { |
| | | $this->server->fault('invalid parameters', $value . ' is no valid sys_userid.'); |
| | | return false; |
| | |
| | | break; |
| | | case 'sys_groupid': |
| | | // check if groupid is valid |
| | | $check = $app->db->queryOneRecord('SELECT groupid FROM sys_group WHERE groupid = ' . $app->functions->intval($value)); |
| | | $check = $app->db->queryOneRecord('SELECT groupid FROM sys_group WHERE groupid = ?', $app->functions->intval($value)); |
| | | if(!$check || !$check['groupid']) { |
| | | $this->server->fault('invalid parameters', $value . ' is no valid sys_groupid.'); |
| | | return false; |
New file |
| | |
| | | <?php |
| | | |
| | | /* |
| | | Copyright (c) 2007 - 2013, Till Brehm, projektfarm Gmbh |
| | | All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without modification, |
| | | are permitted provided that the following conditions are met: |
| | | |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright notice, |
| | | this list of conditions and the following disclaimer in the documentation |
| | | and/or other materials provided with the distribution. |
| | | * Neither the name of ISPConfig nor the names of its contributors |
| | | may be used to endorse or promote products derived from this software without |
| | | specific prior written permission. |
| | | |
| | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| | | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| | | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| | | IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
| | | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| | | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| | | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| | | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| | | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| | | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| | | |
| | | --UPDATED 01.2015-- |
| | | Created by Dominik Müller <info@profi-webdesign.net> |
| | | Copyright (c) Profi Webdesign Dominik Müller |
| | | |
| | | */ |
| | | |
| | | class remoting_aps extends remoting { |
| | | //* Functions for APS |
| | | public function sites_aps_update_package_list($session_id) |
| | | { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'sites_aps_update_package')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | $app->load('aps_crawler'); |
| | | $aps = new ApsCrawler($app, false); // true = Interface mode, false = Server mode |
| | | $aps->startCrawler(); |
| | | $aps->parseFolderToDB(); |
| | | $aps->fixURLs(); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | public function sites_aps_available_packages_list($session_id, $params) |
| | | { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'sites_aps_available_packages_list')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | $app->load('aps_base'); |
| | | |
| | | if (isset($params['all_packages']) && ($params['all_packages'] == true)) { |
| | | $where = '(aps_packages.package_status = '.PACKAGE_ENABLED.' OR aps_packages.package_status = '.PACKAGE_LOCKED.')'; |
| | | } |
| | | else { |
| | | $where = 'aps_packages.package_status = '.PACKAGE_ENABLED; |
| | | } |
| | | |
| | | $sql = 'SELECT * FROM aps_packages WHERE '.$where.' ORDER BY aps_packages.name, aps_packages.version'; |
| | | return $app->db->queryAllRecords($sql); |
| | | } |
| | | |
| | | public function sites_aps_get_package_details($session_id, $primary_id) |
| | | { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'sites_aps_get_package_details')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | $app->load('aps_guicontroller'); |
| | | $gui = new ApsGUIController($app); |
| | | |
| | | // Package-ID Check |
| | | if (isset($primary_id)) |
| | | { |
| | | $newest_pkg_id = $gui->getNewestPackageID($pkg_id); |
| | | if($newest_pkg_id != 0) $primary_id = $newest_pkg_id; |
| | | } |
| | | |
| | | // Make sure an integer ID is given |
| | | if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag |
| | | $this->server->fault('package_error', 'The given Package ID is not valid.'); |
| | | return false; |
| | | } |
| | | |
| | | // Get package details |
| | | $details = $gui->getPackageDetails($primary_id); |
| | | if (isset($details['error'])) { |
| | | $this->server->fault('package_error', $details['error']); |
| | | return false; |
| | | } |
| | | |
| | | // encode all parts to ensure SOAP-XML-format |
| | | array_walk_recursive($details, function(&$item, &$key) { $item = utf8_encode($item); } ); |
| | | // Special handling for license-text because of too much problems with soap-transport |
| | | $details['License content'] = base64_encode($details['License content']); |
| | | |
| | | return $details; |
| | | } |
| | | |
| | | public function sites_aps_get_package_file($session_id, $primary_id, $filename) { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'sites_aps_get_package_file')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | $app->load('aps_guicontroller'); |
| | | $gui = new ApsGUIController($app); |
| | | |
| | | // Package-ID Check |
| | | if (isset($primary_id)) |
| | | { |
| | | $newest_pkg_id = $gui->getNewestPackageID($pkg_id); |
| | | if($newest_pkg_id != 0) $primary_id = $newest_pkg_id; |
| | | } |
| | | |
| | | // Make sure an integer ID is given |
| | | if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag |
| | | $this->server->fault('package_error', 'The given Package ID is not valid.'); |
| | | return false; |
| | | } |
| | | |
| | | // Get package details |
| | | $details = $gui->getPackageDetails($primary_id); |
| | | if (isset($details['error'])) { |
| | | $this->server->fault('package_error', $details['error']); |
| | | return false; |
| | | } |
| | | |
| | | // find file in details |
| | | $found = false; |
| | | if (basename($details['Icon']) == $filename) $found = true; |
| | | if (!$found && isset($details['Screenshots']) && is_array($details['Screenshots'])) |
| | | foreach ($details['Screenshots'] as $screen) { if (basename($screen['ScreenPath']) == $filename) { $found = true; break; } } |
| | | |
| | | if (!$found) { |
| | | $this->server->fault('package_error', 'File not found in package.'); |
| | | return false; |
| | | } |
| | | |
| | | return base64_encode(file_get_contents(ISPC_ROOT_PATH.'/web/sites/aps_meta_packages/'.$details['path'].'/'.$filename)); |
| | | } |
| | | |
| | | public function sites_aps_get_package_settings($session_id, $primary_id) |
| | | { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'sites_aps_get_package_details')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | $app->load('aps_guicontroller'); |
| | | $gui = new ApsGUIController($app); |
| | | |
| | | // Package-ID Check |
| | | if (isset($primary_id)) |
| | | { |
| | | $newest_pkg_id = $gui->getNewestPackageID($pkg_id); |
| | | if($newest_pkg_id != 0) $primary_id = $newest_pkg_id; |
| | | } |
| | | |
| | | // Make sure an integer ID is given |
| | | if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag |
| | | $this->server->fault('package_error', 'The given Package ID is not valid.'); |
| | | return false; |
| | | } |
| | | |
| | | // Get package settings |
| | | $settings = $gui->getPackageSettings($primary_id); |
| | | if (isset($settings['error'])) { |
| | | $this->server->fault('package_error', $settings['error']); |
| | | return false; |
| | | } |
| | | |
| | | // encode all parts to ensure SOAP-XML-format |
| | | array_walk_recursive($settings, function(&$item, &$key) { $item = utf8_encode($item); } ); |
| | | |
| | | return $settings; |
| | | } |
| | | |
| | | public function sites_aps_install_package($session_id, $primary_id, $params) |
| | | { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'sites_aps_install_package')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | $app->load('aps_guicontroller'); |
| | | $gui = new ApsGUIController($app); |
| | | |
| | | // Package-ID Check |
| | | if (isset($primary_id)) |
| | | { |
| | | $newest_pkg_id = $gui->getNewestPackageID($primary_id); |
| | | if($newest_pkg_id != 0) $primary_id = $newest_pkg_id; |
| | | } |
| | | |
| | | // Make sure an integer ID is given |
| | | if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag |
| | | $this->server->fault('package_error', 'The given Package ID is not valid.'); |
| | | return false; |
| | | } |
| | | |
| | | // Get package details |
| | | $details = $gui->getPackageDetails($primary_id); |
| | | if (isset($details['error'])) { |
| | | $this->server->fault('package_error', $details['error']); |
| | | return false; |
| | | } |
| | | $settings = $gui->getPackageSettings($primary_id); |
| | | if (isset($settings['error'])) { |
| | | $this->server->fault('package_error', $settings['error']); |
| | | return false; |
| | | } |
| | | |
| | | // Check given Site/VHostDomain |
| | | if (!isset($params['main_domain'])) { |
| | | $this->server->fault('invalid parameters', 'No valid domain given.'); |
| | | return false; |
| | | } |
| | | |
| | | $sql = "SELECT * FROM web_domain WHERE domain = ?"; |
| | | $domain = $app->db->queryOneRecord($sql, $params['main_domain']); |
| | | |
| | | if (!$domain) { |
| | | $this->server->fault('invalid parameters', 'No valid domain given.'); |
| | | return false; |
| | | } |
| | | |
| | | $domains = array($domain['domain']); // Simulate correct Domain-List |
| | | $result = $gui->validateInstallerInput($params, $details, $domains, $settings); |
| | | if(empty($result['error'])) |
| | | { |
| | | return $gui->createPackageInstance($result['input'], $primary_id); |
| | | } |
| | | |
| | | $this->server->fault('invalid parameters', implode('<br />', $result['error'])); |
| | | return false; |
| | | } |
| | | |
| | | public function sites_aps_instance_get($session_id, $primary_id) |
| | | { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'sites_aps_instance_get')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | $sql = "SELECT * FROM aps_instances WHERE id = ?"; |
| | | $result = $app->db->queryOneRecord($sql, $app->functions->intval($primary_id)); |
| | | return $result; |
| | | } |
| | | |
| | | public function sites_aps_instance_settings_get($session_id, $primary_id) |
| | | { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'sites_aps_instance_get')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | $sql = "SELECT * FROM aps_instances_settings WHERE instance_id = ?"; |
| | | $result = $app->db->queryAllRecords($sql, $app->functions->intval($primary_id)); |
| | | return $result; |
| | | } |
| | | |
| | | public function sites_aps_instance_delete($session_id, $primary_id, $params = array()) |
| | | { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'sites_aps_instance_delete')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | $app->load('aps_guicontroller'); |
| | | $gui = new ApsGUIController($app); |
| | | |
| | | // Check if Instance exists |
| | | $sql = "SELECT * FROM aps_instances WHERE id = ?"; |
| | | $result = $app->db->queryOneRecord($sql, $primary_id); |
| | | |
| | | if (!$result) { |
| | | $this->server->fault('instance_error', 'No valid instance id given.'); |
| | | return false; |
| | | } |
| | | |
| | | $gui->deleteInstance($primary_id, (isset($params['keep_database']) && ($params['keep_database'] === true))); |
| | | |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | ?> |
| | |
| | | if(isset($data['client_id'])) { |
| | | // this is a single record |
| | | if($data['template_additional'] == '') { |
| | | $tpls = $app->db->queryAllRecords('SELECT CONCAT(`assigned_template_id`, \':\', `client_template_id`) as `item` FROM `client_template_assigned` WHERE `client_id` = ' . $data['client_id']); |
| | | $tpls = $app->db->queryAllRecords('SELECT CONCAT(`assigned_template_id`, \':\', `client_template_id`) as `item` FROM `client_template_assigned` WHERE `client_id` = ?', $data['client_id']); |
| | | $tpl_arr = array(); |
| | | if($tpls) { |
| | | foreach($tpls as $tpl) $tpl_arr[] = $tpl['item']; |
| | |
| | | // multiple client records |
| | | foreach($data as $index => $client) { |
| | | if($client['template_additional'] == '') { |
| | | $tpls = $app->db->queryAllRecords('SELECT CONCAT(`assigned_template_id`, \':\', `client_template_id`) as `item` FROM `client_template_assigned` WHERE `client_id` = ' . $client['client_id']); |
| | | $tpls = $app->db->queryAllRecords('SELECT CONCAT(`assigned_template_id`, \':\', `client_template_id`) as `item` FROM `client_template_assigned` WHERE `client_id` = ?', $client['client_id']); |
| | | $tpl_arr = array(); |
| | | if($tpls) { |
| | | foreach($tpls as $tpl) $tpl_arr[] = $tpl['item']; |
| | |
| | | |
| | | $sys_userid = $app->functions->intval($sys_userid); |
| | | |
| | | $rec = $app->db->queryOneRecord("SELECT client_id FROM sys_user WHERE userid = ".$sys_userid); |
| | | $rec = $app->db->queryOneRecord("SELECT client_id FROM sys_user WHERE userid = ?", $sys_userid); |
| | | if(isset($rec['client_id'])) { |
| | | return $app->functions->intval($rec['client_id']); |
| | | } else { |
| | |
| | | |
| | | $client_id = $app->functions->intval($client_id); |
| | | |
| | | $rec = $app->db->queryOneRecord("SELECT company_name,contact_name,gender,email,language FROM client WHERE client_id = ".$client_id); |
| | | $rec = $app->db->queryOneRecord("SELECT company_name,contact_name,gender,email,language FROM client WHERE client_id = ?", $client_id); |
| | | |
| | | if(is_array($rec)) { |
| | | return $rec; |
| | |
| | | |
| | | $client_id = $app->functions->intval($client_id); |
| | | |
| | | $rec = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$client_id); |
| | | $rec = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id); |
| | | if(isset($rec['groupid'])) { |
| | | return $app->functions->intval($rec['groupid']); |
| | | } else { |
| | |
| | | |
| | | if($params['parent_client_id']) { |
| | | // check if this one is reseller |
| | | $check = $app->db->queryOneRecord('SELECT `limit_client` FROM `client` WHERE `client_id` = ' . intval($params['parent_client_id'])); |
| | | $check = $app->db->queryOneRecord('SELECT `limit_client` FROM `client` WHERE `client_id` = ?', intval($params['parent_client_id'])); |
| | | if($check['limit_client'] == 0) { |
| | | $this->server->fault('Invalid reseller', 'Selected client is not a reseller.'); |
| | | return false; |
| | |
| | | |
| | | if($params['parent_client_id']) { |
| | | // check if this one is reseller |
| | | $check = $app->db->queryOneRecord('SELECT `limit_client` FROM `client` WHERE `client_id` = ' . intval($params['parent_client_id'])); |
| | | $check = $app->db->queryOneRecord('SELECT `limit_client` FROM `client` WHERE `client_id` = ?', intval($params['parent_client_id'])); |
| | | if($check['limit_client'] == 0) { |
| | | $this->server->fault('Invalid reseller', 'Selected client is not a reseller.'); |
| | | return false; |
| | |
| | | } |
| | | |
| | | // we need the previuos templates assigned here |
| | | $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ' . $client_id); |
| | | $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ?', $client_id); |
| | | if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) { |
| | | // check previous type of storing templates |
| | | $tpls = explode('/', $old_rec['template_additional']); |
| | |
| | | } |
| | | |
| | | if(@is_numeric($client_id)) { |
| | | $sql = "SELECT * FROM `client_template_assigned` WHERE `client_id` = ".$client_id; |
| | | return $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM `client_template_assigned` WHERE `client_id` = ?"; |
| | | return $app->db->queryOneRecord($sql, $client_id); |
| | | } else { |
| | | $this->server->fault('The ID must be an integer.'); |
| | | return array(); |
| | |
| | | global $app; |
| | | |
| | | $this->id = $client_id; |
| | | $this->dataRecord = $app->db->queryOneRecord('SELECT * FROM `client` WHERE `client_id` = ' . $client_id); |
| | | $this->dataRecord = $app->db->queryOneRecord('SELECT * FROM `client` WHERE `client_id` = ?', $client_id); |
| | | $this->oldDataRecord = $this->dataRecord; |
| | | |
| | | $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ' . $client_id); |
| | | $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ?', $client_id); |
| | | if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) { |
| | | // check previous type of storing templates |
| | | $tpls = explode('/', $this->oldDataRecord['template_additional']); |
| | |
| | | |
| | | if(@is_numeric($client_id) && @is_numeric($template_id)) { |
| | | // check if client exists |
| | | $check = $app->db->queryOneRecord('SELECT `client_id` FROM `client` WHERE `client_id` = ' . $client_id); |
| | | $check = $app->db->queryOneRecord('SELECT `client_id` FROM `client` WHERE `client_id` = ?', $client_id); |
| | | if(!$check) { |
| | | $this->server->fault('Invalid client'); |
| | | return false; |
| | | } |
| | | // check if template exists |
| | | $check = $app->db->queryOneRecord('SELECT `template_id` FROM `client_template` WHERE `template_id` = ' . $template_id); |
| | | $check = $app->db->queryOneRecord('SELECT `template_id` FROM `client_template` WHERE `template_id` = ?', $template_id); |
| | | if(!$check) { |
| | | $this->server->fault('Invalid template'); |
| | | return false; |
| | |
| | | // for the update event we have to cheat a bit |
| | | $this->_set_client_formdata($client_id); |
| | | |
| | | $sql = "INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (" . $client_id . ", " . $template_id . ")"; |
| | | $app->db->query($sql); |
| | | $sql = "INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (?, ?)"; |
| | | $app->db->query($sql, $client_id, $template_id); |
| | | $insert_id = $app->db->insertID(); |
| | | |
| | | $app->plugin->raiseEvent('client:client:on_after_update', $this); |
| | |
| | | |
| | | if(@is_numeric($client_id) && @is_numeric($template_id)) { |
| | | // check if client exists |
| | | $check = $app->db->queryOneRecord('SELECT `client_id` FROM `client` WHERE `client_id` = ' . $client_id); |
| | | $check = $app->db->queryOneRecord('SELECT `client_id` FROM `client` WHERE `client_id` = ?', $client_id); |
| | | if(!$check) { |
| | | $this->server->fault('Invalid client'); |
| | | return false; |
| | | } |
| | | // check if template exists |
| | | $check = $app->db->queryOneRecord('SELECT `assigned_template_id` FROM `client_template_assigned` WHERE `assigned_template_id` = ' . $assigned_template_id); |
| | | $check = $app->db->queryOneRecord('SELECT `assigned_template_id` FROM `client_template_assigned` WHERE `assigned_template_id` = ?', $assigned_template_id); |
| | | if(!$check) { |
| | | $this->server->fault('Invalid template'); |
| | | return false; |
| | |
| | | // for the update event we have to cheat a bit |
| | | $this->_set_client_formdata($client_id); |
| | | |
| | | $sql = "DELETE FROM `client_template_assigned` WHERE `assigned_template_id` = " . $template_id . " AND `client_id` = " . $client_id; |
| | | $app->db->query($sql); |
| | | $sql = "DELETE FROM `client_template_assigned` WHERE `assigned_template_id` = ? AND `client_id` = ?"; |
| | | $app->db->query($sql, $template_id, $client_id); |
| | | $affected_rows = $app->db->affectedRows(); |
| | | |
| | | $app->plugin->raiseEvent('client:client:on_after_update', $this); |
| | |
| | | if($client_id > 0) { |
| | | //* remove the group of the client from the resellers group |
| | | $parent_client_id = $app->functions->intval($this->dataRecord['parent_client_id']); |
| | | $parent_user = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE client_id = $parent_client_id"); |
| | | $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = $client_id"); |
| | | $parent_user = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE client_id = ?", $parent_client_id); |
| | | $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id); |
| | | $app->auth->remove_group_from_user($parent_user['userid'], $client_group['groupid']); |
| | | |
| | | //* delete the group of the client |
| | | $app->db->query("DELETE FROM sys_group WHERE client_id = $client_id"); |
| | | $app->db->query("DELETE FROM sys_group WHERE client_id = ?", $client_id); |
| | | |
| | | //* delete the sys user(s) of the client |
| | | $app->db->query("DELETE FROM sys_user WHERE client_id = $client_id"); |
| | | $app->db->query("DELETE FROM sys_user WHERE client_id = ?", $client_id); |
| | | |
| | | //* Delete all records (sub-clients, mail, web, etc....) of this client. |
| | | $tables = 'client,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic'; |
| | |
| | | if($client_group_id > 1) { |
| | | foreach($tables_array as $table) { |
| | | if($table != '') { |
| | | $records = $app->db->queryAllRecords("SELECT * FROM $table WHERE sys_groupid = ".$client_group_id); |
| | | $records = $app->db->queryAllRecords("SELECT * FROM $table WHERE sys_groupid = ?", $client_group_id); |
| | | //* find the primary ID of the table |
| | | $table_info = $app->db->tableInfo($table); |
| | | $index_field = ''; |
| | |
| | | $app->db->datalogDelete($table, $index_field, $rec[$index_field]); |
| | | //* Delete traffic records that dont have a sys_groupid column |
| | | if($table == 'web_domain') { |
| | | $app->db->query("DELETE FROM web_traffic WHERE hostname = '".$app->db->quote($rec['domain'])."'"); |
| | | $app->db->query("DELETE FROM web_traffic WHERE hostname = ?", $rec['domain']); |
| | | } |
| | | //* Delete mail_traffic records that dont have a sys_groupid |
| | | if($table == 'mail_user') { |
| | | $app->db->query("DELETE FROM mail_traffic WHERE mailuser_id = '".$app->db->quote($rec['mailuser_id'])."'"); |
| | | $app->db->query("DELETE FROM mail_traffic WHERE mailuser_id = ?", $rec['mailuser_id']); |
| | | } |
| | | } |
| | | } |
| | |
| | | throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | $username = $app->db->quote($username); |
| | | $rec = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE username = '".$username."'"); |
| | | $rec = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE username = ?", $username); |
| | | if (isset($rec)) { |
| | | return $rec; |
| | | } else { |
| | | throw new SoapFault('no_client_found', 'There is no user account for this user name.'); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public function client_get_by_customer_no($session_id, $customer_no) { |
| | | global $app; |
| | | if(!$this->checkPerm($session_id, 'client_get_by_customer_no')) { |
| | | throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | $customer_no = trim($customer_no); |
| | | if($customer_no == '') { |
| | | throw new SoapFault('permission_denied', 'There was no customer number specified.'); |
| | | return false; |
| | | } |
| | | $customer_no = $app->db->quote($customer_no); |
| | | $rec = $app->db->queryOneRecord("SELECT * FROM client WHERE customer_no = '".$customer_no."'"); |
| | | if (isset($rec)) { |
| | | return $rec; |
| | | } else { |
| | | throw new SoapFault('no_client_found', 'There is no user account for this customer number.'); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | return false; |
| | | } |
| | | $client_id = $app->functions->intval($client_id); |
| | | $client = $app->db->queryOneRecord("SELECT client_id FROM client WHERE client_id = ".$client_id); |
| | | $client = $app->db->queryOneRecord("SELECT client_id FROM client WHERE client_id = ?", $client_id); |
| | | if($client['client_id'] > 0) { |
| | | $new_password = $app->db->quote($new_password); |
| | | $sql = "UPDATE client SET password = md5('".($new_password)."') WHERE client_id = ".$client_id; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET passwort = md5('".($new_password)."') WHERE client_id = ".$client_id; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE client SET password = md5(?) WHERE client_id = ?"; |
| | | $app->db->query($sql, $new_password, $client_id); |
| | | $sql = "UPDATE sys_user SET passwort = md5(?) WHERE client_id = ?"; |
| | | $app->db->query($sql, $new_password, $client_id); |
| | | return true; |
| | | } else { |
| | | throw new SoapFault('no_client_found', 'There is no user account for this client_id'); |
| | |
| | | } |
| | | |
| | | //* Check failed logins |
| | | $sql = "SELECT * FROM `attempts_login` WHERE `ip`= '".$app->db->quote($remote_ip)."' AND `login_time` > (NOW() - INTERVAL 1 MINUTE) LIMIT 1"; |
| | | $alreadyfailed = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM `attempts_login` WHERE `ip`= ? AND `login_time` > (NOW() - INTERVAL 1 MINUTE) LIMIT 1"; |
| | | $alreadyfailed = $app->db->queryOneRecord($sql, $remote_ip); |
| | | |
| | | //* too many failedlogins |
| | | if($alreadyfailed['times'] > 5) { |
| | |
| | | |
| | | if(strstr($username,'@')) { |
| | | // Check against client table |
| | | $sql = "SELECT * FROM client WHERE email = '".$app->db->quote($username)."'"; |
| | | $user = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM client WHERE email = ?"; |
| | | $user = $app->db->queryOneRecord($sql, $username); |
| | | |
| | | if($user) { |
| | | $saved_password = stripslashes($user['password']); |
| | |
| | | |
| | | } else { |
| | | // Check against sys_user table |
| | | $sql = "SELECT * FROM sys_user WHERE username = '".$app->db->quote($username)."'"; |
| | | $user = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM sys_user WHERE username = ?"; |
| | | $user = $app->db->queryOneRecord($sql, $username); |
| | | |
| | | if($user) { |
| | | $saved_password = stripslashes($user['passwort']); |
| | |
| | | |
| | | //* Log failed login attempts |
| | | if($user === false) { |
| | | $time = time(); |
| | | if(!$alreadyfailed['times'] ) { |
| | | //* user login the first time wrong |
| | | $sql = "INSERT INTO `attempts_login` (`ip`, `times`, `login_time`) VALUES ('".$app->db->quote($remote_ip)."', 1, NOW())"; |
| | | $app->db->query($sql); |
| | | $sql = "INSERT INTO `attempts_login` (`ip`, `times`, `login_time`) VALUES (?, 1, NOW())"; |
| | | $app->db->query($sql, $remote_ip); |
| | | } elseif($alreadyfailed['times'] >= 1) { |
| | | //* update times wrong |
| | | $sql = "UPDATE `attempts_login` SET `times`=`times`+1, `login_time`=NOW() WHERE `login_time` >= '".$time."' LIMIT 1"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE `attempts_login` SET `times`=`times`+1, `login_time`=NOW() WHERE `ip` = ? AND `login_time` > (NOW() - INTERVAL 1 MINUTE) ORDER BY `login_time` DESC LIMIT 1"; |
| | | $app->db->query($sql, $remote_ip); |
| | | } |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | $client = $app->db->queryOneRecord("SELECT default_dnsserver FROM client WHERE client_id = ".$app->functions->intval($client_id)); |
| | | $client = $app->db->queryOneRecord("SELECT default_dnsserver FROM client WHERE client_id = ?", $client_id); |
| | | $server_id = $client["default_dnsserver"]; |
| | | $template_record = $app->db->queryOneRecord("SELECT * FROM dns_template WHERE template_id = '$template_id'"); |
| | | $template_record = $app->db->queryOneRecord("SELECT * FROM dns_template WHERE template_id = ?", $template_id); |
| | | $fields = explode(',', $template_record['fields']); |
| | | $tform_def_file = "../../web/dns/form/dns_soa.tform.php"; |
| | | $app->uses('tform'); |
| | |
| | | if($section == 'dns_records') { |
| | | $parts = explode('|', $row); |
| | | $dns_rr[] = array( |
| | | 'name' => $app->db->quote($parts[1]), |
| | | 'type' => $app->db->quote($parts[0]), |
| | | 'data' => $app->db->quote($parts[2]), |
| | | 'aux' => $app->db->quote($parts[3]), |
| | | 'ttl' => $app->db->quote($parts[4]) |
| | | 'name' => $parts[1], |
| | | 'type' => $parts[0], |
| | | 'data' => $parts[2], |
| | | 'aux' => $parts[3], |
| | | 'ttl' => $parts[4] |
| | | ); |
| | | } |
| | | } |
| | |
| | | |
| | | if($error == '') { |
| | | // Insert the soa record |
| | | $tmp = $app->db->queryOneRecord("SELECT userid,default_group FROM sys_user WHERE client_id = ".$app->functions->intval($client_id)); |
| | | $tmp = $app->db->queryOneRecord("SELECT userid,default_group FROM sys_user WHERE client_id = ?", $client_id); |
| | | $sys_userid = $tmp['userid']; |
| | | $sys_groupid = $tmp['default_group']; |
| | | unset($tmp); |
| | | $origin = $app->db->quote($vars['origin']); |
| | | $ns = $app->db->quote($vars['ns']); |
| | | $mbox = $app->db->quote(str_replace('@', '.', $vars['mbox'])); |
| | | $refresh = $app->db->quote($vars['refresh']); |
| | | $retry = $app->db->quote($vars['retry']); |
| | | $expire = $app->db->quote($vars['expire']); |
| | | $minimum = $app->db->quote($vars['minimum']); |
| | | $ttl = $app->db->quote($vars['ttl']); |
| | | $xfer = $app->db->quote($vars['xfer']); |
| | | $also_notify = $app->db->quote($vars['also_notify']); |
| | | $update_acl = $app->db->quote($vars['update_acl']); |
| | | $origin = $vars['origin']; |
| | | $ns = $vars['ns']; |
| | | $mbox = str_replace('@', '.', $vars['mbox']); |
| | | $refresh = $vars['refresh']; |
| | | $retry = $vars['retry']; |
| | | $expire = $vars['expire']; |
| | | $minimum = $vars['minimum']; |
| | | $ttl = $vars['ttl']; |
| | | $xfer = $vars['xfer']; |
| | | $also_notify = $vars['also_notify']; |
| | | $update_acl = $vars['update_acl']; |
| | | $serial = $app->validate_dns->increase_serial(0); |
| | | $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `origin`, `ns`, `mbox`, `serial`, `refresh`, `retry`, `expire`, `minimum`, `ttl`, `active`, `xfer`, `also_notify`, `update_acl`) VALUES |
| | | ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$origin', '$ns', '$mbox', '$serial', '$refresh', '$retry', '$expire', '$minimum', '$ttl', 'Y', '$xfer', '$also_notify', '$update_acl')"; |
| | | $insert_data = array( |
| | | "sys_userid" => $sys_userid, |
| | | "sys_groupid" => $sys_groupid, |
| | | "sys_perm_user" => 'riud', |
| | | "sys_perm_group" => 'riud', |
| | | "sys_perm_other" => '', |
| | | "server_id" => $server_id, |
| | | "origin" => $origin, |
| | | "ns" => $ns, |
| | | "mbox" => $mbox, |
| | | "serial" => $serial, |
| | | "refresh" => $refresh, |
| | | "retry" => $retry, |
| | | "expire" => $expire, |
| | | "minimum" => $minimum, |
| | | "ttl" => $ttl, |
| | | "active" => 'Y', |
| | | "xfer" => $xfer, |
| | | "also_notify" => $also_notify, |
| | | "update_acl" => $update_acl |
| | | ); |
| | | $dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id'); |
| | | // Insert the dns_rr records |
| | | if(is_array($dns_rr) && $dns_soa_id > 0) { |
| | | foreach($dns_rr as $rr) { |
| | | $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `zone`, `name`, `type`, `data`, `aux`, `ttl`, `active`) VALUES |
| | | ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$dns_soa_id', '$rr[name]', '$rr[type]', '$rr[data]', '$rr[aux]', '$rr[ttl]', 'Y')"; |
| | | $insert_data = array( |
| | | "sys_userid" => $sys_userid, |
| | | "sys_groupid" => $sys_groupid, |
| | | "sys_perm_user" => 'riud', |
| | | "sys_perm_group" => 'riud', |
| | | "sys_perm_other" => '', |
| | | "server_id" => $server_id, |
| | | "zone" => $dns_soa_id, |
| | | "name" => $rr['name'], |
| | | "type" => $rr['type'], |
| | | "data" => $rr['data'], |
| | | "aux" => $rr['aux'], |
| | | "ttl" => $rr['ttl'], |
| | | "active" => 'Y' |
| | | ); |
| | | $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); |
| | | } |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | $rec = $app->db->queryOneRecord("SELECT id FROM dns_soa WHERE origin like '".$origin."%'"); |
| | | $rec = $app->db->queryOneRecord("SELECT id FROM dns_soa WHERE origin like ?", $origin."%"); |
| | | if(isset($rec['id'])) { |
| | | return $app->functions->intval($rec['id']); |
| | | } else { |
| | |
| | | if (!empty($client_id) && !empty($server_id)) { |
| | | $server_id = $app->functions->intval($server_id); |
| | | $client_id = $app->functions->intval($client_id); |
| | | $sql = "SELECT id, origin FROM dns_soa d INNER JOIN sys_user s on(d.sys_groupid = s.default_group) WHERE client_id = $client_id AND server_id = $server_id"; |
| | | $result = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT id, origin FROM dns_soa d INNER JOIN sys_user s on(d.sys_groupid = s.default_group) WHERE client_id = ? AND server_id = ?"; |
| | | $result = $app->db->queryAllRecords($sql, $client_id, $server_id); |
| | | return $result; |
| | | } |
| | | return false; |
| | |
| | | throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | $sql = "SELECT * FROM dns_rr WHERE zone = ".$app->functions->intval($zone_id);; |
| | | $result = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT * FROM dns_rr WHERE zone = ?"; |
| | | $result = $app->db->queryAllRecords($sql, $zone_id); |
| | | return $result; |
| | | } |
| | | |
| | |
| | | } else { |
| | | $status = 'N'; |
| | | } |
| | | $sql = "UPDATE dns_soa SET active = '$status' WHERE id = ".$app->functions->intval($primary_id); |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE dns_soa SET active = ? WHERE id = ?"; |
| | | $app->db->query($sql, $status, $primary_id); |
| | | $result = $app->db->affectedRows(); |
| | | return $result; |
| | | } else { |
| | |
| | | return false; |
| | | } |
| | | $group_id = $app->functions->intval($group_id); |
| | | $sql = "SELECT domain_id, domain FROM domain WHERE sys_groupid = $group_id "; |
| | | $all = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT domain_id, domain FROM domain WHERE sys_groupid = ?"; |
| | | $all = $app->db->queryAllRecords($sql, $group_id); |
| | | return $all; |
| | | } |
| | | |
| | |
| | | |
| | | //* Check if mail domain exists |
| | | $email_parts = explode('@', $params['email']); |
| | | $tmp = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = '".$app->db->quote($email_parts[1])."'"); |
| | | $tmp = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = ?", $email_parts[1]); |
| | | if($tmp['domain'] != $email_parts[1]) { |
| | | throw new SoapFault('mail_domain_does_not_exist', 'Mail domain - '.$email_parts[1].' - does not exist.'); |
| | | return false; |
| | |
| | | |
| | | //* Check if mail domain exists |
| | | $email_parts = explode('@', $params['email']); |
| | | $tmp = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = '".$app->db->quote($email_parts[1])."'"); |
| | | $tmp = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = ?", $email_parts[1]); |
| | | if($tmp['domain'] != $email_parts[1]) { |
| | | throw new SoapFault('mail_domain_does_not_exist', 'Mail domain - '.$email_parts[1].' - does not exist.'); |
| | | return false; |
| | |
| | | // $app->plugin->raiseEvent('mail:mail_user_filter:on_after_delete',$this); |
| | | return $affected_rows; |
| | | } |
| | | |
| | | // Mail backup list function by Dominik Müller, info@profi-webdesign.net |
| | | public function mail_user_backup_list($session_id, $primary_id = null) |
| | | { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'mail_user_backup')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | $params = array(); |
| | | if ($site_id != null) { |
| | | $params[] = $site_id; |
| | | $sql = "SELECT * FROM mail_backup WHERE parent_domain_id = ?"; |
| | | } |
| | | else { |
| | | $sql = "SELECT * FROM mail_backup"; |
| | | } |
| | | |
| | | $result = $app->db->queryAllRecords($sql, true, $params); |
| | | return $result; |
| | | } |
| | | |
| | | // Mail backup restore/download functions by Dominik Müller, info@profi-webdesign.net |
| | | public function mail_user_backup($session_id, $primary_id, $action_type) |
| | | { |
| | | global $app; |
| | | |
| | | if(!$this->checkPerm($session_id, 'mail_user_backup')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | //*Set variables |
| | | $backup_record = $app->db->queryOneRecord("SELECT * FROM `mail_backup` WHERE `backup_id`=?", $primary_id); |
| | | $server_id = $backup_record['server_id']; |
| | | |
| | | //*Set default action state |
| | | $action_state = "pending"; |
| | | $tstamp = time(); |
| | | |
| | | //* Basic validation of variables |
| | | if ($server_id <= 0) { |
| | | $this->server->fault('invalid_backup_id', "Invalid or non existant backup_id $primary_id"); |
| | | return false; |
| | | } |
| | | |
| | | if (/*$action_type != 'backup_download_mail' and*/ $action_type != 'backup_restore_mail') { |
| | | $this->server->fault('invalid_action', "Invalid action_type $action_type"); |
| | | return false; |
| | | } |
| | | |
| | | //* Validate instance |
| | | $instance_record = $app->db->queryOneRecord("SELECT * FROM `sys_remoteaction` WHERE `action_param`=? and `action_type`=? and `action_state`='pending'", $primary_id, $action_type); |
| | | if ($instance_record['action_id'] >= 1) { |
| | | $this->server->fault('duplicate_action', "There is already a pending $action_type action"); |
| | | return false; |
| | | } |
| | | |
| | | //* Save the record |
| | | if ($app->db->query("INSERT INTO `sys_remoteaction` SET `server_id` = ?, `tstamp` = ?, `action_type` = ?, `action_param` = ?, `action_state` = ?", $server_id, $tstamp, $action_type, $primary_id, $action_state)) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //* Get alias details |
| | | public function mail_alias_get($session_id, $primary_id) |
| | |
| | | } |
| | | |
| | | //* Check if there is no active mailbox with this address |
| | | $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = '".$app->db->quote($params["source"])."'"); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = ?", $params["source"]); |
| | | if($tmp['number'] > 0) { |
| | | throw new SoapFault('duplicate', 'There is already a mailbox with this email address.'); |
| | | } |
| | |
| | | } |
| | | |
| | | //* Check if there is no active mailbox with this address |
| | | $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = '".$app->db->quote($params["source"])."'"); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = ?", $params["source"]); |
| | | if($tmp['number'] > 0) { |
| | | throw new SoapFault('duplicate', 'There is already a mailbox with this email address.'); |
| | | } |
| | |
| | | return false; |
| | | } |
| | | if (!empty($domain)) { |
| | | $domain = $app->db->quote($domain); |
| | | $sql = "SELECT * FROM mail_domain WHERE domain = '$domain'"; |
| | | $result = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT * FROM mail_domain WHERE domain = ?"; |
| | | $result = $app->db->queryAllRecords($sql, $domain); |
| | | return $result; |
| | | } |
| | | return false; |
| | |
| | | } else { |
| | | $status = 'n'; |
| | | } |
| | | $sql = "UPDATE mail_domain SET active = '$status' WHERE domain_id = ".$app->functions->intval($primary_id); |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE mail_domain SET active = ? WHERE domain_id = ?"; |
| | | $app->db->query($sql, $status, $primary_id); |
| | | $result = $app->db->affectedRows(); |
| | | return $result; |
| | | } else { |
| | |
| | | $server_id = $app->functions->intval($server_id); |
| | | |
| | | if($server_id > 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT ip_address_id, server_id, ip_address FROM openvz_ip WHERE reserved = 'n' AND vm_id = 0 AND server_id = $server_id LIMIT 0,1"); |
| | | $tmp = $app->db->queryOneRecord("SELECT ip_address_id, server_id, ip_address FROM openvz_ip WHERE reserved = 'n' AND vm_id = 0 AND server_id = ? LIMIT 0,1", $server_id); |
| | | } else { |
| | | $tmp = $app->db->queryOneRecord("SELECT ip_address_id, server_id, ip_address FROM openvz_ip WHERE reserved = 'n' AND vm_id = 0 LIMIT 0,1"); |
| | | } |
| | |
| | | |
| | | if (!empty($client_id)) { |
| | | $client_id = $app->functions->intval($client_id); |
| | | $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = $client_id"); |
| | | $sql = "SELECT * FROM openvz_vm WHERE sys_groupid = ".$app->functions->intval($tmp['groupid']); |
| | | $result = $app->db->queryAllRecords($sql); |
| | | $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id); |
| | | $sql = "SELECT * FROM openvz_vm WHERE sys_groupid = ?"; |
| | | $result = $app->db->queryAllRecords($sql, $tmp['groupid']); |
| | | return $result; |
| | | } |
| | | return false; |
| | |
| | | } |
| | | |
| | | // Verify if template and ostemplate exist |
| | | $tmp = $app->db->queryOneRecord("SELECT template_id FROM openvz_template WHERE template_id = $template_id"); |
| | | $tmp = $app->db->queryOneRecord("SELECT template_id FROM openvz_template WHERE template_id = ?", $template_id); |
| | | if(!is_array($tmp)) { |
| | | throw new SoapFault('template_id_error', 'Template does not exist.'); |
| | | return false; |
| | | } |
| | | $tmp = $app->db->queryOneRecord("SELECT ostemplate_id FROM openvz_ostemplate WHERE ostemplate_id = $ostemplate_id"); |
| | | $tmp = $app->db->queryOneRecord("SELECT ostemplate_id FROM openvz_ostemplate WHERE ostemplate_id = ?", $ostemplate_id); |
| | | if(!is_array($tmp)) { |
| | | throw new SoapFault('ostemplate_id_error', 'OSTemplate does not exist.'); |
| | | return false; |
| | | } |
| | | |
| | | //* Get the template |
| | | $vtpl = $app->db->queryOneRecord("SELECT * FROM openvz_template WHERE template_id = $template_id"); |
| | | $vtpl = $app->db->queryOneRecord("SELECT * FROM openvz_template WHERE template_id = ?", $template_id); |
| | | |
| | | //* Get the IP address and server_id |
| | | if($override_params['server_id'] > 0) { |
| | | $vmip = $app->db->queryOneRecord("SELECT ip_address_id, server_id, ip_address FROM openvz_ip WHERE reserved = 'n' AND vm_id = 0 AND server_id = ".$override_params['server_id']." LIMIT 0,1"); |
| | | $vmip = $app->db->queryOneRecord("SELECT ip_address_id, server_id, ip_address FROM openvz_ip WHERE reserved = 'n' AND vm_id = 0 AND server_id = ? LIMIT 0,1", $override_params['server_id']); |
| | | } else { |
| | | $vmip = $app->db->queryOneRecord("SELECT ip_address_id, server_id, ip_address FROM openvz_ip WHERE reserved = 'n' AND vm_id = 0 LIMIT 0,1"); |
| | | } |
| | |
| | | $action = 'openvz_start_vm'; |
| | | |
| | | $tmp = $app->db->queryOneRecord("SELECT count(action_id) as actions FROM sys_remoteaction |
| | | WHERE server_id = '".$vm['server_id']."' |
| | | AND action_type = '$action' |
| | | AND action_param = '".$vm['veid']."' |
| | | AND action_state = 'pending'"); |
| | | WHERE server_id = ? |
| | | AND action_type = ? |
| | | AND action_param = ? |
| | | AND action_state = 'pending'", $vm['server_id'], $action, $vm['veid']); |
| | | |
| | | if($tmp['actions'] > 0) { |
| | | throw new SoapFault('action_pending', 'There is already a action pending for this VM.'); |
| | | return false; |
| | | } else { |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (". |
| | | (int)$vm['server_id'] . ", ". |
| | | time() . ", ". |
| | | "'".$action."', ". |
| | | $vm['veid'].", ". |
| | | "'pending', ". |
| | | "''". |
| | | ")"; |
| | | $app->db->query($sql); |
| | | "VALUES (?, ?, ?, ?, 'pending', '')"; |
| | | $app->db->query($sql, (int)$vm['server_id'], time(), $action, $vm['veid']); |
| | | } |
| | | } |
| | | |
| | |
| | | $action = 'openvz_stop_vm'; |
| | | |
| | | $tmp = $app->db->queryOneRecord("SELECT count(action_id) as actions FROM sys_remoteaction |
| | | WHERE server_id = '".$vm['server_id']."' |
| | | AND action_type = '$action' |
| | | AND action_param = '".$vm['veid']."' |
| | | AND action_state = 'pending'"); |
| | | WHERE server_id = ? |
| | | AND action_type = ? |
| | | AND action_param = ? |
| | | AND action_state = 'pending'", $vm['server_id'], $action, $vm['veid']); |
| | | |
| | | if($tmp['actions'] > 0) { |
| | | throw new SoapFault('action_pending', 'There is already a action pending for this VM.'); |
| | | return false; |
| | | } else { |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (". |
| | | (int)$vm['server_id'] . ", ". |
| | | time() . ", ". |
| | | "'".$action."', ". |
| | | $vm['veid'].", ". |
| | | "'pending', ". |
| | | "''". |
| | | ")"; |
| | | $app->db->query($sql); |
| | | "VALUES (?, ?, ?, ?, 'pending', '')"; |
| | | $app->db->query($sql, (int)$vm['server_id'], time(), $action, $vm['veid']); |
| | | } |
| | | } |
| | | |
| | |
| | | $action = 'openvz_restart_vm'; |
| | | |
| | | $tmp = $app->db->queryOneRecord("SELECT count(action_id) as actions FROM sys_remoteaction |
| | | WHERE server_id = '".$vm['server_id']."' |
| | | AND action_type = '$action' |
| | | AND action_param = '".$vm['veid']."' |
| | | AND action_state = 'pending'"); |
| | | WHERE server_id = ? |
| | | AND action_type = ? |
| | | AND action_param = ? |
| | | AND action_state = 'pending'", $vm['server_id'], $action, $vm['veid']); |
| | | |
| | | if($tmp['actions'] > 0) { |
| | | throw new SoapFault('action_pending', 'There is already a action pending for this VM.'); |
| | | return false; |
| | | } else { |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (". |
| | | (int)$vm['server_id'] . ", ". |
| | | time() . ", ". |
| | | "'".$action."', ". |
| | | $vm['veid'].", ". |
| | | "'pending', ". |
| | | "''". |
| | | ")"; |
| | | $app->db->query($sql); |
| | | "VALUES (?, ?, ?, ?, 'pending', '')"; |
| | | $app->db->query($sql, (int)$vm['server_id'], time(), $action, $vm['veid']); |
| | | } |
| | | } |
| | | |
| | |
| | | throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | $sql = "SELECT server_id FROM server_ip WHERE ip_address = '$ipaddress' LIMIT 1 "; |
| | | $all = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT server_id FROM server_ip WHERE ip_address = ? LIMIT 1"; |
| | | $all = $app->db->queryAllRecords($sql, $ipaddress); |
| | | return $all; |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | if (!empty($session_id) && !empty($server_name)) { |
| | | $sql = "SELECT server_id FROM server WHERE server_name = '$server_name' LIMIT 1 "; |
| | | $all = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT server_id FROM server WHERE server_name = ? LIMIT 1"; |
| | | $all = $app->db->queryAllRecords($sql, $server_name); |
| | | return $all; |
| | | } else { |
| | | return false; |
| | |
| | | return false; |
| | | } |
| | | if (!empty($session_id) && !empty($server_id)) { |
| | | $sql = "SELECT mail_server, web_server, dns_server, file_server, db_server, vserver_server, proxy_server, firewall_server FROM server WHERE server_id = '$server_id' LIMIT 1 "; |
| | | $all = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT mail_server, web_server, dns_server, file_server, db_server, vserver_server, proxy_server, firewall_server FROM server WHERE server_id = ? LIMIT 1 "; |
| | | $all = $app->db->queryAllRecords($sql, $server_id); |
| | | return $all; |
| | | } else { |
| | | return false; |
| | |
| | | $app->remoting_lib->loadFormDef('../sites/form/database.tform.php'); |
| | | return $app->remoting_lib->getDataRecord($primary_id); |
| | | } |
| | | |
| | | |
| | | /* TODO: secure queries! */ |
| | | //* Add a record |
| | | public function sites_database_add($session_id, $client_id, $params) |
| | | { |
| | |
| | | } |
| | | |
| | | //* Check for duplicates |
| | | $tmp = $app->db->queryOneRecord("SELECT count(database_id) as dbnum FROM web_database WHERE database_name = '".$app->db->quote($params['database_name'])."' AND server_id = '".intval($params["server_id"])."'"); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(database_id) as dbnum FROM web_database WHERE database_name = ? AND server_id = ?", $params['database_name'], $params["server_id"]); |
| | | if($tmp['dbnum'] > 0) { |
| | | throw new SoapFault('database_name_error_unique', 'There is already a database with that name on the same server.'); |
| | | return false; |
| | |
| | | $sql_set = array(); |
| | | if(isset($params['backup_interval'])) $sql_set[] = "backup_interval = '".$app->db->quote($params['backup_interval'])."'"; |
| | | if(isset($params['backup_copies'])) $sql_set[] = "backup_copies = ".$app->functions->intval($params['backup_copies']); |
| | | //$app->db->query("UPDATE web_database SET ".implode(', ', $sql_set)." WHERE database_id = ".$retval); |
| | | $this->updateQueryExecute("UPDATE web_database SET ".implode(', ', $sql_set)." WHERE database_id = ".$retval, $retval, $params); |
| | | } |
| | | |
| | |
| | | $sql_set = array(); |
| | | if(isset($params['backup_interval'])) $sql_set[] = "backup_interval = '".$app->db->quote($params['backup_interval'])."'"; |
| | | if(isset($params['backup_copies'])) $sql_set[] = "backup_copies = ".$app->functions->intval($params['backup_copies']); |
| | | //$app->db->query("UPDATE web_database SET ".implode(', ', $sql_set)." WHERE database_id = ".$primary_id); |
| | | $this->updateQueryExecute("UPDATE web_database SET ".implode(', ', $sql_set)." WHERE database_id = ".$primary_id, $primary_id, $params); |
| | | } |
| | | |
| | |
| | | |
| | | $new_rec = $app->remoting_lib->getDataRecord($primary_id); |
| | | |
| | | $records = $app->db->queryAllRecords("SELECT DISTINCT server_id FROM web_database WHERE database_user_id = '".$app->functions->intval($primary_id)."' UNION SELECT DISTINCT server_id FROM web_database WHERE database_ro_user_id = '".$app->functions->intval($primary_id)."'"); |
| | | $records = $app->db->queryAllRecords("SELECT DISTINCT server_id FROM web_database WHERE database_user_id = ? UNION SELECT DISTINCT server_id FROM web_database WHERE database_ro_user_id = ?", $primary_id, $primary_id); |
| | | foreach($records as $rec) { |
| | | $tmp_rec = $new_rec; |
| | | $tmp_rec['server_id'] = $rec['server_id']; |
| | |
| | | $app->db->datalogDelete('web_database_user', 'database_user_id', $primary_id); |
| | | $affected_rows = $this->deleteQuery('../sites/form/database_user.tform.php', $primary_id); |
| | | |
| | | $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE database_user_id = '".$app->functions->intval($primary_id)."'"); |
| | | $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE database_user_id = ?", $primary_id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('web_database', 'database_user_id=NULL', 'database_id', $rec['database_id']); |
| | | $app->db->datalogUpdate('web_database', array('database_user_id' => null), 'database_id', $rec['database_id']); |
| | | |
| | | } |
| | | $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE database_ro_user_id = '".$app->functions->intval($primary_id)."'"); |
| | | $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE database_ro_user_id = ?", $primary_id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('web_database', 'database_ro_user_id=NULL', 'database_id', $rec['database_id']); |
| | | $app->db->datalogUpdate('web_database', array('database_ro_user_id' => null), 'database_id', $rec['database_id']); |
| | | } |
| | | |
| | | return $affected_rows; |
| | |
| | | return false; |
| | | } |
| | | |
| | | $data = $app->db->queryOneRecord("SELECT server_id FROM ftp_user WHERE username = '".$app->db->quote($ftp_user)."'"); |
| | | $data = $app->db->queryOneRecord("SELECT server_id FROM ftp_user WHERE username = ?", $ftp_user); |
| | | //file_put_contents('/tmp/test.txt', serialize($data)); |
| | | if(!isset($data['server_id'])) return false; |
| | | |
| | |
| | | return false; |
| | | } |
| | | $app->uses('remoting_lib'); |
| | | $app->remoting_lib->loadFormDef('../sites/form/web_domain.tform.php'); |
| | | $app->remoting_lib->loadFormDef('../sites/form/web_vhost_domain.tform.php'); |
| | | return $app->remoting_lib->getDataRecord($primary_id); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if(!isset($params['client_group_id']) or (isset($params['client_group_id']) && empty($params['client_group_id']))) { |
| | | $rec = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client_id)); |
| | | $rec = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id); |
| | | $params['client_group_id'] = $rec['groupid']; |
| | | } |
| | | |
| | |
| | | if($params['pm_min_spare_servers'] == '') $params['pm_min_spare_servers'] = 1; |
| | | if($params['pm_max_spare_servers'] == '') $params['pm_max_spare_servers'] = 1; |
| | | |
| | | $domain_id = $this->insertQuery('../sites/form/web_domain.tform.php', $client_id, $params, 'sites:web_domain:on_after_insert'); |
| | | $domain_id = $this->insertQuery('../sites/form/web_vhost_domain.tform.php', $client_id, $params, 'sites:web_domain:on_after_insert'); |
| | | if ($readonly === true) |
| | | $app->db->query("UPDATE web_domain SET `sys_userid` = '1' WHERE domain_id = ".$domain_id); |
| | | $app->db->query("UPDATE web_domain SET `sys_userid` = '1' WHERE domain_id = ?", $domain_id); |
| | | return $domain_id; |
| | | } |
| | | |
| | |
| | | if($params['pm_min_spare_servers'] == '') $params['pm_min_spare_servers'] = 1; |
| | | if($params['pm_max_spare_servers'] == '') $params['pm_max_spare_servers'] = 1; |
| | | |
| | | $affected_rows = $this->updateQuery('../sites/form/web_domain.tform.php', $client_id, $primary_id, $params); |
| | | $affected_rows = $this->updateQuery('../sites/form/web_vhost_domain.tform.php', $client_id, $primary_id, $params); |
| | | return $affected_rows; |
| | | } |
| | | |
| | |
| | | throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | $affected_rows = $this->deleteQuery('../sites/form/web_domain.tform.php', $primary_id); |
| | | $affected_rows = $this->deleteQuery('../sites/form/web_vhost_domain.tform.php', $primary_id); |
| | | return $affected_rows; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | // Delete all users that belong to this folder. - taken from web_folder_delete.php |
| | | $records = $app->db->queryAllRecords("SELECT web_folder_user_id FROM web_folder_user WHERE web_folder_id = '".$app->functions->intval($primary_id)."'"); |
| | | $records = $app->db->queryAllRecords("SELECT web_folder_user_id FROM web_folder_user WHERE web_folder_id = ?", $primary_id); |
| | | foreach($records as $rec) { |
| | | $this->deleteQuery('../sites/form/web_folder_user.tform.php', $rec['web_folder_user_id']); |
| | | //$app->db->datalogDelete('web_folder_user','web_folder_user_id',$rec['web_folder_user_id']); |
| | |
| | | } else { |
| | | $status = 'n'; |
| | | } |
| | | $app->remoting_lib->loadFormDef('../sites/form/web_domain.tform.php'); |
| | | $app->remoting_lib->loadFormDef('../sites/form/web_vhost_domain.tform.php'); |
| | | $params = $app->remoting_lib->getDataRecord($primary_id); |
| | | $params['active'] = $status; |
| | | |
| | | $affected_rows = $this->updateQuery('../sites/form/web_domain.tform.php', 0, $primary_id, $params); |
| | | $affected_rows = $this->updateQuery('../sites/form/web_vhost_domain.tform.php', 0, $primary_id, $params); |
| | | return $affected_rows; |
| | | } else { |
| | | throw new SoapFault('status_undefined', 'The status is not available'); |
| | |
| | | return false; |
| | | } |
| | | $client_id = $app->functions->intval($client_id); |
| | | $sql = "SELECT d.database_id, d.database_name, d.database_user_id, d.database_ro_user_id, du.database_user, du.database_password FROM web_database d LEFT JOIN web_database_user du ON (du.database_user_id = d.database_user_id) INNER JOIN sys_user s on(d.sys_groupid = s.default_group) WHERE client_id = $client_id"; |
| | | $all = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT d.database_id, d.database_name, d.database_user_id, d.database_ro_user_id, du.database_user, du.database_password FROM web_database d LEFT JOIN web_database_user du ON (du.database_user_id = d.database_user_id) INNER JOIN sys_user s on(d.sys_groupid = s.default_group) WHERE client_id = ?"; |
| | | $all = $app->db->queryAllRecords($sql, $client_id); |
| | | return $all; |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | $result = $app->db->queryAllRecords("SELECT * FROM web_backup".(($site_id != null)?' WHERE parent_domain_id = ?':''), $app->functions->intval($site_id)); |
| | | $result = $app->db->queryAllRecords("SELECT * FROM web_backup".(($site_id != null)?' WHERE parent_domain_id = ?':''), $site_id); |
| | | return $result; |
| | | } |
| | | |
| | |
| | | return $app->quota_lib->get_quota_data($client_id, false); |
| | | } |
| | | |
| | | public function trafficquota_get_by_user($session_id, $client_id, $lastdays = 0) |
| | | { |
| | | global $app; |
| | | $app->uses('quota_lib'); |
| | | |
| | | if(!$this->checkPerm($session_id, 'trafficquota_get_by_user')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | if ($client_id != null) |
| | | $client_id = $app->functions->intval($client_id); |
| | | |
| | | return $app->quota_lib->get_trafficquota_data($client_id, $lastdays); |
| | | } |
| | | |
| | | public function databasequota_get_by_user($session_id, $client_id) |
| | | { |
| | | global $app; |
| | | $app->uses('quota_lib'); |
| | | |
| | | if(!$this->checkPerm($session_id, 'databasequota_get_by_user')) { |
| | | $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); |
| | | return false; |
| | | } |
| | | |
| | | return $app->quota_lib->get_databasequota_data($client_id, false); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | //* Delete old remoting sessions |
| | | $sql = "DELETE FROM remote_session WHERE tstamp < ".time(); |
| | | $sql = "DELETE FROM remote_session WHERE tstamp < UNIX_TIMSTAMP()"; |
| | | $app->db->query($sql); |
| | | |
| | | $username = $app->db->quote($username); |
| | | $password = $app->db->quote($password); |
| | | |
| | | if($client_login == true) { |
| | | $sql = "SELECT * FROM sys_user WHERE USERNAME = '$username'"; |
| | | $user = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM sys_user WHERE USERNAME = ?"; |
| | | $user = $app->db->queryOneRecord($sql, $username); |
| | | if($user) { |
| | | $saved_password = stripslashes($user['passwort']); |
| | | |
| | |
| | | } |
| | | |
| | | // now we need the client data |
| | | $client = $app->db->queryOneRecord("SELECT client.can_use_api FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = " . $app->functions->intval($user['default_group'])); |
| | | $client = $app->db->queryOneRecord("SELECT client.can_use_api FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $user['default_group']); |
| | | if(!$client || $client['can_use_api'] != 'y') { |
| | | throw new SoapFault('client_login_failed', 'The login failed. Client may not use api.'); |
| | | return false; |
| | |
| | | $remote_functions = ''; |
| | | $tstamp = time() + $this->session_timeout; |
| | | $sql = 'INSERT INTO remote_session (remote_session,remote_userid,remote_functions,client_login,tstamp' |
| | | .') VALUES (' |
| | | ." '$remote_session',$remote_userid,'$remote_functions',1,$tstamp)"; |
| | | $app->db->query($sql); |
| | | .') VALUES (?, ?, ?, 1, $tstamp)'; |
| | | $app->db->query($sql, $remote_session,$remote_userid,$remote_functions,$tstamp); |
| | | return $remote_session; |
| | | } else { |
| | | $sql = "SELECT * FROM remote_user WHERE remote_username = '$username' and remote_password = md5('$password')"; |
| | | $remote_user = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM remote_user WHERE remote_username = ? and remote_password = md5(?)"; |
| | | $remote_user = $app->db->queryOneRecord($sql, $username, $password); |
| | | if($remote_user['remote_userid'] > 0) { |
| | | //* Create a remote user session |
| | | //srand ((double)microtime()*1000000); |
| | |
| | | $remote_functions = $remote_user['remote_functions']; |
| | | $tstamp = time() + $this->session_timeout; |
| | | $sql = 'INSERT INTO remote_session (remote_session,remote_userid,remote_functions,tstamp' |
| | | .') VALUES (' |
| | | ." '$remote_session',$remote_userid,'$remote_functions',$tstamp)"; |
| | | $app->db->query($sql); |
| | | .') VALUES (?, ?, ?, ?)'; |
| | | $app->db->query($sql, $remote_session,$remote_userid,$remote_functions,$tstamp); |
| | | return $remote_session; |
| | | } else { |
| | | throw new SoapFault('login_failed', 'The login failed. Username or password wrong.'); |
| | |
| | | return false; |
| | | } |
| | | |
| | | $session_id = $app->db->quote($session_id); |
| | | |
| | | $sql = "DELETE FROM remote_session WHERE remote_session = '$session_id'"; |
| | | if($app->db->query($sql) != false) { |
| | | $sql = "DELETE FROM remote_session WHERE remote_session = ?"; |
| | | if($app->db->query($sql, $session_id) != false) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | $sql = $app->remoting_lib->getSQL($params, 'INSERT', 0); |
| | | |
| | | //* Check if no system user with that username exists |
| | | $username = $app->db->quote($params["username"]); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(userid) as number FROM sys_user WHERE username = '$username'"); |
| | | $username = $params["username"]; |
| | | $tmp = $app->db->queryOneRecord("SELECT count(userid) as number FROM sys_user WHERE username = ?", $username); |
| | | if($tmp['number'] > 0) $app->remoting_lib->errorMessage .= "Duplicate username<br />"; |
| | | |
| | | //* Stop on error while preparing the sql query |
| | |
| | | |
| | | /* copied from the client_edit php */ |
| | | exec('ssh-keygen -t rsa -C '.$username.'-rsa-key-'.time().' -f /tmp/id_rsa -N ""'); |
| | | $app->db->query("UPDATE client SET created_at = ".time().", id_rsa = '".$app->db->quote(@file_get_contents('/tmp/id_rsa'))."', ssh_rsa = '".$app->db->quote(@file_get_contents('/tmp/id_rsa.pub'))."' WHERE client_id = ".$this->id); |
| | | $app->db->query("UPDATE client SET created_at = UNIX_TIMSTAMP(), id_rsa = ?, ssh_rsa = ? WHERE client_id = ?", @file_get_contents('/tmp/id_rsa'), @file_get_contents('/tmp/id_rsa.pub'), $this->id); |
| | | exec('rm -f /tmp/id_rsa /tmp/id_rsa.pub'); |
| | | |
| | | |
| | |
| | | $app->remoting_lib->ispconfig_sysuser_add($params, $insert_id); |
| | | |
| | | if($reseller_id) { |
| | | $client_group = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = ".$insert_id); |
| | | $reseller_user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE client_id = ".$reseller_id); |
| | | $client_group = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = ?", $insert_id); |
| | | $reseller_user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE client_id = ?", $reseller_id); |
| | | $app->auth->add_group_to_user($reseller_user['userid'], $client_group['groupid']); |
| | | $app->db->query("UPDATE client SET parent_client_id = ".$reseller_id." WHERE client_id = ".$insert_id); |
| | | $app->db->query("UPDATE client SET parent_client_id = ? WHERE client_id = ?", $reseller_id, $insert_id); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | //* Get the SQL query |
| | | $sql = $app->remoting_lib->getSQL($params, 'UPDATE', $primary_id); |
| | | |
| | | // throw new SoapFault('debug', $sql); |
| | | if($app->remoting_lib->errorMessage != '') { |
| | | throw new SoapFault('data_processing_error', $app->remoting_lib->errorMessage); |
| | |
| | | return false; |
| | | } |
| | | |
| | | $session_id = $app->db->quote($session_id); |
| | | |
| | | $now = time(); |
| | | $sql = "SELECT * FROM remote_session WHERE remote_session = '$session_id' AND tstamp >= $now"; |
| | | $session = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM remote_session WHERE remote_session = ? AND tstamp >= UNIX_TIMSTAMP()"; |
| | | $session = $app->db->queryOneRecord($sql, $session_id); |
| | | if($session['remote_userid'] > 0) { |
| | | return $session; |
| | | } else { |
| | |
| | | if(isset($_SESSION['client_login']) && isset($_SESSION['client_sys_userid']) && $_SESSION['client_login'] == 1) { |
| | | $client_sys_userid = $app->functions->intval($_SESSION['client_sys_userid']); |
| | | |
| | | $client = $app->db->queryOneRecord("SELECT client.client_id FROM sys_user, client WHERE sys_user.client_id = client.client_id and sys_user.userid = " . $client_sys_userid); |
| | | $client = $app->db->queryOneRecord("SELECT client.client_id FROM sys_user, client WHERE sys_user.client_id = client.client_id and sys_user.userid = ?", $client_sys_userid); |
| | | |
| | | $this->client_id = $client['client_id']; |
| | | $client_login = true; |
| | |
| | | $this->sys_groups = 1; |
| | | $_SESSION["s"]["user"]["typ"] = 'admin'; |
| | | } else { |
| | | //* load system user - try with sysuser and before with userid (workarrond) |
| | | /* |
| | | $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE sysuser_id = $client_id"); |
| | | if(empty($user["userid"])) { |
| | | $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = $client_id"); |
| | | if(empty($user["userid"])) { |
| | | $this->errorMessage .= "No sysuser with the ID $client_id found."; |
| | | return false; |
| | | } |
| | | }*/ |
| | | |
| | | $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE client_id = $this->client_id"); |
| | | $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE client_id = ?", $this->client_id); |
| | | $this->sys_username = $user['username']; |
| | | $this->sys_userid = $user['userid']; |
| | | $this->sys_default_group = $user['default_group']; |
| | | $this->sys_groups = $user['groups']; |
| | | // $_SESSION["s"]["user"]["typ"] = $user['typ']; |
| | | // we have to force admin priveliges for the remoting API as some function calls might fail otherwise. |
| | | if($client_login == false) $_SESSION["s"]["user"]["typ"] = 'admin'; |
| | | } |
| | |
| | | /** |
| | | * Rewrite the record data to be stored in the database |
| | | * and check values with regular expressions. |
| | | * dummy parameter is only there for compatibility with params of base class |
| | | * |
| | | * @param record = Datensatz als Array |
| | | * @return record |
| | | */ |
| | | function encode($record, $dbencode = true, $dummy = '') { |
| | | function encode($record, $tab = '', $dbencode = true) { |
| | | $new_record = $this->_encode($record, '', $dbencode, true); |
| | | if(isset($record['_ispconfig_pw_crypted'])) $new_record['_ispconfig_pw_crypted'] = $record['_ispconfig_pw_crypted']; // this one is not in form definitions! |
| | | |
| | |
| | | return parent::getDataRecord($primary_id); |
| | | } elseif($primary_id == -1) { |
| | | // Return a array with all records |
| | | $sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape; |
| | | return $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT * FROM ??"; |
| | | return $app->db->queryAllRecords($sql, $this->formDef['db_table']); |
| | | } else { |
| | | throw new SoapFault('invalid_id', 'The ID has to be > 0 or -1.'); |
| | | return array(); |
| | |
| | | $sql_offset = 0; |
| | | $sql_limit = 0; |
| | | $sql_where = ''; |
| | | $params = array($this->formDef['db_table']); |
| | | foreach($primary_id as $key => $val) { |
| | | $key = $app->db->quote($key); |
| | | $val = $app->db->quote($val); |
| | | if($key == '#OFFSET#') $sql_offset = $app->functions->intval($val); |
| | | elseif($key == '#LIMIT#') $sql_limit = $app->functions->intval($val); |
| | | elseif(stristr($val, '%')) { |
| | | $sql_where .= "$key like '$val' AND "; |
| | | $sql_where .= "? like ? AND "; |
| | | } else { |
| | | $sql_where .= "$key = '$val' AND "; |
| | | $sql_where .= "? = ? AND "; |
| | | } |
| | | $params[] = $key; |
| | | $params[] = $val; |
| | | } |
| | | $sql_where = substr($sql_where, 0, -5); |
| | | if($sql_where == '') $sql_where = '1'; |
| | | $sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$sql_where. " AND " . $this->getAuthSQL('r', $this->formDef['db_table']); |
| | | $sql = "SELECT * FROM ?? WHERE ".$sql_where. " AND " . $this->getAuthSQL('r', $this->formDef['db_table']); |
| | | if($sql_offset >= 0 && $sql_limit > 0) $sql .= ' LIMIT ' . $sql_offset . ',' . $sql_limit; |
| | | return $app->db->queryAllRecords($sql); |
| | | return $app->db->queryAllRecords($sql, true, $params); |
| | | } else { |
| | | $this->errorMessage = 'The ID must be either an integer or an array.'; |
| | | return array(); |
| | |
| | | |
| | | function ispconfig_sysuser_add($params, $insert_id){ |
| | | global $conf, $app, $sql1; |
| | | $username = $app->db->quote($params["username"]); |
| | | $password = $app->db->quote($params["password"]); |
| | | $username = $params["username"]; |
| | | $password = $params["password"]; |
| | | if(!isset($params['modules'])) { |
| | | $modules = $conf['interface_modules_enabled']; |
| | | } else { |
| | | $modules = $app->db->quote($params['modules']); |
| | | $modules = $params['modules']; |
| | | } |
| | | if(isset($params['limit_client']) && $params['limit_client'] > 0) { |
| | | $modules .= ',client'; |
| | |
| | | if(!isset($params['startmodule'])) { |
| | | $startmodule = 'dashboard'; |
| | | } else { |
| | | $startmodule = $app->db->quote($params["startmodule"]); |
| | | $startmodule = $params["startmodule"]; |
| | | if(!preg_match('/'.$startmodule.'/', $modules)) { |
| | | $_modules = explode(',', $modules); |
| | | $startmodule=$_modules[0]; |
| | | } |
| | | } |
| | | $usertheme = $app->db->quote($params["usertheme"]); |
| | | $usertheme = $params["usertheme"]; |
| | | $type = 'user'; |
| | | $active = 1; |
| | | $insert_id = $app->functions->intval($insert_id); |
| | | $language = $app->db->quote($params["language"]); |
| | | $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('$username','','$insert_id')", 'groupid'); |
| | | $language = $params["language"]; |
| | | $groupid = $app->db->datalogInsert('sys_group', array("name" => $username, "description" => "", "client_id" => $insert_id), 'groupid'); |
| | | $groups = $groupid; |
| | | if(!isset($params['_ispconfig_pw_crypted']) || $params['_ispconfig_pw_crypted'] != 1) $password = $app->auth->crypt_password(stripslashes($password)); |
| | | $sql1 = "INSERT INTO sys_user (username,passwort,modules,startmodule,app_theme,typ,active,language,groups,default_group,client_id) |
| | | VALUES ('$username','$password','$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,$insert_id)"; |
| | | $app->db->query($sql1); |
| | | VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; |
| | | $app->db->query($sql1, $username,$password,$modules,$startmodule,$usertheme,$type,$active,$language,$groups,$groupid,$insert_id); |
| | | } |
| | | |
| | | function ispconfig_sysuser_update($params, $client_id){ |
| | | global $app; |
| | | $username = $app->db->quote($params["username"]); |
| | | $clear_password = $app->db->quote($params["password"]); |
| | | $username = $params["username"]; |
| | | $clear_password = $params["password"]; |
| | | $client_id = $app->functions->intval($client_id); |
| | | if(!isset($params['_ispconfig_pw_crypted']) || $params['_ispconfig_pw_crypted'] != 1) $password = $app->auth->crypt_password(stripslashes($clear_password)); |
| | | else $password = $clear_password; |
| | | if ($clear_password) $pwstring = ", passwort = '$password'"; else $pwstring ="" ; |
| | | $sql = "UPDATE sys_user set username = '$username' $pwstring WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | $params = array($username); |
| | | if ($clear_password) { |
| | | $pwstring = ", passwort = ?"; |
| | | $params[] = $password; |
| | | } else { |
| | | $pwstring ="" ; |
| | | } |
| | | $params[] = $client_id; |
| | | $sql = "UPDATE sys_user set username = ? $pwstring WHERE client_id = ?"; |
| | | $app->db->query($sql, true, $params); |
| | | } |
| | | |
| | | function ispconfig_sysuser_delete($client_id){ |
| | | global $app; |
| | | $client_id = $app->functions->intval($client_id); |
| | | $sql = "DELETE FROM sys_user WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | $sql = "DELETE FROM sys_group WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | $sql = "DELETE FROM sys_user WHERE client_id = ?"; |
| | | $app->db->query($sql, $client_id); |
| | | $sql = "DELETE FROM sys_group WHERE client_id = ?"; |
| | | $app->db->query($sql, $client_id); |
| | | } |
| | | |
| | | } |
| | |
| | | if($this->searchChanged == 1) $_SESSION['search'][$list_name]['page'] = 0; |
| | | |
| | | $sql_von = $_SESSION['search'][$list_name]['page'] * $records_per_page; |
| | | $record_count = $app->db->queryOneRecord("SELECT count(*) AS anzahl FROM $table WHERE $sql_where"); |
| | | $record_count = $app->db->queryOneRecord("SELECT count(*) AS anzahl FROM ?? WHERE $sql_where", $table); |
| | | $pages = $app->functions->intval(($record_count['anzahl'] - 1) / $records_per_page); |
| | | |
| | | $vars['list_file'] = $this->listDef['file']; |
| | |
| | | $list_name = $this->listDef['name']; |
| | | $settings = $_SESSION['search'][$list_name]; |
| | | unset($settings['page']); |
| | | $data = $app->db->quote(serialize($settings)); |
| | | $data = serialize($settings); |
| | | |
| | | $userid = $_SESSION['s']['user']['userid']; |
| | | $groupid = $_SESSION['s']['user']['default_group']; |
| | |
| | | |
| | | $sql = 'INSERT INTO `searchform` ( ' |
| | | .'`sys_userid` , `sys_groupid` , `sys_perm_user` , `sys_perm_group` , `sys_perm_other` , `module` , `searchform` , `title` , `data` ' |
| | | .')VALUES (' |
| | | ."'$userid', '$groupid', '$sys_perm_user', '$sys_perm_group', '$sys_perm_other', '$module', '$searchform', '$title', '$data')"; |
| | | $app->db->query($sql); |
| | | .')VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)'; |
| | | $app->db->query($sql, $userid, $groupid, $sys_perm_user, $sys_perm_group, $sys_perm_other, $module, $searchform, $title, $data); |
| | | } |
| | | |
| | | public function decode($record) |
| | |
| | | return $record; |
| | | } |
| | | |
| | | /* TODO: check for double quoting mysql value */ |
| | | public function encode($record) |
| | | { |
| | | global $app; |
| | |
| | | function read ($session_id) { |
| | | |
| | | if($this->timeout > 0) { |
| | | $rec = $this->db->queryOneRecord("SELECT * FROM sys_session WHERE session_id = '".$this->db->quote($session_id)."' AND (`permanent` = 'y' OR last_updated >= DATE_SUB(NOW(), INTERVAL " . intval($this->timeout) . " MINUTE))"); |
| | | $rec = $this->db->queryOneRecord("SELECT * FROM sys_session WHERE session_id = ? AND (`permanent` = 'y' OR last_updated >= DATE_SUB(NOW(), INTERVAL ? MINUTE))", $session_id, $this->timeout); |
| | | } else { |
| | | $rec = $this->db->queryOneRecord("SELECT * FROM sys_session WHERE session_id = '".$this->db->quote($session_id)."'"); |
| | | $rec = $this->db->queryOneRecord("SELECT * FROM sys_session WHERE session_id = ?", $session_id); |
| | | } |
| | | |
| | | if (is_array($rec)) { |
| | |
| | | |
| | | // Dont write session_data to DB if session data has not been changed after reading it. |
| | | if(isset($this->session_array['session_data']) && $this->session_array['session_data'] != '' && $this->session_array['session_data'] == $session_data) { |
| | | $session_id = $this->db->quote($session_id); |
| | | $this->db->query("UPDATE sys_session SET last_updated = NOW() WHERE session_id = '$session_id'"); |
| | | $this->db->query("UPDATE sys_session SET last_updated = NOW() WHERE session_id = ?", $session_id); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | if (@$this->session_array['session_id'] == '') { |
| | | $session_id = $this->db->quote($session_id); |
| | | $session_data = $this->db->quote($session_data); |
| | | $sql = "REPLACE INTO sys_session (session_id,date_created,last_updated,session_data,permanent) VALUES ('$session_id',NOW(),NOW(),'$session_data','" . ($this->permanent ? 'y' : 'n') . "')"; |
| | | $this->db->query($sql); |
| | | $sql = "REPLACE INTO sys_session (session_id,date_created,last_updated,session_data,permanent) VALUES (?,NOW(),NOW(),'$session_data',?)"; |
| | | $this->db->query($sql, $session_id, ($this->permanent ? 'y' : 'n')); |
| | | |
| | | } else { |
| | | $session_id = $this->db->quote($session_id); |
| | | $session_data = $this->db->quote($session_data); |
| | | $sql = "UPDATE sys_session SET last_updated = NOW(), session_data = '$session_data'" . ($this->permanent ? ", `permanent` = 'y'" : "") . " WHERE session_id = '$session_id'"; |
| | | $this->db->query($sql); |
| | | $sql = "UPDATE sys_session SET last_updated = NOW(), session_data = ?" . ($this->permanent ? ", `permanent` = 'y'" : "") . " WHERE session_id = ?"; |
| | | $this->db->query($sql, $session_data, $session_id); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | function destroy ($session_id) { |
| | | |
| | | $session_id = $this->db->quote($session_id); |
| | | $sql = "DELETE FROM sys_session WHERE session_id = '$session_id'"; |
| | | $this->db->query($sql); |
| | | $sql = "DELETE FROM sys_session WHERE session_id = ?"; |
| | | $this->db->query($sql, $session_id); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | function gc ($max_lifetime) { |
| | | |
| | | /*if($this->timeout > 0) { |
| | | $this->db->query("DELETE FROM sys_session WHERE last_updated < DATE_SUB(NOW(), INTERVAL " . intval($this->timeout) . " MINUTE)"); |
| | | } else {*/ |
| | | $sql = "DELETE FROM sys_session WHERE last_updated < DATE_SUB(NOW(), INTERVAL " . intval($max_lifetime) . " SECOND) AND `permanent` != 'y'"; |
| | | $this->db->query($sql); |
| | | $sql = "DELETE FROM sys_session WHERE last_updated < DATE_SUB(NOW(), INTERVAL ? SECOND) AND `permanent` != 'y'"; |
| | | $this->db->query($sql, intval($max_lifetime)); |
| | | |
| | | /* delete very old even if they are permanent */ |
| | | $sql = "DELETE FROM sys_session WHERE last_updated < DATE_SUB(NOW(), INTERVAL 1 YEAR)"; |
| | | $this->db->query($sql); |
| | | //} |
| | | /* delete very old even if they are permanent */ |
| | | $sql = "DELETE FROM sys_session WHERE last_updated < DATE_SUB(NOW(), INTERVAL 1 YEAR)"; |
| | | $this->db->query($sql); |
| | | |
| | | return true; |
| | | |
| | |
| | | global $app; |
| | | |
| | | if($form_page->dataRecord["parent_domain_id"] > 0) { |
| | | $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($form_page->dataRecord["parent_domain_id"])); |
| | | $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $form_page->dataRecord["parent_domain_id"]); |
| | | |
| | | //* The Database user shall be owned by the same group then the website |
| | | $sys_groupid = $app->functions->intval($web['sys_groupid']); |
| | | $backup_interval = $app->db->quote($web['backup_interval']); |
| | | $backup_interval = $web['backup_interval']; |
| | | $backup_copies = $app->functions->intval($web['backup_copies']); |
| | | |
| | | $sql = "UPDATE web_database SET sys_groupid = '$sys_groupid', backup_interval = '$backup_interval', backup_copies = '$backup_copies' WHERE database_id = ".$form_page->id; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE web_database SET sys_groupid = ?, backup_interval = ?, backup_copies = ? WHERE database_id = ?"; |
| | | $app->db->query($sql, $sys_groupid, $backup_interval, $backup_copies, $form_page->id); |
| | | } |
| | | } |
| | | |
| | |
| | | $escape = '`'; |
| | | } |
| | | |
| | | $sql = "SELECT ".$this->formDef['db_table_idx']." FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$record_id." AND ".$this->getAuthSQL($perm); |
| | | if($record = $app->db->queryOneRecord($sql)) { |
| | | $sql = "SELECT ?? FROM ?? WHERE ?? = ? AND ".$this->getAuthSQL($perm); |
| | | if($record = $app->db->queryOneRecord($sql, $this->formDef['db_table_idx'], $this->formDef['db_table'], $this->formDef['db_table_idx'], $record_id)) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | $escape = '`'; |
| | | } |
| | | |
| | | $sql = "SELECT sys_userid FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id; |
| | | $record = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT sys_userid FROM ?? WHERE ?? = ?"; |
| | | $record = $app->db->queryOneRecord($sql, $this->formDef['db_table'], $this->formDef['db_table_idx'], $primary_id); |
| | | |
| | | // return true if the readonly flag of the form is set and the current loggedin user is not the owner of the record. |
| | | if(isset($this->formDef['tabs'][$tab]['readonly']) && $this->formDef['tabs'][$tab]['readonly'] == true && $record['sys_userid'] != $_SESSION["s"]["user"]["userid"]) { |
| | |
| | | global $app; |
| | | |
| | | $check_passed = true; |
| | | $limit_name = $app->db->quote($limit_name); |
| | | if($limit_name == '') $app->error('Limit name missing in function checkClientLimit.'); |
| | | |
| | | // Get the limits of the client that is currently logged in |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT $limit_name as number, parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $client = $app->db->queryOneRecord("SELECT ?? as number, parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $limit_name, $client_group_id); |
| | | |
| | | // Check if the user may add another item |
| | | if($client["number"] >= 0) { |
| | | $sql = "SELECT count(".$this->formDef['db_table_idx'].") as number FROM ".$this->formDef['db_table']." WHERE ".$this->getAuthSQL('u'); |
| | | $sql = "SELECT count(??) as number FROM ?? WHERE ".$this->getAuthSQL('u'); |
| | | if($sql_where != '') $sql .= ' and '.$sql_where; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | $tmp = $app->db->queryOneRecord($sql, $this->formDef['db_table_idx'], $this->formDef['db_table']); |
| | | if($tmp["number"] >= $client["number"]) $check_passed = false; |
| | | } |
| | | |
| | |
| | | global $app; |
| | | |
| | | $check_passed = true; |
| | | $limit_name = $app->db->quote($limit_name); |
| | | if($limit_name == '') $app->error('Limit name missing in function checkClientLimit.'); |
| | | |
| | | // Get the limits of the client that is currently logged in |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $client = $app->db->queryOneRecord("SELECT parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | |
| | | //* If the client belongs to a reseller, we will check against the reseller Limit too |
| | | if($client['parent_client_id'] != 0) { |
| | | |
| | | //* first we need to know the groups of this reseller |
| | | $tmp = $app->db->queryOneRecord("SELECT userid, groups FROM sys_user WHERE client_id = ".$client['parent_client_id']); |
| | | $tmp = $app->db->queryOneRecord("SELECT userid, groups FROM sys_user WHERE client_id = ?", $client['parent_client_id']); |
| | | $reseller_groups = $tmp["groups"]; |
| | | $reseller_userid = $tmp["userid"]; |
| | | |
| | | // Get the limits of the reseller of the logged in client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $reseller = $app->db->queryOneRecord("SELECT $limit_name as number FROM client WHERE client_id = ".$client['parent_client_id']); |
| | | $reseller = $app->db->queryOneRecord("SELECT $limit_name as number FROM client WHERE client_id = ?", $client['parent_client_id']); |
| | | |
| | | // Check if the user may add another item |
| | | if($reseller["number"] >= 0) { |
| | | $sql = "SELECT count(".$this->formDef['db_table_idx'].") as number FROM ".$this->formDef['db_table']." WHERE (sys_groupid IN (".$reseller_groups.") or sys_userid = ".$reseller_userid.")"; |
| | | $sql = "SELECT count(??) as number FROM ?? WHERE (sys_groupid IN ? or sys_userid = ?)"; |
| | | if($sql_where != '') $sql .= ' and '.$sql_where; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | $tmp = $app->db->queryOneRecord($sql, $this->formDef['db_table_idx'], $this->formDef['db_table'], explode(',', $reseller_groups), $reseller_userid); |
| | | if($tmp["number"] >= $reseller["number"]) $check_passed = false; |
| | | } |
| | | } |
| | |
| | | if ($display_seconds === true) { |
| | | $dselect[] = 'second'; |
| | | } |
| | | |
| | | $tmp_dt = strtr($this->datetimeformat,array('d' => 'dd', 'm' => 'mm', 'Y' => 'yyyy', 'y' => 'yy', 'H' => 'hh', 'h' => 'HH', 'i' => 'ii')) . ($display_seconds ? ':ss' : ''); |
| | | |
| | | $out = ''; |
| | | |
| | | |
| | | return '<input type="text" class="form-control" name="' . $form_element . '" value="' . ($_showdate ? date($this->datetimeformat . ($display_seconds ? ':s' : ''), $_datetime) : '') . '" data-input-element="datetime" data-date-format="' . $tmp_dt . '" />'; |
| | | /* |
| | | foreach ($dselect as $dt_element) |
| | | { |
| | | $dt_options = array(); |
| | |
| | | $selected_value = (int)floor(date('s', $_datetime)); |
| | | break; |
| | | } |
| | | |
| | | |
| | | $out .= "<select name=\"".$form_element."[$dt_element]\" id=\"".$form_element."_$dt_element\" class=\"selectInput\" style=\"width: auto; float: none;\">"; |
| | | if (!$_showdate) { |
| | | $out .= "<option value=\"-\" selected=\"selected\">--</option>" . PHP_EOL; |
| | |
| | | $out .= '</select>' . str_repeat(' ', $dt_space); |
| | | } |
| | | |
| | | return $out; |
| | | return $out;*/ |
| | | } |
| | | |
| | | } |
| | |
| | | // check if the client is locked - he may not change anything, then. |
| | | if(!$app->auth->is_admin()) { |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT client.locked FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ".$app->functions->intval($client_group_id)); |
| | | $client = $app->db->queryOneRecord("SELECT client.locked FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | if(is_array($client) && $client['locked'] == 'y') { |
| | | $app->tform->errorMessage .= $app->lng("client_you_are_locked")."<br />"; |
| | | } |
| | |
| | | if($app->tform->checkPerm($this->id, 'd') == false) $app->error($app->lng('error_no_delete_permission')); |
| | | } |
| | | |
| | | //$this->dataRecord = $app->db->queryOneRecord("SELECT * FROM ".$liste["table"]." WHERE ".$liste["table_idx"]." = ".$this->id); |
| | | $this->dataRecord = $app->tform->getDataRecord($this->id); |
| | | |
| | | $app->plugin->raiseEvent($_SESSION['s']['module']['name'].':'.$app->tform->formDef['name'].':'.'on_check_delete', $this); |
| | |
| | | $app->tform->datalogSave('DELETE', $this->id, $this->dataRecord, array()); |
| | | } |
| | | |
| | | $app->db->query("DELETE FROM ".$app->tform->formDef['db_table']." WHERE ".$app->tform->formDef['db_table_idx']." = ".$this->id." LIMIT 1"); |
| | | $app->db->query("DELETE FROM ?? WHERE ?? = ? LIMIT 1", $app->tform->formDef['db_table'], $app->tform->formDef['db_table_idx'], $this->id); |
| | | |
| | | |
| | | // loading plugins |
| | |
| | | $app->tpl->setInclude("content_tpl", $app->tform->formDef['template_print']); |
| | | |
| | | if($app->tform->formDef['auth'] == 'no') { |
| | | $sql = "SELECT * FROM ".$app->tform->formDef['db_table']." WHERE ".$app->tform->formDef['db_table_idx']." = ".$this->id; |
| | | $sql = "SELECT * FROM ?? WHERE ?? = ?"; |
| | | } else { |
| | | $sql = "SELECT * FROM ".$app->tform->formDef['db_table']." WHERE ".$app->tform->formDef['db_table_idx']." = ".$this->id." AND ".$app->tform->getAuthSQL('r'); |
| | | $sql = "SELECT * FROM ?? WHERE ?? = ? AND ".$app->tform->getAuthSQL('r'); |
| | | } |
| | | if(!$record = $app->db->queryOneRecord($sql)) $app->error($app->lng('error_no_view_permission')); |
| | | if(!$record = $app->db->queryOneRecord($sql, $app->tform->formDef['db_table'], $app->tform->formDef['db_table_idx'], $this->id)) $app->error($app->lng('error_no_view_permission')); |
| | | |
| | | $record["datum"] = date("d.m.Y"); |
| | | |
| | |
| | | $app->tpl->setInclude("content_tpl", $app->tform->formDef['template_mailsend']); |
| | | $app->tpl->setVar('show_mail', 1); |
| | | if($app->tform->formDef['auth'] == 'no') { |
| | | $sql = "SELECT * FROM ".$app->tform->formDef['db_table']." WHERE ".$app->tform->formDef['db_table_idx']." = ".$this->id; |
| | | $sql = "SELECT * FROM ?? WHERE ?? = ?"; |
| | | } else { |
| | | $sql = "SELECT * FROM ".$app->tform->formDef['db_table']." WHERE ".$app->tform->formDef['db_table_idx']." = ".$this->id." AND ".$app->tform->getAuthSQL('r'); |
| | | $sql = "SELECT * FROM ?? WHERE ?? = ? AND ".$app->tform->getAuthSQL('r'); |
| | | } |
| | | if(!$record = $app->db->queryOneRecord($sql)) $app->error($app->lng('error_no_view_permission')); |
| | | if(!$record = $app->db->queryOneRecord($sql, $app->tform->formDef['db_table'], $app->tform->formDef['db_table_idx'], $this->id)) $app->error($app->lng('error_no_view_permission')); |
| | | |
| | | $record["datum"] = date("d.m.Y"); |
| | | $record["mailmessage"] = $_POST["message"]; |
| | |
| | | |
| | | |
| | | if($app->tform->formDef['auth'] == 'no') { |
| | | $sql = "SELECT * FROM ".$app->tform->formDef['db_table']." WHERE ".$app->tform->formDef['db_table_idx']." = ".$this->id; |
| | | $sql = "SELECT * FROM ?? WHERE ?? = ?"; |
| | | } else { |
| | | $sql = "SELECT * FROM ".$app->tform->formDef['db_table']." WHERE ".$app->tform->formDef['db_table_idx']." = ".$this->id." AND ".$app->tform->getAuthSQL('r'); |
| | | $sql = "SELECT * FROM ?? WHERE ?? = ? AND ".$app->tform->getAuthSQL('r'); |
| | | } |
| | | if(!$record = $app->db->queryOneRecord($sql)) $app->error($app->lng('error_no_view_permission')); |
| | | if(!$record = $app->db->queryOneRecord($sql, $app->tform->formDef['db_table'], $app->tform->formDef['db_table_idx'], $this->id)) $app->error($app->lng('error_no_view_permission')); |
| | | |
| | | $record["datum"] = date("d.m.Y"); |
| | | |
| | |
| | | // bestehenden Datensatz anzeigen |
| | | if($app->tform->errorMessage == '') { |
| | | if($app->tform->formDef['auth'] == 'yes' && $_SESSION["s"]["user"]["typ"] != 'admin') { |
| | | $sql = "SELECT * FROM ".$app->tform->formDef['db_table']." WHERE ".$app->tform->formDef['db_table_idx']." = ".$this->id." AND ".$app->tform->getAuthSQL('r'); |
| | | $sql = "SELECT * FROM ?? WHERE ?? = ? AND ".$app->tform->getAuthSQL('r'); |
| | | } else { |
| | | $sql = "SELECT * FROM ".$app->tform->formDef['db_table']." WHERE ".$app->tform->formDef['db_table_idx']." = ".$this->id; |
| | | $sql = "SELECT * FROM ?? WHERE ?? = ?"; |
| | | } |
| | | if(!$record = $app->db->queryOneRecord($sql)) $app->error($app->lng('error_no_view_permission')); |
| | | if(!$record = $app->db->queryOneRecord($sql, $app->tform->formDef['db_table'], $app->tform->formDef['db_table_idx'], $this->id)) $app->error($app->lng('error_no_view_permission')); |
| | | } else { |
| | | // $record = $app->tform->encode($_POST,$this->active_tab); |
| | | $record = $app->tform->encode($this->dataRecord, $this->active_tab, false); |
| | |
| | | var $errorMessage = ''; |
| | | |
| | | var $dateformat = "d.m.Y"; |
| | | var $datetimeformat = 'd.m.Y H:i'; |
| | | var $formDef = array(); |
| | | var $wordbook; |
| | | var $module; |
| | |
| | | $this->wordbook = $wb; |
| | | |
| | | $this->dateformat = $app->lng('conf_format_dateshort'); |
| | | $this->datetimeformat = $app->lng('conf_format_datetime'); |
| | | |
| | | return true; |
| | | } |
| | |
| | | return $values; |
| | | } else { |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT ".$limit_parts[1]." as lm FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $client = $app->db->queryOneRecord("SELECT ".$limit_parts[1]." as lm FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | $allowed = explode(',', $client['lm']); |
| | | } |
| | | } |
| | |
| | | } else { |
| | | //* Get the limits of the client that is currently logged in |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $client = $app->db->queryOneRecord("SELECT parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | //echo "SELECT parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"; |
| | | //* If the client belongs to a reseller, we will check against the reseller Limit too |
| | | if($client['parent_client_id'] != 0) { |
| | | |
| | | //* first we need to know the groups of this reseller |
| | | $tmp = $app->db->queryOneRecord("SELECT userid, groups FROM sys_user WHERE client_id = ".$client['parent_client_id']); |
| | | $tmp = $app->db->queryOneRecord("SELECT userid, groups FROM sys_user WHERE client_id = ?", $client['parent_client_id']); |
| | | $reseller_groups = $tmp["groups"]; |
| | | $reseller_userid = $tmp["userid"]; |
| | | |
| | | // Get the limits of the reseller of the logged in client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $reseller = $app->db->queryOneRecord("SELECT ".$limit_parts[1]." as lm FROM client WHERE client_id = ".$client['parent_client_id']); |
| | | $reseller = $app->db->queryOneRecord("SELECT ".$limit_parts[1]." as lm FROM client WHERE client_id = ?", $client['parent_client_id']); |
| | | $allowed = explode(',', $reseller['lm']); |
| | | } else { |
| | | return $values; |
| | |
| | | if($record[$key] != '' && $record[$key] != '0000-00-00') { |
| | | if(function_exists('date_parse_from_format')) { |
| | | $date_parts = date_parse_from_format($this->dateformat, $record[$key]); |
| | | //list($tag,$monat,$jahr) = explode('.',$record[$key]); |
| | | $new_record[$key] = $date_parts['year'].'-'.$date_parts['month'].'-'.$date_parts['day']; |
| | | //$tmp = strptime($record[$key],$this->dateformat); |
| | | //$new_record[$key] = ($tmp['tm_year']+1900).'-'.($tmp['tm_mon']+1).'-'.$tmp['tm_mday']; |
| | | $new_record[$key] = $date_parts['year'].'-'.str_pad($date_parts['month'], 2, "0", STR_PAD_LEFT).'-'.str_pad($date_parts['day'], 2, "0", STR_PAD_LEFT); |
| | | } else { |
| | | //$tmp = strptime($record[$key],$this->dateformat); |
| | | //$new_record[$key] = ($tmp['tm_year']+1900).'-'.($tmp['tm_mon']+1).'-'.$tmp['tm_mday']; |
| | | $tmp = strtotime($record[$key]); |
| | | $new_record[$key] = date('Y-m-d', $tmp); |
| | | } |
| | |
| | | break; |
| | | case 'INTEGER': |
| | | $new_record[$key] = (isset($record[$key]))?$app->functions->intval($record[$key]):0; |
| | | //if($new_record[$key] != $record[$key]) $new_record[$key] = $field['default']; |
| | | //if($key == 'refresh') die($record[$key]); |
| | | break; |
| | | case 'DOUBLE': |
| | | $new_record[$key] = $record[$key]; |
| | |
| | | break; |
| | | |
| | | case 'DATETIME': |
| | | if (is_array($record[$key])) |
| | | /*if (is_array($record[$key])) |
| | | { |
| | | $filtered_values = array_map(create_function('$item', 'return (int)$item;'), $record[$key]); |
| | | extract($filtered_values, EXTR_PREFIX_ALL, '_dt'); |
| | |
| | | if ($_dt_day != 0 && $_dt_month != 0 && $_dt_year != 0) { |
| | | $new_record[$key] = date( 'Y-m-d H:i:s', mktime($_dt_hour, $_dt_minute, $_dt_second, $_dt_month, $_dt_day, $_dt_year) ); |
| | | } |
| | | } |
| | | } else {*/ |
| | | if($record[$key] != '' && $record[$key] != '0000-00-00 00:00:00') { |
| | | $tmp = strtotime($record[$key]); |
| | | $new_record[$key] = date($this->datetimeformat, $tmp); |
| | | } else { |
| | | $new_record[$key] = '0000-00-00 00:00:00'; |
| | | } |
| | | /*}*/ |
| | | break; |
| | | } |
| | | |
| | |
| | | case 'IDNTOUTF8': |
| | | $returnval = $app->functions->idn_decode($returnval); |
| | | break; |
| | | case 'TRIM': |
| | | $returnval = trim($returnval); |
| | | break; |
| | | default: |
| | | $this->errorMessage .= "Unknown Filter: ".$filter['type']; |
| | | break; |
| | |
| | | if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n'; |
| | | if($validator['allowempty'] == 'n' || ($validator['allowempty'] == 'y' && $field_value != '')){ |
| | | if($this->action == 'NEW') { |
| | | $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ".$escape.$this->formDef['db_table'].$escape. " WHERE $field_name = '".$app->db->quote($field_value)."'"); |
| | | $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ?? WHERE ?? = ?", $this->formDef['db_table'], $field_name, $field_value); |
| | | if($num_rec["number"] > 0) { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($this->wordbook[$errmsg])) { |
| | |
| | | } |
| | | } |
| | | } else { |
| | | $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ".$escape.$this->formDef['db_table'].$escape. " WHERE $field_name = '".$app->db->quote($field_value)."' AND ".$this->formDef['db_table_idx']." != ".$this->primary_id); |
| | | $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ?? WHERE ?? = ? AND ?? != ?", $this->formDef['db_table'], $field_name, $field_value, $this->formDef['db_table_idx'], $this->primary_id); |
| | | if($num_rec["number"] > 0) { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($this->wordbook[$errmsg])) { |
| | |
| | | * @param primary_id |
| | | * @return record |
| | | */ |
| | | /* TODO: check for double quoting */ |
| | | protected function _getSQL($record, $tab, $action = 'INSERT', $primary_id = 0, $sql_ext_where = '', $api = false) { |
| | | |
| | | global $app; |
| | |
| | | $record[$key] = $app->auth->crypt_password(stripslashes($record[$key])); |
| | | $sql_insert_val .= "'".$app->db->quote($record[$key])."', "; |
| | | } elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') { |
| | | $tmp = $app->db->queryOneRecord("SELECT PASSWORD('".$app->db->quote(stripslashes($record[$key]))."') as `crypted`"); |
| | | $tmp = $app->db->queryOneRecord("SELECT PASSWORD(?) as `crypted`", stripslashes($record[$key])); |
| | | $record[$key] = $tmp['crypted']; |
| | | $sql_insert_val .= "'".$app->db->quote($record[$key])."', "; |
| | | } else { |
| | |
| | | $record[$key] = $app->auth->crypt_password(stripslashes($record[$key])); |
| | | $sql_update .= "`$key` = '".$app->db->quote($record[$key])."', "; |
| | | } elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') { |
| | | $tmp = $app->db->queryOneRecord("SELECT PASSWORD('".$app->db->quote(stripslashes($record[$key]))."') as `crypted`"); |
| | | $tmp = $app->db->queryOneRecord("SELECT PASSWORD(?) as `crypted`", stripslashes($record[$key])); |
| | | $record[$key] = $tmp['crypted']; |
| | | $sql_update .= "`$key` = '".$app->db->quote($record[$key])."', "; |
| | | } else { |
| | |
| | | function getDataRecord($primary_id) { |
| | | global $app; |
| | | $escape = '`'; |
| | | $sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id." AND ".$this->getAuthSQL('r', $this->formDef['db_table']); |
| | | return $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM ?? WHERE ?? = ? AND ".$this->getAuthSQL('r', $this->formDef['db_table']); |
| | | return $app->db->queryOneRecord($sql, $this->formDef['db_table'], $this->formDef['db_table_idx'], $primary_id); |
| | | } |
| | | |
| | | |
| | |
| | | <input type=\"hidden\" name=\"id\" value=\"{tmpl_var name='id'}\"> |
| | | |
| | | <div class=\"buttonHolder buttons\"> |
| | | <button class=\"positive iconstxt icoPositive\" type=\"button\" value=\"{tmpl_var name='btn_save_txt'}\" onclick=\"submitForm('pageForm','".$module."/".$formDef["action"]."');\"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class=\"negative iconstxt icoNegative\" type=\"button\" value=\"{tmpl_var name='btn_cancel_txt'}\" onclick=\"loadContent('".$module."/".$formDef["list_default"]."');\"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | <button class=\"positive iconstxt icoPositive\" type=\"button\" value=\"{tmpl_var name='btn_save_txt'}\" onclick=\"ISPConfig.submitForm('pageForm','".$module."/".$formDef["action"]."');\"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class=\"negative iconstxt icoNegative\" type=\"button\" value=\"{tmpl_var name='btn_cancel_txt'}\" data-load-content=\"".$module."/".$formDef["list_default"]."\"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'server_load' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'server_load' AND server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $data = unserialize($record['data']); |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'disk_usage' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'disk_usage' AND server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $data = unserialize($record['data']); |
| | |
| | | $html = |
| | | '<div class="systemmonitor-state state-'.$record['state'].'"> |
| | | <div class="systemmonitor-content icons32 ico-'.$record['state'].'"> |
| | | <table> |
| | | <table class="table"> |
| | | <thead class="dark"> |
| | | <tr> |
| | | <td>'.$app->lng("monitor_diskusage_filesystem_txt").'</td> |
| | | <td>'.$app->lng("monitor_diskusage_type_txt").'</td> |
| | | <td>'.$app->lng("monitor_diskusage_size_txt").'</td> |
| | | <td>'.$app->lng("monitor_diskusage_used_txt").'</td> |
| | | <td>'.$app->lng("monitor_diskusage_available_txt").'</td> |
| | | <td>'.$app->lng("monitor_diskusage_usage_txt").'</td> |
| | | <td>'.$app->lng("monitor_diskusage_mounted_txt").'</td> |
| | | </tr>'; |
| | | <th>'.$app->lng("monitor_diskusage_filesystem_txt").'</th> |
| | | <th class="small-col">'.$app->lng("monitor_diskusage_type_txt").'</th> |
| | | <th class="tiny-col">'.$app->lng("monitor_diskusage_size_txt").'</th> |
| | | <th class="tiny-col">'.$app->lng("monitor_diskusage_used_txt").'</th> |
| | | <th class="tiny-col">'.$app->lng("monitor_diskusage_available_txt").'</th> |
| | | <th class="tiny-col">'.$app->lng("monitor_diskusage_usage_txt").'</th> |
| | | <th>'.$app->lng("monitor_diskusage_mounted_txt").'</th> |
| | | </tr></thead> |
| | | <tbody>'; |
| | | foreach($data as $line) { |
| | | $html .= '<tr>'; |
| | | foreach ($line as $item) { |
| | |
| | | } |
| | | $html .= '</tr>'; |
| | | } |
| | | $html .= '</table>'; |
| | | $html .= '</tbody></table>'; |
| | | $html .= '</div></div>'; |
| | | } else { |
| | | $html = '<p>'.$app->lng("no_data_diskusage_txt").'</p>'; |
| | |
| | | function showDatabaseSize () { |
| | | global $app; |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'database_size' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'database_size' AND server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | if(isset($record['data'])) { |
| | | $data = unserialize($record['data']); |
| | | //* format the data |
| | | $html = |
| | | '<div class="systemmonitor-state state-'.$record['state'].'"> |
| | | <div class="systemmonitor-content icons32 ico-'.$record['state'].'"> |
| | | <table><thead><tr> |
| | | <td>'.$app->lng("monitor_database_name_txt").'</td> |
| | | <td>'.$app->lng("monitor_database_size_txt").'</td> |
| | | <td>'.$app->lng("monitor_database_client_txt").'</td> |
| | | <td>'.$app->lng("monitor_database_domain_txt").'</td> |
| | | </tr>'; |
| | | <table class="table"><thead class="dark"><tr> |
| | | <th>'.$app->lng("monitor_database_name_txt").'</th> |
| | | <th class="tiny-col">'.$app->lng("monitor_database_size_txt").'</th> |
| | | <th>'.$app->lng("monitor_database_client_txt").'</th> |
| | | <th>'.$app->lng("monitor_database_domain_txt").'</th> |
| | | </tr></thead> |
| | | <tbody>'; |
| | | foreach($data as $line) { |
| | | $html .= '<tr>'; |
| | | if ($line['size'] > 0) $line['size'] = $app->functions->formatBytes($line['size']); |
| | | |
| | | //* get the client |
| | | $line['client']=$app->db->queryOneRecord("SELECT client.username FROM web_database, sys_group, client WHERE web_database.sys_groupid = sys_group.groupid AND sys_group.client_id = client.client_id AND web_database.database_name='".$line['database_name']."'")['username']; |
| | | $tmp = $app->db->queryOneRecord("SELECT client.username FROM web_database, sys_group, client WHERE web_database.sys_groupid = sys_group.groupid AND sys_group.client_id = client.client_id AND web_database.database_name=?", $line['database_name']); |
| | | $line['client'] = $tmp['username']; |
| | | |
| | | //* get the domain |
| | | $line['domain']=$app->db->queryOneRecord("SELECT domain FROM web_domain WHERE domain_id=(SELECT parent_domain_id FROM web_database WHERE database_name='".$line['database_name']."')")['domain']; |
| | | $tmp = $app->db->queryOneRecord("SELECT domain FROM web_domain WHERE domain_id=(SELECT parent_domain_id FROM web_database WHERE database_name=?", $line['database_name']); |
| | | $line['domain'] = $tmp['domain']; |
| | | |
| | | //* remove the sys_groupid from output |
| | | unset($line['sys_groupid']); |
| | |
| | | foreach ($line as $item) { |
| | | $html .= '<td>' . $item . '</td>'; |
| | | } |
| | | $html .= '</tr></tmpl loop>'; |
| | | $html .= '</tr>'; |
| | | } |
| | | $html .= '</tbody></table></div></div>'; |
| | | } else { |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'mem_usage' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'mem_usage' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $data = unserialize($record['data']); |
| | |
| | | $html = |
| | | '<div class="systemmonitor-state state-'.$record['state'].'"> |
| | | <div class="systemmonitor-content icons32 ico-'.$record['state'].'"> |
| | | <table>'; |
| | | <table class="table"> |
| | | <tbody>'; |
| | | |
| | | foreach($data as $key => $value) { |
| | | if ($key != '') { |
| | |
| | | </tr>'; |
| | | } |
| | | } |
| | | $html .= '</table>'; |
| | | $html .= '</tbody></table>'; |
| | | $html .= '</div></div>'; |
| | | |
| | | } else { |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'cpu_info' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'cpu_info' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $data = unserialize($record['data']); |
| | |
| | | $html = |
| | | '<div class="systemmonitor-state state-'.$record['state'].'"> |
| | | <div class="systemmonitor-content icons32 ico-'.$record['state'].'"> |
| | | <table>'; |
| | | <table class="table"> |
| | | <tbody>'; |
| | | foreach($data as $key => $value) { |
| | | if ($key != '') { |
| | | $html .= '<tr> |
| | |
| | | </tr>'; |
| | | } |
| | | } |
| | | $html .= '</table>'; |
| | | $html .= '</tbody></table>'; |
| | | $html .= '</div></div>'; |
| | | } else { |
| | | $html = '<p>'.$app->lng("no_data_cpuinfo_txt").'</p>'; |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'services' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'services' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $data = unserialize($record['data']); |
| | |
| | | $html = |
| | | '<div class="systemmonitor-state state-'.$record['state'].'"> |
| | | <div class="systemmonitor-content icons32 ico-'.$record['state'].'"> |
| | | <table>'; |
| | | <table class="table"> |
| | | <tbody>'; |
| | | |
| | | if($data['webserver'] != -1) { |
| | | if($data['webserver'] == 1) { |
| | |
| | | } |
| | | |
| | | |
| | | $html .= '</table></div></div>'; |
| | | $html .= '</tbody></table></div></div>'; |
| | | } else { |
| | | $html = '<p>'.$app->lng("no_data_services_txt").'</p>'; |
| | | } |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'system_update' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'system_update' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $html = |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'openvz_beancounter' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'openvz_beancounter' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $html = |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'raid_state' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'raid_state' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $html = |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'rkhunter' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'rkhunter' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $html = |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'log_fail2ban' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'log_fail2ban' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $html = |
| | |
| | | $data = unserialize($record['data']); |
| | | if ($data == '') { |
| | | $html .= '<p>'. |
| | | 'fail2ban is not installed at this server.<br />' . |
| | | 'fail2ban is not installed on this server.<br />' . |
| | | 'See more (for debian) <a href="http://www.howtoforge.com/fail2ban_debian_etch" target="htf">here...</a>'. |
| | | '</p>'; |
| | | } |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'log_mongodb' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'log_mongodb' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $html = |
| | |
| | | $data = unserialize($record['data']); |
| | | if ($data == '') { |
| | | $html .= '<p>'. |
| | | 'MongoDB is not installed at this server.<br />' . |
| | | 'See more (for debian) <a href="http://www.howtoforge.com/fail2ban_debian_etch" target="htf">here...</a>'. |
| | | 'MongoDB is not installed on this server.<br />' . |
| | | '</p>'; |
| | | } |
| | | else { |
| | |
| | | |
| | | function showIPTables() { |
| | | global $app; |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'iptables_rules' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'iptables_rules' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | if(isset($record['data'])) { |
| | | $html = |
| | | '<div class="systemmonitor-state state-'.$record['state'].'"> |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'mailq' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'mailq' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); |
| | | |
| | | if(isset($record['data'])) { |
| | | $data = unserialize($record['data']); |
| | |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT created FROM monitor_data WHERE type = '" . $type . "' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | $record = $app->db->queryOneRecord("SELECT created FROM monitor_data WHERE type = ? and server_id = ? ORDER BY created DESC", $type, $_SESSION['monitor']['server_id']); |
| | | |
| | | /* TODO: datetimeformat should be set somewhat other way */ |
| | | $dateTimeFormat = $app->lng("monitor_settings_datetimeformat_txt"); |
| | |
| | | if(isset($dataRecord['client_group_id'])) { |
| | | $client_group_id = $dataRecord['client_group_id']; |
| | | } elseif (isset($dataRecord['parent_domain_id'])) { |
| | | $tmp = $app->db->queryOneRecord("SELECT sys_groupid FROM web_domain WHERE domain_id = " . $dataRecord['parent_domain_id']); |
| | | $tmp = $app->db->queryOneRecord("SELECT sys_groupid FROM web_domain WHERE domain_id = ?", $dataRecord['parent_domain_id']); |
| | | $client_group_id = $tmp['sys_groupid']; |
| | | } elseif(isset($dataRecord['sys_groupid'])) { |
| | | $client_group_id = $dataRecord['sys_groupid']; |
| | |
| | | } |
| | | } |
| | | |
| | | $tmp = $app->db->queryOneRecord("SELECT name FROM sys_group WHERE groupid = " . $app->functions->intval($client_group_id)); |
| | | $tmp = $app->db->queryOneRecord("SELECT name FROM sys_group WHERE groupid = ?", $client_group_id); |
| | | $clientName = $tmp['name']; |
| | | if ($clientName == "") $clientName = 'default'; |
| | | $clientName = $this->convertClientName($clientName); |
| | |
| | | if(isset($dataRecord['client_group_id'])) { |
| | | $client_group_id = $dataRecord['client_group_id']; |
| | | } elseif (isset($dataRecord['parent_domain_id']) && $dataRecord['parent_domain_id'] != 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT sys_groupid FROM web_domain WHERE domain_id = " . $dataRecord['parent_domain_id']); |
| | | $tmp = $app->db->queryOneRecord("SELECT sys_groupid FROM web_domain WHERE domain_id = ?", $dataRecord['parent_domain_id']); |
| | | $client_group_id = $tmp['sys_groupid']; |
| | | } elseif(isset($dataRecord['sys_groupid'])) { |
| | | $client_group_id = $dataRecord['sys_groupid']; |
| | |
| | | return '[CLIENTID]'; |
| | | } |
| | | } |
| | | $tmp = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = " . $app->functions->intval($client_group_id)); |
| | | $tmp = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ?", $client_group_id); |
| | | $clientID = $tmp['client_id']; |
| | | if ($clientID == '') $clientID = '0'; |
| | | return $clientID; |
| | |
| | | return $res; |
| | | } |
| | | |
| | | /* TODO: rewrite SQL */ |
| | | function getDomainModuleDomains($not_used_in_table = null, $selected_domain = null) { |
| | | global $app; |
| | | |
| | |
| | | return $app->db->queryAllRecords($sql, $not_used_in_table, $selected_domain); |
| | | } |
| | | |
| | | /* TODO: rewrite SQL */ |
| | | function checkDomainModuleDomain($domain_id) { |
| | | global $app; |
| | | |
| | |
| | | if(!$domain || !$domain['domain_id']) return false; |
| | | return $domain['domain']; |
| | | } |
| | | |
| | | |
| | | /* TODO: rewrite SQL */ |
| | | function getClientIdForDomain($domain_id) { |
| | | global $app; |
| | | |
| | |
| | | } |
| | | |
| | | if($client_id == 0) { |
| | | $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM sys_user WHERE username = '".$app->db->quote($field_value)."'"); |
| | | $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM sys_user WHERE username = ?", $field_value); |
| | | if($num_rec["number"] > 0) { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | |
| | | } |
| | | } |
| | | } else { |
| | | $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM sys_user WHERE username = '".$app->db->quote($field_value)."' AND client_id != ".$app->functions->intval($client_id)); |
| | | $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM sys_user WHERE username = ? AND client_id != ?", $field_value, $client_id); |
| | | if($num_rec["number"] > 0) { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | |
| | | switch ($field_name) |
| | | { |
| | | case 'web_servers': |
| | | $used_servers = $app->db->queryAllRecords('SELECT domain_id FROM web_domain INNER JOIN sys_user ON web_domain.sys_userid = sys_user.userid WHERE client_id = ' . $client_id . ' AND server_id NOT IN (' . implode(', ', $field_value) . ');'); |
| | | $used_servers = $app->db->queryAllRecords('SELECT domain_id FROM web_domain INNER JOIN sys_user ON web_domain.sys_userid = sys_user.userid WHERE client_id = ? AND server_id NOT IN ?', $client_id, $field_value); |
| | | break; |
| | | |
| | | case 'dns_servers': |
| | | $used_servers = $app->db->queryAllRecords('SELECT id FROM dns_rr INNER JOIN sys_user ON dns_rr.sys_userid = sys_user.userid WHERE client_id = ' . $client_id . ' AND server_id NOT IN (' . implode(', ', $field_value) . ');'); |
| | | $used_servers = $app->db->queryAllRecords('SELECT id FROM dns_rr INNER JOIN sys_user ON dns_rr.sys_userid = sys_user.userid WHERE client_id = ? AND server_id NOT IN ?', $client_id, $field_value); |
| | | break; |
| | | |
| | | case 'db_servers': |
| | | $used_servers = $app->db->queryAllRecords('SELECT database_id FROM web_database INNER JOIN sys_user ON web_database.sys_userid = sys_user.userid WHERE client_id = ' . $client_id . ' AND server_id NOT IN (' . implode(', ', $field_value) . ');'); |
| | | $used_servers = $app->db->queryAllRecords('SELECT database_id FROM web_database INNER JOIN sys_user ON web_database.sys_userid = sys_user.userid WHERE client_id = ? AND server_id NOT IN ?', $client_id, $field_value); |
| | | break; |
| | | |
| | | case 'mail_servers': |
| | | $used_servers = $app->db->queryAllRecords('SELECT domain_id FROM mail_domain INNER JOIN sys_user ON mail_domain.sys_userid = sys_user.userid WHERE client_id = ' . $client_id . ' AND server_id NOT IN (' . implode(', ', $field_value) . ');'); |
| | | $used_servers = $app->db->queryAllRecords('SELECT domain_id FROM mail_domain INNER JOIN sys_user ON mail_domain.sys_userid = sys_user.userid WHERE client_id = ? AND server_id NOT IN ?', $client_id, $field_value); |
| | | break; |
| | | |
| | | case 'xmpp_servers': |
| | | $used_servers = $app->db->queryAllRecords('SELECT domain_id FROM xmpp_domain INNER JOIN sys_user ON xmpp_domain.sys_userid = sys_user.userid WHERE client_id = ? AND server_id NOT IN ?', $client_id, $field_value); |
| | | break; |
| | | } |
| | | |
| | | if ($used_servers === null || count($used_servers)) |
| | |
| | | } |
| | | } |
| | | |
| | | function check_vat_id ($field_name, $field_value, $validator){ |
| | | global $app, $page; |
| | | |
| | | $vatid = trim($field_value); |
| | | if(isset($app->remoting_lib->primary_id)) { |
| | | $country = $app->remoting_lib->dataRecord['country']; |
| | | } else { |
| | | $country = $page->dataRecord['country']; |
| | | } |
| | | |
| | | // check if country is member of EU |
| | | $country_details = $app->db->queryOneRecord("SELECT * FROM country WHERE iso = ?", $country); |
| | | if($country_details['eu'] == 'y' && $vatid != ''){ |
| | | |
| | | $vatid = preg_replace('/\s+/', '', $vatid); |
| | | $vatid = str_replace(array('.', '-', ','), '', $vatid); |
| | | $cc = substr($vatid, 0, 2); |
| | | $vn = substr($vatid, 2); |
| | | |
| | | // Test if the country of the VAT-ID matches the country of the customer |
| | | if($country != ''){ |
| | | // Greece |
| | | if($country == 'GR') $country = 'EL'; |
| | | if(strtoupper($cc) != $country){ |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | | return $app->tform->wordbook[$errmsg]."<br>\r\n"; |
| | | } else { |
| | | return $errmsg."<br>\r\n"; |
| | | } |
| | | } |
| | | } |
| | | |
| | | $client = new SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"); |
| | | |
| | | if($client){ |
| | | $params = array('countryCode' => $cc, 'vatNumber' => $vn); |
| | | try{ |
| | | $r = $client->checkVat($params); |
| | | if($r->valid == true){ |
| | | } else { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | | return $app->tform->wordbook[$errmsg]."<br>\r\n"; |
| | | } else { |
| | | return $errmsg."<br>\r\n"; |
| | | } |
| | | } |
| | | |
| | | // This foreach shows every single line of the returned information |
| | | /* |
| | | foreach($r as $k=>$prop){ |
| | | echo $k . ': ' . $prop; |
| | | } |
| | | */ |
| | | |
| | | } catch(SoapFault $e) { |
| | | //echo 'Error, see message: '.$e->faultstring; |
| | | switch ($e->faultstring) { |
| | | case 'INVALID_INPUT': |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | | return $app->tform->wordbook[$errmsg]."<br>\r\n"; |
| | | } else { |
| | | return $errmsg."<br>\r\n"; |
| | | } |
| | | break; |
| | | // the following cases shouldn't be the user's fault, so we return no error |
| | | case 'SERVICE_UNAVAILABLE': |
| | | case 'MS_UNAVAILABLE': |
| | | case 'TIMEOUT': |
| | | case 'SERVER_BUSY': |
| | | break; |
| | | } |
| | | } |
| | | } else { |
| | | // Connection to host not possible, europe.eu down? |
| | | // this shouldn't be the user's fault, so we return no error |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | function check_template($field_name, $field_value, $validator) { |
| | | $dkim=false; |
| | | foreach($field_value as $field ) { if($field == 'DKIM') $dkim=true; } |
| | | if ($dkim && $field_value[0]!='DOMAIN') return $this->get_error($validator['errmsg']); |
| | | if(is_array($field_value) && !empty($field_value)){ |
| | | foreach($field_value as $field ) { if($field == 'DKIM') $dkim=true; } |
| | | if ($dkim && $field_value[0]!='DOMAIN') return $this->get_error($validator['errmsg']); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | if(substr($field, -1) == '.' && $area == 'Name'){ |
| | | $soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ".intval($zoneid)); |
| | | $soa = $app->db->queryOneRecord("SELECT * FROM soa WHERE id = ?", $zoneid); |
| | | if(substr($field, (strlen($field) - strlen($soa['origin']))) != $soa['origin']) $error .= $desc." ".$app->tform->wordbook['error_out_of_zone']."<br>\r\n"; |
| | | } |
| | | |
| | |
| | | $app->uses('ini_parser,getconf'); |
| | | $settings = $app->getconf->get_global_config('domains'); |
| | | if ($settings['use_domain_module'] == 'y') { |
| | | $sql = "SELECT domain_id, domain FROM domain WHERE domain_id = " . $app->functions->intval($check_domain); |
| | | $domain_check = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT domain_id, domain FROM domain WHERE domain_id = ?"; |
| | | $domain_check = $app->db->queryOneRecord($sql, $check_domain); |
| | | if(!$domain_check) return; |
| | | $check_domain = $domain_check['domain']; |
| | | } |
| | |
| | | |
| | | if($domain['ip_address'] == '' || $domain['ipv6_address'] == ''){ |
| | | if($domain['parent_domain_id'] > 0){ |
| | | $parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($domain['parent_domain_id'])); |
| | | $parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $domain['parent_domain_id']); |
| | | if(is_array($parent_domain) && !empty($parent_domain)){ |
| | | $domain['ip_address'] = $parent_domain['ip_address']; |
| | | $domain['ipv6_address'] = $parent_domain['ipv6_address']; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // check if domain has alias/subdomains - if we move a web to another IP, make sure alias/subdomains are checked as well |
| | | $aliassubdomains = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE parent_domain_id = ".$app->functions->intval($primary_id)." AND (type = 'alias' OR type = 'subdomain' OR type = 'vhostsubdomain')"); |
| | | $aliassubdomains = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE parent_domain_id = ? AND (type = 'alias' OR type = 'subdomain' OR type = 'vhostsubdomain')", $primary_id); |
| | | $additional_sql1 = ''; |
| | | $additional_sql2 = ''; |
| | | $domain_params = array(); |
| | | if(is_array($aliassubdomains) && !empty($aliassubdomains)){ |
| | | foreach($aliassubdomains as $aliassubdomain){ |
| | | $additional_sql1 .= " OR d.domain = '".$app->db->quote($aliassubdomain['domain'])."'"; |
| | | $additional_sql2 .= " OR CONCAT(d.subdomain, '.', d.domain) = '".$app->db->quote($aliassubdomain['domain'])."'"; |
| | | $additional_sql1 .= " OR d.domain = ?"; |
| | | $additional_sql2 .= " OR CONCAT(d.subdomain, '.', d.domain) = ?"; |
| | | $domain_params[] = $aliassubdomain['domain']; |
| | | } |
| | | } |
| | | |
| | | |
| | | $qrystr = "SELECT d.domain_id, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ip_address, d.ip_address) as `ip_address`, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ipv6_address, d.ipv6_address) as `ipv6_address` FROM `web_domain` as d LEFT JOIN `web_domain` as p ON (p.domain_id = d.parent_domain_id) WHERE (d.domain = '" . $app->db->quote($domain_name) . "'" . $additional_sql1 . ") AND d.server_id = " . $app->functions->intval($domain['server_id']) . " AND d.domain_id != " . $app->functions->intval($primary_id) . ($primary_id ? " AND d.parent_domain_id != " . $app->functions->intval($primary_id) : ""); |
| | | $checks = $app->db->queryAllRecords($qrystr); |
| | | $qrystr = "SELECT d.domain_id, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ip_address, d.ip_address) as `ip_address`, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ipv6_address, d.ipv6_address) as `ipv6_address` FROM `web_domain` as d LEFT JOIN `web_domain` as p ON (p.domain_id = d.parent_domain_id) WHERE (d.domain = ?" . $additional_sql1 . ") AND d.server_id = ? AND d.domain_id != ?" . ($primary_id ? " AND d.parent_domain_id != ?" : ""); |
| | | $params = array($domain_name) + $domain_params + array($domain['server_id'], $primary_id, $primary_id); |
| | | $checks = $app->db->queryAllRecords($qrystr, true, $params); |
| | | if(is_array($checks) && !empty($checks)){ |
| | | foreach($checks as $check){ |
| | | if($domain['ip_address'] == '*') return false; |
| | |
| | | } |
| | | |
| | | if($only_domain == false) { |
| | | $qrystr = "SELECT d.domain_id, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ip_address, d.ip_address) as `ip_address`, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ipv6_address, d.ipv6_address) as `ipv6_address` FROM `web_domain` as d LEFT JOIN `web_domain` as p ON (p.domain_id = d.parent_domain_id) WHERE (CONCAT(d.subdomain, '.', d.domain)= '" . $app->db->quote($domain_name) . "'" . $additional_sql2 . ") AND d.server_id = " . $app->functions->intval($domain['server_id']) . " AND d.domain_id != " . $app->functions->intval($primary_id) . ($primary_id ? " AND d.parent_domain_id != " . $app->functions->intval($primary_id) : ""); |
| | | $checks = $app->db->queryAllRecords($qrystr); |
| | | $qrystr = "SELECT d.domain_id, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ip_address, d.ip_address) as `ip_address`, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ipv6_address, d.ipv6_address) as `ipv6_address` FROM `web_domain` as d LEFT JOIN `web_domain` as p ON (p.domain_id = d.parent_domain_id) WHERE (CONCAT(d.subdomain, '.', d.domain)= ?" . $additional_sql2 . ") AND d.server_id = ? AND d.domain_id != ?" . ($primary_id ? " AND d.parent_domain_id != ?" : ""); |
| | | $params = array($domain_name) + $domain_params + array($domain['server_id'], $primary_id, $primary_id); |
| | | $checks = $app->db->queryAllRecords($qrystr, true, $params); |
| | | if(is_array($checks) && !empty($checks)){ |
| | | foreach($checks as $check){ |
| | | if($domain['ip_address'] == '*') return false; |
| | |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { |
| | | // Get the limits of the client |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT limit_wildcard FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $client = $app->db->queryOneRecord("SELECT limit_wildcard FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | |
| | | if($client["limit_wildcard"] == 'y') return true; |
| | | else return false; |
| | |
| | | |
| | | if($primary_id > 0) { |
| | | //* get parent_domain_id from website |
| | | $ftp_data = $app->db->queryOneRecord("SELECT parent_domain_id FROM ftp_user WHERE ftp_user_id = '".$app->db->quote($primary_id)."'"); |
| | | $ftp_data = $app->db->queryOneRecord("SELECT parent_domain_id FROM ftp_user WHERE ftp_user_id = ?", $primary_id); |
| | | if(!is_array($ftp_data) || $ftp_data["parent_domain_id"] < 1) { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | |
| | | $parent_domain_id = $app->functions->intval($app->remoting_lib->dataRecord['parent_domain_id']); |
| | | } |
| | | |
| | | $domain_data = $app->db->queryOneRecord("SELECT domain_id, document_root FROM web_domain WHERE domain_id = '".$app->db->quote($parent_domain_id)."'"); |
| | | $domain_data = $app->db->queryOneRecord("SELECT domain_id, document_root FROM web_domain WHERE domain_id = ?", $parent_domain_id); |
| | | if(!is_array($domain_data) || $domain_data["domain_id"] < 1) { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | |
| | | |
| | | if($primary_id > 0) { |
| | | //* get parent_domain_id from website |
| | | $shell_data = $app->db->queryOneRecord("SELECT parent_domain_id FROM shell_user WHERE shell_user_id = '".$app->db->quote($primary_id)."'"); |
| | | $shell_data = $app->db->queryOneRecord("SELECT parent_domain_id FROM shell_user WHERE shell_user_id = ?", $primary_id); |
| | | if(!is_array($shell_data) || $shell_data["parent_domain_id"] < 1) { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | |
| | | $parent_domain_id = $app->functions->intval($app->remoting_lib->dataRecord['parent_domain_id']); |
| | | } |
| | | |
| | | $domain_data = $app->db->queryOneRecord("SELECT domain_id, document_root FROM web_domain WHERE domain_id = '".$app->db->quote($parent_domain_id)."'"); |
| | | $domain_data = $app->db->queryOneRecord("SELECT domain_id, document_root FROM web_domain WHERE domain_id = ?", $parent_domain_id); |
| | | if(!is_array($domain_data) || $domain_data["domain_id"] < 1) { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | |
| | | //** Database |
| | | $conf['db_type'] = 'mysql'; |
| | | $conf['db_host'] = 'localhost'; |
| | | $conf['db_port'] = 3306; |
| | | $conf['db_database'] = 'ispconfig3_305'; |
| | | $conf['db_user'] = 'root'; |
| | | $conf['db_password'] = ''; |
| | |
| | | |
| | | define('DB_TYPE', $conf['db_type']); |
| | | define('DB_HOST', $conf['db_host']); |
| | | define('DB_PORT', $conf['db_port']); |
| | | define('DB_DATABASE', $conf['db_database']); |
| | | define('DB_USER', $conf['db_user']); |
| | | define('DB_PASSWORD', $conf['db_password']); |
| | |
| | | //** Database settings for the master DB. This setting is only used in multiserver setups |
| | | $conf['dbmaster_type'] = 'mysql'; |
| | | $conf['dbmaster_host'] = '{mysql_master_server_host}'; |
| | | $conf['dbmaster_port'] = '{mysql_master_server_port}'; |
| | | $conf['dbmaster_database'] = '{mysql_master_server_database}'; |
| | | $conf['dbmaster_user'] = '{mysql_master_server_ispconfig_user}'; |
| | | $conf['dbmaster_password'] = '{mysql_master_server_ispconfig_password}'; |
| | |
| | | $wb['filter_txt'] = "Filter"; |
| | | $wb['add_new_record_txt'] = "Add new record"; |
| | | $wb['btn_save_txt'] = "Save"; |
| | | $wb['btn_cancel_txt'] = "Back"; |
| | | $wb['btn_cancel_txt'] = "Cancel"; |
| | | $wb['top_menu_system'] = 'System'; |
| | | $wb['top_menu_client'] = 'Client'; |
| | | $wb['top_menu_email'] = 'Email'; |
| | |
| | | // make sure that the record belongs to the client group and not the admin group when a dmin inserts it |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($page_form->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE dns_slave SET sys_groupid = $client_group_id WHERE id = ".$page_form->id); |
| | | $app->db->query("UPDATE dns_slave SET sys_groupid = ? WHERE id = ?", $client_group_id, $page_form->id); |
| | | } |
| | | if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE dns_slave SET sys_groupid = $client_group_id WHERE id = ".$page_form->id); |
| | | $app->db->query("UPDATE dns_slave SET sys_groupid = ? WHERE id = ?", $client_group_id, $page_form->id); |
| | | } |
| | | |
| | | //** When the client group has changed, change also the owner of the record if the owner is not the admin user |
| | | if($page_form->oldDataRecord && $page_form->oldDataRecord["client_group_id"] != $page_form->dataRecord["client_group_id"] && $page_form->dataRecord["sys_userid"] != 1) { |
| | | $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]); |
| | | $tmp = $app->db->queryOneREcord("SELECT userid FROM sys_user WHERE default_group = ".$client_group_id); |
| | | $tmp = $app->db->queryOneREcord("SELECT userid FROM sys_user WHERE default_group = ?", $client_group_id); |
| | | if($tmp["userid"] > 0) { |
| | | $app->db->query("UPDATE dns_slave SET sys_userid = ".$tmp["userid"]." WHERE id = ".$page_form->id); |
| | | $app->db->query("UPDATE dns_slave SET sys_userid = ? WHERE id = ?", $tmp["userid"], $page_form->id); |
| | | } |
| | | } |
| | | } |
| | |
| | | $tmp = $app->db->diffrec($page_form->oldDataRecord, $app->tform->getDataRecord($page_form->id)); |
| | | if($tmp['diff_num'] > 0) { |
| | | // Update the serial number of the SOA record |
| | | $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ".$page_form->id); |
| | | $app->db->query("UPDATE dns_soa SET serial = '".$app->validate_dns->increase_serial($soa["serial"])."' WHERE id = ".$page_form->id); |
| | | $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ?", $page_form->id); |
| | | $app->db->query("UPDATE dns_soa SET serial = ? WHERE id = ?", $app->validate_dns->increase_serial($soa["serial"]), $page_form->id); |
| | | } |
| | | |
| | | //** When the client group has changed, change also the owner of the record if the owner is not the admin user |
| | | if($page_form->oldDataRecord["client_group_id"] != $page_form->dataRecord["client_group_id"] && $page_form->dataRecord["sys_userid"] != 1) { |
| | | $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]); |
| | | $tmp = $app->db->queryOneREcord("SELECT userid FROM sys_user WHERE default_group = ".$client_group_id); |
| | | $tmp = $app->db->queryOneREcord("SELECT userid FROM sys_user WHERE default_group = ?", $client_group_id); |
| | | if($tmp["userid"] > 0) { |
| | | $app->db->query("UPDATE dns_soa SET sys_userid = ".$tmp["userid"]." WHERE id = ".$page_form->id); |
| | | $app->db->query("UPDATE dns_rr SET sys_userid = ".$tmp["userid"]." WHERE zone = ".$page_form->id); |
| | | $app->db->query("UPDATE dns_soa SET sys_userid = ? WHERE id = ?", $tmp["userid"], $page_form->id); |
| | | $app->db->query("UPDATE dns_rr SET sys_userid = ? WHERE zone = ?", $tmp["userid"], $page_form->id); |
| | | } |
| | | } |
| | | } |
| | |
| | | // make sure that the record belongs to the client group and not the admin group when a dmin inserts it |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($page_form->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE dns_soa SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE id = ".$page_form->id); |
| | | $app->db->query("UPDATE dns_soa SET sys_groupid = ?, sys_perm_group = 'ru' WHERE id = ?", $client_group_id, $page_form->id); |
| | | // And we want to update all rr records too, that belong to this record |
| | | $app->db->query("UPDATE dns_rr SET sys_groupid = $client_group_id WHERE zone = ".$page_form->id); |
| | | $app->db->query("UPDATE dns_rr SET sys_groupid = ? WHERE zone = ?", $client_group_id, $page_form->id); |
| | | } |
| | | if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($page_form->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE dns_soa SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE id = ".$page_form->id); |
| | | $app->db->query("UPDATE dns_soa SET sys_groupid = ?, sys_perm_group = 'riud' WHERE id = ?", $client_group_id, $page_form->id); |
| | | // And we want to update all rr records too, that belong to this record |
| | | $app->db->query("UPDATE dns_rr SET sys_groupid = $client_group_id WHERE zone = ".$page_form->id); |
| | | $app->db->query("UPDATE dns_rr SET sys_groupid = ? WHERE zone = ?", $client_group_id, $page_form->id); |
| | | } |
| | | } |
| | | |
| | |
| | | // also make sure that the user can not delete entry created by an admin |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($page_form->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]); |
| | | $updates = "sys_groupid = $client_group_id, sys_perm_group = 'ru'"; |
| | | $updates = "sys_groupid = ?, sys_perm_group = 'ru'"; |
| | | $update_params = array($client_group_id); |
| | | if ($event_name == 'mail:mail_domain:on_after_update') { |
| | | $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = $client_group_id"); |
| | | $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $client_group_id); |
| | | $client_user_id = ($tmp['userid'] > 0)?$tmp['userid']:1; |
| | | $updates = "sys_userid = $client_user_id, $updates"; |
| | | $updates .= ", sys_userid = ?"; |
| | | $update_params[] = $client_user_id; |
| | | } |
| | | $app->db->query("UPDATE mail_domain SET $updates WHERE domain_id = ".$page_form->id); |
| | | $update_params[] = $page_form->id; |
| | | $app->db->query("UPDATE mail_domain SET " . $updates . " WHERE domain_id = ?", true, $update_params); |
| | | } |
| | | if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($page_form->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]); |
| | | $updates = "sys_groupid = $client_group_id, sys_perm_group = 'riud'"; |
| | | $update_params = array($client_group_id); |
| | | if ($event_name == 'mail:mail_domain:on_after_update') { |
| | | $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = $client_group_id"); |
| | | $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $client_group_id); |
| | | $client_user_id = ($tmp['userid'] > 0)?$tmp['userid']:1; |
| | | $updates = "sys_userid = $client_user_id, $updates"; |
| | | $updates .= ", sys_userid = ?"; |
| | | $update_params[] = $client_user_id; |
| | | } |
| | | $app->db->query("UPDATE mail_domain SET $updates WHERE domain_id = ".$page_form->id); |
| | | $update_params[] = $page_form->id; |
| | | $app->db->query("UPDATE mail_domain SET " . $updates . " WHERE domain_id = ?", true, $update_params); |
| | | } |
| | | |
| | | //** If the domain name or owner has been changed, change the domain and owner in all mailbox records |
| | |
| | | $mail_config = $app->getconf->get_server_config($page_form->dataRecord["server_id"], 'mail'); |
| | | |
| | | //* Update the mailboxes |
| | | $mailusers = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE email like '%@".$app->db->quote($page_form->oldDataRecord['domain'])."'"); |
| | | $mailusers = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE email like ?", "%@" . $page_form->oldDataRecord['domain']); |
| | | $sys_groupid = $app->functions->intval((isset($page_form->dataRecord['client_group_id']))?$page_form->dataRecord['client_group_id']:$page_form->oldDataRecord['sys_groupid']); |
| | | $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = $sys_groupid"); |
| | | $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $sys_groupid); |
| | | $client_user_id = $app->functions->intval(($tmp['userid'] > 0)?$tmp['userid']:1); |
| | | if(is_array($mailusers)) { |
| | | foreach($mailusers as $rec) { |
| | |
| | | $mail_parts = explode("@", $rec['email']); |
| | | $maildir = str_replace("[domain]", $page_form->dataRecord['domain'], $mail_config["maildir_path"]); |
| | | $maildir = str_replace("[localpart]", $mail_parts[0], $maildir); |
| | | $maildir = $app->db->quote($maildir); |
| | | $email = $app->db->quote($mail_parts[0].'@'.$page_form->dataRecord['domain']); |
| | | $app->db->datalogUpdate('mail_user', "maildir = '$maildir', email = '$email', sys_userid = $client_user_id, sys_groupid = '$sys_groupid'", 'mailuser_id', $rec['mailuser_id']); |
| | | $email = $mail_parts[0].'@'.$page_form->dataRecord['domain']; |
| | | $app->db->datalogUpdate('mail_user', array("maildir" => $maildir, "email" => $email, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailuser_id', $rec['mailuser_id']); |
| | | } |
| | | } |
| | | |
| | | //* Update the aliases |
| | | $forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source like '%@".$app->db->quote($page_form->oldDataRecord['domain'])."' OR destination like '%@".$app->db->quote($page_form->oldDataRecord['domain'])."'"); |
| | | $forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source LIKE ? OR destination LIKE ?", "%@" . $page_form->oldDataRecord['domain'], "%@" . $page_form->oldDataRecord['domain']); |
| | | if(is_array($forwardings)) { |
| | | foreach($forwardings as $rec) { |
| | | $destination = $app->db->quote(str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['destination'])); |
| | | $source = $app->db->quote(str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['source'])); |
| | | $app->db->datalogUpdate('mail_forwarding', "source = '$source', destination = '$destination', sys_userid = $client_user_id, sys_groupid = '$sys_groupid'", 'forwarding_id', $rec['forwarding_id']); |
| | | $destination = str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['destination']); |
| | | $source = str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['source']); |
| | | $app->db->datalogUpdate('mail_forwarding', array("source" => $source, "destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'forwarding_id', $rec['forwarding_id']); |
| | | } |
| | | } |
| | | |
| | | //* Update the mailinglist |
| | | $mailing_lists = $app->db->queryAllRecords("SELECT mailinglist_id FROM mail_mailinglist WHERE domain = '".$app->db->quote($page_form->oldDataRecord['domain'])."'"); |
| | | $mailing_lists = $app->db->queryAllRecords("SELECT mailinglist_id FROM mail_mailinglist WHERE domain = ?", $page_form->oldDataRecord['domain']); |
| | | if(is_array($mailing_lists)) { |
| | | foreach($mailing_lists as $rec) { |
| | | $app->db->datalogUpdate('mail_mailinglist', "sys_userid = $client_user_id, sys_groupid = '$sys_groupid'", 'mailinglist_id', $rec['mailinglist_id']); |
| | | $app->db->datalogUpdate('mail_mailinglist', array("sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailinglist_id', $rec['mailinglist_id']); |
| | | } |
| | | } |
| | | |
| | | //* Update the mailget records |
| | | $mail_gets = $app->db->queryAllRecords("SELECT mailget_id, destination FROM mail_get WHERE destination LIKE '%@".$app->db->quote($page_form->oldDataRecord['domain'])."'"); |
| | | $mail_gets = $app->db->queryAllRecords("SELECT mailget_id, destination FROM mail_get WHERE destination LIKE ?", "%@" . $page_form->oldDataRecord['domain']); |
| | | if(is_array($mail_gets)) { |
| | | foreach($mail_gets as $rec) { |
| | | $destination = $app->db->quote(str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['destination'])); |
| | | $app->db->datalogUpdate('mail_get', "destination = '$destination', sys_userid = $client_user_id, sys_groupid = '$sys_groupid'", 'mailget_id', $rec['mailget_id']); |
| | | $destination = str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['destination']); |
| | | $app->db->datalogUpdate('mail_get', array("destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailget_id', $rec['mailget_id']); |
| | | } |
| | | } |
| | | |
| | | if ($page_form->oldDataRecord["domain"] != $page_form->dataRecord['domain']) { |
| | | //* Delete the old spamfilter record |
| | | $tmp = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = '@".$app->db->quote($page_form->oldDataRecord["domain"])."'"); |
| | | $tmp = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", "@" . $page_form->oldDataRecord["domain"]); |
| | | $app->db->datalogDelete('spamfilter_users', 'id', $tmp["id"]); |
| | | unset($tmp); |
| | | } |
| | | $app->db->query("UPDATE spamfilter_users SET email=REPLACE(email, '".$app->db->quote($page_form->oldDataRecord['domain'])."', '".$app->db->quote($page_form->dataRecord['domain'])."'), sys_userid = $client_user_id, sys_groupid = $sys_groupid WHERE email LIKE '%@".$app->db->quote($page_form->oldDataRecord['domain'])."'"); |
| | | $app->db->query("UPDATE spamfilter_users SET email=REPLACE(email, ?, ?), sys_userid = ?, sys_groupid = ? WHERE email LIKE ?", $page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $client_user_id, $sys_groupid, "%@" . $page_form->oldDataRecord['domain']); |
| | | |
| | | } // end if domain name changed |
| | | } |
| | |
| | | function mail_user_filter_edit($event_name, $page_form) { |
| | | global $app, $conf; |
| | | |
| | | $mailuser = $app->db->queryOneRecord("SELECT custom_mailfilter FROM mail_user WHERE mailuser_id = ".$page_form->dataRecord["mailuser_id"]); |
| | | $mailuser = $app->db->queryOneRecord("SELECT custom_mailfilter FROM mail_user WHERE mailuser_id = ?", $page_form->dataRecord["mailuser_id"]); |
| | | $skip = false; |
| | | $lines = explode("\n", $mailuser['custom_mailfilter']); |
| | | $out = ''; |
| | |
| | | $out = $new_rule . $out; |
| | | } |
| | | |
| | | $out = $app->db->quote($out); |
| | | $app->db->datalogUpdate('mail_user', "custom_mailfilter = '$out'", 'mailuser_id', $page_form->dataRecord["mailuser_id"]); |
| | | $app->db->datalogUpdate('mail_user', array("custom_mailfilter" => $out), 'mailuser_id', $page_form->dataRecord["mailuser_id"]); |
| | | |
| | | |
| | | } |
| | |
| | | function mail_user_filter_del($event_name, $page_form) { |
| | | global $app, $conf; |
| | | |
| | | $mailuser = $app->db->queryOneRecord("SELECT custom_mailfilter FROM mail_user WHERE mailuser_id = ".$page_form->dataRecord["mailuser_id"]); |
| | | $mailuser = $app->db->queryOneRecord("SELECT custom_mailfilter FROM mail_user WHERE mailuser_id = ?", $page_form->dataRecord["mailuser_id"]); |
| | | $skip = false; |
| | | $lines = explode("\n", $mailuser['custom_mailfilter']); |
| | | $out = ''; |
| | |
| | | } |
| | | } |
| | | |
| | | $out = $app->db->quote($out); |
| | | $app->db->datalogUpdate('mail_user', "custom_mailfilter = '$out'", 'mailuser_id', $page_form->dataRecord["mailuser_id"]); |
| | | $app->db->datalogUpdate('mail_user', array("custom_mailfilter" => $out), 'mailuser_id', $page_form->dataRecord["mailuser_id"]); |
| | | } |
| | | |
| | | |
| | |
| | | global $app, $conf; |
| | | |
| | | $app->uses("getconf"); |
| | | $mailuser_rec = $app->db->queryOneRecord("SELECT server_id FROM mail_user WHERE mailuser_id = ".$app->functions->intval($page_form->dataRecord["mailuser_id"])); |
| | | $mailuser_rec = $app->db->queryOneRecord("SELECT server_id FROM mail_user WHERE mailuser_id = ?", $page_form->dataRecord["mailuser_id"]); |
| | | $mail_config = $app->getconf->get_server_config($app->functions->intval($mailuser_rec["server_id"]), 'mail'); |
| | | |
| | | if($mail_config['mail_filter_syntax'] == 'sieve') { |
| | |
| | | $content .= '### BEGIN FILTER_ID:'.$page_form->id."\n"; |
| | | |
| | | //$content .= 'require ["fileinto", "regex", "vacation"];'."\n"; |
| | | |
| | | if($page_form->dataRecord["op"] == 'domain') { |
| | | $content .= 'if address :domain :is "'.strtolower($page_form->dataRecord["source"]).'" "'.$page_form->dataRecord["searchterm"].'" {'."\n"; |
| | | } elseif ($page_form->dataRecord["op"] == 'localpart') { |
| | | $content .= 'if address :localpart :is "'.strtolower($page_form->dataRecord["source"]).'" "'.$page_form->dataRecord["searchterm"].'" {'."\n"; |
| | | } elseif ($page_form->dataRecord["source"] == 'Size') { |
| | | if(substr(trim($page_form->dataRecord["searchterm"]),-1) == 'k' || substr(trim($page_form->dataRecord["searchterm"]),-1) == 'K') { |
| | | $unit = 'k'; |
| | | } else { |
| | | $unit = 'm'; |
| | | } |
| | | $content .= 'if size :over '.intval($page_form->dataRecord["searchterm"]).$unit.' {'."\n"; |
| | | } else { |
| | | |
| | | if($page_form->dataRecord["source"] == 'Header') { |
| | | $parts = explode(':',trim($page_form->dataRecord["searchterm"])); |
| | | $page_form->dataRecord["source"] = trim($parts[0]); |
| | | unset($parts[0]); |
| | | $page_form->dataRecord["searchterm"] = trim(implode(':',$parts)); |
| | | unset($parts); |
| | | } |
| | | |
| | | $content .= 'if header :regex ["'.strtolower($page_form->dataRecord["source"]).'"] ["'; |
| | | $content .= 'if header :regex ["'.strtolower($page_form->dataRecord["source"]).'"] ["'; |
| | | |
| | | $searchterm = preg_quote($page_form->dataRecord["searchterm"]); |
| | | $searchterm = str_replace( |
| | | array( |
| | | '"', |
| | | '\\[', |
| | | '\\]' |
| | | ), |
| | | array( |
| | | '\\"', |
| | | '\\\\[', |
| | | '\\\\]' |
| | | ), $searchterm); |
| | | $searchterm = preg_quote($page_form->dataRecord["searchterm"]); |
| | | $searchterm = str_replace( |
| | | array( |
| | | '"', |
| | | '\\[', |
| | | '\\]' |
| | | ), |
| | | array( |
| | | '\\"', |
| | | '\\\\[', |
| | | '\\\\]' |
| | | ), $searchterm); |
| | | |
| | | if($page_form->dataRecord["op"] == 'contains') { |
| | | $content .= ".*".$searchterm; |
| | | } elseif ($page_form->dataRecord["op"] == 'is') { |
| | | $content .= "^".$searchterm."$"; |
| | | } elseif ($page_form->dataRecord["op"] == 'begins') { |
| | | $content .= "^".$searchterm.".*"; |
| | | } elseif ($page_form->dataRecord["op"] == 'ends') { |
| | | $content .= ".*".$searchterm."$"; |
| | | if($page_form->dataRecord["op"] == 'contains') { |
| | | $content .= ".*".$searchterm; |
| | | } elseif ($page_form->dataRecord["op"] == 'is') { |
| | | $content .= "^".$searchterm."$"; |
| | | } elseif ($page_form->dataRecord["op"] == 'begins') { |
| | | $content .= " ".$searchterm.""; |
| | | } elseif ($page_form->dataRecord["op"] == 'ends') { |
| | | $content .= ".*".$searchterm."$"; |
| | | } |
| | | |
| | | $content .= '"] {'."\n"; |
| | | } |
| | | |
| | | $content .= '"] {'."\n"; |
| | | |
| | | if($page_form->dataRecord["action"] == 'move') { |
| | | $content .= ' fileinto "'.$page_form->dataRecord["target"].'";' . "\n"; |
| | | $content .= ' fileinto "'.$page_form->dataRecord["target"].'";' . "\n stop;\n"; |
| | | } elseif ($page_form->dataRecord["action"] == 'keep') { |
| | | $content .= " keep;\n"; |
| | | } elseif ($page_form->dataRecord["action"] == 'stop') { |
| | | $content .= " stop;\n"; |
| | | } elseif ($page_form->dataRecord["action"] == 'reject') { |
| | | $content .= ' reject "'.$page_form->dataRecord["target"].'"; stop;\n\n'; |
| | | } else { |
| | | $content .= " discard;\n"; |
| | | $content .= " discard;\n stop;\n"; |
| | | } |
| | | |
| | | $content .= " stop;\n}\n"; |
| | | $content .= "}\n"; |
| | | |
| | | $content .= '### END FILTER_ID:'.$page_form->id."\n"; |
| | | |
| | |
| | | // also make sure that the user can not delete entry created by an admin |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($page_form->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE web_database_user SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE database_user_id = ".$page_form->id); |
| | | $app->db->query("UPDATE web_database_user SET sys_groupid = ?, sys_perm_group = 'ru' WHERE database_user_id = ?", $client_group_id, $page_form->id); |
| | | } |
| | | if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($page_form->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE web_database_user SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE database_user_id = ".$page_form->id); |
| | | $app->db->query("UPDATE web_database_user SET sys_groupid = ?, sys_perm_group = 'riud' WHERE database_user_id = ?", $client_group_id, $page_form->id); |
| | | } |
| | | //$app->db->query("UPDATE web_database_user SET server_id = '" . $app->functions->intval($conf['server_id']) . "' WHERE database_user_id = ".$page_form->id); |
| | | } |
| | | |
| | | } |
| | |
| | | // also make sure that the user can not delete domain created by a admin |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($page_form->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE web_domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$page_form->id); |
| | | $app->db->query("UPDATE web_domain SET sys_groupid = ?, sys_perm_group = 'ru' WHERE domain_id = ?", $client_group_id, $page_form->id); |
| | | } |
| | | if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($page_form->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE web_domain SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE domain_id = ".$page_form->id); |
| | | $app->db->query("UPDATE web_domain SET sys_groupid = ?, sys_perm_group = 'riud' WHERE domain_id = ?", $client_group_id, $page_form->id); |
| | | } |
| | | // Get configuration for the web system |
| | | $app->uses("getconf"); |
| | |
| | | // get the ID of the client |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) { |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = $client_group_id"); |
| | | $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ?", $client_group_id); |
| | | $client_id = $app->functions->intval($client["client_id"]); |
| | | } elseif (isset($page_form->dataRecord["client_group_id"])) { |
| | | $client_group_id = $page_form->dataRecord["client_group_id"]; |
| | | $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".$app->functions->intval(@$page_form->dataRecord["client_group_id"])); |
| | | $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ?", $app->functions->intval(@$page_form->dataRecord["client_group_id"])); |
| | | $client_id = $app->functions->intval($client["client_id"]); |
| | | } else { |
| | | $client_group_id = $page_form->dataRecord["client_group_id"]; |
| | | $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".$app->functions->intval($page_form->dataRecord["client_group_id"])); |
| | | $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ?", $app->functions->intval($page_form->dataRecord["client_group_id"])); |
| | | $client_id = $app->functions->intval($client["client_id"]); |
| | | } |
| | | |
| | |
| | | $client_user_id = $app->functions->intval(($tmp['userid'] > 0)?$tmp['userid']:1); |
| | | |
| | | // Set the values for document_root, system_user and system_group |
| | | $system_user = $app->db->quote('web'.$page_form->id); |
| | | $system_group = $app->db->quote('client'.$client_id); |
| | | $system_user = 'web'.$page_form->id; |
| | | $system_group = 'client'.$client_id; |
| | | |
| | | $document_root = str_replace("[client_id]", $client_id, $document_root); |
| | | $document_root = str_replace("[client_idhash_1]", $this->id_hash($client_id, 1), $document_root); |
| | | $document_root = str_replace("[client_idhash_2]", $this->id_hash($client_id, 2), $document_root); |
| | | $document_root = str_replace("[client_idhash_3]", $this->id_hash($client_id, 3), $document_root); |
| | | $document_root = str_replace("[client_idhash_4]", $this->id_hash($client_id, 4), $document_root); |
| | | $document_root = $app->db->quote($document_root); |
| | | |
| | | if($event_name == 'sites:web_vhost_domain:on_after_update') { |
| | | if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) && isset($page_form->dataRecord["client_group_id"]) && $page_form->dataRecord["client_group_id"] != $page_form->oldDataRecord["sys_groupid"]) { |
| | | |
| | | $sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root' WHERE domain_id = ".$page_form->id; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE web_domain SET system_user = ?, system_group = ?, document_root = ? WHERE domain_id = ?"; |
| | | $app->db->query($sql, $system_user, $system_group, $document_root, $page_form->id); |
| | | |
| | | // Update the FTP user(s) too |
| | | $records = $app->db->queryAllRecords("SELECT ftp_user_id FROM ftp_user WHERE parent_domain_id = ".$page_form->id); |
| | | $records = $app->db->queryAllRecords("SELECT ftp_user_id FROM ftp_user WHERE parent_domain_id = ?", $page_form->id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('ftp_user', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."', uid = '$system_user', gid = '$system_group', dir = '$document_root'", 'ftp_user_id', $app->functions->intval($rec['ftp_user_id'])); |
| | | $app->db->datalogUpdate('ftp_user', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid'], "uid" => $system_user, "gid" => $system_group, "dir" => $document_root), 'ftp_user_id', $app->functions->intval($rec['ftp_user_id'])); |
| | | } |
| | | unset($records); |
| | | unset($rec); |
| | | |
| | | // Update the webdav user(s) too |
| | | $records = $app->db->queryAllRecords("SELECT webdav_user_id FROM webdav_user WHERE parent_domain_id = ".$page_form->id); |
| | | $records = $app->db->queryAllRecords("SELECT webdav_user_id FROM webdav_user WHERE parent_domain_id = ?", $page_form->id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('webdav_user', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'webdav_user_id', $app->functions->intval($rec['webdav_user_id'])); |
| | | $app->db->datalogUpdate('webdav_user', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'webdav_user_id', $app->functions->intval($rec['webdav_user_id'])); |
| | | } |
| | | unset($records); |
| | | unset($rec); |
| | | |
| | | // Update the web folder(s) too |
| | | $records = $app->db->queryAllRecords("SELECT web_folder_id FROM web_folder WHERE parent_domain_id = ".$page_form->id); |
| | | $records = $app->db->queryAllRecords("SELECT web_folder_id FROM web_folder WHERE parent_domain_id = ?", $page_form->id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('web_folder', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'web_folder_id', $app->functions->intval($rec['web_folder_id'])); |
| | | $app->db->datalogUpdate('web_folder', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'web_folder_id', $app->functions->intval($rec['web_folder_id'])); |
| | | } |
| | | unset($records); |
| | | unset($rec); |
| | | |
| | | //* Update all web folder users |
| | | $records = $app->db->queryAllRecords("SELECT web_folder_user.web_folder_user_id FROM web_folder_user, web_folder WHERE web_folder_user.web_folder_id = web_folder.web_folder_id AND web_folder.parent_domain_id = ".$page_form->id); |
| | | $records = $app->db->queryAllRecords("SELECT web_folder_user.web_folder_user_id FROM web_folder_user, web_folder WHERE web_folder_user.web_folder_id = web_folder.web_folder_id AND web_folder.parent_domain_id = ?", $page_form->id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('web_folder_user', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'web_folder_user_id', $app->functions->intval($rec['web_folder_user_id'])); |
| | | $app->db->datalogUpdate('web_folder_user', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'web_folder_user_id', $app->functions->intval($rec['web_folder_user_id'])); |
| | | } |
| | | unset($records); |
| | | unset($rec); |
| | | |
| | | // Update the Shell user(s) too |
| | | $records = $app->db->queryAllRecords("SELECT shell_user_id FROM shell_user WHERE parent_domain_id = ".$page_form->id); |
| | | $records = $app->db->queryAllRecords("SELECT shell_user_id FROM shell_user WHERE parent_domain_id = ?", $page_form->id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('shell_user', "sys_userid = '".$web_rec['sys_userid']."', sys_groupid = '".$web_rec['sys_groupid']."', puser = '$system_user', pgroup = '$system_group', dir = '$document_root'", 'shell_user_id', $app->functions->intval($rec['shell_user_id'])); |
| | | $app->db->datalogUpdate('shell_user', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid'], "puser" => $system_user, "pgroup" => $system_group, "dir" => $document_root), 'shell_user_id', $app->functions->intval($rec['shell_user_id'])); |
| | | } |
| | | unset($records); |
| | | unset($rec); |
| | | |
| | | // Update the cron(s) too |
| | | $records = $app->db->queryAllRecords("SELECT id FROM cron WHERE parent_domain_id = ".$page_form->id); |
| | | $records = $app->db->queryAllRecords("SELECT id FROM cron WHERE parent_domain_id = ?", $page_form->id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('cron', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'id', $app->functions->intval($rec['id'])); |
| | | $app->db->datalogUpdate('cron', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'id', $app->functions->intval($rec['id'])); |
| | | } |
| | | unset($records); |
| | | unset($rec); |
| | | |
| | | //* Update all subdomains and alias domains |
| | | $records = $app->db->queryAllRecords("SELECT domain_id, `domain`, `type`, `web_folder` FROM web_domain WHERE parent_domain_id = ".$page_form->id); |
| | | $records = $app->db->queryAllRecords("SELECT domain_id, `domain`, `type`, `web_folder` FROM web_domain WHERE parent_domain_id = ?", $page_form->id); |
| | | foreach($records as $rec) { |
| | | $update_columns = "sys_userid = '".$web_rec['sys_userid']."', sys_groupid = '".$web_rec['sys_groupid']."'"; |
| | | $update_columns = array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']); |
| | | if($rec['type'] == 'vhostsubdomain' || $rec['type'] == 'vhostalias') { |
| | | $php_open_basedir = str_replace("[website_path]/web", $document_root.'/'.$rec['web_folder'], $web_config["php_open_basedir"]); |
| | | $php_open_basedir = str_replace("[website_domain]/web", $rec['domain'].'/'.$rec['web_folder'], $php_open_basedir); |
| | | $php_open_basedir = str_replace("[website_path]", $document_root, $php_open_basedir); |
| | | $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $rec['domain'], $php_open_basedir)); |
| | | $php_open_basedir = str_replace("[website_domain]", $rec['domain'], $php_open_basedir); |
| | | |
| | | $update_columns .= ", document_root = '".$document_root."', `php_open_basedir` = '".$php_open_basedir."'"; |
| | | $update_columns["document_root"] = $document_root; |
| | | $update_columns["php_open_basedir"] = $php_open_basedir; |
| | | } |
| | | $app->db->datalogUpdate('web_domain', $update_columns, 'domain_id', $rec['domain_id']); |
| | | } |
| | |
| | | unset($rec); |
| | | |
| | | //* Update all databases |
| | | $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE parent_domain_id = ".$page_form->id); |
| | | $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE parent_domain_id = ?", $page_form->id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('web_database', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'database_id', $app->functions->intval($rec['database_id'])); |
| | | $app->db->datalogUpdate('web_database', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'database_id', $app->functions->intval($rec['database_id'])); |
| | | } |
| | | |
| | | //* Update all database users |
| | | $records = $app->db->queryAllRecords("SELECT web_database_user.database_user_id FROM web_database_user, web_database WHERE web_database_user.database_user_id IN (web_database.database_user_id, web_database.database_ro_user_id) AND web_database.parent_domain_id = ".$page_form->id); |
| | | $records = $app->db->queryAllRecords("SELECT web_database_user.database_user_id FROM web_database_user, web_database WHERE web_database_user.database_user_id IN (web_database.database_user_id, web_database.database_ro_user_id) AND web_database.parent_domain_id = ?", $page_form->id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('web_database_user', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'database_user_id', $app->functions->intval($rec['database_user_id'])); |
| | | $app->db->datalogUpdate('web_database_user', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'database_user_id', $app->functions->intval($rec['database_user_id'])); |
| | | } |
| | | unset($records); |
| | | unset($rec); |
| | | |
| | | // Update APS instances |
| | | $records = $app->db->queryAllRecords("SELECT instance_id FROM aps_instances_settings WHERE name = 'main_domain' AND value = '".$app->db->quote($page_form->oldDataRecord["domain"])."'"); |
| | | $records = $app->db->queryAllRecords("SELECT instance_id FROM aps_instances_settings WHERE name = 'main_domain' AND value = ?", $page_form->oldDataRecord["domain"]); |
| | | if(is_array($records) && !empty($records)){ |
| | | foreach($records as $rec){ |
| | | $app->db->datalogUpdate('aps_instances', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."', customer_id = '".$app->functions->intval($client_id)."'", 'id', $rec['instance_id']); |
| | | $app->db->datalogUpdate('aps_instances', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid'], "customer_id" => $client_id), 'id', $rec['instance_id']); |
| | | } |
| | | } |
| | | unset($records); |
| | |
| | | |
| | | //* If the domain name has been changed, we will have to change all subdomains + APS instances |
| | | if(!empty($page_form->dataRecord["domain"]) && !empty($page_form->oldDataRecord["domain"]) && $page_form->dataRecord["domain"] != $page_form->oldDataRecord["domain"]) { |
| | | $records = $app->db->queryAllRecords("SELECT domain_id,domain FROM web_domain WHERE (type = 'subdomain' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND domain LIKE '%.".$app->db->quote($page_form->oldDataRecord["domain"])."'"); |
| | | $records = $app->db->queryAllRecords("SELECT domain_id,domain FROM web_domain WHERE (type = 'subdomain' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND domain LIKE ?", "%." . $page_form->oldDataRecord["domain"]); |
| | | foreach($records as $rec) { |
| | | $subdomain = $app->db->quote(str_replace($page_form->oldDataRecord["domain"], $page_form->dataRecord["domain"], $rec['domain'])); |
| | | $app->db->datalogUpdate('web_domain', "domain = '".$subdomain."'", 'domain_id', $rec['domain_id']); |
| | | $subdomain = str_replace($page_form->oldDataRecord["domain"], $page_form->dataRecord["domain"], $rec['domain']); |
| | | $app->db->datalogUpdate('web_domain', array("domain" => $subdomain), 'domain_id', $rec['domain_id']); |
| | | } |
| | | unset($records); |
| | | unset($rec); |
| | | unset($subdomain); |
| | | |
| | | // Update APS instances |
| | | $records = $app->db->queryAllRecords("SELECT id, instance_id FROM aps_instances_settings WHERE name = 'main_domain' AND value = '".$app->db->quote($page_form->oldDataRecord["domain"])."'"); |
| | | $records = $app->db->queryAllRecords("SELECT id, instance_id FROM aps_instances_settings WHERE name = 'main_domain' AND value = ?", $page_form->oldDataRecord["domain"]); |
| | | if(is_array($records) && !empty($records)){ |
| | | foreach($records as $rec){ |
| | | $app->db->datalogUpdate('aps_instances_settings', "value = '".$app->db->quote($page_form->dataRecord["domain"])."'", 'id', $rec['id']); |
| | | // Reinstall of package needed? |
| | | //$app->db->datalogUpdate('aps_instances', "instance_status = '1'", 'id', $rec['instance_id']); |
| | | $app->db->datalogUpdate('aps_instances_settings', array("value" => $page_form->dataRecord["domain"]), 'id', $rec['id']); |
| | | } |
| | | } |
| | | unset($records); |
| | |
| | | |
| | | //* Set allow_override if empty |
| | | if($web_rec['allow_override'] == '') { |
| | | $sql = "UPDATE web_domain SET allow_override = '".$app->db->quote($web_config["htaccess_allow_override"])."' WHERE domain_id = ".$page_form->id; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE web_domain SET allow_override = ? WHERE domain_id = ?"; |
| | | $app->db->query($sql, $web_config["htaccess_allow_override"], $page_form->id); |
| | | } |
| | | |
| | | //* Set php_open_basedir if empty or domain or client has been changed |
| | | if(empty($web_rec['php_open_basedir']) || |
| | | (!empty($page_form->dataRecord["domain"]) && !empty($page_form->oldDataRecord["domain"]) && $page_form->dataRecord["domain"] != $page_form->oldDataRecord["domain"])) { |
| | | $php_open_basedir = $web_rec['php_open_basedir']; |
| | | $php_open_basedir = $app->db->quote(str_replace($page_form->oldDataRecord['domain'], $web_rec['domain'], $php_open_basedir)); |
| | | $sql = "UPDATE web_domain SET php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$page_form->id; |
| | | $app->db->query($sql); |
| | | $php_open_basedir = str_replace($page_form->oldDataRecord['domain'], $web_rec['domain'], $php_open_basedir); |
| | | $sql = "UPDATE web_domain SET php_open_basedir = ? WHERE domain_id = ?"; |
| | | $app->db->query($sql, $php_open_basedir, $page_form->id); |
| | | } |
| | | if(empty($web_rec['php_open_basedir']) || |
| | | (isset($page_form->dataRecord["client_group_id"]) && $page_form->dataRecord["client_group_id"] != $page_form->oldDataRecord["sys_groupid"])) { |
| | | $document_root = $app->db->quote(str_replace("[client_id]", $client_id, $document_root)); |
| | | $document_root = str_replace("[client_id]", $client_id, $document_root); |
| | | $php_open_basedir = str_replace("[website_path]", $document_root, $web_config["php_open_basedir"]); |
| | | $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir)); |
| | | $sql = "UPDATE web_domain SET php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$page_form->id; |
| | | $app->db->query($sql); |
| | | $php_open_basedir = str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir); |
| | | $sql = "UPDATE web_domain SET php_open_basedir = ? WHERE domain_id = ?"; |
| | | $app->db->query($sql, $php_open_basedir, $page_form->id); |
| | | } |
| | | |
| | | //* Change database backup options when web backup options have been changed |
| | | if(isset($page_form->dataRecord['backup_interval']) && ($page_form->dataRecord['backup_interval'] != $page_form->oldDataRecord['backup_interval'] || $page_form->dataRecord['backup_copies'] != $page_form->oldDataRecord['backup_copies'])) { |
| | | //* Update all databases |
| | | $backup_interval = $app->db->quote($page_form->dataRecord['backup_interval']); |
| | | $backup_interval = $page_form->dataRecord['backup_interval']; |
| | | $backup_copies = $app->functions->intval($page_form->dataRecord['backup_copies']); |
| | | $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE parent_domain_id = ".$page_form->id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('web_database', "backup_interval = '$backup_interval', backup_copies = '$backup_copies'", 'database_id', $rec['database_id']); |
| | | $app->db->datalogUpdate('web_database', array("backup_interval" => $backup_interval, "backup_copies" => $backup_copies), 'database_id', $rec['database_id']); |
| | | } |
| | | unset($records); |
| | | unset($rec); |
| | |
| | | |
| | | //* Change vhost subdomain and alias ip/ipv6 if domain ip/ipv6 has changed |
| | | if(isset($page_form->dataRecord['ip_address']) && ($page_form->dataRecord['ip_address'] != $page_form->oldDataRecord['ip_address'] || $page_form->dataRecord['ipv6_address'] != $page_form->oldDataRecord['ipv6_address'])) { |
| | | $records = $app->db->queryAllRecords("SELECT domain_id FROM web_domain WHERE (type = 'vhostsubdomain' OR type = 'vhostalias') AND parent_domain_id = ".$page_form->id); |
| | | $records = $app->db->queryAllRecords("SELECT domain_id FROM web_domain WHERE (type = 'vhostsubdomain' OR type = 'vhostalias') AND parent_domain_id = ?", $page_form->id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogUpdate('web_domain', "ip_address = '".$app->db->quote($web_rec['ip_address'])."', ipv6_address = '".$app->db->quote($web_rec['ipv6_address'])."'", 'domain_id', $rec['domain_id']); |
| | | $app->db->datalogUpdate('web_domain', array("ip_address" => $web_rec['ip_address'], "ipv6_address" => $web_rec['ipv6_address']), 'domain_id', $rec['domain_id']); |
| | | } |
| | | unset($records); |
| | | unset($rec); |
| | | } |
| | | } else { |
| | | $php_open_basedir = str_replace("[website_path]", $document_root, $web_config["php_open_basedir"]); |
| | | $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $page_form->dataRecord['domain'], $php_open_basedir)); |
| | | |
| | | $htaccess_allow_override = $app->db->quote($web_config["htaccess_allow_override"]); |
| | | $sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$page_form->id; |
| | | $app->db->query($sql); |
| | | $php_open_basedir = str_replace("[website_domain]", $page_form->dataRecord['domain'], $php_open_basedir); |
| | | $htaccess_allow_override = $web_config["htaccess_allow_override"]; |
| | | |
| | | $sql = "UPDATE web_domain SET system_user = ?, system_group = ?, document_root = ?, allow_override = ?, php_open_basedir = ? WHERE domain_id = ?"; |
| | | $app->db->query($sql, $system_user, $system_group, $document_root, $htaccess_allow_override, $php_open_basedir, $page_form->id); |
| | | } |
| | | } else { |
| | | if(isset($page_form->dataRecord["parent_domain_id"]) && $page_form->dataRecord["parent_domain_id"] != $page_form->oldDataRecord["parent_domain_id"]) { |
| | | $parent_domain = $app->db->queryOneRecord("SELECT * FROM `web_domain` WHERE `domain_id` = '" . $app->functions->intval($page_form->dataRecord['parent_domain_id']) . "'"); |
| | | $parent_domain = $app->db->queryOneRecord("SELECT * FROM `web_domain` WHERE `domain_id` = ?", $page_form->dataRecord['parent_domain_id']); |
| | | |
| | | // Set the values for document_root, system_user and system_group |
| | | $system_user = $app->db->quote($parent_domain['system_user']); |
| | | $system_group = $app->db->quote($parent_domain['system_group']); |
| | | $document_root = $app->db->quote($parent_domain['document_root']); |
| | | $system_user = $parent_domain['system_user']; |
| | | $system_group = $parent_domain['system_group']; |
| | | $document_root = $parent_domain['document_root']; |
| | | $php_open_basedir = str_replace("[website_path]/web", $document_root.'/'.$page_form->dataRecord['web_folder'], $web_config["php_open_basedir"]); |
| | | $php_open_basedir = str_replace("[website_domain]/web", $page_form->dataRecord['domain'].'/'.$page_form->dataRecord['web_folder'], $php_open_basedir); |
| | | $php_open_basedir = str_replace("[website_path]", $document_root, $php_open_basedir); |
| | | $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $page_form->dataRecord['domain'], $php_open_basedir)); |
| | | $htaccess_allow_override = $app->db->quote($parent_domain['allow_override']); |
| | | $sql = "UPDATE web_domain SET sys_groupid = ".$app->functions->intval($parent_domain['sys_groupid']).",system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$page_form->id; |
| | | $app->db->query($sql); |
| | | $php_open_basedir = str_replace("[website_domain]", $page_form->dataRecord['domain'], $php_open_basedir); |
| | | $htaccess_allow_override = $parent_domain['allow_override']; |
| | | $sql = "UPDATE web_domain SET sys_groupid = ?,system_user = ?, system_group = ?, document_root = ?, allow_override = ?, php_open_basedir = ? WHERE domain_id = ?"; |
| | | $app->db->query($sql, $parent_domain['sys_groupid'], $system_user, $system_group, $document_root, $htaccess_allow_override, $php_open_basedir, $page_form->id); |
| | | } |
| | | } |
| | | } |
| | |
| | | // also make sure that the user can not delete domain created by a admin |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE openvz_vm SET sys_groupid = $client_group_id WHERE vm_id = ".$this->id); |
| | | $app->db->query("UPDATE openvz_vm SET sys_groupid = ? WHERE vm_id = ?", $client_group_id, $this->id); |
| | | } |
| | | if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE openvz_vm SET sys_groupid = $client_group_id WHERE vm_id = ".$this->id); |
| | | $app->db->query("UPDATE openvz_vm SET sys_groupid = ? WHERE vm_id = ?", $client_group_id, $this->id); |
| | | } |
| | | |
| | | // Set the VEID |
| | | $tmp = $app->db->queryOneRecord('SELECT MAX(veid) + 1 as newveid FROM openvz_vm'); |
| | | $veid = ($tmp['newveid'] > 100)?$tmp['newveid']:101; |
| | | $app->db->query("UPDATE openvz_vm SET veid = ".$veid." WHERE vm_id = ".$this->id); |
| | | $app->db->query("UPDATE openvz_vm SET veid = ? WHERE vm_id = ?", $veid, $this->id); |
| | | unset($tmp); |
| | | |
| | | // Apply template values to the advanced tab settings |
| | | $this->applyTemplate(); |
| | | |
| | | // Set the IP address |
| | | $app->db->query("UPDATE openvz_ip SET vm_id = ".$this->id." WHERE ip_address = '".$app->db->quote($this->dataRecord['ip_address'])."'"); |
| | | $app->db->query("UPDATE openvz_ip SET vm_id = ? WHERE ip_address = ?", $this->id, $this->dataRecord['ip_address']); |
| | | |
| | | // Create the OpenVZ config file and store it in config field |
| | | $this->makeOpenVZConfig(); |
| | |
| | | // also make sure that the user can not delete domain created by a admin |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE openvz_vm SET sys_groupid = $client_group_id WHERE vm_id = ".$this->id); |
| | | $app->db->query("UPDATE openvz_vm SET sys_groupid = ? WHERE vm_id = ?", $client_group_id, $this->id); |
| | | } |
| | | if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE openvz_vm SET sys_groupid = $client_group_id WHERE vm_id = ".$this->id); |
| | | $app->db->query("UPDATE openvz_vm SET sys_groupid = ? WHERE vm_id = ?", $client_group_id, $this->id); |
| | | } |
| | | |
| | | if(isset($this->dataRecord["ostemplate_id"]) && $this->oldDataRecord["ostemplate_id"] != $this->dataRecord["ostemplate_id"]) { |
| | |
| | | } |
| | | |
| | | // Set the IP address |
| | | if(isset($this->dataRecord['ip_address'])) $app->db->query("UPDATE openvz_ip SET vm_id = ".$this->id." WHERE ip_address = '".$app->db->quote($this->dataRecord['ip_address'])."'"); |
| | | if(isset($this->dataRecord['ip_address'])) $app->db->query("UPDATE openvz_ip SET vm_id = ? WHERE ip_address = ?", $this->id, $this->dataRecord['ip_address']); |
| | | |
| | | // Create the OpenVZ config file and store it in config field |
| | | $this->makeOpenVZConfig(); |
| | |
| | | global $app, $conf; |
| | | |
| | | //* Free the IP address |
| | | $tmp = $app->db->queryOneRecord("SELECT ip_address_id FROM openvz_ip WHERE vm_id = ".$app->functions->intval($page_form->id)); |
| | | $app->db->datalogUpdate('openvz_ip', 'vm_id = 0', 'ip_address_id', $tmp['ip_address_id']); |
| | | $tmp = $app->db->queryOneRecord("SELECT ip_address_id FROM openvz_ip WHERE vm_id = ?", $page_form->id); |
| | | $app->db->datalogUpdate('openvz_ip', array('vm_id' => 0), 'ip_address_id', $tmp['ip_address_id']); |
| | | unset($tmp); |
| | | |
| | | } |
| | |
| | | private function applyTemplate() { |
| | | global $app, $conf; |
| | | |
| | | $tpl = $app->db->queryOneRecord("SELECT * FROM openvz_template WHERE template_id = ".$app->functions->intval($this->dataRecord["template_id"])); |
| | | $tpl = $app->db->queryOneRecord("SELECT * FROM openvz_template WHERE template_id = ?", $this->dataRecord["template_id"]); |
| | | |
| | | $sql = "UPDATE openvz_vm SET "; |
| | | $sql .= "diskspace = '".$app->db->quote($tpl['diskspace'])."', "; |
| | | $sql .= "ram = '".$app->db->quote($tpl['ram'])."', "; |
| | | $sql .= "ram_burst = '".$app->db->quote($tpl['ram_burst'])."', "; |
| | | $sql .= "cpu_units = '".$app->db->quote($tpl['cpu_units'])."', "; |
| | | $sql .= "cpu_num = '".$app->db->quote($tpl['cpu_num'])."', "; |
| | | $sql .= "cpu_limit = '".$app->db->quote($tpl['cpu_limit'])."', "; |
| | | $sql .= "io_priority = '".$app->db->quote($tpl['io_priority'])."', "; |
| | | $sql .= "nameserver = '".$app->db->quote($tpl['nameserver'])."', "; |
| | | $sql .= "create_dns = '".$app->db->quote($tpl['create_dns'])."', "; |
| | | $sql .= "capability = '".$app->db->quote($tpl['capability'])."' "; |
| | | $sql .= "WHERE vm_id = ".$app->functions->intval($this->id); |
| | | $app->db->query($sql); |
| | | $sql .= "diskspace = ?, "; |
| | | $sql .= "ram = ?, "; |
| | | $sql .= "ram_burst = ?, "; |
| | | $sql .= "cpu_units = ?, "; |
| | | $sql .= "cpu_num = ?, "; |
| | | $sql .= "cpu_limit = ?, "; |
| | | $sql .= "io_priority = ?, "; |
| | | $sql .= "nameserver = ?, "; |
| | | $sql .= "create_dns = ?, "; |
| | | $sql .= "capability = ?, "; |
| | | $sql .= "features = ?, "; |
| | | $sql .= "iptables = ? "; |
| | | $sql .= "WHERE vm_id = ?"; |
| | | $app->db->query($sql, $tpl['diskspace'], $tpl['ram'], $tpl['ram_burst'], $tpl['cpu_units'], $tpl['cpu_num'], $tpl['cpu_limit'], $tpl['io_priority'], $tpl['nameserver'], $tpl['create_dns'], $tpl['capability'], $tpl['features'], $tpl['iptables'], $this->id); |
| | | |
| | | } |
| | | |
| | | private function makeOpenVZConfig() { |
| | | global $app, $conf; |
| | | |
| | | $vm = $app->db->queryOneRecord("SELECT * FROM openvz_vm WHERE vm_id = ".$app->functions->intval($this->id)); |
| | | $vm_template = $app->db->queryOneRecord("SELECT * FROM openvz_template WHERE template_id = ".$app->functions->intval($vm['template_id'])); |
| | | $vm = $app->db->queryOneRecord("SELECT * FROM openvz_vm WHERE vm_id = ?",$app->functions->intval($this->id)); |
| | | $vm_template = $app->db->queryOneRecord("SELECT * FROM openvz_template WHERE template_id = ?",$app->functions->intval($vm['template_id'])); |
| | | $burst_ram = $vm['ram_burst']*256; |
| | | $guar_ram = $vm['ram']*256; |
| | | |
| | |
| | | $tpl->setVar('ip_address', $vm['ip_address']); |
| | | $tpl->setVar('nameserver', $vm['nameserver']); |
| | | $tpl->setVar('capability', $vm['capability']); |
| | | $tpl->setVar('features', $vm['features']); |
| | | $tpl->setVar('iptables', $vm['iptables']); |
| | | |
| | | $tmp = $app->db->queryOneRecord("SELECT template_file FROM openvz_ostemplate WHERE ostemplate_id = ".$app->functions->intval($vm['ostemplate_id'])); |
| | | $tmp = $app->db->queryOneRecord("SELECT template_file FROM openvz_ostemplate WHERE ostemplate_id = ?", $app->functions->intval($vm['ostemplate_id'])); |
| | | $tpl->setVar('ostemplate', $tmp['template_file']); |
| | | unset($tmp); |
| | | |
| | | $openvz_config = $app->db->quote($tpl->grab()); |
| | | $app->db->query("UPDATE openvz_vm SET config = '".$openvz_config."' WHERE vm_id = ".$app->functions->intval($this->id)); |
| | | $openvz_config = $tpl->grab(); |
| | | $app->db->query("UPDATE openvz_vm SET config = ? WHERE vm_id = ?", $openvz_config, $app->functions->intval($this->id)); |
| | | |
| | | unset($tpl); |
| | | |
| | |
| | | private function createDNS() { |
| | | global $app, $conf; |
| | | |
| | | $vm = $app->db->queryOneRecord("SELECT * FROM openvz_vm WHERE vm_id = ".$app->functions->intval($this->id)); |
| | | $vm = $app->db->queryOneRecord("SELECT * FROM openvz_vm WHERE vm_id = ?", $app->functions->intval($this->id)); |
| | | |
| | | if($vm['create_dns'] != 'y') return; |
| | | |
| | | $full_hostname = str_replace('{VEID}', $vm['veid'], $vm['hostname']); |
| | | $hostname_parts = explode('.', $full_hostname); |
| | | $hostname = $app->db->quote($hostname_parts[0]); |
| | | $hostname = $hostname_parts[0]; |
| | | unset($hostname_parts[0]); |
| | | $zone = $app->db->quote((implode('.', $hostname_parts))); |
| | | $zone = implode('.', $hostname_parts); |
| | | unset($hostname_parts); |
| | | |
| | | // Find the dns zone |
| | | $zone_rec = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE origin = '".$app->db->quote($zone).".'"); |
| | | $rr_rec = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = '".$app->functions->intval($zone_rec['id'])."' AND name = '".$app->db->quote($hostname)."'"); |
| | | $zone_rec = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE origin = ?", $zone); |
| | | $rr_rec = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND name = ?", $zone_rec['id'], $hostname); |
| | | |
| | | if($zone_rec['id'] > 0) { |
| | | $ip_address = $app->db->quote($vm['ip_address']); |
| | | $ip_address = $vm['ip_address']; |
| | | $sys_userid = $app->functions->intval($zone_rec['sys_userid']); |
| | | $sys_groupid = $app->functions->intval($zone_rec['sys_groupid']); |
| | | $server_id = $app->functions->intval($zone_rec['server_id']); |
| | |
| | | |
| | | if($rr_rec['id'] > 0) { |
| | | $app->uses('validate_dns'); |
| | | $app->db->datalogUpdate('dns_rr', "data = '$ip_address'", 'id', $app->functions->intval($rr_rec['id'])); |
| | | $app->db->datalogUpdate('dns_rr', array("data" => $ip_address), 'id', $app->functions->intval($rr_rec['id'])); |
| | | $serial = $app->validate_dns->increase_serial($zone_rec['serial']); |
| | | $app->db->datalogUpdate('dns_soa', "serial = '$serial'", 'id', $app->functions->intval($zone_rec['id'])); |
| | | $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $app->functions->intval($zone_rec['id'])); |
| | | } else { |
| | | $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `zone`, `name`, `type`, `data`, `aux`, `ttl`, `active`) VALUES |
| | | ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$dns_soa_id', '$hostname', 'A', '$ip_address', '0', '3600', 'Y')"; |
| | | $insert_data = array( |
| | | "sys_userid" => $sys_userid, |
| | | "sys_groupid" => $sys_groupid, |
| | | "sys_perm_user" => 'riud', |
| | | "sys_perm_group" => 'riud', |
| | | "sys_perm_other" => '', |
| | | "server_id" => $server_id, |
| | | "zone" => $dns_soa_id, |
| | | "name" => $hostname, |
| | | "type" => 'A', |
| | | "data" => $ip_address, |
| | | "aux" => '0', |
| | | "ttl" => '3600', |
| | | "active" => 'Y' |
| | | ); |
| | | $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); |
| | | } |
| | | |
| | |
| | | //* Check if the server has been changed |
| | | // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { |
| | | $rec = $app->db->queryOneRecord("SELECT server_id from firewall WHERE firewall_id = ".$this->id); |
| | | $rec = $app->db->queryOneRecord("SELECT server_id from firewall WHERE firewall_id = ?", $this->id); |
| | | if($rec['server_id'] != $this->dataRecord["server_id"]) { |
| | | //* Add a error message and switch back to old server |
| | | $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); |
| | |
| | | 'maxlength' => '255', |
| | | 'searchable' => 2 |
| | | ), |
| | | 'customer_viewable' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'active' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'required_php_snippets' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOXARRAY', |
| | | 'default' => '', |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => "SELECT directive_snippets_id,name FROM directive_snippets WHERE type = 'php' AND active = 'y'ORDER BY name", |
| | | 'keyfield' => 'directive_snippets_id', |
| | | 'valuefield' => 'name' |
| | | ), |
| | | 'separator' => ',', |
| | | ), |
| | | //################################# |
| | | // ENDE Datatable fields |
| | | //################################# |
| | |
| | | 'default' => '0', |
| | | 'value' => array(0 => 0, 1 => 1) |
| | | ), |
| | | 'xmpp_server' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => '0', |
| | | 'value' => array(0 => 0, 1 => 1) |
| | | ), |
| | | 'mirror_server_id' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | |
| | | 'backup_dir_is_mount' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'default' => 'y', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'backup_mode' => array( |
| | |
| | | 'width' => '40', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'maildir_format' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '20', |
| | | 'value' => array('maildir' => 'Maildir', 'mdbox' => 'mdbox') |
| | | ), |
| | | 'homedir_path' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | |
| | | 'dkim_strength' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '1024', |
| | | 'value' => array('1024' => 'normal (1024)', '2048' => 'strong (2048)', '4096' => 'very strong (4096)') |
| | | 'default' => '2048', |
| | | 'value' => array('1024' => 'weak (1024)', '2048' => 'normal (2048)', '4096' => 'strong (4096)') |
| | | ), |
| | | 'relayhost_password' => array( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'value' => '', |
| | | 'width' => '40', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'reject_sender_login_mismatch' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'mailbox_size_limit' => array( |
| | | 'datatype' => 'INTEGER', |
| | |
| | | 'width' => '40', |
| | | 'maxlength' => '255' |
| | | ), |
| | | /* |
| | | 'vhost_rewrite_v6' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | */ |
| | | 'vhost_rewrite_v6' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n',1 => 'y') |
| | | ), |
| | | 'vhost_conf_dir' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => 'fast-cgi', |
| | | 'value' => array('no' => 'disabled_txt', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM'), |
| | | 'value' => array('no' => 'disabled_txt', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM', 'hhvm' => 'HHVM'), |
| | | 'searchable' => 2 |
| | | ), |
| | | 'nginx_cgi_socket' => array( |
| | |
| | | 'value' => '', |
| | | 'width' => '40', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'enable_spdy' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'y', |
| | | 'value' => array ( |
| | | 0 => 'n', |
| | | 1 => 'y' |
| | | ) |
| | | ), |
| | | 'apps_vhost_port' => array( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | ); |
| | | |
| | | |
| | | $form["tabs"]['xmpp'] = array( |
| | | 'title' => "XMPP", |
| | | 'width' => 80, |
| | | 'template' => "templates/server_config_xmpp_edit.htm", |
| | | 'fields' => array( |
| | | //################################# |
| | | // Begin Datatable fields |
| | | //################################# |
| | | 'xmpp_use_ipv6' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'xmpp_bosh_max_inactivity' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '30', |
| | | 'validators' => array(0 => array('type' => 'ISINT', |
| | | 'errmsg' => 'ip_address_error_wrong'), |
| | | array('type'=>'RANGE', 'range'=>'15:360', 'errmsg' => 'xmpp_bosh_timeout_range_wrong') |
| | | ), |
| | | 'value' => '', |
| | | 'width' => '15' |
| | | ), |
| | | |
| | | 'xmpp_server_admins' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => 'admin@service.com, superuser@service.com', |
| | | 'value' => '', |
| | | 'width' => '15' |
| | | ), |
| | | |
| | | 'xmpp_modules_enabled' => array( |
| | | 'datatype' => 'TEXT', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => "saslauth, tls, dialback, disco, discoitems, version, uptime, time, ping, admin_adhoc, admin_telnet, bosh, posix, announce, offline, webpresence, mam, stream_management, message_carbons", |
| | | 'value' => '', |
| | | 'separator' => "," |
| | | ), |
| | | |
| | | 'xmpp_port_http' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '5290', |
| | | 'validators' => array(0 => array('type' => 'ISINT')), |
| | | 'value' => '5290', |
| | | 'width' => '15' |
| | | ), |
| | | 'xmpp_port_https' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '5291', |
| | | 'validators' => array(0 => array('type' => 'ISINT')), |
| | | 'value' => '5291', |
| | | 'width' => '15' |
| | | ), |
| | | 'xmpp_port_pastebin' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '5292', |
| | | 'validators' => array(0 => array('type' => 'ISINT')), |
| | | 'value' => '5292', |
| | | 'width' => '15' |
| | | ), |
| | | 'xmpp_port_bosh' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '5280', |
| | | 'validators' => array(0 => array('type' => 'ISINT')), |
| | | 'value' => '5280', |
| | | 'width' => '15' |
| | | ), |
| | | //################################# |
| | | // ENDE Datatable fields |
| | | //################################# |
| | | ) |
| | | ); |
| | | |
| | | $form["tabs"]['jailkit'] = array( |
| | | 'title' => "Jailkit", |
| | | 'width' => 80, |
| | |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'backups_include_into_web_quota' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'reseller_can_use_options' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | |
| | | 'maxlength' => '2', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'lost_password_function' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'regex' => '', |
| | | 'errmsg' => '', |
| | | 'default' => 1, |
| | | 'value' => array(0 => 0, 1 => 1), |
| | | 'separator' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ) |
| | | //################################# |
| | | // ENDE Datenbankfelder |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Module'; |
| | | $wb['maildir_path_txt'] = 'Maildir Path'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Homedir Path'; |
| | | $wb['mailuser_uid_txt'] = 'Mailuser UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailuser GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'IP Address'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Модул'; |
| | | $wb['maildir_path_txt'] = 'Maildir Path'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Homedir Path'; |
| | | $wb['mailuser_uid_txt'] = 'Mailuser UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailuser GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'IP адрес'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Módulo'; |
| | | $wb['maildir_path_txt'] = 'Caminho do diretório Maildir'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Caminho do diretório Home'; |
| | | $wb['mailuser_uid_txt'] = 'UID usuário de email'; |
| | | $wb['mailuser_gid_txt'] = 'GID usuário de email'; |
| | |
| | | $wb['relayhost_txt'] = 'Host Relay'; |
| | | $wb['relayhost_user_txt'] = 'Usuário do Host Relay'; |
| | | $wb['relayhost_password_txt'] = 'Senha do Host Relay'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Tamanho máximo da Caixa Postal'; |
| | | $wb['message_size_limit_txt'] = 'Tamanho máximo de mensagem'; |
| | | $wb['ip_address_txt'] = 'Endereço IP'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI cesta k binarnímu balíčku'; |
| | | $wb['module_txt'] = 'Modul'; |
| | | $wb['maildir_path_txt'] = 'Cesta k mail adresáři'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Cesta k domácímu adresáři'; |
| | | $wb['mailuser_uid_txt'] = 'Mail uživatel UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mail uživatel GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost uživatel'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost heslo'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Limit velikosti mailboxu'; |
| | | $wb['message_size_limit_txt'] = 'Limit velikosti zprávy'; |
| | | $wb['ip_address_txt'] = 'IP adresa'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Použití indikátoru zatížení'; |
| | | $wb['f5_to_reload_js_txt'] = 'Pokud vypnete tuto volbu, zřejmě budete muset používat klávesu F5, aby internetový prohlížeč znovu načetl JavaScript knihovny nebo budete muset ručně vyprázdňovat mezipaměť (cache) vašeho internetového prohlížeče.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show Autoresponder tab in Mailbox detail'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show Mail Filter tab in Mailbox detail'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show Custom Rules tab in Mailbox detail'; |
| | |
| | | $wb['directive_snippets_name_empty'] = 'Bitte geben Sie einen Namen für den Schnipsel an.'; |
| | | $wb['directive_snippets_name_error_unique'] = 'Es existiert schon ein Direktiven-Schnipsel mit diesem Namen.'; |
| | | $wb['variables_txt'] = 'Variablen'; |
| | | $wb['customer_viewable_txt'] = 'Sichtbar für Kunden'; |
| | | ?> |
| | |
| | | $wb['name_txt'] = 'Name des Schnipsels'; |
| | | $wb['type_txt'] = 'Typ'; |
| | | $wb['add_new_record_txt'] = 'Direktiven Schnipsel hinzufügen'; |
| | | $wb['customer_viewable_txt'] = 'Sichtbar für Kunden'; |
| | | ?> |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Modul'; |
| | | $wb['maildir_path_txt'] = 'Maildir Pfad'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Homedir Pfad'; |
| | | $wb['dkim_path_txt'] = 'DKIM Pfad'; |
| | | $wb['mailuser_uid_txt'] = 'Mailbenutzer UID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost Benutzer'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Passwort'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Zurückweisen von Mails, wenn Sender nicht gleich Login'; |
| | | $wb['mailbox_size_limit_txt'] = 'E-Mailkonto Beschränkung'; |
| | | $wb['message_size_limit_txt'] = 'E-Mailgrößen Beschränkung'; |
| | | $wb['ip_address_txt'] = 'IP Adresse'; |
| | |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Netzwerk-Dateisystem'; |
| | | $wb['overquota_db_notify_admin_txt'] = 'Datenbank-Quota-Warnungen an den Administrator senden'; |
| | | $wb['overquota_db_notify_client_txt'] = 'Datenbank-Quota-Warnungen an den Kunden senden'; |
| | | $wb['php_ini_check_minutes_txt'] = 'Prüfe php.ini alle X Minuten auf Änderungen'; |
| | | $wb['php_ini_check_minutes_error_empty'] = 'Bitte geben Sie einen Wert an, wie oft die php.ini auf Änderungen geprüft werden soll.'; |
| | | $wb['php_ini_check_minutes_info_txt'] = '0 = keine Prüfung'; |
| | | $wb['php_handler_txt'] = 'Standard-PHP-Handler'; |
| | | $wb['enable_spdy_txt'] = 'Stellt SPDY zur Verfügung'; |
| | | ?> |
| | |
| | | $wb['f5_to_reload_js_txt'] = 'Wenn Sie den Wert ändern, müssen Sie F5 drücken, damit der Browser die JavaScript Bibliotheken neu lädt, oder Ihren Browser Cache leeren.'; |
| | | $wb['phpmyadmin_url_error_regex'] = 'Falsche phpMyAdmin URL'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Deaktiviere die Kunden Benutzernamen Überprüfung für den Begriff <b>web<b>.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Backups in Web Quota hinzuzählen.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Zeige Autoresponder Reiter in E-Mail Kontodetails'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Zeige E-Mail Filter Reiter in E-Mail Kontodetails'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Zeige Benutzerregel Reiter in E-Mail Kontodetails'; |
| | |
| | | $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; |
| | | $wb['username_error_collision'] = 'Der Benutzername darf nicht <b>web<b> oder <b>web<b> gefolgt von einer Zahl sein.'; |
| | | $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; |
| | | $wb['lost_password_function_txt'] = 'Passwort vergessen Funktion steht zur Verfügung'; |
| | | ?> |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Άρθρωμα'; |
| | | $wb['maildir_path_txt'] = 'Διαδρομή Maildir'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Διαδρομή Homedir'; |
| | | $wb['mailuser_uid_txt'] = 'Mailuser UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailuser GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Χρήστης Relayhost'; |
| | | $wb['relayhost_password_txt'] = 'Συνθηματικό Relayhost'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Όριο χώρου θυρίδας'; |
| | | $wb['message_size_limit_txt'] = 'Μήνυμα ορίου χώρου'; |
| | | $wb['ip_address_txt'] = 'Διεύθυνση IP'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Χρήση Load Indicator (ενδεικτή φόρτωσης)'; |
| | | $wb['f5_to_reload_js_txt'] = 'Αν το αλλάξετε, ίσως πρέπει να πατήσετε το F5 για να κάνετε τον φυλλομετρητη να ξαναφορτώσει τις βιβλιοθήκες JavaScript ή να αδείασετε την cache του φυλλομετρητή.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Απενεργοποίηση ελέγχου στο όνομα χρήστη για την λέξη \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Εμφάνιση της καρτέλας Αυτόματης Απάντησης στις λεπτομέρειες του λογαριασμού mail'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Εμφάνιση της καρτέλας Φίλτρα mail στις λεπτομέρειες του λογαριασμού mail'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Εμφάνιση της καρτέλας Προσαρμοσμένοι Κανόνες στις λεπτομέρειες του λογαριασμού mail'; |
| | |
| | | $wb["directive_snippets_name_empty"] = 'Please specify a name for the snippet.'; |
| | | $wb["directive_snippets_name_error_unique"] = 'There is already a directive snippet with this name.'; |
| | | $wb['variables_txt'] = 'Variables'; |
| | | $wb['customer_viewable_txt'] = 'Customer viewable'; |
| | | ?> |
| | |
| | | $wb["name_txt"] = 'Name of Snippet'; |
| | | $wb["type_txt"] = 'Type'; |
| | | $wb["add_new_record_txt"] = 'Add Directive Snippet'; |
| | | $wb['customer_viewable_txt'] = 'Customer viewable'; |
| | | ?> |
| | |
| | | $wb["active_txt"] = 'Active'; |
| | | $wb["mirror_server_id_txt"] = 'Is mirror of Server'; |
| | | $wb["- None -"] = '- None -'; |
| | | // New for XMPP |
| | | $wb['xmpp_server_txt'] = 'XMPP Server'; |
| | | ?> |
| | |
| | | $wb["fastcgi_bin_txt"] = 'FastCGI Bin'; |
| | | $wb["module_txt"] = 'Module'; |
| | | $wb["maildir_path_txt"] = 'Maildir Path'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb["homedir_path_txt"] = 'Homedir Path'; |
| | | $wb["dkim_path_txt"] = 'DKIM Path'; |
| | | $wb["mailuser_uid_txt"] = 'Mailuser UID'; |
| | |
| | | $wb["relayhost_txt"] = 'Relayhost'; |
| | | $wb["relayhost_user_txt"] = 'Relayhost User'; |
| | | $wb["relayhost_password_txt"] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb["mailbox_size_limit_txt"] = 'Mailbox Size Limit'; |
| | | $wb["message_size_limit_txt"] = 'Message Size Limit'; |
| | | $wb["ip_address_txt"] = 'IP Address'; |
| | |
| | | $wb["overquota_db_notify_admin_txt"] = 'Send DB quota warnings to admin'; |
| | | $wb["overquota_db_notify_client_txt"] = 'Send DB quota warnings to client'; |
| | | $wb['monitor_system_updates_txt'] = 'Check for Linux updates'; |
| | | $wb['php_handler_txt'] = "PHP Handler"; |
| | | $wb['php_handler_txt'] = "Default PHP Handler"; |
| | | $wb['disabled_txt'] = 'Disabled'; |
| | | $wb['dkim_strength_txt'] = 'DKIM strength'; |
| | | $wb['monitor_system_updates_txt'] = 'Check for Linux updates'; |
| | |
| | | $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; |
| | | $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; |
| | | $wb['network_filesystem_txt'] = 'Network Filesystem'; |
| | | $wb['php_ini_check_minutes_txt'] = 'Check php.ini every X minutes for changes'; |
| | | $wb['php_ini_check_minutes_error_empty'] = 'Please specify a value how often php.ini should be checked for changes.'; |
| | | $wb['php_ini_check_minutes_info_txt'] = '0 = no check'; |
| | | $wb['enable_spdy_txt'] = 'Makes SPDY available'; |
| | | |
| | | // New for XMPP |
| | | $wb['xmpp_server_txt'] = 'XMPP Server'; |
| | | $wb['xmpp_use_ipv6_txt'] = 'Use IPv6'; |
| | | $wb['xmpp_bosh_max_inactivity_txt'] = 'Max. BOSH inactivity time'; |
| | | $wb['xmpp_bosh_timeout_range_wrong'] = 'Please enter a bosh timeout range between 15 - 360'; |
| | | $wb['xmpp_module_saslauth'] = 'saslauth'; |
| | | $wb['xmpp_server_admins_txt'] = 'Server Admins (JIDs)'; |
| | | $wb['xmpp_modules_enabled_txt'] = 'Serverwide enabled plugins (one per line)'; |
| | | $wb['xmpp_ports_txt'] = 'Component ports'; |
| | | $wb['xmpp_port_http_txt'] = 'HTTP'; |
| | | $wb['xmpp_port_https_txt'] = 'HTTPS'; |
| | | $wb['xmpp_port_pastebin_txt'] = 'Pastebin'; |
| | | $wb['xmpp_port_bosh_txt'] = 'BOSH'; |
| | | ?> |
| | |
| | | $wb["proxy_server_txt"] = 'Proxy'; |
| | | $wb["firewall_server_txt"] = 'Firewall'; |
| | | $wb["add_new_record_txt"] = 'Add new Server'; |
| | | // New for XMPP |
| | | $wb['xmpp_server_txt'] = 'XMPP'; |
| | | ?> |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['password_match_txt'] = 'The passwords do match.'; |
| | | $wb['username_error_collision'] = 'The username may not be web or web plus a number."'; |
| | | $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; |
| | | $wb['lost_password_function_txt'] = 'Forgot password function is available'; |
| | | ?> |
| | |
| | | $wb['fastcgi_bin_txt'] = 'Binario de FastCGI'; |
| | | $wb['module_txt'] = 'Módulo'; |
| | | $wb['maildir_path_txt'] = 'Ruta de buzones'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Ruta base de correo'; |
| | | $wb['mailuser_uid_txt'] = 'UID del usuario de correo'; |
| | | $wb['mailuser_gid_txt'] = 'GID del usuario de correo'; |
| | |
| | | $wb['relayhost_txt'] = 'Servidor de retransmisión'; |
| | | $wb['relayhost_user_txt'] = 'Usuario de retransmisión'; |
| | | $wb['relayhost_password_txt'] = 'Contraseña de retramisión'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Límite de tamaño del buzón'; |
| | | $wb['message_size_limit_txt'] = 'Límite de tamaño del mensaje'; |
| | | $wb['ip_address_txt'] = 'Dirección IP'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Usar indicador de carga'; |
| | | $wb['f5_to_reload_js_txt'] = 'Si cambias esto, podrías tener que pulsar F5 para que tu navegador recargue las librerías JavaScript o vacíar la caché del navegador.'; |
| | | $wb['client_username_web_check_disabled_txt'] = "Desactivar comprobación de la palabra 'web' en el nombre de cliente."; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Mostrar pestaña autoresponder en los detalles de la cuenta de correo'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Mostrar pestaña filtro de correo en los detalles de la cuenta de correo'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Mostrar pestaña filtros personalizados en los detalles de la cuenta de correo'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI-binääri'; |
| | | $wb['module_txt'] = 'Ohjelmaosio'; |
| | | $wb['maildir_path_txt'] = 'Postilaatikon hakemistopolku'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Kotikansion hakemistopolku'; |
| | | $wb['mailuser_uid_txt'] = 'Käyttäjätunnus'; |
| | | $wb['mailuser_gid_txt'] = 'Käyttäjäryhmä'; |
| | |
| | | $wb['relayhost_txt'] = 'Edelleenlähetyspalvelin'; |
| | | $wb['relayhost_user_txt'] = 'Edelleenlähetyspalvelimen käyttäjätunnus'; |
| | | $wb['relayhost_password_txt'] = 'Edelleenlähetyspalvelimen salasana'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Postilaatikon koko'; |
| | | $wb['message_size_limit_txt'] = 'Viestien enimmäiskoko'; |
| | | $wb['ip_address_txt'] = 'IP-osoite'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'Exétable FastCGI'; |
| | | $wb['module_txt'] = 'Module'; |
| | | $wb['maildir_path_txt'] = 'Chemin Maildir'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Chemin Homedir'; |
| | | $wb['mailuser_uid_txt'] = 'UID de l\'utilisateur mail'; |
| | | $wb['mailuser_gid_txt'] = 'GID de l\'utilisateur mail'; |
| | |
| | | $wb['relayhost_txt'] = 'Hôde relais'; |
| | | $wb['relayhost_user_txt'] = 'Utilisateur du relais'; |
| | | $wb['relayhost_password_txt'] = 'Mot de passe du relais'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Taille maximale de la boite mail'; |
| | | $wb['message_size_limit_txt'] = 'Taille maximale des messages'; |
| | | $wb['ip_address_txt'] = 'Adresse IP'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Modul'; |
| | | $wb['maildir_path_txt'] = 'Put do Maildir-a'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Put do početne stranice'; |
| | | $wb['mailuser_uid_txt'] = 'Mailuser UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailuser GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost korisnik'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost šifra'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Dozvoljena veličina mailboxa'; |
| | | $wb['message_size_limit_txt'] = 'Dozvoljena veličina emaila'; |
| | | $wb['ip_address_txt'] = 'IP adresa'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Modul'; |
| | | $wb['maildir_path_txt'] = 'Maildir Path'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Homedir Path'; |
| | | $wb['mailuser_uid_txt'] = 'Mailuser UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailuser GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'IP Address'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Modul'; |
| | | $wb['maildir_path_txt'] = 'Path Direktori Mail'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Path Direktori Home'; |
| | | $wb['mailuser_uid_txt'] = 'UID Pengguna Mail'; |
| | | $wb['mailuser_gid_txt'] = 'GID Pengguna Mail'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Pengguna Relayhost'; |
| | | $wb['relayhost_password_txt'] = 'Kata Sandi Relayhost'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Batasan Ukuran Mailbox'; |
| | | $wb['message_size_limit_txt'] = 'Batasan Ukuran Pesan'; |
| | | $wb['ip_address_txt'] = 'Alamat IP'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Module'; |
| | | $wb['maildir_path_txt'] = 'Maildir Path'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Homedir Path'; |
| | | $wb['mailuser_uid_txt'] = 'Mailuser UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailuser GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'Indirizzo IP'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI実行ファイル'; |
| | | $wb['module_txt'] = 'モジュール'; |
| | | $wb['maildir_path_txt'] = 'メールディレクトリ'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'ホームディレクトリ'; |
| | | $wb['mailuser_uid_txt'] = 'メールユーザーのUID'; |
| | | $wb['mailuser_gid_txt'] = 'メールユーザーのGID'; |
| | |
| | | $wb['relayhost_txt'] = 'リレーホスト'; |
| | | $wb['relayhost_user_txt'] = 'リレーホストユーザー'; |
| | | $wb['relayhost_password_txt'] = 'リレーホストパスワード'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'メールボックスのサイズ'; |
| | | $wb['message_size_limit_txt'] = 'メッセージの最大サイズ'; |
| | | $wb['ip_address_txt'] = 'IPアドレス'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI bin'; |
| | | $wb['module_txt'] = 'Module'; |
| | | $wb['maildir_path_txt'] = 'Maildir pad'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Homedir pad'; |
| | | $wb['mailuser_uid_txt'] = 'Mailuser UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailuser GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost gebruiker'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost wachtwoord'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox grootte limiet'; |
| | | $wb['message_size_limit_txt'] = 'Message grootte limiet'; |
| | | $wb['ip_address_txt'] = 'IP adres'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'Kosz FastCGI'; |
| | | $wb['module_txt'] = 'Moduł'; |
| | | $wb['maildir_path_txt'] = 'Adres poczty e-mail'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Bazowy adres poczty e-mail'; |
| | | $wb['mailuser_uid_txt'] = 'UID użytkownika e-mail'; |
| | | $wb['mailuser_gid_txt'] = 'GID użytkownika e-mail'; |
| | |
| | | $wb['relayhost_txt'] = 'Adres Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Użytkownik Relayhost'; |
| | | $wb['relayhost_password_txt'] = 'Hasło Relayhost'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Maksymalna wielkość skrzynki pocztowej'; |
| | | $wb['message_size_limit_txt'] = 'Maksymalna wielkość wiadomości'; |
| | | $wb['ip_address_txt'] = 'Adres IP'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Użyj wskaźnika ładowania'; |
| | | $wb['f5_to_reload_js_txt'] = 'Jeżeli zmienisz to, możesz potrzebować wcisnąć F5 lub wyczyścić cache aby przeglądarka przeładowała biblioteki JavaScript.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Wyłącz sprawdzanie nazwy klienta w poszukiwaniu słowa -web-.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Pokaż zakładkę autorespondera w szczegółach konta email.'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Pokaż zakładkę filtra email w szczegółach konta email.'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Pokaż zakładkę własnych filtrów email w szczegółach konta email.'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Módulo'; |
| | | $wb['maildir_path_txt'] = 'Pasta do Maildir'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Pasta Home'; |
| | | $wb['mailuser_uid_txt'] = 'UID utilizador de email'; |
| | | $wb['mailuser_gid_txt'] = 'GID utilizador de email'; |
| | |
| | | $wb['relayhost_txt'] = 'Host Relay'; |
| | | $wb['relayhost_user_txt'] = 'Utilizador do Host Relay'; |
| | | $wb['relayhost_password_txt'] = 'Senha do Host Relay'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Tamanho máximo da Caixa Postal'; |
| | | $wb['message_size_limit_txt'] = 'Tamanho máximo de mensagem'; |
| | | $wb['ip_address_txt'] = 'Endereço IP'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Module'; |
| | | $wb['maildir_path_txt'] = 'Maildir Path'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Homedir Path'; |
| | | $wb['mailuser_uid_txt'] = 'Mailuser UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailuser GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'IP Address'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Модуль'; |
| | | $wb['maildir_path_txt'] = 'Путь Maildir'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Путь Homedir'; |
| | | $wb['mailuser_uid_txt'] = 'Mailuser UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailuser GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relay-хост'; |
| | | $wb['relayhost_user_txt'] = 'Логин Relay-хоста'; |
| | | $wb['relayhost_password_txt'] = 'Пароль Relay-хоста'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Лимит размера Mailbox'; |
| | | $wb['message_size_limit_txt'] = 'Лимит размера сообщения'; |
| | | $wb['ip_address_txt'] = 'IP-адрес'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Module'; |
| | | $wb['maildir_path_txt'] = 'Maildir Path'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Homedir Path'; |
| | | $wb['mailuser_uid_txt'] = 'Mailuser UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailuser GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'IP Address'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Använd laddningsindikator'; |
| | | $wb['f5_to_reload_js_txt'] = 'Om du ändrar detta kan du behöva trycka F5 för att ladda om javascript, eller rensa din webbläsarcache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Visa autosvarsfliken vid detaljerna för epostkonto'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Visa epostfilterfliken vid detaljerna för epostkonto'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Modul'; |
| | | $wb['maildir_path_txt'] = 'Maildir Cesta'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Cesta k domovskému adresáru'; |
| | | $wb['mailuser_uid_txt'] = 'Mailuser UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailuser GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost uživateľ'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost heslo'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Limit ve?kosti poštovej schránky'; |
| | | $wb['message_size_limit_txt'] = 'Limit ve?kosti správy'; |
| | | $wb['ip_address_txt'] = 'IP Adresa'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; |
| | | $wb['module_txt'] = 'Modül'; |
| | | $wb['maildir_path_txt'] = 'Mail dizini yolu'; |
| | | $wb['maildir_format_txt'] = 'Maildir Format'; |
| | | $wb['homedir_path_txt'] = 'Kullanıcı dizini yolu'; |
| | | $wb['mailuser_uid_txt'] = 'Mail kullanıcısı UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mail kullanıcısı GID'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost Kullanıcı'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Şifre'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mail kutusu boyutu'; |
| | | $wb['message_size_limit_txt'] = 'Mesaj boyutu'; |
| | | $wb['ip_address_txt'] = 'IP Adresleri'; |
| | |
| | | $wb['use_loadindicator_txt'] = 'Use Load Indicator'; |
| | | $wb['f5_to_reload_js_txt'] = 'If you change this, you might have to press F5 to make the browser reload JavaScript libraries or empty your browser cache.'; |
| | | $wb['client_username_web_check_disabled_txt'] = 'Disable client username check for the word \'web\'.'; |
| | | $wb['backups_include_into_web_quota_txt'] = 'Include backup files into web quota.'; |
| | | $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details'; |
| | | $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details'; |
| | | $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details'; |
| | |
| | | $module['template'] = 'module.tpl.htm'; |
| | | $module['startpage'] = 'admin/server_list.php'; |
| | | $module['tab_width'] = '60'; |
| | | $module['order'] = '90'; |
| | | |
| | | |
| | | $items[] = array( 'title' => 'CP Users', |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | |
| | | $liste["item"][] = array( 'field' => "name", |
| | |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('apache' => 'Apache', 'nginx' => 'nginx', 'php' => 'PHP', 'proxy' => 'Proxy')); |
| | | |
| | | $liste["item"][] = array( 'field' => "customer_viewable", |
| | | 'datatype' => "VARCHAR", |
| | | 'formtype' => "SELECT", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | ?> |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | $liste["item"][] = array( 'field' => "server_id", |
| | | 'datatype' => "VARCHAR", |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array("y" => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", "n" => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array("y" => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", "n" => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | $liste["item"][] = array( 'field' => "server_id", |
| | | 'datatype' => "VARCHAR", |
| | | 'datatype' => "INTEGER", |
| | | 'formtype' => "SELECT", |
| | | 'op' => "like", |
| | | 'prefix' => "%", |
| | | 'suffix' => "%", |
| | | 'op' => "=", |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'datasource' => array ( 'type' => "SQL", |
| | | 'querystring' => "SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND db_server = 1 ORDER BY server_name", |
| | | 'keyfield'=> "server_id", |
| | |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'width' => '', |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | $liste['item'][] = array( 'field' => 'web_server', |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'width' => '', |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | $liste['item'][] = array( 'field' => 'dns_server', |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'width' => '', |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | $liste['item'][] = array( 'field' => 'file_server', |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'width' => '', |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | $liste['item'][] = array( 'field' => 'db_server', |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'width' => '', |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | $liste['item'][] = array( 'field' => 'vserver_server', |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'width' => '', |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | $liste['item'][] = array( 'field' => 'xmpp_server', |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'op' => 'like', |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'width' => '', |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | ?> |
| | |
| | | *****************************************************/ |
| | | |
| | | $liste['item'][] = array( 'field' => 'server_id', |
| | | 'datatype' => 'VARCHAR', |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'op' => 'like', |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'op' => '=', |
| | | 'prefix' => '', |
| | | 'suffix' => '', |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', |
| | | 'keyfield'=> 'server_id', |
| | |
| | | 'value' => ''); |
| | | |
| | | $liste['item'][] = array( 'field' => 'client_id', |
| | | 'datatype' => 'VARCHAR', |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'op' => 'like', |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'op' => '=', |
| | | 'prefix' => '', |
| | | 'suffix' => '', |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT client_id,contact_name FROM client WHERE {AUTHSQL} ORDER BY contact_name', |
| | | 'keyfield'=> 'client_id', |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | |
| | | $liste['item'][] = array( 'field' => 'virtualhost_port', |
| | |
| | | *****************************************************/ |
| | | |
| | | $liste['item'][] = array( 'field' => 'server_id', |
| | | 'datatype' => 'VARCHAR', |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'op' => 'like', |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'op' => '=', |
| | | 'prefix' => '', |
| | | 'suffix' => '', |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', |
| | | 'keyfield'=> 'server_id', |
| | |
| | | 'value' => ''); |
| | | |
| | | $liste['item'][] = array( 'field' => 'client_id', |
| | | 'datatype' => 'VARCHAR', |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'op' => 'like', |
| | | 'prefix' => '%', |
| | | 'suffix' => '%', |
| | | 'op' => '=', |
| | | 'prefix' => '', |
| | | 'suffix' => '', |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT client_id,contact_name FROM client WHERE {AUTHSQL} ORDER BY contact_name', |
| | | 'keyfield'=> 'client_id', |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | $liste["item"][] = array( 'field' => "repo_name", |
| | | 'datatype' => "VARCHAR", |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | $liste['item'][] = array( 'field' => 'username', |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | } |
| | | foreach ($servers as $serverId) { |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (". |
| | | $app->functions->intval($serverId) . ", " . |
| | | time() . ", " . |
| | | "'ispc_update', " . |
| | | "'', " . |
| | | "'pending', " . |
| | | "''" . |
| | | ")"; |
| | | $app->db->query($sql); |
| | | "VALUES (?, UNIX_TIMESTAMP(), 'ispc_update', '', 'pending', '')"; |
| | | $app->db->query($sql, $serverId); |
| | | } |
| | | $msg = $wb['action_scheduled']; |
| | | } |
| | |
| | | } |
| | | foreach ($servers as $serverId) { |
| | | $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . |
| | | "VALUES (". |
| | | $app->functions->intval($serverId) . ", " . |
| | | time() . ", " . |
| | | "'os_update', " . |
| | | "'', " . |
| | | "'pending', " . |
| | | "''" . |
| | | ")"; |
| | | $app->db->query($sql); |
| | | "VALUES (?, UNIX_TIMESTAMP(), 'os_update', '', 'pending', '')"; |
| | | $app->db->query($sql, $serverId); |
| | | } |
| | | $msg = $wb['action_scheduled']; |
| | | } |
| | |
| | | $server_config_array[$section] = $app->tform->encode($this->dataRecord, $section); |
| | | $server_config_str = $app->ini_parser->get_ini_string($server_config_array); |
| | | |
| | | $app->db->datalogUpdate('server', "config = '".$app->db->quote($server_config_str)."'", 'server_id', $server_id); |
| | | $app->db->datalogUpdate('server', array("config" => $server_config_str), 'server_id', $server_id); |
| | | } |
| | | } |
| | | |
| | |
| | | global $app, $conf; |
| | | |
| | | // Getting Servers |
| | | $sql = "SELECT server_id,server_name FROM server WHERE server_id != ".$app->functions->intval($this->id)." ORDER BY server_name"; |
| | | $mirror_servers = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT server_id,server_name FROM server WHERE server_id != ? ORDER BY server_name"; |
| | | $mirror_servers = $app->db->queryAllRecords($sql, $this->id); |
| | | $mirror_server_select = '<option value="0">'.$app->tform->lng('- None -').'</option>'; |
| | | if(is_array($mirror_servers)) { |
| | | foreach( $mirror_servers as $mirror_server) { |
| | |
| | | //* Check if the server has been changed |
| | | // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { |
| | | $rec = $app->db->queryOneRecord("SELECT server_id from server_ip WHERE server_ip_id = ".$app->functions->intval($this->id)); |
| | | $rec = $app->db->queryOneRecord("SELECT server_id from server_ip WHERE server_ip_id = ?", $this->id); |
| | | if($rec['server_id'] != $this->dataRecord["server_id"]) { |
| | | //* Add a error message and switch back to old server |
| | | $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); |
| | |
| | | //* Check if the server has been changed |
| | | // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway |
| | | if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) && isset($this->dataRecord["server_id"])) { |
| | | $rec = $app->db->queryOneRecord("SELECT server_id from server_php WHERE server_php_id = ".$app->functions->intval($this->id)); |
| | | $rec = $app->db->queryOneRecord("SELECT server_id from server_php WHERE server_php_id = ?", $this->id); |
| | | if($rec['server_id'] != $this->dataRecord["server_id"]) { |
| | | //* Add a error message and switch back to old server |
| | | $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); |
| | |
| | | //* This is only allowed for administrators |
| | | if(!$app->auth->is_admin()) die('only allowed for administrators.'); |
| | | |
| | | $package_name = $app->db->quote($_REQUEST['package']); |
| | | $package_name = $_REQUEST['package']; |
| | | $install_server_id = $app->functions->intval($_REQUEST['server_id']); |
| | | $install_key = $app->db->quote(trim($_REQUEST['install_key'])); |
| | | $install_key = trim($_REQUEST['install_key']); |
| | | |
| | | $package = $app->db->queryOneRecord("SELECT * FROM software_package WHERE package_name = '$package_name'"); |
| | | $package = $app->db->queryOneRecord("SELECT * FROM software_package WHERE package_name = ?", $package_name); |
| | | |
| | | $install_key_verified = false; |
| | | $message_err = ''; |
| | |
| | | //* verify the key |
| | | if($package['package_installable'] == 'key' && $install_key != '') { |
| | | |
| | | $repo = $app->db->queryOneRecord("SELECT * FROM software_repo WHERE software_repo_id = ".$app->db->quote($package['software_repo_id'])); |
| | | $repo = $app->db->queryOneRecord("SELECT * FROM software_repo WHERE software_repo_id = ?", $package['software_repo_id']); |
| | | |
| | | $client = new SoapClient(null, array('location' => $repo['repo_url'], |
| | | 'uri' => $repo['repo_url'])); |
| | |
| | | $message_err = 'Verification of the key failed.'; |
| | | } else { |
| | | // Store the verified key into the database |
| | | $app->db->datalogUpdate('software_package', "package_key = '".$app->db->quote($install_key)."'", 'package_id', $package['package_id']); |
| | | $app->db->datalogUpdate('software_package', array("package_key" => $install_key), 'package_id', $package['package_id']); |
| | | } |
| | | } else { |
| | | $message_ok = 'Please enter the software key for the package.'; |
| | |
| | | |
| | | //* Install packages, if all requirements are fullfilled. |
| | | if($install_server_id > 0 && $package_name != '' && ($package['package_installable'] == 'yes' || $install_key_verified == true)) { |
| | | $sql = "SELECT software_update_id, package_name, update_title FROM software_update WHERE type = 'full' AND package_name = '".$app->db->quote($package_name)."' ORDER BY v1 DESC, v2 DESC, v3 DESC, v4 DESC LIMIT 0,1"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT software_update_id, package_name, update_title FROM software_update WHERE type = 'full' AND package_name = ? ORDER BY v1 DESC, v2 DESC, v3 DESC, v4 DESC LIMIT 0,1"; |
| | | $tmp = $app->db->queryOneRecord($sql, $package_name); |
| | | $software_update_id = $tmp['software_update_id']; |
| | | |
| | | //* if package requires a DB and there is no data for a db in config, then we create this data now |
| | |
| | | 'database_host' => 'localhost'); |
| | | $package_config_str = $app->ini_parser->get_ini_string($package_config_array); |
| | | $package['package_config'] = $package_config_str; |
| | | $app->db->datalogUpdate('software_package', "package_config = '".$app->db->quote($package_config_str)."'", 'package_id', $package['package_id']); |
| | | $app->db->datalogUpdate('software_package', array("package_config" => $package_config_str), 'package_id', $package['package_id']); |
| | | } |
| | | } |
| | | |
| | |
| | | if(!isset($package_config_array['remote_api'])) { |
| | | $remote_user = 'ispapp'.$package['package_id']; |
| | | $remote_password = md5(mt_rand()); |
| | | $remote_functions = $app->db->quote($package['package_remote_functions']); |
| | | $remote_functions = $package['package_remote_functions']; |
| | | |
| | | $package_config_array['remote_api'] = array( |
| | | 'remote_hostname' => $_SERVER['HTTP_HOST'], |
| | |
| | | $package_config_str = $app->ini_parser->get_ini_string($package_config_array); |
| | | $package['package_config'] = $package_config_str; |
| | | $remote_password_md5 = md5($remote_password); |
| | | $app->db->datalogUpdate('software_package', "package_config = '".$app->db->quote($package_config_str)."'", 'package_id', $package['package_id']); |
| | | $app->db->datalogUpdate('software_package', array("package_config" => $package_config_str), 'package_id', $package['package_id']); |
| | | |
| | | $sql = "INSERT INTO `remote_user` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `remote_username`, `remote_password`, `remote_functions`) VALUES |
| | | (1, 1, 'riud', 'riud', '', '".$app->db->quote($remote_user)."', '".$app->db->quote($remote_password_md5)."', '".$app->db->quote($remote_functions)."');"; |
| | | |
| | | $app->db->query($sql); |
| | | (1, 1, 'riud', 'riud', '', ?, ?, ?)"; |
| | | $app->db->query($sql, $remote_user, $remote_password_md5, $remote_functions); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | //* Add the record to start the install process |
| | | $insert_data = "(package_name, server_id, software_update_id, status) VALUES ('".$app->db->quote($package_name)."', '".$app->db->quote($install_server_id)."', '".$app->db->quote($software_update_id)."','installing')"; |
| | | $insert_data = array( |
| | | "package_name" => $package_name, |
| | | "server_id" => $install_server_id, |
| | | "software_update_id" => $software_update_id, |
| | | "status" => 'installing' |
| | | ); |
| | | $app->db->datalogInsert('software_update_inst', $insert_data, 'software_update_inst_id'); |
| | | $message_ok = 'Starting package installation '."<a href=\"#\" onclick=\"submitForm('pageForm','admin/software_package_list.php');\">".$app->lng('next')."</a>"; |
| | | $message_ok = 'Starting package installation '."<a href=\"#\" onclick=\"ISPConfig.submitForm('pageForm','admin/software_package_list.php');\">".$app->lng('next')."</a>"; |
| | | |
| | | } |
| | | |
| | |
| | | $packages = $client->get_packages($repo['repo_username'], $repo['repo_password']); |
| | | if(is_array($packages)) { |
| | | foreach($packages as $p) { |
| | | $package_name = $app->db->quote($p['name']); |
| | | $tmp = $app->db->queryOneRecord("SELECT package_id FROM software_package WHERE package_name = '".$app->db->quote($package_name)."'"); |
| | | $package_name = $p['name']; |
| | | $tmp = $app->db->queryOneRecord("SELECT package_id FROM software_package WHERE package_name = ?", $package_name); |
| | | |
| | | $package_title = $app->db->quote($p['title']); |
| | | $package_description = $app->db->quote($p['description']); |
| | | $package_title = $p['title']; |
| | | $package_description = $p['description']; |
| | | $software_repo_id = $app->functions->intval($repo['software_repo_id']); |
| | | $package_type = $app->db->quote($p['type']); |
| | | $package_installable = $app->db->quote($p['installable']); |
| | | $package_requires_db = $app->db->quote($p['requires_db']); |
| | | $package_remote_functions = $app->db->quote($p['remote_functions']); |
| | | $package_type = $p['type']; |
| | | $package_installable = $p['installable']; |
| | | $package_requires_db = $p['requires_db']; |
| | | $package_remote_functions = $p['remote_functions']; |
| | | |
| | | if(empty($tmp['package_id'])) { |
| | | //$sql = "INSERT INTO software_package (software_repo_id, package_name, package_title, package_description,package_type,package_installable,package_requires_db) VALUES ($software_repo_id, '$package_name', '$package_title', '$package_description','$package_type','$package_installable','$package_requires_db')"; |
| | | //$app->db->query($sql); |
| | | $insert_data = "(software_repo_id, package_name, package_title, package_description,package_type,package_installable,package_requires_db,package_remote_functions) VALUES ($software_repo_id, '$package_name', '$package_title', '$package_description','$package_type','$package_installable','$package_requires_db','$package_remote_functions')"; |
| | | $insert_data = array( |
| | | "software_repo_id" => $software_repo_id, |
| | | "package_name" => $package_name, |
| | | "package_title" => $package_title, |
| | | "package_description" => $package_description, |
| | | "package_type" => $package_type, |
| | | "package_installable" => $package_installable, |
| | | "package_requires_db" => $package_requires_db, |
| | | "package_remote_functions" => $package_remote_functions |
| | | ); |
| | | $app->db->datalogInsert('software_package', $insert_data, 'package_id'); |
| | | $packages_added++; |
| | | } else { |
| | | //$sql = "UPDATE software_package SET software_repo_id = $software_repo_id, package_title = '$package_title', package_description = '$package_description', package_type = '$package_type', package_installable = '$package_installable', package_requires_db = '$package_requires_db' WHERE package_name = '$package_name'"; |
| | | //$app->db->query($sql); |
| | | $update_data = "software_repo_id = $software_repo_id, package_title = '$package_title', package_description = '$package_description', package_type = '$package_type', package_installable = '$package_installable', package_requires_db = '$package_requires_db', package_remote_functions = '$package_remote_functions'"; |
| | | $update_data = array( |
| | | "software_repo_id" => $software_repo_id, |
| | | "package_title" => $package_title, |
| | | "package_description" => $package_description, |
| | | "package_type" => $package_type, |
| | | "package_installable" => $package_installable, |
| | | "package_requires_db" => $package_requires_db, |
| | | "package_remote_functions" => $package_remote_functions |
| | | ); |
| | | //echo $update_data; |
| | | $app->db->datalogUpdate('software_package', $update_data, 'package_id', $tmp['package_id']); |
| | | } |
| | |
| | | $v3 = $app->functions->intval($version_array[2]); |
| | | $v4 = $app->functions->intval($version_array[3]); |
| | | |
| | | $package_name = $app->db->quote($u['package_name']); |
| | | $package_name = $u['package_name']; |
| | | $software_repo_id = $app->functions->intval($repo['software_repo_id']); |
| | | $update_url = $app->db->quote($u['url']); |
| | | $update_md5 = $app->db->quote($u['md5']); |
| | | $update_dependencies = (isset($u['dependencies']))?$app->db->quote($u['dependencies']):''; |
| | | $update_title = $app->db->quote($u['title']); |
| | | $type = $app->db->quote($u['type']); |
| | | $update_url = $u['url']; |
| | | $update_md5 = $u['md5']; |
| | | $update_dependencies = (isset($u['dependencies']))?$u['dependencies']:''; |
| | | $update_title = $u['title']; |
| | | $type = $u['type']; |
| | | |
| | | // Check that we do not have this update in the database yet |
| | | $sql = "SELECT * FROM software_update WHERE package_name = '$package_name' and v1 = '$v1' and v2 = '$v2' and v3 = '$v3' and v4 = '$v4'"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM software_update WHERE package_name = ? and v1 = ? and v2 = ? and v3 = ? and v4 = ?"; |
| | | $tmp = $app->db->queryOneRecord($sql, $package_name, $v1, $v2, $v3, $v4); |
| | | if(!isset($tmp['software_update_id'])) { |
| | | // Insert the update in the datbase |
| | | //$sql = "INSERT INTO software_update (software_repo_id, package_name, update_url, update_md5, update_dependencies, update_title, v1, v2, v3, v4, type) |
| | | //VALUES ($software_repo_id, '$package_name', '$update_url', '$update_md5', '$update_dependencies', '$update_title', '$v1', '$v2', '$v3', '$v4', '$type')"; |
| | | //die($sql); |
| | | //$app->db->query($sql); |
| | | $insert_data = "(software_repo_id, package_name, update_url, update_md5, update_dependencies, update_title, v1, v2, v3, v4, type) |
| | | VALUES ($software_repo_id, '$package_name', '$update_url', '$update_md5', '$update_dependencies', '$update_title', '$v1', '$v2', '$v3', '$v4', '$type')"; |
| | | $insert_data = array( |
| | | "software_repo_id" => $software_repo_id, |
| | | "package_name" => $package_name, |
| | | "update_url" => $update_url, |
| | | "update_md5" => $update_md5, |
| | | "update_dependencies" => $update_dependencies, |
| | | "update_title" => $update_title, |
| | | "v1" => $v1, |
| | | "v2" => $v2, |
| | | "v3" => $v3, |
| | | "v4" => $v4, |
| | | "type" => $type |
| | | ); |
| | | $app->db->datalogInsert('software_update', $insert_data, 'software_update_id'); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //* Install packages, if GET Request |
| | | /* |
| | | if(isset($_GET['action']) && $_GET['action'] == 'install' && $_GET['package'] != '' && $_GET['server_id'] > 0) { |
| | | $package_name = $app->db->quote($_GET['package']); |
| | | $server_id = $app->functions->intval($_GET['server_id']); |
| | | $sql = "SELECT software_update_id, package_name, update_title FROM software_update WHERE type = 'full' AND package_name = '$package_name' ORDER BY v1 DESC, v2 DESC, v3 DESC, v4 DESC LIMIT 0,1"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | $software_update_id = $tmp['software_update_id']; |
| | | |
| | | $insert_data = "(package_name, server_id, software_update_id, status) VALUES ('$package_name', '$server_id', '$software_update_id','installing')"; |
| | | // $insert_data = "(package_name, server_id, software_update_id, status) VALUES ('$package_name', '$server_id', '$software_update_id','installed')"; |
| | | $app->db->datalogInsert('software_update_inst', $insert_data, 'software_update_inst_id'); |
| | | } |
| | | */ |
| | | |
| | | |
| | | |
| | | // Show the list in the interface |
| | | // Loading the template |
| | |
| | | foreach($packages as $key => $p) { |
| | | $installed_txt = ''; |
| | | foreach($servers as $s) { |
| | | $inst = $app->db->queryOneRecord("SELECT * FROM software_update, software_update_inst WHERE software_update_inst.software_update_id = software_update.software_update_id AND software_update_inst.package_name = '".$app->db->quote($p["package_name"])."' AND server_id = '".$app->functions->intval($s["server_id"])."'"); |
| | | $inst = $app->db->queryOneRecord("SELECT * FROM software_update, software_update_inst WHERE software_update_inst.software_update_id = software_update.software_update_id AND software_update_inst.package_name = ? AND server_id = ?", $p["package_name"], $s["server_id"]); |
| | | $version = $inst['v1'].'.'.$inst['v2'].'.'.$inst['v3'].'.'.$inst['v4']; |
| | | |
| | | if($inst['status'] == 'installed') { |
| | |
| | | if($p['package_installable'] == 'no') { |
| | | $installed_txt .= $s['server_name'].": ".$app->lng("Package can not be installed.")."<br />"; |
| | | } else { |
| | | $installed_txt .= $s['server_name'].": <a href=\"#\" onclick=\"loadContent('admin/software_package_install.php?package=".$p["package_name"]."&server_id=".$s["server_id"]."');\">Install now</a><br />"; |
| | | $installed_txt .= $s['server_name'].": <a href=\"#\" data-load-content=\"admin/software_package_install.php?package=".$p["package_name"]."&server_id=".$s["server_id"]."\">Install now</a><br />"; |
| | | } |
| | | } |
| | | } |
| | |
| | | $v3 = $app->functions->intval($version_array[2]); |
| | | $v4 = $app->functions->intval($version_array[3]); |
| | | |
| | | $package_name = $app->db->quote($u['package_name']); |
| | | $package_name = $u['package_name']; |
| | | $software_repo_id = $app->functions->intval($repo['software_repo_id']); |
| | | $update_url = $app->db->quote($u['url']); |
| | | $update_md5 = $app->db->quote($u['md5']); |
| | | $update_dependencies = (isset($u['dependencies']))?$app->db->quote($u['dependencies']):''; |
| | | $update_title = $app->db->quote($u['title']); |
| | | $type = $app->db->quote($u['type']); |
| | | $update_url = $u['url']; |
| | | $update_md5 = $u['md5']; |
| | | $update_dependencies = (isset($u['dependencies']))?$u['dependencies']:''; |
| | | $update_title = $u['title']; |
| | | $type = $u['type']; |
| | | |
| | | // Check that we do not have this update in the database yet |
| | | $sql = "SELECT * FROM software_update WHERE package_name = '$package_name' and v1 = '$v1' and v2 = '$v2' and v3 = '$v3' and v4 = '$v4'"; |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM software_update WHERE package_name = ? and v1 = ? and v2 = ? and v3 = ? and v4 = ?"; |
| | | $tmp = $app->db->queryOneRecord($sql, $package_name, $v1, $v2, $v3, $v4); |
| | | if(!isset($tmp['software_update_id'])) { |
| | | // Insert the update in the datbase |
| | | $sql = "INSERT INTO software_update (software_repo_id, package_name, update_url, update_md5, update_dependencies, update_title, v1, v2, v3, v4, type) |
| | | VALUES ($software_repo_id, '$package_name', '$update_url', '$update_md5', '$update_dependencies', '$update_title', '$v1', '$v2', '$v3', '$v4', '$type')"; |
| | | VALUES ($software_repo_id, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; |
| | | //die($sql); |
| | | $app->db->query($sql); |
| | | $app->db->query($sql, $package_name, $update_url, $update_md5, $update_dependencies, $update_title, $v1, $v2, $v3, $v4, $type); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | //* Install packages, if GET Request |
| | | if(isset($_GET['action']) && $_GET['action'] == 'install' && $_GET['package'] != '' && $_GET['server_id'] > 0) { |
| | | $package_name = $app->db->quote($_GET['package']); |
| | | $package_name = $_GET['package']; |
| | | $server_id = $app->functions->intval($_GET['server_id']); |
| | | $software_update_id = $app->functions->intval($_GET['id']); |
| | | |
| | | $insert_data = "(package_name, server_id, software_update_id, status) VALUES ('$package_name', '$server_id', '$software_update_id','installing')"; |
| | | // $insert_data = "(package_name, server_id, software_update_id, status) VALUES ('$package_name', '$server_id', '$software_update_id','installed')"; |
| | | $insert_data = array( |
| | | "package_name" => $package_name, |
| | | "server_id" => $server_id, |
| | | "software_update_id" => $software_update_id, |
| | | "status" => 'installing' |
| | | ); |
| | | $app->db->datalogInsert('software_update_inst', $insert_data, 'software_update_inst_id'); |
| | | |
| | | } |
| | |
| | | foreach($installed_packages as $ip) { |
| | | |
| | | // Get version number of the latest installed version |
| | | $sql = "SELECT v1, v2, v3, v4 FROM software_update, software_update_inst WHERE software_update.software_update_id = software_update_inst.software_update_id AND server_id = ".$app->functions->intval($server_id)." ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC LIMIT 0,1"; |
| | | $lu = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT v1, v2, v3, v4 FROM software_update, software_update_inst WHERE software_update.software_update_id = software_update_inst.software_update_id AND server_id = ? ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC LIMIT 0,1"; |
| | | $lu = $app->db->queryOneRecord($sql, $server_id); |
| | | |
| | | // Get all installable updates |
| | | $sql = "SELECT * FROM software_update WHERE v1 >= ".$app->functions->intval($lu['v1'])." AND v2 >= ".$app->functions->intval($lu['v2'])." AND v3 >= ".$app->functions->intval($lu['v3'])." AND v4 >= ".$app->functions->intval($lu['v4'])." AND package_name = '".$app->db->quote($ip['package_name'])."' ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC"; |
| | | $updates = $app->db->queryAllRecords($sql); |
| | | $sql = "SELECT * FROM software_update WHERE v1 >= ? AND v2 >= ? AND v3 >= ? AND v4 >= ? AND package_name = ? ORDER BY v1 DESC , v2 DESC , v3 DESC , v4 DESC"; |
| | | $updates = $app->db->queryAllRecords($sql, $lu['v1'], $lu['v2'], $lu['v3'], $lu['v4'], $ip['package_name']); |
| | | //die($sql); |
| | | |
| | | if(is_array($updates)) { |
| | |
| | | |
| | | foreach($updates as $key => $u) { |
| | | $version = $u['v1'].'.'.$u['v2'].'.'.$u['v3'].'.'.$u['v4']; |
| | | $installed_txt = "<a href=\"#\" onclick=\"loadContent('admin/software_update_list.php?action=install&package=".$u["package_name"]."&id=".$u["software_update_id"]."&server_id=".$server_id."');\">Install Update</a><br />"; |
| | | $installed_txt = "<a href=\"#\" data-load-content=\"admin/software_update_list.php?action=install&package=".$u["package_name"]."&id=".$u["software_update_id"]."&server_id=".$server_id."\">Install Update</a><br />"; |
| | | $records_out[] = array('version' => $version, 'update_title' => $u["update_title"], 'installed' => $installed_txt); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /* |
| | | $updates = $app->db->queryAllRecords('SELECT software_update.update_title, software_update.software_update_id, software_update.package_name, v1, v2, v3, v4, software_update_inst.status |
| | | FROM software_update LEFT JOIN software_update_inst ON ( software_update.software_update_id = software_update_inst.software_update_id ) |
| | | WHERE server_id = '.$server_id.' |
| | | GROUP BY software_update.package_name |
| | | ORDER BY software_update.package_name ASC, v1 DESC , v2 DESC , v3 DESC , v4 DESC'); |
| | | |
| | | if(is_array($updates)) { |
| | | foreach($updates as $key => $u) { |
| | | $installed_txt = ''; |
| | | |
| | | $version = $u['v1'].'.'.$u['v2'].'.'.$u['v3'].'.'.$u['v4']; |
| | | $updates[$key]['version'] = $version; |
| | | if($u['status'] == 'installed' || $u['status'] == 'installing' || $u['status'] == 'deleting') { |
| | | $installed_txt .= "Installed version $version<br />"; |
| | | } else { |
| | | $installed_txt .= "<a href=\"#\" onclick=\"loadContent('admin/software_update_list.php?action=install&package=".$u["package_name"]."&id=".$u["software_update_id"]."&server_id=".$server_id."');\">Install now</a><br />"; |
| | | } |
| | | $updates[$key]['installed'] = $installed_txt; |
| | | |
| | | } |
| | | } |
| | | */ |
| | | |
| | | |
| | | |
| | |
| | | $available_dashlets_txt = ''; |
| | | $handle = @opendir(ISPC_WEB_PATH.'/dashboard/dashlets'); |
| | | while ($file = @readdir($handle)) { |
| | | if ($file != '.' && $file != '..' && !is_dir($file)) { |
| | | if ($file != '.' && $file != '..' && !is_dir(ISPC_WEB_PATH.'/dashboard/dashlets/'.$file)) { |
| | | $available_dashlets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.substr($file, 0, -4).']<pre class="addPlaceholderContent" style="display:none;">['.substr($file, 0, -4).'],</pre></a> '; |
| | | } |
| | | } |
| | | |
| | | if($available_dashlets_txt == '') $available_dashlets_txt = '------'; |
| | | $app->tpl->setVar("available_dashlets_txt", $available_dashlets_txt); |
| | | |
| | | // Logo |
| | | $sys_ini = $app->db->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = ?", $this->id); |
| | | if($sys_ini['custom_logo'] != ''){ |
| | | $logo = '<img src="'.$sys_ini['custom_logo'].'" /> <a href="#" class="btn btn-default formbutton-danger formbutton-narrow" style="margin:5px" id="del_custom_logo"><span class="icon icon-delete"></span></a>'; |
| | | } else { |
| | | $logo = '<img src="'.$sys_ini['default_logo'].'" />'; |
| | | } |
| | | $default_logo = '<img src="'.$sys_ini['default_logo'].'" />'; |
| | | $app->tpl->setVar("used_logo", $logo); |
| | | $app->tpl->setVar("default_logo", $default_logo); |
| | | |
| | | parent::onShowEnd(); |
| | | } |
| | |
| | | $server_config_array[$section] = $new_config; |
| | | $server_config_str = $app->ini_parser->get_ini_string($server_config_array); |
| | | |
| | | //$sql = "UPDATE sys_ini SET config = '".$app->db->quote($server_config_str)."' WHERE sysini_id = 1"; |
| | | //if($conf['demo_mode'] != true) $app->db->query($sql); |
| | | if($conf['demo_mode'] != true) $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($server_config_str)."'", 'sysini_id', 1); |
| | | if($conf['demo_mode'] != true) $app->db->datalogUpdate('sys_ini', array("config" => $server_config_str), 'sysini_id', 1); |
| | | |
| | | /* |
| | | * If we should use the domain-module, we have to insert all existing domains into the table |
| | |
| | | "FROM web_domain WHERE type NOT IN ('subdomain','vhostsubdomain')"; |
| | | $app->db->query($sql); |
| | | } |
| | | |
| | | //die(print_r($_FILES)); |
| | | // Logo |
| | | /* |
| | | if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name'])){ |
| | | //print_r($_FILES); |
| | | |
| | | $path= $_FILES['file']['tmp_name']; |
| | | $type = pathinfo($path, PATHINFO_EXTENSION); |
| | | $data = file_get_contents($path); |
| | | $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data); |
| | | $app->db->query("UPDATE sys_ini SET custom_logo = ? WHERE sysini_id = ?", $base64, $this->id); |
| | | } |
| | | */ |
| | | |
| | | // Maintenance mode |
| | | if($server_config_array['misc']['maintenance_mode'] == 'y'){ |
| | | //print_r($_SESSION); |
| | | //echo $_SESSION['s']['id']; |
| | | $app->db->query("DELETE FROM sys_session WHERE session_id != '".$app->db->quote($_SESSION['s']['id'])."'"); |
| | | $app->db->query("DELETE FROM sys_session WHERE session_id != ?", $_SESSION['s']['id']); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | function onAfterUpdate() { |
| | | if($this->_js_changed == true) { |
| | | // not the best way, but it works |
| | | header('Content-Type: text/html'); |
| | | print '<script type="text/javascript">document.location.reload(true);</script>'; |
| | | exit; |
| | | } |
| | | } |
| | | */ |
| | | |
| | | } |
| | | |
| | | $app->tform_actions = new page_action; |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_directive_snippets"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="name">{tmpl_var name='name_txt'}</label> |
| | | <input name="name" id="name" value="{tmpl_var name='name'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="type">{tmpl_var name='type_txt'}</label> |
| | | <select name="type" id="type" class="selectInput"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="name" class="col-sm-3 control-label">{tmpl_var name='name_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="name" id="name" value="{tmpl_var name='name'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="type" class="col-sm-3 control-label">{tmpl_var name='type_txt'}</label> |
| | | <div class="col-sm-9"><select name="type" id="type" class="form-control"> |
| | | {tmpl_var name='type'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="snippet">{tmpl_var name='snippet_txt'}</label> |
| | | <textarea name="snippet" id="snippet" rows='10' cols='50' style="width:400px;">{tmpl_var name='snippet'}</textarea><span class="nginx"> {tmpl_var name='variables_txt'}: </span><a href="javascript:void(0);" class="addPlaceholder nginx">{DOCROOT}</a><span class="nginx">, </span><a href="javascript:void(0);" class="addPlaceholder nginx">{FASTCGIPASS}</a> |
| | | <div class="form-group"> |
| | | <label for="snippet" class="col-sm-3 control-label">{tmpl_var name='snippet_txt'}</label> |
| | | <div class="col-sm-9"><textarea class="form-control" name="snippet" id="snippet" rows='10' cols='50'>{tmpl_var name='snippet'}</textarea></div><span class="nginx"> {tmpl_var name='variables_txt'}: </span><a href="javascript:void(0);" class="addPlaceholder nginx">{DOCROOT}</a><span class="nginx">, </span><a href="javascript:void(0);" class="addPlaceholder nginx">{FASTCGIPASS}</a> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='active_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group php"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='required_php_snippets_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='required_php_snippets'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='customer_viewable_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='customer_viewable'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='active'} |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/directive_snippets_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/directive_snippets_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/directive_snippets_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/directive_snippets_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | | <script language="JavaScript" type="text/javascript"> |
| | | |
| | | if(jQuery('#type').val() == 'nginx'){ |
| | |
| | | } else { |
| | | jQuery('.nginx:visible').hide(); |
| | | } |
| | | |
| | | if (jQuery('#type').val() != 'nginx' && jQuery('#type').val() != 'apache') { |
| | | jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide(); |
| | | jQuery('.php:visible').hide(); |
| | | } else { |
| | | jQuery('#customer_viewable').closest('div.ctrlHolder:hidden').show(); |
| | | jQuery('.php:hidden').show(); |
| | | } |
| | | |
| | | jQuery('#type').change(function(){ |
| | | if (jQuery(this).val() != 'nginx' && jQuery(this).val() != 'apache') { |
| | | jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide(); |
| | | jQuery('.php:visible').hide(); |
| | | } else { |
| | | jQuery('#customer_viewable').closest('div.ctrlHolder:hidden').show(); |
| | | jQuery('.php:hidden').show(); |
| | | } |
| | | if(jQuery(this).val() == 'nginx'){ |
| | | jQuery('.nginx:hidden').show(); |
| | | } else { |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_list_directive_snippets"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('admin/directive_snippets_edit.php');"> |
| | | <span>{tmpl_var name="add_new_record_txt"}</span> |
| | | </button> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th> |
| | | <th class="tbl_col_name" scope="col"><tmpl_var name="name_txt"></th> |
| | | <th class="tbl_col_type" scope="col"><tmpl_var name="type_txt"></th> |
| | | <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th> |
| | | <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p> |
| | | |
| | | <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/directive_snippets_edit.php">{tmpl_var name="add_new_record_txt"}</button> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th class="tiny-col" data-column="active"><tmpl_var name="active_txt"></th> |
| | | <th data-column="name"><tmpl_var name="name_txt"></th> |
| | | <th data-column="type"><tmpl_var name="type_txt"></th> |
| | | <th data-column="customer_viewable"><tmpl_var name="customer_viewable_txt"></th> |
| | | <th class="small-col text-right">{tmpl_var name='search_limit'}</th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_active"><select name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td class="tbl_col_name"><input type="text" name="search_name" value="{tmpl_var name='search_name'}" /></td> |
| | | <td class="tbl_col_type"><select name="search_type">{tmpl_var name='search_type'}</select></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','admin/directive_snippets_list.php');"><span>{tmpl_var name="filter_txt"}</span></button> |
| | | <tr> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td><input class="form-control" type="text" name="search_name" value="{tmpl_var name='search_name'}" /></td> |
| | | <td><select class="form-control" name="search_type">{tmpl_var name='search_type'}</select></td> |
| | | <td><select class="form-control" name="search_customer_viewable">{tmpl_var name='search_customer_viewable'}</select></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/directive_snippets_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_active"><a href="#" onclick="loadContent('admin/directive_snippets_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a></td> |
| | | <td class="tbl_col_name"><a href="#" onclick="loadContent('admin/directive_snippets_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="name"}</a></td> |
| | | <td class="tbl_col_type"><a href="#" onclick="loadContent('admin/directive_snippets_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="type"}</a></td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/directive_snippets_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/directive_snippets_edit.php?id={tmpl_var name='id'}">{tmpl_var name="active"}</a></td> |
| | | <td><a href="#" data-load-content="admin/directive_snippets_edit.php?id={tmpl_var name='id'}">{tmpl_var name="name"}</a></td> |
| | | <td><a href="#" data-load-content="admin/directive_snippets_edit.php?id={tmpl_var name='id'}">{tmpl_var name="type"}</a></td> |
| | | <td><a href="#" data-load-content="admin/directive_snippets_edit.php?id={tmpl_var name='id'}">{tmpl_var name="customer_viewable"}</a></td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/directive_snippets_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_loop> |
| | | <tmpl_unless name="records"> |
| | | <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td colspan="4">{tmpl_var name='globalsearch_noresults_text_txt'}</td> |
| | | <td colspan="5">{tmpl_var name='globalsearch_noresults_text_txt'}</td> |
| | | </tr> |
| | | </tmpl_unless> |
| | | </tbody> |
| | | |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="4"><tmpl_var name="paging"></td> |
| | | <td colspan="5"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_firewall"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="server_id">{tmpl_var name='server_id_txt'}</label> |
| | | <select name="server_id" id="server_id" class="selectInput"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="server_id" class="col-sm-3 control-label">{tmpl_var name='server_id_txt'}</label> |
| | | <div class="col-sm-9"><select name="server_id" id="server_id" class="form-control"> |
| | | {tmpl_var name='server_id'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="tcp_port">{tmpl_var name='tcp_port_txt'}</label> |
| | | <input name="tcp_port" id="tcp_port" value="{tmpl_var name='tcp_port'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="udp_port">{tmpl_var name='udp_port_txt'}</label> |
| | | <input name="udp_port" id="udp_port" value="{tmpl_var name='udp_port'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='active_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="tcp_port" class="col-sm-3 control-label">{tmpl_var name='tcp_port_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="tcp_port" id="tcp_port" value="{tmpl_var name='tcp_port'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="udp_port" class="col-sm-3 control-label">{tmpl_var name='udp_port_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="udp_port" id="udp_port" value="{tmpl_var name='udp_port'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='active'} |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/firewall_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/firewall_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/firewall_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/firewall_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_list_firewall"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('admin/firewall_edit.php');"> |
| | | <span>{tmpl_var name="add_new_record_txt"}</span> |
| | | </button> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p> |
| | | |
| | | <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/firewall_edit.php">{tmpl_var name="add_new_record_txt"}</button> |
| | | |
| | | |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th> |
| | | <th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th> |
| | | <th class="tbl_col_tcp_port" scope="col"><tmpl_var name="tcp_port_txt"></th> |
| | | <th class="tbl_col_udp_port" scope="col"><tmpl_var name="udp_port_txt"></th> |
| | | <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th class="tiny-col" data-column="active"><tmpl_var name="active_txt"></th> |
| | | <th data-column="server_id"><tmpl_var name="server_id_txt"></th> |
| | | <th data-column="tcp_port"><tmpl_var name="tcp_port_txt"></th> |
| | | <th data-column="udp_port"><tmpl_var name="udp_port_txt"></th> |
| | | <th class="small-col text-right">{tmpl_var name='search_limit'}</th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_active"><select name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td class="tbl_col_server_id"><select name="search_server_id">{tmpl_var name='search_server_id'}</select></td> |
| | | <td class="tbl_col_tcp_port"><input type="text" name="search_tcp_port" value="{tmpl_var name='search_tcp_port'}" /></td> |
| | | <td class="tbl_col_udp_port"><input type="text" name="search_udp_port" value="{tmpl_var name='search_udp_port'}" /></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','admin/firewall_list.php');"><span>{tmpl_var name="filter_txt"}</span></button> |
| | | <tr> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td><select class="form-control" name="search_server_id">{tmpl_var name='search_server_id'}</select></td> |
| | | <td><input class="form-control" type="text" name="search_tcp_port" value="{tmpl_var name='search_tcp_port'}" /></td> |
| | | <td><input class="form-control" type="text" name="search_udp_port" value="{tmpl_var name='search_udp_port'}" /></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/firewall_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_active"><a href="#" onclick="loadContent('admin/firewall_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a></td> |
| | | <td class="tbl_col_server_id"><a href="#" onclick="loadContent('admin/firewall_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td> |
| | | <td class="tbl_col_tcp_port"><a href="#" onclick="loadContent('admin/firewall_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="tcp_port"}</a></td> |
| | | <td class="tbl_col_udp_port"><a href="#" onclick="loadContent('admin/firewall_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="udp_port"}</a></td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/firewall_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/firewall_edit.php?id={tmpl_var name='id'}">{tmpl_var name="active"}</a></td> |
| | | <td><a href="#" data-load-content="admin/firewall_edit.php?id={tmpl_var name='id'}">{tmpl_var name="server_id"}</a></td> |
| | | <td><a href="#" data-load-content="admin/firewall_edit.php?id={tmpl_var name='id'}">{tmpl_var name="tcp_port"}</a></td> |
| | | <td><a href="#" data-load-content="admin/firewall_edit.php?id={tmpl_var name='id'}">{tmpl_var name="udp_port"}</a></td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/firewall_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_loop> |
| | |
| | | |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="5"><tmpl_var name="paging"></td> |
| | | <td colspan="5"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_groups"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="name">{tmpl_var name='name_txt'}</label> |
| | | <input name="name" id="name" value="{tmpl_var name='name'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="name" class="col-sm-3 control-label">{tmpl_var name='name_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="name" id="name" value="{tmpl_var name='name'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="description" class="col-sm-3 control-label">{tmpl_var name='description_txt'}</label> |
| | | <div class="col-sm-9"><textarea class="form-control" name="description" id="description" rows='5' cols='30'>{tmpl_var name='description'}</textarea></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="description">{tmpl_var name='description_txt'}</label> |
| | | <textarea name="description" id="description" rows='5' cols='30'>{tmpl_var name='description'}</textarea> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/groups_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/groups_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/groups_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/groups_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_list_groups"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('admin/groups_edit.php');"> |
| | | <span>{tmpl_var name="add_new_record_txt"}</span> |
| | | </button> |
| | | <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p> |
| | | |
| | | <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/groups_edit.php">{tmpl_var name="add_new_record_txt"}</button> |
| | | <p><tmpl_var name="warning_txt"></p> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_name" scope="col"><tmpl_var name="name_txt"></th> |
| | | <th class="tbl_col_description" scope="col"><tmpl_var name="description_txt"></th> |
| | | <th class="tbl_col_buttons" scope="col"> </th> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th data-column="name"><tmpl_var name="name_txt"></th> |
| | | <th data-column="description"><tmpl_var name="description_txt"></th> |
| | | <th class="text-right"> </th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_name"><input type="text" name="search_name" value="{tmpl_var name='search_name'}" /></td> |
| | | <td class="tbl_col_description"><input type="text" name="search_description" value="{tmpl_var name='search_description'}" /></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','admin/groups_list.php');"><span>{tmpl_var name="filter_txt"}</span></button> |
| | | <tr> |
| | | <td><input class="form-control" type="text" name="search_name" value="{tmpl_var name='search_name'}" /></td> |
| | | <td><input class="form-control" type="text" name="search_description" value="{tmpl_var name='search_description'}" /></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/groups_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_name"><a href="#" onclick="loadContent('admin/groups_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="name"}</a></td> |
| | | <td class="tbl_col_description"><a href="#" onclick="loadContent('admin/groups_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="description"}</a></td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/groups_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/groups_edit.php?id={tmpl_var name='id'}">{tmpl_var name="name"}</a></td> |
| | | <td><a href="#" data-load-content="admin/groups_edit.php?id={tmpl_var name='id'}">{tmpl_var name="description"}</a></td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/groups_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_loop> |
| | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="3"><tmpl_var name="paging"></td> |
| | | <td colspan="3"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | <div class="panel panel_iptables"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="server_id">{tmpl_var name='server_id_txt'}</label> |
| | | <select name="server_id" id="server_id" class="selectInput"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="server_id" class="col-sm-3 control-label">{tmpl_var name='server_id_txt'}</label> |
| | | <div class="col-sm-9"><select name="server_id" id="server_id" class="form-control"> |
| | | {tmpl_var name='server_id'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="table">{tmpl_var name='table_txt'}</label> |
| | | <select name="table" id="table" class="selectInput formLengthLimit"> |
| | | <div class="form-group"> |
| | | <label for="table" class="col-sm-3 control-label">{tmpl_var name='table_txt'}</label> |
| | | <div class="col-sm-9"><select name="table" id="table" class="form-control"> |
| | | {tmpl_var name='table'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="protocol">{tmpl_var name='protocol_txt'}</label> |
| | | <select name="protocol" id="protocol" class="selectInput formLengthLimit"> |
| | | <div class="form-group"> |
| | | <label for="protocol" class="col-sm-3 control-label">{tmpl_var name='protocol_txt'}</label> |
| | | <div class="col-sm-9"><select name="protocol" id="protocol" class="form-control"> |
| | | {tmpl_var name='protocol'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="singleport">{tmpl_var name='singleport_txt'}</label> |
| | | <input name="singleport" id="singleport" value="{tmpl_var name='singleport'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="multiport">{tmpl_var name='multiport_txt'}</label> |
| | | <input name="multiport" id="multiport" value="{tmpl_var name='multiport'}" size="20" maxlength="40" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="destination_ip">{tmpl_var name='destination_ip_txt'}</label> |
| | | <input name="destination_ip" id="destination_ip" value="{tmpl_var name='destination_ip'}" size="16" maxlength="20" type="text" class="textInput formLengthIPv4" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="source_ip">{tmpl_var name='source_ip_txt'}</label> |
| | | <input name="source_ip" id="source_ip" value="{tmpl_var name='source_ip'}" size="16" maxlength="20" type="text" class="textInput formLengthIPv4" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="state">{tmpl_var name='state_txt'}</label> |
| | | <input name="state" id="state" value="{tmpl_var name='state'}" size="16" maxlength="20" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="target">{tmpl_var name='target_txt'}</label> |
| | | <select name="target" id="target" class="selectInput formLengthLimit"> |
| | | <div class="form-group"> |
| | | <label for="singleport" class="col-sm-3 control-label">{tmpl_var name='singleport_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="singleport" id="singleport" value="{tmpl_var name='singleport'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="multiport" class="col-sm-3 control-label">{tmpl_var name='multiport_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="multiport" id="multiport" value="{tmpl_var name='multiport'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="destination_ip" class="col-sm-3 control-label">{tmpl_var name='destination_ip_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="destination_ip" id="destination_ip" value="{tmpl_var name='destination_ip'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="source_ip" class="col-sm-3 control-label">{tmpl_var name='source_ip_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="source_ip" id="source_ip" value="{tmpl_var name='source_ip'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="state" class="col-sm-3 control-label">{tmpl_var name='state_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="state" id="state" value="{tmpl_var name='state'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="target" class="col-sm-3 control-label">{tmpl_var name='target_txt'}</label> |
| | | <div class="col-sm-9"><select name="target" id="target" class="form-control"> |
| | | {tmpl_var name='target'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='active_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='active'} |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/iptables_edit.php');"> |
| | | <span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/iptables_list.php');"> |
| | | <span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/iptables_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/iptables_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | |
| | | <div class="panel panel_list_iptables"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>Tools</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('admin/iptables_edit.php');"> |
| | | <span>{tmpl_var name="add_new_rule_txt"}</span> |
| | | </button> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | <p class="fieldset-legend">Tools</p> |
| | | |
| | | <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/iptables_edit.php">{tmpl_var name="add_new_rule_txt"}</button> |
| | | |
| | | |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th> |
| | | <th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th> |
| | | <th class="tbl_col_table" scope="col"><tmpl_var name="table_txt"></th> |
| | | <th class="tbl_col_protocol" scope="col"><tmpl_var name="protocol_txt"></th> |
| | | <th class="tbl_col_port" scope="col"><tmpl_var name="singleport_txt"></th> |
| | | <th class="tbl_col_port" scope="col"><tmpl_var name="multiport_txt"></th> |
| | | <th class="tbl_col_state" scope="col"><tmpl_var name="state_txt"></th> |
| | | <th class="tbl_col_target" scope="col"><tmpl_var name="target_txt"></th> |
| | | <th class="tbl_col_buttons" scope="col"> </th> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th class="tiny-col" data-column="active"><tmpl_var name="active_txt"></th> |
| | | <th data-column="server_id"><tmpl_var name="server_id_txt"></th> |
| | | <th data-column="table"><tmpl_var name="table_txt"></th> |
| | | <th data-column="protocol"><tmpl_var name="protocol_txt"></th> |
| | | <th data-column="singleport"><tmpl_var name="singleport_txt"></th> |
| | | <th data-column="multiport"><tmpl_var name="multiport_txt"></th> |
| | | <th data-column="state"><tmpl_var name="state_txt"></th> |
| | | <th data-column="target"><tmpl_var name="target_txt"></th> |
| | | <th class="text-right"> </th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_active"><select name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td class="tbl_col_server_id"><select name="search_server_id">{tmpl_var name='search_server_id'}</select></td> |
| | | <td class="tbl_col_table"></td> |
| | | <td class="tbl_col_protocol"><select name="search_protocol">{tmpl_var name='search_protocol'}</select></td> |
| | | <td class="tbl_col_singleport"></td> |
| | | <td class="tbl_col_multiport"></td> |
| | | <td class="tbl_col_state"></td> |
| | | <td class="tbl_col_target"><select name="search_target">{tmpl_var name='search_target'}</select></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','admin/iptables_list.php');"><span>{tmpl_var name="filter_txt"}filter_txt</span></button> |
| | | <tr> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td><select class="form-control" name="search_server_id">{tmpl_var name='search_server_id'}</select></td> |
| | | <td></td> |
| | | <td><select class="form-control" name="search_protocol">{tmpl_var name='search_protocol'}</select></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td></td> |
| | | <td><select class="form-control" name="search_target">{tmpl_var name='search_target'}</select></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/iptables_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_active"><a href="#" onclick="loadContent('admin/iptables_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a></td> |
| | | <td class="tbl_col_server_id"><a href="#" onclick="loadContent('admin/iptables_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td> |
| | | <td class="tbl_col_table"><a href="#" onclick="loadContent('admin/iptables_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="table"}</a></td> |
| | | <td class="tbl_col_protocol"><a href="#" onclick="loadContent('admin/iptables_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="protocol"}</a></td> |
| | | <td class="tbl_col_singleport"><a href="#" onclick="loadContent('admin/iptables_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="singleport"}</a></td> |
| | | <td class="tbl_col_multiport"><a href="#" onclick="loadContent('admin/iptables_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="multiport"}</a></td> |
| | | <td class="tbl_col_state"><a href="#" onclick="loadContent('admin/iptables_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="state"}</a></td> |
| | | <td class="tbl_col_target"><a href="#" onclick="loadContent('admin/iptables_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="target"}</a></td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/iptables_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/iptables_edit.php?id={tmpl_var name='id'}">{tmpl_var name="active"}</a></td> |
| | | <td><a href="#" data-load-content="admin/iptables_edit.php?id={tmpl_var name='id'}">{tmpl_var name="server_id"}</a></td> |
| | | <td><a href="#" data-load-content="admin/iptables_edit.php?id={tmpl_var name='id'}">{tmpl_var name="table"}</a></td> |
| | | <td><a href="#" data-load-content="admin/iptables_edit.php?id={tmpl_var name='id'}">{tmpl_var name="protocol"}</a></td> |
| | | <td><a href="#" data-load-content="admin/iptables_edit.php?id={tmpl_var name='id'}">{tmpl_var name="singleport"}</a></td> |
| | | <td><a href="#" data-load-content="admin/iptables_edit.php?id={tmpl_var name='id'}">{tmpl_var name="multiport"}</a></td> |
| | | <td><a href="#" data-load-content="admin/iptables_edit.php?id={tmpl_var name='id'}">{tmpl_var name="state"}</a></td> |
| | | <td><a href="#" data-load-content="admin/iptables_edit.php?id={tmpl_var name='id'}">{tmpl_var name="target"}</a></td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/iptables_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_loop> |
| | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="9"><tmpl_var name="paging"></td> |
| | | <td colspan="9"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_language_add"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>Language Add</legend> |
| | | <div class="ctrlHolder"> |
| | | <label for="lng_select">{tmpl_var name='language_select_txt'}</label> |
| | | <select name="lng_select" id="language" class="selectInput flags"> |
| | | <legend>Language Add</legend> |
| | | <div class="form-group"> |
| | | <label for="lng_select" class="col-sm-3 control-label">{tmpl_var name='language_select_txt'}</label> |
| | | <div class="col-sm-9"><select name="lng_select" id="language" class="form-control flags"> |
| | | {tmpl_var name='language_option'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="lng_new">{tmpl_var name='language_new_txt'}</label> |
| | | <input name="lng_new" id="lng_new" value="" size="30" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | <p class="formHint">{tmpl_var name='language_new_hint_txt'}</p> |
| | | <div class="form-group"> |
| | | <label for="lng_new" class="col-sm-3 control-label">{tmpl_var name='language_new_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="lng_new" id="lng_new" value="" class="form-control" /></div><p class="formHint">{tmpl_var name='language_new_hint_txt'}</p> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/language_add.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/language_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/language_add.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/language_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_language_complete"> |
| | |
| | | </tmpl_if> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>Language Complete</legend> |
| | | <div class="ctrlHolder"> |
| | | <label for="lng_select">{tmpl_var name='language_select_txt'}</label> |
| | | <select name="lng_select" id="language" class="selectInput flags"> |
| | | <legend>Language Complete</legend> |
| | | <div class="form-group"> |
| | | <label for="lng_select" class="col-sm-3 control-label">{tmpl_var name='language_select_txt'}</label> |
| | | <div class="col-sm-9"><select name="lng_select" id="language" class="form-control flags"> |
| | | {tmpl_var name='language_option'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/language_complete.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/language_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </fieldset> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/language_complete.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/language_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | | |
| | | |
| | | |
| | | </div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_language_edit"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset id="wf_area_language_edit"><legend>Language File Edit: {tmpl_var name="file_path"}</legend> |
| | | <span class="wf_oneField"> |
| | | <tmpl_loop name="records"> |
| | | <span class="wf_oneField"> |
| | | <label for="records[{tmpl_var name="key"}]" class="wf_preField">{tmpl_var name="key"}</label> |
| | | <input type="text" id="records[{tmpl_var name="key"}]" name="records[{tmpl_var name="key"}]" value="{tmpl_var name='val'}" size="50" > |
| | | </span> |
| | | <div class="col-sm-9"><input class="form-control" type="text" id="records[{tmpl_var name="key"}]" name="records[{tmpl_var name="key"}]" value="{tmpl_var name='val'}" ></div></span> |
| | | </tmpl_loop> |
| | | </span> |
| | | </fieldset> |
| | |
| | | <input type="hidden" name="module" value="{tmpl_var name='module'}"> |
| | | |
| | | <div class="wf_actions buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/language_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/language_list.php?lng_select={tmpl_var name='lang'}');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/language_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/language_list.php?lng_select={tmpl_var name='lang'}">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_language_export"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>Language Export</legend> |
| | | <div class="ctrlHolder"> |
| | | <label for="lng_select">{tmpl_var name='language_select_txt'}</label> |
| | | <select name="lng_select" id="lng_select" class="selectInput flags"> |
| | | |
| | | <legend>Language Export</legend> |
| | | <div class="form-group"> |
| | | <label for="lng_select" class="col-sm-3 control-label">{tmpl_var name='language_select_txt'}</label> |
| | | <div class="col-sm-9"><select name="lng_select" id="lng_select" class="form-control flags"> |
| | | {tmpl_var name='language_option'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | |
| | | |
| | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/language_export.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/language_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | |
| | | </fieldset> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/language_export.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/language_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_language_import"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>Language Import</legend> |
| | | <div class="ctrlHolder"> |
| | | <label for="lng_select">{tmpl_var name='language_import_txt'}</label> |
| | | |
| | | <legend>Language Import</legend> |
| | | <div class="form-group"> |
| | | <label for="lng_select" class="col-sm-3 control-label">{tmpl_var name='language_import_txt'}</label> |
| | | <input name="file" id="file" size="30" type="file" class="fileUpload" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='language_overwrite_txt'}</p> |
| | | <div class="multiField"> |
| | | <input id="overwrite" type="checkbox" value="1" name="overwrite"/> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='language_overwrite_txt'}</label> |
| | | <div class="col-sm-9"><input class="form-control" type="checkbox" id="overwrite" value="1" name="overwrite"/></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='ignore_version_txt'}</p> |
| | | <div class="multiField"> |
| | | <input id="ignore_version" type="checkbox" value="1" name="ignore_version"/> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='ignore_version_txt'}</label> |
| | | <div class="col-sm-9"><input class="form-control" type="checkbox" id="ignore_version" value="1" name="ignore_version"/></div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <div id="OKMsg"><p><tmpl_var name="msg"></p></div> |
| | | </tmpl_if> |
| | | <tmpl_if name="error"> |
| | | <div id="errorMsg"><h3>ERROR</h3><ol><tmpl_var name="error"></ol></div> |
| | | <div id="errorMsg"><h3><tmpl_var name="error_txt"></h3><ol><tmpl_var name="error"></ol></div> |
| | | </tmpl_if> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitUploadForm('pageForm','admin/language_import.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/language_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | |
| | | </fieldset> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/language_import.php" data-form-upload="true">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/language_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_language_groups"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset class="inlineLabels"><legend>Tools</legend> |
| | | <div class="buttons"> |
| | | <div class="ctrlHolder"> |
| | | <label for="lng_select">{tmpl_var name='language_select_txt'}</label> |
| | | <select name="lng_select" id="language" class="selectInput flags" onChange="submitForm('pageForm','admin/language_list.php');"> |
| | | <legend>Tools</legend> |
| | | |
| | | <div class="form-group"> |
| | | <label for="lng_select" class="col-sm-3 control-label">{tmpl_var name='language_select_txt'}</label> |
| | | <div class="col-sm-9"><select name="lng_select" id="language" class="form-control flags" onChange="ISPConfig.submitForm('pageForm','admin/language_list.php');"> |
| | | {tmpl_var name='language_option'} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | </select></div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_module" scope="col"><tmpl_var name="module_txt"></th> |
| | | <th class="tbl_col_lang_file" scope="col"><tmpl_var name="lang_file_txt"></th> |
| | | <th class="tbl_col_limit" scope="col"><tmpl_var name="lang_file_date_txt"></th> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th data-column="module"><tmpl_var name="module_txt"></th> |
| | | <th data-column="lang_file"><tmpl_var name="lang_file_txt"></th> |
| | | <th class="small-col text-right" data-column="lang_file_date"><tmpl_var name="lang_file_date_txt"></th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_module"><a href="#" onclick="loadContent('admin/language_edit.php?lang_file={tmpl_var name="lang_file"}&module={tmpl_var name="module"}&lang={tmpl_var name="lang"}');">{tmpl_var name="module"}</a></td> |
| | | <td class="tbl_col_lang_file"><a href="#" onclick="loadContent('admin/language_edit.php?lang_file={tmpl_var name="lang_file"}&module={tmpl_var name="module"}&lang={tmpl_var name="lang"}');">{tmpl_var name="lang_file"}</a></td> |
| | | <td><a href="#" onclick="loadContent('admin/language_edit.php?lang_file={tmpl_var name="lang_file"}&module={tmpl_var name="module"}&lang={tmpl_var name="lang"}');">{tmpl_var name="lang_file_date"}</a></td> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/language_edit.php?lang_file={tmpl_var name="lang_file"}&module={tmpl_var name="module"}&lang={tmpl_var name="lang"}">{tmpl_var name="module"}</a></td> |
| | | <td><a href="#" data-load-content="admin/language_edit.php?lang_file={tmpl_var name="lang_file"}&module={tmpl_var name="module"}&lang={tmpl_var name="lang"}">{tmpl_var name="lang_file"}</a></td> |
| | | <td><a href="#" data-load-content="admin/language_edit.php?lang_file={tmpl_var name="lang_file"}&module={tmpl_var name="module"}&lang={tmpl_var name="lang"}">{tmpl_var name="lang_file_date"}</a></td> |
| | | </tr> |
| | | </tmpl_loop> |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="3"><tmpl_var name="paging"></td> |
| | | <td colspan="3"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <!-- |
| | | <h2><tmpl_var name="do_ispcupdate_caption"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="do_ispcupdate_caption"></h1> |
| | | </div> |
| | | <p><tmpl_var name="do_ispcupdate_desc"></p> |
| | | --> |
| | | |
| | | <h2><tmpl_var name="ispconfig_update_title"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="ispconfig_update_title"></h1> |
| | | </div> |
| | | <p style="margin-top:50px; font-size:14px;"><tmpl_var name="ispconfig_update_text"></p> |
| | | |
| | | <div class="panel panel_language_add"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <!-- |
| | | <fieldset class="inlineLabels"><legend>{tmpl_var name='do_ispcupdate_caption'}</legend> |
| | | <div class="ctrlHolder"> |
| | | <label for="server_select">{tmpl_var name='select_server_txt'}</label> |
| | | <select name="server_select" id="server" class="selectInput" onchange="document.getElementById('OKMsg').style.visibility = 'hidden'; "> |
| | | <legend>{tmpl_var name='do_ispcupdate_caption'}</legend> |
| | | <div class="form-group"> |
| | | <label for="server_select" class="col-sm-3 control-label">{tmpl_var name='select_server_txt'}</label> |
| | | <div class="col-sm-9"><select name="server_select" id="server" class="form-control" onchange="document.getElementById('OKMsg').style.visibility = 'hidden'; "> |
| | | {tmpl_var name='server_option'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <tmpl_if name="msg"> |
| | | <div id="OKMsg"><p><tmpl_var name="msg"></p></div> |
| | | </tmpl_if> |
| | | |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_do_txt'}" onclick="submitForm('pageForm','admin/remote_action_ispcupdate.php');"><span>{tmpl_var name='btn_do_txt'}</span></button> |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_do_txt'}" data-submit-form="pageForm" data-form-action="admin/remote_action_ispcupdate.php">{tmpl_var name='btn_do_txt'}</button> |
| | | </div></div> |
| | | --> |
| | | </div> |
| | | |
| | |
| | | <h2><tmpl_var name="do_osupdate_caption"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="do_osupdate_caption"></h1> |
| | | </div> |
| | | <p><tmpl_var name="do_osupdate_desc"></p> |
| | | |
| | | <div class="panel panel_language_add"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>{tmpl_var name='do_osupdate_caption'}</legend> |
| | | <div class="ctrlHolder"> |
| | | <label for="server_select">{tmpl_var name='select_server_txt'}</label> |
| | | <select name="server_select" id="server" class="selectInput" onchange="$('#OKMsg').hide(); "> |
| | | |
| | | <legend>{tmpl_var name='do_osupdate_caption'}</legend> |
| | | <div class="form-group"> |
| | | <label for="server_select" class="col-sm-3 control-label">{tmpl_var name='select_server_txt'}</label> |
| | | <div class="col-sm-9"><select name="server_select" id="server" class="form-control" onchange="$('#OKMsg').hide(); "> |
| | | {tmpl_var name='server_option'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <tmpl_if name="msg"> |
| | | <div id="OKMsg"><p><tmpl_var name="msg"></p></div> |
| | | </tmpl_if> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_do_txt'}" onclick="submitForm('pageForm','admin/remote_action_osupdate.php');"><span>{tmpl_var name='btn_do_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_do_txt'}" data-submit-form="pageForm" data-form-action="admin/remote_action_osupdate.php">{tmpl_var name='btn_do_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_ftp_user"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="remote_username">{tmpl_var name='username_txt'}</label> |
| | | <p class="prefix">{tmpl_var name='username_prefix'}</p> |
| | | <input name="remote_username" id="username" value="{tmpl_var name='remote_username'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label for="remote_username" class="col-sm-3 control-label">{tmpl_var name='username_txt'}</label> |
| | | <div class="col-sm-2">{tmpl_var name='username_prefix'}</div> |
| | | <div class="col-sm-7"><input type="text" name="remote_username" id="username" value="{tmpl_var name='remote_username'}" class="form-control" /></div></div> |
| | | |
| | | <div class="ctrlHolder"> |
| | | <label for="remote_password">{tmpl_var name='password_txt'}</label> |
| | | <input name="remote_password" id="password" value="{tmpl_var name='remote_password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> |
| | | <div class="form-group"> |
| | | <label for="remote_password" class="col-sm-3 control-label">{tmpl_var name='password_txt'}</label> |
| | | <div class="col-sm-6"><input type="password" name="remote_password" id="password" value="{tmpl_var name='remote_password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /></div><div class="col-sm-3 input-sm"> </div><a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='password_strength_txt'}</p> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='password_strength_txt'}</label> |
| | | <div id="passBar"></div> |
| | | <p class="formHint"><span id="passText"> </span></p> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> |
| | | <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="repeat_password" class="col-sm-3 control-label">{tmpl_var name='repeat_password_txt'}</label> |
| | | <div class="col-sm-9"><input type="password" name="repeat_password" id="repeat_password" value="" class="form-control" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /></div></div> |
| | | <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> |
| | | <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='function_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='function_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='remote_functions'} |
| | | </div> |
| | | </div> |
| | | |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="remote_userid" value="{tmpl_var name='id'}"> |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/remote_user_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/remote_user_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/remote_user_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/remote_user_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | <div class="panel panel_list_users"> |
| | | |
| | | <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p> |
| | | |
| | | <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/remote_user_edit.php">{tmpl_var name="add_new_record_txt"}</button> |
| | | |
| | | |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('admin/remote_user_edit.php');"> |
| | | <span>{tmpl_var name="add_new_record_txt"}</span> |
| | | </button> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_remote_userid" scope="col"><tmpl_var name="parent_remote_userid_txt"></th> |
| | | <th class="tbl_col_remote_username" scope="col"><tmpl_var name="username_txt"></th> |
| | | <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th> |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th data-column="parent_remote_userid"><tmpl_var name="parent_remote_userid_txt"></th> |
| | | <th data-column="username"><tmpl_var name="username_txt"></th> |
| | | <th class="small-col text-right">{tmpl_var name='search_limit'}</th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_remote_userid"> </td> |
| | | <td class="tbl_col_remote_username"><input type="text" name="search_username" value="{tmpl_var name='search_username'}" /></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','admin/remote_user_list.php');"><span>{tmpl_var name="filter_txt"}</span></button> |
| | | <tr> |
| | | <td> </td> |
| | | <td><input class="form-control" type="text" name="search_username" value="{tmpl_var name='search_username'}" /></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/remote_user_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_remote_userid"><a href="#" onclick="loadContent('admin/remote_user_edit.php?id={tmpl_var name='remote_userid'}');">{tmpl_var name="remote_userid"}</a></td> |
| | | <td class="tbl_col_remote_username"><a href="#" onclick="loadContent('admin/remote_user_edit.php?id={tmpl_var name='remote_userid'}');">{tmpl_var name="remote_username"}</a></td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/remote_user_del.php?id={tmpl_var name='remote_userid'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/remote_user_edit.php?id={tmpl_var name='remote_userid'}">{tmpl_var name="remote_userid"}</a></td> |
| | | <td><a href="#" data-load-content="admin/remote_user_edit.php?id={tmpl_var name='remote_userid'}">{tmpl_var name="remote_username"}</a></td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/remote_user_del.php?id={tmpl_var name='remote_userid'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_loop> |
| | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="5"><tmpl_var name="paging"></td> |
| | | <td colspan="3"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="init_script">{tmpl_var name='init_script_txt'}</label> |
| | | <input name="init_script" id="init_script" value="{tmpl_var name='init_script'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="crontab_dir">{tmpl_var name='crontab_dir_txt'}</label> |
| | | <input name="crontab_dir" id="crontab_dir" value="{tmpl_var name='crontab_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="wget">{tmpl_var name='wget_txt'}</label> |
| | | <input name="wget" id="wget" value="{tmpl_var name='wget'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="init_script" class="col-sm-3 control-label">{tmpl_var name='init_script_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="init_script" id="init_script" value="{tmpl_var name='init_script'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="crontab_dir" class="col-sm-3 control-label">{tmpl_var name='crontab_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="crontab_dir" id="crontab_dir" value="{tmpl_var name='crontab_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="wget" class="col-sm-3 control-label">{tmpl_var name='wget_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="wget" id="wget" value="{tmpl_var name='wget'}" class="form-control" /></div></div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="bind_user">{tmpl_var name='bind_user_txt'}</label> |
| | | <input name="bind_user" id="bind_user" value="{tmpl_var name='bind_user'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bind_group">{tmpl_var name='bind_group_txt'}</label> |
| | | <input name="bind_group" id="bind_group" value="{tmpl_var name='bind_group'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bind_zonefiles_dir">{tmpl_var name='bind_zonefiles_dir_txt'}</label> |
| | | <input name="bind_zonefiles_dir" id="bind_zonefiles_dir" value="{tmpl_var name='bind_zonefiles_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="named_conf_path">{tmpl_var name='named_conf_path_txt'}</label> |
| | | <input name="named_conf_path" id="named_conf_path" value="{tmpl_var name='named_conf_path'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="named_conf_local_path">{tmpl_var name='named_conf_local_path_txt'}</label> |
| | | <input name="named_conf_local_path" id="named_conf_local_path" value="{tmpl_var name='named_conf_local_path'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="bind_user" class="col-sm-3 control-label">{tmpl_var name='bind_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="bind_user" id="bind_user" value="{tmpl_var name='bind_user'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="bind_group" class="col-sm-3 control-label">{tmpl_var name='bind_group_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="bind_group" id="bind_group" value="{tmpl_var name='bind_group'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="bind_zonefiles_dir" class="col-sm-3 control-label">{tmpl_var name='bind_zonefiles_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="bind_zonefiles_dir" id="bind_zonefiles_dir" value="{tmpl_var name='bind_zonefiles_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="named_conf_path" class="col-sm-3 control-label">{tmpl_var name='named_conf_path_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="named_conf_path" id="named_conf_path" value="{tmpl_var name='named_conf_path'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="named_conf_local_path" class="col-sm-3 control-label">{tmpl_var name='named_conf_local_path_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="named_conf_local_path" id="named_conf_local_path" value="{tmpl_var name='named_conf_local_path'}" class="form-control" /></div></div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="fastcgi_starter_path">{tmpl_var name='fastcgi_starter_path_txt'}</label> |
| | | <input name="fastcgi_starter_path" id="fastcgi_starter_path" value="{tmpl_var name='fastcgi_starter_path'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="fastcgi_starter_script">{tmpl_var name='fastcgi_starter_script_txt'}</label> |
| | | <input name="fastcgi_starter_script" id="fastcgi_starter_script" value="{tmpl_var name='fastcgi_starter_script'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="fastcgi_alias">{tmpl_var name='fastcgi_alias_txt'}</label> |
| | | <input name="fastcgi_alias" id="fastcgi_alias" value="{tmpl_var name='fastcgi_alias'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="fastcgi_phpini_path">{tmpl_var name='fastcgi_phpini_path_txt'}</label> |
| | | <input name="fastcgi_phpini_path" id="fastcgi_phpini_path" value="{tmpl_var name='fastcgi_phpini_path'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="fastcgi_children">{tmpl_var name='fastcgi_children_txt'}</label> |
| | | <input name="fastcgi_children" id="fastcgi_children" value="{tmpl_var name='fastcgi_children'}" size="40" maxlength="255" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="fastcgi_max_requests">{tmpl_var name='fastcgi_max_requests_txt'}</label> |
| | | <input name="fastcgi_max_requests" id="fastcgi_max_requests" value="{tmpl_var name='fastcgi_max_requests'}" size="40" maxlength="255" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="fastcgi_bin">{tmpl_var name='fastcgi_bin_txt'}</label> |
| | | <input name="fastcgi_bin" id="fastcgi_bin" value="{tmpl_var name='fastcgi_bin'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="fastcgi_config_syntax">{tmpl_var name='fastcgi_config_syntax_txt'}</label> |
| | | <select name="fastcgi_config_syntax" id="fastcgi_config_syntax" class="selectInput"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="fastcgi_starter_path" class="col-sm-3 control-label">{tmpl_var name='fastcgi_starter_path_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="fastcgi_starter_path" id="fastcgi_starter_path" value="{tmpl_var name='fastcgi_starter_path'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="fastcgi_starter_script" class="col-sm-3 control-label">{tmpl_var name='fastcgi_starter_script_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="fastcgi_starter_script" id="fastcgi_starter_script" value="{tmpl_var name='fastcgi_starter_script'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="fastcgi_alias" class="col-sm-3 control-label">{tmpl_var name='fastcgi_alias_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="fastcgi_alias" id="fastcgi_alias" value="{tmpl_var name='fastcgi_alias'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="fastcgi_phpini_path" class="col-sm-3 control-label">{tmpl_var name='fastcgi_phpini_path_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="fastcgi_phpini_path" id="fastcgi_phpini_path" value="{tmpl_var name='fastcgi_phpini_path'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="fastcgi_children" class="col-sm-3 control-label">{tmpl_var name='fastcgi_children_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="fastcgi_children" id="fastcgi_children" value="{tmpl_var name='fastcgi_children'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="fastcgi_max_requests" class="col-sm-3 control-label">{tmpl_var name='fastcgi_max_requests_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="fastcgi_max_requests" id="fastcgi_max_requests" value="{tmpl_var name='fastcgi_max_requests'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="fastcgi_bin" class="col-sm-3 control-label">{tmpl_var name='fastcgi_bin_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="fastcgi_bin" id="fastcgi_bin" value="{tmpl_var name='fastcgi_bin'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="fastcgi_config_syntax" class="col-sm-3 control-label">{tmpl_var name='fastcgi_config_syntax_txt'}</label> |
| | | <div class="col-sm-9"><select name="fastcgi_config_syntax" id="fastcgi_config_syntax" class="form-control"> |
| | | {tmpl_var name='fastcgi_config_syntax'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="getmail_config_dir">{tmpl_var name='getmail_config_dir_txt'}</label> |
| | | <input name="getmail_config_dir" id="getmail_config_dir" value="{tmpl_var name='getmail_config_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="getmail_config_dir" class="col-sm-3 control-label">{tmpl_var name='getmail_config_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="getmail_config_dir" id="getmail_config_dir" value="{tmpl_var name='getmail_config_dir'}" class="form-control" /></div></div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="jailkit_chroot_home">{tmpl_var name='jailkit_chroot_home_txt'}</label> |
| | | <input name="jailkit_chroot_home" id="jailkit_chroot_home" value="{tmpl_var name='jailkit_chroot_home'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="jailkit_chroot_app_sections">{tmpl_var name='jailkit_chroot_app_sections_txt'}</label> |
| | | <input name="jailkit_chroot_app_sections" id="jailkit_chroot_app_sections" value="{tmpl_var name='jailkit_chroot_app_sections'}" size="40" maxlength="1000" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="jailkit_chroot_app_programs">{tmpl_var name='jailkit_chroot_app_programs_txt'}</label> |
| | | <input name="jailkit_chroot_app_programs" id="jailkit_chroot_app_programs" value="{tmpl_var name='jailkit_chroot_app_programs'}" size="40" maxlength="1000" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="jailkit_chroot_cron_programs">{tmpl_var name='jailkit_chroot_cron_programs_txt'}</label> |
| | | <input name="jailkit_chroot_cron_programs" id="jailkit_chroot_cron_programs" value="{tmpl_var name='jailkit_chroot_cron_programs'}" size="40" maxlength="1000" type="text" class="textInput" /> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="jailkit_chroot_home" class="col-sm-3 control-label">{tmpl_var name='jailkit_chroot_home_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="jailkit_chroot_home" id="jailkit_chroot_home" value="{tmpl_var name='jailkit_chroot_home'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="jailkit_chroot_app_sections" class="col-sm-3 control-label">{tmpl_var name='jailkit_chroot_app_sections_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="jailkit_chroot_app_sections" id="jailkit_chroot_app_sections" value="{tmpl_var name='jailkit_chroot_app_sections'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="jailkit_chroot_app_programs" class="col-sm-3 control-label">{tmpl_var name='jailkit_chroot_app_programs_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="jailkit_chroot_app_programs" id="jailkit_chroot_app_programs" value="{tmpl_var name='jailkit_chroot_app_programs'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="jailkit_chroot_cron_programs" class="col-sm-3 control-label">{tmpl_var name='jailkit_chroot_cron_programs_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="jailkit_chroot_cron_programs" id="jailkit_chroot_cron_programs" value="{tmpl_var name='jailkit_chroot_cron_programs'}" class="form-control" /></div></div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_list_server_config"> |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_server_name" scope="col"><tmpl_var name="server_name_txt"></th> |
| | | <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th> |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th data-column="server_name"><tmpl_var name="server_name_txt"></th> |
| | | <th class="small-col text-right">{tmpl_var name='search_limit'}</th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_server_name"><input type="text" name="search_server_name" value="{tmpl_var name='search_server_name'}" /></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','admin/server_config_list.php');"><span>{tmpl_var name="filter_txt"}</span></button> |
| | | <tr> |
| | | <td><input class="form-control" type="text" name="search_server_name" value="{tmpl_var name='search_server_name'}" /></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/server_config_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_server_name"><a href="#" onclick="loadContent('admin/server_config_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_name"}</a></td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/server_config_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/server_config_edit.php?id={tmpl_var name='id'}">{tmpl_var name="server_name"}</a></td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/server_config_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_loop> |
| | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="2"><tmpl_var name="paging"></td> |
| | | <td colspan="2"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="module">{tmpl_var name='module_txt'}</label> |
| | | <select name="module" id="module" class="selectInput formLengthHalf"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="module" class="col-sm-3 control-label">{tmpl_var name='module_txt'}</label> |
| | | <div class="col-sm-9"><select name="module" id="module" class="form-control"> |
| | | {tmpl_var name='module'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="maildir_path">{tmpl_var name='maildir_path_txt'}</label> |
| | | <input name="maildir_path" id="maildir_path" value="{tmpl_var name='maildir_path'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="homedir_path">{tmpl_var name='homedir_path_txt'}</label> |
| | | <input name="homedir_path" id="homedir_path" value="{tmpl_var name='homedir_path'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="dkim_path">{tmpl_var name='dkim_path_txt'}</label> |
| | | <input name="dkim_path" id="dkim_path" value="{tmpl_var name='dkim_path'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='dkim_strength_txt'}</p> |
| | | <div class="multiField"> |
| | | <select name="dkim_strength" id="dkim_strength" class="selectInput"> |
| | | {tmpl_var name='dkim_strength'} |
| | | </select> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="maildir_path" class="col-sm-3 control-label">{tmpl_var name='maildir_path_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="maildir_path" id="maildir_path" value="{tmpl_var name='maildir_path'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='maildir_format_txt'}</label> |
| | | <div class="col-sm-9"><select name="maildir_format" id="maildir_format" class="form-control"> |
| | | {tmpl_var name='maildir_format'} |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='pop3_imap_daemon_txt'}</p> |
| | | <div class="multiField"> |
| | | <select name="pop3_imap_daemon" id="pop3_imap_daemon" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="homedir_path" class="col-sm-3 control-label">{tmpl_var name='homedir_path_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="homedir_path" id="homedir_path" value="{tmpl_var name='homedir_path'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="dkim_path" class="col-sm-3 control-label">{tmpl_var name='dkim_path_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="dkim_path" id="dkim_path" value="{tmpl_var name='dkim_path'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='dkim_strength_txt'}</label> |
| | | <div class="col-sm-9"><select name="dkim_strength" id="dkim_strength" class="form-control"> |
| | | {tmpl_var name='dkim_strength'} |
| | | </select></div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='pop3_imap_daemon_txt'}</label> |
| | | <div class="col-sm-9"><select name="pop3_imap_daemon" id="pop3_imap_daemon" class="form-control"> |
| | | {tmpl_var name='pop3_imap_daemon'} |
| | | </select> |
| | | </div> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='mail_filter_syntax_txt'}</p> |
| | | <div class="multiField"> |
| | | <select name="mail_filter_syntax" id="mail_filter_syntax" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='mail_filter_syntax_txt'}</label> |
| | | <div class="col-sm-9"><select name="mail_filter_syntax" id="mail_filter_syntax" class="form-control"> |
| | | {tmpl_var name='mail_filter_syntax'} |
| | | </select> |
| | | </div> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="mailuser_uid">{tmpl_var name='mailuser_uid_txt'}</label> |
| | | <input name="mailuser_uid" id="mailuser_uid" value="{tmpl_var name='mailuser_uid'}" size="10" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="mailuser_gid">{tmpl_var name='mailuser_gid_txt'}</label> |
| | | <input name="mailuser_gid" id="mailuser_gid" value="{tmpl_var name='mailuser_gid'}" size="10" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="mailuser_name">{tmpl_var name='mailuser_name_txt'}</label> |
| | | <input name="mailuser_name" id="mailuser_name" value="{tmpl_var name='mailuser_name'}" size="10" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="mailuser_group">{tmpl_var name='mailuser_group_txt'}</label> |
| | | <input name="mailuser_group" id="mailuser_group" value="{tmpl_var name='mailuser_group'}" size="10" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='mailbox_virtual_uidgid_maps_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="mailuser_uid" class="col-sm-3 control-label">{tmpl_var name='mailuser_uid_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="mailuser_uid" id="mailuser_uid" value="{tmpl_var name='mailuser_uid'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="mailuser_gid" class="col-sm-3 control-label">{tmpl_var name='mailuser_gid_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="mailuser_gid" id="mailuser_gid" value="{tmpl_var name='mailuser_gid'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="mailuser_name" class="col-sm-3 control-label">{tmpl_var name='mailuser_name_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="mailuser_name" id="mailuser_name" value="{tmpl_var name='mailuser_name'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="mailuser_group" class="col-sm-3 control-label">{tmpl_var name='mailuser_group_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="mailuser_group" id="mailuser_group" value="{tmpl_var name='mailuser_group'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='mailbox_virtual_uidgid_maps_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='mailbox_virtual_uidgid_maps'} {tmpl_var name='mailbox_virtual_uidgid_maps_info_txt'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="relayhost">{tmpl_var name='relayhost_txt'}</label> |
| | | <input name="relayhost" id="relayhost" value="{tmpl_var name='relayhost'}" size="40" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | <div class="form-group"> |
| | | <label for="relayhost" class="col-sm-3 control-label">{tmpl_var name='relayhost_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="relayhost" id="relayhost" value="{tmpl_var name='relayhost'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="relayhost_user" class="col-sm-3 control-label">{tmpl_var name='relayhost_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="relayhost_user" id="relayhost_user" value="{tmpl_var name='relayhost_user'}" autocomplete="off" class="form-control" autocomplete="off" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="relayhost_password" class="col-sm-3 control-label">{tmpl_var name='relayhost_password_txt'}</label> |
| | | <div class="col-sm-9"><input type="password" name="relayhost_password" id="relayhost_password" value="{tmpl_var name='relayhost_password'}" autocomplete="off" class="form-control" autocomplete="off" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='reject_sender_login_mismatch_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='reject_sender_login_mismatch'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="relayhost_user">{tmpl_var name='relayhost_user_txt'}</label> |
| | | <input name="relayhost_user" id="relayhost_user" value="{tmpl_var name='relayhost_user'}" size="40" maxlength="255" type="text" autocomplete="off" class="textInput formLengthHalf" autocomplete="off" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="relayhost_password">{tmpl_var name='relayhost_password_txt'}</label> |
| | | <input name="relayhost_password" id="relayhost_password" value="{tmpl_var name='relayhost_password'}" size="40" maxlength="255" type="password" autocomplete="off" class="textInput formLengthHalf" autocomplete="off" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="mailbox_size_limit">{tmpl_var name='mailbox_size_limit_txt'}</label> |
| | | <input name="mailbox_size_limit" id="mailbox_size_limit" value="{tmpl_var name='mailbox_size_limit'}" size="10" maxlength="15" type="text" class="textInput formLengthLimit" /> MB |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="message_size_limit">{tmpl_var name='message_size_limit_txt'}</label> |
| | | <input name="message_size_limit" id="message_size_limit" value="{tmpl_var name='message_size_limit'}" size="10" maxlength="15" type="text" class="textInput formLengthLimit" /> MB |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='mailbox_quota_stats_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="mailbox_size_limit" class="col-sm-3 control-label">{tmpl_var name='mailbox_size_limit_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="mailbox_size_limit" id="mailbox_size_limit" value="{tmpl_var name='mailbox_size_limit'}" class="form-control" /></div><div class="col-sm-3 input-sm"> MB |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label for="message_size_limit" class="col-sm-3 control-label">{tmpl_var name='message_size_limit_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="message_size_limit" id="message_size_limit" value="{tmpl_var name='message_size_limit'}" class="form-control" /></div><div class="col-sm-3 input-sm"> MB |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='mailbox_quota_stats_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='mailbox_quota_stats'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="realtime_blackhole_list">{tmpl_var name='realtime_blackhole_list_txt'}</label> |
| | | <input name="realtime_blackhole_list" id="realtime_blackhole_list" value="{tmpl_var name='realtime_blackhole_list'}" size="40" maxlength="255" type="text" class="textInput" /> {tmpl_var name='realtime_blackhole_list_note_txt'} |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='overquota_notify_admin_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="realtime_blackhole_list" class="col-sm-3 control-label">{tmpl_var name='realtime_blackhole_list_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="realtime_blackhole_list" id="realtime_blackhole_list" value="{tmpl_var name='realtime_blackhole_list'}" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='realtime_blackhole_list_note_txt'} |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='overquota_notify_admin_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='overquota_notify_admin'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='overquota_notify_client_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='overquota_notify_client_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='overquota_notify_client'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="overquota_notify_freq">{tmpl_var name='overquota_notify_freq_txt'}</label> |
| | | <input name="overquota_notify_freq" id="overquota_notify_freq" value="{tmpl_var name='overquota_notify_freq'}" size="40" maxlength="255" type="text" class="textInput" /> {tmpl_var name='overquota_notify_freq_note_txt'} |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='overquota_notify_onok_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="overquota_notify_freq" class="col-sm-3 control-label">{tmpl_var name='overquota_notify_freq_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="overquota_notify_freq" id="overquota_notify_freq" value="{tmpl_var name='overquota_notify_freq'}" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='overquota_notify_freq_note_txt'} |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='overquota_notify_onok_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='overquota_notify_onok'} |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>Rescue</legend> |
| | | <div class="ctrlHolder"> |
| | | <p class="label" style="width:300px">{tmpl_var name='try_rescue_txt'}</p> |
| | | <div class="multiField" style="width:100px"> |
| | | <legend>Rescue</legend> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='try_rescue_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='try_rescue'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label" style="width:300px">{tmpl_var name='do_not_try_rescue_httpd_txt'}</p> |
| | | <div class="multiField" style="width:100px"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='do_not_try_rescue_httpd_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='do_not_try_rescue_httpd'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label" style="width:300px">{tmpl_var name='do_not_try_rescue_mongodb_txt'}</p> |
| | | <div class="multiField" style="width:100px"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='do_not_try_rescue_mongodb_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='do_not_try_rescue_mongodb'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label" style="width:300px">{tmpl_var name='do_not_try_rescue_mysql_txt'}</p> |
| | | <div class="multiField" style="width:100px"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='do_not_try_rescue_mysql_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='do_not_try_rescue_mysql'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label" style="width:300px">{tmpl_var name='do_not_try_rescue_mail_txt'}</p> |
| | | <div class="multiField" style="width:100px"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='do_not_try_rescue_mail_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='do_not_try_rescue_mail'} |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <tmpl_var name="rescue_description_txt"> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='auto_network_configuration_txt'}</p> |
| | | <div class="multiField"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='auto_network_configuration_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='auto_network_configuration'} {tmpl_var name='network_config_warning_txt'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="ip_address">{tmpl_var name='ip_address_txt'}</label> |
| | | <input name="ip_address" id="ip_address" value="{tmpl_var name='ip_address'}" size="15" maxlength="255" type="text" class="textInput formLengthIPv4" /> |
| | | <div class="form-group"> |
| | | <label for="ip_address" class="col-sm-3 control-label">{tmpl_var name='ip_address_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="ip_address" id="ip_address" value="{tmpl_var name='ip_address'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="netmask" class="col-sm-3 control-label">{tmpl_var name='netmask_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="netmask" id="netmask" value="{tmpl_var name='netmask'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="v6_prefix" class="col-sm-3 control-label">{tmpl_var name='v6_prefix_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="v6_prefix" id="v6_prefix" value="{tmpl_var name='v6_prefix'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="gateway" class="col-sm-3 control-label">{tmpl_var name='gateway_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="gateway" id="gateway" value="{tmpl_var name='gateway'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="hostname" class="col-sm-3 control-label">{tmpl_var name='hostname_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="hostname" id="hostname" value="{tmpl_var name='hostname'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="nameservers" class="col-sm-3 control-label">{tmpl_var name='nameservers_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="nameservers" id="nameservers" value="{tmpl_var name='nameservers'}" class="form-control" /></div><p class="formHint">{tmpl_var name='nameservers_hint_txt'}</p> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="netmask">{tmpl_var name='netmask_txt'}</label> |
| | | <input name="netmask" id="netmask" value="{tmpl_var name='netmask'}" size="15" maxlength="255" type="text" class="textInput formLengthIPv4" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="v6_prefix">{tmpl_var name='v6_prefix_txt'}</label> |
| | | <input name="v6_prefix" id="v6_prefix" value="{tmpl_var name='v6_prefix'}" size="15" maxlength="255" type="text" class="textInput formLengthIPv4" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="gateway">{tmpl_var name='gateway_txt'}</label> |
| | | <input name="gateway" id="gateway" value="{tmpl_var name='gateway'}" size="15" maxlength="255" type="text" class="textInput formLengthIPv4" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="hostname">{tmpl_var name='hostname_txt'}</label> |
| | | <input name="hostname" id="hostname" value="{tmpl_var name='hostname'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="nameservers">{tmpl_var name='nameservers_txt'}</label> |
| | | <input name="nameservers" id="nameservers" value="{tmpl_var name='nameservers'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | <p class="formHint">{tmpl_var name='nameservers_hint_txt'}</p> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="firewall">{tmpl_var name='firewall_txt'}</label> |
| | | <select name="firewall" id="firewall" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="firewall" class="col-sm-3 control-label">{tmpl_var name='firewall_txt'}</label> |
| | | <div class="col-sm-9"><select name="firewall" id="firewall" class="form-control"> |
| | | {tmpl_var name='firewall'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="loglevel">{tmpl_var name='loglevel_txt'}</label> |
| | | <select name="loglevel" id="loglevel" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="loglevel" class="col-sm-3 control-label">{tmpl_var name='loglevel_txt'}</label> |
| | | <div class="col-sm-9"><select name="loglevel" id="loglevel" class="form-control"> |
| | | {tmpl_var name='loglevel'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="admin_notify_events">{tmpl_var name='admin_notify_events_txt'}</label> |
| | | <select name="admin_notify_events" id="admin_notify_events" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="admin_notify_events" class="col-sm-3 control-label">{tmpl_var name='admin_notify_events_txt'}</label> |
| | | <div class="col-sm-9"><select name="admin_notify_events" id="admin_notify_events" class="form-control"> |
| | | {tmpl_var name='admin_notify_events'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="backup_dir">{tmpl_var name='backup_dir_txt'}</label> |
| | | <input name="backup_dir" id="backup_dir" value="{tmpl_var name='backup_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='backup_dir_is_mount_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="backup_dir" class="col-sm-3 control-label">{tmpl_var name='backup_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="backup_dir" id="backup_dir" value="{tmpl_var name='backup_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='backup_dir_is_mount_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='backup_dir_is_mount'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="backup_mode">{tmpl_var name='backup_mode_txt'}</label> |
| | | <select name="backup_mode" id="backup_mode" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="backup_mode" class="col-sm-3 control-label">{tmpl_var name='backup_mode_txt'}</label> |
| | | <div class="col-sm-9"><select name="backup_mode" id="backup_mode" class="form-control"> |
| | | {tmpl_var name='backup_mode'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='backup_delete_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='backup_delete_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='backup_delete'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="monit_url">{tmpl_var name='monit_url_txt'}</label> |
| | | <input name="monit_url" id="monit_url" value="{tmpl_var name='monit_url'}" size="40" maxlength="255" type="text" class="textInput" /> {tmpl_var name='monit_url_note_txt'} <a href="javascript:void(0);" class="addPlaceholder">[SERVERNAME]</a> |
| | | <div class="form-group"> |
| | | <label for="monit_url" class="col-sm-3 control-label">{tmpl_var name='monit_url_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="monit_url" id="monit_url" value="{tmpl_var name='monit_url'}" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='monit_url_note_txt'} </div><a href="javascript:void(0);" class="addPlaceholder">[SERVERNAME]</a> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="monit_user">{tmpl_var name='monit_user_txt'}</label> |
| | | <input name="monit_user" id="monit_user" value="{tmpl_var name='monit_user'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | <div class="form-group"> |
| | | <label for="monit_user" class="col-sm-3 control-label">{tmpl_var name='monit_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="monit_user" id="monit_user" value="{tmpl_var name='monit_user'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="monit_password" class="col-sm-3 control-label">{tmpl_var name='monit_password_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="monit_password" id="monit_password" value="{tmpl_var name='monit_password'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="munin_url" class="col-sm-3 control-label">{tmpl_var name='munin_url_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="munin_url" id="munin_url" value="{tmpl_var name='munin_url'}" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='munin_url_note_txt'} </div><a href="javascript:void(0);" class="addPlaceholder">[SERVERNAME]</a> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="monit_password">{tmpl_var name='monit_password_txt'}</label> |
| | | <input name="monit_password" id="monit_password" value="{tmpl_var name='monit_password'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="munin_url">{tmpl_var name='munin_url_txt'}</label> |
| | | <input name="munin_url" id="munin_url" value="{tmpl_var name='munin_url'}" size="40" maxlength="255" type="text" class="textInput" /> {tmpl_var name='munin_url_note_txt'} <a href="javascript:void(0);" class="addPlaceholder">[SERVERNAME]</a> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="munin_user">{tmpl_var name='munin_user_txt'}</label> |
| | | <input name="munin_user" id="munin_user" value="{tmpl_var name='munin_user'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="munin_password">{tmpl_var name='munin_password_txt'}</label> |
| | | <input name="munin_password" id="munin_password" value="{tmpl_var name='munin_password'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='monitor_system_updates_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="munin_user" class="col-sm-3 control-label">{tmpl_var name='munin_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="munin_user" id="munin_user" value="{tmpl_var name='munin_user'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="munin_password" class="col-sm-3 control-label">{tmpl_var name='munin_password_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="munin_password" id="munin_password" value="{tmpl_var name='munin_password'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='monitor_system_updates_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='monitor_system_updates'} |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>UFW Firewall</legend> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='ufw_enable_txt'}</p> |
| | | <div class="multiField"> |
| | | <legend>UFW Firewall</legend> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='ufw_enable_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='ufw_enable'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='ufw_manage_builtins_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='ufw_manage_builtins_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='ufw_manage_builtins'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='ufw_ipv6_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='ufw_ipv6_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='ufw_ipv6'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="ufw_default_input_policy">{tmpl_var name='ufw_default_input_policy_txt'}</label> |
| | | <select name="ufw_default_input_policy" id="ufw_default_input_policy" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="ufw_default_input_policy" class="col-sm-3 control-label">{tmpl_var name='ufw_default_input_policy_txt'}</label> |
| | | <div class="col-sm-9"><select name="ufw_default_input_policy" id="ufw_default_input_policy" class="form-control"> |
| | | {tmpl_var name='ufw_default_input_policy'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="ufw_default_output_policy">{tmpl_var name='ufw_default_output_policy_txt'}</label> |
| | | <select name="ufw_default_output_policy" id="ufw_default_output_policy" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="ufw_default_output_policy" class="col-sm-3 control-label">{tmpl_var name='ufw_default_output_policy_txt'}</label> |
| | | <div class="col-sm-9"><select name="ufw_default_output_policy" id="ufw_default_output_policy" class="form-control"> |
| | | {tmpl_var name='ufw_default_output_policy'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="ufw_default_forward_policy">{tmpl_var name='ufw_default_forward_policy_txt'}</label> |
| | | <select name="ufw_default_forward_policy" id="ufw_default_forward_policy" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="ufw_default_forward_policy" class="col-sm-3 control-label">{tmpl_var name='ufw_default_forward_policy_txt'}</label> |
| | | <div class="col-sm-9"><select name="ufw_default_forward_policy" id="ufw_default_forward_policy" class="form-control"> |
| | | {tmpl_var name='ufw_default_forward_policy'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="ufw_default_application_policy">{tmpl_var name='ufw_default_application_policy_txt'}</label> |
| | | <select name="ufw_default_application_policy" id="ufw_default_application_policy" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="ufw_default_application_policy" class="col-sm-3 control-label">{tmpl_var name='ufw_default_application_policy_txt'}</label> |
| | | <div class="col-sm-9"><select name="ufw_default_application_policy" id="ufw_default_application_policy" class="form-control"> |
| | | {tmpl_var name='ufw_default_application_policy'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="ufw_log_level">{tmpl_var name='ufw_log_level_txt'}</label> |
| | | <select name="ufw_log_level" id="ufw_log_level" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="ufw_log_level" class="col-sm-3 control-label">{tmpl_var name='ufw_log_level_txt'}</label> |
| | | <div class="col-sm-9"><select name="ufw_log_level" id="ufw_log_level" class="form-control"> |
| | | {tmpl_var name='ufw_log_level'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="config_dir">{tmpl_var name='config_dir_txt'}</label> |
| | | <input name="config_dir" id="config_dir" value="{tmpl_var name='config_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="config_dir" class="col-sm-3 control-label">{tmpl_var name='config_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="config_dir" id="config_dir" value="{tmpl_var name='config_dir'}" class="form-control" /></div></div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='server_type_txt'}</p> |
| | | <div class="multiField"> |
| | | <select name="server_type" id="server_type" class="selectInput"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='server_type_txt'}</label> |
| | | <div class="col-sm-9"><select name="server_type" id="server_type" class="form-control"> |
| | | {tmpl_var name='server_type'} |
| | | </select> |
| | | </div> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="website_basedir">{tmpl_var name='website_basedir_txt'}</label> |
| | | <input name="website_basedir" id="website_basedir" value="{tmpl_var name='website_basedir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="website_path">{tmpl_var name='website_path_txt'}</label> |
| | | <input name="website_path" id="website_path" value="{tmpl_var name='website_path'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="website_symlinks">{tmpl_var name='website_symlinks_txt'}</label> |
| | | <input name="website_symlinks" id="website_symlinks" value="{tmpl_var name='website_symlinks'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="website_symlinks_rel">{tmpl_var name='website_symlinks_rel_txt'}</label> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="website_basedir" class="col-sm-3 control-label">{tmpl_var name='website_basedir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="website_basedir" id="website_basedir" value="{tmpl_var name='website_basedir'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="website_path" class="col-sm-3 control-label">{tmpl_var name='website_path_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="website_path" id="website_path" value="{tmpl_var name='website_path'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="website_symlinks" class="col-sm-3 control-label">{tmpl_var name='website_symlinks_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="website_symlinks" id="website_symlinks" value="{tmpl_var name='website_symlinks'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="website_symlinks_rel" class="col-sm-3 control-label">{tmpl_var name='website_symlinks_rel_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='website_symlinks_rel'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="website_symlinks_rel">{tmpl_var name='network_filesystem_txt'}</label> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="website_symlinks_rel" class="col-sm-3 control-label">{tmpl_var name='network_filesystem_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='network_filesystem'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="website_autoalias">{tmpl_var name='website_autoalias_txt'}</label> |
| | | <input name="website_autoalias" id="website_autoalias" value="{tmpl_var name='website_autoalias'}" size="40" maxlength="255" type="text" class="textInput" /> {tmpl_var name='website_autoalias_note_txt'} <a href="javascript:void(0);" class="addPlaceholder">[client_id]</a>, <a href="javascript:void(0);" class="addPlaceholder">[client_username]</a>, <a href="javascript:void(0);" class="addPlaceholder">[website_id]</a>, <a href="javascript:void(0);" class="addPlaceholder">[website_domain]</a> |
| | | <div class="form-group"> |
| | | <label for="website_autoalias" class="col-sm-3 control-label">{tmpl_var name='website_autoalias_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="website_autoalias" id="website_autoalias" value="{tmpl_var name='website_autoalias'}" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='website_autoalias_note_txt'} </div><a href="javascript:void(0);" class="addPlaceholder">[client_id]</a>, <a href="javascript:void(0);" class="addPlaceholder">[client_username]</a>, <a href="javascript:void(0);" class="addPlaceholder">[website_id]</a>, <a href="javascript:void(0);" class="addPlaceholder">[website_domain]</a> |
| | | </div> |
| | | <div class="ctrlHolder apache"> |
| | | <label for="vhost_rewrite_v6">{tmpl_var name='vhost_rewrite_v6_txt'}</label> |
| | | <div class="multiField"> |
| | | <div class="form-group apache"> |
| | | <label for="vhost_rewrite_v6" class="col-sm-3 control-label">{tmpl_var name='vhost_rewrite_v6_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='vhost_rewrite_v6'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder apache"> |
| | | <label for="vhost_conf_dir">{tmpl_var name='vhost_conf_dir_txt'}</label> |
| | | <input name="vhost_conf_dir" id="vhost_conf_dir" value="{tmpl_var name='vhost_conf_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder apache"> |
| | | <label for="vhost_conf_enabled_dir">{tmpl_var name='vhost_conf_enabled_dir_txt'}</label> |
| | | <input name="vhost_conf_enabled_dir" id="vhost_conf_enabled_dir" value="{tmpl_var name='vhost_conf_enabled_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder nginx"> |
| | | <label for="nginx_vhost_conf_dir">{tmpl_var name='nginx_vhost_conf_dir_txt'}</label> |
| | | <input name="nginx_vhost_conf_dir" id="nginx_vhost_conf_dir" value="{tmpl_var name='nginx_vhost_conf_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder nginx"> |
| | | <label for="nginx_vhost_conf_enabled_dir">{tmpl_var name='nginx_vhost_conf_enabled_dir_txt'}</label> |
| | | <input name="nginx_vhost_conf_enabled_dir" id="nginx_vhost_conf_enabled_dir" value="{tmpl_var name='nginx_vhost_conf_enabled_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='security_level_txt'}</p> |
| | | <div class="multiField"> |
| | | <select name="security_level" id="security_level" class="selectInput"> |
| | | <div class="form-group apache"> |
| | | <label for="vhost_conf_dir" class="col-sm-3 control-label">{tmpl_var name='vhost_conf_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="vhost_conf_dir" id="vhost_conf_dir" value="{tmpl_var name='vhost_conf_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group apache"> |
| | | <label for="vhost_conf_enabled_dir" class="col-sm-3 control-label">{tmpl_var name='vhost_conf_enabled_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="vhost_conf_enabled_dir" id="vhost_conf_enabled_dir" value="{tmpl_var name='vhost_conf_enabled_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group nginx"> |
| | | <label for="nginx_vhost_conf_dir" class="col-sm-3 control-label">{tmpl_var name='nginx_vhost_conf_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="nginx_vhost_conf_dir" id="nginx_vhost_conf_dir" value="{tmpl_var name='nginx_vhost_conf_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group nginx"> |
| | | <label for="nginx_vhost_conf_enabled_dir" class="col-sm-3 control-label">{tmpl_var name='nginx_vhost_conf_enabled_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="nginx_vhost_conf_enabled_dir" id="nginx_vhost_conf_enabled_dir" value="{tmpl_var name='nginx_vhost_conf_enabled_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='security_level_txt'}</label> |
| | | <div class="col-sm-9"><select name="security_level" id="security_level" class="form-control"> |
| | | {tmpl_var name='security_level'} |
| | | </select> |
| | | </div> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder apache"> |
| | | <p class="label">{tmpl_var name='check_apache_config_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group apache"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='check_apache_config_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='check_apache_config'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder apache"> |
| | | <label for="user">{tmpl_var name='web_user_txt'}</label> |
| | | <input name="user" id="user" value="{tmpl_var name='user'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder apache"> |
| | | <label for="group">{tmpl_var name='web_group_txt'}</label> |
| | | <input name="group" id="group" value="{tmpl_var name='group'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder nginx"> |
| | | <label for="nginx_user">{tmpl_var name='nginx_user_txt'}</label> |
| | | <input name="nginx_user" id="nginx_user" value="{tmpl_var name='nginx_user'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder nginx"> |
| | | <label for="nginx_group">{tmpl_var name='nginx_group_txt'}</label> |
| | | <input name="nginx_group" id="nginx_group" value="{tmpl_var name='nginx_group'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder nginx"> |
| | | <label for="nginx_cgi_socket">{tmpl_var name='nginx_cgi_socket_txt'}</label> |
| | | <input name="nginx_cgi_socket" id="nginx_cgi_socket" value="{tmpl_var name='nginx_cgi_socket'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder apache"> |
| | | <label for="htaccess_allow_override">{tmpl_var name='htaccess_allow_override_txt'}</label> |
| | | <input name="htaccess_allow_override" id="htaccess_allow_override" value="{tmpl_var name='htaccess_allow_override'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='enable_ip_wildcard_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group apache"> |
| | | <label for="user" class="col-sm-3 control-label">{tmpl_var name='web_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="user" id="user" value="{tmpl_var name='user'}" class="form-control" /></div></div> |
| | | <div class="form-group apache"> |
| | | <label for="group" class="col-sm-3 control-label">{tmpl_var name='web_group_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="group" id="group" value="{tmpl_var name='group'}" class="form-control" /></div></div> |
| | | <div class="form-group nginx"> |
| | | <label for="nginx_user" class="col-sm-3 control-label">{tmpl_var name='nginx_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="nginx_user" id="nginx_user" value="{tmpl_var name='nginx_user'}" class="form-control" /></div></div> |
| | | <div class="form-group nginx"> |
| | | <label for="nginx_group" class="col-sm-3 control-label">{tmpl_var name='nginx_group_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="nginx_group" id="nginx_group" value="{tmpl_var name='nginx_group'}" class="form-control" /></div></div> |
| | | <div class="form-group nginx"> |
| | | <label for="nginx_cgi_socket" class="col-sm-3 control-label">{tmpl_var name='nginx_cgi_socket_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="nginx_cgi_socket" id="nginx_cgi_socket" value="{tmpl_var name='nginx_cgi_socket'}" class="form-control" /></div></div> |
| | | <div class="form-group apache"> |
| | | <label for="htaccess_allow_override" class="col-sm-3 control-label">{tmpl_var name='htaccess_allow_override_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="htaccess_allow_override" id="htaccess_allow_override" value="{tmpl_var name='htaccess_allow_override'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='enable_ip_wildcard_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='enable_ip_wildcard'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='overtraffic_notify_admin_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='overtraffic_notify_admin_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='overtraffic_notify_admin'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='overtraffic_notify_client_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='overtraffic_notify_client_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='overtraffic_notify_client'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='overquota_notify_admin_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='overquota_notify_admin_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='overquota_notify_admin'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='overquota_notify_client_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='overquota_notify_client_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='overquota_notify_client'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='overquota_db_notify_admin_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='overquota_db_notify_admin_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='overquota_db_notify_admin'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='overquota_db_notify_client_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='overquota_db_notify_client_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='overquota_db_notify_client'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="overquota_notify_freq">{tmpl_var name='overquota_notify_freq_txt'}</label> |
| | | <input name="overquota_notify_freq" id="overquota_notify_freq" value="{tmpl_var name='overquota_notify_freq'}" size="40" maxlength="255" type="text" class="textInput" /> {tmpl_var name='overquota_notify_freq_note_txt'} |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='overquota_notify_onok_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="overquota_notify_freq" class="col-sm-3 control-label">{tmpl_var name='overquota_notify_freq_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="overquota_notify_freq" id="overquota_notify_freq" value="{tmpl_var name='overquota_notify_freq'}" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='overquota_notify_freq_note_txt'} |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='overquota_notify_onok_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='overquota_notify_onok'} |
| | | </div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='ssl_settings_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='enable_sni_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-ssl-settings" aria-expanded="false" aria-controls="toggle-ssl-settings">{tmpl_var name='ssl_settings_txt'}</button></div> |
| | | <div id="toggle-ssl-settings" class="collapse"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='enable_sni_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='enable_sni'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="CA_path">{tmpl_var name='CA_path_txt'}</label> |
| | | <input name="CA_path" id="CA_path" value="{tmpl_var name='CA_path'}" size="40" maxlength="255" type="text" autocomplete="off" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="CA_pass">{tmpl_var name='CA_pass_txt'}</label> |
| | | <input name="CA_pass" id="CA_pass" value="{tmpl_var name='CA_pass'}" size="40" maxlength="255" type="password" autocomplete="off" class="textInput" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label"> |
| | | <tmpl_var name="enable_spdy_txt"> |
| | | </label> |
| | | <div class="col-sm-9"> |
| | | <tmpl_var name="enable_spdy"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="CA_path" class="col-sm-3 control-label">{tmpl_var name='CA_path_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="CA_path" id="CA_path" value="{tmpl_var name='CA_path'}" autocomplete="off" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="CA_pass" class="col-sm-3 control-label">{tmpl_var name='CA_pass_txt'}</label> |
| | | <div class="col-sm-9"><input type="password" name="CA_pass" id="CA_pass" value="{tmpl_var name='CA_pass'}" autocomplete="off" class="form-control" /></div></div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='permissions_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='set_folder_permissions_on_update_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-permissions" aria-expanded="false" aria-controls="toggle-permissions">{tmpl_var name='permissions_txt'}</button></div> |
| | | <div id="toggle-permissions" class="collapse"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='set_folder_permissions_on_update_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='set_folder_permissions_on_update'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='web_folder_protection_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='web_folder_protection_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='web_folder_protection'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='add_web_users_to_sshusers_group_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='add_web_users_to_sshusers_group_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='add_web_users_to_sshusers_group'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='connect_userid_to_webid_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='connect_userid_to_webid_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='connect_userid_to_webid'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="connect_userid_to_webid_start">{tmpl_var name='connect_userid_to_webid_start_txt'}</label> |
| | | <input name="connect_userid_to_webid_start" id="connect_userid_to_webid_start" value="{tmpl_var name='connect_userid_to_webid_start'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="connect_userid_to_webid_start" class="col-sm-3 control-label">{tmpl_var name='connect_userid_to_webid_start_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="connect_userid_to_webid_start" id="connect_userid_to_webid_start" value="{tmpl_var name='connect_userid_to_webid_start'}" class="form-control" /></div></div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='php_settings_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder apache"> |
| | | <label for="php_ini_path_apache">{tmpl_var name='php_ini_path_apache_txt'}</label> |
| | | <input name="php_ini_path_apache" id="php_ini_path_apache" value="{tmpl_var name='php_ini_path_apache'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder apache"> |
| | | <label for="php_ini_path_cgi">{tmpl_var name='php_ini_path_cgi_txt'}</label> |
| | | <input name="php_ini_path_cgi" id="php_ini_path_cgi" value="{tmpl_var name='php_ini_path_cgi'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_fpm_init_script">{tmpl_var name='php_fpm_init_script_txt'}</label> |
| | | <input name="php_fpm_init_script" id="php_fpm_init_script" value="{tmpl_var name='php_fpm_init_script'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_fpm_ini_path">{tmpl_var name='php_fpm_ini_path_txt'}</label> |
| | | <input name="php_fpm_ini_path" id="php_fpm_ini_path" value="{tmpl_var name='php_fpm_ini_path'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_fpm_pool_dir">{tmpl_var name='php_fpm_pool_dir_txt'}</label> |
| | | <input name="php_fpm_pool_dir" id="php_fpm_pool_dir" value="{tmpl_var name='php_fpm_pool_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_fpm_start_port">{tmpl_var name='php_fpm_start_port_txt'}</label> |
| | | <input name="php_fpm_start_port" id="php_fpm_start_port" value="{tmpl_var name='php_fpm_start_port'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_fpm_socket_dir">{tmpl_var name='php_fpm_socket_dir_txt'}</label> |
| | | <input name="php_fpm_socket_dir" id="php_fpm_socket_dir" value="{tmpl_var name='php_fpm_socket_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_open_basedir">{tmpl_var name='php_open_basedir_txt'}</label> |
| | | <input name="php_open_basedir" id="php_open_basedir" value="{tmpl_var name='php_open_basedir'}" size="40" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_ini_check_minutes">{tmpl_var name='php_ini_check_minutes_txt'}</label> |
| | | <input name="php_ini_check_minutes" id="php_ini_check_minutes" value="{tmpl_var name='php_ini_check_minutes'}" size="40" type="text" class="textInput" /> {tmpl_var name='php_ini_check_minutes_info_txt'} |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_handler">{tmpl_var name='php_handler_txt'}</label> |
| | | <div class="multiField"> |
| | | <select name="php_handler" id="php_handler" class="selectInput"> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-php_settings" aria-expanded="false" aria-controls="toggle-php_settings">{tmpl_var name='php_settings_txt'}</button></div> |
| | | <div id="toggle-php_settings" class="collapse"> |
| | | <div class="form-group apache"> |
| | | <label for="php_ini_path_apache" class="col-sm-3 control-label">{tmpl_var name='php_ini_path_apache_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_ini_path_apache" id="php_ini_path_apache" value="{tmpl_var name='php_ini_path_apache'}" class="form-control" /></div></div> |
| | | <div class="form-group apache"> |
| | | <label for="php_ini_path_cgi" class="col-sm-3 control-label">{tmpl_var name='php_ini_path_cgi_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_ini_path_cgi" id="php_ini_path_cgi" value="{tmpl_var name='php_ini_path_cgi'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="php_fpm_init_script" class="col-sm-3 control-label">{tmpl_var name='php_fpm_init_script_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_fpm_init_script" id="php_fpm_init_script" value="{tmpl_var name='php_fpm_init_script'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="php_fpm_ini_path" class="col-sm-3 control-label">{tmpl_var name='php_fpm_ini_path_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_fpm_ini_path" id="php_fpm_ini_path" value="{tmpl_var name='php_fpm_ini_path'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="php_fpm_pool_dir" class="col-sm-3 control-label">{tmpl_var name='php_fpm_pool_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_fpm_pool_dir" id="php_fpm_pool_dir" value="{tmpl_var name='php_fpm_pool_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="php_fpm_start_port" class="col-sm-3 control-label">{tmpl_var name='php_fpm_start_port_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_fpm_start_port" id="php_fpm_start_port" value="{tmpl_var name='php_fpm_start_port'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="php_fpm_socket_dir" class="col-sm-3 control-label">{tmpl_var name='php_fpm_socket_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_fpm_socket_dir" id="php_fpm_socket_dir" value="{tmpl_var name='php_fpm_socket_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="php_open_basedir" class="col-sm-3 control-label">{tmpl_var name='php_open_basedir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_open_basedir" id="php_open_basedir" value="{tmpl_var name='php_open_basedir'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="php_ini_check_minutes" class="col-sm-3 control-label">{tmpl_var name='php_ini_check_minutes_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="php_ini_check_minutes" id="php_ini_check_minutes" value="{tmpl_var name='php_ini_check_minutes'}" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='php_ini_check_minutes_info_txt'} |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label for="php_handler" class="col-sm-3 control-label">{tmpl_var name='php_handler_txt'}</label> |
| | | <div class="col-sm-9"><select name="php_handler" id="php_handler" class="form-control"> |
| | | {tmpl_var name='php_handler'} |
| | | </select> |
| | | </div> |
| | | </select></div> |
| | | </div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='apps_vhost_settings_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <label for="apps_vhost_port">{tmpl_var name='apps_vhost_port_txt'}</label> |
| | | <input name="apps_vhost_port" id="apps_vhost_port" value="{tmpl_var name='apps_vhost_port'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="apps_vhost_ip">{tmpl_var name='apps_vhost_ip_txt'}</label> |
| | | <input name="apps_vhost_ip" id="apps_vhost_ip" value="{tmpl_var name='apps_vhost_ip'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="apps_vhost_servername">{tmpl_var name='apps_vhost_servername_txt'}</label> |
| | | <input name="apps_vhost_servername" id="apps_vhost_servername" value="{tmpl_var name='apps_vhost_servername'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-apps_vhost_settings" aria-expanded="false" aria-controls="toggle-apps_vhost_settings">{tmpl_var name='apps_vhost_settings_txt'}</button></div> |
| | | <div id="toggle-apps_vhost_settings" class="collapse"> |
| | | <div class="form-group"> |
| | | <label for="apps_vhost_port" class="col-sm-3 control-label">{tmpl_var name='apps_vhost_port_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="apps_vhost_port" id="apps_vhost_port" value="{tmpl_var name='apps_vhost_port'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="apps_vhost_ip" class="col-sm-3 control-label">{tmpl_var name='apps_vhost_ip_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="apps_vhost_ip" id="apps_vhost_ip" value="{tmpl_var name='apps_vhost_ip'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="apps_vhost_servername" class="col-sm-3 control-label">{tmpl_var name='apps_vhost_servername_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="apps_vhost_servername" id="apps_vhost_servername" value="{tmpl_var name='apps_vhost_servername'}" class="form-control" /></div></div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='awstats_settings_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <label for="awstats_conf_dir">{tmpl_var name='awstats_conf_dir_txt'}</label> |
| | | <input name="awstats_conf_dir" id="awstats_conf_dir" value="{tmpl_var name='awstats_conf_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="awstats_data_dir">{tmpl_var name='awstats_data_dir_txt'}</label> |
| | | <input name="awstats_data_dir" id="awstats_data_dir" value="{tmpl_var name='awstats_data_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="awstats_pl">{tmpl_var name='awstats_pl_txt'}</label> |
| | | <input name="awstats_pl" id="awstats_pl" value="{tmpl_var name='awstats_pl'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="awstats_buildstaticpages_pl">{tmpl_var name='awstats_buildstaticpages_pl_txt'}</label> |
| | | <input name="awstats_buildstaticpages_pl" id="awstats_buildstaticpages_pl" value="{tmpl_var name='awstats_buildstaticpages_pl'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-awstats_settings" aria-expanded="false" aria-controls="toggle-awstats_settings">{tmpl_var name='awstats_settings_txt'}</button></div> |
| | | <div id="toggle-awstats_settings" class="collapse"> |
| | | <div class="form-group"> |
| | | <label for="awstats_conf_dir" class="col-sm-3 control-label">{tmpl_var name='awstats_conf_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="awstats_conf_dir" id="awstats_conf_dir" value="{tmpl_var name='awstats_conf_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="awstats_data_dir" class="col-sm-3 control-label">{tmpl_var name='awstats_data_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="awstats_data_dir" id="awstats_data_dir" value="{tmpl_var name='awstats_data_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="awstats_pl" class="col-sm-3 control-label">{tmpl_var name='awstats_pl_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="awstats_pl" id="awstats_pl" value="{tmpl_var name='awstats_pl'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="awstats_buildstaticpages_pl" class="col-sm-3 control-label">{tmpl_var name='awstats_buildstaticpages_pl_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="awstats_buildstaticpages_pl" id="awstats_buildstaticpages_pl" value="{tmpl_var name='awstats_buildstaticpages_pl'}" class="form-control" /></div></div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | | <script language="JavaScript" type="text/javascript"> |
| | | var serverType = jQuery('#server_type').val(); |
| | | jQuery('#server_type').replaceWith('<label for="server_Type">'+serverType+'</label><input type="hidden" name="server_type" value="'+serverType+'">'); |
| | | jQuery('#server_type').replaceWith('<label for="server_Type" class="col-sm-3 control-label">'+serverType+'</label><input type="hidden" name="server_type" value="'+serverType+'">'); |
| | | adjustForm(); |
| | | jQuery('#server_type').change(function(){ |
| | | serverType = $(this).val(); |
New file |
| | |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='xmpp_use_ipv6_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='xmpp_use_ipv6'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='xmpp_bosh_max_inactivity_txt'}</label> |
| | | <div class="col-sm-3"> |
| | | <input type="number" name="xmpp_bosh_max_inactivity" id="xmpp_bosh_max_inactivity" value="{tmpl_var name='xmpp_bosh_max_inactivity'}" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='xmpp_server_admins_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | <input type="text" name="xmpp_server_admins" id="xmpp_server_admins" value="{tmpl_var name='xmpp_server_admins'}" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='xmpp_modules_enabled_txt'}</label> |
| | | <div class="col-sm-9"><textarea class="form-control" name="xmpp_modules_enabled" id="xmpp_modules_enabled" rows='3' cols='30'>{tmpl_var name='xmpp_modules_enabled'}</textarea></div> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | <h4>{tmpl_var name='xmpp_ports_txt'}</h4> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-6 control-label">{tmpl_var name='xmpp_port_http_txt'}</label> |
| | | <div class="col-sm-6"> |
| | | <input type="number" name="xmpp_port_http" id="xmpp_port_http" value="{tmpl_var name='xmpp_port_http'}" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-6 control-label">{tmpl_var name='xmpp_port_https_txt'}</label> |
| | | <div class="col-sm-6"> |
| | | <input type="number" name="xmpp_port_https" id="xmpp_port_https" value="{tmpl_var name='xmpp_port_https'}" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-6 control-label">{tmpl_var name='xmpp_port_pastebin_txt'}</label> |
| | | <div class="col-sm-6"> |
| | | <input type="number" name="xmpp_port_pastebin" id="xmpp_port_pastebin" value="{tmpl_var name='xmpp_port_pastebin'}" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-6 control-label">{tmpl_var name='xmpp_port_bosh_txt'}</label> |
| | | <div class="col-sm-6"> |
| | | <input type="number" name="xmpp_port_bosh" id="xmpp_port_bosh" value="{tmpl_var name='xmpp_port_bosh'}" class="form-control" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_config_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="config">{tmpl_var name='config_txt'}</label> |
| | | <textarea name="config" id="config" rows='20' cols='40'>{tmpl_var name='config'}</textarea> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="config" class="col-sm-3 control-label">{tmpl_var name='config_txt'}</label> |
| | | <div class="col-sm-9"><textarea class="form-control" name="config" id="config" rows='20' cols='40'>{tmpl_var name='config'}</textarea></div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="server_name">{tmpl_var name='server_name_txt'}</label> |
| | | <input name="server_name" id="server_name" value="{tmpl_var name='server_name'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='mail_server_txt'}</p> |
| | | <div class="multiField"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="server_name" class="col-sm-3 control-label">{tmpl_var name='server_name_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="server_name" id="server_name" value="{tmpl_var name='server_name'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='mail_server_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='mail_server'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='web_server_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='web_server_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='web_server'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='dns_server_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='dns_server_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='dns_server'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='file_server_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='file_server_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='file_server'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='db_server_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='db_server_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='db_server'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='vserver_server_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='vserver_server_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='vserver_server'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="mirror_server_id">{tmpl_var name='mirror_server_id_txt'}</label> |
| | | <select name="mirror_server_id" id="server_id" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='xmpp_server_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='xmpp_server'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="mirror_server_id" class="col-sm-3 control-label">{tmpl_var name='mirror_server_id_txt'}</label> |
| | | <div class="col-sm-9"><select name="mirror_server_id" id="server_id" class="form-control"> |
| | | {tmpl_var name='mirror_server_id'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="active">{tmpl_var name='active_txt'}</label> |
| | | <select name="active" id="active" class="selectInput formLengthBool"> |
| | | <div class="form-group"> |
| | | <label for="active" class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label> |
| | | <div class="col-sm-9"><select name="active" id="active" class="form-control"> |
| | | {tmpl_var name='active'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_ip"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>IP Address</legend> |
| | | <div class="ctrlHolder"> |
| | | <label for="server_id">{tmpl_var name='server_id_txt'}</label> |
| | | <select name="server_id" id="server_id" class="selectInput"> |
| | | <legend>IP Address</legend> |
| | | <div class="form-group"> |
| | | <label for="server_id" class="col-sm-3 control-label">{tmpl_var name='server_id_txt'}</label> |
| | | <div class="col-sm-9"><select name="server_id" id="server_id" class="form-control"> |
| | | {tmpl_var name='server_id'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="client_id">{tmpl_var name='client_id_txt'}</label> |
| | | <select name="client_id" id="client_id" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="client_id" class="col-sm-3 control-label">{tmpl_var name='client_id_txt'}</label> |
| | | <div class="col-sm-9"><select name="client_id" id="client_id" class="form-control"> |
| | | {tmpl_var name='client_id'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="ip_type">{tmpl_var name='ip_type_txt'}</label> |
| | | <select name="ip_type" id="ip_type" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="ip_type" class="col-sm-3 control-label">{tmpl_var name='ip_type_txt'}</label> |
| | | <div class="col-sm-9"><select name="ip_type" id="ip_type" class="form-control"> |
| | | {tmpl_var name='ip_type'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="ip_address">{tmpl_var name='ip_address_txt'}</label> |
| | | <input name="ip_address" id="ip_address" value="{tmpl_var name='ip_address'}" size="15" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='virtualhost_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="ip_address" class="col-sm-3 control-label">{tmpl_var name='ip_address_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="ip_address" id="ip_address" value="{tmpl_var name='ip_address'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='virtualhost_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='virtualhost'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="virtualhost_port">{tmpl_var name='virtualhost_port_txt'}</label> |
| | | <input name="virtualhost_port" id="virtualhost_port" value="{tmpl_var name='virtualhost_port'}" size="15" maxlength="15" type="text" class="textInput" /> |
| | | </div> |
| | | </fieldset> |
| | | <div class="form-group"> |
| | | <label for="virtualhost_port" class="col-sm-3 control-label">{tmpl_var name='virtualhost_port_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="virtualhost_port" id="virtualhost_port" value="{tmpl_var name='virtualhost_port'}" class="form-control" /></div></div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_ip_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_ip_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_ip_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_ip_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | |
| | | <div class="panel panel_list_server_ip"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('admin/server_ip_edit.php');"> |
| | | <span>{tmpl_var name="add_new_record_txt"}</span> |
| | | </button> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p> |
| | | |
| | | <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/server_ip_edit.php">{tmpl_var name="add_new_record_txt"}</button> |
| | | |
| | | |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th> |
| | | <th class="tbl_col_client_id" scope="col"><tmpl_var name="client_id_txt"></th> |
| | | <th class="tbl_col_ip_type" scope="col"><tmpl_var name="ip_type_txt"></th> |
| | | <th class="tbl_col_ip_address" scope="col"><tmpl_var name="ip_address_txt"></th> |
| | | <th class="tbl_col_virtualhost" scope="col"><tmpl_var name="virtualhost_txt"></th> |
| | | <th class="tbl_col_virtualhost_port" scope="col"><tmpl_var name="virtualhost_port_txt"></th> |
| | | <th class="tbl_col_buttons" scope="col">{tmpl_var name='search_limit'}</th> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th data-column="server_id"><tmpl_var name="server_id_txt"></th> |
| | | <th class="small-col" data-column="client_id"><tmpl_var name="client_id_txt"></th> |
| | | <th data-column="ip_type"><tmpl_var name="ip_type_txt"></th> |
| | | <th data-column="ip_address"><tmpl_var name="ip_address_txt"></th> |
| | | <th data-column="virtualhost"><tmpl_var name="virtualhost_txt"></th> |
| | | <th data-column="virtualhost_port"><tmpl_var name="virtualhost_port_txt"></th> |
| | | <th class="text-right">{tmpl_var name='search_limit'}</th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_server_id"><select name="search_server_id">{tmpl_var name='search_server_id'}</select></td> |
| | | <td class="tbl_col_client_id"><select name="search_client_id">{tmpl_var name='search_client_id'}</select></td> |
| | | <td class="tbl_col_ip_type"><select name="search_ip_type">{tmpl_var name='search_ip_type'}</select></td> |
| | | <td class="tbl_col_ip_address"><input type="text" name="search_ip_address" value="{tmpl_var name='search_ip_address'}" /></td> |
| | | <td class="tbl_col_virtualhost"><select name="search_virtualhost">{tmpl_var name='search_virtualhost'}</select></td> |
| | | <td class="tbl_col_virtualhost_port"><input type="text" name="search_virtualhost_port" value="{tmpl_var name='search_virtualhost_port'}" /></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','admin/server_ip_list.php');"><span>{tmpl_var name="filter_txt"}</span></button> |
| | | <tr> |
| | | <td><select class="form-control" name="search_server_id">{tmpl_var name='search_server_id'}</select></td> |
| | | <td><select class="form-control" name="search_client_id">{tmpl_var name='search_client_id'}</select></td> |
| | | <td><select class="form-control" name="search_ip_type">{tmpl_var name='search_ip_type'}</select></td> |
| | | <td><input class="form-control" type="text" name="search_ip_address" value="{tmpl_var name='search_ip_address'}" /></td> |
| | | <td><select class="form-control" name="search_virtualhost">{tmpl_var name='search_virtualhost'}</select></td> |
| | | <td><input class="form-control" type="text" name="search_virtualhost_port" value="{tmpl_var name='search_virtualhost_port'}" /></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/server_ip_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_server_id"><a href="#" onclick="loadContent('admin/server_ip_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td> |
| | | <td class="tbl_col_client_id"><a href="#" onclick="loadContent('admin/server_ip_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="client_id"}</a></td> |
| | | <td class="tbl_col_ip_type"><a href="#" onclick="loadContent('admin/server_ip_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="ip_type"}</a></td> |
| | | <td class="tbl_col_ip_address"><a href="#" onclick="loadContent('admin/server_ip_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="ip_address"}</a></td> |
| | | <td class="tbl_col_virtualhost"><a href="#" onclick="loadContent('admin/server_ip_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="virtualhost"}</a></td> |
| | | <td class="tbl_col_virtualhost_port"><a href="#" onclick="loadContent('admin/server_ip_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="virtualhost_port"}</a></td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/server_ip_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/server_ip_edit.php?id={tmpl_var name='id'}">{tmpl_var name="server_id"}</a></td> |
| | | <td><a href="#" data-load-content="admin/server_ip_edit.php?id={tmpl_var name='id'}">{tmpl_var name="client_id"}</a></td> |
| | | <td><a href="#" data-load-content="admin/server_ip_edit.php?id={tmpl_var name='id'}">{tmpl_var name="ip_type"}</a></td> |
| | | <td><a href="#" data-load-content="admin/server_ip_edit.php?id={tmpl_var name='id'}">{tmpl_var name="ip_address"}</a></td> |
| | | <td><a href="#" data-load-content="admin/server_ip_edit.php?id={tmpl_var name='id'}">{tmpl_var name="virtualhost"}</a></td> |
| | | <td><a href="#" data-load-content="admin/server_ip_edit.php?id={tmpl_var name='id'}">{tmpl_var name="virtualhost_port"}</a></td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/server_ip_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_loop> |
| | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="7"><tmpl_var name="paging"></td> |
| | | <td colspan="7"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_list_server"> |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_server_name" scope="col"><tmpl_var name="server_name_txt"></th> |
| | | <th class="tbl_col_mail_server" scope="col"><tmpl_var name="mail_server_txt"></th> |
| | | <th class="tbl_col_web_server" scope="col"><tmpl_var name="web_server_txt"></th> |
| | | <th class="tbl_col_dns_server" scope="col"><tmpl_var name="dns_server_txt"></th> |
| | | <th class="tbl_col_file_server" scope="col"><tmpl_var name="file_server_txt"></th> |
| | | <th class="tbl_col_db_server" scope="col"><tmpl_var name="db_server_txt"></th> |
| | | <th class="tbl_col_vserver_server" scope="col"><tmpl_var name="vserver_server_txt"></th> |
| | | <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th> |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th data-column="server_name"><tmpl_var name="server_name_txt"></th> |
| | | <th data-column="mail_server"><tmpl_var name="mail_server_txt"></th> |
| | | <th data-column="web_server"><tmpl_var name="web_server_txt"></th> |
| | | <th data-column="dns_server"><tmpl_var name="dns_server_txt"></th> |
| | | <th data-column="file_server"><tmpl_var name="file_server_txt"></th> |
| | | <th data-column="db_server"><tmpl_var name="db_server_txt"></th> |
| | | <th data-column="vserver_server"><tmpl_var name="vserver_server_txt"></th> |
| | | <th data-column="vserver_server"><tmpl_var name="xmpp_server_txt"></th> |
| | | <th class="small-col text-right">{tmpl_var name='search_limit'}</th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_server_name"><input type="text" name="search_server_name" value="{tmpl_var name='search_server_name'}" /></td> |
| | | <td class="tbl_col_mail_server"><select name="search_active">{tmpl_var name='search_mail_server'}</select></td> |
| | | <td class="tbl_col_web_server"><select name="search_active">{tmpl_var name='search_web_server'}</select></td> |
| | | <td class="tbl_col_dns_server"><select name="search_active">{tmpl_var name='search_dns_server'}</select></td> |
| | | <td class="tbl_col_file_server"><select name="search_active">{tmpl_var name='search_file_server'}</select></td> |
| | | <td class="tbl_col_db_server"><select name="search_active">{tmpl_var name='search_db_server'}</select></td> |
| | | <td class="tbl_col_vserver_server"><select name="search_active">{tmpl_var name='search_vserver_server'}</select></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','admin/server_list.php');"><span>{tmpl_var name="filter_txt"}</span></button> |
| | | <tr> |
| | | <td><input class="form-control" type="text" name="search_server_name" value="{tmpl_var name='search_server_name'}" /></td> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_mail_server'}</select></td> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_web_server'}</select></td> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_dns_server'}</select></td> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_file_server'}</select></td> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_db_server'}</select></td> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_vserver_server'}</select></td> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_xmpp_server'}</select></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/server_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_server_name"><a href="#" onclick="loadContent('admin/server_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_name"}</a></td> |
| | | <td class="tbl_col_mail_server">{tmpl_var name="mail_server"}</td> |
| | | <td class="tbl_col_web_server">{tmpl_var name="web_server"}</td> |
| | | <td class="tbl_col_dns_server">{tmpl_var name="dns_server"}</td> |
| | | <td class="tbl_col_file_server">{tmpl_var name="file_server"}</td> |
| | | <td class="tbl_col_db_server">{tmpl_var name="db_server"}</td> |
| | | <td class="tbl_col_vserver_server">{tmpl_var name="vserver_server"}</td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/server_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/server_edit.php?id={tmpl_var name='id'}">{tmpl_var name="server_name"}</a></td> |
| | | <td>{tmpl_var name="mail_server"}</td> |
| | | <td>{tmpl_var name="web_server"}</td> |
| | | <td>{tmpl_var name="dns_server"}</td> |
| | | <td>{tmpl_var name="file_server"}</td> |
| | | <td>{tmpl_var name="db_server"}</td> |
| | | <td>{tmpl_var name="vserver_server"}</td> |
| | | <td>{tmpl_var name="xmpp_server"}</td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/server_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_loop> |
| | | <tmpl_unless name="records"> |
| | | <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td colspan="8">{tmpl_var name='globalsearch_noresults_text_txt'}</td> |
| | | <td colspan="7">{tmpl_var name='globalsearch_noresults_text_txt'}</td> |
| | | </tr> |
| | | </tmpl_unless> |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="8"><tmpl_var name="paging"></td> |
| | | <td colspan="7"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_php"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_fastcgi_binary">{tmpl_var name='php_fastcgi_binary_txt'}</label> |
| | | <input name="php_fastcgi_binary" id="php_fastcgi_binary" value="{tmpl_var name='php_fastcgi_binary'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_fastcgi_ini_dir">{tmpl_var name='php_fastcgi_ini_dir_txt'}</label> |
| | | <input name="php_fastcgi_ini_dir" id="php_fastcgi_ini_dir" value="{tmpl_var name='php_fastcgi_ini_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <div class="form-group"> |
| | | <label for="php_fastcgi_binary" class="col-sm-3 control-label">{tmpl_var name='php_fastcgi_binary_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_fastcgi_binary" id="php_fastcgi_binary" value="{tmpl_var name='php_fastcgi_binary'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="php_fastcgi_ini_dir" class="col-sm-3 control-label">{tmpl_var name='php_fastcgi_ini_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_fastcgi_ini_dir" id="php_fastcgi_ini_dir" value="{tmpl_var name='php_fastcgi_ini_dir'}" class="form-control" /></div></div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_php_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_php_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_php_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_php_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_php"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_fpm_init_script">{tmpl_var name='php_fpm_init_script_txt'}</label> |
| | | <input name="php_fpm_init_script" id="php_fpm_init_script" value="{tmpl_var name='php_fpm_init_script'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_fpm_ini_dir">{tmpl_var name='php_fpm_ini_dir_txt'}</label> |
| | | <input name="php_fpm_ini_dir" id="php_fpm_ini_dir" value="{tmpl_var name='php_fpm_ini_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="php_fpm_pool_dir">{tmpl_var name='php_fpm_pool_dir_txt'}</label> |
| | | <input name="php_fpm_pool_dir" id="php_fpm_pool_dir" value="{tmpl_var name='php_fpm_pool_dir'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <div class="form-group"> |
| | | <label for="php_fpm_init_script" class="col-sm-3 control-label">{tmpl_var name='php_fpm_init_script_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_fpm_init_script" id="php_fpm_init_script" value="{tmpl_var name='php_fpm_init_script'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="php_fpm_ini_dir" class="col-sm-3 control-label">{tmpl_var name='php_fpm_ini_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_fpm_ini_dir" id="php_fpm_ini_dir" value="{tmpl_var name='php_fpm_ini_dir'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="php_fpm_pool_dir" class="col-sm-3 control-label">{tmpl_var name='php_fpm_pool_dir_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="php_fpm_pool_dir" id="php_fpm_pool_dir" value="{tmpl_var name='php_fpm_pool_dir'}" class="form-control" /></div></div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_php_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_php_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_php_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_php_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | |
| | | <div class="panel panel_list_server_php"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('admin/server_php_edit.php');"> |
| | | <span>{tmpl_var name="add_new_record_txt"}</span> |
| | | </button> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p> |
| | | |
| | | <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/server_php_edit.php">{tmpl_var name="add_new_record_txt"}</button> |
| | | |
| | | |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th> |
| | | <th class="tbl_col_client_id" scope="col"><tmpl_var name="client_id_txt"></th> |
| | | <th class="tbl_col_name" scope="col"><tmpl_var name="name_txt"></th> |
| | | <th class="tbl_col_buttons" scope="col">{tmpl_var name='search_limit'}</th> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th data-column="server_id"><tmpl_var name="server_id_txt"></th> |
| | | <th class="small-col" data-column="client_id"><tmpl_var name="client_id_txt"></th> |
| | | <th data-column="name"><tmpl_var name="name_txt"></th> |
| | | <th class="text-right">{tmpl_var name='search_limit'}</th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_server_id"><select name="search_server_id">{tmpl_var name='search_server_id'}</select></td> |
| | | <td class="tbl_col_client_id"><select name="search_client_id">{tmpl_var name='search_client_id'}</select></td> |
| | | <td class="tbl_col_name"><input type="text" name="search_name" value="{tmpl_var name='search_name'}" /></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','admin/server_php_list.php');"><span>{tmpl_var name="filter_txt"}</span></button> |
| | | <tr> |
| | | <td><select class="form-control" name="search_server_id">{tmpl_var name='search_server_id'}</select></td> |
| | | <td><select class="form-control" name="search_client_id">{tmpl_var name='search_client_id'}</select></td> |
| | | <td><input class="form-control" type="text" name="search_name" value="{tmpl_var name='search_name'}" /></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/server_php_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_server_id"><a href="#" onclick="loadContent('admin/server_php_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td> |
| | | <td class="tbl_col_client_id"><a href="#" onclick="loadContent('admin/server_php_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="client_id"}</a></td> |
| | | <td class="tbl_col_name"><a href="#" onclick="loadContent('admin/server_php_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="name"}</a></td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/server_php_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/server_php_edit.php?id={tmpl_var name='id'}">{tmpl_var name="server_id"}</a></td> |
| | | <td><a href="#" data-load-content="admin/server_php_edit.php?id={tmpl_var name='id'}">{tmpl_var name="client_id"}</a></td> |
| | | <td><a href="#" data-load-content="admin/server_php_edit.php?id={tmpl_var name='id'}">{tmpl_var name="name"}</a></td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/server_php_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_loop> |
| | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="4"><tmpl_var name="paging"></td> |
| | | <td colspan="4"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_server_php"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="server_id">{tmpl_var name='server_id_txt'}</label> |
| | | <select name="server_id" id="server_id" class="selectInput"> |
| | | |
| | | <div class="form-group"> |
| | | <label for="server_id" class="col-sm-3 control-label">{tmpl_var name='server_id_txt'}</label> |
| | | <div class="col-sm-9"><select name="server_id" id="server_id" class="form-control"> |
| | | {tmpl_var name='server_id'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="client_id">{tmpl_var name='client_id_txt'}</label> |
| | | <select name="client_id" id="client_id" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="client_id" class="col-sm-3 control-label">{tmpl_var name='client_id_txt'}</label> |
| | | <div class="col-sm-9"><select name="client_id" id="client_id" class="form-control"> |
| | | {tmpl_var name='client_id'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="name">{tmpl_var name='name_txt'}</label> |
| | | <input name="name" id="name" value="{tmpl_var name='name'}" size="40" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | </fieldset> |
| | | <div class="form-group"> |
| | | <label for="name" class="col-sm-3 control-label">{tmpl_var name='name_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="name" id="name" value="{tmpl_var name='name'}" class="form-control" /></div></div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/server_php_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_php_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_php_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_php_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_software_package"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="package_title">{tmpl_var name='package_title_txt'}</label> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="package_title" class="col-sm-3 control-label">{tmpl_var name='package_title_txt'}</label> |
| | | {tmpl_var name='package_title'}<input name="package_title" id="package_title" value="{tmpl_var name='package_title'}" size="40" maxlength="40" type="hidden" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="package_key">{tmpl_var name='package_key_txt'}</label> |
| | | <input name="package_key" id="package_key" value="{tmpl_var name='package_key'}" size="40" maxlength="40" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="package_key" class="col-sm-3 control-label">{tmpl_var name='package_key_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="package_key" id="package_key" value="{tmpl_var name='package_key'}" class="form-control" /></div></div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/software_package_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/software_package_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/software_package_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/software_package_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="desc_txt"></p> |
| | | |
| | | <div class="panel panel_software_repo"> |
| | |
| | | </tmpl_if> |
| | | <tmpl_if name="insert_key"> |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | |
| | | <p> </p> |
| | | <div class="ctrlHolder"> |
| | | <label for="install_key">{tmpl_var name='install_key_txt'}</label> |
| | | <input name="install_key" id="install_key" value="{tmpl_var name='install_key'}" size="40" maxlength="40" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="install_key" class="col-sm-3 control-label">{tmpl_var name='install_key_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="install_key" id="install_key" value="{tmpl_var name='install_key'}" class="form-control" /></div></div> |
| | | |
| | | <input type="hidden" name="package" value="{tmpl_var name='package_name'}"> |
| | | <input type="hidden" name="server_id" value="{tmpl_var name='server_id'}"> |
| | | <p> </p> |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/software_package_install.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/software_package_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </fieldset> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/software_package_install.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/software_package_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | | |
| | | </div> |
| | | </tmpl_if> |
| | | </div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_list_package"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('admin/software_package_list.php?action=repoupdate');"> |
| | | <span>{tmpl_var name="repoupdate_txt"}</span> |
| | | </button> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p> |
| | | |
| | | <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/software_package_list.php?action=repoupdate">{tmpl_var name="repoupdate_txt"}</button> |
| | | |
| | | |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_installed" scope="col"><tmpl_var name="installed_txt"></th> |
| | | <th class="tbl_col_package_title" scope="col"><tmpl_var name="package_title_txt"></th> |
| | | <th class="tbl_col_package_description" scope="col"><tmpl_var name="package_description_txt"></th> |
| | | <th class="tbl_col_package_id" scope="col"><tmpl_var name="package_id_txt"></th> |
| | | <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th data-column="installed"><tmpl_var name="installed_txt"></th> |
| | | <th data-column="package_title"><tmpl_var name="package_title_txt"></th> |
| | | <th data-column="package_description"><tmpl_var name="package_description_txt"></th> |
| | | <th data-column="package_id"><tmpl_var name="package_id_txt"></th> |
| | | <th class="small-col text-right">{tmpl_var name='search_limit'}</th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tmpl_if name="has_packages"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_installed">{tmpl_var name="installed"}</td> |
| | | <td class="tbl_col_package_title">{tmpl_var name="package_title"}</td> |
| | | <td class="tbl_col_package_description">{tmpl_var name="package_description"}</td> |
| | | <td class="tbl_col_package_id">ispapp{tmpl_var name="package_id"}</td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoEdit" href="javascript: loadContent('admin/software_package_edit.php?id={tmpl_var name='package_id'}');"><span>{tmpl_var name='edit_txt'}</span></a> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/software_package_del.php?software_update_inst_id={tmpl_var name='software_update_inst_id'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td>{tmpl_var name="installed"}</td> |
| | | <td>{tmpl_var name="package_title"}</td> |
| | | <td>{tmpl_var name="package_description"}</td> |
| | | <td>ispapp{tmpl_var name="package_id"}</td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-default formbutton-narrow" data-load-content="admin/software_package_edit.php?id={tmpl_var name='package_id'}"><span class="icon icon-edit"></span></a> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/software_package_del.php?software_update_inst_id={tmpl_var name='software_update_inst_id'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_if> |
| | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="5"></td> |
| | | <td colspan="5"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_software_repo"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="repo_name">{tmpl_var name='repo_name_txt'}</label> |
| | | <input name="repo_name" id="repo_name" value="{tmpl_var name='repo_name'}" size="40" maxlength="40" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="repo_url">{tmpl_var name='repo_url_txt'}</label> |
| | | <input name="repo_url" id="repo_url" value="{tmpl_var name='repo_url'}" size="40" maxlength="40" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="repo_username">{tmpl_var name='repo_username_txt'}</label> |
| | | <input name="repo_username" id="repo_username" value="{tmpl_var name='repo_username'}" size="30" maxlength="30" type="text" autocomplete="off" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="repo_password">{tmpl_var name='repo_password_txt'}</label> |
| | | <input name="repo_password" id="repo_password" value="{tmpl_var name='repo_password'}" size="30" maxlength="30" type="password" autocomplete="off" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='active_txt'}</p> |
| | | <div class="multiField"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="repo_name" class="col-sm-3 control-label">{tmpl_var name='repo_name_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="repo_name" id="repo_name" value="{tmpl_var name='repo_name'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="repo_url" class="col-sm-3 control-label">{tmpl_var name='repo_url_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="repo_url" id="repo_url" value="{tmpl_var name='repo_url'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="repo_username" class="col-sm-3 control-label">{tmpl_var name='repo_username_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="repo_username" id="repo_username" value="{tmpl_var name='repo_username'}" autocomplete="off" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="repo_password" class="col-sm-3 control-label">{tmpl_var name='repo_password_txt'}</label> |
| | | <div class="col-sm-9"><input type="password" name="repo_password" id="repo_password" value="{tmpl_var name='repo_password'}" autocomplete="off" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='active'} |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/software_repo_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/software_repo_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/software_repo_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/software_repo_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_list_software_repo"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('admin/software_repo_edit.php');"> |
| | | <span>{tmpl_var name="add_new_record_txt"}</span> |
| | | </button> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p> |
| | | |
| | | <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/software_repo_edit.php">{tmpl_var name="add_new_record_txt"}</button> |
| | | |
| | | |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th> |
| | | <th class="tbl_col_repo_name" scope="col"><tmpl_var name="repo_name_txt"></th> |
| | | <th class="tbl_col_repo_url" scope="col"><tmpl_var name="repo_url_txt"></th> |
| | | <th class="tbl_col_buttons" scope="col"> </th> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th class="tiny-col" data-column="active"><tmpl_var name="active_txt"></th> |
| | | <th data-column="repo_name"><tmpl_var name="repo_name_txt"></th> |
| | | <th data-column="repo_url"><tmpl_var name="repo_url_txt"></th> |
| | | <th class="text-right"> </th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_active"><select name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td class="tbl_col_repo_name"><input type="text" name="search_repo_name" value="{tmpl_var name='search_repo_name'}" /></td> |
| | | <td class="tbl_col_repo_url"><input type="text" name="search_repo_url" value="{tmpl_var name='search_repo_url'}" /></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','admin/software_repo_list.php');"><span>{tmpl_var name="filter_txt"}</span></button> |
| | | <tr> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td><input class="form-control" type="text" name="search_repo_name" value="{tmpl_var name='search_repo_name'}" /></td> |
| | | <td><input class="form-control" type="text" name="search_repo_url" value="{tmpl_var name='search_repo_url'}" /></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/software_repo_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_active"><a href="#" onclick="loadContent('admin/software_repo_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a></td> |
| | | <td class="tbl_col_repo_name"><a href="#" onclick="loadContent('admin/software_repo_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="repo_name"}</a></td> |
| | | <td class="tbl_col_repo_url"><a href="#" onclick="loadContent('admin/software_repo_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="repo_url"}</a></td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/software_repo_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/software_repo_edit.php?id={tmpl_var name='id'}">{tmpl_var name="active"}</a></td> |
| | | <td><a href="#" data-load-content="admin/software_repo_edit.php?id={tmpl_var name='id'}">{tmpl_var name="repo_name"}</a></td> |
| | | <td><a href="#" data-load-content="admin/software_repo_edit.php?id={tmpl_var name='id'}">{tmpl_var name="repo_url"}</a></td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/software_repo_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_loop> |
| | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="4"><tmpl_var name="paging"></td> |
| | | <td colspan="4"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_list_software_update"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset class="inlineLabels"><legend>Tools</legend> |
| | | <div class="buttons"> |
| | | <div class="ctrlHolder"> |
| | | <label for="server_id">{tmpl_var name='server_select_txt'}</label> |
| | | <select name="server_id" id="server_id" class="selectInput" onChange="submitForm('pageForm','admin/software_update_list.php');"> |
| | | <legend>Tools</legend> |
| | | |
| | | <div class="form-group"> |
| | | <label for="server_id" class="col-sm-3 control-label">{tmpl_var name='server_select_txt'}</label> |
| | | <div class="col-sm-9"><select name="server_id" id="server_id" class="form-control" onChange="ISPConfig.submitForm('pageForm','admin/software_update_list.php');"> |
| | | <tmpl_loop name="servers"> |
| | | <option value="{tmpl_var name='server_id'}" {tmpl_var name='selected'}>{tmpl_var name='server_name'}</option> |
| | | </tmpl_loop> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | </select></div> |
| | | |
| | | |
| | | </div> |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_installed" scope="col"><tmpl_var name="installed_txt"></th> |
| | | <th class="tbl_col_update_title" scope="col"><tmpl_var name="update_title_txt"></th> |
| | | <th class="tbl_col_version" scope="col"><tmpl_var name="version_txt"></th> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th data-column="installed"><tmpl_var name="installed_txt"></th> |
| | | <th data-column="update_title"><tmpl_var name="update_title_txt"></th> |
| | | <th data-column="version"><tmpl_var name="version_txt"></th> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_installed">{tmpl_var name="installed"}</td> |
| | | <td class="tbl_col_update_title">{tmpl_var name="update_title"}</td> |
| | | <td class="tbl_col_version">{tmpl_var name="version"}</td> |
| | | <tr> |
| | | <td>{tmpl_var name="installed"}</td> |
| | | <td>{tmpl_var name="update_title"}</td> |
| | | <td>{tmpl_var name="version"}</td> |
| | | </tr> |
| | | </tmpl_loop> |
| | | <tmpl_unless name="records"> |
| | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="3"></td> |
| | | <td colspan="3"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | </fieldset> |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('admin/server_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="ISPConfig.submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_list.php"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | <tmpl_if name="list_head_txt"> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | </tmpl_if> |
| | | <tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if> |
| | | |
| | | <div class="panel panel_system_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <div class="form-group"> |
| | | <div style="float:left;width:100%"> |
| | | <p class="label" style="width:270px">{tmpl_var name='use_domain_module_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='use_domain_module'} |
| | | </div> |
| | | </div> |
| | | <div style="float:left;width:500px;margin-top:20px">{tmpl_var name='use_domain_module_hint'}</div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='new_domain_txt'}</p> |
| | | <div class="multiField"> |
| | | <textarea name="new_domain_html" id="new_domain_html" style="width: 500px; height: 250px">{tmpl_var name='new_domain_html'}</textarea> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='new_domain_txt'}</label> |
| | | <div class="col-sm-9"><textarea class="form-control" name="new_domain_html" id="new_domain_html" height: 250px">{tmpl_var name='new_domain_html'}</textarea></div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/users_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/system_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/users_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_system_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='enable_custom_login_txt'}</p> |
| | | <div class="multiField"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='enable_custom_login_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='enable_custom_login'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='mailbox_show_autoresponder_tab_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='mailbox_show_autoresponder_tab_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='mailbox_show_autoresponder_tab'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='mailbox_show_mail_filter_tab_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='mailbox_show_mail_filter_tab_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='mailbox_show_mail_filter_tab'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='mailbox_show_custom_rules_tab_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='mailbox_show_custom_rules_tab_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='mailbox_show_custom_rules_tab'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='mailboxlist_webmail_link_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='mailboxlist_webmail_link_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='mailboxlist_webmail_link'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="webmail_url">{tmpl_var name='webmail_url_txt'}</label> |
| | | <input name="webmail_url" id="webmail_url" value="{tmpl_var name='webmail_url'}" size="30" maxlength="255" type="text" class="textInput" /> {tmpl_var name='webmail_url_note_txt'} <a href="javascript:void(0);" class="addPlaceholder">[SERVERNAME]</a> |
| | | <div class="form-group"> |
| | | <label for="webmail_url" class="col-sm-3 control-label">{tmpl_var name='webmail_url_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="webmail_url" id="webmail_url" value="{tmpl_var name='webmail_url'}" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='webmail_url_note_txt'} </div><a href="javascript:void(0);" class="addPlaceholder">[SERVERNAME]</a> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='mailmailinglist_link_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='mailmailinglist_link_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='mailmailinglist_link'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="mailmailinglist_url">{tmpl_var name='mailmailinglist_url_txt'}</label> |
| | | <input name="mailmailinglist_url" id="mailmailinglist_url" value="{tmpl_var name='mailmailinglist_url'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="admin_mail">{tmpl_var name='admin_mail_txt'}</label> |
| | | <input name="admin_mail" id="admin_mail" value="{tmpl_var name='admin_mail'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="admin_name">{tmpl_var name='admin_name_txt'}</label> |
| | | <input name="admin_name" id="admin_name" value="{tmpl_var name='admin_name'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='smtp_enabled_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="mailmailinglist_url" class="col-sm-3 control-label">{tmpl_var name='mailmailinglist_url_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="mailmailinglist_url" id="mailmailinglist_url" value="{tmpl_var name='mailmailinglist_url'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="admin_mail" class="col-sm-3 control-label">{tmpl_var name='admin_mail_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="admin_mail" id="admin_mail" value="{tmpl_var name='admin_mail'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="admin_name" class="col-sm-3 control-label">{tmpl_var name='admin_name_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="admin_name" id="admin_name" value="{tmpl_var name='admin_name'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='smtp_enabled_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='smtp_enabled'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="smtp_host">{tmpl_var name='smtp_host_txt'}</label> |
| | | <input name="smtp_host" id="smtp_host" value="{tmpl_var name='smtp_host'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="smtp_port">{tmpl_var name='smtp_port_txt'}</label> |
| | | <input name="smtp_port" id="smtp_port" value="{tmpl_var name='smtp_port'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="smtp_user">{tmpl_var name='smtp_user_txt'}</label> |
| | | <input name="smtp_user" id="smtp_user" value="{tmpl_var name='smtp_user'}" size="30" maxlength="255" type="text" autocomplete="off" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="smtp_pass">{tmpl_var name='smtp_pass_txt'}</label> |
| | | <input name="smtp_pass" id="smtp_pass" value="" size="30" maxlength="255" type="password" autocomplete="off" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="smtp_crypt">{tmpl_var name='smtp_crypt_txt'}</label> |
| | | <select name="smtp_crypt" id="smtp_crypt" class="selectInput formLengthHalf"> |
| | | <div class="form-group"> |
| | | <label for="smtp_host" class="col-sm-3 control-label">{tmpl_var name='smtp_host_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="smtp_host" id="smtp_host" value="{tmpl_var name='smtp_host'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="smtp_port" class="col-sm-3 control-label">{tmpl_var name='smtp_port_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="smtp_port" id="smtp_port" value="{tmpl_var name='smtp_port'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="smtp_user" class="col-sm-3 control-label">{tmpl_var name='smtp_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="smtp_user" id="smtp_user" value="{tmpl_var name='smtp_user'}" autocomplete="off" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="smtp_pass" class="col-sm-3 control-label">{tmpl_var name='smtp_pass_txt'}</label> |
| | | <div class="col-sm-9"><input type="password" name="smtp_pass" id="smtp_pass" value="" autocomplete="off" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="smtp_crypt" class="col-sm-3 control-label">{tmpl_var name='smtp_crypt_txt'}</label> |
| | | <div class="col-sm-9"><select name="smtp_crypt" id="smtp_crypt" class="form-control"> |
| | | {tmpl_var name='smtp_crypt'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="default_mailserver">{tmpl_var name='default_mailserver_txt'}</label> |
| | | <select name="default_mailserver" id="default_mailserver" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="default_mailserver" class="col-sm-3 control-label">{tmpl_var name='default_mailserver_txt'}</label> |
| | | <div class="col-sm-9"><select name="default_mailserver" id="default_mailserver" class="form-control"> |
| | | {tmpl_var name='default_mailserver'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/users_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/system_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/users_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_system_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>Misc</legend> |
| | | <div class="ctrlHolder"> |
| | | <label for="dashboard_atom_url_admin">{tmpl_var name='dashboard_atom_url_admin_txt'}</label> |
| | | <input name="dashboard_atom_url_admin" id="dashboard_atom_url_admin" value="{tmpl_var name='dashboard_atom_url_admin'}" size="" maxlength="" type="text" class="textInput" /> |
| | | <div class="form-group"> |
| | | <label for="file" class="col-sm-3 control-label">{tmpl_var name='logo_txt'}</label> |
| | | <div class="col-sm-3 col-text"><input name="file" id="file" size="30" type="file" class="fileUpload" /></div><div class="col-sm-6"><button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" id="start_upload">{tmpl_var name='upload_txt'}</button></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="dashboard_atom_url_reseller">{tmpl_var name='dashboard_atom_url_reseller_txt'}</label> |
| | | <input name="dashboard_atom_url_reseller" id="dashboard_atom_url_reseller" value="{tmpl_var name='dashboard_atom_url_reseller'}" size="" maxlength="" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="dashboard_atom_url_client">{tmpl_var name='dashboard_atom_url_client_txt'}</label> |
| | | <input name="dashboard_atom_url_client" id="dashboard_atom_url_client" value="{tmpl_var name='dashboard_atom_url_client'}" size="" maxlength="" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="monitor_key">{tmpl_var name='monitor_key_txt'}</label> |
| | | <input name="monitor_key" id="monitor_key" value="{tmpl_var name='monitor_key'}" size="" maxlength="" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="admin_dashlets_left">{tmpl_var name='admin_dashlets_left_txt'}</label> |
| | | <input name="admin_dashlets_left" id="admin_dashlets_left" value="{tmpl_var name='admin_dashlets_left'}" size="" maxlength="" type="text" class="textInput" /> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="admin_dashlets_right">{tmpl_var name='admin_dashlets_right_txt'}</label> |
| | | <input name="admin_dashlets_right" id="admin_dashlets_right" value="{tmpl_var name='admin_dashlets_right'}" size="" maxlength="" type="text" class="textInput" /> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="reseller_dashlets_left">{tmpl_var name='reseller_dashlets_left_txt'}</label> |
| | | <input name="reseller_dashlets_left" id="reseller_dashlets_left" value="{tmpl_var name='reseller_dashlets_left'}" size="" maxlength="" type="text" class="textInput" /> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="reseller_dashlets_right">{tmpl_var name='reseller_dashlets_right_txt'}</label> |
| | | <input name="reseller_dashlets_right" id="reseller_dashlets_right" value="{tmpl_var name='reseller_dashlets_right'}" size="" maxlength="" type="text" class="textInput" /> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="client_dashlets_left">{tmpl_var name='client_dashlets_left_txt'}</label> |
| | | <input name="client_dashlets_left" id="client_dashlets_left" value="{tmpl_var name='client_dashlets_left'}" size="" maxlength="" type="text" class="textInput" /> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="client_dashlets_right">{tmpl_var name='client_dashlets_right_txt'}</label> |
| | | <input name="client_dashlets_right" id="client_dashlets_right" value="{tmpl_var name='client_dashlets_right'}" size="" maxlength="" type="text" class="textInput" /> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='tab_change_discard_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="dashboard_atom_url_admin" class="col-sm-3 control-label">{tmpl_var name='used_logo_txt'}</label> |
| | | <div class="col-sm-9" id="used_logo">{tmpl_var name='used_logo'}</div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="dashboard_atom_url_admin" class="col-sm-3 control-label">{tmpl_var name='dashboard_atom_url_admin_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="dashboard_atom_url_admin" id="dashboard_atom_url_admin" value="{tmpl_var name='dashboard_atom_url_admin'}" size="" maxlength="" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="dashboard_atom_url_reseller" class="col-sm-3 control-label">{tmpl_var name='dashboard_atom_url_reseller_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="dashboard_atom_url_reseller" id="dashboard_atom_url_reseller" value="{tmpl_var name='dashboard_atom_url_reseller'}" size="" maxlength="" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="dashboard_atom_url_client" class="col-sm-3 control-label">{tmpl_var name='dashboard_atom_url_client_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="dashboard_atom_url_client" id="dashboard_atom_url_client" value="{tmpl_var name='dashboard_atom_url_client'}" size="" maxlength="" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="monitor_key" class="col-sm-3 control-label">{tmpl_var name='monitor_key_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="monitor_key" id="monitor_key" value="{tmpl_var name='monitor_key'}" size="" maxlength="" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="admin_dashlets_left" class="col-sm-3 control-label">{tmpl_var name='admin_dashlets_left_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="admin_dashlets_left" id="admin_dashlets_left" value="{tmpl_var name='admin_dashlets_left'}" size="" maxlength="" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label for="admin_dashlets_right" class="col-sm-3 control-label">{tmpl_var name='admin_dashlets_right_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="admin_dashlets_right" id="admin_dashlets_right" value="{tmpl_var name='admin_dashlets_right'}" size="" maxlength="" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label for="reseller_dashlets_left" class="col-sm-3 control-label">{tmpl_var name='reseller_dashlets_left_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="reseller_dashlets_left" id="reseller_dashlets_left" value="{tmpl_var name='reseller_dashlets_left'}" size="" maxlength="" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label for="reseller_dashlets_right" class="col-sm-3 control-label">{tmpl_var name='reseller_dashlets_right_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="reseller_dashlets_right" id="reseller_dashlets_right" value="{tmpl_var name='reseller_dashlets_right'}" size="" maxlength="" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label for="client_dashlets_left" class="col-sm-3 control-label">{tmpl_var name='client_dashlets_left_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="client_dashlets_left" id="client_dashlets_left" value="{tmpl_var name='client_dashlets_left'}" size="" maxlength="" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label for="client_dashlets_right" class="col-sm-3 control-label">{tmpl_var name='client_dashlets_right_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="client_dashlets_right" id="client_dashlets_right" value="{tmpl_var name='client_dashlets_right'}" size="" maxlength="" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='tab_change_discard_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='tab_change_discard'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='tab_change_warning_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='tab_change_warning_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='tab_change_warning'}<br/>{tmpl_var name='tab_change_warning_note_txt'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='use_loadindicator_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='use_loadindicator_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='use_loadindicator'}<br/>{tmpl_var name='f5_to_reload_js_txt'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='use_combobox_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='use_combobox_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='use_combobox'}<br/>{tmpl_var name='f5_to_reload_js_txt'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="customer_no_template">{tmpl_var name='customer_no_template_txt'}</label> |
| | | <input name="customer_no_template" id="customer_no_template" value="{tmpl_var name='customer_no_template'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="customer_no_start">{tmpl_var name='customer_no_start_txt'}</label> |
| | | <input name="customer_no_start" id="customer_no_start" value="{tmpl_var name='customer_no_start'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="customer_no_counter">{tmpl_var name='customer_no_counter_txt'}</label> |
| | | <input name="customer_no_counter" id="customer_no_counter" value="{tmpl_var name='customer_no_counter'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="session_timeout">{tmpl_var name='session_timeout_txt'}</label> |
| | | <input name="session_timeout" id="session_timeout" value="{tmpl_var name='session_timeout'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='session_allow_endless_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="customer_no_template" class="col-sm-3 control-label">{tmpl_var name='customer_no_template_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="customer_no_template" id="customer_no_template" value="{tmpl_var name='customer_no_template'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="customer_no_start" class="col-sm-3 control-label">{tmpl_var name='customer_no_start_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="customer_no_start" id="customer_no_start" value="{tmpl_var name='customer_no_start'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="customer_no_counter" class="col-sm-3 control-label">{tmpl_var name='customer_no_counter_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="customer_no_counter" id="customer_no_counter" value="{tmpl_var name='customer_no_counter'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="session_timeout" class="col-sm-3 control-label">{tmpl_var name='session_timeout_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="session_timeout" id="session_timeout" value="{tmpl_var name='session_timeout'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='session_allow_endless_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='session_allow_endless'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="min_password_length">{tmpl_var name='min_password_length_txt'}</label> |
| | | <input name="min_password_length" id="min_password_length" value="{tmpl_var name='min_password_length'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="min_password_strength">{tmpl_var name='min_password_strength_txt'}</label> |
| | | <select name="min_password_strength" id="min_password_strength" class="selectInput formLengthHalf"> |
| | | <div class="form-group"> |
| | | <label for="min_password_length" class="col-sm-3 control-label">{tmpl_var name='min_password_length_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="min_password_length" id="min_password_length" value="{tmpl_var name='min_password_length'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="min_password_strength" class="col-sm-3 control-label">{tmpl_var name='min_password_strength_txt'}</label> |
| | | <div class="col-sm-9"><select name="min_password_strength" id="min_password_strength" class="form-control"> |
| | | {tmpl_var name='min_password_strength'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='maintenance_mode_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='maintenance_mode_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='maintenance_mode'} |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <tmpl_if name="msg"> |
| | | <div id="OKMsg"><p><tmpl_var name="msg"></p></div> |
| | | </tmpl_if> |
| | | <tmpl_if name="error"> |
| | | <div id="errorMsg"><h3><tmpl_var name="error_txt"></h3><ol><tmpl_var name="error"></ol></div> |
| | | </tmpl_if> |
| | | |
| | | <input type="hidden" name="id" id="id" value="{tmpl_var name='id'}"> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/system_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | | <script language="JavaScript" type="text/javascript"> |
| | | var defaultLogo = '{tmpl_var name='default_logo'}'; |
| | | $(document).on('click', '#del_custom_logo', function(){ |
| | | delCustomLogo(); |
| | | }); |
| | | |
| | | function delCustomLogo() { |
| | | var id = jQuery('input[name="id"]').val(); |
| | | |
| | | jQuery.getJSON('admin/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {'id': id, 'type': "delcustomlogo"}, function(data) { |
| | | //console.log(data); |
| | | $('#used_logo').html(defaultLogo); |
| | | $('#logo').css({ "background": "url("+data.data+") no-repeat", "width": data.width, "height": data.height }); |
| | | }); |
| | | } |
| | | |
| | | // Variable to store your files |
| | | var files; |
| | | // Add events |
| | | $('input[type="file"]').on('change', prepareUpload); |
| | | $('#start_upload').on('click', uploadFiles); |
| | | |
| | | // Grab the files and set them to our variable |
| | | function prepareUpload(event){ |
| | | files = event.target.files; |
| | | } |
| | | |
| | | // Catch the form submit and upload the files |
| | | function uploadFiles(event){ |
| | | event.stopPropagation(); // Stop stuff happening |
| | | event.preventDefault(); // Totally stop stuff happening |
| | | |
| | | var id = jQuery('input[name="id"]').val(); |
| | | |
| | | // Create a formdata object and add the files |
| | | var data = new FormData(); |
| | | $.each(files, function(key, value){ |
| | | data.append(key, value); |
| | | }); |
| | | |
| | | $.ajax({ |
| | | url: 'admin/ajax_get_json.php?id='+id+'&type=uploadfile', |
| | | type: 'POST', |
| | | data: data, |
| | | cache: false, |
| | | dataType: 'json', |
| | | processData: false, // Don't process the files |
| | | contentType: false, // Set content type to false as jQuery will tell the server its a query string request |
| | | success: function(data, textStatus, jqXHR){ |
| | | if(typeof data.error === 'undefined'){ |
| | | // Success so call function to process the form |
| | | //console.log(data); |
| | | $('#used_logo').html('<img src="'+data.data+'" /> <a href="#" class="btn btn-default formbutton-danger formbutton-narrow" style="margin:5px" id="del_custom_logo"><span class="icon icon-delete"></span></a>'); |
| | | $('#logo').css({ "background": "url("+data.data+") no-repeat", "width": data.width, "height": data.height }); |
| | | } else { |
| | | // Handle errors here |
| | | //console.log(data); |
| | | } |
| | | }, |
| | | error: function(jqXHR, textStatus, errorThrown){ |
| | | // Handle errors here |
| | | //console.log(data); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | </script> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_system_config"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="dbname_prefix">{tmpl_var name='dbname_prefix_txt'}</label> |
| | | <input name="dbname_prefix" id="dbname_prefix" value="{tmpl_var name='dbname_prefix'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="dbuser_prefix">{tmpl_var name='dbuser_prefix_txt'}</label> |
| | | <input name="dbuser_prefix" id="dbuser_prefix" value="{tmpl_var name='dbuser_prefix'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="ftpuser_prefix">{tmpl_var name='ftpuser_prefix_txt'}</label> |
| | | <input name="ftpuser_prefix" id="ftpuser_prefix" value="{tmpl_var name='ftpuser_prefix'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="shelluser_prefix">{tmpl_var name='shelluser_prefix_txt'}</label> |
| | | <input name="shelluser_prefix" id="shelluser_prefix" value="{tmpl_var name='shelluser_prefix'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="webdavuser_prefix">{tmpl_var name='webdavuser_prefix_txt'}</label> |
| | | <input name="webdavuser_prefix" id="webdavuser_prefix" value="{tmpl_var name='webdavuser_prefix'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='dblist_phpmyadmin_link_txt'}</p> |
| | | <div class="multiField"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="dbname_prefix" class="col-sm-3 control-label">{tmpl_var name='dbname_prefix_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="dbname_prefix" id="dbname_prefix" value="{tmpl_var name='dbname_prefix'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="dbuser_prefix" class="col-sm-3 control-label">{tmpl_var name='dbuser_prefix_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="dbuser_prefix" id="dbuser_prefix" value="{tmpl_var name='dbuser_prefix'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="ftpuser_prefix" class="col-sm-3 control-label">{tmpl_var name='ftpuser_prefix_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="ftpuser_prefix" id="ftpuser_prefix" value="{tmpl_var name='ftpuser_prefix'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="shelluser_prefix" class="col-sm-3 control-label">{tmpl_var name='shelluser_prefix_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="shelluser_prefix" id="shelluser_prefix" value="{tmpl_var name='shelluser_prefix'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="webdavuser_prefix" class="col-sm-3 control-label">{tmpl_var name='webdavuser_prefix_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="webdavuser_prefix" id="webdavuser_prefix" value="{tmpl_var name='webdavuser_prefix'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='dblist_phpmyadmin_link_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='dblist_phpmyadmin_link'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="phpmyadmin_url">{tmpl_var name='phpmyadmin_url_txt'}</label> |
| | | <input name="phpmyadmin_url" id="phpmyadmin_url" value="{tmpl_var name='phpmyadmin_url'}" size="30" maxlength="255" type="text" class="textInput" /> {tmpl_var name='phpmyadmin_url_note_txt'} <a href="javascript:void(0);" class="addPlaceholder">[SERVERNAME]</a>, <a href="javascript:void(0);" class="addPlaceholder">[DATABASENAME]</a> |
| | | <div class="form-group"> |
| | | <label for="phpmyadmin_url" class="col-sm-3 control-label">{tmpl_var name='phpmyadmin_url_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="phpmyadmin_url" id="phpmyadmin_url" value="{tmpl_var name='phpmyadmin_url'}" class="form-control" /></div><div class="col-sm-3 input-sm"> {tmpl_var name='phpmyadmin_url_note_txt'} </div><a href="javascript:void(0);" class="addPlaceholder">[SERVERNAME]</a>, <a href="javascript:void(0);" class="addPlaceholder">[DATABASENAME]</a> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="webftp_url">{tmpl_var name='webftp_url_txt'}</label> |
| | | <input name="webftp_url" id="webftp_url" value="{tmpl_var name='webftp_url'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='vhost_subdomains_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="webftp_url" class="col-sm-3 control-label">{tmpl_var name='webftp_url_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="webftp_url" id="webftp_url" value="{tmpl_var name='webftp_url'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='vhost_subdomains_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='vhost_subdomains'} {tmpl_var name='vhost_subdomains_note_txt'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='vhost_aliasdomains_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='vhost_aliasdomains_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='vhost_aliasdomains'} {tmpl_var name='vhost_aliasdomains_note_txt'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='client_username_web_check_disabled_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='client_username_web_check_disabled_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='client_username_web_check_disabled'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='reseller_can_use_options_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='backups_include_into_web_quota_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='backups_include_into_web_quota'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='reseller_can_use_options_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='reseller_can_use_options'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="default_webserver">{tmpl_var name='default_webserver_txt'}</label> |
| | | <select name="default_webserver" id="default_webserver" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="default_webserver" class="col-sm-3 control-label">{tmpl_var name='default_webserver_txt'}</label> |
| | | <div class="col-sm-9"><select name="default_webserver" id="default_webserver" class="form-control"> |
| | | {tmpl_var name='default_webserver'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="default_dbserver">{tmpl_var name='default_dbserver_txt'}</label> |
| | | <select name="default_dbserver" id="default_dbserver" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="default_dbserver" class="col-sm-3 control-label">{tmpl_var name='default_dbserver_txt'}</label> |
| | | <div class="col-sm-9"><select name="default_dbserver" id="default_dbserver" class="form-control"> |
| | | {tmpl_var name='default_dbserver'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/system_config_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/users_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/system_config_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/users_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="tpl_default_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="tpl_default_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="tpl_default_desc_txt"></p> |
| | | |
| | | <div class="panel panel_tools_interface"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="logo_url">{tmpl_var name='logo_url_txt'}Logo URL</label> |
| | | <input name="logo_url" id="logo_url" value="{tmpl_var name='logo_url'}" size="" maxlength="" type="text" class="textInput" /> 152x46px |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <div class="form-group"> |
| | | <label for="logo_url" class="col-sm-3 control-label">{tmpl_var name='logo_url_txt'}Logo URL</label> |
| | | <div class="col-sm-6"><input type="text" name="logo_url" id="logo_url" value="{tmpl_var name='logo_url'}" size="" maxlength="" class="form-control" /></div><div class="col-sm-3 input-sm"> 152x46px |
| | | </div></div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | <input type="hidden" name="username" value="global"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/tpl_default.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/server_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/tpl_default.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_users"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="default_group">{tmpl_var name='default_group_txt'}</label> |
| | | <select name="default_group" id="default_group" class="selectInput"> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="default_group" class="col-sm-3 control-label">{tmpl_var name='default_group_txt'}</label> |
| | | <div class="col-sm-9"><select name="default_group" id="default_group" class="form-control"> |
| | | {tmpl_var name='default_group'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='groups_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='groups_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='groups'} |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/users_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/users_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/users_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/users_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_list_users"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('admin/users_edit.php');"> |
| | | <span>{tmpl_var name="add_new_record_txt"}</span> |
| | | </button> |
| | | <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p> |
| | | |
| | | <button class="btn btn-default formbutton-success" type="button" data-load-content="admin/users_edit.php">{tmpl_var name="add_new_record_txt"}</button> |
| | | <p><tmpl_var name="warning_txt"></p> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_client_id" scope="col"><tmpl_var name="client_id_txt"></th> |
| | | <th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th> |
| | | <th class="tbl_col_username" scope="col"><tmpl_var name="username_txt"></th> |
| | | <th class="tbl_col_groups" scope="col"><tmpl_var name="groups_txt"></th> |
| | | <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th class="small-col" data-column="client_id"><tmpl_var name="client_id_txt"></th> |
| | | <th class="tiny-col" data-column="active"><tmpl_var name="active_txt"></th> |
| | | <th data-column="username"><tmpl_var name="username_txt"></th> |
| | | <th data-column="groups"><tmpl_var name="groups_txt"></th> |
| | | <th class="small-col text-right">{tmpl_var name='search_limit'}</th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_client_id"><input type="text" name="search_client_id" value="{tmpl_var name='search_client_id'}" /></td> |
| | | <td class="tbl_col_active"><select name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td class="tbl_col_username"><input type="text" name="search_username" value="{tmpl_var name='search_username'}" /></td> |
| | | <td class="tbl_col_groups"><select name="search_groups">{tmpl_var name='search_groups'}</select></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','admin/users_list.php');"><span>{tmpl_var name="filter_txt"}</span></button> |
| | | <tr> |
| | | <td><input class="form-control" type="text" name="search_client_id" value="{tmpl_var name='search_client_id'}" /></td> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td><input class="form-control" type="text" name="search_username" value="{tmpl_var name='search_username'}" /></td> |
| | | <td><select class="form-control" name="search_groups">{tmpl_var name='search_groups'}</select></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="admin/users_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_client_id"><a href="#" onclick="loadContent('admin/users_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="client_id"}</a></td> |
| | | <td class="tbl_col_active"><a href="#" onclick="loadContent('admin/users_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a></td> |
| | | <td class="tbl_col_username"><div class="icons16 group-{tmpl_var name="typ"}" title="{tmpl_var name="typ"}"><span>{tmpl_var name="typ"}</span></div> <div class="group-icon"><a href="#" onclick="loadContent('admin/users_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="username"}</a></div></td> |
| | | <td class="tbl_col_groups">{tmpl_var name="groups"}</td> |
| | | <td class="tbl_col_buttons"> |
| | | <tr> |
| | | <td><a href="#" data-load-content="admin/users_edit.php?id={tmpl_var name='id'}">{tmpl_var name="client_id"}</a></td> |
| | | <td><a href="#" data-load-content="admin/users_edit.php?id={tmpl_var name='id'}">{tmpl_var name="active"}</a></td> |
| | | <td><div class="icons16 group-{tmpl_var name="typ"}" title="{tmpl_var name="typ"}"><span>{tmpl_var name="typ"}</span></div> <div class="group-icon"><a href="#" data-load-content="admin/users_edit.php?id={tmpl_var name='id'}">{tmpl_var name="username"}</a></div></td> |
| | | <td>{tmpl_var name="groups"}</td> |
| | | <td class="text-right"> |
| | | <tmpl_if name="username" op="!=" value="admin"> |
| | | <a class="button icons16 icoLoginAs" href="javascript: loadContent('login/login_as.php?cid={tmpl_var name='client_id'}');"><span>{tmpl_var name='login_as_txt'}</span></a> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('admin/users_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <a class="btn btn-default formbutton-success formbutton-narrow" data-load-content="login/login_as.php?cid={tmpl_var name='client_id'}"><span class="icon icon-loginas"></span></a> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('admin/users_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </tmpl_if> |
| | | </td> |
| | | </tr> |
| | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="5"><tmpl_var name="paging"></td> |
| | | <td colspan="5"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_users"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"> |
| | | <div class="ctrlHolder"> |
| | | <label for="username">{tmpl_var name='username_txt'}</label> |
| | | <input name="username" id="username" value="{tmpl_var name='username'}" size="15" maxlength="30" type="text" class="textInput" /> |
| | | |
| | | |
| | | <div class="form-group"> |
| | | <label for="username" class="col-sm-3 control-label">{tmpl_var name='username_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="username" id="username" value="{tmpl_var name='username'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="passwort" class="col-sm-3 control-label">{tmpl_var name='passwort_txt'}</label> |
| | | <div class="col-sm-6"><input type="password" name="passwort" id="passwort" value="{tmpl_var name='passwort'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('passwort','repeat_password');"/></div><div class="col-sm-3 input-sm"> </div><a href="javascript:void(0);" onclick="generatePassword('passwort','repeat_password');">{tmpl_var name='generate_password_txt'}</a> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="passwort">{tmpl_var name='passwort_txt'}</label> |
| | | <input name="passwort" id="passwort" value="{tmpl_var name='passwort'}" size="15" maxlength="100" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('passwort','repeat_password');"/> <a href="javascript:void(0);" onclick="generatePassword('passwort','repeat_password');">{tmpl_var name='generate_password_txt'}</a> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='password_strength_txt'}</p> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='password_strength_txt'}</label> |
| | | <div id="passBar"></div> |
| | | <p class="formHint"><span id="passText"> </span></p> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> |
| | | <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('passwort','repeat_password');" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="repeat_password" class="col-sm-3 control-label">{tmpl_var name='repeat_password_txt'}</label> |
| | | <div class="col-sm-9"><input type="password" name="repeat_password" id="repeat_password" value="" class="form-control" autocomplete="off" onkeyup="checkPassMatch('passwort','repeat_password');" /></div></div> |
| | | <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> |
| | | <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='modules_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='modules_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='modules'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="startmodule">{tmpl_var name='startmodule_txt'}</label> |
| | | <select name="startmodule" id="startmodule" class="selectInput formLengthHalf"> |
| | | <div class="form-group"> |
| | | <label for="startmodule" class="col-sm-3 control-label">{tmpl_var name='startmodule_txt'}</label> |
| | | <div class="col-sm-9"><select name="startmodule" id="startmodule" class="form-control"> |
| | | {tmpl_var name='startmodule'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='app_theme_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='app_theme_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='app_theme'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='typ_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='typ_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='typ'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='active_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='active'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="language">{tmpl_var name='language_txt'}</label> |
| | | <select name="language" id="language" class="selectInput flags"> |
| | | <div class="form-group"> |
| | | <label for="language" class="col-sm-3 control-label">{tmpl_var name='language_txt'}</label> |
| | | <div class="col-sm-9"><select name="language" id="language" class="form-control flags"> |
| | | {tmpl_var name='language'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | </fieldset> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='lost_password_function_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='lost_password_function'} |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','admin/users_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('admin/users_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/users_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/users_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | |
| | | class page_action extends tform_actions { |
| | | |
| | | // function onBeforeUpdate() { |
| | | // global $app, $conf; |
| | | // |
| | | // //* Check if the server has been changed |
| | | // // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway |
| | | // if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) && isset($this->dataRecord["server_id"])) { |
| | | // $rec = $app->db->queryOneRecord("SELECT server_id from server_php WHERE server_php_id = ".$this->id); |
| | | // if($rec['server_id'] != $this->dataRecord["server_id"]) { |
| | | // //* Add a error message and switch back to old server |
| | | // $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); |
| | | // $this->dataRecord["server_id"] = $rec['server_id']; |
| | | // } |
| | | // unset($rec); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | $page = new page_action; |
| | |
| | | function onAfterUpdate() { |
| | | global $app, $conf; |
| | | |
| | | $client = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = ".$this->id); |
| | | $client = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = ?", $this->id); |
| | | $client_id = $app->functions->intval($client['client_id']); |
| | | $username = $app->db->quote($this->dataRecord["username"]); |
| | | $old_username = $app->db->quote($this->oldDataRecord['username']); |
| | | $username = $this->dataRecord["username"]; |
| | | $old_username = $this->oldDataRecord['username']; |
| | | |
| | | // username changed |
| | | if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) { |
| | | $sql = "UPDATE client SET username = '$username' WHERE client_id = $client_id AND username = '$old_username'"; |
| | | $app->db->query($sql); |
| | | $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = $client_id"); |
| | | $app->db->datalogUpdate("sys_group", "name = '$username'", 'groupid', $tmp['groupid']); |
| | | $sql = "UPDATE client SET username = ? WHERE client_id = ? AND username = ?"; |
| | | $app->db->query($sql, $username, $client_id, $old_username); |
| | | $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = ?", $client_id); |
| | | $app->db->datalogUpdate("sys_group", array("name" => $username), 'groupid', $tmp['groupid']); |
| | | unset($tmp); |
| | | } |
| | | |
| | | // password changed |
| | | if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord["passwort"]) && $this->dataRecord["passwort"] != '') { |
| | | $password = $app->db->quote($this->dataRecord["passwort"]); |
| | | $password = $this->dataRecord["passwort"]; |
| | | $salt="$1$"; |
| | | $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; |
| | | for ($n=0;$n<8;$n++) { |
| | |
| | | } |
| | | $salt.="$"; |
| | | $password = crypt(stripslashes($password), $salt); |
| | | $sql = "UPDATE client SET password = '$password' WHERE client_id = $client_id AND username = '$username'"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE client SET password = ? WHERE client_id = ? AND username = ?"; |
| | | $app->db->query($sql, $password, $client_id, $username); |
| | | } |
| | | |
| | | // language changed |
| | | if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) { |
| | | $language = $app->db->quote($this->dataRecord["language"]); |
| | | $sql = "UPDATE client SET language = '$language' WHERE client_id = $client_id AND username = '$username'"; |
| | | $app->db->query($sql); |
| | | $language = $this->dataRecord["language"]; |
| | | $sql = "UPDATE client SET language = ? WHERE client_id = ? AND username = ?"; |
| | | $app->db->query($sql, $language, $client_id, $username); |
| | | } |
| | | |
| | | // reseller status changed |
| | | /* |
| | | if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] != $this->oldDataRecord["limit_client"]) { |
| | | $modules = $conf['interface_modules_enabled']; |
| | | if($this->dataRecord["limit_client"] > 0) $modules .= ',client'; |
| | | $modules = $app->db->quote($modules); |
| | | $client_id = $this->id; |
| | | $sql = "UPDATE sys_user SET modules = '$modules' WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | } |
| | | */ |
| | | parent::onAfterUpdate(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if(!preg_match("/^[a-z]{2,20}$/i", $mod)) die('module name contains unallowed chars.'); |
| | | if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,9}$/i", $redirect)) die('redirect contains unallowed chars.'); |
| | | |
| | | //* Check if user may use the module. |
| | | $user_modules = explode(",", $_SESSION["s"]["user"]["modules"]); |
| | |
| | | |
| | | $this->dataRecord = $app->tform->getDataRecord($this->id); |
| | | $client_id = $app->functions->intval($this->dataRecord['client_id']); |
| | | |
| | | |
| | | //$parent_client_id = $app->functions->intval($this->dataRecord['parent_client_id']); |
| | | //$parent_user = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE client_id = $parent_client_id"); |
| | | $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = $client_id"); |
| | | $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id); |
| | | |
| | | // Get all records (sub-clients, mail, web, etc....) of this client. |
| | | $tables = 'cron,client,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain'; |
| | |
| | | if($client_group_id > 1) { |
| | | foreach($tables_array as $table) { |
| | | if($table != '') { |
| | | $records = $app->db->queryAllRecords("SELECT * FROM $table WHERE sys_groupid = ".$client_group_id); |
| | | $records = $app->db->queryAllRecords("SELECT * FROM ?? WHERE sys_groupid = ?", $table, $client_group_id); |
| | | $number = count($records); |
| | | if($number > 0) $table_list[] = array('table' => $table."(".$number.")"); |
| | | } |
| | |
| | | if($client_id > 0) { |
| | | // remove the group of the client from the resellers group |
| | | $parent_client_id = $app->functions->intval($this->dataRecord['parent_client_id']); |
| | | $parent_user = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE client_id = $parent_client_id"); |
| | | $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = $client_id"); |
| | | $parent_user = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE client_id = ?", $parent_client_id); |
| | | $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id); |
| | | $app->auth->remove_group_from_user($parent_user['userid'], $client_group['groupid']); |
| | | |
| | | // delete the group of the client |
| | | $app->db->query("DELETE FROM sys_group WHERE client_id = $client_id"); |
| | | $app->db->query("DELETE FROM sys_group WHERE client_id = ?", $client_id); |
| | | |
| | | // delete the sys user(s) of the client |
| | | $app->db->query("DELETE FROM sys_user WHERE client_id = $client_id"); |
| | | $app->db->query("DELETE FROM sys_user WHERE client_id = ?", $client_id); |
| | | |
| | | // Delete all records (sub-clients, mail, web, etc....) of this client. |
| | | $tables = 'client,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_folder,web_folder_user,domain'; |
| | |
| | | if($client_group_id > 1) { |
| | | foreach($tables_array as $table) { |
| | | if($table != '') { |
| | | $records = $app->db->queryAllRecords("SELECT * FROM $table WHERE sys_groupid = ".$client_group_id); |
| | | $records = $app->db->queryAllRecords("SELECT * FROM ?? WHERE sys_groupid = ?", $table, $client_group_id); |
| | | //* find the primary ID of the table |
| | | $table_info = $app->db->tableInfo($table); |
| | | $index_field = ''; |
| | |
| | | $app->db->datalogDelete($table, $index_field, $rec[$index_field]); |
| | | //* Delete traffic records that dont have a sys_groupid column |
| | | if($table == 'web_domain') { |
| | | $app->db->query("DELETE FROM web_traffic WHERE hostname = '".$app->db->quote($rec['domain'])."'"); |
| | | $app->db->query("DELETE FROM web_traffic WHERE hostname = ?", $rec['domain']); |
| | | } |
| | | //* Delete mail_traffic records that dont have a sys_groupid |
| | | if($table == 'mail_user') { |
| | | $app->db->query("DELETE FROM mail_traffic WHERE mailuser_id = '".$app->db->quote($rec['mailuser_id'])."'"); |
| | | $app->db->query("DELETE FROM mail_traffic WHERE mailuser_id = ?", $rec['mailuser_id']); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | // Get the limits of the client |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | |
| | | // Check if the user may add another website. |
| | | if($client["limit_client"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = $client_group_id"); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = ?", $client_group_id); |
| | | if($tmp["number"] >= $client["limit_client"]) { |
| | | $app->error($app->tform->wordbook["limit_client_txt"]); |
| | | } |
| | |
| | | |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | |
| | | // Check if the user may add another website. |
| | | if($client["limit_client"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = $client_group_id"); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = ?", $client_group_id); |
| | | if($tmp["number"] >= $client["limit_client"]) { |
| | | $app->error($app->tform->wordbook["limit_client_txt"]); |
| | | } |
| | |
| | | } |
| | | |
| | | if($this->id != 0) { |
| | | $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ' . $this->id); |
| | | $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ?', $this->id); |
| | | if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) { |
| | | // check previous type of storing templates |
| | | $tpls = explode('/', $this->oldDataRecord['template_additional']); |
| | |
| | | $app->tpl->setVar('tpl_add_select', $option); |
| | | |
| | | // check for new-style records |
| | | $result = $app->db->queryAllRecords('SELECT assigned_template_id, client_template_id FROM client_template_assigned WHERE client_id = ' . $this->id); |
| | | $result = $app->db->queryAllRecords('SELECT assigned_template_id, client_template_id FROM client_template_assigned WHERE client_id = ?', $this->id); |
| | | if($result && count($result) > 0) { |
| | | // new style |
| | | $items = array(); |
| | |
| | | unset($tmprec); |
| | | } else { |
| | | // old style |
| | | $sql = "SELECT template_additional FROM client WHERE client_id = " . $this->id; |
| | | $result = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT template_additional FROM client WHERE client_id = ?"; |
| | | $result = $app->db->queryOneRecord($sql, $this->id); |
| | | $tplAdd = explode("/", $result['template_additional']); |
| | | $text = ''; |
| | | foreach($tplAdd as $item){ |
| | |
| | | $customer_no = $app->functions->intval($system_config['misc']['customer_no_start']+$system_config['misc']['customer_no_counter']); |
| | | $customer_no_string = str_replace('[CUSTOMER_NO]',$customer_no,$system_config['misc']['customer_no_template']); |
| | | $app->tpl->setVar('customer_no',$customer_no_string); |
| | | |
| | | //* save new counter value |
| | | /* |
| | | $system_config['misc']['customer_no_counter']++; |
| | | $system_config_str = $app->ini_parser->get_ini_string($system_config); |
| | | $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($system_config_str)."'", 'sysini_id', 1); |
| | | */ |
| | | } |
| | | } else { |
| | | //* Logged in user must be a reseller |
| | | //* get the record of the reseller |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $reseller = $app->db->queryOneRecord("SELECT client.client_id, client.customer_no_template, client.customer_no_counter, client.customer_no_start FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ".$client_group_id); |
| | | $reseller = $app->db->queryOneRecord("SELECT client.client_id, client.customer_no_template, client.customer_no_counter, client.customer_no_start FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ?", $client_group_id); |
| | | |
| | | if($reseller['customer_no_template'] != '') { |
| | | //* Set customer no default |
| | | $customer_no = $app->functions->intval($reseller['customer_no_start']+$reseller['customer_no_counter']); |
| | | $customer_no_string = str_replace('[CUSTOMER_NO]',$customer_no,$reseller['customer_no_template']); |
| | | $app->tpl->setVar('customer_no',$customer_no_string); |
| | | |
| | | //* save new counter value |
| | | /* |
| | | $customer_no_counter = $app->functions->intval($reseller['customer_no_counter']+1); |
| | | $app->db->query("UPDATE client SET customer_no_counter = $customer_no_counter WHERE client_id = ".$app->functions->intval($reseller['client_id'])); |
| | | */ |
| | | } |
| | | } |
| | | } |
| | |
| | | function onAfterInsert() { |
| | | global $app, $conf; |
| | | // Create the group for the client |
| | | $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('".$app->db->quote($this->dataRecord["username"])."','',".$this->id.")", 'groupid'); |
| | | $groupid = $app->db->datalogInsert('sys_group', array("name" => $this->dataRecord["username"], "description" => '', "client_id" => $this->id), 'groupid'); |
| | | $groups = $groupid; |
| | | |
| | | $username = $app->db->quote($this->dataRecord["username"]); |
| | | $password = $app->db->quote($this->dataRecord["password"]); |
| | | $username = $this->dataRecord["username"]; |
| | | $password = $this->dataRecord["password"]; |
| | | $modules = $conf['interface_modules_enabled']; |
| | | if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] > 0) $modules .= ',client'; |
| | | $startmodule = (stristr($modules, 'dashboard'))?'dashboard':'client'; |
| | | $usertheme = $app->db->quote($this->dataRecord["usertheme"]); |
| | | $usertheme = $this->dataRecord["usertheme"]; |
| | | $type = 'user'; |
| | | $active = 1; |
| | | $language = $app->db->quote($this->dataRecord["language"]); |
| | | $language = $this->dataRecord["language"]; |
| | | $password = $app->auth->crypt_password($password); |
| | | |
| | | // Create the controlpaneluser for the client |
| | | //Generate ssh-rsa-keys |
| | | exec('ssh-keygen -t rsa -C '.$username.'-rsa-key-'.time().' -f /tmp/id_rsa -N ""'); |
| | | $app->db->query("UPDATE client SET created_at = ".time().", id_rsa = '".$app->db->quote(@file_get_contents('/tmp/id_rsa'))."', ssh_rsa = '".$app->db->quote(@file_get_contents('/tmp/id_rsa.pub'))."' WHERE client_id = ".$this->id); |
| | | $app->db->query("UPDATE client SET created_at = UNIX_TIMESTAMP(), id_rsa = ?, ssh_rsa = ? WHERE client_id = ?", @file_get_contents('/tmp/id_rsa'), @file_get_contents('/tmp/id_rsa.pub'), $this->id); |
| | | exec('rm -f /tmp/id_rsa /tmp/id_rsa.pub'); |
| | | |
| | | // Create the controlpaneluser for the client |
| | | $sql = "INSERT INTO sys_user (username,passwort,modules,startmodule,app_theme,typ,active,language,groups,default_group,client_id) |
| | | VALUES ('$username','$password','$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,".$this->id.")"; |
| | | $app->db->query($sql); |
| | | VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; |
| | | $app->db->query($sql, $username, $password, $modules, $startmodule, $usertheme, $type, $active, $language, $groups, $groupid, $this->id); |
| | | |
| | | //* If the user who inserted the client is a reseller (not admin), we will have to add this new client group |
| | | //* to his groups, so he can administrate the records of this client. |
| | | if($_SESSION['s']['user']['typ'] == 'user') { |
| | | $app->auth->add_group_to_user($_SESSION['s']['user']['userid'], $groupid); |
| | | $app->db->query("UPDATE client SET parent_client_id = ".$app->functions->intval($_SESSION['s']['user']['client_id'])." WHERE client_id = ".$this->id); |
| | | $app->db->query("UPDATE client SET parent_client_id = ? WHERE client_id = ?", $_SESSION['s']['user']['client_id'], $this->id); |
| | | } else { |
| | | if($this->dataRecord['parent_client_id'] > 0) { |
| | | //* get userid of the reseller and add it to the group of the client |
| | | $tmp = $app->db->queryOneRecord("SELECT sys_user.userid FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ".$app->functions->intval($this->dataRecord['parent_client_id'])); |
| | | $tmp = $app->db->queryOneRecord("SELECT sys_user.userid FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ?", $this->dataRecord['parent_client_id']); |
| | | $app->auth->add_group_to_user($tmp['userid'], $groupid); |
| | | $app->db->query("UPDATE client SET parent_client_id = ".$app->functions->intval($this->dataRecord['parent_client_id'])." WHERE client_id = ".$this->id); |
| | | $app->db->query("UPDATE client SET parent_client_id = ? WHERE client_id = ?", $this->dataRecord['parent_client_id'], $this->id); |
| | | unset($tmp); |
| | | } |
| | | } |
| | |
| | | $default_dnsserver = $app->functions->intval($tmp['server_id']); |
| | | } |
| | | |
| | | $sql = "UPDATE client SET mail_servers = $default_mailserver, web_servers = $default_webserver, dns_servers = $default_dnsserver, default_slave_dnsserver = $default_dnsserver, db_servers = $default_dbserver WHERE client_id = ".$this->id; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE client SET mail_servers = ?, web_servers = ?, dns_servers = ?, default_slave_dnsserver = ?, db_servers = ? WHERE client_id = ?"; |
| | | $app->db->query($sql, $default_mailserver, $default_webserver, $default_dnsserver, $default_dnsserver, $default_dbserver, $this->id); |
| | | |
| | | if(isset($this->dataRecord['template_master'])) { |
| | | $app->uses('client_templates'); |
| | |
| | | //* save new counter value |
| | | $system_config['misc']['customer_no_counter']++; |
| | | $system_config_str = $app->ini_parser->get_ini_string($system_config); |
| | | $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($system_config_str)."'", 'sysini_id', 1); |
| | | $app->db->datalogUpdate('sys_ini', array("config" => $system_config_str), 'sysini_id', 1); |
| | | } |
| | | } else { |
| | | //* Logged in user must be a reseller |
| | | //* get the record of the reseller |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $reseller = $app->db->queryOneRecord("SELECT client.client_id, client.customer_no_template, client.customer_no_counter, client.customer_no_start FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ".$client_group_id); |
| | | $reseller = $app->db->queryOneRecord("SELECT client.client_id, client.customer_no_template, client.customer_no_counter, client.customer_no_start FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ?", $client_group_id); |
| | | |
| | | if($reseller['customer_no_template'] != '') { |
| | | //* save new counter value |
| | | $customer_no_counter = $app->functions->intval($reseller['customer_no_counter']+1); |
| | | $app->db->query("UPDATE client SET customer_no_counter = $customer_no_counter WHERE client_id = ".$app->functions->intval($reseller['client_id'])); |
| | | $app->db->query("UPDATE client SET customer_no_counter = ? WHERE client_id = ?", $customer_no_counter, $reseller['client_id']); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //* Send welcome email |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $sql = "SELECT * FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ".$client_group_id; |
| | | $email_template = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ?"; |
| | | $email_template = $app->db->queryOneRecord($sql, $client_group_id); |
| | | $client = $app->tform->getDataRecord($this->id); |
| | | |
| | | if(is_array($email_template) && $client['email'] != '') { |
| | |
| | | $from = $system_config['admin_mail']; |
| | | } else { |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $reseller = $app->db->queryOneRecord("SELECT client.email FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ".$client_group_id); |
| | | $reseller = $app->db->queryOneRecord("SELECT client.email FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ?", $client_group_id); |
| | | $from = $reseller["email"]; |
| | | } |
| | | |
| | |
| | | global $app, $conf; |
| | | // username changed |
| | | if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) { |
| | | $username = $app->db->quote($this->dataRecord["username"]); |
| | | $username = $this->dataRecord["username"]; |
| | | $client_id = $this->id; |
| | | $sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET username = ? WHERE client_id = ?"; |
| | | $app->db->query($sql, $username, $client_id); |
| | | |
| | | $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = $client_id"); |
| | | $app->db->datalogUpdate("sys_group", "name = '$username'", 'groupid', $tmp['groupid']); |
| | | $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = ?", $client_id); |
| | | $app->db->datalogUpdate("sys_group", array("name" => $username), 'groupid', $tmp['groupid']); |
| | | unset($tmp); |
| | | } |
| | | |
| | | // password changed |
| | | if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') { |
| | | $password = $app->db->quote($this->dataRecord["password"]); |
| | | $password = $this->dataRecord["password"]; |
| | | $salt="$1$"; |
| | | $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; |
| | | for ($n=0;$n<8;$n++) { |
| | |
| | | $salt.="$"; |
| | | $password = crypt(stripslashes($password), $salt); |
| | | $client_id = $this->id; |
| | | $sql = "UPDATE sys_user SET passwort = '$password' WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET passwort = ? WHERE client_id = ?"; |
| | | $app->db->query($sql, $password, $client_id); |
| | | } |
| | | |
| | | if(!isset($this->dataRecord['locked'])) $this->dataRecord['locked'] = 'n'; |
| | |
| | | |
| | | |
| | | // get tmp_data of client |
| | | $client_data = $app->db->queryOneRecord('SELECT `tmp_data` FROM `client` WHERE `client_id` = ' . $this->id); |
| | | $client_data = $app->db->queryOneRecord('SELECT `tmp_data` FROM `client` WHERE `client_id` = ?', $this->id); |
| | | |
| | | if($client_data['tmp_data'] == '') $tmp_data = array(); |
| | | else $tmp_data = unserialize($client_data['tmp_data']); |
| | |
| | | 'web_folder_user' => 'web_folder_user_id' |
| | | ); |
| | | |
| | | $udata = $app->db->queryOneRecord('SELECT `userid` FROM `sys_user` WHERE `client_id` = ' . $this->id); |
| | | $gdata = $app->db->queryOneRecord('SELECT `groupid` FROM `sys_group` WHERE `client_id` = ' . $this->id); |
| | | $udata = $app->db->queryOneRecord('SELECT `userid` FROM `sys_user` WHERE `client_id` = ?', $this->id); |
| | | $gdata = $app->db->queryOneRecord('SELECT `groupid` FROM `sys_group` WHERE `client_id` = ?', $this->id); |
| | | $sys_groupid = $gdata['groupid']; |
| | | $sys_userid = $udata['userid']; |
| | | |
| | |
| | | if(!isset($prev_active[$current])) $prev_active[$current] = array(); |
| | | if(!isset($prev_sysuser[$current])) $prev_sysuser[$current] = array(); |
| | | |
| | | $entries = $app->db->queryAllRecords('SELECT `' . $keycolumn . '` as `id`, `sys_userid`, `' . $active_col . '` FROM `' . $current . '` WHERE `sys_groupid` = ' . $sys_groupid); |
| | | $entries = $app->db->queryAllRecords('SELECT ?? as `id`, `sys_userid`, ?? FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $active_col, $current, $sys_groupid); |
| | | foreach($entries as $item) { |
| | | |
| | | if($item[$active_col] != 'y' && $reverse == false) $prev_active[$current][$item['id']][$active_col] = 'n'; |
| | |
| | | |
| | | $tmp_data['prev_active'] = $prev_active; |
| | | $tmp_data['prev_sys_userid'] = $prev_sysuser; |
| | | $app->db->query("UPDATE `client` SET `tmp_data` = '" . $app->db->quote(serialize($tmp_data)) . "' WHERE `client_id` = " . $this->id); |
| | | $app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $this->id); |
| | | unset($prev_active); |
| | | unset($prev_sysuser); |
| | | } elseif($this->dataRecord['locked'] == 'n') { |
| | |
| | | $reverse = true; |
| | | } |
| | | |
| | | $entries = $app->db->queryAllRecords('SELECT `' . $keycolumn . '` as `id` FROM `' . $current . '` WHERE `sys_groupid` = ' . $sys_groupid); |
| | | $entries = $app->db->queryAllRecords('SELECT ?? as `id` FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $current, $sys_groupid); |
| | | foreach($entries as $item) { |
| | | $set_active = ($reverse == true ? 'n' : 'y'); |
| | | $set_inactive = ($reverse == true ? 'y' : 'n'); |
| | |
| | | } |
| | | } |
| | | if(array_key_exists('prev_active', $tmp_data)) unset($tmp_data['prev_active']); |
| | | $app->db->query("UPDATE `client` SET `tmp_data` = '" . $app->db->quote(serialize($tmp_data)) . "' WHERE `client_id` = " . $this->id); |
| | | $app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $this->id); |
| | | } |
| | | unset($tmp_data); |
| | | unset($entries); |
| | |
| | | if(!isset($this->dataRecord['canceled'])) $this->dataRecord['canceled'] = 'n'; |
| | | if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["canceled"] != $this->oldDataRecord['canceled']) { |
| | | if($this->dataRecord['canceled'] == 'y') { |
| | | $sql = "UPDATE sys_user SET active = '0' WHERE client_id = " . $this->id; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET active = '0' WHERE client_id = ?"; |
| | | $app->db->query($sql, $this->id); |
| | | } elseif($this->dataRecord['canceled'] == 'n') { |
| | | $sql = "UPDATE sys_user SET active = '1' WHERE client_id = " . $this->id; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET active = '1' WHERE client_id = ?"; |
| | | $app->db->query($sql, $this->id); |
| | | } |
| | | } |
| | | |
| | | // language changed |
| | | if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) { |
| | | $language = $app->db->quote($this->dataRecord["language"]); |
| | | $language = $this->dataRecord["language"]; |
| | | $client_id = $this->id; |
| | | $sql = "UPDATE sys_user SET language = '$language' WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET language = ? WHERE client_id = ?"; |
| | | $app->db->query($sql, $language, $client_id); |
| | | } |
| | | |
| | | //* reseller status changed |
| | | if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] != $this->oldDataRecord["limit_client"]) { |
| | | $modules = $conf['interface_modules_enabled']; |
| | | if($this->dataRecord["limit_client"] > 0) $modules .= ',client'; |
| | | $modules = $app->db->quote($modules); |
| | | $client_id = $this->id; |
| | | $sql = "UPDATE sys_user SET modules = '$modules' WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET modules = ? WHERE client_id = ?"; |
| | | $app->db->query($sql, $modules, $client_id); |
| | | } |
| | | |
| | | //* Client has been moved to another reseller |
| | | if($_SESSION['s']['user']['typ'] == 'admin' && isset($this->dataRecord['parent_client_id']) && $this->dataRecord['parent_client_id'] != $this->oldDataRecord['parent_client_id']) { |
| | | //* Get groupid of the client |
| | | $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".intval($this->id)); |
| | | $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $this->id); |
| | | $groupid = $tmp['groupid']; |
| | | unset($tmp); |
| | | |
| | | //* Remove sys_user of old reseller from client group |
| | | if($this->oldDataRecord['parent_client_id'] > 0) { |
| | | //* get userid of the old reseller remove it from the group of the client |
| | | $tmp = $app->db->queryOneRecord("SELECT sys_user.userid FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ".$app->functions->intval($this->oldDataRecord['parent_client_id'])); |
| | | $tmp = $app->db->queryOneRecord("SELECT sys_user.userid FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ?", $this->oldDataRecord['parent_client_id']); |
| | | $app->auth->remove_group_from_user($tmp['userid'], $groupid); |
| | | unset($tmp); |
| | | } |
| | |
| | | //* Add sys_user of new reseller to client group |
| | | if($this->dataRecord['parent_client_id'] > 0) { |
| | | //* get userid of the reseller and add it to the group of the client |
| | | $tmp = $app->db->queryOneRecord("SELECT sys_user.userid, sys_user.default_group FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ".$app->functions->intval($this->dataRecord['parent_client_id'])); |
| | | $tmp = $app->db->queryOneRecord("SELECT sys_user.userid, sys_user.default_group FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ?", $this->dataRecord['parent_client_id']); |
| | | $app->auth->add_group_to_user($tmp['userid'], $groupid); |
| | | $app->db->query("UPDATE client SET sys_userid = ".$app->functions->intval($tmp['userid']).", sys_groupid = ".$app->functions->intval($tmp['default_group']).", parent_client_id = ".$app->functions->intval($this->dataRecord['parent_client_id'])." WHERE client_id = ".$this->id); |
| | | $app->db->query("UPDATE client SET sys_userid = ?, sys_groupid = ?, parent_client_id = ? WHERE client_id = ?", $tmp['userid'], $tmp['default_group'], $this->dataRecord['parent_client_id'], $this->id); |
| | | unset($tmp); |
| | | } else { |
| | | //* Client is not assigned to a reseller anymore, so we assign it to the admin |
| | | $app->db->query("UPDATE client SET sys_userid = 1, sys_groupid = 1, parent_client_id = 0 WHERE client_id = ".$this->id); |
| | | $app->db->query("UPDATE client SET sys_userid = 1, sys_groupid = 1, parent_client_id = 0 WHERE client_id = ?", $this->id); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | $app->listform_actions->SQLOrderBy = 'ORDER BY client.company_name, client.contact_name, client.client_id'; |
| | | $app->listform_actions->SQLExtWhere = "client.limit_client = 0"; |
| | | $app->listform_actions->SQLExtSelect = ', client.country as countryiso'; |
| | | $app->listform_actions->SQLExtSelect = ', LOWER(client.country) as countryiso'; |
| | | $app->listform_actions->onLoad(); |
| | | |
| | | |
| | |
| | | //* Send message |
| | | if($error == '') { |
| | | if($app->functions->intval($_POST['recipient']) > 0){ |
| | | $circle = $app->db->queryOneRecord("SELECT client_ids FROM client_circle WHERE active = 'y' AND circle_id = ".$app->functions->intval($_POST['recipient'])." AND ".$app->tform->getAuthSQL('r')); |
| | | $circle = $app->db->queryOneRecord("SELECT client_ids FROM client_circle WHERE active = 'y' AND circle_id = ? AND ".$app->tform->getAuthSQL('r'), $_POST['recipient']); |
| | | if(isset($circle['client_ids']) && $circle['client_ids'] != ''){ |
| | | $tmp_client_ids = explode(',', $circle['client_ids']); |
| | | $where = array(); |
| | |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin'){ |
| | | $client_id = $app->functions->intval($_SESSION['s']['user']['client_id']); |
| | | if($client_id > 0){ |
| | | $sql = "SELECT email FROM client WHERE client_id = ".$client_id; |
| | | $client = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT email FROM client WHERE client_id = ?"; |
| | | $client = $app->db->queryOneRecord($sql, $client_id); |
| | | if($client['email'] != '') $app->tpl->setVar('sender', $client['email']); |
| | | } |
| | | } |
| | |
| | | global $app; |
| | | |
| | | // check new style |
| | | $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client_template_assigned WHERE client_template_id = ".$this->id); |
| | | $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client_template_assigned WHERE client_template_id = ?", $this->id); |
| | | if($rec['number'] > 0) { |
| | | $app->error($app->tform->lng('template_del_aborted_txt')); |
| | | } |
| | | |
| | | // check old style |
| | | $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE template_master = ".$this->id." OR template_additional like '%/".$this->id."/%'"); |
| | | $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE template_master = ? OR template_additional like ?", $this->id, '%/".$this->id."/%'); |
| | | if($rec['number'] > 0) { |
| | | $app->error($app->tform->lng('template_del_aborted_txt')); |
| | | } |
| | |
| | | |
| | | if(isset($this->dataRecord['template_type'])) { |
| | | //* Check if the template_type has been changed |
| | | $rec = $app->db->queryOneRecord("SELECT template_type from client_template WHERE template_id = ".$this->id); |
| | | $rec = $app->db->queryOneRecord("SELECT template_type from client_template WHERE template_id = ?", $this->id); |
| | | if($rec['template_type'] != $this->dataRecord['template_type']) { |
| | | //* Add a error message and switch back to old server |
| | | $app->tform->errorMessage .= $app->lng('The template type can not be changed.'); |
| | |
| | | * the template has changed. apply the new data to all clients |
| | | */ |
| | | if ($template_type == 'm'){ |
| | | $sql = "SELECT client_id FROM client WHERE template_master = " . $this->id; |
| | | $sql = "SELECT client_id FROM client WHERE template_master = ?"; |
| | | $clients = $app->db->queryAllRecords($sql, $this->id); |
| | | } else { |
| | | $sql = "SELECT client_id FROM client WHERE template_additional LIKE '%/" . $this->id . "/%' OR template_additional LIKE '" . $this->id . "/%' OR template_additional LIKE '%/" . $this->id . "' UNION SELECT client_id FROM client_template_assigned WHERE client_template_id = " . $this->id; |
| | | $sql = "SELECT client_id FROM client WHERE template_additional LIKE ? OR template_additional LIKE ? OR template_additional LIKE ? UNION SELECT client_id FROM client_template_assigned WHERE client_template_id = ?"; |
| | | $clients = $app->db->queryAllRecords($sql, '%/' . $this->id . '/%', $this->id . '/%', '%/' . $this->id, $this->id); |
| | | } |
| | | $clients = $app->db->queryAllRecords($sql); |
| | | if (is_array($clients)){ |
| | | foreach ($clients as $client){ |
| | | $app->client_templates->apply_client_templates($client['client_id']); |
| | |
| | | */ |
| | | $domain = $this->dataRecord['domain']; |
| | | |
| | | $sql = "SELECT id FROM dns_soa WHERE origin = '" . $app->db->quote($domain.".") . "'"; |
| | | $res = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT id FROM dns_soa WHERE origin = ?"; |
| | | $res = $app->db->queryOneRecord($sql, $domain."."); |
| | | if (is_array($res)){ |
| | | $app->error($wb['error_domain_in dnsuse']); |
| | | } |
| | | |
| | | $sql = "SELECT id FROM dns_slave WHERE origin = '" . $app->db->quote($domain.".") . "'"; |
| | | $res = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT id FROM dns_slave WHERE origin = ?"; |
| | | $res = $app->db->queryOneRecord($sql, $domain."."); |
| | | if (is_array($res)){ |
| | | $app->error($wb['error_domain_in dnsslaveuse']); |
| | | } |
| | | |
| | | $sql = "SELECT domain_id FROM mail_domain WHERE domain = '" . $app->db->quote($domain) . "'"; |
| | | $res = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT domain_id FROM mail_domain WHERE domain = ?"; |
| | | $res = $app->db->queryOneRecord($sql, $domain); |
| | | if (is_array($res)){ |
| | | $app->error($wb['error_domain_in mailuse']); |
| | | } |
| | | |
| | | $sql = "SELECT domain_id FROM web_domain WHERE (domain = '" . $app->db->quote($domain) . "' AND type IN ('alias', 'vhost', 'vhostalias')) OR (domain LIKE '%." . $app->db->quote($domain) . "' AND type IN ('subdomain', 'vhostsubdomain'))"; |
| | | $res = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT domain_id FROM web_domain WHERE (domain = ? AND type IN ('alias', 'vhost', 'vhostalias')) OR (domain LIKE ? AND type IN ('subdomain', 'vhostsubdomain'))"; |
| | | $res = $app->db->queryOneRecord($sql, $domain, '%.' . $domain); |
| | | if (is_array($res)){ |
| | | $app->error($wb['error_domain_in webuse']); |
| | | } |
| | |
| | | } else { |
| | | // Get the limits of the client |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT client.client_id, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $client = $app->db->queryOneRecord("SELECT client.client_id, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | |
| | | // Fill the client select field |
| | | $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY client.company_name, client.contact_name, sys_group.name"; |
| | | $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ? ORDER BY client.company_name, client.contact_name, sys_group.name"; |
| | | //die($sql); |
| | | $records = $app->db->queryAllRecords($sql); |
| | | $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id'])); |
| | | $records = $app->db->queryAllRecords($sql, $client['client_id']); |
| | | $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client['client_id']); |
| | | $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contactname'].'</option>'; |
| | | //$tmp_data_record = $app->tform->getDataRecord($this->id); |
| | | if(is_array($records)) { |
| | |
| | | // also make sure that the user can not delete domain created by a admin |
| | | if(($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) || ($_SESSION["s"]["user"]["typ"] != 'admin' && $app->auth->has_clients($_SESSION['s']['user']['userid']))) { |
| | | $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$this->id); |
| | | $app->db->query("UPDATE domain SET sys_groupid = ?, sys_perm_group = 'ru' WHERE domain_id = ?", $client_group_id, $this->id); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin' && isset($this->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT client.client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $group = $app->db->queryOneRecord("SELECT sys_group.groupid FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." AND sys_group.groupid = ".$this->dataRecord["client_group_id"]." ORDER BY client.company_name, client.contact_name, sys_group.name"); |
| | | $client = $app->db->queryOneRecord("SELECT client.client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | $group = $app->db->queryOneRecord("SELECT sys_group.groupid FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ? AND sys_group.groupid = ? ORDER BY client.company_name, client.contact_name, sys_group.name", $client['client_id'], $this->dataRecord["client_group_id"]); |
| | | $this->dataRecord["client_group_id"] = $group["groupid"]; |
| | | } |
| | | } |
| | | |
| | | // make sure that the record belongs to the client group and not the admin group when admin inserts it |
| | | // also make sure that the user can not delete domain created by a admin |
| | | if(isset($this->dataRecord["client_group_id"])) { |
| | | $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$this->id); |
| | | $app->db->query("UPDATE domain SET sys_groupid = ?, sys_perm_group = 'ru' WHERE domain_id = ?", $client_group_id, $this->id); |
| | | |
| | | $data = new tform_actions(); |
| | | $tform = $app->tform; |
| | | $app->tform = new tform(); |
| | | |
| | | $app->tform->loadFormDef("../dns/form/dns_soa.tform.php"); |
| | | $data->oldDataRecord = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE origin LIKE '".$this->dataRecord['domain'].".'"); |
| | | $data->oldDataRecord = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE origin = ?", $this->dataRecord['domain']."."); |
| | | if ($data->oldDataRecord) { |
| | | $data->dataRecord = array_merge($data->oldDataRecord, array('client_group_id' => $this->dataRecord["client_group_id"])); |
| | | $data->id = $data->dataRecord['id']; |
| | |
| | | } |
| | | |
| | | $app->tform->loadFormDef("../dns/form/dns_slave.tform.php"); |
| | | $data->oldDataRecord = $app->db->queryOneRecord("SELECT * FROM dns_slave WHERE origin LIKE '".$this->dataRecord['domain'].".'"); |
| | | $data->oldDataRecord = $app->db->queryOneRecord("SELECT * FROM dns_slave WHERE origin = ?", $this->dataRecord['domain']."."); |
| | | if ($data->oldDataRecord) { |
| | | $data->dataRecord = array_merge($data->oldDataRecord, array('client_group_id' => $this->dataRecord["client_group_id"])); |
| | | $data->id = $data->dataRecord['id']; |
| | |
| | | } |
| | | |
| | | $app->tform->loadFormDef("../mail/form/mail_domain.tform.php"); |
| | | $data->oldDataRecord = $app->db->queryOneRecord("SELECT * FROM mail_domain WHERE domain = '".$this->dataRecord['domain']."'"); |
| | | $data->oldDataRecord = $app->db->queryOneRecord("SELECT * FROM mail_domain WHERE domain = ?", $this->dataRecord['domain']); |
| | | if ($data->oldDataRecord) { |
| | | $data->dataRecord = array_merge($data->oldDataRecord, array('client_group_id' => $this->dataRecord["client_group_id"])); |
| | | $data->id = $data->dataRecord['domain_id']; |
| | |
| | | } |
| | | |
| | | $app->tform->loadFormDef("../sites/form/web_vhost_domain.tform.php"); |
| | | $data->oldDataRecord = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain = '".$this->dataRecord['domain']."'"); |
| | | $data->oldDataRecord = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain = ?", $this->dataRecord['domain']); |
| | | if ($data->oldDataRecord) { |
| | | $data->dataRecord = array_merge($data->oldDataRecord, array('client_group_id' => $this->dataRecord["client_group_id"])); |
| | | $data->id = $data->dataRecord['domain_id']; |
| | |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '', |
| | | 'searchable' => 1 |
| | | 'searchable' => 1, |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'TRIM'), |
| | | ), |
| | | ), |
| | | 'contact_name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '', |
| | | 'searchable' => 1 |
| | | 'searchable' => 1, |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'TRIM'), |
| | | ), |
| | | ), |
| | | 'customer_no' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | 'cols' => '', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_vat_id', |
| | | 'errmsg'=> 'invalid_vat_id'), |
| | | ), |
| | | ), |
| | | 'company_id' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'default_xmppserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'CUSTOM', |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'value' => '', |
| | | 'name' => 'default_xmppserver' |
| | | ), |
| | | 'xmpp_servers' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'MULTIPLE', |
| | | 'separator' => ',', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'CUSTOM', |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'validators' => array ( |
| | | 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'xmpp_servers_used'), |
| | | ), |
| | | 'value' => '', |
| | | 'name' => 'xmpp_servers' |
| | | ), |
| | | 'limit_xmpp_domain' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_xmpp_domain_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_xmpp_user' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_xmpp_user_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_xmpp_muc' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_anon' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_vjud' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_proxy' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_status' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_pastebin' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_httparchive' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'default_webserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'default_xmppserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'CUSTOM', |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'value' => '', |
| | | 'name' => 'default_xmppserver' |
| | | ), |
| | | 'xmpp_servers' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'MULTIPLE', |
| | | 'separator' => ',', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'CUSTOM', |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'validators' => array ( |
| | | 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'xmpp_servers_used'), |
| | | ), |
| | | 'value' => '', |
| | | 'name' => 'xmpp_servers' |
| | | ), |
| | | 'limit_xmpp_domain' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_xmpp_domain_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_xmpp_user' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_xmpp_user_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_xmpp_muc' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_anon' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_vjud' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_proxy' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_status' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_pastebin' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_httparchive' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'default_webserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '', |
| | | 'searchable' => 1 |
| | | 'searchable' => 1, |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'TRIM'), |
| | | ), |
| | | ), |
| | | 'contact_name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '', |
| | | 'searchable' => 1 |
| | | 'searchable' => 1, |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'TRIM'), |
| | | ), |
| | | ), |
| | | 'customer_no' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | 'cols' => '', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_vat_id', |
| | | 'errmsg'=> 'invalid_vat_id'), |
| | | ), |
| | | ), |
| | | 'company_id' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'default_xmppserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'CUSTOM', |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'value' => '', |
| | | 'name' => 'default_xmppserver' |
| | | ), |
| | | 'xmpp_servers' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'MULTIPLE', |
| | | 'separator' => ',', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'CUSTOM', |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'validators' => array ( |
| | | 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'xmpp_servers_used'), |
| | | ), |
| | | 'value' => '', |
| | | 'name' => 'xmpp_servers' |
| | | ), |
| | | 'limit_xmpp_domain' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_xmpp_domain_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_xmpp_user' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_xmpp_user_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_xmpp_muc' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_anon' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_vjud' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_proxy' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_status' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_pastebin' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_httparchive' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'default_webserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | |
| | | $wb['limit_backup_txt'] = 'Backupfunktion verfügbar'; |
| | | $wb['limit_dns_slave_zone_error_notint'] = 'Das Secondary DNS Zonen Limit muss eine Zahl sein.'; |
| | | $wb['customer_no_txt'] = 'Kundennummer'; |
| | | $wb['vat_id_txt'] = 'USt-ID'; |
| | | $wb['vat_id_txt'] = 'USt.-ID'; |
| | | $wb['required_fields_txt'] = '* Benötigte Felder'; |
| | | $wb['limit_mailmailinglist_txt'] = 'Max. Anzahl an Mailinglisten'; |
| | | $wb['limit_mailmailinglist_error_notint'] = 'Das Mailinglisten Limit muss eine Zahl sein.'; |
| | |
| | | $wb['gender_txt'] = 'Anrede'; |
| | | $wb['gender_m_txt'] = 'Herr'; |
| | | $wb['gender_f_txt'] = 'Frau'; |
| | | $wb["web_servers_txt"] = 'Webserver'; |
| | | $wb["web_servers_placeholder"] = 'Webserver auswählen'; |
| | | $wb['no_web_server_error'] = 'Bitte wählen Sie mind. einen Webserver aus.'; |
| | | $wb['web_servers_used'] = 'Der Server, den Sie entfernen möchten, wird als Webserver verwendet. Bitte stellen Sie sicher, daß dieser Server nicht von diesem Kunden benutzt wird, bevor Sie ihn entfernen.'; |
| | | $wb["dns_servers_txt"] = 'DNS-Server'; |
| | | $wb["dns_servers_placeholder"] = 'DNS-Server wählen'; |
| | | $wb['no_dns_server_error'] = 'Bitte wählen Sie mind. einen DNS-Server aus.'; |
| | | $wb['dns_servers_used'] = 'Der Server, den Sie entfernen möchten, wird als DNS-Server verwendet. Bitte stellen Sie sicher, daß dieser Server nicht von diesem Kunden benutzt wird, bevor Sie ihn entfernen.'; |
| | | $wb["db_servers_txt"] = 'Datenbank-Server'; |
| | | $wb["db_servers_placeholder"] = 'Datenbank-Server wählen'; |
| | | $wb['no_db_server_error'] = 'Bitte wählen Sie mind. einen Datenbank-Server aus.'; |
| | | $wb['db_servers_used'] = 'Der Server, den Sie entfernen möchten, wird als Datenbank-Server verwendet. Bitte stellen Sie sicher, daß dieser Server nicht von diesem Kunden benutzt wird, bevor Sie ihn entfernen.'; |
| | | $wb["mail_servers_txt"] = 'Mailserver'; |
| | | $wb["mail_servers_placeholder"] = 'Mailserver wählen'; |
| | | $wb['no_mail_server_error'] = 'Bitte wählen Sie mind. einen Mailserver aus.'; |
| | | $wb['mail_servers_used'] = 'Der Server, den Sie entfernen möchten, wird als Mailserver verwendet. Bitte stellen Sie sicher, daß dieser Server nicht von diesem Kunden benutzt wird, bevor Sie ihn entfernen.'; |
| | | $wb['added_by_txt'] = 'Added by'; |
| | | $wb['added_date_txt'] = 'Added date'; |
| | | $wb['parent_client_id_txt'] = 'Client of reseller'; |
| | | $wb['none_txt'] = 'none'; |
| | | $wb['parent_client_id_txt'] = 'Kunde von Reseller'; |
| | | $wb['none_txt'] = 'keiner'; |
| | | $wb['limit_database_quota_txt'] = 'Datenbank-Quota'; |
| | | $wb['limit_database_quota_error_notint'] = 'Das Datenbank-quota muß eine Nummer sein.'; |
| | | $wb['reseller_txt'] = 'Reseller'; |
| | | $wb['btn_save_txt'] = 'Speichern'; |
| | | $wb['btn_cancel_txt'] = 'Abbrechen'; |
| | | $wb['invalid_vat_id'] = 'Die USt.-ID ist ungültig.'; |
| | | ?> |
| | |
| | | $wb['limit_dns_slave_zone_error_notint'] = 'Das Secondary DNS Zonen Limit muss eine Zahl sein.'; |
| | | $wb['limit_dns_record_error_notint'] = 'Das DNS Eintrag Limit muss eine Zahl sein.'; |
| | | $wb['customer_no_txt'] = 'Kundennummer'; |
| | | $wb['vat_id_txt'] = 'USt-ID'; |
| | | $wb['vat_id_txt'] = 'USt.-ID'; |
| | | $wb['required_fields_txt'] = '* Benötigte Felder'; |
| | | $wb['limit_webdav_user_txt'] = 'Max. Anzahl an WebDAV Benutzern'; |
| | | $wb['limit_webdav_user_error_notint'] = 'Das WebDAV Benutzer Limit muss eine Zahl sein.'; |
| | |
| | | $wb['limit_domainmodule_txt'] = 'Domainmodule Limit'; |
| | | $wb['client_limits_txt'] = 'Client Limits'; |
| | | $wb['err_msg_master_tpl_set'] = 'All custom limit settings are ignored if any master template other than \\"custom\\" is selected.'; |
| | | $wb['invalid_vat_id'] = 'Die USt.-ID ist ungültig.'; |
| | | ?> |
| | |
| | | $wb["bank_account_swift_txt"] = 'BIC / Swift'; |
| | | $wb["web_limits_txt"] = 'Web Limits'; |
| | | $wb["email_limits_txt"] = 'Email Limits'; |
| | | $wb["xmpp_limits_txt"] = 'XMPP Limits'; |
| | | $wb["database_limits_txt"] = 'Database Limits'; |
| | | $wb["cron_job_limits_txt"] = 'Cron Job Limits'; |
| | | $wb["dns_limits_txt"] = 'DNS Limits'; |
| | |
| | | $wb['gender_m_txt'] = 'Mr.'; |
| | | $wb['gender_f_txt'] = 'Ms.'; |
| | | $wb["web_servers_txt"] = 'Webservers'; |
| | | $wb["web_servers_placeholder"] = 'Select Webservers'; |
| | | $wb["web_servers_placeholder"] = 'Select webservers'; |
| | | $wb['no_web_server_error'] = 'At least one webserver must be selected.'; |
| | | $wb['web_servers_used'] = 'The server you are trying to remove from this client is used as a webserver. Be sure that this server is not used by this client before to remove it.'; |
| | | $wb["dns_servers_txt"] = 'DNS Server'; |
| | | $wb["dns_servers_placeholder"] = 'Select DNS Servers'; |
| | | $wb['web_servers_used'] = 'The server you are trying to remove from this client is used as a webserver. Be sure that this server is not used by this client before you remove it.'; |
| | | $wb["dns_servers_txt"] = 'DNS servers'; |
| | | $wb["dns_servers_placeholder"] = 'Select DNS servers'; |
| | | $wb['no_dns_server_error'] = 'At least one DNS server must be selected.'; |
| | | $wb['dns_servers_used'] = 'The server you are trying to remove from this client is used as a DNS server. Be sure that this server is not used by this client before to remove it.'; |
| | | $wb["db_servers_txt"] = 'Database Server'; |
| | | $wb["db_servers_placeholder"] = 'Select Database Servers'; |
| | | $wb['dns_servers_used'] = 'The server you are trying to remove from this client is used as a DNS server. Be sure that this server is not used by this client before you remove it.'; |
| | | $wb["db_servers_txt"] = 'Database servers'; |
| | | $wb["db_servers_placeholder"] = 'Select database servers'; |
| | | $wb['no_db_server_error'] = 'At least one Database server must be selected.'; |
| | | $wb['db_servers_used'] = 'The server you are trying to remove from this client is used as a Database server. Be sure that this server is not used by this client before to remove it.'; |
| | | $wb['db_servers_used'] = 'The server you are trying to remove from this client is used as a Database server. Be sure that this server is not used by this client before you remove it.'; |
| | | $wb["mail_servers_txt"] = 'Mailservers'; |
| | | $wb["mail_servers_placeholder"] = 'Select Mailservers'; |
| | | $wb['no_mail_server_error'] = 'At least one Mailserver must be selected.'; |
| | | $wb['mail_servers_used'] = 'The server you are trying to remove from this client is used as a Mailserver. Be sure that this server is not used by this client before to remove it.'; |
| | | $wb["mail_servers_placeholder"] = 'Select mailservers'; |
| | | $wb['no_mail_server_error'] = 'At least one mailserver must be selected.'; |
| | | $wb['mail_servers_used'] = 'The server you are trying to remove from this client is used as a Mailserver. Be sure that this server is not used by this client before you remove it.'; |
| | | |
| | | $wb["xmpp_servers_txt"] = 'XMPP Servers'; |
| | | $wb["xmpp_servers_placeholder"] = 'Select XMPP Servers'; |
| | | $wb['no_xmpp_server_error'] = 'At least one XMPP Server must be selected.'; |
| | | $wb['xmpp_servers_used'] = 'The server you are trying to remove from this client is used as a XMPP Server. Be sure that this server is not used by this client before you remove it.'; |
| | | $wb['limit_xmpp_domain_error_notint'] = 'The XMPP domain limit must be a number.'; |
| | | $wb['limit_xmpp_user_error_notint'] = 'The XMPP user limit must be a number.'; |
| | | $wb['limit_xmpp_domain_txt'] = 'Max. number of XMPP domains'; |
| | | $wb['limit_xmpp_user_txt'] = 'Max. number of XMPP accounts'; |
| | | $wb['limit_xmpp_muc_txt'] = 'Multiuser chat available'; |
| | | $wb['limit_xmpp_pastebin_txt'] = 'Pastebin for MUC available'; |
| | | $wb['limit_xmpp_httparchive_txt'] = 'HTTP archive for MUC available'; |
| | | $wb['limit_xmpp_anon_txt'] = 'Anonymous host available'; |
| | | $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available'; |
| | | $wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available'; |
| | | $wb['limit_xmpp_status_txt'] = 'Status host available'; |
| | | |
| | | |
| | | $wb['added_by_txt'] = 'Added by'; |
| | | $wb['added_date_txt'] = 'Added date'; |
| | | $wb['parent_client_id_txt'] = 'Client of reseller'; |
| | |
| | | $wb['limit_database_quota_txt'] = 'Database quota'; |
| | | $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.'; |
| | | $wb['reseller_txt'] = 'Reseller'; |
| | | $wb['btn_save_txt'] = "Save"; |
| | | $wb['btn_cancel_txt'] = "Cancel"; |
| | | $wb['invalid_vat_id'] = 'The VAT ID is invalid.'; |
| | | ?> |
| | |
| | | $wb['client_limits_txt'] = 'Client Limits'; |
| | | $wb['limit_database_quota_txt'] = 'Database quota'; |
| | | $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.'; |
| | | |
| | | $wb["xmpp_limits_txt"] = 'XMPP Limits'; |
| | | $wb["xmpp_servers_txt"] = 'XMPP Servers'; |
| | | $wb["xmpp_servers_placeholder"] = 'Select XMPP Servers'; |
| | | $wb['no_xmpp_server_error'] = 'At least one XMPP Server must be selected.'; |
| | | $wb['xmpp_servers_used'] = 'The server you are trying to remove from this client is used as a XMPP Server. Be sure that this server is not used by this client before you remove it.'; |
| | | $wb['limit_xmpp_domain_error_notint'] = 'The XMPP domain limit must be a number.'; |
| | | $wb['limit_xmpp_user_error_notint'] = 'The XMPP user limit must be a number.'; |
| | | $wb['limit_xmpp_domain_txt'] = 'Max. number of XMPP domains'; |
| | | $wb['limit_xmpp_user_txt'] = 'Max. number of XMPP accounts'; |
| | | $wb['limit_xmpp_muc_txt'] = 'Multiuser chat available'; |
| | | $wb['limit_xmpp_pastebin_txt'] = 'Pastebin for MUC available'; |
| | | $wb['limit_xmpp_httparchive_txt'] = 'HTTP archive for MUC available'; |
| | | $wb['limit_xmpp_anon_txt'] = 'Anonymous host available'; |
| | | $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available'; |
| | | $wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available'; |
| | | $wb['limit_xmpp_status_txt'] = 'Status host available'; |
| | | ?> |
| | |
| | | $wb['customer_no_template_error_regex_txt'] = 'The customer No. template contains invalid characters'; |
| | | $wb['customer_no_start_txt'] = 'Customer No. start value'; |
| | | $wb['customer_no_counter_txt'] = 'Customer No. counter'; |
| | | |
| | | $wb["xmpp_limits_txt"] = 'XMPP Limits'; |
| | | $wb["xmpp_servers_txt"] = 'XMPP Servers'; |
| | | $wb["xmpp_servers_placeholder"] = 'Select XMPP Servers'; |
| | | $wb['no_xmpp_server_error'] = 'At least one XMPP Server must be selected.'; |
| | | $wb['xmpp_servers_used'] = 'The server you are trying to remove from this client is used as a XMPP Server. Be sure that this server is not used by this client before you remove it.'; |
| | | $wb['limit_xmpp_domain_error_notint'] = 'The XMPP domain limit must be a number.'; |
| | | $wb['limit_xmpp_user_error_notint'] = 'The XMPP user limit must be a number.'; |
| | | $wb['limit_xmpp_domain_txt'] = 'Max. number of XMPP domains'; |
| | | $wb['limit_xmpp_user_txt'] = 'Max. number of XMPP accounts'; |
| | | $wb['limit_xmpp_muc_txt'] = 'Multiuser chat available'; |
| | | $wb['limit_xmpp_pastebin_txt'] = 'Pastebin for MUC available'; |
| | | $wb['limit_xmpp_httparchive_txt'] = 'HTTP archive for MUC available'; |
| | | $wb['limit_xmpp_anon_txt'] = 'Anonymous host available'; |
| | | $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available'; |
| | | $wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available'; |
| | | $wb['limit_xmpp_status_txt'] = 'Status host available'; |
| | | |
| | | $wb['added_by_txt'] = 'Added by'; |
| | | $wb['added_date_txt'] = 'Added date'; |
| | | $wb['limit_domainmodule_error_notint'] = 'Domainmodule limit must be a number.'; |
| | | $wb['limit_domainmodule_txt'] = 'Domainmodule Limit'; |
| | | $wb['client_limits_txt'] = 'Client Limits'; |
| | | $wb['err_msg_master_tpl_set'] = 'All custom limit settings are ignored if any master template other than "custom" is selected.'; |
| | | $wb['invalid_vat_id'] = 'The VAT ID is invalid.'; |
| | | ?> |
| | |
| | | $module["template"] = "module.tpl.htm"; |
| | | $module["startpage"] = "client/client_list.php"; |
| | | $module["tab_width"] = ''; |
| | | $module['order'] = '20'; |
| | | |
| | | |
| | | $items[] = array( 'title' => "Edit Client", |
| | |
| | | <?php |
| | | |
| | | $function_list['client_get_all,client_get,client_add,client_update,client_delete,client_get_sites_by_user,client_get_by_username,client_change_password,client_get_id,client_delete_everything,client_get_emailcontact'] = 'Client functions'; |
| | | $function_list['client_get_all,client_get,client_add,client_update,client_delete,client_get_sites_by_user,client_get_by_username,client_get_by_customer_no,client_change_password,client_get_id,client_delete_everything,client_get_emailcontact'] = 'Client functions'; |
| | | $function_list['domains_domain_get,domains_domain_add,domains_domain_delete,domains_get_all_by_user'] = 'Domaintool functions'; |
| | | $function_list['quota_get_by_user,mailquota_get_by_user'] = 'Quota functions'; |
| | | $function_list['quota_get_by_user,trafficquota_get_by_user,mailquota_get_by_user,databasequota_get_by_user'] = 'Quota functions'; |
| | | |
| | | |
| | | ?> |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); |
| | | 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); |
| | | |
| | | $liste["item"][] = array( 'field' => "circle_name", |
| | | 'datatype' => "VARCHAR", |
| | |
| | | // Check for duplicates |
| | | if($this->dataRecord['template_type'] == 'welcome') { |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $sql = "SELECT count(client_message_template_id) as number FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ".$client_group_id; |
| | | $sql = "SELECT count(client_message_template_id) as number FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ?"; |
| | | if($this->id > 0) { |
| | | $sql .= " AND client_message_template_id != ".$this->id; |
| | | $sql .= " AND client_message_template_id != ?"; |
| | | } |
| | | |
| | | $tmp = $app->db->queryOneRecord($sql); |
| | | $tmp = $app->db->queryOneRecord($sql, $client_group_id, $this->id); |
| | | if($tmp['number'] > 0) $app->tform->errorMessage .= $app->tform->lng('duplicate_welcome_error'); |
| | | } |
| | | |
| | |
| | | |
| | | $client_id = $app->functions->intval($this->dataRecord['client_id']); |
| | | |
| | | $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE parent_client_id = ".$client_id); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE parent_client_id = ?", $client_id); |
| | | if($tmp["number"] > 0) $app->error($app->lng('error_has_clients')); |
| | | |
| | | } |
| | |
| | | |
| | | // remove the group of the client from the resellers group |
| | | $parent_client_id = $app->functions->intval($this->dataRecord['parent_client_id']); |
| | | $parent_user = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE client_id = $parent_client_id"); |
| | | $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = $client_id"); |
| | | $parent_user = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE client_id = ?", $parent_client_id); |
| | | $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id); |
| | | $app->auth->remove_group_from_user($parent_user['userid'], $client_group['groupid']); |
| | | |
| | | // delete the group of the client |
| | | $app->db->query("DELETE FROM sys_group WHERE client_id = $client_id"); |
| | | $app->db->query("DELETE FROM sys_group WHERE client_id = ?", $client_id); |
| | | |
| | | // delete the sys user(s) of the client |
| | | $app->db->query("DELETE FROM sys_user WHERE client_id = $client_id"); |
| | | $app->db->query("DELETE FROM sys_user WHERE client_id = ?", $client_id); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | // Get the limits of the client |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | |
| | | // Check if the user may add another website. |
| | | if($client["limit_client"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = $client_group_id"); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = ?", $client_group_id); |
| | | if($tmp["number"] >= $client["limit_client"]) { |
| | | $app->error($app->tform->wordbook["limit_client_txt"]); |
| | | } |
| | |
| | | |
| | | // Get the limits of the client |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | $client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); |
| | | |
| | | // Check if the user may add another website. |
| | | if($client["limit_client"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = $client_group_id"); |
| | | $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = ?", $client_group_id); |
| | | if($tmp["number"] >= $client["limit_client"]) { |
| | | $app->error($app->tform->wordbook["limit_client_txt"]); |
| | | } |
| | |
| | | } |
| | | |
| | | if($this->id != 0) { |
| | | $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ' . $this->id); |
| | | $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ?', $this->id); |
| | | if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) { |
| | | // check previous type of storing templates |
| | | $tpls = explode('/', $this->oldDataRecord['template_additional']); |
| | |
| | | $app->tpl->setVar('tpl_add_select', $option); |
| | | |
| | | // check for new-style records |
| | | $result = $app->db->queryAllRecords('SELECT assigned_template_id, client_template_id FROM client_template_assigned WHERE client_id = ' . $this->id); |
| | | $result = $app->db->queryAllRecords('SELECT assigned_template_id, client_template_id FROM client_template_assigned WHERE client_id = ?', $this->id); |
| | | if($result && count($result) > 0) { |
| | | // new style |
| | | $items = array(); |
| | |
| | | unset($tmprec); |
| | | } else { |
| | | // old style |
| | | $sql = "SELECT template_additional FROM client WHERE client_id = " . $this->id; |
| | | $result = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT template_additional FROM client WHERE client_id = ?"; |
| | | $result = $app->db->queryOneRecord($sql, $this->id); |
| | | $tplAdd = explode("/", $result['template_additional']); |
| | | $text = ''; |
| | | foreach($tplAdd as $item){ |
| | |
| | | $customer_no = $app->functions->intval($system_config['misc']['customer_no_start']+$system_config['misc']['customer_no_counter']); |
| | | $customer_no_string = str_replace('[CUSTOMER_NO]',$customer_no,$system_config['misc']['customer_no_template']); |
| | | $app->tpl->setVar('customer_no',$customer_no_string); |
| | | |
| | | //* save new counter value |
| | | /* |
| | | $system_config['misc']['customer_no_counter']++; |
| | | $system_config_str = $app->ini_parser->get_ini_string($system_config); |
| | | $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($system_config_str)."'", 'sysini_id', 1); |
| | | */ |
| | | } |
| | | } |
| | | |
| | |
| | | function onAfterInsert() { |
| | | global $app, $conf; |
| | | // Create the group for the reseller |
| | | $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('".$app->db->quote($this->dataRecord["username"])."','',".$this->id.")", 'groupid'); |
| | | $groupid = $app->db->datalogInsert('sys_group', array("name" => $this->dataRecord["username"], "description" => '', "client_id" => $this->id), 'groupid'); |
| | | $groups = $groupid; |
| | | |
| | | $username = $app->db->quote($this->dataRecord["username"]); |
| | | $password = $app->db->quote($this->dataRecord["password"]); |
| | | $modules = $app->db->quote($conf['interface_modules_enabled'] . ',client'); |
| | | $username = $this->dataRecord["username"]; |
| | | $password = $this->dataRecord["password"]; |
| | | $modules = $conf['interface_modules_enabled'] . ',client'; |
| | | $startmodule = (stristr($modules, 'dashboard'))?'dashboard':'client'; |
| | | $usertheme = $app->db->quote($this->dataRecord["usertheme"]); |
| | | $usertheme = $this->dataRecord["usertheme"]; |
| | | $type = 'user'; |
| | | $active = 1; |
| | | $language = $app->db->quote($this->dataRecord["language"]); |
| | | $language = $this->dataRecord["language"]; |
| | | |
| | | $salt="$1$"; |
| | | $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; |
| | |
| | | |
| | | // Create the controlpaneluser for the reseller |
| | | $sql = "INSERT INTO sys_user (username,passwort,modules,startmodule,app_theme,typ,active,language,groups,default_group,client_id) |
| | | VALUES ('$username','$password','$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,".$this->id.")"; |
| | | $app->db->query($sql); |
| | | VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; |
| | | $app->db->query($sql, $username, $password, $modules, $startmodule, $usertheme, $type, $active, $language, $groups, $groupid, $this->id); |
| | | |
| | | //* set the number of clients to 1 |
| | | $app->db->query("UPDATE client SET limit_client = 1 WHERE client_id = ".$this->id); |
| | | $app->db->query("UPDATE client SET limit_client = 1 WHERE client_id = ?", $this->id); |
| | | |
| | | //* Set the default servers |
| | | $tmp = $app->db->queryOneRecord('SELECT server_id FROM server WHERE mail_server = 1 LIMIT 0,1'); |
| | |
| | | $tmp = $app->db->queryOneRecord('SELECT server_id FROM server WHERE db_server = 1 LIMIT 0,1'); |
| | | $default_dbserver = $app->functions->intval($tmp['server_id']); |
| | | |
| | | $sql = "UPDATE client SET default_mailserver = $default_mailserver, default_webserver = $default_webserver, default_dnsserver = $default_dnsserver, default_slave_dnsserver = $default_dnsserver, default_dbserver = $default_dbserver WHERE client_id = ".$this->id; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE client SET default_mailserver = ?, default_webserver = ?, default_dnsserver = ?, default_slave_dnsserver = ?, default_dbserver = ? WHERE client_id = ?"; |
| | | $app->db->query($sql, $default_mailserver, $default_webserver, $default_dnsserver, $default_dnsserver, $default_dbserver, $this->id); |
| | | |
| | | if(isset($this->dataRecord['template_master'])) { |
| | | $app->uses('client_templates'); |
| | |
| | | //* save new counter value |
| | | $system_config['misc']['customer_no_counter']++; |
| | | $system_config_str = $app->ini_parser->get_ini_string($system_config); |
| | | $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($system_config_str)."'", 'sysini_id', 1); |
| | | $app->db->datalogUpdate('sys_ini', array("config" => $system_config_str), 'sysini_id', 1); |
| | | |
| | | } |
| | | } |
| | | |
| | | //* Send welcome email |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $sql = "SELECT * FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ".$client_group_id; |
| | | $email_template = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT * FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ?"; |
| | | $email_template = $app->db->queryOneRecord($sql, $client_group_id); |
| | | $client = $app->tform->getDataRecord($this->id); |
| | | |
| | | if(is_array($email_template) && $client['email'] != '') { |
| | |
| | | $from = $system_config['admin_mail']; |
| | | } else { |
| | | $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); |
| | | $reseller = $app->db->queryOneRecord("SELECT client.email FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ".$client_group_id); |
| | | $reseller = $app->db->queryOneRecord("SELECT client.email FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ?", $client_group_id); |
| | | $from = $reseller["email"]; |
| | | } |
| | | |
| | |
| | | |
| | | // username changed |
| | | if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) { |
| | | $username = $app->db->quote($this->dataRecord["username"]); |
| | | $username = $this->dataRecord["username"]; |
| | | $client_id = $this->id; |
| | | $sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET username = ? WHERE client_id = ?"; |
| | | $app->db->query($sql, $username, $client_id); |
| | | |
| | | $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = $client_id"); |
| | | $app->db->datalogUpdate("sys_group", "name = '$username'", 'groupid', $tmp['groupid']); |
| | | $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = ?", $client_id); |
| | | $app->db->datalogUpdate("sys_group", array("name" => $username), 'groupid', $tmp['groupid']); |
| | | unset($tmp); |
| | | } |
| | | |
| | | // password changed |
| | | if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') { |
| | | $password = $app->db->quote($this->dataRecord["password"]); |
| | | $password = $this->dataRecord["password"]; |
| | | $client_id = $this->id; |
| | | $salt="$1$"; |
| | | $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; |
| | |
| | | } |
| | | $salt.="$"; |
| | | $password = crypt(stripslashes($password), $salt); |
| | | $sql = "UPDATE sys_user SET passwort = '$password' WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET passwort = ? WHERE client_id = ?"; |
| | | $app->db->query($sql, $password, $client_id); |
| | | } |
| | | |
| | | // language changed |
| | | if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) { |
| | | $language = $app->db->quote($this->dataRecord["language"]); |
| | | $language = $this->dataRecord["language"]; |
| | | $client_id = $this->id; |
| | | $sql = "UPDATE sys_user SET language = '$language' WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET language = ? WHERE client_id = ?"; |
| | | $app->db->query($sql, $language, $client_id); |
| | | } |
| | | |
| | | // ensure that a reseller is not converted to a client in demo mode when client_id <= 2 |
| | | if(isset($conf['demo_mode']) && $conf['demo_mode'] == true && $this->id <= 2) { |
| | | if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] != -1) { |
| | | $app->db->query('UPDATE client set limit_client = -1 WHERE client_id = '.$this->id); |
| | | $app->db->query('UPDATE client set limit_client = -1 WHERE client_id = ?', $this->id); |
| | | } |
| | | } |
| | | |
| | | // reseller status changed |
| | | if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] != $this->oldDataRecord["limit_client"]) { |
| | | $modules = $app->db->quote($conf['interface_modules_enabled'] . ',client'); |
| | | $modules = $app->db->quote($modules); |
| | | $modules = $conf['interface_modules_enabled'] . ',client'; |
| | | $modules = $modules; |
| | | $client_id = $this->id; |
| | | $sql = "UPDATE sys_user SET modules = '$modules' WHERE client_id = $client_id"; |
| | | $app->db->query($sql); |
| | | $sql = "UPDATE sys_user SET modules = ? WHERE client_id = ?"; |
| | | $app->db->query($sql, $modules, $client_id); |
| | | } |
| | | |
| | | if(isset($this->dataRecord['template_master'])) { |
| | |
| | | |
| | | $app->listform_actions->SQLOrderBy = 'ORDER BY client.company_name, client.contact_name, client.client_id'; |
| | | $app->listform_actions->SQLExtWhere = "(client.limit_client > 0 or client.limit_client = -1)"; |
| | | $app->listform_actions->SQLExtSelect = ', client.country as countryiso'; |
| | | $app->listform_actions->SQLExtSelect = ', LOWER(client.country) as countryiso'; |
| | | $app->listform_actions->onLoad(); |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | <tmpl_if name="list_head_txt"> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | </tmpl_if> |
| | | <tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if> |
| | | |
| | | <div class="panel panel_client"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>{tmpl_var name='circle_txt'}</legend> |
| | | <div class="ctrlHolder"> |
| | | <label for="circle_name">{tmpl_var name='circle_name_txt'}*</label> |
| | | <input name="circle_name" id="circle_name" value="{tmpl_var name='circle_name'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='client_ids_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="circle_name" class="col-sm-3 control-label">{tmpl_var name='circle_name_txt'}*</label> |
| | | <div class="col-sm-9"><input type="text" name="circle_name" id="circle_name" value="{tmpl_var name='circle_name'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='client_ids_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='client_ids'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="description">{tmpl_var name='description_txt'}</label> |
| | | <textarea name="description" id="description" rows='10' cols='30'>{tmpl_var name='description'}</textarea> |
| | | <div class="form-group"> |
| | | <label for="description" class="col-sm-3 control-label">{tmpl_var name='description_txt'}</label> |
| | | <div class="col-sm-9"><textarea class="form-control" name="description" id="description" rows='10' cols='30'>{tmpl_var name='description'}</textarea></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='active_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='active'} |
| | | </div> |
| | | </div> |
| | | {tmpl_var name='required_fields_txt'} |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','client/client_circle_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('client/client_circle_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="client/client_circle_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="client/client_circle_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_list_clients"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons"> |
| | | <button class="button iconstxt icoAdd" type="button" onclick="loadContent('client/client_circle_edit.php');"> |
| | | <span>{tmpl_var name="add_new_record_txt"}</span> |
| | | </button> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | <p class="fieldset-legend">{tmpl_var name="toolsarea_head_txt"}</p> |
| | | |
| | | <button class="btn btn-default formbutton-success" type="button" data-load-content="client/client_circle_edit.php">{tmpl_var name="add_new_record_txt"}</button> |
| | | |
| | | |
| | | |
| | | <div class="pnl_listarea"> |
| | | <fieldset><legend><tmpl_var name="list_head_txt"></legend> |
| | | <table class="list"> |
| | | <thead> |
| | | <tr class="caption"> |
| | | <th class="tbl_col_circle_id" scope="col"><tmpl_var name="circle_id_txt"></th> |
| | | <th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th> |
| | | <th class="tbl_col_circle_name" scope="col"><tmpl_var name="circle_name_txt"></th> |
| | | <th class="tbl_col_description" scope="col"><tmpl_var name="description_txt"></th> |
| | | <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th> |
| | | |
| | | <p class="fieldset-legend"><tmpl_var name="list_head_txt"></p> |
| | | <div class="table-wrapper marginTop15"> |
| | | <table class="table"> |
| | | <thead class="dark form-group-sm"> |
| | | <tr> |
| | | <th data-column="circle_id"><tmpl_var name="circle_id_txt"></th> |
| | | <th class="tiny-col" data-column="active"><tmpl_var name="active_txt"></th> |
| | | <th data-column="circle_name"><tmpl_var name="circle_name_txt"></th> |
| | | <th data-column="description"><tmpl_var name="description_txt"></th> |
| | | <th class="small-col text-right">{tmpl_var name='search_limit'}</th> |
| | | </tr> |
| | | <tr class="filter"> |
| | | <td class="tbl_col_circle_pid"><input type="text" name="search_circle_id" value="{tmpl_var name='search_circle_id'}" /></td> |
| | | <td class="tbl_col_active"><select name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td class="tbl_col_circle_name"><input type="text" name="search_circle_name" value="{tmpl_var name='search_circle_name'}" /></td> |
| | | <td class="tbl_col_description"><input type="text" name="search_description" value="{tmpl_var name='search_description'}" /></td> |
| | | <td class="tbl_col_buttons"> |
| | | <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','client/client_circle_list.php');"><span>{tmpl_var name="filter_txt"}</span></button> |
| | | <tr> |
| | | <td><input class="form-control" type="text" name="search_circle_id" value="{tmpl_var name='search_circle_id'}" /></td> |
| | | <td><select class="form-control" name="search_active">{tmpl_var name='search_active'}</select></td> |
| | | <td><input class="form-control" type="text" name="search_circle_name" value="{tmpl_var name='search_circle_name'}" /></td> |
| | | <td><input class="form-control" type="text" name="search_description" value="{tmpl_var name='search_description'}" /></td> |
| | | <td class="text-right"> |
| | | <button type="button" class="btn btn-default formbutton-default formbutton-narrow" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" data-submit-form="pageForm" data-form-action="client/client_circle_list.php"><span class="icon icon-filter"></span></button> |
| | | </td> |
| | | </tr> |
| | | </thead> |
| | | <tbody> |
| | | <tmpl_loop name="records"> |
| | | <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>"> |
| | | <td class="tbl_col_circle_pid"><a href="#" onclick="loadContent('client/client_circle_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="circle_id"}</a></td> |
| | | <td class="tbl_col_active"><a href="#" onclick="loadContent('client/client_circle_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a></td> |
| | | <td class="tbl_col_circle_name"><a href="#" onclick="loadContent('client/client_circle_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="circle_name"}</a></td> |
| | | <td class="tbl_col_description"><a href="#" onclick="loadContent('client/client_circle_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="description"}</a></td> |
| | | <td class="tbl_col_buttons"> |
| | | <a class="button icons16 icoDelete" href="javascript: del_record('client/client_circle_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a> |
| | | <tr> |
| | | <td><a href="#" data-load-content="client/client_circle_edit.php?id={tmpl_var name='id'}">{tmpl_var name="circle_id"}</a></td> |
| | | <td><a href="#" data-load-content="client/client_circle_edit.php?id={tmpl_var name='id'}">{tmpl_var name="active"}</a></td> |
| | | <td><a href="#" data-load-content="client/client_circle_edit.php?id={tmpl_var name='id'}">{tmpl_var name="circle_name"}</a></td> |
| | | <td><a href="#" data-load-content="client/client_circle_edit.php?id={tmpl_var name='id'}">{tmpl_var name="description"}</a></td> |
| | | <td class="text-right"> |
| | | <a class="btn btn-default formbutton-danger formbutton-narrow" href="javascript: ISPConfig.confirm_action('client/client_circle_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span class="icon icon-delete"></span></a> |
| | | </td> |
| | | </tr> |
| | | </tmpl_loop> |
| | |
| | | </tbody> |
| | | <tfoot> |
| | | <tr> |
| | | <td class="tbl_footer tbl_paging" colspan="5"><tmpl_var name="paging"></td> |
| | | <td colspan="5"><tmpl_var name="paging"></td> |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_client_del"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | |
| | | <div id="OKMsg"> |
| | | <tmpl_if name='number_records'> |
| | |
| | | </tmpl_if> |
| | | </div> |
| | | |
| | | <input type="checkbox" name="confirm" value="yes" /> <b><tmpl_var name="confirm_action_txt"></b> |
| | | <div class="col-sm-9"><input class="form-control" type="checkbox" name="confirm" value="yes" /></div><b><tmpl_var name="confirm_action_txt"></b> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','client/client_del.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('client/client_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="client/client_del.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="client/client_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | |
| | | <div class="panel panel_client"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>Address</legend> |
| | | <div class="ctrlHolder"> |
| | | <label for="company_name">{tmpl_var name='company_name_txt'}</label> |
| | | <input name="company_name" id="company_name" value="{tmpl_var name='company_name'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="gender">{tmpl_var name='gender_txt'}</label> |
| | | <select name="gender" id="gender" class="selectInput"> |
| | | <legend>Address</legend> |
| | | <div class="form-group"> |
| | | <label for="company_name" class="col-sm-3 control-label">{tmpl_var name='company_name_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="company_name" id="company_name" value="{tmpl_var name='company_name'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="gender" class="col-sm-3 control-label">{tmpl_var name='gender_txt'}</label> |
| | | <div class="col-sm-9"><select name="gender" id="gender" class="form-control"> |
| | | {tmpl_var name='gender'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="contact_firstname">{tmpl_var name='contact_firstname_txt'}</label> |
| | | <input name="contact_firstname" id="contact_firstname" value="{tmpl_var name='contact_firstname'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | <div class="form-group"> |
| | | <label for="contact_firstname" class="col-sm-3 control-label">{tmpl_var name='contact_firstname_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="contact_firstname" id="contact_firstname" value="{tmpl_var name='contact_firstname'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="contact_name" class="col-sm-3 control-label">{tmpl_var name='contact_name_txt'}*</label> |
| | | <div class="col-sm-9"><input type="text" name="contact_name" id="contact_name" value="{tmpl_var name='contact_name'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="customer_no" class="col-sm-3 control-label">{tmpl_var name='customer_no_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="customer_no" id="customer_no" value="{tmpl_var name='customer_no'}" class="form-control" /></div><input name="customer_no_org" id="customer_no_org" value="{tmpl_var name='customer_no'}" type="hidden" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="contact_name">{tmpl_var name='contact_name_txt'}*</label> |
| | | <input name="contact_name" id="contact_name" value="{tmpl_var name='contact_name'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | <div class="form-group"> |
| | | <label for="username" class="col-sm-3 control-label">{tmpl_var name='username_txt'}*</label> |
| | | <div class="col-sm-9"><input type="text" name="username" id="username" value="{tmpl_var name='username'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="password" class="col-sm-3 control-label">{tmpl_var name='password_txt'}</label> |
| | | <div class="col-sm-6"><input type="password" name="password" id="password" value="{tmpl_var name='password'}" class="form-control" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /></div><div class="col-sm-3 input-sm"> </div><a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="customer_no">{tmpl_var name='customer_no_txt'}</label> |
| | | <input name="customer_no" id="customer_no" value="{tmpl_var name='customer_no'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | <input name="customer_no_org" id="customer_no_org" value="{tmpl_var name='customer_no'}" type="hidden" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="username">{tmpl_var name='username_txt'}*</label> |
| | | <input name="username" id="username" value="{tmpl_var name='username'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="password">{tmpl_var name='password_txt'}</label> |
| | | <input name="password" id="password" value="{tmpl_var name='password'}" size="30" maxlength="255" type="password" class="textInput" autocomplete="off" onkeyup="pass_check(this.value);checkPassMatch('password','repeat_password');" /> <a href="javascript:void(0);" onclick="generatePassword('password','repeat_password');">{tmpl_var name='generate_password_txt'}</a> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='password_strength_txt'}</p> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='password_strength_txt'}</label> |
| | | <div id="passBar"></div> |
| | | <p class="formHint"><span id="passText"> </span></p> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="repeat_password">{tmpl_var name='repeat_password_txt'}</label> |
| | | <input name="repeat_password" id="repeat_password" value="" size="15" maxlength="100" type="password" class="textInput" style="width:100px;" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="repeat_password" class="col-sm-3 control-label">{tmpl_var name='repeat_password_txt'}</label> |
| | | <div class="col-sm-9"><input type="password" name="repeat_password" id="repeat_password" value="" class="form-control" autocomplete="off" onkeyup="checkPassMatch('password','repeat_password');" /></div></div> |
| | | <div id="confirmpasswordError" style="display:none;" class="confirmpassworderror">{tmpl_var name='password_mismatch_txt'}</div> |
| | | <div id="confirmpasswordOK" style="display:none;" class="confirmpasswordok">{tmpl_var name='password_match_txt'}</div> |
| | | <div class="ctrlHolder"> |
| | | <label for="language">{tmpl_var name='language_txt'}</label> |
| | | <select name="language" id="language" class="selectInput flags"> |
| | | <div class="form-group"> |
| | | <label for="language" class="col-sm-3 control-label">{tmpl_var name='language_txt'}</label> |
| | | <div class="col-sm-9"><select name="language" id="language" class="form-control flags"> |
| | | {tmpl_var name='language'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="usertheme">{tmpl_var name='usertheme_txt'}</label> |
| | | <select name="usertheme" id="usertheme" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="usertheme" class="col-sm-3 control-label">{tmpl_var name='usertheme_txt'}</label> |
| | | <div class="col-sm-9"><select name="usertheme" id="usertheme" class="form-control"> |
| | | {tmpl_var name='usertheme'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="street">{tmpl_var name='street_txt'}</label> |
| | | <input name="street" id="street" value="{tmpl_var name='street'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="zip">{tmpl_var name='zip_txt'}</label> |
| | | <input name="zip" id="zip" value="{tmpl_var name='zip'}" size="10" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="city">{tmpl_var name='city_txt'}</label> |
| | | <input name="city" id="city" value="{tmpl_var name='city'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="state">{tmpl_var name='state_txt'}</label> |
| | | <input name="state" id="state" value="{tmpl_var name='state'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="country">{tmpl_var name='country_txt'}</label> |
| | | <select name="country" id="country" class="selectInput flags"> |
| | | <div class="form-group"> |
| | | <label for="street" class="col-sm-3 control-label">{tmpl_var name='street_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="street" id="street" value="{tmpl_var name='street'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="zip" class="col-sm-3 control-label">{tmpl_var name='zip_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="zip" id="zip" value="{tmpl_var name='zip'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="city" class="col-sm-3 control-label">{tmpl_var name='city_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="city" id="city" value="{tmpl_var name='city'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="state" class="col-sm-3 control-label">{tmpl_var name='state_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="state" id="state" value="{tmpl_var name='state'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="country" class="col-sm-3 control-label">{tmpl_var name='country_txt'}</label> |
| | | <div class="col-sm-9"><select name="country" id="country" class="form-control flags"> |
| | | {tmpl_var name='country'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="telephone">{tmpl_var name='telephone_txt'}</label> |
| | | <input name="telephone" id="telephone" value="{tmpl_var name='telephone'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | <div class="form-group"> |
| | | <label for="telephone" class="col-sm-3 control-label">{tmpl_var name='telephone_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="telephone" id="telephone" value="{tmpl_var name='telephone'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="mobile" class="col-sm-3 control-label">{tmpl_var name='mobile_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="mobile" id="mobile" value="{tmpl_var name='mobile'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="fax" class="col-sm-3 control-label">{tmpl_var name='fax_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="fax" id="fax" value="{tmpl_var name='fax'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="email" class="col-sm-3 control-label">{tmpl_var name='email_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="email" id="email" value="{tmpl_var name='email'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="internet" class="col-sm-3 control-label">{tmpl_var name='internet_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="internet" id="internet" value="{tmpl_var name='internet'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="icq" class="col-sm-3 control-label">{tmpl_var name='icq_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="icq" id="icq" value="{tmpl_var name='icq'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="vat_id" class="col-sm-3 control-label">{tmpl_var name='vat_id_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="vat_id" id="vat_id" value="{tmpl_var name='vat_id'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="company_id" class="col-sm-3 control-label">{tmpl_var name='company_id_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="company_id" id="company_id" value="{tmpl_var name='company_id'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="bank_account_owner" class="col-sm-3 control-label">{tmpl_var name='bank_account_owner_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="bank_account_owner" id="bank_account_owner" value="{tmpl_var name='bank_account_owner'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="bank_account_number" class="col-sm-3 control-label">{tmpl_var name='bank_account_number_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="bank_account_number" id="bank_account_number" value="{tmpl_var name='bank_account_number'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="bank_code" class="col-sm-3 control-label">{tmpl_var name='bank_code_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="bank_code" id="bank_code" value="{tmpl_var name='bank_code'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="bank_name" class="col-sm-3 control-label">{tmpl_var name='bank_name_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="bank_name" id="bank_name" value="{tmpl_var name='bank_name'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="bank_account_iban" class="col-sm-3 control-label">{tmpl_var name='bank_account_iban_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="bank_account_iban" id="bank_account_iban" value="{tmpl_var name='bank_account_iban'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="bank_account_swift" class="col-sm-3 control-label">{tmpl_var name='bank_account_swift_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="bank_account_swift" id="bank_account_swift" value="{tmpl_var name='bank_account_swift'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="paypal_email" class="col-sm-3 control-label">{tmpl_var name='paypal_email_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="paypal_email" id="paypal_email" value="{tmpl_var name='paypal_email'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="added_date" class="col-sm-3 control-label">{tmpl_var name='added_date_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="added_date" id="added_date" value="{tmpl_var name='added_date'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="added_by" class="col-sm-3 control-label">{tmpl_var name='added_by_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="added_by" id="added_by" value="{tmpl_var name='added_by'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="notes" class="col-sm-3 control-label">{tmpl_var name='notes_txt'}</label> |
| | | <div class="col-sm-9"><textarea class="form-control" name="notes" id="notes" rows='10' cols='30'>{tmpl_var name='notes'}</textarea></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="mobile">{tmpl_var name='mobile_txt'}</label> |
| | | <input name="mobile" id="mobile" value="{tmpl_var name='mobile'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="fax">{tmpl_var name='fax_txt'}</label> |
| | | <input name="fax" id="fax" value="{tmpl_var name='fax'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="email">{tmpl_var name='email_txt'}</label> |
| | | <input name="email" id="email" value="{tmpl_var name='email'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="internet">{tmpl_var name='internet_txt'}</label> |
| | | <input name="internet" id="internet" value="{tmpl_var name='internet'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="icq">{tmpl_var name='icq_txt'}</label> |
| | | <input name="icq" id="icq" value="{tmpl_var name='icq'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="vat_id">{tmpl_var name='vat_id_txt'}</label> |
| | | <input name="vat_id" id="vat_id" value="{tmpl_var name='vat_id'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="company_id">{tmpl_var name='company_id_txt'}</label> |
| | | <input name="company_id" id="company_id" value="{tmpl_var name='company_id'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_account_owner">{tmpl_var name='bank_account_owner_txt'}</label> |
| | | <input name="bank_account_owner" id="bank_account_owner" value="{tmpl_var name='bank_account_owner'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_account_number">{tmpl_var name='bank_account_number_txt'}</label> |
| | | <input name="bank_account_number" id="bank_account_number" value="{tmpl_var name='bank_account_number'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_code">{tmpl_var name='bank_code_txt'}</label> |
| | | <input name="bank_code" id="bank_code" value="{tmpl_var name='bank_code'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_name">{tmpl_var name='bank_name_txt'}</label> |
| | | <input name="bank_name" id="bank_name" value="{tmpl_var name='bank_name'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_account_iban">{tmpl_var name='bank_account_iban_txt'}</label> |
| | | <input name="bank_account_iban" id="bank_account_iban" value="{tmpl_var name='bank_account_iban'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_account_swift">{tmpl_var name='bank_account_swift_txt'}</label> |
| | | <input name="bank_account_swift" id="bank_account_swift" value="{tmpl_var name='bank_account_swift'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="paypal_email">{tmpl_var name='paypal_email_txt'}</label> |
| | | <input name="paypal_email" id="paypal_email" value="{tmpl_var name='paypal_email'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="added_date">{tmpl_var name='added_date_txt'}</label> |
| | | <input name="added_date" id="added_date" value="{tmpl_var name='added_date'}" size="10" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="added_by">{tmpl_var name='added_by_txt'}</label> |
| | | <input name="added_by" id="added_by" value="{tmpl_var name='added_by'}" size="10" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="notes">{tmpl_var name='notes_txt'}</label> |
| | | <textarea name="notes" id="notes" rows='10' cols='30'>{tmpl_var name='notes'}</textarea> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='locked_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='locked_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='locked'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='canceled_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='canceled_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='canceled'} |
| | | </div> |
| | | </div> |
| | | {tmpl_var name='required_fields_txt'} |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','client/client_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('client/client_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="client/client_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="client/client_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2> |
| | | <p><tmpl_var name="list_desc_txt"></p> |
| | | <tmpl_if name="list_head_txt"> |
| | | <div class='page-header'> |
| | | <h1><tmpl_var name="list_head_txt"></h1> |
| | | </div> |
| | | </tmpl_if> |
| | | <tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if> |
| | | |
| | | <div class="panel panel_client"> |
| | | |
| | | <div class="pnl_toolsarea"> |
| | | <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend> |
| | | <div class="buttons topbuttons"> |
| | | <button class="positive iconstxt icoAdd" type="button" value="{tmpl_var name='add_additional_template_txt'}" onclick="addAdditionalTemplate();"><span>{tmpl_var name='add_additional_template_txt'}</span></button> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | |
| | | <div class="pnl_formsarea"> |
| | | <fieldset class="inlineLabels"><legend>Limits</legend> |
| | | <div class="ctrlHolder"> |
| | | <label for="template_master">{tmpl_var name='template_master_txt'}</label> |
| | | <select name="template_master" id="template_master" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="template_master" class="col-sm-3 control-label">{tmpl_var name='template_master_txt'}</label> |
| | | <div class="col-sm-9"><select name="template_master" id="template_master" class="form-control"> |
| | | {tmpl_var name='template_master'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="template_additional">{tmpl_var name='template_additional_txt'}</label> |
| | | <select name="tpl_add_select" id="tpl_add_select" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="template_additional" class="col-sm-3 control-label">{tmpl_var name='template_additional_txt'}</label> |
| | | <div class="col-sm-9"><select name="tpl_add_select" id="tpl_add_select" class="form-control"> |
| | | {tmpl_var name='tpl_add_select'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='active_template_additional_txt'}</p> |
| | | <div id="template_additional_list" class="multiField"> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" onclick="ISPConfig.addAdditionalTemplate();">{tmpl_var name="add_additional_template_txt"}</button> |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='active_template_additional_txt'}</label> |
| | | <div id="template_additional_list" class="col-sm-9 col-text"> |
| | | <ul> |
| | | {tmpl_var name='template_additional_list'} |
| | | </ul> |
| | | </div> |
| | | <input type="hidden" id="template_additional" name="template_additional" value="{tmpl_var name='template_additional'}"> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <div class="form-group"> |
| | | |
| | | </div> |
| | | <tmpl_if name="is_admin"> |
| | | <div class="ctrlHolder"> |
| | | <label for="parent_client_id_id">{tmpl_var name='parent_client_id_txt'}</label> |
| | | <select name="parent_client_id" id="parent_client_id" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="parent_client_id_id" class="col-sm-3 control-label">{tmpl_var name='parent_client_id_txt'}</label> |
| | | <div class="col-sm-9"><select name="parent_client_id" id="parent_client_id" class="form-control"> |
| | | {tmpl_var name='parent_client_id'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="reseller">{tmpl_var name='reseller_txt'}</label> |
| | | <input type="checkbox" name="reseller" value="1" id="reseller" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="reseller" class="col-sm-3 control-label">{tmpl_var name='reseller_txt'}</label> |
| | | <div class="col-sm-9"><input class="form-control" type="checkbox" name="reseller" value="1" id="reseller" /></div></div> |
| | | </tmpl_if> |
| | | <div class="subsectiontoggle"><span class="showing"></span>{tmpl_var name='web_limits_txt'}<em class="showing"></em></div> |
| | | <div> |
| | | <div class="ctrlHolder"> |
| | | <label for="web_servers">{tmpl_var name='web_servers_txt'}</label> |
| | | <select data-placeholder="{tmpl_var name='web_servers_placeholder'}" multiple name="web_servers[]" id="web_servers" class="selectInput chosen-select"> |
| | | <div class="form-group"> |
| | | <label for="web_servers" class="col-sm-3 control-label">{tmpl_var name='web_servers_txt'}</label> |
| | | <div class="col-sm-9"><select data-placeholder="{tmpl_var name='web_servers_placeholder'}" multiple name="web_servers[]" id="web_servers" class="form-control"> |
| | | {tmpl_var name='web_servers'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_web_domain">{tmpl_var name='limit_web_domain_txt'}</label> |
| | | <input name="limit_web_domain" id="limit_web_domain" value="{tmpl_var name='limit_web_domain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_web_quota">{tmpl_var name='limit_web_quota_txt'}</label> |
| | | <input name="limit_web_quota" id="limit_web_quota" value="{tmpl_var name='limit_web_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> MB |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_traffic_quota">{tmpl_var name='limit_traffic_quota_txt'}</label> |
| | | <input name="limit_traffic_quota" id="limit_traffic_quota" value="{tmpl_var name='limit_traffic_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> MB |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='web_php_options_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="limit_web_domain" class="col-sm-3 control-label">{tmpl_var name='limit_web_domain_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_web_domain" id="limit_web_domain" value="{tmpl_var name='limit_web_domain'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_web_quota" class="col-sm-3 control-label">{tmpl_var name='limit_web_quota_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="limit_web_quota" id="limit_web_quota" value="{tmpl_var name='limit_web_quota'}" class="form-control" /></div><div class="col-sm-3 input-sm"> MB |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_traffic_quota" class="col-sm-3 control-label">{tmpl_var name='limit_traffic_quota_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="limit_traffic_quota" id="limit_traffic_quota" value="{tmpl_var name='limit_traffic_quota'}" class="form-control" /></div><div class="col-sm-3 input-sm"> MB |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='web_php_options_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='web_php_options'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='limit_cgi_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_cgi_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_cgi'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='limit_ssi_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_ssi_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_ssi'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='limit_perl_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_perl_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_perl'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='limit_ruby_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_ruby_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_ruby'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='limit_python_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_python_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_python'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='force_suexec_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='force_suexec_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='force_suexec'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='limit_hterror_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_hterror_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_hterror'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='limit_wildcard_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_wildcard_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_wildcard'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='limit_ssl_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_ssl_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_ssl'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_web_aliasdomain">{tmpl_var name='limit_web_aliasdomain_txt'}</label> |
| | | <input name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_web_subdomain">{tmpl_var name='limit_web_subdomain_txt'}</label> |
| | | <input name="limit_web_subdomain" id="limit_web_subdomain" value="{tmpl_var name='limit_web_subdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_ftp_user">{tmpl_var name='limit_ftp_user_txt'}</label> |
| | | <input name="limit_ftp_user" id="limit_ftp_user" value="{tmpl_var name='limit_ftp_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_shell_user">{tmpl_var name='limit_shell_user_txt'}</label> |
| | | <input name="limit_shell_user" id="limit_shell_user" value="{tmpl_var name='limit_shell_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='ssh_chroot_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="limit_web_aliasdomain" class="col-sm-3 control-label">{tmpl_var name='limit_web_aliasdomain_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_web_subdomain" class="col-sm-3 control-label">{tmpl_var name='limit_web_subdomain_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_web_subdomain" id="limit_web_subdomain" value="{tmpl_var name='limit_web_subdomain'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_ftp_user" class="col-sm-3 control-label">{tmpl_var name='limit_ftp_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_ftp_user" id="limit_ftp_user" value="{tmpl_var name='limit_ftp_user'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_shell_user" class="col-sm-3 control-label">{tmpl_var name='limit_shell_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_shell_user" id="limit_shell_user" value="{tmpl_var name='limit_shell_user'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='ssh_chroot_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='ssh_chroot'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_webdav_user">{tmpl_var name='limit_webdav_user_txt'}</label> |
| | | <input name="limit_webdav_user" id="limit_webdav_user" value="{tmpl_var name='limit_webdav_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='limit_backup_txt'}</p> |
| | | <div class="multiField"> |
| | | <div class="form-group"> |
| | | <label for="limit_webdav_user" class="col-sm-3 control-label">{tmpl_var name='limit_webdav_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_webdav_user" id="limit_webdav_user" value="{tmpl_var name='limit_webdav_user'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_backup_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_backup'} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='email_limits_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <label for="mail_servers">{tmpl_var name='mail_servers_txt'}</label> |
| | | <select data-placeholder="{tmpl_var name='mail_servers_placeholder'}" multiple name="mail_servers[]" id="mail_servers" class="selectInput chosen-select"> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-email_limits" aria-expanded="false" aria-controls="toggle-email_limits">{tmpl_var name='email_limits_txt'}</button></div> |
| | | <div id="toggle-email_limits" class="collapse"> |
| | | <div class="form-group"> |
| | | <label for="mail_servers" class="col-sm-3 control-label">{tmpl_var name='mail_servers_txt'}</label> |
| | | <div class="col-sm-9"><select data-placeholder="{tmpl_var name='mail_servers_placeholder'}" multiple name="mail_servers[]" id="mail_servers" class="form-control"> |
| | | {tmpl_var name='mail_servers'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_maildomain">{tmpl_var name='limit_maildomain_txt'}</label> |
| | | <input name="limit_maildomain" id="limit_maildomain" value="{tmpl_var name='limit_maildomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_mailbox">{tmpl_var name='limit_mailbox_txt'}</label> |
| | | <input name="limit_mailbox" id="limit_mailbox" value="{tmpl_var name='limit_mailbox'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_mailalias">{tmpl_var name='limit_mailalias_txt'}</label> |
| | | <input name="limit_mailalias" id="limit_mailalias" value="{tmpl_var name='limit_mailalias'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_mailaliasdomain">{tmpl_var name='limit_mailaliasdomain_txt'}</label> |
| | | <input name="limit_mailaliasdomain" id="limit_mailaliasdomain" value="{tmpl_var name='limit_mailaliasdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_mailmailinglist">{tmpl_var name='limit_mailmailinglist_txt'}</label> |
| | | <input name="limit_mailmailinglist" id="limit_mailmailinglist" value="{tmpl_var name='limit_mailmailinglist'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_mailforward">{tmpl_var name='limit_mailforward_txt'}</label> |
| | | <input name="limit_mailforward" id="limit_mailforward" value="{tmpl_var name='limit_mailforward'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_mailcatchall">{tmpl_var name='limit_mailcatchall_txt'}</label> |
| | | <input name="limit_mailcatchall" id="limit_mailcatchall" value="{tmpl_var name='limit_mailcatchall'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_mailrouting">{tmpl_var name='limit_mailrouting_txt'}</label> |
| | | <input name="limit_mailrouting" id="limit_mailrouting" value="{tmpl_var name='limit_mailrouting'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_mailfilter">{tmpl_var name='limit_mailfilter_txt'}</label> |
| | | <input name="limit_mailfilter" id="limit_mailfilter" value="{tmpl_var name='limit_mailfilter'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_fetchmail">{tmpl_var name='limit_fetchmail_txt'}</label> |
| | | <input name="limit_fetchmail" id="limit_fetchmail" value="{tmpl_var name='limit_fetchmail'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_mailquota">{tmpl_var name='limit_mailquota_txt'}</label> |
| | | <input name="limit_mailquota" id="limit_mailquota" value="{tmpl_var name='limit_mailquota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> MB |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_spamfilter_wblist">{tmpl_var name='limit_spamfilter_wblist_txt'}</label> |
| | | <input name="limit_spamfilter_wblist" id="limit_spamfilter_wblist" value="{tmpl_var name='limit_spamfilter_wblist'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_spamfilter_user">{tmpl_var name='limit_spamfilter_user_txt'}</label> |
| | | <input name="limit_spamfilter_user" id="limit_spamfilter_user" value="{tmpl_var name='limit_spamfilter_user'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_spamfilter_policy">{tmpl_var name='limit_spamfilter_policy_txt'}</label> |
| | | <input name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="limit_maildomain" class="col-sm-3 control-label">{tmpl_var name='limit_maildomain_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_maildomain" id="limit_maildomain" value="{tmpl_var name='limit_maildomain'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_mailbox" class="col-sm-3 control-label">{tmpl_var name='limit_mailbox_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_mailbox" id="limit_mailbox" value="{tmpl_var name='limit_mailbox'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_mailalias" class="col-sm-3 control-label">{tmpl_var name='limit_mailalias_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_mailalias" id="limit_mailalias" value="{tmpl_var name='limit_mailalias'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_mailaliasdomain" class="col-sm-3 control-label">{tmpl_var name='limit_mailaliasdomain_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_mailaliasdomain" id="limit_mailaliasdomain" value="{tmpl_var name='limit_mailaliasdomain'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_mailmailinglist" class="col-sm-3 control-label">{tmpl_var name='limit_mailmailinglist_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_mailmailinglist" id="limit_mailmailinglist" value="{tmpl_var name='limit_mailmailinglist'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_mailforward" class="col-sm-3 control-label">{tmpl_var name='limit_mailforward_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_mailforward" id="limit_mailforward" value="{tmpl_var name='limit_mailforward'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_mailcatchall" class="col-sm-3 control-label">{tmpl_var name='limit_mailcatchall_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_mailcatchall" id="limit_mailcatchall" value="{tmpl_var name='limit_mailcatchall'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_mailrouting" class="col-sm-3 control-label">{tmpl_var name='limit_mailrouting_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_mailrouting" id="limit_mailrouting" value="{tmpl_var name='limit_mailrouting'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_mailfilter" class="col-sm-3 control-label">{tmpl_var name='limit_mailfilter_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_mailfilter" id="limit_mailfilter" value="{tmpl_var name='limit_mailfilter'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_fetchmail" class="col-sm-3 control-label">{tmpl_var name='limit_fetchmail_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_fetchmail" id="limit_fetchmail" value="{tmpl_var name='limit_fetchmail'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_mailquota" class="col-sm-3 control-label">{tmpl_var name='limit_mailquota_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="limit_mailquota" id="limit_mailquota" value="{tmpl_var name='limit_mailquota'}" class="form-control" /></div><div class="col-sm-3 input-sm"> MB |
| | | </div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_spamfilter_wblist" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_wblist_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_spamfilter_wblist" id="limit_spamfilter_wblist" value="{tmpl_var name='limit_spamfilter_wblist'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_spamfilter_user" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_spamfilter_user" id="limit_spamfilter_user" value="{tmpl_var name='limit_spamfilter_user'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_spamfilter_policy" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_policy_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" class="form-control" /></div></div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='database_limits_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <label for="db_servers">{tmpl_var name='db_servers_txt'}</label> |
| | | <select data-placeholder="{tmpl_var name='db_servers_placeholder'}" multiple name="db_servers[]" id="db_servers" class="selectInput chosen-select"> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-xmpp_limits" aria-expanded="false" aria-controls="toggle-xmpp_limits">{tmpl_var name='xmpp_limits_txt'}</button></div> |
| | | <div id="toggle-xmpp_limits" class="collapse"> |
| | | <div class="form-group"> |
| | | <label for="xmpp_servers" class="col-sm-3 control-label">{tmpl_var name='xmpp_servers_txt'}</label> |
| | | <div class="col-sm-9"><select data-placeholder="{tmpl_var name='xmpp_servers_placeholder'}" multiple name="xmpp_servers[]" id="xmpp_servers" class="form-control"> |
| | | {tmpl_var name='xmpp_servers'} |
| | | </select></div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="limit_xmpp_domain" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_domain_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_xmpp_domain" id="limit_xmpp_domain" value="{tmpl_var name='limit_xmpp_domain'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_xmpp_user" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_xmpp_user" id="limit_xmpp_user" value="{tmpl_var name='limit_xmpp_user'}" class="form-control" /></div></div> |
| | | <!--<div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='xmpp_auth_options_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='xmpp_auth_options'} |
| | | </div> |
| | | </div>--> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_muc_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_muc'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_pastebin_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_pastebin'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_httparchive_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_httparchive'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_anon_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_anon'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_vjud_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_vjud'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_proxy_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_proxy'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_status_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_status'} |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-database_limits" aria-expanded="false" aria-controls="toggle-database_limits">{tmpl_var name='database_limits_txt'}</button></div> |
| | | <div id="toggle-database_limits" class="collapse"> |
| | | <div class="form-group"> |
| | | <label for="db_servers" class="col-sm-3 control-label">{tmpl_var name='db_servers_txt'}</label> |
| | | <div class="col-sm-9"><select data-placeholder="{tmpl_var name='db_servers_placeholder'}" multiple name="db_servers[]" id="db_servers" class="form-control"> |
| | | {tmpl_var name='db_servers'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_database">{tmpl_var name='limit_database_txt'}</label> |
| | | <input name="limit_database" id="limit_database" value="{tmpl_var name='limit_database'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_database_quota">{tmpl_var name='limit_database_quota_txt'}</label> |
| | | <input name="limit_database_quota" id="limit_database_quota" value="{tmpl_var name='limit_database_quota'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> MB |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="limit_database" class="col-sm-3 control-label">{tmpl_var name='limit_database_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_database" id="limit_database" value="{tmpl_var name='limit_database'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_database_quota" class="col-sm-3 control-label">{tmpl_var name='limit_database_quota_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="limit_database_quota" id="limit_database_quota" value="{tmpl_var name='limit_database_quota'}" class="form-control" /></div><div class="col-sm-3 input-sm"> MB |
| | | </div></div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='cron_job_limits_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_cron">{tmpl_var name='limit_cron_txt'}</label> |
| | | <input name="limit_cron" id="limit_cron" value="{tmpl_var name='limit_cron'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_cron_type">{tmpl_var name='limit_cron_type_txt'}</label> |
| | | <select name="limit_cron_type" id="limit_cron_type" class="selectInput formLengthHalf"> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-cron_job_limits" aria-expanded="false" aria-controls="toggle-cron_job_limits">{tmpl_var name='cron_job_limits_txt'}</button></div> |
| | | <div id="toggle-cron_job_limits" class="collapse"> |
| | | <div class="form-group"> |
| | | <label for="limit_cron" class="col-sm-3 control-label">{tmpl_var name='limit_cron_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_cron" id="limit_cron" value="{tmpl_var name='limit_cron'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_cron_type" class="col-sm-3 control-label">{tmpl_var name='limit_cron_type_txt'}</label> |
| | | <div class="col-sm-9"><select name="limit_cron_type" id="limit_cron_type" class="form-control"> |
| | | {tmpl_var name='limit_cron_type'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_cron_frequency">{tmpl_var name='limit_cron_frequency_txt'}</label> |
| | | <input name="limit_cron_frequency" id="limit_cron_frequency" value="{tmpl_var name='limit_cron_frequency'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="limit_cron_frequency" class="col-sm-3 control-label">{tmpl_var name='limit_cron_frequency_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_cron_frequency" id="limit_cron_frequency" value="{tmpl_var name='limit_cron_frequency'}" class="form-control" /></div></div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='dns_limits_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <label for="dns_servers">{tmpl_var name='dns_servers_txt'}</label> |
| | | <select data-placeholder="{tmpl_var name='dns_servers_placeholder'}" multiple name="dns_servers[]" id="dns_servers" class="selectInput chosen-select"> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-dns_limits" aria-expanded="false" aria-controls="toggle-dns_limits">{tmpl_var name='dns_limits_txt'}</button></div> |
| | | <div id="toggle-dns_limits" class="collapse"> |
| | | <div class="form-group"> |
| | | <label for="dns_servers" class="col-sm-3 control-label">{tmpl_var name='dns_servers_txt'}</label> |
| | | <div class="col-sm-9"><select data-placeholder="{tmpl_var name='dns_servers_placeholder'}" multiple name="dns_servers[]" id="dns_servers" class="form-control"> |
| | | {tmpl_var name='dns_servers'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_dns_zone">{tmpl_var name='limit_dns_zone_txt'}</label> |
| | | <input name="limit_dns_zone" id="limit_dns_zone" value="{tmpl_var name='limit_dns_zone'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="default_slave_dnsserver">{tmpl_var name='default_slave_dnsserver_txt'}</label> |
| | | <select name="default_slave_dnsserver" id="default_slave_dnsserver" class="selectInput"> |
| | | <div class="form-group"> |
| | | <label for="limit_dns_zone" class="col-sm-3 control-label">{tmpl_var name='limit_dns_zone_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_dns_zone" id="limit_dns_zone" value="{tmpl_var name='limit_dns_zone'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="default_slave_dnsserver" class="col-sm-3 control-label">{tmpl_var name='default_slave_dnsserver_txt'}</label> |
| | | <div class="col-sm-9"><select name="default_slave_dnsserver" id="default_slave_dnsserver" class="form-control"> |
| | | {tmpl_var name='default_slave_dnsserver'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_dns_slave_zone">{tmpl_var name='limit_dns_slave_zone_txt'}</label> |
| | | <input name="limit_dns_slave_zone" id="limit_dns_slave_zone" value="{tmpl_var name='limit_dns_slave_zone'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_dns_record">{tmpl_var name='limit_dns_record_txt'}</label> |
| | | <input name="limit_dns_record" id="limit_dns_record" value="{tmpl_var name='limit_dns_record'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="limit_dns_slave_zone" class="col-sm-3 control-label">{tmpl_var name='limit_dns_slave_zone_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_dns_slave_zone" id="limit_dns_slave_zone" value="{tmpl_var name='limit_dns_slave_zone'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_dns_record" class="col-sm-3 control-label">{tmpl_var name='limit_dns_record_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_dns_record" id="limit_dns_record" value="{tmpl_var name='limit_dns_record'}" class="form-control" /></div></div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='virtualization_limits_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_openvz_vm">{tmpl_var name='limit_openvz_vm_txt'}</label> |
| | | <input name="limit_openvz_vm" id="limit_openvz_vm" value="{tmpl_var name='limit_openvz_vm'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_openvz_vm_template_id">{tmpl_var name='limit_openvz_vm_template_id_txt'}</label> |
| | | <select name="limit_openvz_vm_template_id" id="limit_openvz_vm_template_id" class="selectInput"> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-virtualization_limits" aria-expanded="false" aria-controls="toggle-virtualization_limits">{tmpl_var name='virtualization_limits_txt'}</button></div> |
| | | <div id="toggle-virtualization_limits" class="collapse"> |
| | | <div class="form-group"> |
| | | <label for="limit_openvz_vm" class="col-sm-3 control-label">{tmpl_var name='limit_openvz_vm_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_openvz_vm" id="limit_openvz_vm" value="{tmpl_var name='limit_openvz_vm'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_openvz_vm_template_id" class="col-sm-3 control-label">{tmpl_var name='limit_openvz_vm_template_id_txt'}</label> |
| | | <div class="col-sm-9"><select name="limit_openvz_vm_template_id" id="limit_openvz_vm_template_id" class="form-control"> |
| | | {tmpl_var name='limit_openvz_vm_template_id'} |
| | | </select> |
| | | </select></div> |
| | | </div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='aps_limits_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_aps">{tmpl_var name='limit_aps_txt'}</label> |
| | | <input name="limit_aps" id="limit_aps" value="{tmpl_var name='limit_aps'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-aps_limits" aria-expanded="false" aria-controls="toggle-aps_limits">{tmpl_var name='aps_limits_txt'}</button></div> |
| | | <div id="toggle-aps_limits" class="collapse"> |
| | | <div class="form-group"> |
| | | <label for="limit_aps" class="col-sm-3 control-label">{tmpl_var name='limit_aps_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_aps" id="limit_aps" value="{tmpl_var name='limit_aps'}" class="form-control" /></div></div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | | |
| | | <div class="buttonHolder buttons"> |
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','client/client_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> |
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('client/client_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> |
| | | </div> |
| | | <div class="clear"><div class="right"> |
| | | <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="client/client_edit.php">{tmpl_var name='btn_save_txt'}</button> |
| | | <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="client/client_list.php">{tmpl_var name='btn_cancel_txt'}</button> |
| | | </div></div> |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | return ($('#template_master').val() == '0' ? true : false); |
| | | } |
| | | |
| | | $('.subsectiontoggle').on("click", function(){ |
| | | $(this).children().toggleClass('showing').end().next().slideToggle(); |
| | | }); |
| | | |
| | | $('#template_additional_list').find('li > a').click(function(e) { |
| | | e.preventDefault(); |
| | | delAdditionalTemplate($(this).parent().attr('rel')); |
| | | ISPConfig.delAdditionalTemplate($(this).parent().attr('rel')); |
| | | }); |
| | | |
| | | $('div.panel_client') |
interface/web/client/templates/client_message.htm
interface/web/client/templates/client_message_template_list.htm
interface/web/client/templates/client_template_edit_limits.htm
interface/web/client/templates/client_template_edit_template.htm
interface/web/client/templates/client_template_list.htm
interface/web/client/templates/clients_list.htm
interface/web/client/templates/domain_edit.htm
interface/web/client/templates/domain_list.htm
interface/web/client/templates/message_template.htm
interface/web/client/templates/message_template_list.htm
interface/web/client/templates/reseller_edit_address.htm
interface/web/client/templates/reseller_edit_limits.htm
interface/web/client/templates/resellers_list.htm
interface/web/dashboard/ajax_get_json.php
interface/web/dashboard/dashboard.php
interface/web/dashboard/dashlets/databasequota.php
interface/web/dashboard/dashlets/limits.php
interface/web/dashboard/dashlets/modules.php
interface/web/dashboard/dashlets/templates/databasequota.htm
interface/web/dashboard/dashlets/templates/limits.htm
interface/web/dashboard/dashlets/templates/mailquota.htm
interface/web/dashboard/dashlets/templates/modules.htm
interface/web/dashboard/dashlets/templates/quota.htm
interface/web/dashboard/lib/custom_menu.inc.php
interface/web/dashboard/lib/lang/ar_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/bg_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/br_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/cz_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/de_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/el_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/en_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/es_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/fi_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/fr_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/hr_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/hu_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/id_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/it_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/ja_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/nl_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/pl_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/pt_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/ro_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/ru_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/se_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/sk_dashlet_databasequota.lng
interface/web/dashboard/lib/lang/tr_dashlet_databasequota.lng
interface/web/dashboard/lib/module.conf.php
interface/web/dashboard/templates/custom_menu.htm
interface/web/dashboard/templates/dashboard.htm
interface/web/dns/ajax_get_json.php
interface/web/dns/dns_a_edit.php
interface/web/dns/dns_aaaa_edit.php
interface/web/dns/dns_alias_edit.php
interface/web/dns/dns_cname_edit.php
interface/web/dns/dns_dkim_edit.php
interface/web/dns/dns_dkim_get.php (deleted)
interface/web/dns/dns_dmarc_edit.php
interface/web/dns/dns_edit_base.php
interface/web/dns/dns_hinfo_edit.php
interface/web/dns/dns_import.php
interface/web/dns/dns_mx_edit.php
interface/web/dns/dns_ns_edit.php
interface/web/dns/dns_ptr_edit.php
interface/web/dns/dns_rp_edit.php
interface/web/dns/dns_rr_del.php
interface/web/dns/dns_slave_del.php
interface/web/dns/dns_slave_edit.php
interface/web/dns/dns_soa_del.php
interface/web/dns/dns_soa_edit.php
interface/web/dns/dns_spf_edit.php
interface/web/dns/dns_srv_edit.php
interface/web/dns/dns_txt_edit.php
interface/web/dns/dns_wizard.php
interface/web/dns/form/dns_a.tform.php
interface/web/dns/form/dns_aaaa.tform.php
interface/web/dns/form/dns_alias.tform.php
interface/web/dns/form/dns_cname.tform.php
interface/web/dns/form/dns_dkim.tform.php
interface/web/dns/form/dns_dmarc.tform.php
interface/web/dns/form/dns_hinfo.tform.php
interface/web/dns/form/dns_mx.tform.php
interface/web/dns/form/dns_ns.tform.php
interface/web/dns/form/dns_ptr.tform.php
interface/web/dns/form/dns_rp.tform.php
interface/web/dns/form/dns_soa.tform.php
interface/web/dns/form/dns_spf.tform.php
interface/web/dns/form/dns_srv.tform.php
interface/web/dns/form/dns_txt.tform.php
interface/web/dns/lib/lang/ar_dns_dmarc.lng
interface/web/dns/lib/lang/ar_dns_spf.lng
interface/web/dns/lib/lang/ar_dns_txt.lng
interface/web/dns/lib/lang/bg_dns_dmarc.lng
interface/web/dns/lib/lang/bg_dns_spf.lng
interface/web/dns/lib/lang/bg_dns_txt.lng
interface/web/dns/lib/lang/br_dns_dmarc.lng
interface/web/dns/lib/lang/br_dns_spf.lng
interface/web/dns/lib/lang/br_dns_txt.lng
interface/web/dns/lib/lang/cz_dns_dmarc.lng
interface/web/dns/lib/lang/cz_dns_spf.lng
interface/web/dns/lib/lang/cz_dns_txt.lng
interface/web/dns/lib/lang/de_dns_dkim.lng
interface/web/dns/lib/lang/de_dns_dmarc.lng
interface/web/dns/lib/lang/de_dns_spf.lng
interface/web/dns/lib/lang/de_dns_txt.lng
interface/web/dns/lib/lang/el_dns_dmarc.lng
interface/web/dns/lib/lang/el_dns_spf.lng
interface/web/dns/lib/lang/el_dns_txt.lng
interface/web/dns/lib/lang/en_dns_dmarc.lng
interface/web/dns/lib/lang/en_dns_spf.lng
interface/web/dns/lib/lang/en_dns_txt.lng
interface/web/dns/lib/lang/es_dns_dmarc.lng
interface/web/dns/lib/lang/es_dns_spf.lng
interface/web/dns/lib/lang/es_dns_txt.lng
interface/web/dns/lib/lang/fi_dns_dmarc.lng
interface/web/dns/lib/lang/fi_dns_spf.lng
interface/web/dns/lib/lang/fi_dns_txt.lng
interface/web/dns/lib/lang/fr_dns_dmarc.lng
interface/web/dns/lib/lang/fr_dns_spf.lng
interface/web/dns/lib/lang/fr_dns_txt.lng
interface/web/dns/lib/lang/fr_dns_wizard.lng
interface/web/dns/lib/lang/hr_dns_dmarc.lng
interface/web/dns/lib/lang/hr_dns_spf.lng
interface/web/dns/lib/lang/hr_dns_txt.lng
interface/web/dns/lib/lang/hu_dns_dmarc.lng
interface/web/dns/lib/lang/hu_dns_spf.lng
interface/web/dns/lib/lang/hu_dns_txt.lng
interface/web/dns/lib/lang/id_dns_dmarc.lng
interface/web/dns/lib/lang/id_dns_spf.lng
interface/web/dns/lib/lang/id_dns_txt.lng
interface/web/dns/lib/lang/it_dns_dmarc.lng
interface/web/dns/lib/lang/it_dns_spf.lng
interface/web/dns/lib/lang/it_dns_txt.lng
interface/web/dns/lib/lang/ja_dns_dmarc.lng
interface/web/dns/lib/lang/ja_dns_spf.lng
interface/web/dns/lib/lang/ja_dns_txt.lng
interface/web/dns/lib/lang/nl_dns_dmarc.lng
interface/web/dns/lib/lang/nl_dns_spf.lng
interface/web/dns/lib/lang/nl_dns_txt.lng
interface/web/dns/lib/lang/pl_dns_dmarc.lng
interface/web/dns/lib/lang/pl_dns_spf.lng
interface/web/dns/lib/lang/pl_dns_txt.lng
interface/web/dns/lib/lang/pt_dns_dmarc.lng
interface/web/dns/lib/lang/pt_dns_spf.lng
interface/web/dns/lib/lang/pt_dns_txt.lng
interface/web/dns/lib/lang/ro_dns_dmarc.lng
interface/web/dns/lib/lang/ro_dns_spf.lng
interface/web/dns/lib/lang/ro_dns_txt.lng
interface/web/dns/lib/lang/ru_dns_dmarc.lng
interface/web/dns/lib/lang/ru_dns_spf.lng
interface/web/dns/lib/lang/ru_dns_txt.lng
interface/web/dns/lib/lang/se_dns_dmarc.lng
interface/web/dns/lib/lang/se_dns_spf.lng
interface/web/dns/lib/lang/se_dns_txt.lng
interface/web/dns/lib/lang/sk_dns_dmarc.lng
interface/web/dns/lib/lang/sk_dns_spf.lng
interface/web/dns/lib/lang/sk_dns_txt.lng
interface/web/dns/lib/lang/tr_dns_dmarc.lng
interface/web/dns/lib/lang/tr_dns_spf.lng
interface/web/dns/lib/lang/tr_dns_txt.lng
interface/web/dns/lib/module.conf.php
interface/web/dns/list/dns_a.list.php
interface/web/dns/list/dns_slave.list.php
interface/web/dns/list/dns_soa.list.php
interface/web/dns/list/dns_template.list.php
interface/web/dns/templates/dns_a_edit.htm
interface/web/dns/templates/dns_a_list.htm
interface/web/dns/templates/dns_aaaa_edit.htm
interface/web/dns/templates/dns_alias_edit.htm
interface/web/dns/templates/dns_cname_edit.htm
interface/web/dns/templates/dns_dkim_edit.htm
interface/web/dns/templates/dns_dmarc_edit.htm
interface/web/dns/templates/dns_hinfo_edit.htm
interface/web/dns/templates/dns_import.htm
interface/web/dns/templates/dns_mx_edit.htm
interface/web/dns/templates/dns_ns_edit.htm
interface/web/dns/templates/dns_ptr_edit.htm
interface/web/dns/templates/dns_records_edit.htm
interface/web/dns/templates/dns_rp_edit.htm
interface/web/dns/templates/dns_slave_admin_list.htm
interface/web/dns/templates/dns_slave_edit.htm
interface/web/dns/templates/dns_slave_list.htm
interface/web/dns/templates/dns_soa_admin_list.htm
interface/web/dns/templates/dns_soa_edit.htm
interface/web/dns/templates/dns_soa_list.htm
interface/web/dns/templates/dns_spf_edit.htm
interface/web/dns/templates/dns_srv_edit.htm
interface/web/dns/templates/dns_template_edit.htm
interface/web/dns/templates/dns_template_list.htm
interface/web/dns/templates/dns_txt_edit.htm
interface/web/dns/templates/dns_wizard.htm
interface/web/help/faq_list.php
interface/web/help/form/support_message.tform.php
interface/web/help/support_message_edit.php
interface/web/help/templates/faq_edit.htm
interface/web/help/templates/faq_manage_questions_list.htm
interface/web/help/templates/faq_sections_edit.htm
interface/web/help/templates/help_faq_list.htm
interface/web/help/templates/help_faq_sections_list.htm
interface/web/help/templates/support_message_edit.htm
interface/web/help/templates/support_message_list.htm
interface/web/help/templates/support_message_view.htm
interface/web/index.php
interface/web/js/dns_dkim.js (deleted)
interface/web/js/jquery-2.1.1.min.js (deleted)
interface/web/js/jquery-ui-1.11.1.custom.min.js (deleted)
interface/web/js/jquery.combobox.js (deleted)
interface/web/js/jquery.ispconfigsearch.js
interface/web/js/jquery.min.js
interface/web/js/jquery.tipsy.js
interface/web/js/mail_domain_dkim.js
interface/web/js/scrigo.js.php
interface/web/js/select2/select2.min.js
interface/web/js/select2/select2_locale_ar.js
interface/web/js/select2/select2_locale_az.js
interface/web/js/select2/select2_locale_bg.js
interface/web/js/select2/select2_locale_ca.js
interface/web/js/select2/select2_locale_cs.js
interface/web/js/select2/select2_locale_da.js
interface/web/js/select2/select2_locale_de.js
interface/web/js/select2/select2_locale_el.js
interface/web/js/select2/select2_locale_es.js
interface/web/js/select2/select2_locale_et.js
interface/web/js/select2/select2_locale_eu.js
interface/web/js/select2/select2_locale_fa.js
interface/web/js/select2/select2_locale_fi.js
interface/web/js/select2/select2_locale_fr.js
interface/web/js/select2/select2_locale_gl.js
interface/web/js/select2/select2_locale_he.js
interface/web/js/select2/select2_locale_hr.js
interface/web/js/select2/select2_locale_hu.js
interface/web/js/select2/select2_locale_id.js
interface/web/js/select2/select2_locale_is.js
interface/web/js/select2/select2_locale_it.js
interface/web/js/select2/select2_locale_ja.js
interface/web/js/select2/select2_locale_ka.js
interface/web/js/select2/select2_locale_ko.js
interface/web/js/select2/select2_locale_lt.js
interface/web/js/select2/select2_locale_lv.js
interface/web/js/select2/select2_locale_mk.js
interface/web/js/select2/select2_locale_ms.js
interface/web/js/select2/select2_locale_nb.js
interface/web/js/select2/select2_locale_nl.js
interface/web/js/select2/select2_locale_pl.js
interface/web/js/select2/select2_locale_pt-BR.js
interface/web/js/select2/select2_locale_pt-PT.js
interface/web/js/select2/select2_locale_ro.js
interface/web/js/select2/select2_locale_rs.js
interface/web/js/select2/select2_locale_ru.js
interface/web/js/select2/select2_locale_sk.js
interface/web/js/select2/select2_locale_sv.js
interface/web/js/select2/select2_locale_th.js
interface/web/js/select2/select2_locale_tr.js
interface/web/js/select2/select2_locale_ug-CN.js
interface/web/js/select2/select2_locale_uk.js
interface/web/js/select2/select2_locale_vi.js
interface/web/js/select2/select2_locale_zh-CN.js
interface/web/js/select2/select2_locale_zh-TW.js
interface/web/js/uni-form/uni-form.jquery.js (deleted)
interface/web/js/xmpp_domain_muc.js
interface/web/js/xmpp_domain_registration.js
interface/web/login/index.php
interface/web/login/lib/lang/de.lng
interface/web/login/lib/lang/en.lng
interface/web/login/login_as.php
interface/web/login/logout.php
interface/web/login/password_reset.php
interface/web/login/templates/index.htm
interface/web/login/templates/password_reset.htm
interface/web/mail/backup_stats.php
interface/web/mail/form/mail_alias.tform.php
interface/web/mail/form/mail_forward.tform.php
interface/web/mail/form/mail_user.tform.php
interface/web/mail/form/spamfilter_users.tform.php
interface/web/mail/form/xmpp_domain.tform.php
interface/web/mail/form/xmpp_user.tform.php
interface/web/mail/lib/lang/ar_backup_stats_list.lng
interface/web/mail/lib/lang/ar_mail_alias.lng
interface/web/mail/lib/lang/ar_mail_forward.lng
interface/web/mail/lib/lang/ar_mail_user.lng
interface/web/mail/lib/lang/bg_backup_stats_list.lng
interface/web/mail/lib/lang/bg_mail_alias.lng
interface/web/mail/lib/lang/bg_mail_forward.lng
interface/web/mail/lib/lang/bg_mail_user.lng
interface/web/mail/lib/lang/br_backup_stats_list.lng
interface/web/mail/lib/lang/br_mail_alias.lng
interface/web/mail/lib/lang/br_mail_forward.lng
interface/web/mail/lib/lang/br_mail_user.lng
interface/web/mail/lib/lang/cz_backup_stats_list.lng
interface/web/mail/lib/lang/cz_mail_alias.lng
interface/web/mail/lib/lang/cz_mail_forward.lng
interface/web/mail/lib/lang/cz_mail_user.lng
interface/web/mail/lib/lang/de_backup_stats_list.lng
interface/web/mail/lib/lang/de_mail_alias.lng
interface/web/mail/lib/lang/de_mail_domain.lng
interface/web/mail/lib/lang/de_mail_forward.lng
interface/web/mail/lib/lang/de_mail_user.lng
interface/web/mail/lib/lang/el_backup_stats_list.lng
interface/web/mail/lib/lang/el_mail_alias.lng
interface/web/mail/lib/lang/el_mail_forward.lng
interface/web/mail/lib/lang/el_mail_user.lng
interface/web/mail/lib/lang/en_backup_stats_list.lng
interface/web/mail/lib/lang/en_mail_alias.lng
interface/web/mail/lib/lang/en_mail_forward.lng
interface/web/mail/lib/lang/en_mail_user.lng
interface/web/mail/lib/lang/en_xmpp_domain.lng
interface/web/mail/lib/lang/en_xmpp_domain_admin_list.lng
interface/web/mail/lib/lang/en_xmpp_domain_list.lng
interface/web/mail/lib/lang/en_xmpp_user.lng
interface/web/mail/lib/lang/en_xmpp_user_list.lng
interface/web/mail/lib/lang/es_backup_stats_list.lng
interface/web/mail/lib/lang/es_mail_alias.lng
interface/web/mail/lib/lang/es_mail_forward.lng
interface/web/mail/lib/lang/es_mail_get.lng
interface/web/mail/lib/lang/es_mail_user.lng
interface/web/mail/lib/lang/fi_backup_stats_list.lng
interface/web/mail/lib/lang/fi_mail_alias.lng
interface/web/mail/lib/lang/fi_mail_forward.lng
interface/web/mail/lib/lang/fi_mail_user.lng
interface/web/mail/lib/lang/fr_backup_stats_list.lng
interface/web/mail/lib/lang/fr_mail_alias.lng
interface/web/mail/lib/lang/fr_mail_forward.lng
interface/web/mail/lib/lang/fr_mail_user.lng
interface/web/mail/lib/lang/hr_backup_stats_list.lng
interface/web/mail/lib/lang/hr_mail_alias.lng
interface/web/mail/lib/lang/hr_mail_forward.lng
interface/web/mail/lib/lang/hr_mail_user.lng
interface/web/mail/lib/lang/hu_backup_stats_list.lng
interface/web/mail/lib/lang/hu_mail_alias.lng
interface/web/mail/lib/lang/hu_mail_forward.lng
interface/web/mail/lib/lang/hu_mail_user.lng
interface/web/mail/lib/lang/id_backup_stats_list.lng
interface/web/mail/lib/lang/id_mail_alias.lng
interface/web/mail/lib/lang/id_mail_forward.lng
interface/web/mail/lib/lang/id_mail_user.lng
interface/web/mail/lib/lang/it_backup_stats_list.lng
interface/web/mail/lib/lang/it_mail_alias.lng
interface/web/mail/lib/lang/it_mail_forward.lng
interface/web/mail/lib/lang/it_mail_user.lng
interface/web/mail/lib/lang/ja_backup_stats_list.lng
interface/web/mail/lib/lang/ja_mail_alias.lng
interface/web/mail/lib/lang/ja_mail_forward.lng
interface/web/mail/lib/lang/ja_mail_user.lng
interface/web/mail/lib/lang/nl_backup_stats_list.lng
interface/web/mail/lib/lang/nl_mail_alias.lng
interface/web/mail/lib/lang/nl_mail_forward.lng
interface/web/mail/lib/lang/nl_mail_user.lng
interface/web/mail/lib/lang/pl_backup_stats_list.lng
interface/web/mail/lib/lang/pl_mail_alias.lng
interface/web/mail/lib/lang/pl_mail_forward.lng
interface/web/mail/lib/lang/pl_mail_user.lng
interface/web/mail/lib/lang/pt_backup_stats_list.lng
interface/web/mail/lib/lang/pt_mail_alias.lng
interface/web/mail/lib/lang/pt_mail_forward.lng
interface/web/mail/lib/lang/pt_mail_user.lng
interface/web/mail/lib/lang/ro_backup_stats_list.lng
interface/web/mail/lib/lang/ro_mail_alias.lng
interface/web/mail/lib/lang/ro_mail_forward.lng
interface/web/mail/lib/lang/ro_mail_user.lng
interface/web/mail/lib/lang/ru_backup_stats_list.lng
interface/web/mail/lib/lang/ru_mail_alias.lng
interface/web/mail/lib/lang/ru_mail_forward.lng
interface/web/mail/lib/lang/ru_mail_user.lng
interface/web/mail/lib/lang/se_backup_stats_list.lng
interface/web/mail/lib/lang/se_mail_alias.lng
interface/web/mail/lib/lang/se_mail_forward.lng
interface/web/mail/lib/lang/se_mail_user.lng
interface/web/mail/lib/lang/sk_backup_stats_list.lng
interface/web/mail/lib/lang/sk_mail_alias.lng
interface/web/mail/lib/lang/sk_mail_forward.lng
interface/web/mail/lib/lang/sk_mail_user.lng
interface/web/mail/lib/lang/tr_backup_stats_list.lng
interface/web/mail/lib/lang/tr_mail_alias.lng
interface/web/mail/lib/lang/tr_mail_forward.lng
interface/web/mail/lib/lang/tr_mail_user.lng
interface/web/mail/lib/module.conf.php
interface/web/mail/lib/remote.conf.php
interface/web/mail/list/backup_stats.list.php
interface/web/mail/list/mail_alias.list.php
interface/web/mail/list/mail_aliasdomain.list.php
interface/web/mail/list/mail_blacklist.list.php
interface/web/mail/list/mail_content_filter.list.php
interface/web/mail/list/mail_domain.list.php
interface/web/mail/list/mail_domain_catchall.list.php
interface/web/mail/list/mail_forward.list.php
interface/web/mail/list/mail_get.list.php
interface/web/mail/list/mail_relay_recipient.list.php
interface/web/mail/list/mail_spamfilter.list.php
interface/web/mail/list/mail_transport.list.php
interface/web/mail/list/mail_user.list.php
interface/web/mail/list/mail_whitelist.list.php
interface/web/mail/list/spamfilter_blacklist.list.php
interface/web/mail/list/spamfilter_policy.list.php
interface/web/mail/list/spamfilter_users.list.php
interface/web/mail/list/spamfilter_whitelist.list.php
interface/web/mail/list/xmpp_domain.list.php
interface/web/mail/list/xmpp_user.list.php
interface/web/mail/mail_alias_edit.php
interface/web/mail/mail_aliasdomain_edit.php
interface/web/mail/mail_blacklist_edit.php
interface/web/mail/mail_content_filter_edit.php
interface/web/mail/mail_domain_catchall_edit.php
interface/web/mail/mail_domain_del.php
interface/web/mail/mail_domain_dkim_create.php
interface/web/mail/mail_domain_edit.php
interface/web/mail/mail_forward_edit.php
interface/web/mail/mail_get_edit.php
interface/web/mail/mail_mailinglist_edit.php
interface/web/mail/mail_spamfilter_edit.php
interface/web/mail/mail_transport_edit.php
interface/web/mail/mail_user_del.php
interface/web/mail/mail_user_edit.php
interface/web/mail/mail_user_filter_del.php
interface/web/mail/mail_user_filter_edit.php
interface/web/mail/mail_user_stats.php
interface/web/mail/mail_whitelist_edit.php
interface/web/mail/mailinglist.php
interface/web/mail/spamfilter_blacklist_edit.php
interface/web/mail/spamfilter_config_edit.php
interface/web/mail/spamfilter_policy_edit.php
interface/web/mail/spamfilter_users_edit.php
interface/web/mail/spamfilter_whitelist_edit.php
interface/web/mail/templates/backup_stats_list.htm
interface/web/mail/templates/mail_alias_edit.htm
interface/web/mail/templates/mail_alias_list.htm
interface/web/mail/templates/mail_aliasdomain_edit.htm
interface/web/mail/templates/mail_aliasdomain_list.htm
interface/web/mail/templates/mail_blacklist_edit.htm
interface/web/mail/templates/mail_blacklist_list.htm
interface/web/mail/templates/mail_content_filter_edit.htm
interface/web/mail/templates/mail_content_filter_list.htm
interface/web/mail/templates/mail_domain_admin_list.htm
interface/web/mail/templates/mail_domain_catchall_edit.htm
interface/web/mail/templates/mail_domain_catchall_list.htm
interface/web/mail/templates/mail_domain_edit.htm
interface/web/mail/templates/mail_domain_list.htm
interface/web/mail/templates/mail_forward_edit.htm
interface/web/mail/templates/mail_forward_list.htm
interface/web/mail/templates/mail_get_edit.htm
interface/web/mail/templates/mail_get_list.htm
interface/web/mail/templates/mail_mailinglist_edit.htm
interface/web/mail/templates/mail_mailinglist_list.htm
interface/web/mail/templates/mail_relay_recipient_edit.htm
interface/web/mail/templates/mail_relay_recipient_list.htm
interface/web/mail/templates/mail_transport_edit.htm
interface/web/mail/templates/mail_transport_list.htm
interface/web/mail/templates/mail_user_autoresponder_edit.htm
interface/web/mail/templates/mail_user_backup.htm
interface/web/mail/templates/mail_user_backup_list.htm
interface/web/mail/templates/mail_user_custom_rules_edit.htm
interface/web/mail/templates/mail_user_filter_edit.htm
interface/web/mail/templates/mail_user_filter_list.htm
interface/web/mail/templates/mail_user_list.htm
interface/web/mail/templates/mail_user_mailbox_edit.htm
interface/web/mail/templates/mail_user_mailfilter_edit.htm
interface/web/mail/templates/mail_user_stats_list.htm
interface/web/mail/templates/mail_whitelist_edit.htm
interface/web/mail/templates/mail_whitelist_list.htm
interface/web/mail/templates/spamfilter_blacklist_edit.htm
interface/web/mail/templates/spamfilter_blacklist_list.htm
interface/web/mail/templates/spamfilter_config_getmail_edit.htm
interface/web/mail/templates/spamfilter_config_list.htm
interface/web/mail/templates/spamfilter_config_mail_edit.htm
interface/web/mail/templates/spamfilter_config_server_edit.htm
interface/web/mail/templates/spamfilter_other_edit.htm
interface/web/mail/templates/spamfilter_policy_edit.htm
interface/web/mail/templates/spamfilter_policy_list.htm
interface/web/mail/templates/spamfilter_quarantine_edit.htm
interface/web/mail/templates/spamfilter_taglevel_edit.htm
interface/web/mail/templates/spamfilter_users_edit.htm
interface/web/mail/templates/spamfilter_users_list.htm
interface/web/mail/templates/spamfilter_whitelist_edit.htm
interface/web/mail/templates/spamfilter_whitelist_list.htm
interface/web/mail/templates/user_quota_stats_list.htm
interface/web/mail/templates/xmpp_domain_admin_list.htm
interface/web/mail/templates/xmpp_domain_edit.htm
interface/web/mail/templates/xmpp_domain_edit_modules.htm
interface/web/mail/templates/xmpp_domain_edit_muc.htm
interface/web/mail/templates/xmpp_domain_edit_ssl.htm
interface/web/mail/templates/xmpp_domain_list.htm
interface/web/mail/templates/xmpp_user_edit.htm
interface/web/mail/templates/xmpp_user_list.htm
interface/web/mail/user_quota_stats.php
interface/web/mail/webmailer.php
interface/web/mail/xmpp_domain_del.php
interface/web/mail/xmpp_domain_edit.php
interface/web/mail/xmpp_domain_list.php
interface/web/mail/xmpp_user_del.php
interface/web/mail/xmpp_user_edit.php
interface/web/mail/xmpp_user_list.php
interface/web/mailuser/index.php
interface/web/mailuser/mail_user_filter_edit.php
interface/web/mailuser/mail_user_spamfilter_edit.php
interface/web/mailuser/templates/index.htm
interface/web/mailuser/templates/mail_user_autoresponder_edit.htm
interface/web/mailuser/templates/mail_user_cc_edit.htm
interface/web/mailuser/templates/mail_user_filter_edit.htm
interface/web/mailuser/templates/mail_user_filter_list.htm
interface/web/mailuser/templates/mail_user_password_edit.htm
interface/web/mailuser/templates/mail_user_spamfilter_edit.htm
interface/web/monitor/lib/module.conf.php
interface/web/monitor/list/datalog.list.php
interface/web/monitor/list/log.list.php
interface/web/monitor/log_del.php
interface/web/monitor/show_log.php
interface/web/monitor/show_sys_state.php
interface/web/monitor/templates/datalog_list.htm
interface/web/monitor/templates/show_data.htm
interface/web/monitor/templates/show_log.htm
interface/web/monitor/templates/show_monit.htm
interface/web/monitor/templates/show_munin.htm
interface/web/monitor/templates/show_sys_state.htm
interface/web/monitor/templates/syslog_list.htm
interface/web/nav.php
interface/web/remote/monitor.php
interface/web/sites/ajax_get_ip.php
interface/web/sites/ajax_get_json.php
interface/web/sites/aps_do_operation.php
interface/web/sites/aps_install_package.php
interface/web/sites/aps_installedpackages_list.php
interface/web/sites/aps_packagedetails_show.php
interface/web/sites/backup_stats.php
interface/web/sites/cron_edit.php
interface/web/sites/database_edit.php
interface/web/sites/database_phpmyadmin.php
interface/web/sites/database_quota_stats.php
interface/web/sites/database_user_del.php
interface/web/sites/database_user_edit.php
interface/web/sites/form/web_childdomain.tform.php
interface/web/sites/form/web_vhost_domain.tform.php
interface/web/sites/ftp_user_edit.php
interface/web/sites/lib/lang/ar_aps_instances_list.lng
interface/web/sites/lib/lang/ar_backup_stats_list.lng
interface/web/sites/lib/lang/ar_database_quota_stats_list.lng
interface/web/sites/lib/lang/bg_aps_instances_list.lng
interface/web/sites/lib/lang/bg_backup_stats_list.lng
interface/web/sites/lib/lang/bg_database_quota_stats_list.lng
interface/web/sites/lib/lang/br_aps_instances_list.lng
interface/web/sites/lib/lang/br_backup_stats_list.lng
interface/web/sites/lib/lang/br_database_quota_stats_list.lng
interface/web/sites/lib/lang/cz_aps_instances_list.lng
interface/web/sites/lib/lang/cz_backup_stats_list.lng
interface/web/sites/lib/lang/cz_database_quota_stats_list.lng
interface/web/sites/lib/lang/de_aps_instances_list.lng
interface/web/sites/lib/lang/de_backup_stats_list.lng
interface/web/sites/lib/lang/de_database_quota_stats_list.lng
interface/web/sites/lib/lang/de_web_directive_snippets.lng
interface/web/sites/lib/lang/de_web_vhost_domain.lng
interface/web/sites/lib/lang/el_aps_instances_list.lng
interface/web/sites/lib/lang/el_backup_stats_list.lng
interface/web/sites/lib/lang/el_database_quota_stats_list.lng
interface/web/sites/lib/lang/en_aps_instances_list.lng
interface/web/sites/lib/lang/en_backup_stats_list.lng
interface/web/sites/lib/lang/en_database_quota_stats_list.lng
interface/web/sites/lib/lang/en_web_directive_snippets.lng
interface/web/sites/lib/lang/en_web_vhost_domain.lng
interface/web/sites/lib/lang/es_aps_instances_list.lng
interface/web/sites/lib/lang/es_backup_stats_list.lng
interface/web/sites/lib/lang/es_database_quota_stats_list.lng
interface/web/sites/lib/lang/fi_aps_instances_list.lng
interface/web/sites/lib/lang/fi_backup_stats_list.lng
interface/web/sites/lib/lang/fi_database_quota_stats_list.lng
interface/web/sites/lib/lang/fr_aps_instances_list.lng
interface/web/sites/lib/lang/fr_backup_stats_list.lng
interface/web/sites/lib/lang/fr_database_quota_stats_list.lng
interface/web/sites/lib/lang/hr_aps_instances_list.lng
interface/web/sites/lib/lang/hr_backup_stats_list.lng
interface/web/sites/lib/lang/hr_database_quota_stats_list.lng
interface/web/sites/lib/lang/hu_aps_instances_list.lng
interface/web/sites/lib/lang/hu_backup_stats_list.lng
interface/web/sites/lib/lang/hu_database_quota_stats_list.lng
interface/web/sites/lib/lang/id_aps_instances_list.lng
interface/web/sites/lib/lang/id_backup_stats_list.lng
interface/web/sites/lib/lang/id_database_quota_stats_list.lng
interface/web/sites/lib/lang/it_aps_instances_list.lng
interface/web/sites/lib/lang/it_backup_stats_list.lng
interface/web/sites/lib/lang/it_database_quota_stats_list.lng
interface/web/sites/lib/lang/ja_aps_instances_list.lng
interface/web/sites/lib/lang/ja_backup_stats_list.lng
interface/web/sites/lib/lang/ja_database_quota_stats_list.lng
interface/web/sites/lib/lang/nl_aps_instances_list.lng
interface/web/sites/lib/lang/nl_backup_stats_list.lng
interface/web/sites/lib/lang/nl_database_quota_stats_list.lng
interface/web/sites/lib/lang/pl_aps_instances_list.lng
interface/web/sites/lib/lang/pl_backup_stats_list.lng
interface/web/sites/lib/lang/pl_database_quota_stats_list.lng
interface/web/sites/lib/lang/pt_aps_instances_list.lng
interface/web/sites/lib/lang/pt_backup_stats_list.lng
interface/web/sites/lib/lang/pt_database_quota_stats_list.lng
interface/web/sites/lib/lang/ro_aps_instances_list.lng
interface/web/sites/lib/lang/ro_backup_stats_list.lng
interface/web/sites/lib/lang/ro_database_quota_stats_list.lng
interface/web/sites/lib/lang/ru_aps_instances_list.lng
interface/web/sites/lib/lang/ru_backup_stats_list.lng
interface/web/sites/lib/lang/ru_database_quota_stats_list.lng
interface/web/sites/lib/lang/se_aps_instances_list.lng
interface/web/sites/lib/lang/se_backup_stats_list.lng
interface/web/sites/lib/lang/se_database_quota_stats_list.lng
interface/web/sites/lib/lang/sk_aps_instances_list.lng
interface/web/sites/lib/lang/sk_backup_stats_list.lng
interface/web/sites/lib/lang/sk_database_quota_stats_list.lng
interface/web/sites/lib/lang/tr_aps_instances_list.lng
interface/web/sites/lib/lang/tr_backup_stats_list.lng
interface/web/sites/lib/lang/tr_database_quota_stats_list.lng
interface/web/sites/lib/module.conf.php
interface/web/sites/lib/remote.conf.php
interface/web/sites/list/backup_stats.list.php
interface/web/sites/list/cron.list.php
interface/web/sites/list/database.list.php
interface/web/sites/list/database_quota_stats.list.php
interface/web/sites/list/ftp_user.list.php
interface/web/sites/list/shell_user.list.php
interface/web/sites/list/web_childdomain.list.php
interface/web/sites/list/web_folder.list.php
interface/web/sites/list/web_folder_user.list.php
interface/web/sites/list/web_vhost_domain.list.php
interface/web/sites/list/webdav_user.list.php
interface/web/sites/shell_user_edit.php
interface/web/sites/templates/aps_install_package.htm
interface/web/sites/templates/aps_instances_list.htm
interface/web/sites/templates/aps_packagedetails_show.htm
interface/web/sites/templates/aps_packages_list.htm
interface/web/sites/templates/aps_update_packagelist.htm
interface/web/sites/templates/backup_stats_list.htm
interface/web/sites/templates/cron_edit.htm
interface/web/sites/templates/cron_list.htm
interface/web/sites/templates/database_admin_list.htm
interface/web/sites/templates/database_edit.htm
interface/web/sites/templates/database_list.htm
interface/web/sites/templates/database_quota_stats_list.htm
interface/web/sites/templates/database_user_admin_list.htm
interface/web/sites/templates/database_user_edit.htm
interface/web/sites/templates/database_user_list.htm
interface/web/sites/templates/ftp_user_advanced.htm
interface/web/sites/templates/ftp_user_advanced_client.htm
interface/web/sites/templates/ftp_user_edit.htm
interface/web/sites/templates/ftp_user_list.htm
interface/web/sites/templates/shell_user_advanced.htm
interface/web/sites/templates/shell_user_edit.htm
interface/web/sites/templates/shell_user_list.htm
interface/web/sites/templates/user_quota_stats_list.htm
interface/web/sites/templates/web_backup_list.htm
interface/web/sites/templates/web_childdomain_advanced.htm
interface/web/sites/templates/web_childdomain_edit.htm
interface/web/sites/templates/web_childdomain_list.htm
interface/web/sites/templates/web_directive_snippets.htm
interface/web/sites/templates/web_folder_edit.htm
interface/web/sites/templates/web_folder_list.htm
interface/web/sites/templates/web_folder_user_edit.htm
interface/web/sites/templates/web_folder_user_list.htm
interface/web/sites/templates/web_sites_stats_list.htm
interface/web/sites/templates/web_vhost_domain_admin_list.htm
interface/web/sites/templates/web_vhost_domain_advanced.htm
interface/web/sites/templates/web_vhost_domain_backup.htm
interface/web/sites/templates/web_vhost_domain_edit.htm
interface/web/sites/templates/web_vhost_domain_list.htm
interface/web/sites/templates/web_vhost_domain_redirect.htm
interface/web/sites/templates/web_vhost_domain_ssl.htm
interface/web/sites/templates/web_vhost_domain_stats.htm
interface/web/sites/templates/webdav_user_edit.htm
interface/web/sites/templates/webdav_user_list.htm
interface/web/sites/user_quota_stats.php
interface/web/sites/web_childdomain_edit.php
interface/web/sites/web_folder_del.php
interface/web/sites/web_folder_edit.php
interface/web/sites/web_folder_user_edit.php
interface/web/sites/web_sites_stats.php
interface/web/sites/web_vhost_domain_del.php
interface/web/sites/web_vhost_domain_edit.php
interface/web/sites/web_vhost_domain_list.php
interface/web/sites/webdav_user_edit.php
interface/web/themes/blue/css/styles.css (deleted)
interface/web/themes/blue/icons/x32_sprite.png (deleted)
interface/web/themes/blue/images/ajax-loader.gif (deleted)
interface/web/themes/blue/images/header_bg.png (deleted)
interface/web/themes/blue/images/lists_tfoot_bg.png (deleted)
interface/web/themes/blue/images/lists_thead_bg.png (deleted)
interface/web/themes/blue/ispconfig_version (deleted)
interface/web/themes/blue/templates/main.tpl.htm (deleted)
interface/web/themes/default/CHANGELOG (deleted)
interface/web/themes/default/LICENSE (deleted)
interface/web/themes/default/TODO (deleted)
interface/web/themes/default/assets/fonts/ispconfig.eot
interface/web/themes/default/assets/fonts/ispconfig.svg
interface/web/themes/default/assets/fonts/ispconfig.ttf
interface/web/themes/default/assets/fonts/ispconfig.woff
interface/web/themes/default/assets/images/flags_sprite.png
interface/web/themes/default/assets/images/logo.png
interface/web/themes/default/assets/images/logo@2x.png
interface/web/themes/default/assets/javascripts/bootstrap-datetimepicker.min.js
interface/web/themes/default/assets/javascripts/bootstrap.min.js
interface/web/themes/default/assets/javascripts/ispconfig.js
interface/web/themes/default/assets/javascripts/ispconfig.min.js
interface/web/themes/default/assets/javascripts/jquery-2.1.0.min.js
interface/web/themes/default/assets/javascripts/modernizr.custom.js
interface/web/themes/default/assets/javascripts/modernizr.custom.min.js
interface/web/themes/default/assets/javascripts/pushy.min.js
interface/web/themes/default/assets/javascripts/responsive.js
interface/web/themes/default/assets/javascripts/responsive.min.js
interface/web/themes/default/assets/stylesheets/bootstrap-datetimepicker.min.css
interface/web/themes/default/assets/stylesheets/bootstrap.min.css
interface/web/themes/default/assets/stylesheets/fonts.css
interface/web/themes/default/assets/stylesheets/fonts.min.css
interface/web/themes/default/assets/stylesheets/ispconfig.css
interface/web/themes/default/assets/stylesheets/ispconfig.min.css
interface/web/themes/default/assets/stylesheets/ispconfig.sass
interface/web/themes/default/assets/stylesheets/login.css
interface/web/themes/default/assets/stylesheets/pushy.css
interface/web/themes/default/assets/stylesheets/pushy.min.css
interface/web/themes/default/assets/stylesheets/responsive.css
interface/web/themes/default/assets/stylesheets/responsive.min.css
interface/web/themes/default/assets/stylesheets/responsive.sass
interface/web/themes/default/assets/stylesheets/select2-bootstrap.css
interface/web/themes/default/assets/stylesheets/select2-spinner.gif
interface/web/themes/default/assets/stylesheets/select2.css
interface/web/themes/default/assets/stylesheets/select2.png
interface/web/themes/default/assets/stylesheets/themes/dark/colors.sass
interface/web/themes/default/assets/stylesheets/themes/dark/mixins.sass
interface/web/themes/default/assets/stylesheets/themes/dark/theme.css
interface/web/themes/default/assets/stylesheets/themes/dark/theme.min.css
interface/web/themes/default/assets/stylesheets/themes/dark/theme.sass
interface/web/themes/default/assets/stylesheets/themes/default/colors.sass
interface/web/themes/default/assets/stylesheets/themes/default/mixins.sass
interface/web/themes/default/assets/stylesheets/themes/default/theme.css
interface/web/themes/default/assets/stylesheets/themes/default/theme.min.css
interface/web/themes/default/assets/stylesheets/themes/default/theme.sass
interface/web/themes/default/css/iehacks.css (deleted)
interface/web/themes/default/css/images/ui-bg_flat_0_aaaaaa_40x100.png (deleted)
interface/web/themes/default/css/images/ui-bg_flat_55_fbec88_40x100.png (deleted)
interface/web/themes/default/css/images/ui-bg_glass_75_d0e5f5_1x400.png (deleted)
interface/web/themes/default/css/images/ui-bg_glass_85_dfeffc_1x400.png (deleted)
interface/web/themes/default/css/images/ui-bg_glass_95_fef1ec_1x400.png (deleted)
interface/web/themes/default/css/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png (deleted)
interface/web/themes/default/css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png (deleted)
interface/web/themes/default/css/images/ui-bg_inset-hard_100_fcfdfd_1x100.png (deleted)
interface/web/themes/default/css/images/ui-icons_217bc0_256x240.png (deleted)
interface/web/themes/default/css/images/ui-icons_2e83ff_256x240.png (deleted)
interface/web/themes/default/css/images/ui-icons_469bdd_256x240.png (deleted)
interface/web/themes/default/css/images/ui-icons_6da8d5_256x240.png (deleted)
interface/web/themes/default/css/images/ui-icons_cd0a0a_256x240.png (deleted)
interface/web/themes/default/css/images/ui-icons_d8e7f3_256x240.png (deleted)
interface/web/themes/default/css/images/ui-icons_f9bd01_256x240.png (deleted)
interface/web/themes/default/css/jquery-ui-1.11.1.min.css (deleted)
interface/web/themes/default/css/jquery-ui-1.11.1.structure.min.css (deleted)
interface/web/themes/default/css/jquery-ui-1.11.1.theme.min.css (deleted)
interface/web/themes/default/css/print.css (deleted)
interface/web/themes/default/css/styles.css (deleted)
interface/web/themes/default/icons/button_sprite.png (deleted)
interface/web/themes/default/icons/device_sprite.png (deleted)
interface/web/themes/default/icons/x16/arrow.png (deleted)
interface/web/themes/default/icons/x16/arrow_180.png (deleted)
interface/web/themes/default/icons/x16/arrow_stop.png (deleted)
interface/web/themes/default/icons/x16/arrow_stop_180.png (deleted)
interface/web/themes/default/icons/x16/cross_circle.png (deleted)
interface/web/themes/default/icons/x16/tick_circle.png (deleted)
interface/web/themes/default/icons/x16_sprite.png (deleted)
interface/web/themes/default/icons/x32_sprite.png (deleted)
interface/web/themes/default/images/ajax-loader.gif (deleted)
interface/web/themes/default/images/buttonHolder_bg.gif (deleted)
interface/web/themes/default/images/chevron.png (deleted)
interface/web/themes/default/images/favicon.ico (deleted)
interface/web/themes/default/images/header_bg.png (deleted)
interface/web/themes/default/images/header_logo.png (deleted)
interface/web/themes/default/images/lists_tfoot_bg.png (deleted)
interface/web/themes/default/images/lists_thead_bg.png (deleted)
interface/web/themes/default/images/loading.gif (deleted)
interface/web/themes/default/images/meter_bg.gif (deleted)
interface/web/themes/default/images/screen_bg.png (deleted)
interface/web/themes/default/js/html5shiv.js (deleted)
interface/web/themes/default/templates/error.tpl.htm
interface/web/themes/default/templates/main.tpl.htm
interface/web/themes/default/templates/module.tpl.htm
interface/web/themes/default/templates/module_tree.tpl.htm
interface/web/themes/default/templates/sidenav.tpl.htm
interface/web/themes/default/templates/tabbed_form.tpl.htm
interface/web/themes/default/templates/topnav.tpl.htm
interface/web/themes/default_64_navimg/css/additional.css (deleted)
interface/web/themes/default_64_navimg/icons/x16/arrow.png (deleted)
interface/web/themes/default_64_navimg/icons/x16/arrow_180.png (deleted)
interface/web/themes/default_64_navimg/icons/x16/arrow_stop.png (deleted)
interface/web/themes/default_64_navimg/icons/x16/arrow_stop_180.png (deleted)
interface/web/themes/default_64_navimg/ispconfig_version (deleted)
interface/web/themes/default_64_navimg/templates/main.tpl.htm (deleted)
interface/web/themes/default_combobox/css/additional.css (deleted)
interface/web/themes/default_combobox/icons/x16/arrow.png (deleted)
interface/web/themes/default_combobox/icons/x16/arrow_180.png (deleted)
interface/web/themes/default_combobox/icons/x16/arrow_stop.png (deleted)
interface/web/themes/default_combobox/icons/x16/arrow_stop_180.png (deleted)
interface/web/themes/default_combobox/images/ui-image.png (deleted)
interface/web/themes/default_combobox/ispconfig_version (deleted)
interface/web/themes/default_combobox/templates/main.tpl.htm (deleted)
interface/web/themes/default_no_navimg/css/additional.css (deleted)
interface/web/themes/default_no_navimg/icons/x16/arrow.png (deleted)
interface/web/themes/default_no_navimg/icons/x16/arrow_180.png (deleted)
interface/web/themes/default_no_navimg/icons/x16/arrow_stop.png (deleted)
interface/web/themes/default_no_navimg/icons/x16/arrow_stop_180.png (deleted)
interface/web/themes/default_no_navimg/ispconfig_version (deleted)
interface/web/themes/default_no_navimg/templates/main.tpl.htm (deleted)
interface/web/tools/dns_import_tupa.php
interface/web/tools/form/interface_settings.tform.php
interface/web/tools/form/resync.tform.php
interface/web/tools/import_ispconfig.php
interface/web/tools/import_plesk.php (deleted)
interface/web/tools/import_vpopmail.php
interface/web/tools/lib/lang/ar_resync.lng
interface/web/tools/lib/lang/bg_resync.lng
interface/web/tools/lib/lang/br_resync.lng
interface/web/tools/lib/lang/cz_resync.lng
interface/web/tools/lib/lang/de_resync.lng
interface/web/tools/lib/lang/el_resync.lng
interface/web/tools/lib/lang/en_resync.lng
interface/web/tools/lib/lang/es_resync.lng
interface/web/tools/lib/lang/fi_resync.lng
interface/web/tools/lib/lang/fr_resync.lng
interface/web/tools/lib/lang/hr_resync.lng
interface/web/tools/lib/lang/hu_resync.lng
interface/web/tools/lib/lang/id_resync.lng
interface/web/tools/lib/lang/it_resync.lng
interface/web/tools/lib/lang/ja_resync.lng
interface/web/tools/lib/lang/nl_resync.lng
interface/web/tools/lib/lang/pl_resync.lng
interface/web/tools/lib/lang/pt_resync.lng
interface/web/tools/lib/lang/ro_resync.lng
interface/web/tools/lib/lang/ru_resync.lng
interface/web/tools/lib/lang/se_resync.lng
interface/web/tools/lib/lang/sk_resync.lng
interface/web/tools/lib/lang/tr_resync.lng
interface/web/tools/lib/menu.d/resync.menu.php
interface/web/tools/lib/module.conf.php
interface/web/tools/resync.php
interface/web/tools/resync_do.php (deleted)
interface/web/tools/resync_show.php (deleted)
interface/web/tools/templates/dns_import_tupa.htm
interface/web/tools/templates/import_ispconfig.htm
interface/web/tools/templates/import_plesk.htm
interface/web/tools/templates/import_vpopmail.htm
interface/web/tools/templates/index.htm
interface/web/tools/templates/interface_settings.htm
interface/web/tools/templates/resync.htm
interface/web/tools/templates/tpl_default.htm
interface/web/tools/templates/user_settings.htm
interface/web/tools/user_settings.php
interface/web/vm/ajax_get_ip.php
interface/web/vm/form/openvz_ip.tform.php
interface/web/vm/form/openvz_template.tform.php
interface/web/vm/form/openvz_vm.tform.php
interface/web/vm/lib/lang/ar_openvz_template.lng
interface/web/vm/lib/lang/ar_openvz_vm.lng
interface/web/vm/lib/lang/bg_openvz_template.lng
interface/web/vm/lib/lang/bg_openvz_vm.lng
interface/web/vm/lib/lang/br_openvz_template.lng
interface/web/vm/lib/lang/br_openvz_vm.lng
interface/web/vm/lib/lang/cz_openvz_template.lng
interface/web/vm/lib/lang/cz_openvz_vm.lng
interface/web/vm/lib/lang/de_openvz_template.lng
interface/web/vm/lib/lang/de_openvz_vm.lng
interface/web/vm/lib/lang/el_openvz_template.lng
interface/web/vm/lib/lang/el_openvz_vm.lng
interface/web/vm/lib/lang/en_openvz_template.lng
interface/web/vm/lib/lang/en_openvz_vm.lng
interface/web/vm/lib/lang/es_openvz_template.lng
interface/web/vm/lib/lang/es_openvz_vm.lng
interface/web/vm/lib/lang/fi_openvz_template.lng
interface/web/vm/lib/lang/fi_openvz_vm.lng
interface/web/vm/lib/lang/fr_openvz_template.lng
interface/web/vm/lib/lang/fr_openvz_vm.lng
interface/web/vm/lib/lang/hr_openvz_template.lng
interface/web/vm/lib/lang/hr_openvz_vm.lng
interface/web/vm/lib/lang/hu_openvz_template.lng
interface/web/vm/lib/lang/hu_openvz_vm.lng
interface/web/vm/lib/lang/id_openvz_template.lng
interface/web/vm/lib/lang/id_openvz_vm.lng
interface/web/vm/lib/lang/it_openvz_template.lng
interface/web/vm/lib/lang/it_openvz_vm.lng
interface/web/vm/lib/lang/ja_openvz_template.lng
interface/web/vm/lib/lang/ja_openvz_vm.lng
interface/web/vm/lib/lang/nl_openvz_template.lng
interface/web/vm/lib/lang/nl_openvz_vm.lng
interface/web/vm/lib/lang/pl_openvz_template.lng
interface/web/vm/lib/lang/pl_openvz_vm.lng
interface/web/vm/lib/lang/pt_openvz_template.lng
interface/web/vm/lib/lang/pt_openvz_vm.lng
interface/web/vm/lib/lang/ro_openvz_template.lng
interface/web/vm/lib/lang/ro_openvz_vm.lng
interface/web/vm/lib/lang/ru_openvz_template.lng
interface/web/vm/lib/lang/ru_openvz_vm.lng
interface/web/vm/lib/lang/se_openvz_template.lng
interface/web/vm/lib/lang/se_openvz_vm.lng
interface/web/vm/lib/lang/sk_openvz_template.lng
interface/web/vm/lib/lang/sk_openvz_vm.lng
interface/web/vm/lib/lang/tr_openvz_template.lng
interface/web/vm/lib/lang/tr_openvz_vm.lng
interface/web/vm/lib/module.conf.php
interface/web/vm/openvz_action.php
interface/web/vm/openvz_template_edit.php
interface/web/vm/openvz_vm_edit.php
interface/web/vm/templates/openvz.conf.tpl
interface/web/vm/templates/openvz_action.htm
interface/web/vm/templates/openvz_ip_edit.htm
interface/web/vm/templates/openvz_ip_list.htm
interface/web/vm/templates/openvz_ostemplate_edit.htm
interface/web/vm/templates/openvz_ostemplate_list.htm
interface/web/vm/templates/openvz_template_advanced_edit.htm
interface/web/vm/templates/openvz_template_edit.htm
interface/web/vm/templates/openvz_template_list.htm
interface/web/vm/templates/openvz_vm_advanced_edit.htm
interface/web/vm/templates/openvz_vm_edit.htm
interface/web/vm/templates/openvz_vm_list.htm
remoting_client/API-docs/mail_user_backup.html
remoting_client/API-docs/mail_user_backup_list.html
remoting_client/API-docs/navigation.html
remoting_client/API-docs/sites_aps_available_packages_list.html
remoting_client/API-docs/sites_aps_get_package_details.html
remoting_client/API-docs/sites_aps_get_package_file.html
remoting_client/API-docs/sites_aps_get_package_settings.html
remoting_client/API-docs/sites_aps_install_package.html
remoting_client/API-docs/sites_aps_instance_delete.html
remoting_client/API-docs/sites_aps_instance_get.html
remoting_client/API-docs/sites_aps_instance_settings_get.html
remoting_client/API-docs/sites_aps_update_package_list.html
remoting_client/examples/dns_a_add.php
remoting_client/examples/dns_aaaa_add.php
remoting_client/examples/dns_alias_add.php
remoting_client/examples/dns_cname_add.php
remoting_client/examples/dns_hinfo_add.php
remoting_client/examples/dns_mx_add.php
remoting_client/examples/dns_ns_add.php
remoting_client/examples/dns_ptr_add.php
remoting_client/examples/dns_rp_add.php
remoting_client/examples/dns_srv_add.php
remoting_client/examples/dns_txt_add.php
remoting_client/examples/dns_zone_add.php
server/conf/apache_apps.vhost.master
server/conf/bastille-firewall.cfg.master
server/conf/hhvm_monit.master
server/conf/hhvm_starter.master
server/conf/metronome_conf_global.master
server/conf/metronome_conf_host.master
server/conf/metronome_conf_main.master
server/conf/metronome_conf_ssl.master
server/conf/metronome_conf_status.master
server/conf/nginx_vhost.conf.master
server/conf/php-cgi-starter.master
server/conf/php-fcgi-starter.master
server/conf/php_fpm_pool.conf.master
server/conf/vhost.conf.master
server/cron.php
server/cron.sh
server/lib/app.inc.php
server/lib/classes/aps_installer.inc.php
server/lib/classes/cron.d/100-mailbox_stats.inc.php
server/lib/classes/cron.d/100-monitor_clamav_log.inc.php
server/lib/classes/cron.d/100-monitor_cpu.inc.php
server/lib/classes/cron.d/100-monitor_database_size.inc.php
server/lib/classes/cron.d/100-monitor_disk_usage.inc.php
server/lib/classes/cron.d/100-monitor_email_quota.inc.php
server/lib/classes/cron.d/100-monitor_fail2ban.inc.php
server/lib/classes/cron.d/100-monitor_hd_quota.inc.php
server/lib/classes/cron.d/100-monitor_iptables.inc.php
server/lib/classes/cron.d/100-monitor_ispconfig_log.inc.php
server/lib/classes/cron.d/100-monitor_ispconfig_version.inc.php
server/lib/classes/cron.d/100-monitor_mail_log.inc.php
server/lib/classes/cron.d/100-monitor_mail_queue.inc.php
server/lib/classes/cron.d/100-monitor_mem_usage.inc.php
server/lib/classes/cron.d/100-monitor_mongodb.inc.php
server/lib/classes/cron.d/100-monitor_openvz.inc.php
server/lib/classes/cron.d/100-monitor_os_version.inc.php
server/lib/classes/cron.d/100-monitor_raid.inc.php
server/lib/classes/cron.d/100-monitor_rkhunter.inc.php
server/lib/classes/cron.d/100-monitor_server.inc.php
server/lib/classes/cron.d/100-monitor_services.inc.php
server/lib/classes/cron.d/100-monitor_syslog.inc.php
server/lib/classes/cron.d/100-monitor_system_update.inc.php
server/lib/classes/cron.d/150-awstats.inc.php
server/lib/classes/cron.d/150-webalizer.inc.php
server/lib/classes/cron.d/200-logfiles.inc.php
server/lib/classes/cron.d/300-quota_notify.inc.php
server/lib/classes/cron.d/400-openvz.inc.php
server/lib/classes/cron.d/500-backup.inc.php
server/lib/classes/cron.d/500-backup_mail.inc.php
server/lib/classes/cron.d/600-cleanup.inc.php
server/lib/classes/cron.d/600-purge_mailboxes.inc.php
server/lib/classes/cronjob.inc.php
server/lib/classes/db_mysql.inc.php
server/lib/classes/functions.inc.php
server/lib/classes/getconf.inc.php
server/lib/classes/modules.inc.php
server/lib/classes/monitor_tools.inc.php
server/lib/classes/system.inc.php
server/mods-available/remoteaction_core_module.inc.php
server/mods-available/xmpp_module.inc.php
server/plugins-available/apache2_plugin.inc.php
server/plugins-available/backup_plugin.inc.php
server/plugins-available/bind_dlz_plugin.inc.php
server/plugins-available/bind_plugin.inc.php
server/plugins-available/cron_jailkit_plugin.inc.php
server/plugins-available/cron_plugin.inc.php
server/plugins-available/firewall_plugin.inc.php
server/plugins-available/ftpuser_base_plugin.inc.php
server/plugins-available/mail_plugin.inc.php
server/plugins-available/mail_plugin_dkim.inc.php
server/plugins-available/maildeliver_plugin.inc.php
server/plugins-available/mailman_plugin.inc.php
server/plugins-available/mongo_clientdb_plugin.inc.php
server/plugins-available/mysql_clientdb_plugin.inc.php
server/plugins-available/network_settings_plugin.inc.php
server/plugins-available/nginx_plugin.inc.php
server/plugins-available/nginx_reverseproxy_plugin.inc.php
server/plugins-available/openvz_plugin.inc.php
server/plugins-available/pma_symlink_plugin.inc.php
server/plugins-available/postfix_filter_plugin.inc.php
server/plugins-available/postfix_server_plugin.inc.php
server/plugins-available/powerdns_plugin.inc.php
server/plugins-available/shelluser_base_plugin.inc.php
server/plugins-available/shelluser_jailkit_plugin.inc.php
server/plugins-available/software_update_plugin.inc.php
server/plugins-available/webmail_symlink_plugin.inc.php
server/plugins-available/webserver_plugin.inc.php
server/plugins-available/xmpp_plugin.inc.php
server/scripts/ispconfig_patch
server/scripts/ispconfig_update.sh
server/scripts/update_from_dev.sh
server/scripts/update_from_tgz.sh
server/server.php
server/server.sh |