Several updaes and bugfixes.
11 files modified
2 files added
| | |
| | | $conf["hostname"] = "server1.example.com"; // Full hostname |
| | | $conf["ispconfig_install_dir"] = "/usr/local/ispconfig"; |
| | | $conf["ispconfig_config_dir"] = "/usr/local/ispconfig"; |
| | | $conf["server_id"] = 1; |
| | | |
| | | /* |
| | | Distribution specific settings |
| | |
| | | $conf["dist_apache_group"] = "www-data"; |
| | | $conf["dist_apache_init_script"] = "apache2"; |
| | | $conf["dist_apache_version"] = "2.2"; |
| | | $conf["dist_apache_vhost_conf_dir"] = "/etc/apache2/sites-available"; |
| | | $conf["dist_apache_vhost_conf_enabled_dir"] = "/etc/apache2/sites-enabled"; |
| | | |
| | | // Postfix |
| | | $conf["dist_postfix_config_dir"] = "/etc/postfix"; |
| | |
| | | // Amavisd |
| | | $conf["dist_amavis_config_dir"] = "/etc/amavis"; |
| | | |
| | | // Pureftpd |
| | | $conf["dist_pureftpd_config_dir"] = "/etc/pure-ftpd/db"; |
| | | |
| | | /* |
| | | MySQL Database settings |
| | | */ |
| | |
| | | swriteln('Configuring Getmail'); |
| | | $inst->configure_getmail(); |
| | | |
| | | // Configure Getmail |
| | | swriteln('Configuring Pureftpd'); |
| | | $inst->configure_pureftpd(); |
| | | |
| | | // Configure ISPConfig |
| | | swriteln('Installing ISPConfig'); |
| | | $inst->install_ispconfig(); |
| | |
| | | } |
| | | |
| | | |
| | | function configure_pureftpd() { |
| | | global $conf; |
| | | |
| | | // configure pam for SMTP authentication agains the ispconfig database |
| | | $configfile = 'mysql.conf'; |
| | | if(is_file($conf["dist_pureftpd_config_dir"].'/'.$configfile)) copy($conf["dist_pureftpd_config_dir"].'/'.$configfile,$conf["dist_pureftpd_config_dir"].'/'.$configfile.'~'); |
| | | if(is_file($conf["dist_pureftpd_config_dir"].'/'.$configfile.'~')) exec('chmod 400 '.$conf["dist_pureftpd_config_dir"].'/'.$configfile.'~'); |
| | | $content = rf("tpl/pureftpd_".$configfile.".master"); |
| | | $content = str_replace('{mysql_server_ispconfig_user}',$conf["mysql_server_ispconfig_user"],$content); |
| | | $content = str_replace('{mysql_server_ispconfig_password}',$conf["mysql_server_ispconfig_password"],$content); |
| | | $content = str_replace('{mysql_server_database}',$conf["mysql_server_database"],$content); |
| | | $content = str_replace('{mysql_server_ip}',$conf["mysql_server_ip"],$content); |
| | | $content = str_replace('{server_id}',$conf["server_id"],$content); |
| | | wf($conf["dist_pureftpd_config_dir"].'/'.$configfile,$content); |
| | | exec('chmod 600 '.$conf["dist_pureftpd_config_dir"].'/'.$configfile); |
| | | exec('chown root:root '.$conf["dist_pureftpd_config_dir"].'/'.$configfile); |
| | | |
| | | } |
| | | |
| | | |
| | | function install_ispconfig() { |
| | | global $conf; |
| | | |
| | |
| | | $content = str_replace('{mysql_server_ispconfig_password}',$conf["mysql_server_ispconfig_password"],$content); |
| | | $content = str_replace('{mysql_server_database}',$conf["mysql_server_database"],$content); |
| | | $content = str_replace('{mysql_server_host}',$conf["mysql_server_host"],$content); |
| | | $content = str_replace('{server_id}',$conf["server_id"],$content); |
| | | wf($conf["ispconfig_install_dir"].'/server/lib/'.$configfile,$content); |
| | | |
| | | |
| | |
| | | $command = "chmod +x ".$conf["ispconfig_install_dir"]."/server/scripts/*.sh"; |
| | | caselog($command." &> /dev/null", __FILE__, __LINE__,"EXECUTED: ".$command,"Failed to execute the command ".$command); |
| | | |
| | | // Copy the ISPConfig vhost for the controlpanel |
| | | copy('tpl/apache_ispconfig.vhost.master',$conf["dist_apache_vhost_conf_dir"].'/ispconfig.vhost'); |
| | | // and create the symlink |
| | | exec('ln -s '.$conf["dist_apache_vhost_conf_dir"].'/ispconfig.vhost '.$conf["dist_apache_vhost_conf_enabled_dir"].'/ispconfig.vhost'); |
| | | |
| | | } |
| | | |
| | | function install_crontab() { |
| | |
| | | -- http://www.phpmyadmin.net |
| | | -- |
| | | -- Host: localhost |
| | | -- Erstellungszeit: 30. Mai 2007 um 16:57 |
| | | -- Erstellungszeit: 26. Juni 2007 um 13:47 |
| | | -- Server Version: 5.0.24 |
| | | -- PHP-Version: 5.1.4 |
| | | -- |
| | |
| | | `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_webserver` int(11) NOT NULL, |
| | | `limit_web_ip` text NOT NULL, |
| | | `username` varchar(255) default NULL, |
| | | `password` varchar(255) default NULL, |
| | | `language` varchar(255) NOT NULL default 'en', |
| | |
| | | -- |
| | | -- Daten für Tabelle `client` |
| | | -- |
| | | |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- |
| | | -- Tabellenstruktur für Tabelle `ftp_user` |
| | | -- |
| | | |
| | | CREATE TABLE `ftp_user` ( |
| | | `ftp_user_id` bigint(20) NOT NULL auto_increment, |
| | | `sys_userid` int(11) NOT NULL default '0', |
| | | `sys_groupid` int(11) NOT NULL default '0', |
| | | `sys_perm_user` varchar(5) default NULL, |
| | | `sys_perm_group` varchar(5) default NULL, |
| | | `sys_perm_other` varchar(5) default NULL, |
| | | `server_id` int(11) NOT NULL default '0', |
| | | `parent_domain_id` int(11) NOT NULL default '0', |
| | | `username` varchar(255) default NULL, |
| | | `password` varchar(255) default NULL, |
| | | `quota_size` int(11) NOT NULL default '-1', |
| | | `active` varchar(255) NOT NULL default 'y', |
| | | `uid` int(11) NOT NULL default '0', |
| | | `gid` int(11) NOT NULL default '0', |
| | | `dir` varchar(255) default NULL, |
| | | `quota_files` int(11) NOT NULL default '-1', |
| | | `ul_ratio` int(11) NOT NULL default '-1', |
| | | `dl_ratio` int(11) NOT NULL default '-1', |
| | | `ul_bandwidth` int(11) NOT NULL default '-1', |
| | | `dl_bandwidth` int(11) NOT NULL default '-1', |
| | | PRIMARY KEY (`ftp_user_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; |
| | | |
| | | -- |
| | | -- Daten für Tabelle `ftp_user` |
| | | -- |
| | | |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- |
| | | -- Tabellenstruktur für Tabelle `mail_access` |
| | | -- |
| | | |
| | |
| | | `active` enum('n','y') NOT NULL default 'y', |
| | | PRIMARY KEY (`access_id`), |
| | | KEY `server_id` (`server_id`,`source`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
| | | |
| | | -- |
| | | -- Daten für Tabelle `mail_access` |
| | | -- |
| | | |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- |
| | |
| | | -- Daten für Tabelle `mail_domain` |
| | | -- |
| | | |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- |
| | |
| | | `active` enum('y','n') NOT NULL, |
| | | PRIMARY KEY (`forwarding_id`), |
| | | KEY `server_id` (`server_id`,`source`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
| | | |
| | | -- |
| | | -- Daten für Tabelle `mail_forwarding` |
| | | -- |
| | | |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | |
| | | -- Daten für Tabelle `mail_get` |
| | | -- |
| | | |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- |
| | |
| | | `origin_type` enum('MANUAL','AUTO') NOT NULL default 'AUTO', |
| | | `create_time` datetime NOT NULL default '0000-00-00 00:00:00', |
| | | PRIMARY KEY (`greylist_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; |
| | | |
| | | -- |
| | | -- Daten für Tabelle `mail_greylist` |
| | |
| | | `mm_user` varchar(50) NOT NULL default '', |
| | | `mm_group` varchar(50) NOT NULL default '', |
| | | PRIMARY KEY (`mailman_id`,`server_id`,`domain`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; |
| | | |
| | | -- |
| | | -- Daten für Tabelle `mail_mailman_domain` |
| | |
| | | -- |
| | | -- Daten für Tabelle `mail_transport` |
| | | -- |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- |
| | |
| | | `homedir` varchar(255) NOT NULL, |
| | | `autoresponder` enum('n','y') NOT NULL default 'n', |
| | | `autoresponder_text` tinytext NOT NULL, |
| | | `custom_mailfilter` text, |
| | | `postfix` enum('y','n') NOT NULL, |
| | | `access` enum('y','n') NOT NULL, |
| | | PRIMARY KEY (`mailuser_id`), |
| | |
| | | -- Daten für Tabelle `server` |
| | | -- |
| | | |
| | | 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`) VALUES (1, 1, 1, 'riud', 'riud', 'r', 'Server 1', 1, 1, 1, 1, 1, 1, '[global]\nwebserver=apache\nmailserver=postfix\ndnsserver=mydns\n\n[mail]\nmodule=postfix_mysql\nmaildir_path=/home/vmail/[domain]/[localpart]/\nhomedir_path=/home/vmail/\nmailuser_uid=5000\nmailuser_gid=5000\n\n[getmail]\ngetmail_config_dir=/etc/getmail\n', 0, 1); |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- |
| | | -- Tabellenstruktur für Tabelle `server_ip` |
| | | -- |
| | | |
| | | CREATE TABLE `server_ip` ( |
| | | `server_ip_id` bigint(20) NOT NULL auto_increment, |
| | | `sys_userid` int(11) NOT NULL default '0', |
| | | `sys_groupid` int(11) NOT NULL default '0', |
| | | `sys_perm_user` varchar(5) default NULL, |
| | | `sys_perm_group` varchar(5) default NULL, |
| | | `sys_perm_other` varchar(5) default NULL, |
| | | `server_id` int(10) unsigned NOT NULL default '0', |
| | | `ip_address` varchar(15) default NULL, |
| | | `virtualhost` char(1) NOT NULL default 'y', |
| | | PRIMARY KEY (`server_ip_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; |
| | | |
| | | -- |
| | | -- Daten für Tabelle `server_ip` |
| | | -- |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | |
| | | -- |
| | | -- Tabellenstruktur für Tabelle `sys_datalog` |
| | | -- |
| | |
| | | `last_datalog_id` bigint(20) NOT NULL default '0', |
| | | PRIMARY KEY (`id`), |
| | | KEY `last_datalog_id` (`last_datalog_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; |
| | | |
| | | -- |
| | | -- Daten für Tabelle `sys_dbsync` |
| | |
| | | INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (1, 'admin', 'Administrators group', 0); |
| | | INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES (2, 'user', 'Users Group', 0); |
| | | |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- |
| | |
| | | -- Daten für Tabelle `sys_user` |
| | | -- |
| | | |
| | | INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `username`, `passwort`, `modules`, `startmodule`, `app_theme`, `typ`, `active`, `language`, `groups`, `default_group`, `client_id`) VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin,client,mail', 'mail', 'default', 'admin', 1, 'en', '1,2', 1, 0); |
| | | INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `username`, `passwort`, `modules`, `startmodule`, `app_theme`, `typ`, `active`, `language`, `groups`, `default_group`, `client_id`) VALUES (1, 1, 0, 'riud', 'riud', '', 'admin', '21232f297a57a5a743894a0e4a801fc3', 'admin,client,mail,monitor,sites', 'mail', 'default', 'admin', 1, 'en', '1,2', 1, 0); |
| | | |
| | | -- -------------------------------------------------------- |
| | | |
| | | -- |
| | | -- Tabellenstruktur für Tabelle `web_domain` |
| | | -- |
| | | |
| | | CREATE TABLE `web_domain` ( |
| | | `domain_id` bigint(20) NOT NULL auto_increment, |
| | | `sys_userid` int(11) NOT NULL default '0', |
| | | `sys_groupid` int(11) NOT NULL default '0', |
| | | `sys_perm_user` varchar(5) default NULL, |
| | | `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, |
| | | `domain` varchar(255) default NULL, |
| | | `type` varchar(255) NOT NULL default 'y', |
| | | `parent_domain_id` int(11) NOT NULL default '0', |
| | | `vhost_type` varchar(255) default NULL, |
| | | `document_root` varchar(255) default NULL, |
| | | `system_user` varchar(255) default NULL, |
| | | `system_group` varchar(255) default NULL, |
| | | `hd_quota` int(11) NOT NULL default '0', |
| | | `traffic_quota` int(11) NOT NULL default '0', |
| | | `cgi` varchar(255) NOT NULL default 'y', |
| | | `ssi` varchar(255) NOT NULL default 'y', |
| | | `suexec` varchar(255) NOT NULL default 'y', |
| | | `php` varchar(255) NOT NULL default 'y', |
| | | `redirect_type` varchar(255) NOT NULL default 'y', |
| | | `redirect_path` varchar(255) default NULL, |
| | | `active` varchar(255) NOT NULL default 'y', |
| | | PRIMARY KEY (`domain_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ; |
| | | |
| | | -- |
| | | -- Daten für Tabelle `web_domain` |
| | | -- |
New file |
| | |
| | | |
| | | ###################################################### |
| | | # This virtual host contains the configuration |
| | | # for the ISPConfig controlpanel |
| | | ###################################################### |
| | | |
| | | Listen 8080 |
| | | NameVirtualHost *:8080 |
| | | |
| | | <VirtualHost _default_:8080> |
| | | ServerAdmin webmaster@localhost |
| | | DocumentRoot /usr/local/ispconfig/interface/web/ |
| | | |
| | | <IfModule mod_php5.c> |
| | | AddType application/x-httpd-php .php |
| | | </IfModule> |
| | | |
| | | <Directory /usr/local/ispconfig/interface/web/> |
| | | Options FollowSymLinks |
| | | AllowOverride None |
| | | </Directory> |
| | | |
| | | ErrorLog /var/log/apache2/error.log |
| | | CustomLog /var/log/apache2/access.log combined |
| | | ServerSignature Off |
| | | |
| | | </VirtualHost> |
| | |
| | | |
| | | $conf["app_title"] = "ISPConfig"; |
| | | $conf["app_version"] = "3.0.0"; |
| | | $conf["server_id"] = "1"; |
| | | $conf["server_id"] = "{server_id}"; |
| | | |
| | | |
| | | /* |
New file |
| | |
| | | ############################################## |
| | | # # |
| | | # Sample Pure-FTPd Mysql configuration file. # |
| | | # See README.MySQL for explanations. # |
| | | # # |
| | | ############################################## |
| | | |
| | | |
| | | # Optional : MySQL server name or IP. Don't define this for unix sockets. |
| | | |
| | | MYSQLServer {mysql_server_ip} |
| | | |
| | | |
| | | # Optional : MySQL port. Don't define this if a local unix socket is used. |
| | | |
| | | # MYSQLPort 3306 |
| | | |
| | | |
| | | # Optional : define the location of mysql.sock if the server runs on this host. |
| | | |
| | | # MYSQLSocket /var/run/mysqld/mysqld.sock |
| | | |
| | | |
| | | # Mandatory : user to bind the server as. |
| | | |
| | | MYSQLUser {mysql_server_ispconfig_user} |
| | | |
| | | |
| | | # Mandatory : user password. You must have a password. |
| | | |
| | | MYSQLPassword {mysql_server_ispconfig_password} |
| | | |
| | | |
| | | # Mandatory : database to open. |
| | | |
| | | MYSQLDatabase {mysql_server_database} |
| | | |
| | | |
| | | # Mandatory : how passwords are stored |
| | | # Valid values are : "cleartext", "crypt", "md5" and "password" |
| | | # ("password" = MySQL password() function) |
| | | # You can also use "any" to try "crypt", "md5" *and* "password" |
| | | |
| | | MYSQLCrypt crypt |
| | | |
| | | |
| | | # In the following directives, parts of the strings are replaced at |
| | | # run-time before performing queries : |
| | | # |
| | | # \L is replaced by the login of the user trying to authenticate. |
| | | # \I is replaced by the IP address the user connected to. |
| | | # \P is replaced by the port number the user connected to. |
| | | # \R is replaced by the IP address the user connected from. |
| | | # \D is replaced by the remote IP address, as a long decimal number. |
| | | # |
| | | # Very complex queries can be performed using these substitution strings, |
| | | # especially for virtual hosting. |
| | | |
| | | |
| | | # Query to execute in order to fetch the password |
| | | |
| | | MYSQLGetPW SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" |
| | | |
| | | |
| | | # Query to execute in order to fetch the system user name or uid |
| | | |
| | | MYSQLGetUID SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" |
| | | |
| | | |
| | | # Optional : default UID - if set this overrides MYSQLGetUID |
| | | |
| | | #MYSQLDefaultUID 1000 |
| | | |
| | | |
| | | # Query to execute in order to fetch the system user group or gid |
| | | |
| | | MYSQLGetGID SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" |
| | | |
| | | |
| | | # Optional : default GID - if set this overrides MYSQLGetGID |
| | | |
| | | #MYSQLDefaultGID 1000 |
| | | |
| | | |
| | | # Query to execute in order to fetch the home directory |
| | | |
| | | MYSQLGetDir SELECT dir FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" |
| | | |
| | | |
| | | # Optional : query to get the maximal number of files |
| | | # Pure-FTPd must have been compiled with virtual quotas support. |
| | | |
| | | MySQLGetQTAFS SELECT quota_files FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" |
| | | |
| | | |
| | | # Optional : query to get the maximal disk usage (virtual quotas) |
| | | # The number should be in Megabytes. |
| | | # Pure-FTPd must have been compiled with virtual quotas support. |
| | | |
| | | MySQLGetQTASZ SELECT quota_size FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" |
| | | |
| | | |
| | | # Optional : ratios. The server has to be compiled with ratio support. |
| | | |
| | | MySQLGetRatioUL SELECT ul_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" |
| | | MySQLGetRatioDL SELECT dl_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" |
| | | |
| | | |
| | | # Optional : bandwidth throttling. |
| | | # The server has to be compiled with throttling support. |
| | | # Values are in KB/s . |
| | | |
| | | MySQLGetBandwidthUL SELECT ul_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" |
| | | MySQLGetBandwidthDL SELECT dl_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" |
| | | |
| | | # Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS : |
| | | # 1) You know what you are doing. |
| | | # 2) Real and virtual users match. |
| | | |
| | | # MySQLForceTildeExpansion 1 |
| | | |
| | | |
| | | # If you upgraded your tables to transactionnal tables (Gemini, |
| | | # BerkeleyDB, Innobase...), you can enable SQL transactions to |
| | | # avoid races. Leave this commented if you are using the |
| | | # traditionnal MyIsam databases or old (< 3.23.x) MySQL versions. |
| | | |
| | | # MySQLTransactions On |
| | |
| | | $status = '<font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FF0000"><b>Offline</b></font>'; |
| | | } |
| | | $html_out .= '<tr> |
| | | <td width="70%" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">BIND-Server:</font></td> |
| | | <td width="70%" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DNS-Server:</font></td> |
| | | <td width="30%" bgcolor="#FFFFFF"><center>'.$status.'</center></td> |
| | | </tr>'; |
| | | |
| | |
| | | 'quota_files' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'quota_files_error_empty'), |
| | | ), |
| | | 'default' => '0', |
| | | 'value' => '', |
| | | 'width' => '7', |
| | |
| | | 'ul_ratio' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'ul_ratio_error_empty'), |
| | | ), |
| | | 'default' => '0', |
| | | 'value' => '', |
| | | 'width' => '7', |
| | |
| | | 'dl_ratio' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'qdl_ratio_error_empty'), |
| | | ), |
| | | 'default' => '0', |
| | | 'value' => '', |
| | | 'width' => '7', |
| | |
| | | 'ul_bandwidth' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'ul_bandwidth_error_empty'), |
| | | ), |
| | | 'default' => '0', |
| | | 'value' => '', |
| | | 'width' => '7', |
| | |
| | | 'dl_bandwidth' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'dl_bandwidth_error_empty'), |
| | | ), |
| | | 'default' => '0', |
| | | 'value' => '', |
| | | 'width' => '7', |
| | |
| | | class page_action extends tform_actions { |
| | | |
| | | |
| | | function onAfterInsert() { |
| | | global $app, $conf; |
| | | |
| | | $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($this->dataRecord["parent_domain_id"])); |
| | | $server_id = $web["server_id"]; |
| | | $dir = $web["document_root"]; |
| | | $uid = $web["system_user"]; |
| | | $gid = $web["system_group"]; |
| | | |
| | | $sql = "UPDATE ftp_user SET server_id = $server_id, dir = '$dir', uid = '$uid', gid = '$gid' WHERE ftp_user_id = ".$this->id; |
| | | $app->db->query($sql); |
| | | |
| | | } |
| | | |
| | | function onAfterUpdate() { |
| | | global $app, $conf; |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | $page = new page_action; |
| | |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='ul_bandwidth_txt'}:</td> |
| | | <td class="frmText11"><input name="ul_bandwidth" type="text" class="text" value="{tmpl_var name='ul_bandwidth'}" size="7" maxlength="7"></td> |
| | | <td class="frmText11"><input name="ul_bandwidth" type="text" class="text" value="{tmpl_var name='ul_bandwidth'}" size="7" maxlength="7"> KB/s</td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='dl_bandwidth_txt'}:</td> |
| | | <td class="frmText11"><input name="dl_bandwidth" type="text" class="text" value="{tmpl_var name='dl_bandwidth'}" size="7" maxlength="7"></td> |
| | | <td class="frmText11"><input name="dl_bandwidth" type="text" class="text" value="{tmpl_var name='dl_bandwidth'}" size="7" maxlength="7"> KB/s</td> |
| | | </tr> <tr> |
| | | <td class="frmText11"> </td> |
| | | <td class="frmText11"> </td> |
| | |
| | | <td><input name="btn_save" type="button" class="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','sites/ftp_user_edit.php');"><div class="buttonEnding"></div> |
| | | <input name="btn_cancel" type="button" class="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('sites/ftp_user_list.php');"><div class="buttonEnding"></div> |
| | | </td> |
| | | </tr>
|
| | | </table>
|
| | | </tr> |
| | | </table> |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='quota_size_txt'}:</td> |
| | | <td class="frmText11"><input name="quota_size" type="text" class="text" value="{tmpl_var name='quota_size'}" size="7" maxlength="7"></td> |
| | | <td class="frmText11"><input name="quota_size" type="text" class="text" value="{tmpl_var name='quota_size'}" size="7" maxlength="7"> MB</td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='active_txt'}:</td> |
| | |
| | | var $plugin_name = 'apache2_plugin'; |
| | | var $class_name = $this->plugin_name; |
| | | |
| | | |
| | | |
| | | /* |
| | | This function is called when the plugin is loaded |