if ($_POST['uaction'] == "close") { // close ticket closeTicket($ticket_id); } elseif ($_POST['uaction'] == "open") { // open ticket openTicket($ticket_id); } elseif (empty($_POST['user_message'])) { // no message check->error set_page_message(tr('Please type your message!'), 'warning'); } else { $userLevel = getUserLevel($_GET['ticket_id']); updateTicket($ticket_id, $user_id, $_POST['urgency'], $_POST['subject'], $_POST['user_message'], $userLevel, 2); user_goto('ticket_system.php'); } } showTicketContent($tpl, $ticket_id, $user_id, $screenwidth); } else { set_page_message(tr('Ticket not found!'), 'error'); user_goto('ticket_system.php'); } // static page messages gen_logged_from($tpl); $tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Reseller: Support System: View Ticket'), 'TR_VIEW_SUPPORT_TICKET' => tr('View support ticket'), 'TR_TICKET_URGENCY' => tr('Priority'), 'TR_TICKET_SUBJECT' => tr('Subject'), 'TR_TICKET_DATE' => tr('Date'), 'TR_DELETE' => tr('Delete'), 'TR_NEW_TICKET_REPLY' => tr('Send message reply'), 'TR_REPLY' => tr('Send reply'), 'TR_TICKET_FROM' => tr('From'), 'TR_OPEN_TICKETS' => tr('Open tickets'), 'TR_CLOSED_TICKETS' => tr('Closed tickets'))); gen_reseller_mainmenu($tpl, 'reseller/main_menu_ticket_system.tpl'); gen_reseller_menu($tpl, 'reseller/menu_ticket_system.tpl'); gen_page_message($tpl); if ($cfg->DUMP_GUI_DEBUG) { dump_gui_debug($tpl); } $tpl->display($template); unset_messages();
* * This work is licensed under the Creative Commons Attribution-NoDerivs 3.0 Unported License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/3.0/. * * @link http://www.easyscp.net * @author EasySCP Team */ require '../../include/easyscp-lib.php'; check_login(__FILE__); $cfg = EasySCP_Registry::get('Config'); $tpl = EasySCP_TemplateEngine::getInstance(); $template = 'reseller/cronjob_overview.tpl'; $tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Reseller/Manage cronjobs'), 'TR_CLIENT_CRONJOBS_TITLE' => tr('EasySCP - Reseller/Cronjob Manager'), 'THEME_COLOR_PATH' => "../themes/{$cfg->USER_INITIAL_THEME}", 'THEME_CHARSET' => tr('encoding'), 'TR_CRONJOB_OVERVIEW' => tr('Cronjob Overview'))); /* * * static page messages. * */ gen_reseller_mainmenu($tpl, 'reseller/main_menu_users_manage.tpl'); gen_reseller_menu($tpl, 'reseller/menu_users_manage.tpl'); gen_page_message($tpl); gen_logged_from($tpl); check_permissions($tpl); EasyCron::genCronjobLlist($tpl); $tpl->assign(array('TR_CRON_MANAGER' => tr('Cronjob Manager'), 'TR_MESSAGE_DELETE' => tr('Are you sure you want to delete %s?', true, '%s'), 'TR_MESSAGE_CHANGE_STATUS' => tr('Are you sure you want to change the status of cronjob %s?', '%s'), 'TR_CRONJOBS' => tr('Cronjobs'), 'TR_ACTIVE' => tr('Active'), 'TR_ACTION' => tr('Active'), 'TR_EDIT' => tr('Edit'), 'TR_DELETE' => tr('Delete'), 'TR_ADD' => tr('Add Cronjob'), 'TR_CRONJOB_NAME' => tr('Name'), 'TR_USER' => tr('User'), 'TR_DESCR' => tr('Description'), 'TR_ADMIN_OPTIONS' => tr('Admin options'), 'TR_OWNER' => tr('Owner'))); gen_page_message($tpl); $tpl->display($template); if ($cfg->DUMP_GUI_DEBUG) { dump_gui_debug($tpl); } unset_messages();
// Save data to db save_data_to_db(); } else { restore_form($tpl, $sql); } } else { // Get hosting plan id that comes for edit if (isset($_GET['hpid'])) { $hpid = $_GET['hpid']; } gen_load_ehp_page($tpl, $sql, $hpid, $_SESSION['user_id']); } // static page messages gen_logged_from($tpl); $tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Reseller/Edit hosting plan'), 'TR_HOSTING PLAN PROPS' => tr('Hosting plan properties'), 'TR_TEMPLATE_NAME' => tr('Template name'), 'TR_MAX_SUBDOMAINS' => tr('Max subdomains<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_ALIASES' => tr('Max aliases<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_MAILACCOUNTS' => tr('Mail accounts limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_FTP' => tr('FTP accounts limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_SQL' => tr('SQL databases limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_SQL_USERS' => tr('SQL users limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_TRAFFIC' => tr('Traffic limit [MB]<br /><em>(0 unlimited)</em>'), 'TR_DISK_LIMIT' => tr('Disk limit [MB]<br /><em>(0 unlimited)</em>'), 'TR_PHP' => tr('PHP'), 'TR_PHP_EDIT' => tr('PHP editor'), 'TR_CGI' => tr('CGI / Perl'), 'TR_SSL' => tr('SSL support'), 'TR_DNS' => tr('Allow adding records to DNS zone'), 'TR_BACKUP' => tr('Backup'), 'TR_BACKUP_DOMAIN' => tr('Domain'), 'TR_BACKUP_SQL' => tr('SQL'), 'TR_BACKUP_FULL' => tr('Full'), 'TR_BACKUP_NO' => tr('No'), 'TR_BACKUP_COUNT' => tr('Count backups to disk usage'), 'TR_APACHE_LOGS' => tr('Apache logfiles'), 'TR_AWSTATS' => tr('AwStats'), 'TR_YES' => tr('Yes'), 'TR_NO' => tr('No'), 'TR_BILLING_PROPS' => tr('Billing Settings'), 'TR_PRICE' => tr('Price'), 'TR_SETUP_FEE' => tr('Setup fee'), 'TR_VALUE' => tr('Currency'), 'TR_PAYMENT' => tr('Payment period'), 'TR_STATUS' => tr('Available for purchasing'), 'TR_TEMPLATE_DESCRIPTON' => tr('Description'), 'TR_EXAMPLE' => tr('(e.g. EUR)'), 'TR_TOS_PROPS' => tr('Term Of Service'), 'TR_TOS_NOTE' => tr('<strong>Optional:</strong> Leave this field empty if you do not want term of service for this hosting plan.'), 'TR_TOS_DESCRIPTION' => tr('Text'), 'TR_EDIT_HOSTING_PLAN' => tr('Update plan'), 'TR_UPDATE_PLAN' => tr('Update plan'))); gen_reseller_mainmenu($tpl, 'reseller/main_menu_hosting_plan.tpl'); gen_reseller_menu($tpl, 'reseller/menu_hosting_plan.tpl'); gen_page_message($tpl); if ($cfg->DUMP_GUI_DEBUG) { dump_gui_debug($tpl); } $tpl->display($template); /** * Function definitions */ /** * Restore form on any error * @param EasySCP_TemplateEngine $tpl * @param EasySCP_Database $sql */ function restore_form($tpl, $sql)
* @link http://www.easyscp.net * @author EasySCP Team */ require '../../include/easyscp-lib.php'; $cfg = EasySCP_Registry::get('Config'); check_login(__FILE__); $tpl = EasySCP_TemplateEngine::getInstance(); $template = 'reseller/index.tpl'; // dynamic page data generate_page_data($tpl, $_SESSION['user_id'], $_SESSION['user_logged']); gen_messages_table($tpl, $_SESSION['user_id']); gen_system_message($tpl); // static page messages gen_logged_from($tpl); $tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Reseller/Main Index'), 'TR_TRAFFIC_USAGE' => tr('Traffic usage'), 'TR_DISK_USAGE' => tr('Disk usage'))); gen_reseller_mainmenu($tpl, 'reseller/main_menu_general_information.tpl'); gen_reseller_menu($tpl, 'reseller/menu_general_information.tpl'); gen_page_message($tpl); if ($cfg->DUMP_GUI_DEBUG) { dump_gui_debug($tpl); } $tpl->display($template); unset_messages(); // page functions /** * @param EasySCP_TemplateEngine $tpl */ function gen_system_message($tpl) { $sql = EasySCP_Registry::get('Db'); $user_id = $_SESSION['user_id'];
if (isset($_POST['month']) && isset($_POST['year'])) { $year = intval($_POST['year']); $month = intval($_POST['month']); } else { if (isset($_GET['month']) && isset($_GET['year'])) { $month = intval($_GET['month']); $year = intval($_GET['year']); } } if (!is_numeric($rid) || !is_numeric($month) || !is_numeric($year)) { user_goto('./reseller_statistics.php'); } // static page messages gen_logged_from($tpl); $tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Admin/Reseller User Statistics'), 'TR_RESELLER_USER_STATISTICS' => tr('Reseller users table'), 'TR_MONTH' => tr('Month'), 'TR_YEAR' => tr('Year'), 'TR_SHOW' => tr('Show'), 'TR_NO_DOMAINS' => tr('This reseller has no domains yet.'), 'TR_DOMAIN_NAME' => tr('Domain'), 'TR_TRAFF' => tr('Traffic<br />usage'), 'TR_DISK' => tr('Disk<br />usage'), 'TR_WEB' => tr('Web<br />traffic'), 'TR_FTP_TRAFF' => tr('FTP<br />traffic'), 'TR_SMTP' => tr('SMTP<br />traffic'), 'TR_POP3' => tr('POP3/IMAP<br />traffic'), 'TR_SUBDOMAIN' => tr('Subdomain'), 'TR_ALIAS' => tr('Alias'), 'TR_MAIL' => tr('Mail'), 'TR_FTP' => tr('FTP'), 'TR_SQL_DB' => tr('SQL<br />database'), 'TR_SQL_USER' => tr('SQL<br />user'), 'VALUE_NAME' => $name, 'VALUE_RID' => $rid)); gen_reseller_mainmenu($tpl, 'reseller/main_menu_statistics.tpl'); gen_reseller_menu($tpl, 'reseller/menu_statistics.tpl'); gen_select_lists($tpl, $month, $year); generate_page($tpl, $rid, $name); gen_page_message($tpl); if ($cfg->DUMP_GUI_DEBUG) { dump_gui_debug($tpl); } $tpl->display($template); unset_messages(); /** * @param EasySCP_TemplateEngine $tpl * @param int $reseller_id * @param string $reseller_name */ function generate_page($tpl, $reseller_id, $reseller_name)