removing more ticket-stuff; update all unit-tests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -92,7 +92,7 @@ if ($page == 'admins' && $userinfo['change_serversettings'] == '1') {
|
||||
$traffic_percent = 100;
|
||||
}
|
||||
|
||||
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains tickets');
|
||||
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains');
|
||||
$row = htmlentities_array($row);
|
||||
|
||||
$row['custom_notes'] = ($row['custom_notes'] != '') ? nl2br($row['custom_notes']) : '';
|
||||
@@ -219,7 +219,6 @@ if ($page == 'admins' && $userinfo['change_serversettings'] == '1') {
|
||||
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
|
||||
$admin_add_data = include_once dirname(__FILE__) . '/lib/formfields/admin/admin/formfield.admin_add.php';
|
||||
@@ -309,11 +308,6 @@ if ($page == 'admins' && $userinfo['change_serversettings'] == '1') {
|
||||
$result['ftps'] = '';
|
||||
}
|
||||
|
||||
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, $result['tickets'], true, true);
|
||||
if ($result['tickets'] == '-1') {
|
||||
$result['tickets'] = '';
|
||||
}
|
||||
|
||||
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, $result['mysqls'], true, true);
|
||||
if ($result['mysqls'] == '-1') {
|
||||
$result['mysqls'] = '';
|
||||
|
||||
@@ -99,7 +99,7 @@ if ($userinfo['change_serversettings'] == '1') {
|
||||
}
|
||||
|
||||
// create configparser object
|
||||
$configfiles = new ConfigParser($config_dir . '/' . $distribution . ".xml");
|
||||
$configfiles = new \Froxlor\Config\ConfigParser($config_dir . '/' . $distribution . ".xml");
|
||||
|
||||
// get distro-info
|
||||
$dist_display = getCompleteDistroName($configfiles);
|
||||
@@ -139,7 +139,7 @@ if ($userinfo['change_serversettings'] == '1') {
|
||||
// read in all the distros
|
||||
foreach ($distros as $_distribution) {
|
||||
// get configparser object
|
||||
$dist = new ConfigParser($_distribution);
|
||||
$dist = new \Froxlor\Config\ConfigParser($_distribution);
|
||||
// get distro-info
|
||||
$dist_display = getCompleteDistroName($dist);
|
||||
// store in tmp array
|
||||
|
||||
@@ -126,7 +126,7 @@ if ($page == 'customers' && $userinfo['customers'] != '0') {
|
||||
$islocked = 1;
|
||||
}
|
||||
|
||||
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains');
|
||||
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps subdomains');
|
||||
$row = htmlentities_array($row);
|
||||
|
||||
// fix progress-bars if value is >100%
|
||||
@@ -293,7 +293,6 @@ if ($page == 'customers' && $userinfo['customers'] != '0') {
|
||||
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
|
||||
$gender_options = makeoption($lng['gender']['undef'], 0, true, true, true);
|
||||
@@ -434,11 +433,6 @@ if ($page == 'customers' && $userinfo['customers'] != '0') {
|
||||
$result['ftps'] = '';
|
||||
}
|
||||
|
||||
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, $result['tickets'], true, true);
|
||||
if ($result['tickets'] == '-1') {
|
||||
$result['tickets'] = '';
|
||||
}
|
||||
|
||||
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, $result['mysqls'], true, true);
|
||||
if ($result['mysqls'] == '-1') {
|
||||
$result['mysqls'] = '';
|
||||
|
||||
@@ -656,7 +656,7 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
$result = array();
|
||||
|
||||
try {
|
||||
$bulk = new DomainBulkAction($file_name, $customerid);
|
||||
$bulk = new \Froxlor\Bulk\DomainBulkAction($file_name, $customerid);
|
||||
$result = $bulk->doImport($separator, $offset);
|
||||
} catch (Exception $e) {
|
||||
standard_error('domain_import_error', $e->getMessage());
|
||||
|
||||
@@ -65,7 +65,6 @@ if ($page == 'overview') {
|
||||
SUM(`email_forwarders_used`) AS `email_forwarders_used`,
|
||||
SUM(`email_quota_used`) AS `email_quota_used`,
|
||||
SUM(`ftps_used`) AS `ftps_used`,
|
||||
SUM(`tickets_used`) AS `tickets_used`,
|
||||
SUM(`subdomains_used`) AS `subdomains_used`,
|
||||
SUM(`traffic_used`) AS `traffic_used`
|
||||
FROM `" . TABLE_PANEL_CUSTOMERS . "`" . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = :adminid "));
|
||||
@@ -116,7 +115,7 @@ if ($page == 'overview') {
|
||||
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $dec_places);
|
||||
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $dec_places);
|
||||
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $dec_places);
|
||||
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains');
|
||||
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains');
|
||||
|
||||
$userinfo['custom_notes'] = ($userinfo['custom_notes'] != '') ? nl2br($userinfo['custom_notes']) : '';
|
||||
|
||||
|
||||
@@ -164,11 +164,6 @@ if ($page == '' || $page == 'overview') {
|
||||
$value_arr['ftps'] = - 1;
|
||||
}
|
||||
|
||||
$value_arr['tickets'] = (Settings::Get('ticket.enabled') == 1 ? intval_ressource($_POST['tickets']) : 0);
|
||||
if (isset($_POST['tickets_ul']) && Settings::Get('ticket.enabled') == '1') {
|
||||
$value_arr['tickets'] = - 1;
|
||||
}
|
||||
|
||||
$value_arr['mysqls'] = intval_ressource($_POST['mysqls']);
|
||||
if (isset($_POST['mysqls_ul'])) {
|
||||
$value_arr['mysqls'] = - 1;
|
||||
@@ -224,7 +219,6 @@ if ($page == '' || $page == 'overview') {
|
||||
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
|
||||
$phpconfigs = array();
|
||||
@@ -348,11 +342,6 @@ if ($page == '' || $page == 'overview') {
|
||||
$value_arr['ftps'] = - 1;
|
||||
}
|
||||
|
||||
$value_arr['tickets'] = (Settings::Get('ticket.enabled') == 1 ? intval_ressource($_POST['tickets']) : 0);
|
||||
if (isset($_POST['tickets_ul']) && Settings::Get('ticket.enabled') == '1') {
|
||||
$value_arr['tickets'] = - 1;
|
||||
}
|
||||
|
||||
$value_arr['mysqls'] = intval_ressource($_POST['mysqls']);
|
||||
if (isset($_POST['mysqls_ul'])) {
|
||||
$value_arr['mysqls'] = - 1;
|
||||
@@ -441,11 +430,6 @@ if ($page == '' || $page == 'overview') {
|
||||
$result['ftps'] = '';
|
||||
}
|
||||
|
||||
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, $result['tickets'], true, true);
|
||||
if ($result['tickets'] == '-1') {
|
||||
$result['tickets'] = '';
|
||||
}
|
||||
|
||||
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, $result['mysqls'], true, true);
|
||||
if ($result['mysqls'] == '-1') {
|
||||
$result['mysqls'] = '';
|
||||
|
||||
@@ -254,7 +254,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
|
||||
));
|
||||
}
|
||||
} elseif ($page == 'integritycheck' && $userinfo['change_serversettings'] == '1') {
|
||||
$integrity = new IntegrityCheck();
|
||||
$integrity = new \Froxlor\Database\IntegrityCheck();
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
$integrity->fixAll();
|
||||
} elseif (isset($_GET['action']) && $_GET['action'] == "fix") {
|
||||
|
||||
@@ -55,16 +55,6 @@ if ((int)Settings::Get('system.report_enable') == 1) {
|
||||
);
|
||||
}
|
||||
|
||||
if ((int)Settings::Get('ticket.enabled') == 1) {
|
||||
array_push($available_templates,
|
||||
'new_ticket_by_customer',
|
||||
'new_ticket_for_customer',
|
||||
'new_ticket_by_staff',
|
||||
'new_reply_ticket_by_customer',
|
||||
'new_reply_ticket_by_staff'
|
||||
);
|
||||
}
|
||||
|
||||
$file_templates = array(
|
||||
'index_html'
|
||||
);
|
||||
|
||||
@@ -93,7 +93,7 @@ if ($page == 'overview') {
|
||||
|
||||
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
|
||||
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
|
||||
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains');
|
||||
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains');
|
||||
|
||||
$userinfo['custom_notes'] = ($userinfo['custom_notes'] != '') ? nl2br($userinfo['custom_notes']) : '';
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ if ($action == '2fa_entercode') {
|
||||
}
|
||||
$code = isset($_POST['2fa_code']) ? $_POST['2fa_code'] : null;
|
||||
// verify entered code
|
||||
$tfa = new FroxlorTwoFactorAuth('Froxlor');
|
||||
$tfa = new \Froxlor\FroxlorTwoFactorAuth('Froxlor');
|
||||
$result = ($_SESSION['secret_2fa'] == 'email' ? true : $tfa->verifyCode($_SESSION['secret_2fa'], $code, 3));
|
||||
// either the code is valid when using authenticator-app, or we will select userdata by id and entered code
|
||||
// which is temporarily stored for the customer when using email-2fa
|
||||
@@ -267,7 +267,7 @@ if ($action == '2fa_entercode') {
|
||||
// send mail if type_2fa = 1 (email)
|
||||
if ($userinfo['type_2fa'] == 1) {
|
||||
// generate code
|
||||
$tfa = new FroxlorTwoFactorAuth('Froxlor');
|
||||
$tfa = new \Froxlor\FroxlorTwoFactorAuth('Froxlor');
|
||||
$code = $tfa->getCode($tfa->createSecret());
|
||||
// set code for user
|
||||
$stmt = Database::prepare("UPDATE $table SET `data_2fa` = :d2fa WHERE `$uid` = :uid");
|
||||
|
||||
@@ -422,8 +422,6 @@ class FroxlorInstall
|
||||
`email_forwarders` = -1,
|
||||
`email_quota` = -1,
|
||||
`ftps` = -1,
|
||||
`tickets` = -1,
|
||||
`tickets_see_all` = 1,
|
||||
`subdomains` = -1,
|
||||
`traffic` = -1048576
|
||||
");
|
||||
@@ -507,10 +505,7 @@ class FroxlorInstall
|
||||
|
||||
// set specific times for some crons (traffic only at night, etc.)
|
||||
$ts = mktime(0, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "` SET `lastrun` = '" . $ts . "' WHERE `cronfile` ='cron_traffic.php';");
|
||||
$ts = mktime(1, 0, 0, date('m', time()), date('d', time()), date('Y', time()));
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "` SET `lastrun` = '" . $ts . "' WHERE `cronfile` ='cron_used_tickets_reset.php';");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "` SET `lastrun` = '" . $ts . "' WHERE `cronfile` ='cron_ticketarchive.php';");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "` SET `lastrun` = '" . $ts . "' WHERE `cronfile` ='cron_traffic';");
|
||||
|
||||
// insert task 99 to generate a correct cron.d-file automatically
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_TASKS . "` SET `type` = '99';");
|
||||
|
||||
@@ -108,8 +108,8 @@ class paging {
|
||||
// entries per page and natsorting-flag are not
|
||||
// passed as parameter anymore, because these are
|
||||
// from the settings anyway
|
||||
$entriesperpage = Settings::Get('panel.paging');
|
||||
$natSorting = Settings::Get('panel.natsorting');
|
||||
$entriesperpage = \Froxlor\Settings::Get('panel.paging');
|
||||
$natSorting = \Froxlor\Settings::Get('panel.natsorting');
|
||||
|
||||
$this->userinfo = $userinfo;
|
||||
|
||||
@@ -216,7 +216,7 @@ class paging {
|
||||
}
|
||||
|
||||
$this->userinfo['lastpaging']['pageno'] = $this->pageno;
|
||||
$upd_stmt = Database::prepare("
|
||||
$upd_stmt = \Froxlor\Database\Database::prepare("
|
||||
UPDATE `" . TABLE_PANEL_SESSIONS . "` SET
|
||||
`lastpaging` = :lastpaging
|
||||
WHERE `hash` = :hash AND `userid` = :userid
|
||||
@@ -231,7 +231,7 @@ class paging {
|
||||
'ua' => $userinfo['useragent'],
|
||||
'adminsession' => $userinfo['adminsession']
|
||||
);
|
||||
Database::pexecute($upd_stmt, $upd_data);
|
||||
\Froxlor\Database\Database::pexecute($upd_stmt, $upd_data);
|
||||
|
||||
$this->_limit = $limit;
|
||||
}
|
||||
@@ -320,12 +320,12 @@ class paging {
|
||||
|
||||
if ($useOper == 1 && is_numeric(substr($this->searchtext, $useOper))) {
|
||||
// now as we use >, < or = we use the given operator and not LIKE
|
||||
$condition.= $searchfield . " ".$oper." " . Database::quote($searchtext);
|
||||
$condition.= $searchfield . " ".$oper." " . \Froxlor\Database\Database::quote($searchtext);
|
||||
} else {
|
||||
$searchtext = str_replace('*', '%', $this->searchtext);
|
||||
// append wildcards if user did not enter any
|
||||
if (strpos($searchtext,'%') === false) $searchtext='%'.$searchtext.'%';
|
||||
$condition.= $searchfield . " LIKE " . Database::quote($searchtext);
|
||||
$condition.= $searchfield . " LIKE " . \Froxlor\Database\Database::quote($searchtext);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -38,7 +38,7 @@ return array(
|
||||
'admin_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
|
||||
'value' => generatePassword(),
|
||||
),
|
||||
'def_language' => array(
|
||||
@@ -190,7 +190,7 @@ return array(
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||
'mandatory' => true,
|
||||
'ul_field' => $email_quota_ul
|
||||
),
|
||||
@@ -201,22 +201,6 @@ return array(
|
||||
'maxlength' => 9,
|
||||
'ul_field' => $ftps_ul
|
||||
),
|
||||
'tickets' => array(
|
||||
'label' => $lng['customer']['tickets'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
|
||||
'ul_field' => $tickets_ul
|
||||
),
|
||||
'tickets_see_all' => array(
|
||||
'label' => $lng['admin']['tickets_see_all'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array()
|
||||
),
|
||||
'mysqls' => array(
|
||||
'label' => $lng['customer']['mysqls'],
|
||||
'type' => 'textul',
|
||||
|
||||
@@ -47,7 +47,7 @@ return array(
|
||||
'admin_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
|
||||
'value' => generatePassword(),
|
||||
'visible' => ($result['adminid'] == $userinfo['userid'] ? false : true)
|
||||
),
|
||||
@@ -205,7 +205,7 @@ return array(
|
||||
'type' => 'textul',
|
||||
'value' => $result['email_quota'],
|
||||
'maxlength' => 9,
|
||||
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||
'mandatory' => true,
|
||||
'ul_field' => $email_quota_ul
|
||||
),
|
||||
@@ -216,22 +216,6 @@ return array(
|
||||
'maxlength' => 9,
|
||||
'ul_field' => $ftps_ul
|
||||
),
|
||||
'tickets' => array(
|
||||
'label' => $lng['customer']['tickets'],
|
||||
'type' => 'textul',
|
||||
'value' => $result['tickets'],
|
||||
'maxlength' => 9,
|
||||
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
|
||||
'ul_field' => $tickets_ul
|
||||
),
|
||||
'tickets_see_all' => array(
|
||||
'label' => $lng['admin']['tickets_see_all'],
|
||||
'type' => 'checkbox',
|
||||
'values' => array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array($result['tickets_see_all'])
|
||||
),
|
||||
'mysqls' => array(
|
||||
'label' => $lng['customer']['mysqls'],
|
||||
'type' => 'textul',
|
||||
|
||||
@@ -61,7 +61,7 @@ return array(
|
||||
'new_customer_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
|
||||
'value' => generatePassword()
|
||||
),
|
||||
'sendpassword' => array(
|
||||
@@ -227,7 +227,7 @@ return array(
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||
'mandatory' => true,
|
||||
'ul_field' => $email_quota_ul
|
||||
),
|
||||
@@ -266,14 +266,6 @@ return array(
|
||||
'maxlength' => 9,
|
||||
'ul_field' => $ftps_ul
|
||||
),
|
||||
'tickets' => array(
|
||||
'label' => $lng['customer']['tickets'],
|
||||
'type' => 'textul',
|
||||
'value' => 0,
|
||||
'maxlength' => 9,
|
||||
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
|
||||
'ul_field' => $tickets_ul
|
||||
),
|
||||
'mysqls' => array(
|
||||
'label' => $lng['customer']['mysqls'],
|
||||
'type' => 'textul',
|
||||
@@ -296,14 +288,14 @@ return array(
|
||||
)
|
||||
),
|
||||
'allowed_phpconfigs' => array(
|
||||
'visible' => (((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) ? true : false),
|
||||
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['title'],
|
||||
'type' => 'checkbox',
|
||||
'values' => $phpconfigs,
|
||||
'value' => ((int) Settings::Get('system.mod_fcgid') == 1 ? array(
|
||||
Settings::Get('system.mod_fcgid_defaultini')
|
||||
) : (int) Settings::Get('phpfpm.enabled') == 1 ? array(
|
||||
Settings::Get('phpfpm.defaultini')
|
||||
'value' => ((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 ? array(
|
||||
\Froxlor\Settings::Get('system.mod_fcgid_defaultini')
|
||||
) : (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1 ? array(
|
||||
\Froxlor\Settings::Get('phpfpm.defaultini')
|
||||
) : array()),
|
||||
'is_array' => 1
|
||||
),
|
||||
@@ -326,7 +318,7 @@ return array(
|
||||
'value' => '1'
|
||||
)
|
||||
),
|
||||
'visible' => (Settings::Get('system.dnsenabled') == '1' ? true : false)
|
||||
'visible' => (\Froxlor\Settings::Get('system.dnsenabled') == '1' ? true : false)
|
||||
),
|
||||
'logviewenabled' => array(
|
||||
'label' => $lng['admin']['logviewenabled'] . '?',
|
||||
|
||||
@@ -58,7 +58,7 @@ return array(
|
||||
'new_customer_password_suggestion' => array(
|
||||
'label' => $lng['customer']['generated_pwd'],
|
||||
'type' => 'text',
|
||||
'visible' => (Settings::Get('panel.password_regex') == ''),
|
||||
'visible' => (\Froxlor\Settings::Get('panel.password_regex') == ''),
|
||||
'value' => generatePassword(),
|
||||
),
|
||||
'def_language' => array(
|
||||
@@ -219,7 +219,7 @@ return array(
|
||||
'type' => 'textul',
|
||||
'value' => $result['email_quota'],
|
||||
'maxlength' => 9,
|
||||
'visible' => (Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||
'visible' => (\Froxlor\Settings::Get('system.mail_quota_enabled') == '1' ? true : false),
|
||||
'mandatory' => true,
|
||||
'ul_field' => $email_quota_ul
|
||||
),
|
||||
@@ -248,14 +248,6 @@ return array(
|
||||
'maxlength' => 9,
|
||||
'ul_field' => $ftps_ul
|
||||
),
|
||||
'tickets' => array(
|
||||
'label' => $lng['customer']['tickets'],
|
||||
'type' => 'textul',
|
||||
'value' => $result['tickets'],
|
||||
'maxlength' => 9,
|
||||
'visible' => (Settings::Get('ticket.enabled') == '1' ? true : false),
|
||||
'ul_field' => $tickets_ul
|
||||
),
|
||||
'mysqls' => array(
|
||||
'label' => $lng['customer']['mysqls'],
|
||||
'type' => 'textul',
|
||||
@@ -273,7 +265,7 @@ return array(
|
||||
'value' => array($result['phpenabled'])
|
||||
),
|
||||
'allowed_phpconfigs' => array(
|
||||
'visible' => (((int) Settings::Get('system.mod_fcgid') == 1 || (int) Settings::Get('phpfpm.enabled') == 1) ? true : false),
|
||||
'visible' => (((int) \Froxlor\Settings::Get('system.mod_fcgid') == 1 || (int) \Froxlor\Settings::Get('phpfpm.enabled') == 1) ? true : false),
|
||||
'label' => $lng['admin']['phpsettings']['title'],
|
||||
'type' => 'checkbox',
|
||||
'values' => $phpconfigs,
|
||||
@@ -295,7 +287,7 @@ return array(
|
||||
array ('label' => $lng['panel']['yes'], 'value' => '1')
|
||||
),
|
||||
'value' => array($result['dnsenabled']),
|
||||
'visible' => (Settings::Get('system.dnsenabled') == '1' ? true : false)
|
||||
'visible' => (\Froxlor\Settings::Get('system.dnsenabled') == '1' ? true : false)
|
||||
),
|
||||
'logviewenabled' => array(
|
||||
'label' => $lng['admin']['logviewenabled'] . '?',
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Formfields
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'category_edit' => array(
|
||||
'title' => $lng['ticket']['ticket_editcateory'],
|
||||
'image' => 'icons/category_edit.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['ticket']['ticket_editcateory'],
|
||||
'image' => 'icons/category_edit.png',
|
||||
'fields' => array(
|
||||
'category' => array(
|
||||
'label' => $lng['ticket']['category'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 50,
|
||||
'value' => $row['name']
|
||||
),
|
||||
'logicalorder' => array(
|
||||
'label' => $lng['ticket']['logicalorder'],
|
||||
'desc' => $lng['ticket']['orderdesc'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 3,
|
||||
'value' => $row['logicalorder']
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Formfields
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'category_new' => array(
|
||||
'title' => $lng['ticket']['ticket_newcateory'],
|
||||
'image' => 'icons/category_new.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['ticket']['ticket_newcateory'],
|
||||
'image' => 'icons/category_new.png',
|
||||
'fields' => array(
|
||||
'category' => array(
|
||||
'label' => $lng['ticket']['category'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 50
|
||||
),
|
||||
'logicalorder' => array(
|
||||
'label' => $lng['ticket']['logicalorder'],
|
||||
'desc' => $lng['ticket']['orderdesc'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 3,
|
||||
'value' => $order
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,58 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Formfields
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'ticket_new' => array(
|
||||
'title' => $lng['ticket']['ticket_new'],
|
||||
'image' => 'icons/ticket_new.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['ticket']['ticket_new'],
|
||||
'image' => 'icons/ticket_new.png',
|
||||
'fields' => array(
|
||||
'customer' => array(
|
||||
'label' => $lng['ticket']['customer'],
|
||||
'type' => 'select',
|
||||
'select_var' => $customers
|
||||
),
|
||||
'subject' => array(
|
||||
'label' => $lng['ticket']['subject'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 70
|
||||
),
|
||||
'priority' => array(
|
||||
'label' => $lng['ticket']['priority'],
|
||||
'type' => 'select',
|
||||
'select_var' => $priorities
|
||||
),
|
||||
'category' => array(
|
||||
'label' => $lng['ticket']['category'],
|
||||
'type' => 'select',
|
||||
'select_var' => $categories
|
||||
),
|
||||
'message' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['ticket']['message'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 60,
|
||||
'rows' => 12
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,54 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Formfields
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'ticket_reply' => array(
|
||||
'title' => $lng['ticket']['ticket_reply'],
|
||||
'image' => 'icons/ticket_reply.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'visible' => ($isclosed == 0 ? true : false),
|
||||
'title' => $lng['ticket']['ticket_reply'],
|
||||
'image' => 'icons/ticket_reply.png',
|
||||
'fields' => array(
|
||||
'subject' => array(
|
||||
'label' => $lng['ticket']['subject'],
|
||||
'type' => 'text',
|
||||
'value' => 'Re: '.$subject
|
||||
),
|
||||
'priority' => array(
|
||||
'label' => $lng['ticket']['priority'],
|
||||
'type' => 'select',
|
||||
'select_var' => $priorities
|
||||
),
|
||||
'category' => array(
|
||||
'label' => $lng['ticket']['category'],
|
||||
'type' => 'label',
|
||||
'value' => htmlentities($row['name']),
|
||||
),
|
||||
'message' => array(
|
||||
'style' => 'align-top',
|
||||
'label' => $lng['ticket']['message'],
|
||||
'type' => 'textarea',
|
||||
'cols' => 60,
|
||||
'rows' => 12
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,50 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Formfields
|
||||
*/
|
||||
|
||||
return array(
|
||||
'ticket_add' => array(
|
||||
'title' => $lng['ticket']['ticket_new'],
|
||||
'image' => 'icons/ticket_add.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['ticket']['ticket_new'],
|
||||
'image' => 'icons/ticket_add.png',
|
||||
'fields' => array(
|
||||
'subject' => array(
|
||||
'label' => $lng['ticket']['subject'],
|
||||
'type' => 'text',
|
||||
),
|
||||
'priority' => array(
|
||||
'label' => $lng['ticket']['priority'],
|
||||
'type' => 'select',
|
||||
'select_var' => $priorities,
|
||||
),
|
||||
'category' => array(
|
||||
'label' => $lng['ticket']['category'],
|
||||
'type' => 'select',
|
||||
'select_var' => $categories,
|
||||
),
|
||||
'message' => array(
|
||||
'label' => $lng['ticket']['message'],
|
||||
'type' => 'textarea',
|
||||
'rows' => 12,
|
||||
'cols' => 60,
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Formfields
|
||||
*/
|
||||
|
||||
return array(
|
||||
'ticket_reply' => array(
|
||||
'title' => $lng['ticket']['ticket_reply'],
|
||||
'image' => 'icons/ticket_reply.png',
|
||||
'sections' => array(
|
||||
'section_a' => array(
|
||||
'title' => $lng['ticket']['ticket_reply'],
|
||||
'image' => 'icons/ticket_reply.png',
|
||||
'fields' => array(
|
||||
'subject' => array(
|
||||
'label' => $lng['ticket']['subject'],
|
||||
'type' => 'text',
|
||||
'value' => "Re: $subject",
|
||||
),
|
||||
'priority' => array(
|
||||
'label' => $lng['ticket']['priority'],
|
||||
'type' => 'select',
|
||||
'select_var' => $priorities,
|
||||
),
|
||||
'category' => array(
|
||||
'label' => $lng['ticket']['category'],
|
||||
'type' => 'label',
|
||||
'value' => $row['name'],
|
||||
),
|
||||
'message' => array(
|
||||
'label' => $lng['ticket']['message'],
|
||||
'type' => 'textarea',
|
||||
'rows' => 12,
|
||||
'cols' => 60,
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -17,6 +17,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use \Froxlor\Database\Database;
|
||||
|
||||
/**
|
||||
* Function which updates all counters of used ressources in panel_admins and panel_customers
|
||||
* @param bool Set to true to get an array with debug information
|
||||
@@ -53,7 +55,7 @@ function updateCounters($returndebuginfo = false) {
|
||||
_addResourceCountEx($admin_resources[$cur_adm], $customer, 'diskspace_used', 'diskspace');
|
||||
_addResourceCountEx($admin_resources[$cur_adm], $customer, 'traffic_used', 'traffic_used'); // !!! yes, USED and USED
|
||||
|
||||
foreach (array('mysqls', 'ftps', 'emails', 'email_accounts', 'tickets', 'email_forwarders', 'email_quota', 'subdomains') as $field) {
|
||||
foreach (array('mysqls', 'ftps', 'emails', 'email_accounts', 'email_forwarders', 'email_quota', 'subdomains') as $field) {
|
||||
_addResourceCount($admin_resources[$cur_adm], $customer, $field.'_used', $field);
|
||||
}
|
||||
|
||||
@@ -95,10 +97,6 @@ function updateCounters($returndebuginfo = false) {
|
||||
$customer_ftps = Database::pexecute_first($customer_ftps_stmt, array("cid" => $customer['customerid']));
|
||||
$customer['ftps_used_new'] = ((int)$customer_ftps['number_ftps'] - 1);
|
||||
|
||||
$customer_tickets_stmt = Database::prepare('SELECT COUNT(*) AS `number_tickets` FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto` = "0" AND `customerid` = :cid');
|
||||
$customer_tickets = Database::pexecute_first($customer_tickets_stmt, array("cid" => $customer['customerid']));
|
||||
$customer['tickets_used_new'] = (int)$customer_tickets['number_tickets'];
|
||||
|
||||
$customer_subdomains_stmt = Database::prepare('SELECT COUNT(*) AS `number_subdomains` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = :cid AND `parentdomainid` <> "0"');
|
||||
$customer_subdomains = Database::pexecute_first($customer_subdomains_stmt, array("cid" => $customer['customerid']));
|
||||
$customer['subdomains_used_new'] = (int)$customer_subdomains['number_subdomains'];
|
||||
@@ -114,7 +112,6 @@ function updateCounters($returndebuginfo = false) {
|
||||
`email_forwarders_used` = :email_forwarders_used,
|
||||
`email_quota_used` = :email_quota_used,
|
||||
`ftps_used` = :ftps_used,
|
||||
`tickets_used` = :tickets_used,
|
||||
`subdomains_used` = :subdomains_used
|
||||
WHERE `customerid` = :cid'
|
||||
);
|
||||
@@ -125,7 +122,6 @@ function updateCounters($returndebuginfo = false) {
|
||||
"email_forwarders_used" => $customer['email_forwarders_used_new'],
|
||||
"email_quota_used" => $customer['email_quota_used_new'],
|
||||
"ftps_used" => $customer['ftps_used_new'],
|
||||
"tickets_used" => $customer['tickets_used_new'],
|
||||
"subdomains_used" => $customer['subdomains_used_new'],
|
||||
"cid" => $customer['customerid']
|
||||
);
|
||||
@@ -155,7 +151,7 @@ function updateCounters($returndebuginfo = false) {
|
||||
$admin_resources[$cur_adm] = array();
|
||||
}
|
||||
|
||||
foreach (array('diskspace_used', 'traffic_used', 'mysqls_used', 'ftps_used', 'emails_used', 'email_accounts_used', 'tickets_used', 'email_forwarders_used', 'email_quota_used', 'subdomains_used') as $field) {
|
||||
foreach (array('diskspace_used', 'traffic_used', 'mysqls_used', 'ftps_used', 'emails_used', 'email_accounts_used', 'email_forwarders_used', 'email_quota_used', 'subdomains_used') as $field) {
|
||||
_initArrField($field, $admin_resources[$cur_adm], 0);
|
||||
$admin[$field.'_new'] = $admin_resources[$cur_adm][$field];
|
||||
}
|
||||
@@ -170,7 +166,6 @@ function updateCounters($returndebuginfo = false) {
|
||||
`email_forwarders_used` = :email_forwarders_used,
|
||||
`email_quota_used` = :email_quota_used,
|
||||
`ftps_used` = :ftps_used,
|
||||
`tickets_used` = :tickets_used,
|
||||
`subdomains_used` = :subdomains_used,
|
||||
`traffic_used` = :traffic_used
|
||||
WHERE `adminid` = :aid'
|
||||
@@ -186,7 +181,6 @@ function updateCounters($returndebuginfo = false) {
|
||||
"email_forwarders_used" => $admin['email_forwarders_used_new'],
|
||||
"email_quota_used" => $admin['email_quota_used_new'],
|
||||
"ftps_used" => $admin['ftps_used_new'],
|
||||
"tickets_used" => $admin['tickets_used_new'],
|
||||
"subdomains_used" => $admin['subdomains_used_new'],
|
||||
"traffic_used" => $admin['traffic_used_new'],
|
||||
"aid" => $admin['adminid']
|
||||
|
||||
@@ -36,17 +36,17 @@ return array(
|
||||
array(
|
||||
'url' => 'customer_index.php?page=change_theme',
|
||||
'label' => $lng['menue']['main']['changetheme'],
|
||||
'show_element' => (Settings::Get('panel.allow_theme_change_customer') == true)
|
||||
'show_element' => (\Froxlor\Settings::Get('panel.allow_theme_change_customer') == true)
|
||||
),
|
||||
array(
|
||||
'url' => 'customer_index.php?page=apikeys',
|
||||
'label' => $lng['menue']['main']['apikeys'],
|
||||
'show_element' => (Settings::Get('api.enabled') == true)
|
||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||
),
|
||||
array(
|
||||
'url' => 'customer_index.php?page=apihelp',
|
||||
'label' => $lng['menue']['main']['apihelp'],
|
||||
'show_element' => (Settings::Get('api.enabled') == true)
|
||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||
),
|
||||
array(
|
||||
'url' => 'customer_index.php?action=logout',
|
||||
@@ -57,7 +57,7 @@ return array(
|
||||
'email' => array(
|
||||
'url' => 'customer_email.php',
|
||||
'label' => $lng['menue']['email']['email'],
|
||||
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'email')),
|
||||
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'email')),
|
||||
'elements' => array(
|
||||
array(
|
||||
'url' => 'customer_email.php?page=emails',
|
||||
@@ -70,18 +70,18 @@ return array(
|
||||
'required_resources' => 'emails'
|
||||
),
|
||||
array(
|
||||
'url' => Settings::Get('panel.webmail_url'),
|
||||
'url' => \Froxlor\Settings::Get('panel.webmail_url'),
|
||||
'new_window' => true,
|
||||
'label' => $lng['menue']['email']['webmail'],
|
||||
'required_resources' => 'emails_used',
|
||||
'show_element' => (Settings::Get('panel.webmail_url') != '')
|
||||
'show_element' => (\Froxlor\Settings::Get('panel.webmail_url') != '')
|
||||
)
|
||||
)
|
||||
),
|
||||
'mysql' => array(
|
||||
'url' => 'customer_mysql.php',
|
||||
'label' => $lng['menue']['mysql']['mysql'],
|
||||
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'mysql')),
|
||||
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'mysql')),
|
||||
'elements' => array(
|
||||
array(
|
||||
'url' => 'customer_mysql.php?page=mysqls',
|
||||
@@ -89,18 +89,18 @@ return array(
|
||||
'required_resources' => 'mysqls'
|
||||
),
|
||||
array(
|
||||
'url' => Settings::Get('panel.phpmyadmin_url'),
|
||||
'url' => \Froxlor\Settings::Get('panel.phpmyadmin_url'),
|
||||
'new_window' => true,
|
||||
'label' => $lng['menue']['mysql']['phpmyadmin'],
|
||||
'required_resources' => 'mysqls_used',
|
||||
'show_element' => (Settings::Get('panel.phpmyadmin_url') != '')
|
||||
'show_element' => (\Froxlor\Settings::Get('panel.phpmyadmin_url') != '')
|
||||
)
|
||||
)
|
||||
),
|
||||
'domains' => array(
|
||||
'url' => 'customer_domains.php',
|
||||
'label' => $lng['menue']['domains']['domains'],
|
||||
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'domains')),
|
||||
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'domains')),
|
||||
'elements' => array(
|
||||
array(
|
||||
'url' => 'customer_domains.php?page=domains',
|
||||
@@ -115,51 +115,51 @@ return array(
|
||||
'ftp' => array(
|
||||
'url' => 'customer_ftp.php',
|
||||
'label' => $lng['menue']['ftp']['ftp'],
|
||||
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'ftp')),
|
||||
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'ftp')),
|
||||
'elements' => array(
|
||||
array(
|
||||
'url' => 'customer_ftp.php?page=accounts',
|
||||
'label' => $lng['menue']['ftp']['accounts']
|
||||
),
|
||||
array(
|
||||
'url' => Settings::Get('panel.webftp_url'),
|
||||
'url' => \Froxlor\Settings::Get('panel.webftp_url'),
|
||||
'new_window' => true,
|
||||
'label' => $lng['menue']['ftp']['webftp'],
|
||||
'show_element' => (Settings::Get('panel.webftp_url') != '')
|
||||
'show_element' => (\Froxlor\Settings::Get('panel.webftp_url') != '')
|
||||
)
|
||||
)
|
||||
),
|
||||
'extras' => array(
|
||||
'url' => 'customer_extras.php',
|
||||
'label' => $lng['menue']['extras']['extras'],
|
||||
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'extras')),
|
||||
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'extras')),
|
||||
'elements' => array(
|
||||
array(
|
||||
'url' => 'customer_extras.php?page=htpasswds',
|
||||
'label' => $lng['menue']['extras']['directoryprotection'],
|
||||
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'extras.directoryprotection'))
|
||||
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'extras.directoryprotection'))
|
||||
),
|
||||
array(
|
||||
'url' => 'customer_extras.php?page=htaccess',
|
||||
'label' => $lng['menue']['extras']['pathoptions'],
|
||||
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'extras.pathoptions'))
|
||||
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'extras.pathoptions'))
|
||||
),
|
||||
array(
|
||||
'url' => 'customer_logger.php?page=log',
|
||||
'label' => $lng['menue']['logger']['logger'],
|
||||
'show_element' => (Settings::Get('logger.enabled') == true) && (! Settings::IsInList('panel.customer_hide_options', 'extras.logger'))
|
||||
'show_element' => (\Froxlor\Settings::Get('logger.enabled') == true) && (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'extras.logger'))
|
||||
),
|
||||
array(
|
||||
'url' => 'customer_extras.php?page=backup',
|
||||
'label' => $lng['menue']['extras']['backup'],
|
||||
'show_element' => (Settings::Get('system.backupenabled') == true) && (! Settings::IsInList('panel.customer_hide_options', 'extras.backup'))
|
||||
'show_element' => (\Froxlor\Settings::Get('system.backupenabled') == true) && (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'extras.backup'))
|
||||
)
|
||||
)
|
||||
),
|
||||
'traffic' => array(
|
||||
'url' => 'customer_traffic.php',
|
||||
'label' => $lng['menue']['traffic']['traffic'],
|
||||
'show_element' => (! Settings::IsInList('panel.customer_hide_options', 'traffic')),
|
||||
'show_element' => (! \Froxlor\Settings::IsInList('panel.customer_hide_options', 'traffic')),
|
||||
'elements' => array(
|
||||
array(
|
||||
'url' => 'customer_traffic.php?page=current',
|
||||
@@ -187,17 +187,17 @@ return array(
|
||||
array(
|
||||
'url' => 'admin_index.php?page=change_theme',
|
||||
'label' => $lng['menue']['main']['changetheme'],
|
||||
'show_element' => (Settings::Get('panel.allow_theme_change_admin') == true)
|
||||
'show_element' => (\Froxlor\Settings::Get('panel.allow_theme_change_admin') == true)
|
||||
),
|
||||
array(
|
||||
'url' => 'admin_index.php?page=apikeys',
|
||||
'label' => $lng['menue']['main']['apikeys'],
|
||||
'show_element' => (Settings::Get('api.enabled') == true)
|
||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||
),
|
||||
array(
|
||||
'url' => 'admin_index.php?page=apihelp',
|
||||
'label' => $lng['menue']['main']['apihelp'],
|
||||
'show_element' => (Settings::Get('api.enabled') == true)
|
||||
'show_element' => (\Froxlor\Settings::Get('api.enabled') == true)
|
||||
),
|
||||
array(
|
||||
'url' => 'admin_index.php?action=logout',
|
||||
@@ -280,7 +280,7 @@ return array(
|
||||
'url' => 'admin_logger.php?page=log',
|
||||
'label' => $lng['menue']['logger']['logger'],
|
||||
'required_resources' => 'change_serversettings',
|
||||
'show_element' => (Settings::Get('logger.enabled') == true)
|
||||
'show_element' => (\Froxlor\Settings::Get('logger.enabled') == true)
|
||||
),
|
||||
array(
|
||||
'url' => 'admin_settings.php?page=rebuildconfigs',
|
||||
@@ -297,7 +297,7 @@ return array(
|
||||
'url' => 'admin_settings.php?page=wipecleartextmailpws',
|
||||
'label' => $lng['admin']['wipecleartextmailpwd'],
|
||||
'required_resources' => 'change_serversettings',
|
||||
'show_element' => (Settings::Get('system.mailpwcleartext') == true)
|
||||
'show_element' => (\Froxlor\Settings::Get('system.mailpwcleartext') == true)
|
||||
)
|
||||
)
|
||||
),
|
||||
@@ -308,13 +308,13 @@ return array(
|
||||
array(
|
||||
'url' => 'admin_phpsettings.php?page=overview',
|
||||
'label' => $lng['menue']['phpsettings']['maintitle'],
|
||||
'show_element' => (Settings::Get('system.mod_fcgid') == true || Settings::Get('phpfpm.enabled') == true)
|
||||
'show_element' => (\Froxlor\Settings::Get('system.mod_fcgid') == true || \Froxlor\Settings::Get('phpfpm.enabled') == true)
|
||||
),
|
||||
array(
|
||||
'url' => 'admin_phpsettings.php?page=fpmdaemons',
|
||||
'label' => $lng['menue']['phpsettings']['fpmdaemons'],
|
||||
'required_resources' => 'change_serversettings',
|
||||
'show_element' => Settings::Get('phpfpm.enabled') == true
|
||||
'show_element' => \Froxlor\Settings::Get('phpfpm.enabled') == true
|
||||
),
|
||||
array(
|
||||
'url' => 'admin_settings.php?page=phpinfo',
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Navigation
|
||||
*
|
||||
*/
|
||||
|
||||
return array (
|
||||
'customer' => array (
|
||||
'tickets' => array (
|
||||
'url' => 'customer_tickets.php',
|
||||
'label' => $lng['menue']['ticket']['ticket'],
|
||||
'show_element' => ( Settings::Get('ticket.enabled') == true ),
|
||||
'elements' => array (
|
||||
array (
|
||||
'url' => 'customer_tickets.php?page=tickets',
|
||||
'label' => $lng['menue']['ticket']['ticket'],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
'admin' => array (
|
||||
'tickets' => array (
|
||||
'label' => $lng['admin']['ticketsystem'],
|
||||
'show_element' => ( Settings::Get('ticket.enabled') == true ),
|
||||
'elements' => array (
|
||||
array (
|
||||
'url' => 'admin_tickets.php?page=tickets',
|
||||
'label' => $lng['menue']['ticket']['ticket'],
|
||||
),
|
||||
array (
|
||||
'url' => 'admin_tickets.php?page=archive',
|
||||
'label' => $lng['menue']['ticket']['archive'],
|
||||
),
|
||||
array (
|
||||
'url' => 'admin_tickets.php?page=categories',
|
||||
'label' => $lng['menue']['ticket']['categories'],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
@@ -565,111 +565,9 @@ $lng['admin']['webalizer']['veryquiet'] = 'Aucune sortie';
|
||||
$lng['serversettings']['webalizer_quiet']['title'] = 'Sortie Webalizer';
|
||||
$lng['serversettings']['webalizer_quiet']['description'] = 'Verbosité du programme Webalizer';
|
||||
|
||||
// ADDED IN 1.2.18-svn3
|
||||
|
||||
$lng['ticket']['admin_email'] = 'root@localhost';
|
||||
$lng['ticket']['noreply_email'] = 'billets@froxlor';
|
||||
$lng['admin']['ticketsystem'] = 'Système de tickets';
|
||||
$lng['menue']['ticket']['ticket'] = 'Tickets support';
|
||||
$lng['menue']['ticket']['categories'] = 'Catégories de support';
|
||||
$lng['menue']['ticket']['archive'] = 'Archives de tickets';
|
||||
$lng['ticket']['description'] = 'Entrez une description !';
|
||||
$lng['ticket']['ticket_new'] = 'Ouvrir un nouveau ticket';
|
||||
$lng['ticket']['ticket_reply'] = 'Réponse au ticket';
|
||||
$lng['ticket']['ticket_reopen'] = 'Réouvrir le ticket';
|
||||
$lng['ticket']['ticket_newcateory'] = 'Créer une nouvelle catégorie';
|
||||
$lng['ticket']['ticket_editcateory'] = 'Editer la catégorie';
|
||||
$lng['ticket']['ticket_view'] = 'Voir l\'historique du ticket';
|
||||
$lng['ticket']['ticketcount'] = 'Tickets';
|
||||
$lng['ticket']['ticket_answers'] = 'Réponses';
|
||||
// $lng['ticket']['lastchange'] = 'Dernière action';
|
||||
$lng['ticket']['lastchange'] = 'Dernier changement';
|
||||
$lng['ticket']['subject'] = 'Sujet';
|
||||
$lng['ticket']['status'] = 'Etat';
|
||||
$lng['ticket']['lastreplier'] = 'Dernière réponse de';
|
||||
$lng['ticket']['priority'] = 'Priorité';
|
||||
$lng['ticket']['low'] = 'Basse';
|
||||
$lng['ticket']['normal'] = 'Normale';
|
||||
$lng['ticket']['high'] = 'Haute';
|
||||
$lng['ticket']['lastchange_from'] = 'Depuis (jj.mm.aaaa)';
|
||||
$lng['ticket']['lastchange_to'] = 'Jusqu\'au (jj.mm.aaaa)';
|
||||
$lng['ticket']['category'] = 'Catégorie';
|
||||
$lng['ticket']['no_cat'] = 'Aucune';
|
||||
$lng['ticket']['message'] = 'Message';
|
||||
$lng['ticket']['show'] = 'Voir';
|
||||
$lng['ticket']['answer'] = 'Répondre';
|
||||
$lng['ticket']['close'] = 'Fermer';
|
||||
$lng['ticket']['reopen'] = 'Réouvrir';
|
||||
$lng['ticket']['archive'] = 'Archive';
|
||||
$lng['ticket']['ticket_delete'] = 'Effacer le ticket';
|
||||
$lng['ticket']['lastarchived'] = 'Tickets récemment archivés';
|
||||
$lng['ticket']['archivedtime'] = 'Archivé';
|
||||
$lng['ticket']['open'] = 'Ouvert';
|
||||
$lng['ticket']['wait_reply'] = 'Attente d\'une réponse';
|
||||
$lng['ticket']['replied'] = 'Répondu';
|
||||
$lng['ticket']['closed'] = 'Fermé';
|
||||
$lng['ticket']['staff'] = 'L\'équipe';
|
||||
$lng['ticket']['customer'] = 'Client';
|
||||
$lng['ticket']['old_tickets'] = 'Messages du ticket';
|
||||
$lng['ticket']['search'] = 'Rechercher dans les archives';
|
||||
$lng['ticket']['nocustomer'] = 'Aucun choix';
|
||||
$lng['ticket']['archivesearch'] = 'Résultat de la recherche dans les archives';
|
||||
$lng['ticket']['noresults'] = 'Aucun ticket trouvé';
|
||||
$lng['ticket']['notmorethanxopentickets'] = 'Pour éviter les abus, vous ne pouvez avoir plus de %s tickets ouverts';
|
||||
$lng['ticket']['supportstatus'] = 'Etat du support';
|
||||
$lng['ticket']['supportavailable'] = '<span class="ticket_low">Nos équipes de support sont disponibles et prètes à vous assister.</span>';
|
||||
$lng['ticket']['supportnotavailable'] = '<span class="ticket_high">Nos équipes de support ne sont actuellement pas disponibles.</span>';
|
||||
$lng['admin']['templates']['ticket'] = 'E-mail de notification pour les tickets de support';
|
||||
$lng['admin']['templates']['SUBJECT'] = 'Sera remplacé par le sujet du ticket de support.';
|
||||
$lng['admin']['templates']['new_ticket_for_customer'] = 'Informe le client que le ticket a été envoyé';
|
||||
$lng['admin']['templates']['new_ticket_by_customer'] = 'Notifie l\'administrateur qu\'un nouveau ticket a été ouvert par un client';
|
||||
$lng['admin']['templates']['new_reply_ticket_by_customer'] = 'Notifie l\'administrateur d\'une réponse du client au ticket';
|
||||
$lng['admin']['templates']['new_ticket_by_staff'] = 'Informe le client qu\'un ticket a été ouvert par l\'équipe de support';
|
||||
$lng['admin']['templates']['new_reply_ticket_by_staff'] = 'Informe le client d\'une réponse de l\'équipe de support au ticket';
|
||||
$lng['mails']['new_ticket_for_customer']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nVotre demande de ticket de support ayant comme sujet "{SUBJECT}" a été envoyé.\n\nVous receverez une notification lorsque votre billet aura une réponse.\n\nMerci,\nL\'équipe Froxlor.';
|
||||
$lng['mails']['new_ticket_for_customer']['subject'] = 'Votre ticket de support a été envoyé';
|
||||
$lng['mails']['new_ticket_by_customer']['mailbody'] = 'Bonjour administrateur,\n\nUn nouveau ticket de support ayant comme sujet "{SUBJECT}" a été ouvert.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nl\'équipe Froxlor.';
|
||||
$lng['mails']['new_ticket_by_customer']['subject'] = 'Nouveau ticket de support soumis';
|
||||
$lng['mails']['new_reply_ticket_by_customer']['mailbody'] = 'Bonjour administrateur,\n\nLe ticket de support "{SUBJECT}" a reçu une réponse de la part du client.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nL\'équipe Froxlor.';
|
||||
$lng['mails']['new_reply_ticket_by_customer']['subject'] = 'Nouvelle réponse au ticket de support';
|
||||
$lng['mails']['new_ticket_by_staff']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nUn ticket de support ayant comme sujet "{SUBJECT}" a été ouvert pour vous par notre équipe.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nL\'équipe Froxlor.';
|
||||
$lng['mails']['new_ticket_by_staff']['subject'] = 'Nouvelle demande de support soumise';
|
||||
$lng['mails']['new_reply_ticket_by_staff']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nLe ticket de support ayant comme sujet "{SUBJECT}" a reçu une réponse par notre équipe.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nL\équipe Froxlor.';
|
||||
$lng['mails']['new_reply_ticket_by_staff']['subject'] = 'Nouvelle réponse au ticket de support';
|
||||
$lng['question']['ticket_reallyclose'] = 'Etes-vous sûr de vouloir clôturer le ticket "%s" ?';
|
||||
$lng['question']['ticket_reallydelete'] = 'Etes-vous sûr de vouloir supprimer le ticket "%s" ?';
|
||||
$lng['question']['ticket_reallydeletecat'] = 'Etes-vous sûr de vouloir supprimer la catégorie "%s" ?';
|
||||
$lng['question']['ticket_reallyarchive'] = 'Etes-vous sûr de vouloir archiver le ticket "%s" ?';
|
||||
$lng['error']['nomoreticketsavailable'] = 'Vous n\'avez plus de tickets de disponibles. Veuillez contacter votre administrateur.';
|
||||
$lng['error']['nocustomerforticket'] = 'Impossible de créer un ticket sans clients dans la base';
|
||||
$lng['error']['categoryhastickets'] = 'La catégorie possède des tickets.<br />Veuillez d\'abord supprimer tous les tickets de cette catégorie.';
|
||||
$lng['admin']['ticketsettings'] = 'Paramètres des tickets de support';
|
||||
$lng['admin']['archivelastrun'] = 'Derniers tickets archivés';
|
||||
$lng['serversettings']['ticket']['noreply_email']['title'] = 'Adresse e-mail de non réponse';
|
||||
$lng['serversettings']['ticket']['noreply_email']['description'] = 'L\'adresse e-mail de l\'expéditeur de notification pour les tickets de support, quelque chose du type no-reply@domaine.com';
|
||||
$lng['serversettings']['ticket']['worktime_begin']['title'] = 'Début du support (hh:mm)';
|
||||
$lng['serversettings']['ticket']['worktime_begin']['description'] = 'Horaire de début du support';
|
||||
$lng['serversettings']['ticket']['worktime_end']['title'] = 'Fin du support (hh:mm)';
|
||||
$lng['serversettings']['ticket']['worktime_end']['description'] = 'Horaire de fin du support';
|
||||
$lng['serversettings']['ticket']['worktime_sat'] = 'Support disponible le samedi ?';
|
||||
$lng['serversettings']['ticket']['worktime_sun'] = 'Support disponible le dimanche ?';
|
||||
$lng['serversettings']['ticket']['worktime_all']['title'] = 'Aucune limite horaire pour le support';
|
||||
$lng['serversettings']['ticket']['worktime_all']['description'] = 'Si "Oui", les options pour le début et la fin du support seront écrasés.';
|
||||
$lng['serversettings']['ticket']['archiving_days'] = 'Après combien de jours un ticket fermé sera automatiquement archivé ?';
|
||||
$lng['customer']['tickets'] = 'Ticket de support';
|
||||
|
||||
// ADDED IN 1.2.18-svn4
|
||||
|
||||
$lng['admin']['domain_nocustomeraddingavailable'] = 'Il n\'est acutellement pas possible d\'ajouter de domaines. Vous devez d\'abord ajouter un client.';
|
||||
$lng['serversettings']['ticket']['enable'] = 'Activer le système de tickets';
|
||||
$lng['serversettings']['ticket']['concurrentlyopen'] = 'Combien de tickets peuvent être ouverts au même moment ?';
|
||||
$lng['error']['norepymailiswrong'] = 'L\'adresse de "non réponse" n\'est pas bonne. Une adresse e-mail valide doit être entrée.';
|
||||
$lng['error']['tadminmailiswrong'] = 'L\'adresse de "l\'administrateur de tickets" n\'est pas bonne. Une adresse e-mail valide doit être entrée.';
|
||||
$lng['ticket']['awaitingticketreply'] = 'Vous avez %s ticket(s) de support non répondu(s).';
|
||||
|
||||
// ADDED IN 1.2.18-svn5
|
||||
|
||||
$lng['serversettings']['ticket']['noreply_name'] = 'Nom de l\'expéditeur e-mail des tickets';
|
||||
|
||||
// ADDED IN 1.2.19-svn1
|
||||
|
||||
@@ -677,16 +575,6 @@ $lng['serversettings']['mod_fcgid']['configdir']['title'] = 'Dossier de configur
|
||||
$lng['serversettings']['mod_fcgid']['configdir']['description'] = 'Oû doivent être stockés les fichiers de configuration pour FCGI ?';
|
||||
$lng['serversettings']['mod_fcgid']['tmpdir']['title'] = 'Dossier temporaire pour FCGI';
|
||||
|
||||
// ADDED IN 1.2.19-svn3
|
||||
|
||||
$lng['serversettings']['ticket']['reset_cycle']['title'] = 'Intervalle de réinitialisation des tickets utilisés';
|
||||
$lng['serversettings']['ticket']['reset_cycle']['description'] = 'Remettre le compteur de tickets à 0 dans le temps imparti';
|
||||
$lng['admin']['tickets']['daily'] = 'Journalière';
|
||||
$lng['admin']['tickets']['weekly'] = 'Hebdomadaire';
|
||||
$lng['admin']['tickets']['monthly'] = 'Mensuelle';
|
||||
$lng['admin']['tickets']['yearly'] = 'Annuelle';
|
||||
$lng['error']['ticketresetcycleiswrong'] = 'L\'intervalle de réinitialisation doit être "journalière", "hebdomadaire", "mensuelle" ou "annuelle".';
|
||||
|
||||
// ADDED IN 1.2.19-svn4
|
||||
|
||||
$lng['menue']['traffic']['traffic'] = 'Trafic';
|
||||
@@ -800,7 +688,6 @@ $lng['admin']['caneditphpsettings'] = 'Peut changer les paramétres PHP du domai
|
||||
|
||||
$lng['admin']['allips'] = 'Toutes les adresses IP';
|
||||
$lng['panel']['nosslipsavailable'] = 'Il n\'y a actuellement aucune combinaison IP / Port configurer pour SSL';
|
||||
$lng['ticket']['by'] = 'de ';
|
||||
$lng['dkim']['use_dkim']['title'] = 'Activer le support DKIM ?';
|
||||
$lng['dkim']['use_dkim']['description'] = 'Voulez-vous utiliser le système DKIM (DomainKeys Identified Mail) ?';
|
||||
$lng['error']['invalidmysqlhost'] = 'Adresse hôte MySQL invalide : "%s"';
|
||||
|
||||
@@ -550,111 +550,9 @@ $lng['admin']['webalizer']['quiet'] = 'Modesto';
|
||||
$lng['admin']['webalizer']['veryquiet'] = 'Niente';
|
||||
$lng['serversettings']['webalizer_quiet']['description'] = 'Verbosità del programma webalizer';
|
||||
|
||||
// ADDED IN 1.2.18-svn3
|
||||
|
||||
$lng['ticket']['admin_email'] = 'root@localhost';
|
||||
$lng['ticket']['noreply_email'] = 'tickets@froxlor';
|
||||
$lng['admin']['ticketsystem'] = 'Supporto tecnico';
|
||||
$lng['menue']['ticket']['ticket'] = 'Supporto ticket';
|
||||
$lng['menue']['ticket']['categories'] = 'Categorie di supporto';
|
||||
$lng['menue']['ticket']['archive'] = 'Archivio Ticket';
|
||||
$lng['ticket']['description'] = 'Qui puoi inviare richieste di aiuto al supporto tecnico<br />La Notifica ti sarà spedita via e-mail.';
|
||||
$lng['ticket']['ticket_new'] = 'Apri un nuovo ticket';
|
||||
$lng['ticket']['ticket_reply'] = 'Rispondi al ticket';
|
||||
$lng['ticket']['ticket_reopen'] = 'Riapri il ticket';
|
||||
$lng['ticket']['ticket_newcateory'] = 'Crea una nuova categoria';
|
||||
$lng['ticket']['ticket_editcateory'] = 'Modifica categoria';
|
||||
$lng['ticket']['ticket_view'] = 'Visualizza il corso del ticket';
|
||||
$lng['ticket']['ticketcount'] = 'Ticket';
|
||||
$lng['ticket']['ticket_answers'] = 'Risposte';
|
||||
// $lng['ticket']['lastchange'] = 'Ultima azione';
|
||||
$lng['ticket']['lastchange'] = 'Ultima modifica';
|
||||
$lng['ticket']['subject'] = 'Soggetto';
|
||||
$lng['ticket']['status'] = 'Stato';
|
||||
$lng['ticket']['lastreplier'] = 'Ultimo che ha risposto';
|
||||
$lng['ticket']['priority'] = 'Priorità';
|
||||
$lng['ticket']['low'] = 'Bassa';
|
||||
$lng['ticket']['normal'] = 'Normale';
|
||||
$lng['ticket']['high'] = 'Alta';
|
||||
$lng['ticket']['lastchange_from'] = 'Dalla data (dd.mm.yyyy)';
|
||||
$lng['ticket']['lastchange_to'] = 'Alla data (dd.mm.yyyy)';
|
||||
$lng['ticket']['category'] = 'Categoria';
|
||||
$lng['ticket']['no_cat'] = 'Niente';
|
||||
$lng['ticket']['message'] = 'Messaggio';
|
||||
$lng['ticket']['show'] = 'Mostra';
|
||||
$lng['ticket']['answer'] = 'Risposta';
|
||||
$lng['ticket']['close'] = 'Chiudi';
|
||||
$lng['ticket']['reopen'] = 'Riapri';
|
||||
$lng['ticket']['archive'] = 'Archivio';
|
||||
$lng['ticket']['ticket_delete'] = 'Cancella ticket';
|
||||
$lng['ticket']['lastarchived'] = 'Ticket archiviati recentemente';
|
||||
$lng['ticket']['archivedtime'] = 'Archiviato';
|
||||
$lng['ticket']['open'] = 'Apri';
|
||||
$lng['ticket']['wait_reply'] = 'In attesa di risposta';
|
||||
$lng['ticket']['replied'] = 'Risposto';
|
||||
$lng['ticket']['closed'] = 'Chiuso';
|
||||
$lng['ticket']['staff'] = 'Staff';
|
||||
$lng['ticket']['customer'] = 'Cliente';
|
||||
$lng['ticket']['old_tickets'] = 'Messaggi Ticket';
|
||||
$lng['ticket']['search'] = 'Ricerca Archivio';
|
||||
$lng['ticket']['nocustomer'] = 'Nessuna scalta';
|
||||
$lng['ticket']['archivesearch'] = 'Risultati della ricerca in archivio';
|
||||
$lng['ticket']['noresults'] = 'Nessun ticket trovato';
|
||||
$lng['ticket']['notmorethanxopentickets'] = 'Causa protezione antispam non si possono aprire più di %s ticket';
|
||||
$lng['ticket']['supportstatus'] = 'Stato-Supporto';
|
||||
$lng['ticket']['supportavailable'] = '<span class="ticket_low">I nostri tecnici sono disponibili ad aiutarti.</span>';
|
||||
$lng['ticket']['supportnotavailable'] = '<span class="ticket_high">I nostri tecnici non sono al momento disponibili</span>';
|
||||
$lng['admin']['templates']['ticket'] = 'Email di notifica del ticket';
|
||||
$lng['admin']['templates']['SUBJECT'] = 'Sostituito con l\'oggetto del ticket';
|
||||
$lng['admin']['templates']['new_ticket_for_customer'] = 'Informazioni clienti il ticket è stato inviato';
|
||||
$lng['admin']['templates']['new_ticket_by_customer'] = 'Notifica Admin per un ticket aperto da un cliente';
|
||||
$lng['admin']['templates']['new_reply_ticket_by_customer'] = 'Notifica Admin per una risposta di un ticket da un cliente';
|
||||
$lng['admin']['templates']['new_ticket_by_staff'] = 'Notifica cliente per un ticket aperto dallo Staff';
|
||||
$lng['admin']['templates']['new_reply_ticket_by_staff'] = 'Notifica cliente per una risposta di un ticket dallo Staff';
|
||||
$lng['mails']['new_ticket_for_customer']['mailbody'] = 'Salve {FIRSTNAME} {NAME},\n\nil suo ticket con oggetto "{SUBJECT}" è stato spedito.\n\nRiceverai una notifica quando verrà data una risposta al tuo ticket.\n\nGrazie,\n Team Froxlor';
|
||||
$lng['mails']['new_ticket_for_customer']['subject'] = 'Il tuo ticket è stato spedito al support';
|
||||
$lng['mails']['new_ticket_by_customer']['mailbody'] = 'Salve amministratore,\n\nun nuovo ticket è stato aperto con oggetto: "{SUBJECT}".\n\nEffettua l\'accesso per aprire il ticket.\n\nGrazie,\n Team Froxlor';
|
||||
$lng['mails']['new_ticket_by_customer']['subject'] = 'Il nuovo ticket è stato inviato';
|
||||
$lng['mails']['new_reply_ticket_by_customer']['mailbody'] = 'Salve amministratore,\n\nil ticket con oggetto "{SUBJECT}" è stato replicato da un cliente.\n\nEffettua l\'accesso per aprire il ticket.\n\nGrazie,\n Team Froxlor';
|
||||
$lng['mails']['new_reply_ticket_by_customer']['subject'] = 'È stato risposto ad un ticket';
|
||||
$lng['mails']['new_ticket_by_staff']['mailbody'] = 'Salve {FIRSTNAME} {NAME},\n\nun nuovo ticket con oggetto "{SUBJECT}" è stato aperto a te.\n\nEffettua l\'accesso per aprire il ticket.\n\nGrazie,\n Team Froxlor';
|
||||
$lng['mails']['new_ticket_by_staff']['subject'] = 'Il nuovo ticket è stato inviato';
|
||||
$lng['mails']['new_reply_ticket_by_staff']['mailbody'] = 'Salve {FIRSTNAME} {NAME},\n\nil ticket con oggetto "{SUBJECT}" è stato replicato dal nostro Staff.\n\nEffettua l\'accesso per aprire il ticket.\n\nGrazie,\n Team Froxlor';
|
||||
$lng['mails']['new_reply_ticket_by_staff']['subject'] = 'È stato risposto ad un ticket';
|
||||
$lng['question']['ticket_reallyclose'] = 'Vuoi veramente chiudere il ticket"%s"?';
|
||||
$lng['question']['ticket_reallydelete'] = 'Vuoi veramente cancellare il ticket"%s"?';
|
||||
$lng['question']['ticket_reallydeletecat'] = 'Vuoi veramente eliminare la categoria "%s"?';
|
||||
$lng['question']['ticket_reallyarchive'] = 'Vuoi veramente spostare il ticket "%s" in archivio?';
|
||||
$lng['error']['nomoreticketsavailable'] = 'Sono stati usati tutti i ticket disponibili. Si prega di contattare l\'amministratore.';
|
||||
$lng['error']['nocustomerforticket'] = 'Impossibile creare ticket senza clienti';
|
||||
$lng['error']['categoryhastickets'] = 'La categoria contiene ancora ticket.<br />Si prega di cancellare i ticket per eliminare la categoria';
|
||||
$lng['admin']['ticketsettings'] = 'Impostazioni Gestione Ticket';
|
||||
$lng['admin']['archivelastrun'] = 'Ultimo ticket archiviato';
|
||||
$lng['serversettings']['ticket']['noreply_email']['title'] = 'Non rispondere a questo indirizzo email';
|
||||
$lng['serversettings']['ticket']['noreply_email']['description'] = 'L\'indirizzo email del mittente dei ticket di solito è no-reply@domain.tld';
|
||||
$lng['serversettings']['ticket']['worktime_begin']['title'] = 'Ora inizio(hh:mm)';
|
||||
$lng['serversettings']['ticket']['worktime_begin']['description'] = 'Ora di inizio quando il supporto è disponibile';
|
||||
$lng['serversettings']['ticket']['worktime_end']['title'] = 'Ora fine (hh:mm)';
|
||||
$lng['serversettings']['ticket']['worktime_end']['description'] = 'Ora di fine quando il supporto è online';
|
||||
$lng['serversettings']['ticket']['worktime_sat'] = 'Il supporto è disponibile al sabato?';
|
||||
$lng['serversettings']['ticket']['worktime_sun'] = 'Il supporto è disponibile la domenica?';
|
||||
$lng['serversettings']['ticket']['worktime_all']['title'] = 'Nessun limite di tempo per il supporto ';
|
||||
$lng['serversettings']['ticket']['worktime_all']['description'] = 'Se "Si" verranno sovrascritti gli orari di inizio e fine supporto';
|
||||
$lng['serversettings']['ticket']['archiving_days'] = 'Dopo quanti giorni vengono archiviati automaticamente i ticket chiusi?';
|
||||
$lng['customer']['tickets'] = 'Supporto tecnico - ticket';
|
||||
|
||||
// ADDED IN 1.2.18-svn4
|
||||
|
||||
$lng['admin']['domain_nocustomeraddingavailable'] = 'Adesso non è possibile aggiungere un dominio. Prima è necessario aggiungere almeno un cliente.';
|
||||
$lng['serversettings']['ticket']['enable'] = 'Abilita il sistema ticket';
|
||||
$lng['serversettings']['ticket']['concurrentlyopen'] = 'Quanti ticket si possono aprire in una sola volta?';
|
||||
$lng['error']['norepymailiswrong'] = '"Noreply-address" è errato. È ammesso solo un indirizzo email corretto.';
|
||||
$lng['error']['tadminmailiswrong'] = '"Ticketadmin-address" è errato. È ammesso solo un indirizzo email corretto.';
|
||||
$lng['ticket']['awaitingticketreply'] = 'Hai %s ticket senza risposta';
|
||||
|
||||
// ADDED IN 1.2.18-svn5
|
||||
|
||||
$lng['serversettings']['ticket']['noreply_name'] = 'Email del mittente del ticket';
|
||||
|
||||
// ADDED IN 1.2.19-svn1
|
||||
|
||||
@@ -662,16 +560,6 @@ $lng['serversettings']['mod_fcgid']['configdir']['title'] = 'Cartella della conf
|
||||
$lng['serversettings']['mod_fcgid']['configdir']['description'] = 'Dove vuoi che venga salvata la configurazione di fcgid? Se non ti sei compilato suexec da solo, di solito questo percorso è /var/www';
|
||||
$lng['serversettings']['mod_fcgid']['tmpdir']['title'] = 'Cartella Temp';
|
||||
|
||||
// ADDED IN 1.2.19-svn3
|
||||
|
||||
$lng['serversettings']['ticket']['reset_cycle']['title'] = 'Resetta il numero di ticker per un determinato periodo';
|
||||
$lng['serversettings']['ticket']['reset_cycle']['description'] = 'Resetta il numero di ticket che hanno usato i clienti per un determinato periodo';
|
||||
$lng['admin']['tickets']['daily'] = 'Giornaliero';
|
||||
$lng['admin']['tickets']['weekly'] = 'Settimanale';
|
||||
$lng['admin']['tickets']['monthly'] = 'Mensile';
|
||||
$lng['admin']['tickets']['yearly'] = 'Annuale';
|
||||
$lng['error']['ticketresetcycleiswrong'] = 'Il periodo di reset del numero ticket può essere "Giornaliero", "Settimanale", "Mensile" or "Annuale".';
|
||||
|
||||
// ADDED IN 1.2.19-svn4
|
||||
|
||||
$lng['menue']['traffic']['traffic'] = 'Traffico';
|
||||
@@ -769,7 +657,6 @@ $lng['admin']['caneditphpsettings'] = 'È possibile modificare le impostazioni d
|
||||
|
||||
$lng['admin']['allips'] = 'Tutti gli IP';
|
||||
$lng['panel']['nosslipsavailable'] = 'Attualmente non ci sono combinazioni ssl ip/porta per questo server';
|
||||
$lng['ticket']['by'] = 'da';
|
||||
$lng['dkim']['use_dkim']['title'] = 'Attivare il supporto DKIM?';
|
||||
$lng['dkim']['use_dkim']['description'] = 'Vuoi utilizzare il sistema Domain Keys (DKIM)?';
|
||||
$lng['error']['invalidmysqlhost'] = 'Indirizzo MySQL non valido: %s';
|
||||
@@ -1007,8 +894,6 @@ $lng['tasks']['rebuild_bindconfig'] = 'Ricostruzione della configurazione di bin
|
||||
$lng['tasks']['creating_ftpdir'] = 'Creazione delle cartelle per i nuovi utenti ftp';
|
||||
$lng['tasks']['deleting_customerfiles'] = 'Eliminazione dei file del cliente %loginname%';
|
||||
$lng['tasks']['noneoutstanding'] = 'Attualmente non ci sono processi in sospeso per Froxlor';
|
||||
$lng['ticket']['nonexistingcustomer'] = '(cliente cancellato)';
|
||||
$lng['admin']['ticket_nocustomeraddingavailable'] = 'Non è possibile aprire un nuovo ticket di supporto, al momento. Prima è necessario aggiungere almeno un cliente.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.1
|
||||
|
||||
@@ -1063,8 +948,6 @@ $lng['admin']['cron']['add'] = 'Aggiungi cronjob';
|
||||
$lng['crondesc']['cron_tasks'] = 'generazione del file di configurazione';
|
||||
$lng['crondesc']['cron_legacy'] = 'legacy (vecchi) cronjob';
|
||||
$lng['crondesc']['cron_traffic'] = 'calcolo del traffico';
|
||||
$lng['crondesc']['cron_ticketsreset'] = 'reset dei contatori dei ticket';
|
||||
$lng['crondesc']['cron_ticketarchive'] = 'archiviazione vecchi ticket';
|
||||
$lng['cronmgmt']['minutes'] = 'minuti';
|
||||
$lng['cronmgmt']['hours'] = 'ore';
|
||||
$lng['cronmgmt']['days'] = 'giorni';
|
||||
@@ -1095,8 +978,6 @@ $lng['panel']['neverloggedin'] = 'Nessun login effettuato';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn1
|
||||
$lng['serversettings']['defaultttl'] = 'Dominio TTL per impegnare in secondi (predefinito \'604800\' = 1 settimana)';
|
||||
$lng['ticket']['logicalorder'] = 'Ordine logico';
|
||||
$lng['ticket']['orderdesc'] = 'Qui è possibile definire il tuo ordine logico per le categorie dei ticket. Usa 1 - 999, i numeri più bassi sono mostrati prima.';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn3
|
||||
$lng['serversettings']['defaultwebsrverrhandler_enabled'] = 'Abilita errordocuments in automatico per tutti i clienti';
|
||||
@@ -1108,9 +989,6 @@ $lng['serversettings']['defaultwebsrverrhandler_err404'] = 'File/URL per l\'erro
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['title'] = 'File/URL per l\'errore 500';
|
||||
$lng['serversettings']['defaultwebsrverrhandler_err500']['description'] = '<div class="red">Non supportato in: lighttpd</div>';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn4
|
||||
$lng['serversettings']['ticket']['default_priority'] = 'Priorità predefinita per il supporto ticket';
|
||||
|
||||
// ADDED IN FROXLOR 0.9.6-svn5
|
||||
$lng['serversettings']['mod_fcgid']['defaultini'] = 'Configurazione di default di PHP per i nuovi domini';
|
||||
|
||||
@@ -1323,7 +1201,6 @@ $lng['traffic']['details'] = 'Dettagli';
|
||||
$lng['menue']['traffic']['table'] = 'Traffico';
|
||||
|
||||
$lng['error']['loginnameiswrong2'] = 'Il nome utente contiente troppi caratteri. Sono permessi soltanto %s caratteri.';
|
||||
$lng['error']['ticketnotaccessible'] = 'Non puoi accedere a questo ticket.';
|
||||
$lng['question']['admin_customer_alsoremovemail'] = 'Eliminare completamente i dati della posta elettronica dal filesystem??';
|
||||
$lng['question']['admin_customer_alsoremoveftphomedir'] = 'Rimuovere anche la cartella homedir dell\'utente FTP?';
|
||||
$lng['admin']['templates']['SALUTATION'] = 'Sostituito con un saluto corretto (nome o azienda)';
|
||||
@@ -1647,7 +1524,6 @@ $lng['serversettings']['catchall_enabled']['title'] = 'Usa Catchall';
|
||||
$lng['serversettings']['catchall_enabled']['description'] = 'Vuoi offrire ai tuoi clienti la funzionalità di catchall?';
|
||||
$lng['serversettings']['apache_24']['title'] = 'Usa impostazioni per Apache 2.4';
|
||||
$lng['serversettings']['apache_24']['description'] = '<strong class="red">ATTENZIONE:</strong> spunta soltanto se hai installato la versione 2.4 o superiore di Apache<br />altrimenti il tuo server Web non si avvierà';
|
||||
$lng['admin']['tickets_see_all'] = 'Può vedere tutte le categorie di ticket?';
|
||||
$lng['serversettings']['nginx_fastcgiparams']['title'] = 'Percorso al file fastcgi_params';
|
||||
$lng['serversettings']['nginx_fastcgiparams']['description'] = 'Specifica il percorso al file fastcgi_params di nginx includendo il nome del file';
|
||||
$lng['serversettings']['documentroot_use_default_value']['title'] = 'Usa il nome del dominio come valore predefinito per il percorso DocumentRoot (radice dei documenti)';
|
||||
|
||||
@@ -505,109 +505,10 @@ $lng['admin']['webalizer']['quiet'] = 'Quieto';
|
||||
$lng['admin']['webalizer']['veryquiet'] = 'Sem Saída';
|
||||
$lng['serversettings']['webalizer_quiet']['title'] = 'Saida do Webalizer';
|
||||
$lng['serversettings']['webalizer_quiet']['description'] = 'Modo verbose do webalizer';
|
||||
$lng['ticket']['admin_email'] = 'root@localhost';
|
||||
$lng['ticket']['noreply_email'] = 'tickets@froxlor';
|
||||
$lng['admin']['ticketsystem'] = 'Tickets de Suporte';
|
||||
$lng['menue']['ticket']['ticket'] = 'Tickets';
|
||||
$lng['menue']['ticket']['categories'] = 'Cotegorias de Suporte';
|
||||
$lng['menue']['ticket']['archive'] = 'Arquivo de Tickets';
|
||||
$lng['ticket']['description'] = 'Aqui você pode fazer perguntas ao administrador responsável';
|
||||
$lng['ticket']['ticket_new'] = 'Abrir um novo ticket';
|
||||
$lng['ticket']['ticket_reply'] = 'Responder um ticket';
|
||||
$lng['ticket']['ticket_reopen'] = 'Re-abrir um ticket';
|
||||
$lng['ticket']['ticket_newcateory'] = 'Recriar uma categoria';
|
||||
$lng['ticket']['ticket_editcateory'] = 'Editar uma categoria';
|
||||
$lng['ticket']['ticket_view'] = 'Ver Ticket';
|
||||
$lng['ticket']['ticketcount'] = 'Tickets';
|
||||
$lng['ticket']['ticket_answers'] = 'Respostas';
|
||||
$lng['ticket']['lastchange'] = 'Última troca';
|
||||
$lng['ticket']['subject'] = 'Assunto';
|
||||
$lng['ticket']['status'] = 'Status';
|
||||
$lng['ticket']['lastreplier'] = 'Último que respondeu';
|
||||
$lng['ticket']['priority'] = 'Prioridade';
|
||||
$lng['ticket']['low'] = 'Baixa';
|
||||
$lng['ticket']['normal'] = 'Normal';
|
||||
$lng['ticket']['high'] = 'Alta';
|
||||
$lng['ticket']['lastchange_from'] = 'De data (dd.mm.aaaa)';
|
||||
$lng['ticket']['lastchange_to'] = 'Até data (dd.mm.aaaa)';
|
||||
$lng['ticket']['category'] = 'Categoria';
|
||||
$lng['ticket']['no_cat'] = 'Nenhuma';
|
||||
$lng['ticket']['message'] = 'Mensagem';
|
||||
$lng['ticket']['show'] = 'Visualizar';
|
||||
$lng['ticket']['answer'] = 'Responder um ticket';
|
||||
$lng['ticket']['close'] = 'Fechar';
|
||||
$lng['ticket']['reopen'] = 'Re-abrir';
|
||||
$lng['ticket']['archive'] = 'Arquivo';
|
||||
$lng['ticket']['ticket_delete'] = 'Deletar Ticket';
|
||||
$lng['ticket']['lastarchived'] = 'Tickets recém arquivados';
|
||||
$lng['ticket']['archivedtime'] = 'Arquivado';
|
||||
$lng['ticket']['open'] = 'Aberto';
|
||||
$lng['ticket']['wait_reply'] = 'Esperando resposta';
|
||||
$lng['ticket']['replied'] = 'Respondido';
|
||||
$lng['ticket']['closed'] = 'Fechado';
|
||||
$lng['ticket']['staff'] = 'Equipe';
|
||||
$lng['ticket']['customer'] = 'Cliente';
|
||||
$lng['ticket']['old_tickets'] = 'Ticket de mensagens';
|
||||
$lng['ticket']['search'] = 'Procurar arquivo';
|
||||
$lng['ticket']['nocustomer'] = 'Sem escolha';
|
||||
$lng['ticket']['archivesearch'] = 'Arquivar resultados de busca';
|
||||
$lng['ticket']['noresults'] = 'Nenhum ticket encontrado';
|
||||
$lng['ticket']['notmorethanxopentickets'] = 'Devido a proteção anti-spam não se pode ter mais de %s bilhetes abertos';
|
||||
$lng['ticket']['supportstatus'] = 'Status de Suporte';
|
||||
$lng['ticket']['supportavailable'] = '<span class="ticket_low">Nossos engenheiros de suporte estão disponíveis e prontos a ajudar.</span>';
|
||||
$lng['ticket']['supportnotavailable'] = '<span class="ticket_high">Nossos engenheiros de suporte não estão actualmente disponíveis</span>';
|
||||
$lng['admin']['templates']['ticket'] = 'Emails de notificação para tickets de suporte';
|
||||
$lng['admin']['templates']['SUBJECT'] = 'Substituído por um assunto de ticket de suporte';
|
||||
$lng['admin']['templates']['new_ticket_for_customer'] = 'Informação do Cliente de que de que o Ticket foi gerado.';
|
||||
$lng['admin']['templates']['new_ticket_by_customer'] = 'Notificação do Admin para um ticket aberto por um cliente';
|
||||
$lng['admin']['templates']['new_reply_ticket_by_customer'] = 'Notificação do Admin para um ticket respondido por um cliente';
|
||||
$lng['admin']['templates']['new_ticket_by_staff'] = 'Notificação de cliente para um ticket aberto pela administração';
|
||||
$lng['admin']['templates']['new_reply_ticket_by_staff'] = 'Notificação do cliente para um ticket respondido pela administração';
|
||||
$lng['mails']['new_ticket_for_customer']['subject'] = 'Seu ticket de Suporte foi Enviado';
|
||||
$lng['mails']['new_ticket_by_customer']['subject'] = 'Novo pedido de Suporte';
|
||||
$lng['mails']['new_reply_ticket_by_customer']['mailbody'] = 'Oi admin,\n\no ticket de suporte "{SUBJECT}" foi respondido para o cliente.\n\nPor favor logue para abrir o ticket.\n\Obrigado,\nequipe Froxlor';
|
||||
$lng['mails']['new_reply_ticket_by_customer']['subject'] = 'Nova resposta para um ticket de supote';
|
||||
$lng['mails']['new_ticket_by_staff']['subject'] = 'Novo ticket enviado';
|
||||
$lng['mails']['new_reply_ticket_by_staff']['mailbody'] = 'Oi {FIRSTNAME} {NAME},\n\o ticket de suporte com o assunto "{SUBJECT}" foi respondido pelos seus administradores.\n\nPor favor logue para abrir esse ticket.\n\nObrigado,\nequipe Froxlor';
|
||||
$lng['mails']['new_reply_ticket_by_staff']['subject'] = 'Nova resposta para um ticket de supote';
|
||||
$lng['question']['ticket_reallyclose'] = 'Você deseja fechar o ticket"%s"?';
|
||||
$lng['question']['ticket_reallydelete'] = 'Você deseja apagar o ticket"%s"?';
|
||||
$lng['question']['ticket_reallydeletecat'] = 'Você deseja deletar a categoria "%s"?';
|
||||
$lng['question']['ticket_reallyarchive'] = 'Você deseja mover o ticket "%s" para o arquivo?';
|
||||
$lng['error']['nomoreticketsavailable'] = 'Você já utilizou todos seus tickets disponíveis. Por favor contacte seu administrador';
|
||||
$lng['error']['nocustomerforticket'] = 'Não pode criar Tickets sem Clientes';
|
||||
$lng['error']['categoryhastickets'] = 'A categoria ainda tem tikets na mesma. <br /> Por favor elimine os bilhetes para eliminar a categoria';
|
||||
$lng['admin']['ticketsettings'] = 'Configurações de Ticket de Suporte';
|
||||
$lng['admin']['archivelastrun'] = 'Último arquivamento de ticket';
|
||||
$lng['serversettings']['ticket']['noreply_email']['title'] = 'Não responder endereço de email';
|
||||
$lng['serversettings']['ticket']['noreply_email']['description'] = 'O endereço de envio para tickets de suporte, normalmente é no-reply@domain.com';
|
||||
$lng['serversettings']['ticket']['worktime_begin']['title'] = 'Iniciado tempo de suporte (hh:mm)';
|
||||
$lng['serversettings']['ticket']['worktime_begin']['description'] = 'Início quando o suporte estiver disponível';
|
||||
$lng['serversettings']['ticket']['worktime_end']['title'] = 'Fim do tempo de suporte (hh:mm)';
|
||||
$lng['serversettings']['ticket']['worktime_end']['description'] = 'Fim do tempo quando o suporte estiver disponível';
|
||||
$lng['serversettings']['ticket']['worktime_sat'] = 'Suporte disponível nos sábados?';
|
||||
$lng['serversettings']['ticket']['worktime_sun'] = 'Suporte disponível nos domingos?';
|
||||
$lng['serversettings']['ticket']['worktime_all']['title'] = 'Sem tempo limite para suporte';
|
||||
$lng['serversettings']['ticket']['worktime_all']['description'] = 'Se "Sim" para opção para iniciar e finalizar vai ser substituída';
|
||||
$lng['serversettings']['ticket']['archiving_days'] = 'Depois de quantoas dias tickets fechado são arquivados?';
|
||||
$lng['customer']['tickets'] = 'Tickets de Suporte';
|
||||
$lng['admin']['domain_nocustomeraddingavailable'] = 'Não adicionar um domínio corretamente. Você primeiro precisa adicionar um cliente.';
|
||||
$lng['serversettings']['ticket']['enable'] = 'Ativar tickets de sistema';
|
||||
$lng['serversettings']['ticket']['concurrentlyopen'] = 'Quantos tickes poderam ser abertos ao mesmo tempo?';
|
||||
$lng['error']['norepymailiswrong'] = 'O "Endereço (Noreply)" está errado. Somente um endereço válido é aceito.';
|
||||
$lng['error']['tadminmailiswrong'] = 'O "Endereço de admin " está errado. Somente um endereço válido é aceito.';
|
||||
$lng['ticket']['awaitingticketreply'] = 'Você tem %s tickes de suporte não respondido(s)';
|
||||
$lng['serversettings']['ticket']['noreply_name'] = 'E-mail do remetente do Ticket';
|
||||
$lng['serversettings']['mod_fcgid']['configdir']['title'] = 'Diretório de configuração';
|
||||
$lng['serversettings']['mod_fcgid']['configdir']['description'] = 'Aonde todos os arquivos de configuração do fcgid vão ser guardados? Se você não utiliza um binário compilado, está é uma situação normal, deve estar dentro de /var/www/';
|
||||
$lng['serversettings']['mod_fcgid']['tmpdir']['title'] = 'Diretório Temporário';
|
||||
$lng['serversettings']['ticket']['reset_cycle']['title'] = 'Resetar ciclo de tickers usados';
|
||||
$lng['serversettings']['ticket']['reset_cycle']['description'] = 'Resetar tickets usados por clientes';
|
||||
$lng['admin']['tickets']['daily'] = 'Diariamente';
|
||||
$lng['admin']['tickets']['weekly'] = 'Semanalmente';
|
||||
$lng['admin']['tickets']['monthly'] = 'Mensalmente';
|
||||
$lng['admin']['tickets']['yearly'] = 'Anualmente';
|
||||
$lng['error']['ticketresetcycleiswrong'] = 'O ciclo de resetes de ticket pode ser "diário", "semanal", "mensal" or "anual".';
|
||||
$lng['menue']['traffic']['traffic'] = 'Tráfego';
|
||||
$lng['menue']['traffic']['current'] = 'Mês corrente';
|
||||
$lng['traffic']['month'] = "Mês";
|
||||
@@ -703,7 +604,6 @@ $lng['dkim']['dkimrestart_command']['description'] = 'Por favor especifique um c
|
||||
$lng['admin']['caneditphpsettings'] = 'Pode alterar as configurações PHP relacionadas com o domínio?';
|
||||
$lng['admin']['allips'] = 'Todos os IPs';
|
||||
$lng['panel']['nosslipsavailable'] = 'Não existem atualmente IP SSL / Porta para este servidor.';
|
||||
$lng['ticket']['by'] = 'Por';
|
||||
$lng['dkim']['use_dkim']['title'] = 'Ativar suporte para DKIM?';
|
||||
$lng['dkim']['use_dkim']['description'] = 'Você deseja usar o sistema de chaves de domínio (DKIM) ?';
|
||||
$lng['error']['invalidmysqlhost'] = 'Endereço de servidor MySQL inválido: %s';
|
||||
|
||||
@@ -538,111 +538,9 @@ $lng['admin']['webalizer']['normal'] = 'Normal';
|
||||
$lng['admin']['webalizer']['quiet'] = 'Tyst';
|
||||
$lng['admin']['webalizer']['veryquiet'] = 'Väldigt tyst';
|
||||
|
||||
// ADDED IN 1.2.18-svn3
|
||||
|
||||
$lng['ticket']['admin_email'] = 'root@localhost';
|
||||
$lng['ticket']['noreply_email'] = 'tickets@Froxlor';
|
||||
$lng['admin']['ticketsystem'] = 'Support';
|
||||
$lng['menue']['ticket']['ticket'] = 'Supportärenden';
|
||||
$lng['menue']['ticket']['categories'] = 'Kategorier';
|
||||
$lng['menue']['ticket']['archive'] = 'Arkivet';
|
||||
$lng['ticket']['description'] = 'Skriv en beskrivning av ärendet här!';
|
||||
$lng['ticket']['ticket_new'] = '[Skapa ett nytt ärende]';
|
||||
$lng['ticket']['ticket_reply'] = 'Svara ärende';
|
||||
$lng['ticket']['ticket_reopen'] = 'Återöppna ärende';
|
||||
$lng['ticket']['ticket_newcateory'] = '[Skapa ny kategori]';
|
||||
$lng['ticket']['ticket_editcateory'] = 'Ändra kategori';
|
||||
$lng['ticket']['ticket_view'] = 'View ticketcourse';
|
||||
$lng['ticket']['ticketcount'] = 'Ärendenummer';
|
||||
$lng['ticket']['ticket_answers'] = 'Svar';
|
||||
// $lng['ticket']['lastchange'] = 'Senaste ändring';
|
||||
$lng['ticket']['lastchange'] = 'Ändrad';
|
||||
$lng['ticket']['subject'] = 'Rubrik';
|
||||
$lng['ticket']['status'] = 'Status';
|
||||
$lng['ticket']['lastreplier'] = 'Ägare';
|
||||
$lng['ticket']['priority'] = 'Prioritet';
|
||||
$lng['ticket']['low'] = '<span class="Ärende_låg">Låg</span>';
|
||||
$lng['ticket']['normal'] = '<span class="Ärende_norm">Normal</span>';
|
||||
$lng['ticket']['high'] = '<span class="Ärende_hög">Hög</span>';
|
||||
$lng['ticket']['lastchange_from'] = 'Från datum (dd.mm.yyyy)';
|
||||
$lng['ticket']['lastchange_to'] = 'Till datum (dd.mm.yyyy)';
|
||||
$lng['ticket']['category'] = 'Kategori';
|
||||
$lng['ticket']['no_cat'] = 'None';
|
||||
$lng['ticket']['message'] = 'Meddeland';
|
||||
$lng['ticket']['show'] = 'Visa';
|
||||
$lng['ticket']['answer'] = 'Svara';
|
||||
$lng['ticket']['close'] = 'Stäng';
|
||||
$lng['ticket']['reopen'] = 'Öppna igen';
|
||||
$lng['ticket']['archive'] = 'Arkivera';
|
||||
$lng['ticket']['ticket_delete'] = 'Radera ett ärende';
|
||||
$lng['ticket']['lastarchived'] = 'Recently archived tickets';
|
||||
$lng['ticket']['archivedtime'] = 'Arkiverad';
|
||||
$lng['ticket']['open'] = 'Öppnad';
|
||||
$lng['ticket']['wait_reply'] = 'Väntar på svar';
|
||||
$lng['ticket']['replied'] = 'Besvarad';
|
||||
$lng['ticket']['closed'] = 'Stängd';
|
||||
$lng['ticket']['staff'] = 'Staff';
|
||||
$lng['ticket']['customer'] = 'Kund';
|
||||
$lng['ticket']['old_tickets'] = 'Ärende meddelanden';
|
||||
$lng['ticket']['search'] = 'Sök i arkivet';
|
||||
$lng['ticket']['nocustomer'] = 'Inget val';
|
||||
$lng['ticket']['archivesearch'] = 'Arkiv sökresultat';
|
||||
$lng['ticket']['noresults'] = 'Inget ärende funnet';
|
||||
$lng['ticket']['notmorethanxopentickets'] = 'På grund av spamhanteringen kan du inte ha mer än %s öppna ärenden';
|
||||
$lng['ticket']['supportstatus'] = 'Support-Status';
|
||||
$lng['ticket']['supportavailable'] = '<span class="ticket_low">Våra supporttekniker tar nu gärna emot era supportärenden.</span>';
|
||||
$lng['ticket']['supportnotavailable'] = '<span class="ticket_high">Våra supporttekniker är inte tillgängliga just nu.</span>';
|
||||
$lng['admin']['templates']['ticket'] = 'Informations E-post för supportärenden';
|
||||
$lng['admin']['templates']['SUBJECT'] = 'Ersatt med supportärendet rubrik';
|
||||
$lng['admin']['templates']['new_ticket_for_customer'] = 'Kundinformation som ärendet har skickat';
|
||||
$lng['admin']['templates']['new_ticket_by_customer'] = 'Admininformation för ett ärende öppnat av kund';
|
||||
$lng['admin']['templates']['new_reply_ticket_by_customer'] = 'Admininformation för ett svar från kund';
|
||||
$lng['admin']['templates']['new_ticket_by_staff'] = 'Kundinformation för ett ärende öppnat av ledningen';
|
||||
$lng['admin']['templates']['new_reply_ticket_by_staff'] = 'Kundinformation för ett ärende besvarat av ledningen';
|
||||
$lng['mails']['new_ticket_for_customer']['mailbody'] = 'Hej {FIRSTNAME} {NAME},\n\nDitt supportärende med rubriken "{SUBJECT}" har skickats till supporten.\n\nVi meddelar dig när ditt ärende har blivit besvarat.\n\nMed vänliga hälsningar,\n Froxlor';
|
||||
$lng['mails']['new_ticket_for_customer']['subject'] = 'Ditt supportärende har nu skickats';
|
||||
$lng['mails']['new_ticket_by_customer']['mailbody'] = 'Hej admin,\n\nEtt nytt supportärende med rubriken "{SUBJECT}" har nu skapats.\n\nVänligen logga in för att öppna ärendet.\n\nMed vänliga hälsningar,\n Froxlor';
|
||||
$lng['mails']['new_ticket_by_customer']['subject'] = 'Nytt supportärende skapat';
|
||||
$lng['mails']['new_reply_ticket_by_customer']['mailbody'] = 'Hej admin,\n\nDitt supportärende "{SUBJECT}" har blivit besvarat an en kund.\n\nVänligen logga in för att öppna ärendet.\n\nMed vänliga hälsningar,\n Froxlor';
|
||||
$lng['mails']['new_reply_ticket_by_customer']['subject'] = 'Nytt svar för supportärendet';
|
||||
$lng['mails']['new_ticket_by_staff']['mailbody'] = 'Hej {FIRSTNAME} {NAME},\n\nEtt nytt supportärende har öppnats med rubriken "{SUBJECT}".\n\nVänligen logga in för att öppna ärendet.\n\nMed vänliga hälsningar,\n Froxlor';
|
||||
$lng['mails']['new_ticket_by_staff']['subject'] = 'Nytt supportärede behandlat';
|
||||
$lng['mails']['new_reply_ticket_by_staff']['mailbody'] = 'Hej {FIRSTNAME} {NAME},\n\nSupportärendet med rubriken "{SUBJECT}" har besvarats av vår personal.\n\nVänligen logga in för att öppna ärendet.\n\nMed vänliga hälsningar,\n Froxlor';
|
||||
$lng['mails']['new_reply_ticket_by_staff']['subject'] = 'Svar på ert supportärende';
|
||||
$lng['question']['ticket_reallyclose'] = 'Är du säker på att du vill stänga supportärendet "%s"?';
|
||||
$lng['question']['ticket_reallydelete'] = 'Är du säker på att du vill radera supportärendet "%s"?';
|
||||
$lng['question']['ticket_reallydeletecat'] = 'Är du säker på att du vill radera kategorin "%s"?';
|
||||
$lng['question']['ticket_reallyarchive'] = 'Är du säker på att du vill flytta supportärendet "%s" till arkivet?';
|
||||
$lng['error']['nomoreticketsavailable'] = 'Du har redan använt alla supportärenden som du fått tilldelade. Kontakta administratören om du behöver fler.';
|
||||
$lng['error']['nocustomerforticket'] = 'Det går inte att skapa ett supportärende utan kunder';
|
||||
$lng['error']['categoryhastickets'] = 'Denna kategori har fortfarande supportärenden.<br />Du måste radera dessa ärenden innan du kan radera denna kategori';
|
||||
$lng['admin']['ticketsettings'] = 'Supportärende inställningar';
|
||||
$lng['admin']['archivelastrun'] = 'Sista supportärende som arkiverats';
|
||||
$lng['serversettings']['ticket']['noreply_email']['title'] = 'Svara-Inte E-post adress';
|
||||
$lng['serversettings']['ticket']['noreply_email']['description'] = 'Avsändaradressen för support-ticket, exempel: inget-svar@Froxlor.se';
|
||||
$lng['serversettings']['ticket']['worktime_begin']['title'] = 'Start av support-tid (hh:mm)';
|
||||
$lng['serversettings']['ticket']['worktime_begin']['description'] = 'Start-tid, när supporten är tillgänglig';
|
||||
$lng['serversettings']['ticket']['worktime_end']['title'] = 'Slut på support-tid (hh:mm)';
|
||||
$lng['serversettings']['ticket']['worktime_end']['description'] = 'Slut-tid, när supporten inte längre är tillgänglig';
|
||||
$lng['serversettings']['ticket']['worktime_sat'] = 'Supporten har öppet på lördagar?';
|
||||
$lng['serversettings']['ticket']['worktime_sun'] = 'Supporten har öppet på söndagar?';
|
||||
$lng['serversettings']['ticket']['worktime_all']['title'] = 'Supporten är tillgänglig dygnet runt';
|
||||
$lng['serversettings']['ticket']['worktime_all']['description'] = 'Om du väljer "Ja" så kommer start och stopp tiderna att skrivas över';
|
||||
$lng['serversettings']['ticket']['archiving_days'] = 'Efter hur många dagar skall stängda tickets arkiveras?';
|
||||
$lng['customer']['tickets'] = 'Support ärenden';
|
||||
|
||||
// ADDED IN 1.2.18-svn4
|
||||
|
||||
$lng['admin']['domain_nocustomeraddingavailable'] = 'Det går inte att skapa en ny domän innan det finns mins en upplagd kund.';
|
||||
$lng['serversettings']['ticket']['enable'] = 'Tillåt användninga av ticketsystemet';
|
||||
$lng['serversettings']['ticket']['concurrentlyopen'] = 'Maximalt antal tickets som kan öppnas samtidigt?';
|
||||
$lng['error']['norepymailiswrong'] = 'Den här adressen "Noreply-address" är felaktig. Bara giltiga E-post adresser är tillåtna.';
|
||||
$lng['error']['tadminmailiswrong'] = 'Den här adressen "Ticketadmin-address" är felaktig. Bara giltiga E-post adresser är tillåtna.';
|
||||
$lng['ticket']['awaitingticketreply'] = 'Du har %s obesvarade support-ticket(s)';
|
||||
|
||||
// ADDED IN 1.2.18-svn5
|
||||
|
||||
$lng['serversettings']['ticket']['noreply_name'] = 'Supportärendes namn på E-postadressen';
|
||||
|
||||
// ADDED IN 1.2.19-svn1
|
||||
|
||||
@@ -650,16 +548,6 @@ $lng['serversettings']['mod_fcgid']['configdir']['title'] = 'FCGI konfigurations
|
||||
$lng['serversettings']['mod_fcgid']['configdir']['description'] = 'I vilken katalog skall alla fcgi-konfigurationfiler lagras?';
|
||||
$lng['serversettings']['mod_fcgid']['tmpdir']['title'] = 'FCGI temporärkatalog';
|
||||
|
||||
// ADDED IN 1.2.19-svn3
|
||||
|
||||
$lng['serversettings']['ticket']['reset_cycle']['title'] = 'Återställ cykeln för använda supportärenden';
|
||||
$lng['serversettings']['ticket']['reset_cycle']['description'] = 'Återställ kundens räknare för använda supportärenden. Vald cykel = 0';
|
||||
$lng['admin']['tickets']['daily'] = 'Dagligen';
|
||||
$lng['admin']['tickets']['weekly'] = 'Varje vecka';
|
||||
$lng['admin']['tickets']['monthly'] = 'Varje månad';
|
||||
$lng['admin']['tickets']['yearly'] = 'Varje år';
|
||||
$lng['error']['ticketresetcycleiswrong'] = 'Cykeln för återställning av supportärenden måste vara "Dagligen", "Varje vecka", "varje månad" or "varje år".';
|
||||
|
||||
// ADDED IN 1.2.19-svn4
|
||||
|
||||
$lng['menue']['traffic']['traffic'] = 'Trafik';
|
||||
|
||||
15
templates/Sparkle/admin/index/index.tpl
vendored
15
templates/Sparkle/admin/index/index.tpl
vendored
@@ -149,21 +149,6 @@ $header
|
||||
</if>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<if \Froxlor\Settings::Get('ticket.enabled') == 1>
|
||||
<div class="canvasbox">
|
||||
<input type="hidden" id="tickets" class="circular" data-used="{$overview['tickets_used']}" data-available="{$userinfo['tickets']}" data-assigned="{$userinfo['tickets_used']}">
|
||||
<canvas id="tickets-canvas" width="120" height="76"></canvas><br/>
|
||||
{$lng['customer']['tickets']}<br />
|
||||
<small>
|
||||
{$overview['tickets_used']} {$lng['panel']['used']}<br />
|
||||
{$userinfo['tickets_used']} {$lng['panel']['assigned']}<br />
|
||||
<if $userinfo['tickets'] != '∞'>
|
||||
{$userinfo['tickets']} {$lng['panel']['available']}
|
||||
</if>
|
||||
</small>
|
||||
</div>
|
||||
</if>
|
||||
</div>
|
||||
|
||||
<div class="grid-u-1-2">
|
||||
|
||||
@@ -18,8 +18,5 @@
|
||||
{$lng['customer']['email_quota']}: <span <if $admin['email_quota_used'] == $admin['email_quota_used_new']>class="green"<else>class="red"</if>><b>{$admin['email_quota_used']} -> {$admin['email_quota_used_new']}</b></span><br />
|
||||
</if>
|
||||
{$lng['customer']['ftps']}: <span <if $admin['ftps_used'] == $admin['ftps_used_new']>class="green"<else>class="red"</if>><b>{$admin['ftps_used']} -> {$admin['ftps_used_new']}</b></span><br />
|
||||
<if \Froxlor\Settings::Get('ticket.enabled') == '1'>
|
||||
{$lng['customer']['tickets']}: <span <if $admin['tickets_used'] == $admin['tickets_used_new']>class="green"<else>class="red"</if>><b>{$admin['tickets_used']} -> {$admin['tickets_used_new']}</b></span><br />
|
||||
</if>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -14,8 +14,5 @@
|
||||
{$lng['customer']['email_quota']}: <span <if $customer['email_quota_used'] == $customer['email_quota_used_new']>class="green"<else>class="red"</if>><b>{$customer['email_quota_used']} -> {$customer['email_quota_used_new']}</b></span><br />
|
||||
</if>
|
||||
{$lng['customer']['ftps']}: <span <if $customer['ftps_used'] == $customer['ftps_used_new']>class="green"<else>class="red"</if>><b>{$customer['ftps_used']} -> {$customer['ftps_used_new']}</b></span><br />
|
||||
<if \Froxlor\Settings::Get('ticket.enabled') == '1'>
|
||||
{$lng['customer']['tickets']}: <span <if $customer['tickets_used'] == $customer['tickets_used_new']>class="green"<else>class="red"</if>><b>{$customer['tickets_used']} -> {$customer['tickets_used_new']}</b></span><br />
|
||||
</if>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -137,29 +137,6 @@ $header
|
||||
<td>{$lng['admin']['templates']['USAGE_PERCENT']}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if ($template == 'new_ticket_by_customer') || ($template == 'new_ticket_for_customer') || ($template == 'new_ticket_by_staff')
|
||||
|| ($template == 'new_reply_ticket_by_customer') || ($template == 'new_reply_ticket_by_staff') >
|
||||
<tr>
|
||||
<td><em>{SUBJECT}</em></td>
|
||||
<td>{$lng['admin']['templates']['SUBJECT']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{SALUTATION}</em></td>
|
||||
<td>{$lng['admin']['templates']['SALUTATION']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{FIRSTNAME}</em></td>
|
||||
<td>{$lng['admin']['templates']['FIRSTNAME']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{NAME}</em></td>
|
||||
<td>{$lng['admin']['templates']['NAME']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{COMPANY}</em></td>
|
||||
<td>{$lng['admin']['templates']['COMPANY']}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if ($template == 'new_database_by_customer')>
|
||||
<tr>
|
||||
<td><em>{SALUTATION}</em></td>
|
||||
|
||||
@@ -139,29 +139,6 @@ $header
|
||||
<td>{$lng['admin']['templates']['USAGE_PERCENT']}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if ($template_name == 'new_ticket_by_customer') || ($template_name == 'new_ticket_for_customer') || ($template_name == 'new_ticket_by_staff')
|
||||
|| ($template_name == 'new_reply_ticket_by_customer') || ($template_name == 'new_reply_ticket_by_staff') >
|
||||
<tr>
|
||||
<td><em>{SUBJECT}</em></td>
|
||||
<td>{$lng['admin']['templates']['SUBJECT']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{SALUTATION}</em></td>
|
||||
<td>{$lng['admin']['templates']['SALUTATION']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{FIRSTNAME}</em></td>
|
||||
<td>{$lng['admin']['templates']['FIRSTNAME']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{NAME}</em></td>
|
||||
<td>{$lng['admin']['templates']['NAME']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><em>{COMPANY}</em></td>
|
||||
<td>{$lng['admin']['templates']['COMPANY']}</td>
|
||||
</tr>
|
||||
</if>
|
||||
<if ($template_name == 'new_database_by_customer')>
|
||||
<tr>
|
||||
<td><em>{SALUTATION}</em></td>
|
||||
|
||||
14
templates/Sparkle/customer/index/index.tpl
vendored
14
templates/Sparkle/customer/index/index.tpl
vendored
@@ -134,20 +134,6 @@ $header
|
||||
</small>
|
||||
</div>
|
||||
</if>
|
||||
|
||||
<if (int)\Froxlor\Settings::Get('ticket.enabled') == 1 && $userinfo['tickets'] != '0'>
|
||||
<div class="canvasbox">
|
||||
<input type="hidden" id="tickets" class="circular" data-used="{$userinfo['tickets_used']}" data-available="{$userinfo['tickets']}">
|
||||
<canvas id="tickets-canvas" width="120" height="76"></canvas><br />
|
||||
{$lng['customer']['tickets']}<br />
|
||||
<small>
|
||||
{$userinfo['tickets_used']} {$lng['panel']['used']}<br />
|
||||
<if $userinfo['tickets'] != '∞'>
|
||||
{$userinfo['tickets']} {$lng['panel']['available']}
|
||||
</if>
|
||||
</small>
|
||||
</div>
|
||||
</if>
|
||||
</div>
|
||||
|
||||
<div class="grid-u-1-2">
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
$header
|
||||
<div class="messagewrapper">
|
||||
<div class="neutralcontainer bradius">
|
||||
<div class="neutraltitle">{$lng['menue']['ticket']['ticket']}</div>
|
||||
<div class="neutral">{$lng['ticket']['description']}</div>
|
||||
</div>
|
||||
</div>
|
||||
$footer
|
||||
80
templates/Sparkle/customer/tickets/tickets.tpl
vendored
80
templates/Sparkle/customer/tickets/tickets.tpl
vendored
@@ -1,80 +0,0 @@
|
||||
$header
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="templates/{$theme}/assets/img/icons/tickets_big.png" alt="" />
|
||||
{$lng['menue']['ticket']['ticket']}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
|
||||
<form action="{$linker->getLink(array('section' => 'tickets'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="s" value="$s" />
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<input type="hidden" name="send" value="send" />
|
||||
|
||||
<if 0 < $supportavailable >
|
||||
<div class="successcontainer bradius">
|
||||
<div class="successtitle">{$lng['ticket']['supportstatus']}</div>
|
||||
<div class="success">{$lng['ticket']['supportavailable']}</div>
|
||||
</div>
|
||||
</if>
|
||||
|
||||
<if $supportavailable < 1 >
|
||||
<div class="warningcontainer bradius">
|
||||
<div class="warningtitle">{$lng['ticket']['supportstatus']}</div>
|
||||
<div class="warning">{$lng['ticket']['supportnotavailable']}</div>
|
||||
</div>
|
||||
</if>
|
||||
|
||||
<div class="overviewsearch">
|
||||
{$searchcode}
|
||||
</div>
|
||||
|
||||
<if ($userinfo['tickets_used'] < $userinfo['tickets'] || $userinfo['tickets'] == '-1') && ($ticketsopen < \Froxlor\Settings::Get('ticket.concurrently_open') || (\Froxlor\Settings::Get('ticket.concurrently_open') == '-1' || \Froxlor\Settings::Get('ticket.concurrently_open') == '')) >
|
||||
<div class="overviewadd">
|
||||
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||
<a href="{$linker->getLink(array('section' => 'tickets', 'page' => 'tickets', 'action' => 'new'))}">{$lng['ticket']['ticket_new']}</a>
|
||||
</div>
|
||||
</if>
|
||||
|
||||
<table class="full hl">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$lng['ticket']['lastchange']} {$arrowcode['lastchange']}</th>
|
||||
<th>{$lng['ticket']['ticket_answers']}</th>
|
||||
<th>{$lng['ticket']['subject']} {$arrowcode['subject']}</th>
|
||||
<th>{$lng['ticket']['status']} {$arrowcode['status']}</th>
|
||||
<th>{$lng['ticket']['lastreplier']} {$arrowcode['lastreplier']}</th>
|
||||
<th>{$lng['ticket']['priority']}</th>
|
||||
<th>{$lng['panel']['options']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<if $pagingcode != ''>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">{$pagingcode}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</if>
|
||||
|
||||
<tbody>
|
||||
{$tickets}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<if ($userinfo['tickets_used'] < $userinfo['tickets'] || $userinfo['tickets'] == '-1') && 15 < $tickets_count && ($ticketsopen < \Froxlor\Settings::Get('ticket.concurrently_open') || (\Froxlor\Settings::Get('ticket.concurrently_open') == '-1' || \Froxlor\Settings::Get('ticket.concurrently_open') == '')) >
|
||||
<div class="overviewadd">
|
||||
<img src="templates/{$theme}/assets/img/icons/add.png" alt="" />
|
||||
<a href="{$linker->getLink(array('section' => 'tickets', 'page' => 'tickets', 'action' => 'new'))}">{$lng['ticket']['ticket_new']}</a>
|
||||
</div>
|
||||
</if>
|
||||
|
||||
</section>
|
||||
|
||||
</article>
|
||||
$footer
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
$header
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="templates/{$theme}/assets/img/icons/ticket_add_big.png" alt="{$title}" />
|
||||
{$title}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
|
||||
<form action="{$linker->getLink(array('section' => 'tickets'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="s" value="$s" />
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<input type="hidden" name="action" value="$action" />
|
||||
<input type="hidden" name="send" value="send" />
|
||||
|
||||
<table class="full">
|
||||
{$ticket_add_form}
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</section>
|
||||
</article>
|
||||
$footer
|
||||
@@ -1,36 +0,0 @@
|
||||
$header
|
||||
<article>
|
||||
<header>
|
||||
<h2>
|
||||
<img src="templates/{$theme}/assets/img/icons/ticket_reply_big.png" alt="{$title}" />
|
||||
{$title}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<if 0 < $ticket_replies_count >
|
||||
$ticket_replies
|
||||
</if>
|
||||
|
||||
<section>
|
||||
|
||||
<form action="{$linker->getLink(array('section' => 'tickets'))}" method="post" enctype="application/x-www-form-urlencoded">
|
||||
<input type="hidden" name="s" value="$s" />
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<input type="hidden" name="action" value="$action" />
|
||||
<input type="hidden" name="send" value="send" />
|
||||
<input type="hidden" name="id" value="$id" />
|
||||
|
||||
<if $isclosed < 1 >
|
||||
<table class="full">
|
||||
{$ticket_reply_form}
|
||||
</table>
|
||||
</if>
|
||||
|
||||
<if 0 < $isclosed >
|
||||
<a href="{$linker->getLink(array('section' => 'tickets', 'page' => 'tickets', 'action' => 'reopen', 'id' => $id))}">{$lng['ticket']['ticket_reopen']}</a>
|
||||
</if>
|
||||
</form>
|
||||
|
||||
</section>
|
||||
</article>
|
||||
$footer
|
||||
@@ -1,28 +0,0 @@
|
||||
<tr>
|
||||
<td>{$row['lastchange']}</td>
|
||||
<td>{$row['ticket_answers']}</td>
|
||||
<td>{$row['subject']}</td>
|
||||
<td>{$row['status']}</td>
|
||||
<td>{$row['lastreplier']}</td>
|
||||
<td>{$row['priority']}</td>
|
||||
<td>
|
||||
<a href="{$linker->getLink(array('section' => 'tickets', 'page' => 'tickets', 'action' => 'answer', 'id' => $row['id']))}">
|
||||
<if $cananswer < 1 >
|
||||
<img src="templates/{$theme}/assets/img/icons/view.png" alt="{$lng['ticket']['show']}" title="{$lng['ticket']['show']}" />
|
||||
</if>
|
||||
<if 0 < $cananswer >
|
||||
<img src="templates/{$theme}/assets/img/icons/edit.png" alt="{$lng['ticket']['answer']}" title="{$lng['ticket']['answer']}" />
|
||||
</if>
|
||||
</a>
|
||||
<if $reopen < 1 >
|
||||
<a href="{$linker->getLink(array('section' => 'tickets', 'page' => 'tickets', 'action' => 'close', 'id' => $row['id']))}">
|
||||
<img src="templates/{$theme}/assets/img/icons/lock.png" alt="{$lng['ticket']['close']}" title="{$lng['ticket']['close']}" />
|
||||
</a>
|
||||
</if>
|
||||
<if 0 < $reopen >
|
||||
<a href="{$linker->getLink(array('section' => 'tickets', 'page' => 'tickets', 'action' => 'reopen', 'id' => $row['id']))}">
|
||||
<img src="templates/{$theme}/assets/img/icons/unlock.png" alt="{$lng['ticket']['reopen']}" title="{$lng['ticket']['reopen']}" />
|
||||
</a>
|
||||
</if>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1,15 +0,0 @@
|
||||
<section>
|
||||
<table class="full">
|
||||
<tr>
|
||||
<th><strong>{$lastchange} {$lng['ticket']['by']} {$by}</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$subject}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$message}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><br />
|
||||
</section>
|
||||
<br />
|
||||
@@ -1,15 +0,0 @@
|
||||
<section>
|
||||
<table class="full">
|
||||
<tr>
|
||||
<th><strong>{$dt} {$lng['ticket']['by']} {$by} ({$status})</strong></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$subject}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$message}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</section>
|
||||
<br />
|
||||
@@ -1,6 +1,9 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Database\Database;
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
@@ -29,7 +32,6 @@ class AdminsTest extends TestCase
|
||||
'email_imap' => 1,
|
||||
'email_pop3' => 0,
|
||||
'ftps' => 15,
|
||||
'tickets' => 15,
|
||||
'mysqls' => 15,
|
||||
'sendpassword' => 0,
|
||||
'phpenabled' => 1,
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\Database\Database;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\CustomerBackups;
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers CustomerBackups
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\CustomerBackups
|
||||
*/
|
||||
class CustomerBackupsTest extends TestCase
|
||||
{
|
||||
@@ -13,7 +18,7 @@ class CustomerBackupsTest extends TestCase
|
||||
public function testAdminCustomerBackupsNotEnabled()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
Settings::Set('system.backupenabled', 0, true);
|
||||
|
||||
// get customer
|
||||
@@ -27,15 +32,16 @@ class CustomerBackupsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminCustomerBackupsNotEnabled
|
||||
*/
|
||||
public function testAdminCustomerBackupsExtrasHidden()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
Settings::Set('system.backupenabled', 1, true);
|
||||
Settings::Set('panel.customer_hide_options', 'extras', true);
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
@@ -47,14 +53,15 @@ class CustomerBackupsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminCustomerBackupsExtrasHidden
|
||||
*/
|
||||
public function testAdminCustomerBackupsExtrasBackupHidden()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
Settings::Set('panel.customer_hide_options', 'extras.backup', true);
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
@@ -64,23 +71,24 @@ class CustomerBackupsTest extends TestCase
|
||||
$this->expectExceptionMessage("You cannot access this resource");
|
||||
CustomerBackups::getLocal($customer_userdata)->add();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminCustomerBackupsExtrasBackupHidden
|
||||
*/
|
||||
public function testCustomerCustomerBackupsAdd()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
Settings::Set('panel.customer_hide_options', '', true);
|
||||
Database::query("TRUNCATE TABLE `panel_tasks`;");
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'path' => '/my-backup',
|
||||
'backup_dbs' => 2,
|
||||
@@ -96,6 +104,7 @@ class CustomerBackupsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerCustomerBackupsAdd
|
||||
*/
|
||||
public function testCustomerCustomerBackupsAddPathNotDocroot()
|
||||
@@ -138,7 +147,7 @@ class CustomerBackupsTest extends TestCase
|
||||
public function testAdminCustomerBackupsListing()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$json_result = CustomerBackups::getLocal($admin_userdata)->listing();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(1, $result['count']);
|
||||
@@ -154,13 +163,13 @@ class CustomerBackupsTest extends TestCase
|
||||
public function testCustomerCustomerBackupsDelete()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'backup_job_entry' => 1
|
||||
];
|
||||
@@ -176,13 +185,13 @@ class CustomerBackupsTest extends TestCase
|
||||
public function testCustomerCustomerBackupsDeleteNotFound()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'backup_job_entry' => 1337
|
||||
];
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\Certificates;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers Certificates
|
||||
*
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\Certificates
|
||||
*/
|
||||
class CertificatesTest extends TestCase
|
||||
{
|
||||
@@ -12,7 +17,7 @@ class CertificatesTest extends TestCase
|
||||
public function testAdminCertificatesAdd()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$certdata = $this->generateKey();
|
||||
$json_result = Certificates::getLocal($admin_userdata, array(
|
||||
'domainname' => 'test2.local',
|
||||
@@ -32,7 +37,7 @@ class CertificatesTest extends TestCase
|
||||
))->get();
|
||||
$reseller_userdata = json_decode($json_result, true)['data'];
|
||||
$reseller_userdata['adminsession'] = 1;
|
||||
|
||||
|
||||
$certdata = $this->generateKey();
|
||||
$this->expectExceptionCode(406);
|
||||
$this->expectExceptionMessage("Domain 'test2.local' already has a certificate. Did you mean to call update?");
|
||||
@@ -51,7 +56,7 @@ class CertificatesTest extends TestCase
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$certdata = $this->generateKey();
|
||||
$json_result = Certificates::getLocal($customer_userdata, array(
|
||||
'domainname' => 'mysub2.test2.local',
|
||||
@@ -65,7 +70,7 @@ class CertificatesTest extends TestCase
|
||||
public function testAdminCertificatesList()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$json_result = Certificates::getLocal($admin_userdata)->listing();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(2, $result['count']);
|
||||
@@ -80,7 +85,7 @@ class CertificatesTest extends TestCase
|
||||
))->get();
|
||||
$reseller_userdata = json_decode($json_result, true)['data'];
|
||||
$reseller_userdata['adminsession'] = 1;
|
||||
|
||||
|
||||
$json_result = Certificates::getLocal($reseller_userdata)->listing();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(2, $result['count']);
|
||||
@@ -89,7 +94,7 @@ class CertificatesTest extends TestCase
|
||||
public function testCustomerCertificatesList()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
@@ -103,7 +108,7 @@ class CertificatesTest extends TestCase
|
||||
public function testAdminCertificatesUpdate()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$certdata = $this->generateKey();
|
||||
$json_result = Certificates::getLocal($admin_userdata, array(
|
||||
'domainname' => 'test2.local',
|
||||
@@ -123,7 +128,7 @@ class CertificatesTest extends TestCase
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$certdata = $this->generateKey();
|
||||
$json_result = Certificates::getLocal($customer_userdata, array(
|
||||
'domainname' => 'mysub2.test2.local',
|
||||
@@ -136,12 +141,13 @@ class CertificatesTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminCertificatesUpdate
|
||||
*/
|
||||
public function testCustomerCertificatesDelete()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
@@ -165,28 +171,28 @@ class CertificatesTest extends TestCase
|
||||
"commonName" => "test2.local",
|
||||
"emailAddress" => "team@froxlor.org"
|
||||
);
|
||||
|
||||
|
||||
// generate key pair
|
||||
$privkey = openssl_pkey_new(array(
|
||||
"private_key_bits" => 2048,
|
||||
"private_key_type" => OPENSSL_KEYTYPE_RSA
|
||||
));
|
||||
|
||||
|
||||
// generate csr
|
||||
$csr = openssl_csr_new($dn, $privkey, array(
|
||||
'digest_alg' => 'sha256'
|
||||
));
|
||||
|
||||
|
||||
// generate self-signed certificate
|
||||
$sscert = openssl_csr_sign($csr, null, $privkey, 365, array(
|
||||
'digest_alg' => 'sha256'
|
||||
));
|
||||
|
||||
|
||||
// export
|
||||
openssl_csr_export($csr, $csrout);
|
||||
openssl_x509_export($sscert, $certout);
|
||||
openssl_pkey_export($privkey, $pkeyout, null);
|
||||
|
||||
|
||||
return array(
|
||||
'cert' => $certout,
|
||||
'key' => $pkeyout
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\Cronjobs;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
*
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers Cronjobs
|
||||
*/
|
||||
class CronjobsTest extends TestCase
|
||||
@@ -17,7 +22,7 @@ class CronjobsTest extends TestCase
|
||||
$this->assertTrue(isset($result['list'][0]['module']));
|
||||
$this->assertTrue(isset($result['list'][0]['cronfile']));
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerCronjobsListNotAllowed()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -30,7 +35,7 @@ class CronjobsTest extends TestCase
|
||||
$this->expectExceptionMessage("Not allowed to execute given command.");
|
||||
Cronjobs::getLocal($customer_userdata)->listing();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminCronjobsAdd()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -45,9 +50,11 @@ class CronjobsTest extends TestCase
|
||||
global $admin_userdata;
|
||||
$this->expectExceptionCode(404);
|
||||
$this->expectExceptionMessage("cronjob with id #999 could not be found");
|
||||
Cronjobs::getLocal($admin_userdata, array('id' => 999))->get();
|
||||
Cronjobs::getLocal($admin_userdata, array(
|
||||
'id' => 999
|
||||
))->get();
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerCronjobsGetNotAllowed()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -58,9 +65,11 @@ class CronjobsTest extends TestCase
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
$this->expectExceptionCode(403);
|
||||
$this->expectExceptionMessage("Not allowed to execute given command.");
|
||||
Cronjobs::getLocal($customer_userdata, array('id' => 1))->get();
|
||||
Cronjobs::getLocal($customer_userdata, array(
|
||||
'id' => 1
|
||||
))->get();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminCronjobsEdit()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\Database\Database;
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers Customers
|
||||
* @covers Admins
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\Customers
|
||||
* @covers \Froxlor\Api\Commands\Admins
|
||||
*/
|
||||
class CustomersTest extends TestCase
|
||||
{
|
||||
@@ -14,7 +19,7 @@ class CustomersTest extends TestCase
|
||||
public function testAdminCustomersAdd()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'new_loginname' => 'test1',
|
||||
'email' => 'team@froxlor.org',
|
||||
@@ -31,7 +36,6 @@ class CustomersTest extends TestCase
|
||||
'email_imap' => 1,
|
||||
'email_pop3' => 0,
|
||||
'ftps' => 15,
|
||||
'tickets' => 15,
|
||||
'mysqls' => 15,
|
||||
'createstdsubdomain' => 1,
|
||||
'new_customer_password' => 'h0lYmo1y',
|
||||
@@ -45,7 +49,7 @@ class CustomersTest extends TestCase
|
||||
1
|
||||
)
|
||||
];
|
||||
|
||||
|
||||
$json_result = Customers::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(1, $result['customerid']);
|
||||
@@ -58,14 +62,14 @@ class CustomersTest extends TestCase
|
||||
public function testAdminCustomersAddEmptyMail()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'new_loginname' => 'test2',
|
||||
'email' => ' ',
|
||||
'firstname' => 'Test2',
|
||||
'name' => 'Testman2'
|
||||
];
|
||||
|
||||
|
||||
$this->expectExceptionMessage('Requested parameter "email" is empty where it should not be for "Customers:add"');
|
||||
Customers::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
@@ -73,14 +77,14 @@ class CustomersTest extends TestCase
|
||||
public function testAdminCustomersAddInvalidMail()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'new_loginname' => 'test2',
|
||||
'email' => 'test.froxlor.org',
|
||||
'firstname' => 'Test2',
|
||||
'name' => 'Testman2'
|
||||
];
|
||||
|
||||
|
||||
$this->expectExceptionMessage("Email-address test.froxlor.org contains invalid characters or is incomplete");
|
||||
Customers::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
@@ -92,7 +96,7 @@ class CustomersTest extends TestCase
|
||||
public function testAdminCustomersList()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$json_result = Customers::getLocal($admin_userdata)->listing();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(1, $result['count']);
|
||||
@@ -128,10 +132,10 @@ class CustomersTest extends TestCase
|
||||
'id' => 1
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$this->expectExceptionCode(403);
|
||||
$this->expectExceptionMessage("Not allowed to execute given command.");
|
||||
|
||||
|
||||
$json_result = Customers::getLocal($customer_userdata)->listing();
|
||||
}
|
||||
|
||||
@@ -147,12 +151,12 @@ class CustomersTest extends TestCase
|
||||
'id' => 1
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$json_result = Customers::getLocal($customer_userdata, array(
|
||||
'id' => $customer_userdata['customerid']
|
||||
))->get();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$this->assertEquals(1, $result['customerid']);
|
||||
$this->assertEquals('team@froxlor.org', $result['email']);
|
||||
$this->assertEquals(1337, $result['customernumber']);
|
||||
@@ -183,10 +187,10 @@ class CustomersTest extends TestCase
|
||||
'id' => 1
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$this->expectExceptionCode(401);
|
||||
|
||||
|
||||
Customers::getLocal($customer_userdata, array(
|
||||
'id' => 2
|
||||
))->get();
|
||||
@@ -204,13 +208,13 @@ class CustomersTest extends TestCase
|
||||
'id' => 1,
|
||||
'deactivated' => 1
|
||||
))->update();
|
||||
|
||||
|
||||
// get customer and check results
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'id' => 1
|
||||
))->get();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$this->assertEquals(1, $result['customerid']);
|
||||
$this->assertEquals(1, $result['deactivated']);
|
||||
// standard-subdomains will be removed on deactivation
|
||||
@@ -229,11 +233,11 @@ class CustomersTest extends TestCase
|
||||
'id' => 1
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$this->expectExceptionCode(406);
|
||||
$this->expectExceptionMessage("Account suspended");
|
||||
|
||||
|
||||
Customers::getLocal($customer_userdata, array(
|
||||
'id' => $customer_userdata['customerid']
|
||||
))->get();
|
||||
@@ -246,32 +250,32 @@ class CustomersTest extends TestCase
|
||||
public function testCustomerCustomersUpdate()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// reactivate customer
|
||||
// get customer
|
||||
Customers::getLocal($admin_userdata, array(
|
||||
'id' => 1,
|
||||
'deactivated' => 0
|
||||
))->update();
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'id' => 1
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
Customers::getLocal($customer_userdata, array(
|
||||
'id' => $customer_userdata['customerid'],
|
||||
'def_language' => 'English',
|
||||
'theme' => 'Froxlor',
|
||||
'new_customer_password' => 'h0lYmo1y2'
|
||||
))->update();
|
||||
|
||||
|
||||
$json_result = Customers::getLocal($customer_userdata, array(
|
||||
'id' => $customer_userdata['customerid']
|
||||
))->get();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$this->assertEquals('Froxlor', $result['theme']);
|
||||
$this->assertEquals('English', $result['def_language']);
|
||||
}
|
||||
@@ -289,7 +293,7 @@ class CustomersTest extends TestCase
|
||||
))->get();
|
||||
$reseller_userdata = json_decode($json_result, true)['data'];
|
||||
$reseller_userdata['adminsession'] = 1;
|
||||
|
||||
|
||||
$this->expectExceptionMessage("You cannot allocate more resources than you own for yourself.");
|
||||
// add new customer
|
||||
$data = [
|
||||
@@ -371,7 +375,7 @@ class CustomersTest extends TestCase
|
||||
global $admin_userdata;
|
||||
$testadmin_userdata = $admin_userdata;
|
||||
$testadmin_userdata['adminsession'] = 0;
|
||||
|
||||
|
||||
$this->expectExceptionCode(403);
|
||||
$this->expectExceptionMessage("Not allowed to execute given command.");
|
||||
Customers::getLocal($testadmin_userdata, array(
|
||||
@@ -384,7 +388,7 @@ class CustomersTest extends TestCase
|
||||
global $admin_userdata;
|
||||
$testadmin_userdata = $admin_userdata;
|
||||
$testadmin_userdata['change_serversettings'] = 0;
|
||||
|
||||
|
||||
$this->expectExceptionCode(403);
|
||||
$this->expectExceptionMessage("Not allowed to execute given command.");
|
||||
Customers::getLocal($testadmin_userdata, array(
|
||||
@@ -412,7 +416,7 @@ class CustomersTest extends TestCase
|
||||
'adminid' => 2
|
||||
))->move();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$this->assertEquals(2, $result['adminid']);
|
||||
}
|
||||
|
||||
@@ -423,7 +427,7 @@ class CustomersTest extends TestCase
|
||||
public function testAdminCustomersAddLoginnameIsSystemaccount()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'new_loginname' => 'web1',
|
||||
'email' => 'team@froxlor.org',
|
||||
@@ -439,7 +443,6 @@ class CustomersTest extends TestCase
|
||||
'email_imap' => 1,
|
||||
'email_pop3' => 0,
|
||||
'ftps' => 15,
|
||||
'tickets' => 15,
|
||||
'mysqls' => 15,
|
||||
'createstdsubdomain' => 1,
|
||||
'new_customer_password' => 'h0lYmo1y',
|
||||
@@ -453,7 +456,7 @@ class CustomersTest extends TestCase
|
||||
1
|
||||
)
|
||||
];
|
||||
|
||||
|
||||
$this->expectExceptionMessage('You cannot create accounts which are similar to system accounts (as for example begin with "web"). Please enter another account name.');
|
||||
Customers::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
@@ -465,10 +468,9 @@ class CustomersTest extends TestCase
|
||||
public function testAdminCustomersAddAutoLoginname()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
Settings::Set('system.lastaccountnumber', 0, true);
|
||||
Settings::Set('ticket.enabled', 0, true);
|
||||
|
||||
|
||||
$data = [
|
||||
'new_loginname' => '',
|
||||
'email' => 'team@froxlor.org',
|
||||
@@ -479,7 +481,7 @@ class CustomersTest extends TestCase
|
||||
'perlenabled' => 2,
|
||||
'dnsenabled' => 4
|
||||
];
|
||||
|
||||
|
||||
$json_result = Customers::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals('web1', $result['loginname']);
|
||||
@@ -493,7 +495,7 @@ class CustomersTest extends TestCase
|
||||
public function testAdminCustomersAddLoginnameExists()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'new_loginname' => 'test1',
|
||||
'email' => 'team@froxlor.org',
|
||||
@@ -501,7 +503,7 @@ class CustomersTest extends TestCase
|
||||
'name' => 'Testman2',
|
||||
'customernumber' => 1339
|
||||
];
|
||||
|
||||
|
||||
$this->expectExceptionMessage('Loginname test1 already exists');
|
||||
Customers::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
@@ -513,7 +515,7 @@ class CustomersTest extends TestCase
|
||||
public function testAdminCustomersAddLoginnameInvalid()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'new_loginname' => 'user-',
|
||||
'email' => 'team@froxlor.org',
|
||||
@@ -521,7 +523,7 @@ class CustomersTest extends TestCase
|
||||
'name' => 'Testman2',
|
||||
'customernumber' => 1339
|
||||
];
|
||||
|
||||
|
||||
$this->expectExceptionMessage('Loginname "user-" contains illegal characters.');
|
||||
Customers::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
@@ -533,7 +535,7 @@ class CustomersTest extends TestCase
|
||||
public function testAdminCustomersAddLoginnameInvalid2()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'new_loginname' => 'useruseruseruseruseruserX',
|
||||
'email' => 'team@froxlor.org',
|
||||
@@ -541,7 +543,7 @@ class CustomersTest extends TestCase
|
||||
'name' => 'Testman2',
|
||||
'customernumber' => 1339
|
||||
];
|
||||
|
||||
|
||||
$this->expectExceptionMessage('Loginname contains too many characters. Only ' . (14 - strlen(Settings::Get('customer.mysqlprefix'))) . ' characters are allowed.');
|
||||
Customers::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\DomainZones;
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers SubDomains
|
||||
* @covers DomainZones
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\SubDomains
|
||||
* @covers \Froxlor\Api\Commands\DomainZones
|
||||
*/
|
||||
class DomainZonesTest extends TestCase
|
||||
{
|
||||
@@ -14,15 +18,15 @@ class DomainZonesTest extends TestCase
|
||||
public function testCustomerDomainZonesGet()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
Settings::Set('system.dnsenabled', 1, true);
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local'
|
||||
];
|
||||
@@ -33,18 +37,19 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDomainZonesGet
|
||||
*/
|
||||
public function testCustomerDomainZonesGetNoSubdomains()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'mysub2.test2.local'
|
||||
];
|
||||
@@ -52,14 +57,14 @@ class DomainZonesTest extends TestCase
|
||||
$this->expectExceptionMessage("DNS zones can only be generated for the main domain, not for subdomains");
|
||||
DomainZones::getLocal($customer_userdata, $data)->get();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminDomainZonesListing()
|
||||
{
|
||||
global $admin_userdata;
|
||||
$this->expectExceptionCode(303);
|
||||
DomainZones::getLocal($admin_userdata)->listing();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminDomainZonesUpdate()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -68,6 +73,7 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDomainZonesGet
|
||||
*/
|
||||
public function testCustomerDomainZonesAddA()
|
||||
@@ -79,7 +85,7 @@ class DomainZonesTest extends TestCase
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => 'www2',
|
||||
@@ -99,68 +105,71 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('www2 18000 IN A 127.0.0.1', $entry);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDomainZonesAddA
|
||||
*/
|
||||
public function testCustomerDomainZonesAddAInvalid()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => 'www3',
|
||||
'type' => 'A',
|
||||
'content' => 'a.b.c.d',
|
||||
'ttl' => -1
|
||||
'ttl' => - 1
|
||||
];
|
||||
$this->expectExceptionMessage("No valid IP address for A-record given");
|
||||
DomainZones::getLocal($customer_userdata, $data)->add();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDomainZonesAddA
|
||||
*/
|
||||
public function testCustomerDomainZonesAddADuplicate()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => 'www2',
|
||||
'type' => 'A',
|
||||
'content' => '127.0.0.1',
|
||||
'ttl' => -1
|
||||
'ttl' => - 1
|
||||
];
|
||||
$this->expectExceptionMessage("Record already exists");
|
||||
DomainZones::getLocal($customer_userdata, $data)->add();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDomainZonesGet
|
||||
*/
|
||||
public function testCustomerDomainZonesAddAAAA()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => 'www3',
|
||||
@@ -180,31 +189,32 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('www3 18000 IN AAAA ::1', $entry);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDomainZonesAddA
|
||||
*/
|
||||
public function testCustomerDomainZonesAddAAAAInvalid()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => 'www4',
|
||||
'type' => 'AAAA',
|
||||
'content' => 'z:z123.123',
|
||||
'ttl' => -1
|
||||
'ttl' => - 1
|
||||
];
|
||||
$this->expectExceptionMessage("No valid IP address for AAAA-record given");
|
||||
DomainZones::getLocal($customer_userdata, $data)->add();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminDomainZonesAddMX()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -221,7 +231,7 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue(count($result) > 1);
|
||||
$found = false;
|
||||
foreach ($result as $entry) {
|
||||
if (substr($entry, strlen('mail.example.com.') * -1) == 'mail.example.com.') {
|
||||
if (substr($entry, strlen('mail.example.com.') * - 1) == 'mail.example.com.') {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
@@ -229,14 +239,15 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('@ 18000 IN MX 10 mail.example.com.', $entry);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminDomainZonesAddMX
|
||||
*/
|
||||
public function testAdminDomainZonesAddMXNoPrio()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '',
|
||||
@@ -248,12 +259,13 @@ class DomainZonesTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminDomainZonesAddMX
|
||||
*/
|
||||
public function testAdminDomainZonesAddMXInvalid()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '',
|
||||
@@ -264,11 +276,11 @@ class DomainZonesTest extends TestCase
|
||||
$this->expectExceptionMessage("The MX content value must be a valid domain-name");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminDomainZonesAddCname()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => 'db',
|
||||
@@ -280,7 +292,7 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue(count($result) > 1);
|
||||
$found = false;
|
||||
foreach ($result as $entry) {
|
||||
if (substr($entry, strlen('db.example.com.') * -1) == 'db.example.com.') {
|
||||
if (substr($entry, strlen('db.example.com.') * - 1) == 'db.example.com.') {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
@@ -288,11 +300,11 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('db 18000 IN CNAME db.example.com.', $entry);
|
||||
}
|
||||
|
||||
|
||||
public function testAdminDomainZonesAddCnameLocal()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => 'db',
|
||||
@@ -304,7 +316,7 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue(count($result) > 1);
|
||||
$found = false;
|
||||
foreach ($result as $entry) {
|
||||
if (substr($entry, strlen('db2.test2.local.') * -1) == 'db2.test2.local.') {
|
||||
if (substr($entry, strlen('db2.test2.local.') * - 1) == 'db2.test2.local.') {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
@@ -312,14 +324,15 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('db 18000 IN CNAME db2.test2.local.', $entry);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminDomainZonesAddCname
|
||||
*/
|
||||
public function testAdminDomainZonesAddCnameInvalid()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '',
|
||||
@@ -329,8 +342,9 @@ class DomainZonesTest extends TestCase
|
||||
$this->expectExceptionMessage("Invalid domain-name for CNAME record");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminDomainZonesAddCname
|
||||
*/
|
||||
public function testAdminDomainZonesAddCnameUnderscore()
|
||||
@@ -348,7 +362,7 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue(count($result) > 1);
|
||||
$found = false;
|
||||
foreach ($result as $entry) {
|
||||
if (substr($entry, strlen('test._domainkey.myhost.tld.') * -1) == 'test._domainkey.myhost.tld.') {
|
||||
if (substr($entry, strlen('test._domainkey.myhost.tld.') * - 1) == 'test._domainkey.myhost.tld.') {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
@@ -360,7 +374,7 @@ class DomainZonesTest extends TestCase
|
||||
public function testAdminDomainZonesAddNS()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '',
|
||||
@@ -372,7 +386,7 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue(count($result) > 1);
|
||||
$found = false;
|
||||
foreach ($result as $entry) {
|
||||
if (substr($entry, strlen('ns.example.com.') * -1) == 'ns.example.com.') {
|
||||
if (substr($entry, strlen('ns.example.com.') * - 1) == 'ns.example.com.') {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
@@ -384,7 +398,7 @@ class DomainZonesTest extends TestCase
|
||||
public function testAdminDomainZonesAddNsInvalid()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '',
|
||||
@@ -394,11 +408,11 @@ class DomainZonesTest extends TestCase
|
||||
$this->expectExceptionMessage("Invalid domain-name for NS record");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminDomainZonesAddTXT()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '_test1',
|
||||
@@ -418,11 +432,11 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('_test1 18000 IN TXT aw yeah', $entry);
|
||||
}
|
||||
|
||||
|
||||
public function testAdminDomainZonesAddSRV()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '_test2',
|
||||
@@ -443,11 +457,11 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue($found);
|
||||
$this->assertEquals('_test2 18000 IN SRV 50 2 1 srv.example.com.', $entry);
|
||||
}
|
||||
|
||||
|
||||
public function testAdminDomainZonesAddSrvInvalid()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'record' => '_test2',
|
||||
@@ -458,7 +472,7 @@ class DomainZonesTest extends TestCase
|
||||
$this->expectExceptionMessage("Invalid SRV content, must contain of fields weight, port and target, e.g.: 5 5060 sipserver.example.com.");
|
||||
DomainZones::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerDomainZonesDelete()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -468,7 +482,7 @@ class DomainZonesTest extends TestCase
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'entry_id' => 1
|
||||
@@ -478,17 +492,17 @@ class DomainZonesTest extends TestCase
|
||||
$this->assertTrue($result['data']);
|
||||
$this->assertEquals(200, $result['status']);
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerDomainZonesDeleteUnmodified()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local',
|
||||
'entry_id' => 1337
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\Domains;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers SubDomains
|
||||
* @covers Domains
|
||||
*
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\Domains
|
||||
* @covers \Froxlor\Api\Commands\SubDomains
|
||||
*/
|
||||
class DomainsTest extends TestCase
|
||||
{
|
||||
@@ -28,6 +34,7 @@ class DomainsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminDomainsAdd
|
||||
*/
|
||||
public function testAdminDomainsList()
|
||||
@@ -40,6 +47,7 @@ class DomainsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminDomainsAdd
|
||||
*/
|
||||
public function testResellerDomainsList()
|
||||
@@ -95,7 +103,7 @@ class DomainsTest extends TestCase
|
||||
'customerid' => 1,
|
||||
'ipandport' => 4,
|
||||
'isemaildomain' => 1,
|
||||
'subcanemaildomain' => 2
|
||||
'subcanemaildomain' => 2
|
||||
];
|
||||
$json_result = Domains::getLocal($reseller_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -137,6 +145,7 @@ class DomainsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminDomainsAdd
|
||||
*/
|
||||
public function testAdminDomainsUpdate()
|
||||
@@ -152,6 +161,7 @@ class DomainsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminDomainsUpdate
|
||||
*/
|
||||
public function testAdminDomainsMoveButUnknownCustomer()
|
||||
@@ -185,7 +195,7 @@ class DomainsTest extends TestCase
|
||||
];
|
||||
$json_result = Customers::getLocal($admin_userdata, $data)->add();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test.local',
|
||||
'customerid' => $customer_userdata['customerid']
|
||||
@@ -197,6 +207,7 @@ class DomainsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminDomainsMove
|
||||
*/
|
||||
public function testAdminDomainsDelete()
|
||||
@@ -209,7 +220,7 @@ class DomainsTest extends TestCase
|
||||
$json_result = Domains::getLocal($admin_userdata, $data)->delete();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals('test.local', $result['domain']);
|
||||
|
||||
|
||||
// remove customer again
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test3'
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\Database\Database;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\Emails;
|
||||
use Froxlor\Api\Commands\EmailForwarders;
|
||||
use Froxlor\Api\Commands\EmailAccounts;
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers Emails
|
||||
* @covers EmailForwarders
|
||||
* @covers EmailAccounts
|
||||
* @covers Customers
|
||||
* @covers Admins
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\Emails
|
||||
* @covers \Froxlor\Api\Commands\EmailForwarders
|
||||
* @covers \Froxlor\Api\Commands\EmailAccounts
|
||||
* @covers \Froxlor\Api\Commands\Customers
|
||||
* @covers \Froxlor\Api\Commands\Admins
|
||||
*/
|
||||
class MailsTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\DirOptions;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers DirOptions
|
||||
*
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\DirOptions
|
||||
*/
|
||||
class DirOptionsTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\DirProtections;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers DirProtections
|
||||
*
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\DirProtections
|
||||
*/
|
||||
class DirProtectionsTest extends TestCase
|
||||
{
|
||||
@@ -12,13 +17,13 @@ class DirProtectionsTest extends TestCase
|
||||
public function testCustomerDirProtectionsAdd()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'path' => '/test',
|
||||
'username' => 'testing',
|
||||
@@ -30,17 +35,17 @@ class DirProtectionsTest extends TestCase
|
||||
$this->assertEquals($customer_userdata['documentroot'] . 'test/', $result['path']);
|
||||
$this->assertEquals('test1', $result['authname']);
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerDirProtectionsAddSameUserPath()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'path' => '/test',
|
||||
'username' => 'testing',
|
||||
@@ -50,11 +55,11 @@ class DirProtectionsTest extends TestCase
|
||||
$this->expectExceptionMessage("Combination of username and path already exists");
|
||||
DirProtections::getLocal($customer_userdata, $data)->add();
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerDirProtectionsAddPasswordEqualsUsername()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
@@ -70,8 +75,9 @@ class DirProtectionsTest extends TestCase
|
||||
$this->expectExceptionMessage("The password should not be the same as the username.");
|
||||
DirProtections::getLocal($customer_userdata, $data)->add();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDirProtectionsAdd
|
||||
*/
|
||||
public function testAdminDirProtectionsGet()
|
||||
@@ -91,8 +97,9 @@ class DirProtectionsTest extends TestCase
|
||||
$this->assertEquals($customer_userdata['documentroot'] . 'test/', $result['path']);
|
||||
$this->assertEquals('test1', $result['authname']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDirProtectionsAdd
|
||||
*/
|
||||
public function testResellerDirProtectionsGet()
|
||||
@@ -117,21 +124,24 @@ class DirProtectionsTest extends TestCase
|
||||
$this->assertEquals($customer_userdata['documentroot'] . 'test/', $result['path']);
|
||||
$this->assertEquals('test1', $result['authname']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDirProtectionsAdd
|
||||
*/
|
||||
public function testCustomerDirProtectionsUpdate()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
$json_result = DirProtections::getLocal($customer_userdata, array('id' => 1))->get();
|
||||
|
||||
$json_result = DirProtections::getLocal($customer_userdata, array(
|
||||
'id' => 1
|
||||
))->get();
|
||||
$data_old = json_decode($json_result, true)['data'];
|
||||
|
||||
$data = [
|
||||
@@ -145,14 +155,15 @@ class DirProtectionsTest extends TestCase
|
||||
$this->assertTrue($data_old['authname'] != $result['authname']);
|
||||
$this->assertEquals('test1337', $result['authname']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDirProtectionsAdd
|
||||
*/
|
||||
public function testCustomerDirProtectionsList()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
@@ -165,21 +176,24 @@ class DirProtectionsTest extends TestCase
|
||||
$this->assertEquals('test1', $result['list'][0]['username']);
|
||||
$this->assertEquals('testing', $result['list'][1]['username']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerDirProtectionsList
|
||||
*/
|
||||
public function testCustomerDirProtectionsDelete()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
DirProtections::getLocal($customer_userdata, array('username' => 'testing'))->delete();
|
||||
|
||||
DirProtections::getLocal($customer_userdata, array(
|
||||
'username' => 'testing'
|
||||
))->delete();
|
||||
|
||||
$json_result = DirProtections::getLocal($customer_userdata)->listing();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Api\Commands\Froxlor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers Froxlor
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Froxlor
|
||||
*/
|
||||
class FroxlorTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\Ftps;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers Ftps
|
||||
* @covers Customers
|
||||
* @covers Admins
|
||||
*
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\Admins
|
||||
* @covers \Froxlor\Api\Commands\Customers
|
||||
* @covers \Froxlor\Api\Commands\Ftps
|
||||
*/
|
||||
class FtpsTest extends TestCase
|
||||
{
|
||||
@@ -19,7 +24,7 @@ class FtpsTest extends TestCase
|
||||
'id' => 1
|
||||
))->get();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
// should be the ftp user of the first added customr 'test1'
|
||||
$this->assertEquals('test1', $result['username']);
|
||||
}
|
||||
@@ -39,30 +44,30 @@ class FtpsTest extends TestCase
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals('test1', $result['username']);
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerFtpsGetId()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'id' => 1
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$json_result = Ftps::getLocal($customer_userdata, array(
|
||||
'id' => 1
|
||||
))->get();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
// should be the ftp user of the first added customr 'test1'
|
||||
$this->assertEquals('test1', $result['username']);
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerFtpsGetOtherId()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'id' => 1
|
||||
@@ -75,11 +80,11 @@ class FtpsTest extends TestCase
|
||||
'id' => 10
|
||||
))->get();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminFtpsList()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$json_result = Ftps::getLocal($admin_userdata)->listing();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(2, $result['count']);
|
||||
@@ -88,13 +93,15 @@ class FtpsTest extends TestCase
|
||||
public function testAdminFtpsListSpecificCustomer()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
$json_result = Ftps::getLocal($admin_userdata, array('loginname' => 'test1'))->listing();
|
||||
|
||||
$json_result = Ftps::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->listing();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals(1, $result['count']);
|
||||
$this->assertEquals('test1', $result['list'][0]['username']);
|
||||
}
|
||||
|
||||
|
||||
public function testResellerFtpsList()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -109,7 +116,7 @@ class FtpsTest extends TestCase
|
||||
$this->assertEquals(1, $result['count']);
|
||||
$this->assertEquals('test1', $result['list'][0]['username']);
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerFtpsList()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -123,17 +130,17 @@ class FtpsTest extends TestCase
|
||||
$this->assertEquals(1, $result['count']);
|
||||
$this->assertEquals('test1', $result['list'][0]['username']);
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerFtpsAdd()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'ftp_password' => 'h4xXx0r',
|
||||
'path' => '/',
|
||||
@@ -148,13 +155,13 @@ class FtpsTest extends TestCase
|
||||
public function testCustomerFtpsAddNoMoreResources()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];#
|
||||
|
||||
$customer_userdata = json_decode($json_result, true)['data']; //
|
||||
|
||||
$customer_userdata['ftps_used'] = 100;
|
||||
|
||||
$this->expectExceptionCode(406);
|
||||
@@ -172,7 +179,7 @@ class FtpsTest extends TestCase
|
||||
'ftp_description' => 'testing',
|
||||
'sendinfomail' => 1
|
||||
];
|
||||
|
||||
|
||||
$this->expectExceptionCode(406);
|
||||
$this->expectExceptionMessage('Requested parameter "loginname" is empty where it should not be for "Customers:get"');
|
||||
$json_result = Ftps::getLocal($admin_userdata, $data)->add();
|
||||
@@ -181,13 +188,13 @@ class FtpsTest extends TestCase
|
||||
public function testCustomerFtpsEdit()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'username' => 'test1ftp1',
|
||||
'ftp_password' => 'h4xXx0r2',
|
||||
@@ -196,10 +203,10 @@ class FtpsTest extends TestCase
|
||||
];
|
||||
$json_result = Ftps::getLocal($customer_userdata, $data)->update();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals($customer_userdata['documentroot'].'subfolder/', $result['homedir']);
|
||||
$this->assertEquals($customer_userdata['documentroot'] . 'subfolder/', $result['homedir']);
|
||||
$this->assertEquals('testing2', $result['description']);
|
||||
}
|
||||
|
||||
|
||||
public function testAdminFtpsEdit()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -217,20 +224,20 @@ class FtpsTest extends TestCase
|
||||
];
|
||||
$json_result = Ftps::getLocal($admin_userdata, $data)->update();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals($customer_userdata['documentroot'].'anotherfolder/', $result['homedir']);
|
||||
$this->assertEquals($customer_userdata['documentroot'] . 'anotherfolder/', $result['homedir']);
|
||||
$this->assertEquals('testing3', $result['description']);
|
||||
}
|
||||
|
||||
|
||||
public function testAdminFtpsAdd()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'customerid' => $customer_userdata['customerid'],
|
||||
'ftp_password' => 'h4xXx0r',
|
||||
@@ -242,11 +249,11 @@ class FtpsTest extends TestCase
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals($customer_userdata['documentroot'], $result['homedir']);
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerFtpsDelete()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
@@ -259,7 +266,7 @@ class FtpsTest extends TestCase
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals('test1ftp1', $result['username']);
|
||||
}
|
||||
|
||||
|
||||
public function testAdminFtpsDelete()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Api\Commands\Froxlor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers ApiParameter
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Froxlor
|
||||
*/
|
||||
class ApiParameterTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Database\Database;
|
||||
use Froxlor\Api\FroxlorRPC;
|
||||
|
||||
/**
|
||||
* @covers FroxlorRPC
|
||||
*
|
||||
* @covers \Froxlor\Api\FroxlorRPC
|
||||
*/
|
||||
class FroxlorRpcTest extends TestCase
|
||||
{
|
||||
@@ -84,7 +88,9 @@ class FroxlorRpcTest extends TestCase
|
||||
'apikey' => 'test',
|
||||
'secret' => 'test'
|
||||
],
|
||||
'body' => ['command' => 'Froxlor']
|
||||
'body' => [
|
||||
'command' => 'Froxlor'
|
||||
]
|
||||
));
|
||||
}
|
||||
|
||||
@@ -97,7 +103,9 @@ class FroxlorRpcTest extends TestCase
|
||||
'apikey' => 'test',
|
||||
'secret' => 'test'
|
||||
],
|
||||
'body' => ['command' => 'SomeModule.cmd']
|
||||
'body' => [
|
||||
'command' => 'SomeModule.cmd'
|
||||
]
|
||||
));
|
||||
}
|
||||
|
||||
@@ -108,7 +116,9 @@ class FroxlorRpcTest extends TestCase
|
||||
'apikey' => 'test',
|
||||
'secret' => 'test'
|
||||
],
|
||||
'body' => ['command' => 'Froxlor.listFunctions']
|
||||
'body' => [
|
||||
'command' => 'Froxlor.listFunctions'
|
||||
]
|
||||
));
|
||||
$this->assertEquals('Froxlor', $result['command']['class']);
|
||||
$this->assertEquals('listFunctions', $result['command']['method']);
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\IpsAndPorts;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers IpsAndPorts
|
||||
*
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\IpsAndPorts
|
||||
*/
|
||||
class IpsAndPortsTest extends TestCase
|
||||
{
|
||||
@@ -44,8 +49,9 @@ class IpsAndPortsTest extends TestCase
|
||||
$this->assertEquals(3, $result['id']);
|
||||
$this->assertEquals(80, $result['port']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminIpsAndPortsAdd
|
||||
*/
|
||||
public function testAdminIpsAndPortsAddExists()
|
||||
@@ -57,7 +63,7 @@ class IpsAndPortsTest extends TestCase
|
||||
];
|
||||
IpsAndPorts::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminIpsAndPortsAddIpv6()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -70,16 +76,19 @@ class IpsAndPortsTest extends TestCase
|
||||
$this->assertEquals(4, $result['id']);
|
||||
$this->assertEquals('/var/www/html/', $result['docroot']);
|
||||
}
|
||||
|
||||
|
||||
public function testAdminIpsAndPortsGetNotFound()
|
||||
{
|
||||
global $admin_userdata;
|
||||
$this->expectExceptionCode(404);
|
||||
$this->expectExceptionMessage("IP/port with id #999 could not be found");
|
||||
IpsAndPorts::getLocal($admin_userdata, array('id' => 999))->get();
|
||||
IpsAndPorts::getLocal($admin_userdata, array(
|
||||
'id' => 999
|
||||
))->get();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminIpsAndPortsAdd
|
||||
*/
|
||||
public function testResellerIpsAndPortsList()
|
||||
@@ -88,7 +97,9 @@ class IpsAndPortsTest extends TestCase
|
||||
// update reseller to allow ip access to ip id #3
|
||||
$json_result = Admins::getLocal($admin_userdata, array(
|
||||
'loginname' => 'reseller',
|
||||
'ipaddress' => array(3)
|
||||
'ipaddress' => array(
|
||||
3
|
||||
)
|
||||
))->update();
|
||||
$reseller_userdata = json_decode($json_result, true)['data'];
|
||||
$reseller_userdata['adminsession'] = 1;
|
||||
@@ -97,8 +108,9 @@ class IpsAndPortsTest extends TestCase
|
||||
$this->assertEquals(1, $result['count']);
|
||||
$this->assertEquals('82.149.225.47', $result['list'][0]['ip']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testResellerIpsAndPortsList
|
||||
*/
|
||||
public function testResellerIpsAndPortsGet()
|
||||
@@ -110,12 +122,15 @@ class IpsAndPortsTest extends TestCase
|
||||
))->get();
|
||||
$reseller_userdata = json_decode($json_result, true)['data'];
|
||||
$reseller_userdata['adminsession'] = 1;
|
||||
$json_result = IpsAndPorts::getLocal($reseller_userdata, array('id' => 3))->get();
|
||||
$json_result = IpsAndPorts::getLocal($reseller_userdata, array(
|
||||
'id' => 3
|
||||
))->get();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals('82.149.225.47', $result['ip']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testResellerIpsAndPortsList
|
||||
*/
|
||||
public function testResellerIpsAndPortsGetRestrictedNotOwned()
|
||||
@@ -129,9 +144,11 @@ class IpsAndPortsTest extends TestCase
|
||||
$reseller_userdata['adminsession'] = 1;
|
||||
$this->expectExceptionCode(405);
|
||||
$this->expectExceptionMessage("You cannot access this resource");
|
||||
IpsAndPorts::getLocal($reseller_userdata, array('id' => 1))->get();
|
||||
IpsAndPorts::getLocal($reseller_userdata, array(
|
||||
'id' => 1
|
||||
))->get();
|
||||
}
|
||||
|
||||
|
||||
public function testResellerIpsAndPortsAdd()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -159,9 +176,11 @@ class IpsAndPortsTest extends TestCase
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
$this->expectExceptionCode(403);
|
||||
$this->expectExceptionMessage("Not allowed to execute given command.");
|
||||
IpsAndPorts::getLocal($customer_userdata, array('id' => 1))->get();
|
||||
IpsAndPorts::getLocal($customer_userdata, array(
|
||||
'id' => 1
|
||||
))->get();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminIpsAndPortsEdit()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -221,7 +240,7 @@ class IpsAndPortsTest extends TestCase
|
||||
$this->expectExceptionMessage("You cannot change the last system IP, either create another new IP/Port combination for the system IP or change the system IP.");
|
||||
$json_result = IpsAndPorts::getLocal($admin_userdata, $data)->update();
|
||||
}
|
||||
|
||||
|
||||
public function testResellerIpsAndPortsEditNoDuplicate()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -237,7 +256,7 @@ class IpsAndPortsTest extends TestCase
|
||||
$this->expectExceptionMessage("This IP/Port combination already exists.");
|
||||
IpsAndPorts::getLocal($reseller_userdata, $data)->update();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminIpsAndPortsDeleteCantDeleteDefaultIp()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -247,7 +266,7 @@ class IpsAndPortsTest extends TestCase
|
||||
$this->expectExceptionMessage("You cannot delete the default IP/Port combination, please make another IP/Port combination default for before deleting this IP/Port combination.");
|
||||
IpsAndPorts::getLocal($admin_userdata, $data)->delete();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminIpsAndPortsDelete()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -258,7 +277,7 @@ class IpsAndPortsTest extends TestCase
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals('82.149.225.47', $result['ip']);
|
||||
}
|
||||
|
||||
|
||||
public function testResellerIpsAndPortsDeleteNotAllowed()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\Mysqls;
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers Mysqls
|
||||
* @covers Customers
|
||||
* @covers Admins
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\Mysqls
|
||||
* @covers \Froxlor\Api\Commands\Customers
|
||||
* @covers \Froxlor\Api\Commands\Admins
|
||||
*/
|
||||
class MysqlsTest extends TestCase
|
||||
{
|
||||
@@ -15,13 +19,13 @@ class MysqlsTest extends TestCase
|
||||
public function testCustomerMysqlsAdd()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'mysql_password' => generatePassword(),
|
||||
'description' => 'testdb',
|
||||
@@ -32,24 +36,26 @@ class MysqlsTest extends TestCase
|
||||
$this->assertEquals('testdb', $result['description']);
|
||||
$this->assertEquals(0, $result['dbserver']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerMysqlsAdd
|
||||
*/
|
||||
public function testAdminMysqlsGet()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
$json_result = Mysqls::getLocal($admin_userdata, array(
|
||||
'dbname' => 'test1sql1'
|
||||
))->get();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$this->assertEquals('test1sql1', $result['databasename']);
|
||||
$this->assertEquals('testdb', $result['description']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerMysqlsAdd
|
||||
*/
|
||||
public function testResellerMysqlsGet()
|
||||
@@ -68,17 +74,17 @@ class MysqlsTest extends TestCase
|
||||
$this->assertEquals('test1sql1', $result['databasename']);
|
||||
$this->assertEquals('testdb', $result['description']);
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerMysqlsGetUnknown()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'dbname' => 'test1sql5'
|
||||
];
|
||||
@@ -86,19 +92,15 @@ class MysqlsTest extends TestCase
|
||||
$this->expectExceptionMessage("MySQL database with dbname 'test1sql5' could not be found");
|
||||
Mysqls::getLocal($customer_userdata, $data)->get();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerMysqlsAdd
|
||||
*/
|
||||
public function testAdminMysqlsUpdate()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
$json_result = Mysqls::getLocal($admin_userdata, array(
|
||||
'dbname' => 'test1sql1'
|
||||
))->get();
|
||||
$old_db = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'dbname' => 'test1sql1',
|
||||
'mysql_password' => generatePassword(),
|
||||
@@ -109,14 +111,15 @@ class MysqlsTest extends TestCase
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals('testdb-upd', $result['description']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerMysqlsAdd
|
||||
*/
|
||||
public function testCustomerMysqlsList()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
@@ -128,20 +131,21 @@ class MysqlsTest extends TestCase
|
||||
$this->assertEquals(1, $result['count']);
|
||||
$this->assertEquals('test1sql1', $result['list'][0]['databasename']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerMysqlsList
|
||||
*/
|
||||
public function testCustomerMysqlsDelete()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'dbname' => 'test1sql1'
|
||||
];
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\FpmDaemons;
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers FpmDaemons
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\FpmDaemons
|
||||
*/
|
||||
class FpmDaemonsTest extends TestCase
|
||||
{
|
||||
|
||||
private static $id = 0;
|
||||
|
||||
public function testAdminFpmDaemonsAdd()
|
||||
@@ -27,7 +31,7 @@ class FpmDaemonsTest extends TestCase
|
||||
$this->assertEquals('.php', $result['limit_extensions']);
|
||||
self::$id = $result['id'];
|
||||
}
|
||||
|
||||
|
||||
public function testAdminFpmDaemonsAddUnknownPM()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -41,7 +45,7 @@ class FpmDaemonsTest extends TestCase
|
||||
$this->expectExceptionMessage("Unknown process manager");
|
||||
FpmDaemons::getLocal($admin_userdata, $data)->add();
|
||||
}
|
||||
|
||||
|
||||
public function testAdminFpmDaemonsAddInvalidDesc()
|
||||
{
|
||||
// max 50. characters
|
||||
@@ -56,6 +60,7 @@ class FpmDaemonsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminFpmDaemonsAdd
|
||||
*/
|
||||
public function testAdminFpmDaemonsUpdate()
|
||||
@@ -67,7 +72,7 @@ class FpmDaemonsTest extends TestCase
|
||||
'pm' => 'dynamic',
|
||||
'max_children' => '10',
|
||||
'start_servers' => '4',
|
||||
'limit_extensions' => '.php .php.xml',
|
||||
'limit_extensions' => '.php .php.xml'
|
||||
];
|
||||
$json_result = FpmDaemons::getLocal($admin_userdata, $data)->update();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -77,6 +82,7 @@ class FpmDaemonsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminFpmDaemonsUpdate
|
||||
*/
|
||||
public function testAdminFpmDaemonsUpdate2()
|
||||
@@ -84,7 +90,7 @@ class FpmDaemonsTest extends TestCase
|
||||
global $admin_userdata;
|
||||
$data = [
|
||||
'id' => self::$id,
|
||||
'limit_extensions' => '',
|
||||
'limit_extensions' => ''
|
||||
];
|
||||
$json_result = FpmDaemons::getLocal($admin_userdata, $data)->update();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -92,6 +98,7 @@ class FpmDaemonsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminFpmDaemonsAdd
|
||||
*/
|
||||
public function testAdminFpmDaemonsUpdateUnknownPM()
|
||||
@@ -105,8 +112,9 @@ class FpmDaemonsTest extends TestCase
|
||||
$this->expectExceptionMessage("Unknown process manager");
|
||||
FpmDaemons::getLocal($admin_userdata, $data)->update();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminFpmDaemonsAdd
|
||||
*/
|
||||
public function testAdminFpmDaemonsUpdateInvalidDesc()
|
||||
@@ -122,6 +130,7 @@ class FpmDaemonsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminFpmDaemonsUpdate
|
||||
*/
|
||||
public function testAdminFpmDaemonsList()
|
||||
@@ -139,7 +148,9 @@ class FpmDaemonsTest extends TestCase
|
||||
global $admin_userdata;
|
||||
$this->expectExceptionCode(404);
|
||||
$this->expectExceptionMessage("fpm-daemon with id #-1 could not be found");
|
||||
FpmDaemons::getLocal($admin_userdata, array('id' => -1))->get();
|
||||
FpmDaemons::getLocal($admin_userdata, array(
|
||||
'id' => - 1
|
||||
))->get();
|
||||
}
|
||||
|
||||
public function testCustomerFpmDaemonsAdd()
|
||||
@@ -154,7 +165,7 @@ class FpmDaemonsTest extends TestCase
|
||||
$this->expectExceptionMessage("Not allowed to execute given command.");
|
||||
FpmDaemons::getLocal($customer_userdata)->add();
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerFpmDaemonsGet()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -208,6 +219,7 @@ class FpmDaemonsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminFpmDaemonsList
|
||||
*/
|
||||
public function testAdminFpmDaemonsDelete()
|
||||
@@ -224,6 +236,7 @@ class FpmDaemonsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminFpmDaemonsDelete
|
||||
*/
|
||||
public function testAdminFpmDaemonsDeleteDefaultConfig()
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\PhpSettings;
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers PhpSettings
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\PhpSettings
|
||||
*/
|
||||
class PhpSettingsText extends TestCase
|
||||
{
|
||||
|
||||
private static $id = 0;
|
||||
|
||||
public function testAdminPhpSettingsList()
|
||||
@@ -47,7 +52,7 @@ class PhpSettingsText extends TestCase
|
||||
$this->assertEquals('60s', $result['fpm_reqterm']);
|
||||
self::$id = $result['id'];
|
||||
}
|
||||
|
||||
|
||||
public function testAdminPhpSettingsGet()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -65,9 +70,11 @@ class PhpSettingsText extends TestCase
|
||||
global $admin_userdata;
|
||||
$this->expectExceptionCode(404);
|
||||
$this->expectExceptionMessage("php-config with id #999 could not be found");
|
||||
PhpSettings::getLocal($admin_userdata, array('id' => 999))->get();
|
||||
PhpSettings::getLocal($admin_userdata, array(
|
||||
'id' => 999
|
||||
))->get();
|
||||
}
|
||||
|
||||
|
||||
public function testCustomerPhpSettingsGetNotAllowed()
|
||||
{
|
||||
global $admin_userdata;
|
||||
@@ -78,6 +85,8 @@ class PhpSettingsText extends TestCase
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
$this->expectExceptionCode(403);
|
||||
$this->expectExceptionMessage("Not allowed to execute given command.");
|
||||
PhpSettings::getLocal($customer_userdata, array('id' => 1))->get();
|
||||
PhpSettings::getLocal($customer_userdata, array(
|
||||
'id' => 1
|
||||
))->get();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Api\Commands\Admins;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\SubDomains;
|
||||
|
||||
/**
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers SubDomains
|
||||
* @covers Domains
|
||||
* @covers Customers
|
||||
* @covers Admins
|
||||
*
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\SubDomains
|
||||
* @covers \Froxlor\Api\Commands\Domains
|
||||
* @covers \Froxlor\Api\Commands\Customers
|
||||
* @covers \Froxlor\Api\Commands\Admins
|
||||
*/
|
||||
class SubDomainsTest extends TestCase
|
||||
{
|
||||
@@ -15,13 +20,13 @@ class SubDomainsTest extends TestCase
|
||||
public function testCustomerSubDomainsAdd()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'subdomain' => 'mysub',
|
||||
'domain' => 'test2.local'
|
||||
@@ -40,7 +45,7 @@ class SubDomainsTest extends TestCase
|
||||
))->get();
|
||||
$reseller_userdata = json_decode($json_result, true)['data'];
|
||||
$reseller_userdata['adminsession'] = 1;
|
||||
|
||||
|
||||
$data = [
|
||||
'subdomain' => 'mysub2',
|
||||
'domain' => 'test2.local',
|
||||
@@ -54,13 +59,13 @@ class SubDomainsTest extends TestCase
|
||||
public function testCustomerSubDomainsAddNoPunycode()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'subdomain' => 'xn--asd',
|
||||
'domain' => 'unknown.froxlor.org'
|
||||
@@ -72,13 +77,13 @@ class SubDomainsTest extends TestCase
|
||||
public function testCustomerSubDomainsAddMainDomainUnknown()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'subdomain' => 'wohoo',
|
||||
'domain' => 'unknown.froxlor.org'
|
||||
@@ -90,13 +95,13 @@ class SubDomainsTest extends TestCase
|
||||
public function testCustomerSubDomainsAddInvalidDomain()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'subdomain' => '#+?',
|
||||
'domain' => 'unknown.froxlor.org'
|
||||
@@ -106,18 +111,13 @@ class SubDomainsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerSubDomainsAdd
|
||||
*/
|
||||
public function testAdminSubDomainsGet()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'mysub.test2.local'
|
||||
];
|
||||
@@ -128,18 +128,13 @@ class SubDomainsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerSubDomainsAdd
|
||||
*/
|
||||
public function testAdminSubDomainsGetMainDomain()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
))->get();
|
||||
$customer_userdata = json_decode($json_result, true)['data'];
|
||||
|
||||
|
||||
$data = [
|
||||
'domainname' => 'test2.local'
|
||||
];
|
||||
@@ -150,6 +145,7 @@ class SubDomainsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerSubDomainsAdd
|
||||
*/
|
||||
public function testAdminSubDomainsUpdate()
|
||||
@@ -172,6 +168,7 @@ class SubDomainsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testAdminSubDomainsUpdate
|
||||
*/
|
||||
public function testCustomerSubDomainsUpdate()
|
||||
@@ -185,7 +182,7 @@ class SubDomainsTest extends TestCase
|
||||
$data = [
|
||||
'domainname' => 'mysub.test2.local',
|
||||
'url' => 'https://www.froxlor.org/',
|
||||
'isemaildomain' => 0,
|
||||
'isemaildomain' => 0
|
||||
];
|
||||
$json_result = SubDomains::getLocal($customer_userdata, $data)->update();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
@@ -195,7 +192,7 @@ class SubDomainsTest extends TestCase
|
||||
public function testCustomerSubDomainsList()
|
||||
{
|
||||
global $admin_userdata;
|
||||
|
||||
|
||||
// get customer
|
||||
$json_result = Customers::getLocal($admin_userdata, array(
|
||||
'loginname' => 'test1'
|
||||
@@ -231,6 +228,7 @@ class SubDomainsTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @depends testCustomerSubDomainsList
|
||||
*/
|
||||
public function testCustomerSubDomainsDelete()
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
use Froxlor\Database\Database;
|
||||
use Froxlor\Api\Commands\Customers;
|
||||
use Froxlor\Api\Commands\Traffic;
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers Traffic
|
||||
* @covers Customers
|
||||
* @covers Admins
|
||||
* @covers \Froxlor\Api\ApiCommand
|
||||
* @covers \Froxlor\Api\ApiParameter
|
||||
* @covers \Froxlor\Api\Commands\Traffic
|
||||
* @covers \Froxlor\Api\Commands\Customers
|
||||
* @covers \Froxlor\Api\Commands\Admins
|
||||
*/
|
||||
class TrafficTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -53,7 +53,6 @@ Database::query("TRUNCATE TABLE `" . TABLE_PANEL_DISKSPACE . "`;");
|
||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_DISKSPACE_ADMINS . "`;");
|
||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_TRAFFIC . "`;");
|
||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_TRAFFIC_ADMINS . "`;");
|
||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_TICKETS . "`;");
|
||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_TASKS . "`;");
|
||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_SESSIONS . "`;");
|
||||
Database::query("TRUNCATE TABLE `" . TABLE_PANEL_LOG . "`;");
|
||||
@@ -87,8 +86,6 @@ Database::query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` SET
|
||||
`email_forwarders` = -1,
|
||||
`email_quota` = -1,
|
||||
`ftps` = -1,
|
||||
`tickets` = -1,
|
||||
`tickets_see_all` = 1,
|
||||
`subdomains` = -1,
|
||||
`traffic` = -1048576,
|
||||
`ip` = -1
|
||||
|
||||
Reference in New Issue
Block a user