manually merged re-design changes to 80% of the files

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2011-02-08 12:53:24 +01:00
parent 7b6b145229
commit 43770d37e1
22 changed files with 572 additions and 231 deletions

View File

@@ -32,6 +32,17 @@ return array(
'option_options_method' => 'getLanguages',
'save_method' => 'storeSettingField',
),
'panel_default_theme' => array(
'label' => $lng['serversettings']['default_theme'],
'settinggroup' => 'panel',
'varname' => 'default_theme',
'type' => 'option',
'default' => 'Froxlor',
'option_mode' => 'one',
'option_options' => array('Classic' => 'Classic', 'Froxlor' => 'Froxlor'),
/* 'option_options_method' => 'getThemes', // iterate through templates/ and dynamically display all folders found */
'save_method' => 'storeSettingField',
),
'panel_natsorting' => array(
'label' => $lng['serversettings']['natsorting'],
'settinggroup' => 'panel',
@@ -151,14 +162,6 @@ return array(
'default' => false,
'save_method' => 'storeSettingField',
),
'admin_froxlor_graphic' => array(
'label' => $lng['admin']['froxlor_graphic'],
'settinggroup' => 'admin',
'varname' => 'froxlor_graphic',
'type' => 'string',
'default' => '',
'save_method' => 'storeSettingField',
),
'panel_allow_domain_change_admin' => array(
'label' => $lng['serversettings']['panel_allow_domain_change_admin'],
'settinggroup' => 'panel',

View File

@@ -14,7 +14,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
* @version $Id: admin_admins.php 101 2010-12-08 07:03:42Z d00p $
*/
define('AREA', 'admin');
@@ -47,6 +47,7 @@ if($page == 'admins'
'diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
'traffic' => $lng['customer']['traffic'],
'traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
/*
'mysqls' => $lng['customer']['mysqls'],
'mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
'ftps' => $lng['customer']['ftps'],
@@ -66,6 +67,7 @@ if($page == 'admins'
'email_autoresponder' => $lng['customer']['autoresponder'],
'email_autoresponder_used' => $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')',
'deactivated' => $lng['admin']['deactivated']
*/
);
$paging = new paging($userinfo, $db, TABLE_PANEL_ADMINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$admins = '';
@@ -86,6 +88,19 @@ if($page == 'admins'
$row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
$row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
/**
* percent-values for progressbar
*/
if($row['diskspace'] > 0) {
$percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
$doublepercent = round($percent*2, 2);
} else {
$percent = 0;
$doublepercent = 0;
}
/* */
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps subdomains tickets');
$row = htmlentities_array($row);
eval("\$admins.=\"" . getTemplate("admins/admins_admin") . "\";");
@@ -360,8 +375,38 @@ if($page == 'admins'
$change_serversettings = '0';
}
$result = $db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` (`loginname`, `password`, `name`, `email`, `def_language`, `change_serversettings`, `customers`, `customers_see_all`, `domains`, `domains_see_all`, `caneditphpsettings`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `ip`, `can_manage_aps_packages`, `aps_packages`, `email_autoresponder`)
VALUES ('" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($email) . "','" . $db->escape($def_language) . "', '" . $db->escape($change_serversettings) . "', '" . $db->escape($customers) . "', '" . $db->escape($customers_see_all) . "', '" . $db->escape($domains) . "', '" . $db->escape($domains_see_all) . "', '" . (int)$caneditphpsettings . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '" . (int)$ipaddress . "', " . (int)$can_manage_aps_packages . ", " . (int)$number_of_aps_packages . ", " . $db->escape($email_autoresponder) . ")");
$_theme = $settings['panel']['default_theme'];
$result = $db->query("INSERT INTO
`" . TABLE_PANEL_ADMINS . "`
SET
`loginname` = '" . $db->escape($loginname) . "',
`password` = '" . md5($password) . "',
`name` = '" . $db->escape($name) . "',
`email` = '" . $db->escape($email) . "',
`def_language` = '" . $db->escape($def_language) . "',
`change_serversettings` = '" . $db->escape($change_serversettings) . "',
`customers` = '" . $db->escape($customers) . "',
`customers_see_all` = '" . $db->escape($customers_see_all) . "',
`domains` = '" . $db->escape($domains) . "',
`domains_see_all` = '" . $db->escape($domains_see_all) . "',
`caneditphpsettings` = '" . (int)$caneditphpsettings . "',
`diskspace` = '" . $db->escape($diskspace) . "',
`traffic` = '" . $db->escape($traffic) . "',
`subdomains` = '" . $db->escape($subdomains) . "',
`emails` = '" . $db->escape($emails) . "',
`email_accounts` = '" . $db->escape($email_accounts) . "',
`email_forwarders` = '" . $db->escape($email_forwarders) . "',
`email_quota` = '" . $db->escape($email_quota) . "',
`ftps` = '" . $db->escape($ftps) . "',
`tickets` = '" . $db->escape($tickets) . "',
`mysqls` = '" . $db->escape($mysqls) . "',
`ip` = '" . (int)$ipaddress . "',
`can_manage_aps_packages` = '" . (int)$can_manage_aps_packages . "',
`aps_packages` = '" . (int)$number_of_aps_packages . "',
`email_autoresponder` = '" . $db->escape($email_autoresponder) . "',
`theme` = '".$db->escape($_theme)."';
");
$adminid = $db->insert_id();
$log->logAction(ADM_ACTION, LOG_INFO, "added admin '" . $loginname . "'");
redirectTo($filename, Array('page' => $page, 's' => $s));
@@ -414,6 +459,12 @@ if($page == 'admins'
$can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', '0');
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
$admin_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_add.php';
$admin_add_form = htmlform::genHTMLForm($admin_add_data);
$title = $admin_add_data['admin_add']['title'];
$image = $admin_add_data['admin_add']['image'];
eval("echo \"" . getTemplate("admins/admins_add") . "\";");
}
}
@@ -786,6 +837,13 @@ if($page == 'admins'
$can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', $result['can_manage_aps_packages']);
$result = htmlentities_array($result);
$admin_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_edit.php';
$admin_edit_form = htmlform::genHTMLForm($admin_edit_data);
$title = $admin_edit_data['admin_edit']['title'];
$image = $admin_edit_data['admin_edit']['image'];
eval("echo \"" . getTemplate("admins/admins_edit") . "\";");
}
}

View File

@@ -12,7 +12,7 @@
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Panel
* @version $Id$
* @version $Id: admin_cronjobs.php 105 2010-12-09 08:02:33Z d00p $
*/
define('AREA', 'admin');
@@ -140,7 +140,13 @@ if($page == 'cronjobs'
{
$change_cronfile = true;
}
$cronjobs_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php';
$cronjobs_edit_form = htmlform::genHTMLForm($cronjobs_edit_data);
$title = $cronjobs_edit_data['cronjobs_edit']['title'];
$image = $cronjobs_edit_data['cronjobs_edit']['image'];
eval("echo \"" . getTemplate("cronjobs/cronjob_edit") . "\";");
}
}

View File

@@ -50,7 +50,8 @@ if($page == 'customers'
'c.diskspace' => $lng['customer']['diskspace'],
'c.diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
'c.traffic' => $lng['customer']['traffic'],
'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')'
/*
'c.mysqls' => $lng['customer']['mysqls'],
'c.mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
'c.ftps' => $lng['customer']['ftps'],
@@ -69,8 +70,10 @@ if($page == 'customers'
'c.lastlogin_succ' => $lng['admin']['lastlogin_succ'],
'c.phpenabled' => $lng['admin']['phpenabled'],
'c.perlenabled' => $lng['admin']['perlenabled']
*/
);
/*
if($settings['ticket']['enabled'] == 1)
{
$fields['c.tickets'] = $lng['customer']['tickets'];
@@ -82,6 +85,7 @@ if($page == 'customers'
$fields['c.email_autoresponder'] = $lng['customer']['autoresponder'];
$fields['c.email_autoresponder_used'] = $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')';
}
*/
$paging = new paging($userinfo, $db, TABLE_PANEL_CUSTOMERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$customers = '';
@@ -106,6 +110,17 @@ if($page == 'customers'
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
$last_login = ((int)$row['lastlogin_succ'] == 0) ? $lng['panel']['neverloggedin'] : date('d.m.Y', $row['lastlogin_succ']);
/**
* percent-values for progressbar
*/
if ($row['diskspace'] > 0) {
$percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
$doublepercent = round($percent*2, 2);
} else {
$percent = 0;
$doublepercent = 0;
}
$column_style = '';
$unlock_link = '';
if($row['loginfail_count'] >= $settings['login']['maxloginattempts']
@@ -598,7 +613,45 @@ if($page == 'customers'
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
}
$result = $db->query("INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` (`adminid`, `loginname`, `password`, `name`, `firstname`, `company`, `street`, `zipcode`, `city`, `phone`, `fax`, `email`, `customernumber`, `def_language`, `documentroot`, `guid`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `standardsubdomain`, `phpenabled`, `imap`, `pop3`, `aps_packages`, `perlenabled`, `email_autoresponder`) VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($firstname) . "', '" . $db->escape($company) . "', '" . $db->escape($street) . "', '" . $db->escape($zipcode) . "', '" . $db->escape($city) . "', '" . $db->escape($phone) . "', '" . $db->escape($fax) . "', '" . $db->escape($email) . "', '" . $db->escape($customernumber) . "','" . $db->escape($def_language) . "', '" . $db->escape($documentroot) . "', '" . $db->escape($guid) . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '0', '" . $db->escape($phpenabled) . "', '" . $db->escape($email_imap) . "', '" . $db->escape($email_pop3) . "', '" . (int)$number_of_aps_packages . "', '" . $db->escape($perlenabled) . "', '" . $db->escape($email_autoresponder) . "')");
$_theme = $settings['panel']['default_theme'];
$result = $db->query(
"INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` SET
`adminid` = '" . (int)$userinfo['adminid'] . "',
`loginname` = '" . $db->escape($loginname) . "',
`password` = '" . md5($password) . "',
`name` = '" . $db->escape($name) . "',
`firstname` = '" . $db->escape($firstname) . "',
`company` = '" . $db->escape($company) . "',
`street` = '" . $db->escape($street) . "',
`zipcode` = '" . $db->escape($zipcode) . "',
`city` = '" . $db->escape($city) . "',
`phone` = '" . $db->escape($phone) . "',
`fax` = '" . $db->escape($fax) . "',
`email` = '" . $db->escape($email) . "',
`customernumber` = '" . $db->escape($customernumber) . "',
`def_language` = '" . $db->escape($def_language) . "',
`documentroot` = '" . $db->escape($documentroot) . "',
`guid` = '" . $db->escape($guid) . "',
`diskspace` = '" . $db->escape($diskspace) . "',
`traffic` = '" . $db->escape($traffic) . "',
`subdomains` = '" . $db->escape($subdomains) . "',
`emails` = '" . $db->escape($emails) . "',
`email_accounts` = '" . $db->escape($email_accounts) . "',
`email_forwarders` = '" . $db->escape($email_forwarders) . "',
`email_quota` = '" . $db->escape($email_quota) . "',
`ftps` = '" . $db->escape($ftps) . "',
`tickets` = '" . $db->escape($tickets) . "',
`mysqls` = '" . $db->escape($mysqls) . "',
`standardsubdomain` = '0',
`phpenabled` = '" . $db->escape($phpenabled) . "',
`imap` = '" . $db->escape($email_imap) . "',
`pop3` = '" . $db->escape($email_pop3) . "',
`aps_packages` = '" . (int)$number_of_aps_packages . "',
`perlenabled` = '" . $db->escape($perlenabled) . "',
`email_autoresponder` = '" . $db->escape($email_autoresponder) . "',
`theme` = '" . $db->escape($_theme) . "'"
);
$customerid = $db->insert_id();
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` + 1";
@@ -806,6 +859,13 @@ if($page == 'customers'
$phpenabled = makeyesno('phpenabled', '1', '0', '1');
$perlenabled = makeyesno('perlenabled', '1', '0', '0');
$store_defaultindex = makeyesno('store_defaultindex', '1', '0', '1');
$customer_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_add.php';
$customer_add_form = htmlform::genHTMLForm($customer_add_data);
$title = $customer_add_data['customer_add']['title'];
$image = $customer_add_data['customer_add']['image'];
eval("echo \"" . getTemplate("customers/customers_add") . "\";");
}
}
@@ -1378,6 +1438,13 @@ if($page == 'customers'
$email_pop3 = makeyesno('email_pop3', '1', '0', $result['pop3']);
$result = htmlentities_array($result);
$customer_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_edit.php';
$customer_edit_form = htmlform::genHTMLForm($customer_edit_data);
$title = $customer_edit_data['customer_edit']['title'];
$image = $customer_edit_data['customer_edit']['image'];
eval("echo \"" . getTemplate("customers/customers_edit") . "\";");
}
}

View File

@@ -669,6 +669,12 @@ if($page == 'domains'
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', '0');
$add_date = date('Y-m-d');
$domain_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_add.php';
$domain_add_form = htmlform::genHTMLForm($domain_add_data);
$title = $domain_add_data['domain_add']['title'];
$image = $domain_add_data['domain_add']['image'];
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
}
}
@@ -1208,6 +1214,13 @@ if($page == 'domains'
$specialsettingsforsubdomains = makeyesno('specialsettingsforsubdomains', '1', '0', '1');
$result = htmlentities_array($result);
$domain_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_edit.php';
$domain_edit_form = htmlform::genHTMLForm($domain_edit_data);
$title = $domain_edit_data['domain_edit']['title'];
$image = $domain_edit_data['domain_edit']['image'];
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
}
}

View File

@@ -295,5 +295,34 @@ elseif($page == 'change_language')
eval("echo \"" . getTemplate("index/change_language") . "\";");
}
}
elseif($page == 'change_theme')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$theme = validate($_POST['theme'], 'theme');
?>
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `hash`='" . $db->escape($s) . "'");
$log->logAction(ADM_ACTION, LOG_NOTICE, "changed his/her theme to '" . $theme . "'");
redirectTo($filename, Array('s' => $s));
}
else
{
$theme_options = '';
$default_theme = $settings['panel']['default_theme'];
if($userinfo['theme'] != '') {
$default_theme = $userinfo['theme'];
}
$themes_avail = getThemes();
foreach($themes_avail as $t)
{
$theme_options.= makeoption($t, $t, $default_theme, true);
}
eval("echo \"" . getTemplate("index/change_theme") . "\";");
}
}

View File

@@ -256,6 +256,13 @@ if($page == 'ipsandports'
$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', '1');
$vhostcontainer = makeyesno('vhostcontainer', '1', '0', '1');
$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', '1');
$ipsandports_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php';
$ipsandports_add_form = htmlform::genHTMLForm($ipsandports_add_data);
$title = $ipsandports_add_data['ipsandports_add']['title'];
$image = $ipsandports_add_data['ipsandports_add']['image'];
eval("echo \"" . getTemplate("ipsandports/ipsandports_add") . "\";");
}
}
@@ -396,6 +403,13 @@ if($page == 'ipsandports'
$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', $result['namevirtualhost_statement']);
$vhostcontainer = makeyesno('vhostcontainer', '1', '0', $result['vhostcontainer']);
$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', $result['vhostcontainer_servername_statement']);
$ipsandports_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php';
$ipsandports_edit_form = htmlform::genHTMLForm($ipsandports_edit_data);
$title = $ipsandports_edit_data['ipsandports_edit']['title'];
$image = $ipsandports_edit_data['ipsandports_edit']['image'];
eval("echo \"" . getTemplate("ipsandports/ipsandports_edit") . "\";");
}
}

View File

@@ -31,10 +31,10 @@ if($page == 'log'
if($action == '')
{
$fields = array(
'action' => $lng['logger']['action'],
'date' => $lng['logger']['date'],
'type' => $lng['logger']['type'],
'user' => $lng['logger']['user']
'user' => $lng['logger']['user'],
'text' => $lng['logger']['action']
);
$paging = new paging($userinfo, $db, TABLE_PANEL_LOG, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$paging->sortfield = 'date';
@@ -167,5 +167,3 @@ if($page == 'log'
}
}
}
?>

View File

@@ -39,6 +39,7 @@ if($page == 'overview')
if($action == '')
{
$tablecontent = '';
$count = 0;
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
while($row = $db->fetch_array($result))
@@ -68,6 +69,7 @@ if($page == 'overview')
$domains = $lng['admin']['phpsettings']['notused'];
}
$count ++;
eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";");
}
@@ -103,6 +105,13 @@ if($page == 'overview')
else
{
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
$phpconfig_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
$phpconfig_add_form = htmlform::genHTMLForm($phpconfig_add_data);
$title = $phpconfig_add_data['phpconfig_add']['title'];
$image = $phpconfig_add_data['phpconfig_add']['image'];
eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";");
}
}
@@ -172,6 +181,12 @@ if($page == 'overview')
}
else
{
$phpconfig_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php';
$phpconfig_edit_form = htmlform::genHTMLForm($phpconfig_edit_data);
$title = $phpconfig_edit_data['phpconfig_edit']['title'];
$image = $phpconfig_edit_data['phpconfig_edit']['image'];
eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";");
}
}

View File

@@ -119,7 +119,7 @@ elseif($page == 'rebuildconfigs'
inserttask('1');
inserttask('4');
inserttask('5');
redirectTo('admin_index.php', array('s' => $s));
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
}
else
{

View File

@@ -152,7 +152,7 @@ elseif($action == 'delete'
}
}
}
elseif($action == 'delete'
elseif($action == 'deletef'
&& $id != 0)
{
//file templates
@@ -209,6 +209,12 @@ elseif($action == 'add')
$template_options.= makeoption($lng['admin']['templates'][$template], $template, NULL, true);
}
$template_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_add.php';
$template_add_form = htmlform::genHTMLForm($template_add_data);
$title = $template_add_data['template_add']['title'];
$image = $template_add_data['template_add']['image'];
eval("echo \"" . getTemplate("templates/templates_add_2") . "\";");
}
elseif(isset($_POST['send'])
@@ -312,6 +318,12 @@ elseif($action == 'add')
$free_templates.= makeoption($lng['admin']['templates'][$template], $template, '', true);
}
$filetemplate_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_add.php';
$filetemplate_add_form = htmlform::genHTMLForm($filetemplate_add_data);
$title = $filetemplate_add_data['filetemplate_add']['title'];
$image = $filetemplate_add_data['filetemplate_add']['image'];
eval("echo \"" . getTemplate("templates/filetemplates_add") . "\";");
}
}
@@ -344,11 +356,18 @@ elseif($action == 'edit'
$result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `id`='$mailbodyid'");
$result = htmlentities_array($result);
$mailbody = $result['value'];
$template_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_edit.php';
$template_edit_form = htmlform::genHTMLForm($template_edit_data);
$title = $template_edit_data['template_edit']['title'];
$image = $template_edit_data['template_edit']['image'];
eval("echo \"" . getTemplate("templates/templates_edit") . "\";");
}
}
}
elseif($action == 'edit'
elseif($action == 'editf'
&& $id != 0)
{
//file templates
@@ -372,6 +391,13 @@ elseif($action == 'edit'
else
{
$row = htmlentities_array($row);
$filetemplate_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_edit.php';
$filetemplate_edit_form = htmlform::genHTMLForm($filetemplate_edit_data);
$title = $filetemplate_edit_data['filetemplate_edit']['title'];
$image = $filetemplate_edit_data['filetemplate_edit']['image'];
eval("echo \"" . getTemplate("templates/filetemplates_edit") . "\";");
}
}
@@ -381,5 +407,3 @@ elseif($action == 'edit'
exit;
}
}
?>

View File

@@ -227,6 +227,13 @@ if($page == 'tickets'
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
$ticket_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.ticket_new.php';
$ticket_new_form = htmlform::genHTMLForm($ticket_new_data);
$title = $ticket_new_data['ticket_new']['title'];
$image = $ticket_new_data['ticket_new']['image'];
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
}
}
@@ -338,6 +345,11 @@ if($page == 'tickets'
$ticket_replies_count = $db->num_rows($andere) + 1;
// don't forget the main-ticket!
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.ticket_reply.php';
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
$title = $ticket_reply_data['ticket_reply']['title'];
$image = $ticket_reply_data['ticket_reply']['image'];
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
}
@@ -491,6 +503,13 @@ elseif($page == 'categories'
else
{
$order = ticket::getHighestOrderNumber($db) + 1;
$category_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.category_new.php';
$category_new_form = htmlform::genHTMLForm($category_new_data);
$title = $category_new_data['category_new']['title'];
$image = $category_new_data['category_new']['image'];
eval("echo \"" . getTemplate("ticket/tickets_newcategory") . "\";");
}
}
@@ -522,6 +541,13 @@ elseif($page == 'categories'
else
{
$row = $db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$id . '"');
$category_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/ticket/formfield.category_edit.php';
$category_edit_form = htmlform::genHTMLForm($category_edit_data);
$title = $category_edit_data['category_edit']['title'];
$image = $category_edit_data['category_edit']['image'];
eval("echo \"" . getTemplate("ticket/tickets_editcategory") . "\";");
}
}

View File

@@ -279,6 +279,7 @@ if($action == "delete")
else
{
$autoresponder = '';
$count = 0;
$result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' ORDER BY email ASC");
while($row = $db->fetch_array($result))
@@ -300,9 +301,8 @@ else
$activated_date = date('d-m-Y', $row['date_from']) . ' - ' . date('d-m-Y', $row['date_until']);
}
eval("\$autoresponder.=\"" . getTemplate("email/autoresponder_autoresponder") . "\";");
$count++;
}
eval("echo \"" . getTemplate("email/autoresponder") . "\";");
}
?>

View File

@@ -185,5 +185,33 @@ elseif($page == 'change_language')
eval("echo \"" . getTemplate("index/change_language") . "\";");
}
}
elseif($page == 'change_theme')
{
if(isset($_POST['send'])
&& $_POST['send'] == 'send'
) {
$theme = validate($_POST['theme'], 'theme');
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `hash`='" . $db->escape($s) . "'");
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default theme to '" . $theme . "'");
redirectTo($filename, Array('s' => $s));
}
else
{
$theme_options = '';
?>
$default_theme = $settings['panel']['default_theme'];
if($userinfo['theme'] != '') {
$default_theme = $userinfo['theme'];
}
$themes_avail = getThemes();
foreach($themes_avail as $t)
{
$theme_options.= makeoption($t, $t, $default_theme, true);
}
eval("echo \"" . getTemplate("index/change_theme") . "\";");
}
}

View File

@@ -177,12 +177,20 @@ if($action == 'login')
$language = $settings['panel']['standardlanguage'];
}
if(isset($userinfo['theme']) && $userinfo['theme'] != '') {
$theme = $userinfo['theme'];
}
else
{
$theme = $settings['panel']['default_theme'];
}
if($settings['session']['allow_multiple_login'] != '1')
{
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['userid'] . "' AND `adminsession` = '" . $db->escape($userinfo['adminsession']) . "'");
}
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`) VALUES ('" . $db->escape($s) . "', '" . (int)$userinfo['userid'] . "', '" . $db->escape($remote_addr) . "', '" . $db->escape($http_user_agent) . "', '" . time() . "', '" . $db->escape($language) . "', '" . $db->escape($userinfo['adminsession']) . "')");
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`, `theme`) VALUES ('" . $db->escape($s) . "', '" . (int)$userinfo['userid'] . "', '" . $db->escape($remote_addr) . "', '" . $db->escape($http_user_agent) . "', '" . time() . "', '" . $db->escape($language) . "', '" . $db->escape($userinfo['adminsession']) . "', '" . $db->escape($theme) . "')");
if($userinfo['adminsession'] == '1')
{
@@ -221,6 +229,7 @@ if($action == 'login')
$smessage = isset($_GET['showmessage']) ? (int)$_GET['showmessage'] : 0;
$message = '';
$successmessage = '';
switch($smessage)
{
@@ -369,9 +378,12 @@ if($action == 'forgotpwd')
unset($user);
}
}
else
{
$message = $lng['login']['usernotfound'];
}
}
if($adminchecked)
{
if($settings['panel']['allow_preset_admin'] != '1')
@@ -390,5 +402,3 @@ if($action == 'forgotpwd')
eval("echo \"" . getTemplate("fpwd") . "\";");
}
?>

View File

@@ -166,6 +166,7 @@ CREATE TABLE `panel_admins` (
`aps_packages_used` int(5) NOT NULL default '0',
`email_autoresponder` int(5) NOT NULL default '0',
`email_autoresponder_used` int(5) NOT NULL default '0',
`theme` varchar(255) NOT NULL default 'Froxlor',
PRIMARY KEY (`adminid`),
UNIQUE KEY `loginname` (`loginname`)
) ENGINE=MyISAM ;
@@ -232,6 +233,7 @@ CREATE TABLE `panel_customers` (
`perlenabled` tinyint(1) NOT NULL default '0',
`email_autoresponder` int(5) NOT NULL default '0',
`email_autoresponder_used` int(5) NOT NULL default '0',
`theme` varchar(255) NOT NULL default 'Froxlor',
PRIMARY KEY (`customerid`),
UNIQUE KEY `loginname` (`loginname`)
) ENGINE=MyISAM ;
@@ -413,6 +415,7 @@ CREATE TABLE `panel_sessions` (
`formtoken` char(32) NOT NULL default '',
`language` varchar(64) NOT NULL default '',
`adminsession` tinyint(1) unsigned NOT NULL default '0',
`theme` varchar(255) NOT NULL default '',
PRIMARY KEY (`hash`),
KEY `userid` (`userid`)
) TYPE=HEAP;
@@ -614,6 +617,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (173, 'system', 'report_enable', '1');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (174, 'system', 'report_webmax', '90');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (175, 'system', 'report_trafficmax', '90');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (176, 'panel', 'default_theme', 'Froxlor');
# --------------------------------------------------------

View File

@@ -37,9 +37,10 @@ if(file_exists('../lib/userdata.inc.php'))
require ('../lib/userdata.inc.php');
if(isset($sql)
&& is_array($sql))
{
die('Sorry, Froxlor is already configured...');
&& is_array($sql)
) {
$installed_hint = file_get_contents('../templates/Froxlor/misc/alreadyinstalledhint.tpl');
die($installed_hint);
}
}
@@ -94,58 +95,45 @@ if(file_exists('./lng/' . $language . '.lng.php'))
* BEGIN FUNCTIONS -----------------------------------------------
*/
function page_header()
{
function page_header() {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
<link rel="stylesheet" href="../templates/main.css" type="text/css" />
<title>Froxlor</title>
<meta charset="iso-8859-1" />
<meta http-equiv="Default-Style" content="text/css" />
<link rel="stylesheet" href="../templates/Froxlor/froxlor.css" />
<!--[if IE]><link rel="stylesheet" href="../templates/Froxlor/froxlor_ie.css" /><![endif]-->
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script type="text/javascript" src="../templates/Froxlor/js/jquery.min.js"></script>
<script type="text/javascript" src="../templates/Froxlor/js/froxlor.js"></script>
<title>Froxlor Server Management Panel - Installation</title>
<style>
input {
background: #dae7ee url('../images/Froxlor/icons/text_align_left.png') no-repeat 5px 4px;
}
input[type="password"] {
background: #dae7ee url('../images/Froxlor/icons/password.png') no-repeat 4px 4px;
}
input[type="submit"] {
background: #ccc url('../images/Froxlor/icons/button_ok.png') no-repeat 4px 8px;
}
</style>
</head>
<body style="margin: 0; padding: 0;" onload="document.loginform.loginname.focus()">
<!--
We request you retain the full copyright notice below including the link to www.froxlor.org.
This not only gives respect to the large amount of time given freely by the developers
but also helps build interest, traffic and use of Froxlor. If you refuse
to include even this then support on our forums may be affected.
The Froxlor Team : 2009-2010
// -->
<!--
Templates based on work by Luca Piona (info@havanastudio.ch) and Luca Longinotti (chtekk@gentoo.org)
// -->
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="800"><img src="../images/header.gif" width="800" height="90" alt="" /></td>
<td class="header">&nbsp;</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td valign="top" bgcolor="#FFFFFF">
<br />
<br />
<body>
<div class="loginpage">
<?php
}
function page_footer()
{
function page_footer() {
?>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="100%" class="footer">
<br />Froxlor &copy; 2009-2010 by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
<br /><br/>
</td>
</tr>
</table>
</body>
</div>
<footer>
<span>
Froxlor &copy; 2009-<?php echo date('Y', time()); ?> by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
</span>
</footer>
</body>
</html>
<?php
}
@@ -154,24 +142,30 @@ function status_message($case, $text)
{
if($case == 'begin')
{
echo "\t\t<tr>\n\t\t\t<td class=\"main_field_name\">$text";
echo '<tr><td>'.$text;
}
else
{
echo " <span style=\"color:$case;\">$text</span></td>\n\t\t</tr>\n";
echo '</td><td class="installstatus">
<span style="color:'.$case.';">'.$text.'</span>
</td></tr>';
}
}
function requirement_checks()
{
function requirement_checks() {
global $lng;
page_header();
?>
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable">
<tr>
<td class="maintitle"><b><img src="../images/title.gif" alt="" />&nbsp;Froxlor Installation</b></td>
</tr>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2>Requirements</h2>
<table class="noborder">
<?php
$_die = false;
@@ -201,6 +195,7 @@ function requirement_checks()
status_message('green', 'OK');
}
// check for mysql-extension
status_message('begin', $lng['install']['phpmysql']);
if(!extension_loaded('mysql'))
@@ -212,7 +207,8 @@ function requirement_checks()
{
status_message('green', 'OK');
}
// check for xml-extension
status_message('begin', $lng['install']['phpxml']);
if(!extension_loaded('xml'))
@@ -225,8 +221,7 @@ function requirement_checks()
status_message('green', 'OK');
}
// check for filter-extension
status_message('begin', $lng['install']['phpfilter']);
if(!extension_loaded('filter'))
@@ -239,6 +234,7 @@ function requirement_checks()
status_message('green', 'OK');
}
// check for posix-extension
status_message('begin', $lng['install']['phpposix']);
if(!extension_loaded('posix'))
@@ -250,7 +246,8 @@ function requirement_checks()
{
status_message('green', 'OK');
}
// check for bcmath extension
status_message('begin', $lng['install']['phpbcmath']);
if(!extension_loaded('bcmath'))
@@ -262,6 +259,7 @@ function requirement_checks()
status_message('green', 'OK');
}
// check for open_basedir
status_message('begin', $lng['install']['openbasedir']);
$php_ob = @ini_get("open_basedir");
@@ -275,30 +273,32 @@ function requirement_checks()
status_message('green', 'OK');
}
?>
</table>
<?php
if($_die)
{
?>
<tr>
<td class="main_field_display" align="center">
<?php echo $lng['install']['diedbecauseofrequirements']; ?><br />
<a href="install.php"><?php echo $lng['install']['click_here_to_refresh']; ?></a>
</td>
</tr>
<p style="padding-left:15px;">
<strong><?php echo $lng['install']['diedbecauseofrequirements']; ?></strong>
</p>
<p class="submit">
<a href="install.php"><?php echo $lng['install']['click_here_to_refresh']; ?></a>
</p>
<?php
} else {
?>
<tr>
<td class="main_field_display" align="center">
<?php echo $lng['install']['froxlor_succ_checks']; ?><br />
<a href="install.php?check=1"><?php echo $lng['install']['click_here_to_continue']; ?></a>
</td>
</tr>
<p style="padding-left:15px;">
<strong><?php echo $lng['install']['froxlor_succ_checks']; ?></strong>
</p>
<p class="submit">
<a href="install.php?check=1"><?php echo $lng['install']['click_here_to_continue']; ?></a>
</p>
<?php
}
?>
</table>
<br />
<br />
</section>
</article>
<?php
page_footer();
}
@@ -518,10 +518,14 @@ if(isset($_POST['installstep'])
page_header();
?>
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable">
<tr>
<td class="maintitle"><b><img src="../images/title.gif" alt="" />&nbsp;Froxlor Installation</b></td>
</tr>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2>Installation</h2>
<table class="noborder">
<?php
//first test if we can access the database server with the given root user and password
@@ -812,15 +816,15 @@ if(isset($_POST['installstep'])
}
?>
<tr>
<td class="main_field_display" align="center">
<?php echo $lng['install']['froxlor_succ_installed']; ?><br />
<a href="../index.php"><?php echo $lng['install']['click_here_to_login']; ?></a>
</td>
</tr>
</table>
<br />
<br />
</table>
<p style="padding-left: 15px;">
<strong><?php echo $lng['install']['froxlor_succ_installed']; ?></strong>
</p>
<p class="submit">
<a href="../index.php"><?php echo $lng['install']['click_here_to_login']; ?></a>
</p>
</section>
</article>
<?php
page_footer();
}
@@ -835,116 +839,120 @@ else
page_header();
?>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="get">
<input type="hidden" name="check" value="1" />
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
<tr>
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['welcome']; ?></b></td>
</tr>
<tr>
<td class="main_field_name" colspan="2"><?php echo $lng['install']['welcometext']; ?></td>
</tr>
<tr>
<td class="main_field_name"><?php echo $lng['install']['language']; ?>: </td>
<td class="main_field_display" nowrap="nowrap">
<select name="language" class="dropdown_noborder"><?php
$language_options = '';
while(list($language_file, $language_name) = each($languages))
{
$language_options.= "\n\t\t\t\t\t\t" . makeoption($language_name, $language_file, $language, true, true);
}
echo $language_options;
?>
<article class="install bradius">
<header class="dark">
<img src="../images/Froxlor/logo.png" alt="Froxlor Server Management Panel" />
</header>
<section class="installsec">
<h2><?php echo $lng['install']['language']; ?></h2>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="get">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;Install</legend>
<p>
<label for="language"><?php echo $lng['install']['language']; ?>:</label>&nbsp;
<select name="language" id="language">
<?php
$language_options = '';
while(list($language_file, $language_name) = each($languages)) {
$language_options.= makeoption($language_name, $language_file, $language, true, true);
}
echo $language_options;
?>
</select>
</td>
</tr>
<tr>
<td class="main_field_confirm" colspan="2">
<input class="bottom" type="submit" name="chooselang" value="Go" />
</td>
</tr>
</table>
</form>
<br />
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="post">
<input type="hidden" name="check" value="1" />
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
<tr>
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['database']; ?></b></td>
</tr>
<tr>
<td class="main_field_name"><?php echo $lng['install']['mysql_hostname']; ?>:</td>
<td class="main_field_display"><input type="text" name="mysql_host" value="<?php echo htmlspecialchars($mysql_host); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"><?php echo $lng['install']['mysql_database']; ?>:</td>
<td class="main_field_display"><input type="text" name="mysql_database" value="<?php echo htmlspecialchars($mysql_database); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_user']; ?>:</td>
<td class="main_field_display"><input type="text" name="mysql_unpriv_user" value="<?php echo htmlspecialchars($mysql_unpriv_user); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $mysql_unpriv_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_pass']; ?>:</td>
<td class="main_field_display"><input type="password" name="mysql_unpriv_pass" value="<?php echo htmlspecialchars($mysql_unpriv_pass); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_root_user']; ?>:</td>
<td class="main_field_display"><input type="text" name="mysql_root_user" value="<?php echo htmlspecialchars($mysql_root_user); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $mysql_root_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_root_pass']; ?>:</td>
<td class="main_field_display"><input type="password" name="mysql_root_pass" value="<?php echo htmlspecialchars($mysql_root_pass); ?>"/></td>
</tr>
<tr>
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['admin_account']; ?></b></td>
</tr>
<tr>
<td class="main_field_name"><?php echo $lng['install']['admin_user']; ?>:</td>
<td class="main_field_display"><input type="text" name="admin_user" value="<?php echo htmlspecialchars($admin_user); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && ($admin_pass1 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass']; ?>:</td>
<td class="main_field_display"><input type="password" name="admin_pass1" value="<?php echo htmlspecialchars($admin_pass1); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && ($admin_pass2 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass_confirm']; ?>:</td>
<td class="main_field_display"><input type="password" name="admin_pass2" value="<?php echo htmlspecialchars($admin_pass2); ?>"/></td>
</tr>
<tr>
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" />&nbsp;<?php echo $lng['install']['serversettings']; ?></b></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $servername == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['servername']; ?>:</td>
<td class="main_field_display"><input type="text" name="servername" value="<?php echo htmlspecialchars($servername); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['serverip']; ?>:</td>
<td class="main_field_display"><input type="text" name="serverip" value="<?php echo htmlspecialchars($serverip); ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?>:</td>
<td class="main_field_display"><input type="radio" name="webserver" value="apache2" <?php echo $webserver == "apache2" ? 'checked="checked"' : "" ?>/>Apache2&nbsp;<br /><input type="radio" name="webserver" value="lighttpd" <?php echo $webserver == "lighttpd" ? 'checked="checked"' : "" ?>/>Lighttpd2&nbsp;<br /><input type="radio" name="webserver" value="nginx" <?php echo $webserver == "nginx" ? 'checked="checked"' : "" ?>/>Nginx</td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpuser']; ?>:</td>
<td class="main_field_display"><input type="text" name="httpuser" value="<?php $posixusername = posix_getpwuid(posix_getuid()); echo $posixusername['name']; ?>"/></td>
</tr>
<tr>
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpgroup']; ?>:</td>
<td class="main_field_display"><input type="text" name="httpgroup" value="<?php $posixgroup = posix_getgrgid(posix_getgid()); echo $posixgroup['name']; ?>"/></td>
</tr>
<tr>
<td class="main_field_confirm" colspan="2"><input type="hidden" name="language" value="<?php echo htmlspecialchars($language); ?>"/><input type="hidden" name="installstep" value="1"/><input class="bottom" type="submit" name="submitbutton" value="<?php echo $lng['install']['next']; ?>"/></td>
</tr>
</table>
</form>
<br />
<br />
</p>
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="submit" name="chooselang" value="Go" />
</p>
</fieldset>
</form>
<aside>&nbsp;</aside>
</section>
<section class="installsec">
<h2><?php echo $lng['install']['installdata']; ?></h2>
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="post">
<fieldset>
<legend>Froxlor&nbsp;-&nbsp;Install</legend>
<p>
<strong><?php echo $lng['install']['database']; ?></strong>
</p>
<p>
<label for="mysql_host"><?php echo $lng['install']['mysql_hostname']; ?>:</label>&nbsp;
<input type="text" name="mysql_host" id="mysql_host" value="<?php echo htmlspecialchars($mysql_host); ?>" required/>
</p>
<p>
<label for="mysql_database"><?php echo $lng['install']['mysql_database']; ?>:</label>&nbsp;
<input type="text" name="mysql_database" id="mysql_database" value="<?php echo htmlspecialchars($mysql_database); ?>" required/>
</p>
<p>
<label for="mysql_unpriv_user"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_user']; ?>:</label>&nbsp;
<input type="text" name="mysql_unpriv_user" id="mysql_unpriv_user" value="<?php echo htmlspecialchars($mysql_unpriv_user); ?>" required/>
</p>
<p>
<label for="mysql_unpriv_pass"<?php echo ((!empty($_POST['installstep']) && $mysql_unpriv_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_pass']; ?>:</label>&nbsp;
<input type="password" name="mysql_unpriv_pass" id="mysql_unpriv_pass" value="<?php echo htmlspecialchars($mysql_unpriv_pass); ?>" required/>
</p>
<p>
<label for="mysql_root_user"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_root_user']; ?>:</label>&nbsp;
<input type="text" name="mysql_root_user" id="mysql_root_user" value="<?php echo htmlspecialchars($mysql_root_user); ?>" required/>
</p>
<p>
<label for="mysql_root_pass"<?php echo ((!empty($_POST['installstep']) && $mysql_root_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_root_pass']; ?>:</label>&nbsp;
<input type="password" name="mysql_root_pass" id="mysql_root_pass" value="<?php echo htmlspecialchars($mysql_root_pass); ?>" required/>
</p>
<p>
<strong><?php echo $lng['install']['admin_account']; ?></strong>
</p>
<p>
<label for="admin_user"><?php echo $lng['install']['admin_user']; ?>:</label>&nbsp;
<input type="text" name="admin_user" id="admin_user" value="<?php echo htmlspecialchars($admin_user); ?>" required/>
</p>
<p>
<label for="admin_pass1"<?php echo ((!empty($_POST['installstep']) && ($admin_pass1 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass']; ?>:</label>&nbsp;
<input type="password" name="admin_pass1" id="admin_pass1" value="<?php echo htmlspecialchars($admin_pass1); ?>" required/>
</p>
<p>
<label for="admin_pass2"<?php echo ((!empty($_POST['installstep']) && ($admin_pass2 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass_confirm']; ?>:</label>&nbsp;
<input type="password" name="admin_pass2" id="admin_pass2" value="<?php echo htmlspecialchars($admin_pass2); ?>" required/>
</p>
<p>
<strong><?php echo $lng['install']['serversettings']; ?></strong>
</p>
<p>
<label for="servername"<?php echo ((!empty($_POST['installstep']) && $servername == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['servername']; ?>:</label>&nbsp;
<input type="text" name="servername" id="servername" value="<?php echo htmlspecialchars($servername); ?>" required/>
</p>
<p>
<label for="serverip"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['serverip']; ?>:</label>&nbsp;
<input type="text" name="serverip" id="serverip" value="<?php echo htmlspecialchars($serverip); ?>" required/>
</p>
<p>
<label for="apache"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?> Apache:</label>&nbsp;
<input type="radio" name="webserver" id="apache" value="apache2" <?php echo $webserver == "apache2" ? 'checked="checked"' : "" ?>/>Apache2
</p>
<p>
<label for="lighty"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?> ligHTTPd:</label>&nbsp;
<input type="radio" name="webserver" id="lighty" value="lighttpd" <?php echo $webserver == "lighttpd" ? 'checked="checked"' : "" ?>/>ligHTTPd
</p>
<p>
<label for="httpuser"<?php echo ((!empty($_POST['installstep']) && $httpuser == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpuser']; ?>:</label>&nbsp;
<input type="text" name="httpuser" id="httpuser" value="<?php $posixusername = posix_getpwuid(posix_getuid()); echo $posixusername['name']; ?>" required/>
</p>
<p>
<label for="httpgroup"<?php echo ((!empty($_POST['installstep']) && $httpgroup == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpgroup']; ?>:</label>&nbsp;
<input type="text" name="httpgroup" id="httpgroup" value="<?php $posixgroup = posix_getgrgid(posix_getgid()); echo $posixgroup['name']; ?>" required/>
</p>
<p class="submit">
<input type="hidden" name="check" value="1" />
<input type="hidden" name="language" value="<?php echo htmlspecialchars($language); ?>"/>
<input type="hidden" name="installstep" value="1"/>
<input class="bottom" type="submit" name="submitbutton" value="<?php echo $lng['install']['next']; ?>"/>
</p>
</fieldset>
</form>
<aside>&nbsp;</aside>
</section>
</article>
<?php
page_footer();
}
@@ -957,5 +965,3 @@ else
/**
* END INSTALL ---------------------------------------------------
*/
?>

View File

@@ -42,6 +42,7 @@ $lng['install']['httpuser'] = 'HTTP username';
$lng['install']['httpgroup'] = 'HTTP groupname';
$lng['install']['apacheversion'] = 'Apacheversion';
$lng['install']['next'] = 'Next';
$lng['install']['installdata'] = 'Installation - Data';
/**
* Progress

View File

@@ -41,6 +41,7 @@ $lng['install']['servername'] = 'Nom du serveur (FQDN)';
$lng['install']['serverip'] = 'Adresse IP du serveur';
$lng['install']['apacheversion'] = 'Version du serveur Apache';
$lng['install']['next'] = 'Continuer';
$lng['install']['installdata'] = 'Installation - Data';
/**
* Progress

View File

@@ -40,6 +40,7 @@ $lng['install']['servername'] = 'Servername (FQDN)';
$lng['install']['serverip'] = 'Server-IP';
$lng['install']['apacheversion'] = 'Apacheversion';
$lng['install']['next'] = 'Fortfahren';
$lng['install']['installdata'] = 'Installation - Daten';
/**
* Progress

View File

@@ -1443,3 +1443,26 @@ if(isFroxlorVersion('0.9.17'))
updateToVersion('0.9.18-svn1');
}
if(isFroxlorVersion('0.9.18-svn1'))
{
showUpdateStep("Updating from 0.9.18-svn1 to 0.9.18-svn2", false);
$update_default_theme = isset($_POST['update_default_theme']) ? $_POST['update_default_theme'] : 'Froxlor';
showUpdateStep("Adding new settings for themes");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'default_theme', '".$db->escape($update_default_theme)."');");
lastStepStatus(0);
showUpdateStep("Delete old setting for header-graphic");
$db->query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup`='admin' AND `varname` = 'froxlor_graphic';");
lastStepStatus(0);
showUpdateStep("Updating table layouts");
$db->query("ALTER TABLE `".TABLE_PANEL_ADMINS."` ADD `theme` varchar(255) NOT NULL default 'Froxlor' AFTER `email_autoresponder_used`;");
$db->query("ALTER TABLE `".TABLE_PANEL_CUSTOMERS."` ADD `theme` varchar(255) NOT NULL default 'Froxlor' AFTER `email_autoresponder_used`;");
$db->query("ALTER TABLE `".TABLE_PANEL_SESSIONS."` ADD `theme` varchar(255) NOT NULL default '' AFTER `adminsession`;");
lastStepStatus(0);
updateToVersion('0.9.18-svn2');
}

View File

@@ -415,4 +415,18 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$question.= '<input type="text" class="text" name="update_system_report_trafficmax" value="90" /><br />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if(versionInUpdate($current_version, '0.9.18-svn2'))
{
$has_preconfig = true;
$description = 'As you can (obviously) see, Froxlor now comes with a new theme. You also have the possibility to switch back to "Classic" if you want to.';
$question = '<strong>Select default panel theme:</strong>&nbsp;';
$question.= '<select name="update_default_theme">';
$themes = getThemes();
foreach($themes as $theme) {
$question.= makeoption($theme, $theme, 'Froxlor');
}
$question.= '</select>';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}