Commit d2227787 authored by Marius Burkard's avatar Marius Burkard

- merged different fixes and updates from foreign branches

parent 0cc28615
......@@ -246,6 +246,8 @@ $conf['services']['xmpp'] = false;
if($install_mode == 'standard') {
$inst->dbmaster = $inst->db;
//* Create the MySQL database
$inst->configure_database();
......@@ -500,6 +502,9 @@ if($install_mode == 'standard') {
$inst->install_crontab();
} else swriteln('[ERROR] Cron not found');
swriteln('Detect IP addresses');
$inst->detect_ips();
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['postfix']['installed'] == true && $conf['postfix']['init_script'] != '') system($inst->getinitcommand($conf['postfix']['init_script'], 'restart'));
......@@ -696,6 +701,9 @@ if($install_mode == 'standard') {
swriteln('Configuring Pureftpd');
$inst->configure_pureftpd();
}
swriteln('Detect IP addresses');
$inst->detect_ips();
//** Configure DNS
if(strtolower($inst->simple_query('Configure DNS Server', array('y', 'n'), 'y','configure_dns')) == 'y') {
......@@ -866,6 +874,9 @@ if($install_mode == 'standard') {
if($conf['nginx']['php_fpm_init_script'] != '') system($inst->getinitcommand($conf['nginx']['php_fpm_init_script'], 'reload'));
if($conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'reload'));
}
swriteln('Detect IP addresses');
$inst->detect_ips();
......
......@@ -371,6 +371,84 @@ class installer_base {
}
public function detect_ips(){
global $conf;
exec("ip addr show | awk '/global/ { print $2 }' | cut -d '/' -f 1", $output, $retval);
if($retval == 0){
if(is_array($output) && !empty($output)){
foreach($output as $line){
$line = trim($line);
$ip_type = '';
if (filter_var($line, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
$ip_type = 'IPv4';
}
if (filter_var($line, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
$ip_type = 'IPv6';
}
if($ip_type == '') continue;
if($this->db->dbHost != $this->dbmaster->dbHost){
$this->dbmaster->query('INSERT INTO server_ip (
sys_userid, sys_groupid, sys_perm_user, sys_perm_group,
sys_perm_other, server_id, client_id, ip_type, ip_address,
virtualhost, virtualhost_port
) VALUES (
1,
1,
"riud",
"riud",
"",
' . $conf['server_id'] . ',
0,
"'.$ip_type.'",
"'.$line.'",
"y",
"80,443"
)');
$server_ip_id = $this->dbmaster->insertID();
$this->db->query('INSERT INTO server_ip (
server_php_id, sys_userid, sys_groupid, sys_perm_user, sys_perm_group,
sys_perm_other, server_id, client_id, ip_type, ip_address,
virtualhost, virtualhost_port
) VALUES (
'.$server_ip_id.',
1,
1,
"riud",
"riud",
"",
' . $conf['server_id'] . ',
0,
"'.$ip_type.'",
"'.$line.'",
"y",
"80,443"
)');
} else {
$this->db->query('INSERT INTO server_ip (
sys_userid, sys_groupid, sys_perm_user, sys_perm_group,
sys_perm_other, server_id, client_id, ip_type, ip_address,
virtualhost, virtualhost_port
) VALUES (
1,
1,
"riud",
"riud",
"",
' . $conf['server_id'] . ',
0,
"'.$ip_type.'",
"'.$line.'",
"y",
"80,443"
)');
}
}
}
}
}
public function grant_master_database_rights($verbose = false) {
global $conf;
......
......@@ -257,6 +257,9 @@ CREATE TABLE `client` (
`customer_no_counter` int(11) NOT NULL DEFAULT '0',
`added_date` date NOT NULL DEFAULT '0000-00-00',
`added_by` varchar(255) DEFAULT NULL,
`validation_status` enum('accept','review','reject') NOT NULL DEFAULT 'accept',
`risk_score` int(10) unsigned NOT NULL DEFAULT '0',
`activation_code` varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (`client_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
......@@ -455,6 +458,7 @@ CREATE TABLE IF NOT EXISTS `directive_snippets` (
`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',
`master_directive_snippets_id` int(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`directive_snippets_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
......@@ -1946,6 +1950,7 @@ CREATE TABLE `web_domain` (
`enable_pagespeed` ENUM('y','n') NOT NULL DEFAULT 'n',
`http_port` int(11) unsigned NOT NULL DEFAULT '80',
`https_port` int(11) unsigned NOT NULL DEFAULT '443',
`folder_directive_snippets` text NOT NULL,
PRIMARY KEY (`domain_id`),
UNIQUE KEY `serverdomain` ( `server_id` , `ip_address`, `domain` )
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
......
......@@ -18,6 +18,7 @@ admin_notify_events=1
backup_dir=/var/backup
backup_dir_is_mount=n
backup_mode=rootgz
backup_time=0:00
backup_delete=n
monit_url=
monit_user=
......@@ -46,7 +47,7 @@ relayhost_password=
mailbox_size_limit=0
message_size_limit=0
mailbox_quota_stats=y
realtime_blackhole_list=
realtime_blackhole_list=zen.spamhaus.org
overquota_notify_admin=y
overquota_notify_client=y
overquota_notify_freq=7
......@@ -78,7 +79,6 @@ apps_vhost_ip=_default_
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
......@@ -131,7 +131,7 @@ fastcgi_config_syntax=1
[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 /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_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 /usr/bin/which /usr/lib/x86_64-linux-gnu/libmemcached.so.11 /usr/lib/x86_64-linux-gnu/libmemcachedutil.so.2 /usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.2 /opt/php-5.6.8/bin/php /opt/php-5.6.8/include /opt/php-5.6.8/lib
jailkit_chroot_cron_programs=/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php
[vlogger]
......
This diff is collapsed.
......@@ -257,10 +257,23 @@ class listform {
$searchval = $year.'-'.$month.'-'.$day;
}
}
if($i['datatype'] == 'BOOLEAN' && $searchval != ''){
if (!function_exists('boolval')) {
$searchval = (bool) $searchval;
if($searchval === true){
$searchval = 'TRUE';
} else {
$searchval = 'FALSE';
}
} else {
$searchval = boolval($searchval)? 'TRUE' : 'FALSE';
}
}
// if($_REQUEST[$search_prefix.$field] != '') $sql_where .= " $field ".$i["op"]." '".$i["prefix"].$_REQUEST[$search_prefix.$field].$i["suffix"]."' and";
if(isset($searchval) && $searchval != ''){
$sql_where .= " ".($table != ''? $table.'.' : $this->listDef['table'].'.')."$field ".$i['op']." '".$app->db->quote($i['prefix'].$searchval.$i['suffix'])."' and";
$sql_where .= " ".($table != ''? $table.'.' : $this->listDef['table'].'.')."$field ".$i['op']." ".($i['datatype'] == 'BOOLEAN'? "" : "'").$app->db->quote($i['prefix'].$searchval.$i['suffix']).($i['datatype'] == 'BOOLEAN'? "" : "'")." and";
}
}
}
......@@ -384,7 +397,7 @@ class listform {
if(isset($vars['show_page_back']) && $vars['show_page_back'] == 1){
$content .= '<li><a href="#" data-load-content="'.$vars['list_file'].'?page=0'.$vars['page_params'].'" aria-label="First">
<span aria-hidden="true">&laquo;</span></a></li>';
$content .= '<li><a href="#" data-load-content='.$vars['list_file'].'?page='.$vars['last_page'].$vars['page_params'].'" aria-label="Previous">
$content .= '<li><a href="#" data-load-content="'.$vars['list_file'].'?page='.$vars['last_page'].$vars['page_params'].'" aria-label="Previous">
<span aria-hidden="true">&lsaquo;</span></a></li>';
}
$prev = -1;
......@@ -501,6 +514,14 @@ class listform {
case 'CURRENCY':
$record[$key] = $app->functions->currency_format($record[$key]);
break;
case 'BOOLEAN':
if (!function_exists('boolval')) {
$record[$key] = (bool) $record[$key];
} else {
$record[$key] = boolval($record[$key]);
}
break;
default:
$record[$key] = htmlentities(stripslashes($record[$key]), ENT_QUOTES, $conf["html_content_encoding"]);
......@@ -564,6 +585,14 @@ class listform {
case 'CURRENCY':
$record[$key] = str_replace(',', '.', $record[$key]);
break;
case 'BOOLEAN':
if (!function_exists('boolval')) {
$record[$key] = (bool) $record[$key];
} else {
$record[$key] = boolval($record[$key]);
}
break;
}
}
}
......
......@@ -526,22 +526,24 @@ class remoting_client extends remoting {
* @param int client id
* @param string new password
* @return bool true if success
* @author Julio Montoya <gugli100@gmail.com> BeezNest 2010
*
*/
public function client_change_password($session_id, $client_id, $new_password) {
global $app;
$app->uses('auth');
if(!$this->checkPerm($session_id, 'client_change_password')) {
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$client_id = $app->functions->intval($client_id);
$client = $app->db->queryOneRecord("SELECT client_id FROM client WHERE client_id = ?", $client_id);
if($client['client_id'] > 0) {
$sql = "UPDATE client SET password = md5(?) WHERE client_id = ?";
$new_password = $app->auth->crypt_password($new_password);
$sql = "UPDATE client SET password = ? WHERE client_id = ?";
$app->db->query($sql, $new_password, $client_id);
$sql = "UPDATE sys_user SET passwort = md5(?) WHERE client_id = ?";
$sql = "UPDATE sys_user SET passwort = ? WHERE client_id = ?";
$app->db->query($sql, $new_password, $client_id);
return true;
} else {
......@@ -681,6 +683,38 @@ class remoting_client extends remoting {
return $returnval;
}
public function client_activate($session_id, $params){
global $app;
/*
if (!$this->checkPerm($session_id, 'client_update')){
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
*/
if(!is_file(ISPC_WEB_PATH.'/robot/lib/robot_config.inc.php')){
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$client = $app->db->queryOneRecord("SELECT * FROM client WHERE customer_no = '".$app->db->quote($params['customer_no'])."' AND email = '".$app->db->quote($params['email'])."' AND activation_code = '".$app->db->quote($params['activation_code'])."' AND validation_status = 'review'");
//file_put_contents('/tmp/test.txt', "SELECT * FROM client WHERE customer_no = '".$app->db->quote($params['customer_no'])."' AND email = '".$app->db->quote($params['email'])."' AND activation_code = '".$app->db->quote($params['activation_code'])."' AND validation_status = 'review'");
if(is_array($client) && !empty($client)){
$client_id = intval($client['client_id']);
$app->functions->client_activate($client_id);
return true;
} else {
$client = $app->db->queryOneRecord("SELECT * FROM client WHERE email = '".$app->db->quote($params['email'])."' AND validation_status = 'review'");
if(is_array($client) && !empty($client)){
$app->functions->client_activation_failed($client);
}
return false;
}
}
}
......
......@@ -878,6 +878,9 @@ class tform_base {
case 'TRIM':
$returnval = trim($returnval);
break;
case 'NOWHITESPACE':
$returnval = preg_replace('/\s+/', '', $returnval);
break;
default:
$this->errorMessage .= "Unknown Filter: ".$filter['type'];
break;
......
......@@ -33,6 +33,7 @@ class validate_password {
private function _get_password_strength($password) {
$length = strlen($password);
$points = 0;
if ($length < 5) {
return 1;
......@@ -53,7 +54,7 @@ class validate_password {
$different += 1;
}
if (preg_match('/[`~!@#$%^&*()_+|\\=-\[\]}{\';:\/?.>,<" ]/', $password)) {
if (preg_match('/[`~!@#$%^&*()_+|\\=\-\[\]}{\';:\/?.>,<" ]/', $password)) {
$points += 1;
$different += 1;
}
......
......@@ -47,7 +47,56 @@ $app->auth->check_module_permissions('admin');
// Loading classes
$app->uses('tpl,tform,tform_actions');
// let tform_actions handle the page
$app->tform_actions->onLoad();
class page_action extends tform_actions {
function onShow() {
global $app, $conf;
if($this->id > 0){
$record = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ".intval($this->id));
if($record['master_directive_snippets_id'] > 0){
unset($app->tform->formDef["tabs"]['directive_snippets']['fields']['name'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['type'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['snippet'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['required_php_snippets']);
}
unset($record);
}
parent::onShow();
}
function onShowEnd() {
global $app, $conf;
$is_master = false;
if($this->id > 0){
if($this->dataRecord['master_directive_snippets_id'] > 0){
$is_master = true;
$app->tpl->setVar("name", $this->dataRecord['name']);
$app->tpl->setVar("type", $this->dataRecord['type']);
$app->tpl->setVar("snippet", $this->dataRecord['snippet']);
}
}
$app->tpl->setVar("is_master", $is_master);
parent::onShowEnd();
}
function onSubmit() {
global $app, $conf;
if($this->id > 0){
$record = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ".intval($this->id));
if($record['master_directive_snippets_id'] > 0){
unset($app->tform->formDef["tabs"]['directive_snippets']['fields']['name'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['type'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['snippet'], $app->tform->formDef["tabs"]['directive_snippets']['fields']['required_php_snippets']);
}
unset($record);
}
parent::onSubmit();
}
}
$page = new page_action;
$page->onLoad();
?>
......@@ -46,7 +46,48 @@ $app->auth->check_module_permissions('admin');
$app->uses('listform_actions');
$app->listform_actions->onLoad();
class list_action extends listform_actions {
public function prepareDataRow($rec)
{
global $app;
$rec = $app->listform->decode($rec);
//* Alternating datarow colors
$this->DataRowColor = ($this->DataRowColor == '#FFFFFF') ? '#EEEEEE' : '#FFFFFF';
$rec['bgcolor'] = $this->DataRowColor;
$rec['is_master'] = $rec['master_directive_snippets_id'];
//* substitute value for select fields
if(is_array($app->listform->listDef['item']) && count($app->listform->listDef['item']) > 0) {
foreach($app->listform->listDef['item'] as $field) {
$key = $field['field'];
if(isset($field['formtype']) && $field['formtype'] == 'SELECT') {
if(strtolower($rec[$key]) == 'y' or strtolower($rec[$key]) == 'n') {
// Set a additional image variable for bolean fields
$rec['_'.$key.'_'] = (strtolower($rec[$key]) == 'y')?'x16/tick_circle.png':'x16/cross_circle.png';
}
//* substitute value for select field
$rec[$key] = @$field['value'][$rec[$key]];
}
}
}
//* The variable "id" contains always the index variable
$rec['id'] = $rec[$this->idx_key];
return $rec;
}
}
$list = new list_action;
$list->SQLOrderBy = 'ORDER BY directive_snippets.name';
$list->onLoad();
//$app->listform_actions->SQLExtWhere = 'master_directive_snippets_id = 0';
/*
$app->listform_actions->SQLOrderBy = 'ORDER BY directive_snippets.name';
$app->listform_actions->onLoad();
*/
?>
......@@ -110,7 +110,7 @@ $form["tabs"]['directive_snippets'] = array (
'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",
'querystring' => "SELECT directive_snippets_id,name FROM directive_snippets WHERE type = 'php' AND active = 'y' AND master_directive_snippets_id = 0 ORDER BY name",
'keyfield' => 'directive_snippets_id',
'valuefield' => 'name'
),
......
......@@ -191,6 +191,110 @@ $form["tabs"]['server'] = array(
'width' => '40',
'maxlength' => '255'
),
'backup_time' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '0:00',
'value' => array( '0:00' => '0:00h',
'0:15' => '0:15h',
'0:30' => '0:30h',
'0:45' => '0:45h',
'1:00' => '1:00h',
'1:15' => '1:15h',
'1:30' => '1:30h',
'1:45' => '1:45h',
'2:00' => '2:00h',
'2:15' => '2:15h',
'2:30' => '2:30h',
'2:45' => '2:45h',
'3:00' => '3:00h',
'3:15' => '3:15h',
'3:30' => '3:30h',
'3:45' => '3:45h',
'4:00' => '4:00h',
'4:15' => '4:15h',
'4:30' => '4:30h',
'4:45' => '4:45h',
'5:00' => '5:00h',
'5:15' => '5:15h',
'5:30' => '5:30h',
'5:45' => '5:45h',
'6:00' => '6:00h',
'6:15' => '6:15h',
'6:30' => '6:30h',
'6:45' => '6:45h',
'7:00' => '7:00h',
'7:15' => '7:15h',
'7:30' => '7:30h',
'7:45' => '7:45h',
'8:00' => '8:00h',
'8:15' => '8:15h',
'8:30' => '8:30h',
'8:45' => '8:45h',
'9:00' => '9:00h',
'9:15' => '9:15h',
'9:30' => '9:30h',
'9:45' => '9:45h',
'10:00' => '10:00h',
'10:15' => '10:15h',
'10:30' => '10:30h',
'10:45' => '10:45h',
'11:00' => '11:00h',
'11:15' => '11:15h',
'11:30' => '11:30h',
'11:45' => '11:45h',
'12:00' => '12:00h',
'12:15' => '12:15h',
'12:30' => '12:30h',
'12:45' => '12:45h',
'13:00' => '13:00h',
'13:15' => '13:15h',
'13:30' => '13:30h',
'13:45' => '13:45h',
'14:00' => '14:00h',
'14:15' => '14:15h',
'14:30' => '14:30h',
'14:45' => '14:45h',
'15:00' => '15:00h',
'15:15' => '15:15h',
'15:30' => '15:30h',
'15:45' => '15:45h',
'16:00' => '16:00h',
'16:15' => '16:15h',
'16:30' => '16:30h',
'16:45' => '16:45h',
'17:00' => '17:00h',
'17:15' => '17:15h',
'17:30' => '17:30h',
'17:45' => '17:45h',
'18:00' => '18:00h',
'18:15' => '18:15h',
'18:30' => '18:30h',
'18:45' => '18:45h',
'19:00' => '19:00h',
'19:15' => '19:15h',
'19:30' => '19:30h',
'19:45' => '19:45h',
'20:00' => '20:00h',
'20:15' => '20:15h',
'20:30' => '20:30h',
'20:45' => '20:45h',
'21:00' => '21:00h',
'21:15' => '21:15h',
'21:30' => '21:30h',
'21:45' => '21:45h',
'22:00' => '22:00h',
'22:15' => '22:15h',
'22:30' => '22:30h',
'22:45' => '22:45h',
'23:00' => '23:00h',
'23:15' => '23:15h',
'23:30' => '23:30h',
'23:45' => '23:45h',
),
'width' => '40',
'maxlength' => '255'
),
'backup_delete' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
......
......@@ -83,5 +83,14 @@ $liste["item"][] = array( 'field' => "customer_viewable",
'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>"));
$liste["item"][] = array( 'field' => "master_directive_snippets_id",
'datatype' => "BOOLEAN",
'formtype' => "SELECT",
'op' => "IS",
'prefix' => "",
'suffix' => "",
'width' => "",
'value' => array(0 => $app->lng('select_directive_snippet_txt'), 1 => $app->lng('select_master_directive_snippet_txt')));
?>
......@@ -7,23 +7,27 @@
<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>
<tmpl_if name='is_master'><div class="col-sm-9 col-text">{tmpl_var name='name'}</div></tmpl_else><div class="col-sm-9"><input type="text" name="name" id="name" value="{tmpl_var name='name'}" class="form-control" /></div></tmpl_if>
</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_if name='is_master'><div class="col-sm-9 col-text">{tmpl_var name='type'}</div></tmpl_else><div class="col-sm-9"><select name="type" id="type" class="form-control">
{tmpl_var name='type'}
</select></div>
</select></div></tmpl_if>
</div>
<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> &nbsp; {tmpl_var name='variables_txt'}: </span><a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT_CLIENT}</a><span class="nginx">, </span><a href="javascript:void(0);" class="addPlaceholder nginx">{FASTCGIPASS}</a>
<tmpl_if name='is_master'><div class="col-sm-9 col-text"><pre>{tmpl_var name='snippet'}</pre></div></tmpl_else><div class="col-sm-9"><textarea class="form-control" name="snippet" id="snippet" rows='10' cols='50'>{tmpl_var name='snippet'}</textarea></div>
<div class="col-sm-3 col-text nginx"></div><div class="col-sm-9 col-text nginx"> &nbsp;{tmpl_var name='variables_txt'}: <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{FASTCGIPASS}</a>, <a href="javascript:void(0);" class="addPlaceholder">{PHPFALLBACKFASTCGIPASS}</a></div></tmpl_if>
</div>
<tmpl_if name='is_master'></tmpl_else>
<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>
</tmpl_if>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='customer_viewable_txt'}</label>
<div class="col-sm-9">
......
......@@ -17,6 +17,7 @@
<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 data-column="master_directive_snippets_id"><tmpl_var name="master_directive_snippets_id_txt"></th>
<th class="small-col text-right">{tmpl_var name='search_limit'}</th>
</tr>
<tr>
......@@ -24,6 +25,7 @@
<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><select class="form-control" name="search_master_directive_snippets_id">{tmpl_var name='search_master_directive_snippets_id'}</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>
......@@ -36,21 +38,22 @@
<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><a href="#" data-load-content="admin/directive_snippets_edit.php?id={tmpl_var name='id'}">{tmpl_var name="master_directive_snippets_id"}</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>
<tmpl_if name='is_master'></tmpl_else><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></tmpl_if>
</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="5">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
<td colspan="6">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
</tr>
</tmpl_unless>
</tbody>
<tfoot>
<tr>
<td colspan="5"><tmpl_var name="paging"></td>
<td colspan="6"><tmpl_var name="paging"></td>
</tr>
</tfoot>
</table>
......
......@@ -62,6 +62,12 @@
<div class="col-sm-9"><select name="backup_mode" id="backup_mode" class="form-control">
{tmpl_var name='backup_mode'}
</select></div>
</div>
<div class="form-group">
<label for="backup_time" class="col-sm-3 control-label">{tmpl_var name='backup_time_txt'}</label>
<div class="col-sm-3"><select name="backup_time" id="backup_time" class="form-control">
{tmpl_var name='backup_time'}
</select></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='backup_delete_txt'}</label>
......
......@@ -162,8 +162,8 @@ class page_action extends tform_actions {
}
}
$activation_letter_filename = ISPC_ROOT_PATH.'/pdf/activation_letters/c'.$client_id.'-'.$this->dataRecord['activation_code'].'.pdf';