Ejemplo n.º 1
0
 * 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 = 'client/protected_group_add.tpl';
padd_group($tpl, $sql, get_user_domain_id($_SESSION['user_id']));
// static page messages
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Client/Webtools'), 'TR_HTACCESS' => tr('Protected areas'), 'TR_ACTION' => tr('Action'), 'TR_USER_MANAGE' => tr('Manage user'), 'TR_USERS' => tr('User'), 'TR_USERNAME' => tr('Username'), 'TR_ADD_USER' => tr('Add user'), 'TR_GROUPNAME' => tr('Group name'), 'TR_GROUP_MEMBERS' => tr('Group members'), 'TR_ADD_GROUP' => tr('Add group'), 'TR_EDIT' => tr('Edit'), 'TR_GROUP' => tr('Group'), 'TR_DELETE' => tr('Delete'), 'TR_GROUPS' => tr('Groups'), 'TR_PASSWORD' => tr('Password'), 'TR_PASSWORD_REPEAT' => tr('Repeat password'), 'TR_CANCEL' => tr('Cancel')));
gen_client_mainmenu($tpl, 'client/main_menu_webtools.tpl');
gen_client_menu($tpl, 'client/menu_webtools.tpl');
gen_page_message($tpl);
if ($cfg->DUMP_GUI_DEBUG) {
    dump_gui_debug($tpl);
}
$tpl->display($template);
unset_messages();
function padd_group($tpl, $sql, $dmn_id)
{
    $cfg = EasySCP_Registry::get('Config');
    if (isset($_POST['uaction']) && $_POST['uaction'] == 'add_group') {
        // we have to add the group
        if (isset($_POST['groupname'])) {
            if (!validates_username($_POST['groupname'])) {
                set_page_message(tr('Invalid group name!'), 'warning');
Ejemplo n.º 2
0
} else {
    if (isset($_POST['id'])) {
        $item_id = $_POST['id'];
    } else {
        user_goto('mail_catchall.php');
    }
}
// dynamic page data.
gen_dynamic_page_data($tpl, $sql, $item_id);
create_catchall_mail_account($sql, $item_id);
$tpl->assign('ID', $item_id);
// static page messages.
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Client/Create CatchAll Mail Account'), 'TR_CREATE_CATCHALL_MAIL_ACCOUNT' => tr('Create catch all mail account'), 'TR_MAIL_LIST' => tr('Mail accounts list'), 'TR_CREATE_CATCHALL' => tr('Create catch all'), 'TR_FORWARD_MAIL' => tr('Forward mail'), 'TR_FORWARD_TO' => tr('Forward to')));
gen_client_mainmenu($tpl, 'client/main_menu_email_accounts.tpl');
gen_client_menu($tpl, 'client/menu_email_accounts.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
 * @param EasySCP_Database $sql
 * @param int $id
 */
function gen_dynamic_page_data($tpl, $sql, $id)
{
Ejemplo n.º 3
0
        user_goto('dns_overview.php');
    }
} else {
    // Get user id that come for edit
    if (isset($_GET['edit_id'])) {
        $editid = $_GET['edit_id'];
    } else {
        $editid = 0;
    }
    $_SESSION['edit_ID'] = $editid;
}
gen_editdns_page($tpl, $editid, $add_mode);
// static page messages
gen_logged_from($tpl);
$tpl->assign(array('TR_PAGE_TITLE' => $add_mode ? tr("EasySCP - Manage Domain Alias/Add DNS zone's record") : tr("EasySCP - Manage Domain Alias/Edit DNS zone's record"), 'ACTION_MODE' => $add_mode ? 'dns_add.php' : 'dns_edit.php?edit_id=' . $editid, 'TR_MODIFY' => tr('Modify'), 'TR_CANCEL' => tr('Cancel'), 'TR_ADD' => tr('Add'), 'TR_DOMAIN' => tr('Domain'), 'TR_EDIT_DNS' => $add_mode ? tr("Add DNS zone's record") : tr("Edit DNS zone's record"), 'TR_DNS' => tr("DNS zone's records"), 'TR_DNS_NAME' => tr('Name'), 'TR_DNS_CLASS' => tr('Class'), 'TR_DNS_TYPE' => tr('Type'), 'TR_DNS_SRV_NAME' => tr('Service name'), 'TR_DNS_IP_ADDRESS' => tr('IP address'), 'TR_DNS_IP_ADDRESS_V6' => tr('IPv6 address'), 'TR_DNS_SRV_PROTOCOL' => tr('Service protocol'), 'TR_DNS_SRV_TTL' => tr('TTL'), 'TR_DNS_SRV_PRIO' => tr('Priority'), 'TR_DNS_SRV_WEIGHT' => tr('Relative weight for records with the same priority'), 'TR_DNS_SRV_HOST' => tr('Target host'), 'TR_DNS_SRV_PORT' => tr('Target port'), 'TR_DNS_TXT' => tr('Text'), 'TR_DNS_CNAME' => tr('Canonical name'), 'TR_DNS_PLAIN' => tr('Plain record data'), 'TR_MANAGE_DOMAIN_DNS' => tr("DNS zone's records"), 'TR_DNS_NS' => tr('Hostname of Nameserver')));
gen_client_mainmenu($tpl, 'client/main_menu_manage_domains.tpl');
gen_client_menu($tpl, 'client/menu_manage_domains.tpl');
gen_page_message($tpl);
if ($cfg->DUMP_GUI_DEBUG) {
    dump_gui_debug($tpl);
}
$tpl->display($template);
unset_messages();
// Begin function block
/**
 * @todo use template loop instead of this hardcoded HTML
 */
function create_options($data, $value = null)
{
    $cfg = EasySCP_Registry::get('Config');
    $res = '';
Ejemplo n.º 4
0
 * 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__);
if (isset($_POST['uaction']) && $_POST['uaction'] === 'save_lang') {
    update_user_language();
}
$cfg = EasySCP_Registry::get('Config');
$tpl = EasySCP_TemplateEngine::getInstance();
$template = 'client/language.tpl';
if (isset($_POST['uaction']) && $_POST['uaction'] === 'save_lang') {
    set_page_message(tr('User language updated successfully!'), 'success');
}
gen_def_language($cfg->USER_SELECTED_LANG);
// static page messages
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Client/Change Language'), 'TR_LANGUAGE' => tr('Language'), 'TR_CHOOSE_DEFAULT_LANGUAGE' => tr('Choose default language'), 'TR_SAVE' => tr('Save')));
gen_client_mainmenu($tpl, 'client/main_menu_general_information.tpl');
gen_client_menu($tpl, 'client/menu_general_information.tpl');
gen_page_message($tpl);
if ($cfg->DUMP_GUI_DEBUG) {
    dump_gui_debug($tpl);
}
$tpl->display($template);
unset_messages();
Ejemplo n.º 5
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 = 'common/ticket_system.tpl';
// dynamic page data
$reseller_id = $_SESSION['user_created_by'];
if (!hasTicketSystem($reseller_id)) {
    user_goto('index.php');
}
if (isset($_GET['psi'])) {
    $start = $_GET['psi'];
} else {
    $start = 0;
}
generateTicketList($tpl, $_SESSION['user_id'], $start, $cfg->DOMAIN_ROWS_PER_PAGE, 'client', 'open');
// static page messages
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Client/Questions & Comments'), 'TR_SUPPORT_TICKETS' => tr('Support tickets'), 'TR_STATUS' => tr('Status'), 'TR_TICKET_FROM' => tr('From'), 'TR_NEW' => ' ', 'TR_ACTION' => tr('Action'), 'TR_URGENCY' => tr('Priority'), 'TR_SUBJECT' => tr('Subject'), 'TR_LAST_DATA' => tr('Last reply'), 'TR_DELETE_ALL' => tr('Delete all'), 'TR_DELETE' => tr('Delete'), 'TR_MESSAGE_DELETE' => tr('Are you sure you want to delete %s?', true, '%s'), 'TR_EDIT' => tr('Edit')));
gen_client_mainmenu($tpl, 'client/main_menu_ticket_system.tpl');
gen_client_menu($tpl, 'client/menu_ticket_system.tpl');
gen_page_message($tpl);
if ($cfg->DUMP_GUI_DEBUG) {
    dump_gui_debug($tpl);
}
$tpl->display($template);
unset_messages();
Ejemplo n.º 6
0
$cfg = EasySCP_Registry::get('Config');
$tpl = EasySCP_TemplateEngine::getInstance();
$template = 'client/sql_manage.tpl';
$count = -1;
// common page data.
// check User sql permission
if (isset($_SESSION['sql_support']) && $_SESSION['sql_support'] == "no") {
    user_goto('index.php');
}
// dynamic page data.
gen_db_list($tpl, $sql, $_SESSION['user_id']);
// static page messages.
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Client/Manage SQL'), 'TR_MANAGE_SQL' => tr('Manage SQL'), 'TR_DELETE' => tr('Delete'), 'TR_DATABASE' => tr('Database Name and Users'), 'TR_CHANGE_PASSWORD' => tr('Change password'), 'TR_ACTION' => tr('Action'), 'TR_PHP_MYADMIN' => tr('phpMyAdmin'), 'TR_DATABASE_USERS' => tr('Database users'), 'TR_ADD_USER' => tr('Add SQL user'), 'TR_EXECUTE_QUERY' => tr('Execute query'), 'TR_CHANGE_PASSWORD' => tr('Change password'), 'TR_LOGIN_PMA' => tr('Login phpMyAdmin'), 'TR_MESSAGE_DELETE' => tr('This database will be permanently deleted. This process cannot be recovered. All users linked to this database will also be deleted if not linked to another database. Are you sure you want to delete %s?', true, '%s')));
gen_client_mainmenu($tpl, 'client/main_menu_manage_sql.tpl');
gen_client_menu($tpl, 'client/menu_manage_sql.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
 * @param EasySCP_Database $sql
 * @param int $db_id
 */
function gen_db_user_list($tpl, $sql, $db_id)
{
Ejemplo n.º 7
0
 */
require '../../include/easyscp-lib.php';
check_login(__FILE__);
$cfg = EasySCP_Registry::get('Config');
$tpl = EasySCP_TemplateEngine::getInstance();
$template = 'client/domain_statistics.tpl';
// dynamic page data.
$current_month = date('m');
$current_year = date('Y');
list($current_month, $current_year) = gen_page_post_data($tpl, $current_month, $current_year);
gen_dmn_traff_list($tpl, $current_month, $current_year, $_SESSION['user_id']);
// static page messages.
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - Client/Domain Statistics'), 'TR_DOMAIN_STATISTICS' => tr('Domain statistics'), 'DOMAIN_URL' => 'http://' . $_SESSION['user_logged'] . '/stats/', 'TR_AWSTATS' => tr('Web Stats'), 'TR_MONTH' => tr('Month'), 'TR_YEAR' => tr('Year'), 'TR_SHOW' => tr('Show'), 'TR_DATE' => tr('Date'), 'TR_WEB_TRAFF_IN' => tr('Web in'), 'TR_WEB_TRAFF_OUT' => tr('Web out'), 'TR_FTP_TRAFF' => tr('FTP'), 'TR_SUM' => tr('Sum'), 'TR_ALL' => tr('Total')));
gen_client_mainmenu($tpl, 'client/main_menu_statistics.tpl');
gen_client_menu($tpl, 'client/menu_statistics.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
 * @param int $month
 * @param int $year
 */
function gen_page_date($tpl, $month, $year)
{