return false; } else { if ($reseller_ips == '') { set_page_message(tr('You must assign at least one IP number for a reseller!')); return false; } } } } } } return true; } /* * * static page messages. * */ gen_admin_menu($tpl); $reseller_ips = get_server_ip($tpl, $sql); add_reseller($tpl, $sql); $timestamp = time(); $genpas = substr(md5($timestamp), 0, 6); $tpl->assign(array('TR_ADD_RESELLER' => tr('Add reseller'), 'TR_CORE_DATA' => tr('Core data'), 'TR_USERNAME' => tr('Username'), 'TR_PASSWORD' => tr('Password'), 'TR_PASSWORD_REPEAT' => tr('Password repeat'), 'TR_EMAIL' => tr('Email'), 'TR_UNLIMITED' => tr('unlimited'), 'TR_MAX_DOMAIN_COUNT' => tr('Max Domain count'), 'TR_MAX_SUBDOMAIN_COUNT' => tr('Max subdomain count'), 'TR_MAX_ALIASES_COUNT' => tr('Max aliases count'), 'TR_MAX_MAIL_USERS_COUNT' => tr('Max mail users count'), 'TR_MAX_FTP_USERS_COUNT' => tr('Max FTP users count'), 'TR_MAX_SQLDB_COUNT' => tr('Max SQL databases count'), 'TR_MAX_SQL_USERS_COUNT' => tr('Max SQL users count'), 'TR_MAX_TRAFFIC_AMOUNT' => tr('Max traffic amount [MB]'), 'TR_MAX_DISK_AMOUNT' => tr('Max disk amount [MB]'), 'TR_PHP' => tr('PHP'), 'TR_PERL_CGI' => tr('CGI / Perl'), 'TR_JSP' => tr('JSP'), 'TR_SSI' => tr('SSI'), 'TR_FRONTPAGE_EXT' => tr('Fronpage extensions'), 'TR_BACKUP_RESTORE' => tr('Backup and restore'), 'TR_CUSTOM_ERROR_PAGES' => tr('Custom error pages'), 'TR_PROTECTED_AREAS' => tr('Protected areas'), 'TR_WEBMAIL' => tr('Webmail'), 'TR_DIR_LIST' => tr('Directory listing'), 'TR_APACHE_LOGFILES' => tr('Apache logfiles'), 'TR_AWSTATS' => tr('AwStats'), 'TR_LOGO_UPLOAD' => tr('Logo upload'), 'TR_YES' => tr('yes'), 'TR_NO' => tr('no'), 'TR_RESELLER_IPS' => tr('Reseller IPs'), 'TR_ADDITIONAL_DATA' => tr('Additional data'), 'TR_CUSTOMER_ID' => tr('Customer ID'), 'TR_FIRST_NAME' => tr('First name'), 'TR_LAST_NAME' => tr('Last name'), 'TR_COMPANY' => tr('Company'), 'TR_ZIP_POSTAL_CODE' => tr('Zip/Postal code'), 'TR_CITY' => tr('City'), 'TR_COUNTRY' => tr('Country'), 'TR_STREET_1' => tr('Street 1'), 'TR_STREET_2' => tr('Street 2'), 'TR_PHONE' => tr('Phone'), 'TR_FAX' => tr('Fax'), 'TR_PHONE' => tr('Phone'), 'TR_ADD' => tr('Add'), 'GENPAS' => $genpas)); gen_page_message($tpl); $tpl->parse('PAGE', 'page'); $tpl->prnt(); if (isset($cfg['DUMP_GUI_DEBUG'])) { dump_gui_debug(); } unset_messages();
* * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * @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 = 'admin/reseller_add.tpl'; // static page messages $reseller_ips = get_server_ip($tpl); add_reseller($tpl); $tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Admin/Manage users/Add reseller'), 'TR_ADD_RESELLER' => tr('Add reseller'), 'TR_CORE_DATA' => tr('Core data'), 'TR_USERNAME' => tr('Username'), 'TR_PASSWORD' => tr('Password'), 'TR_PASSWORD_REPEAT' => tr('Repeat password'), 'TR_EMAIL' => tr('Email'), 'TR_MAX_DOMAIN_COUNT' => tr('Domains limit<br /><em>(0 unlimited)</em>'), 'TR_MAX_SUBDOMAIN_COUNT' => tr('Subdomains limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_ALIASES_COUNT' => tr('Aliases limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_MAIL_USERS_COUNT' => tr('Mail accounts limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_FTP_USERS_COUNT' => tr('FTP accounts limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_SQLDB_COUNT' => tr('SQL databases limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_SQL_USERS_COUNT' => tr('SQL users limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_TRAFFIC_AMOUNT' => tr('Traffic limit [MB]<br /><em>(0 unlimited)</em>'), 'TR_MAX_DISK_AMOUNT' => tr('Disk limit [MB]<br /><em>(0 unlimited)</em>'), 'TR_PHP' => tr('PHP'), 'TR_PERL_CGI' => tr('CGI / Perl'), 'TR_JSP' => tr('JSP'), 'TR_SSI' => tr('SSI'), 'TR_FRONTPAGE_EXT' => tr('Frontpage extensions'), 'TR_BACKUP_RESTORE' => tr('Backup and restore'), 'TR_CUSTOM_ERROR_PAGES' => tr('Custom error pages'), 'TR_PROTECTED_AREAS' => tr('Protected areas'), 'TR_WEBMAIL' => tr('Webmail'), 'TR_DIR_LIST' => tr('Directory listing'), 'TR_APACHE_LOGFILES' => tr('Apache logfiles'), 'TR_AWSTATS' => tr('AwStats'), 'TR_LOGO_UPLOAD' => tr('Logo upload'), 'TR_YES' => tr('Yes'), 'TR_NO' => tr('No'), 'TR_SUPPORT_SYSTEM' => tr('Support system'), 'TR_RESELLER_IPS' => tr('Reseller IPs'), 'TR_ADDITIONAL_DATA' => tr('Additional data'), 'TR_CUSTOMER_ID' => tr('Customer ID'), 'TR_FIRST_NAME' => tr('First name'), 'TR_LAST_NAME' => tr('Last name'), 'TR_GENDER' => tr('Gender'), 'TR_MALE' => tr('Male'), 'TR_FEMALE' => tr('Female'), 'TR_UNKNOWN' => tr('Unknown'), 'TR_COMPANY' => tr('Company'), 'TR_ZIP_POSTAL_CODE' => tr('Zip/Postal code'), 'TR_CITY' => tr('City'), 'TR_STATE' => tr('State/Province'), 'TR_COUNTRY' => tr('Country'), 'TR_STREET_1' => tr('Street 1'), 'TR_STREET_2' => tr('Street 2'), 'TR_PHONE' => tr('Phone'), 'TR_FAX' => tr('Fax'), 'TR_ADD' => tr('Add'), 'GENPAS' => passgen())); gen_admin_mainmenu($tpl, 'admin/main_menu_users_manage.tpl'); gen_admin_menu($tpl, 'admin/menu_users_manage.tpl'); gen_page_message($tpl); if ($cfg->DUMP_GUI_DEBUG) { dump_gui_debug($tpl); } $tpl->display($template); unset_messages(); /** * Get Server IPs * @param EasySCP_TemplateEngine $tpl */ function get_server_ip($tpl) {