Ejemplo n.º 1
0
function system_message($msg)
{
    global $cfg;
    $theme_color = $cfg['USER_INITIAL_THEME_COLOR'];
    $tpl = new pTemplate();
    /*
        if (preg_match("/(admin|client|reseller)/", $_SERVER['PHP_SELF'], $matches)) {
    
            $tpl_path = "../".$cfg['ROOT_TEMPLATE_PATH'];
    
        } else {
    
            $tpl_path = $cfg['ROOT_TEMPLATE_PATH'];
    
        }
    */
    $tpl_path = "../" . $cfg['ROOT_TEMPLATE_PATH'] . $cfg['USER_INITIAL_THEME'];
    $tpl->define_dynamic('page', $tpl_path . '/system-message.tpl');
    $tpl->assign(array('TR_SYSTEM_MESSAGE_PAGE_TITLE' => 'VHCS Error', 'THEME_COLOR_PATH' => "themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TR_ERROR_MESSAGE' => 'Error Message', 'TR_VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'TR_TIME' => date("g:i a"), 'TR_DATE' => date("l dS of F Y"), 'MESSAGE' => $msg));
    $tpl->parse('PAGE', 'page');
    $tpl->prnt();
    exit(0);
}
                    message = ?
                where
                    owner_id = ?
                  and
                    name = 'lostpw-msg-2'
SQL_QUERY;
            $rs = exec_query($sql, $query, array($auto_subject2, $auto_message2, $user_id));
            set_page_message(tr('Auto email template data updated!'));
            //  Header("Location: users.php");
            //  die();
        }
    }
}
/*
 *
 * static page messages.
 *
 */
$tpl->assign(array('TR_LOSTPW_EMAL_SETUP' => tr('VHCS - Admin/Lostpw email setup'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
gen_admin_menu($tpl);
gen_logged_from($tpl);
update_email_data($tpl, $sql);
gen_email_data($tpl, $sql);
$tpl->assign(array('TR_LOSTPW_EMAIL' => tr('Lostpw email'), 'TR_MESSAGE_TEMPLATE_INFO' => tr('Message template info'), 'TR_MESSAGE_TEMPLATE' => tr('Message template'), 'TR_LOSTPW_MESSAGE_1' => tr('Lostpw message 1'), 'TR_LOSTPW_MESSAGE_2' => tr('Lostpw message 2'), 'TR_USER_LOGIN_NAME' => tr('User login (system) name'), 'TR_USER_PASSWORD' => tr('User password'), 'TR_USER_REAL_NAME' => tr('User (first and last) name'), 'TR_LOSTPW_LINK' => tr('Lostpw link'), 'TR_SUBJECT' => tr('Subject'), 'TR_MESSAGE' => tr('Message'), 'TR_SENDER_EMAIL' => tr('Senders email'), 'TR_SENDER_NAME' => tr('Senders name'), 'TR_APPLY_CHANGES' => tr('Apply changes')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
unset_messages();
Ejemplo n.º 3
0
            $alias_name = utf8_decode($alias_name);
            $tpl->assign(array('ALS_NAME' => $alias_name, 'ALS_MOUNT' => $rs->fields['alias_mount'], 'ALS_STATUS' => translate_dmn_status($rs->fields['alias_status']), 'ALS_FORWARD' => $als_forward, 'ALS_FWD_SCRIPT' => $als_forward_script, 'ALS_ACTION' => $als_action, 'ALS_ACTION_SCRIPT' => $als_action_script));
            $tpl->parse('ALS_ITEM', '.als_item');
            $rs->MoveNext();
            $counter++;
        }
        $tpl->parse('ALS_LIST', 'als_list');
        $tpl->assign('ALS_MESSAGE', '');
    }
}
//
// common page data.
//
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_CLIENT_MANAGE_DOMAINS_PAGE_TITLE' => tr('VHCS - Client/Manage Domains'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TID' => $_SESSION['layout_id'], 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
//
// dynamic page data.
//
gen_user_sub_list($tpl, $sql, $_SESSION['user_id']);
gen_user_als_list($tpl, $sql, $_SESSION['user_id']);
//
// static page messages.
//
gen_client_menu($tpl);
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_MANAGE_DOMAINS' => tr('Manage domains'), 'TR_DOMAIN_ALIASES' => tr('Domain aliases'), 'TR_ALS_NAME' => tr('Name'), 'TR_ALS_MOUNT' => tr('Mount point'), 'TR_ALS_FORWARD' => tr('Forward'), 'TR_ALS_STATUS' => tr('Status'), 'TR_ALS_ACTION' => tr('Action'), 'TR_SUBDOMAINS' => tr('Subdomains'), 'TR_SUB_NAME' => tr('Name'), 'TR_SUB_MOUNT' => tr('Mount point'), 'TR_SUB_STATUS' => tr('Status'), 'TR_SUB_ACTION' => tr('Action'), 'TR_MESSAGE_DELETE' => tr('Are you sure you want to delete')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
//  | You should have received a copy of the MPL Mozilla Public License             |
//  | along with this program; if not, write to the Open Source Initiative (OSI)    |
//  | http://opensource.org | osi@opensource.org								    |
//  |                                                                               |
//   -------------------------------------------------------------------------------
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['CLIENT_TEMPLATE_PATH'] . '/cronjobs_overview.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->define_dynamic('custom_buttons', 'page');
$tpl->define_dynamic('cronjobs', 'page');
$tpl->assign(array('TR_CLIENT_CRONJOBS_TITLE' => tr('VHCS - Client/Cronjob Manager'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TID' => $_SESSION['layout_id'], 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
/*
Functions start
*/
function gen_cron_jobs(&$tpl, &$sql, $user_id)
{
}
// End of gen_cron_job();
/*
Functions end
*/
/*
 *
 * static page messages.
 *
 */
Ejemplo n.º 5
0
//  |                                                                               |
//  | You should have received a copy of the MPL Mozilla Public License             |
//  | along with this program; if not, write to the Open Source Initiative (OSI)    |
//  | http://opensource.org | osi@opensource.org								    |
//  |                                                                               |
//   -------------------------------------------------------------------------------
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/chpsswd.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_CLIENT_CHANGE_PASSWORD_PAGE_TITLE' => tr('VHCS - Reseller/Change Password'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
if (isset($_POST['uaction']) && $_POST['uaction'] === 'updt_pass') {
    if ($_POST['pass'] === '' || $_POST['pass_rep'] === '') {
        set_page_message(tr('Please fill up both data fields!'));
    } else {
        if ($_POST['pass'] !== $_POST['pass_rep']) {
            set_page_message(tr('Passwords does not match!'));
        } else {
            if (chk_password($_POST['pass']) > 0) {
                set_page_message(tr('Incorrect password range or syntax!'));
            } else {
                // Correct input password
                $upass = crypt_user_pass($_POST['pass']);
                $user_id = $_SESSION['user_id'];
                // Begin update admin-db
                $query = <<<SQL_QUERY
Ejemplo n.º 6
0
    }
}
// end site functions
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/custom_menus.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('hosting_plans', 'page');
$tpl->define_dynamic('button_list', 'page');
$tpl->define_dynamic('button_list', 'page');
$tpl->define_dynamic('add_button', 'page');
$tpl->define_dynamic('edit_button', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_ADMIN_CUSTOM_MENUS_PAGE_TITLE' => tr('VHCS - Admin - Manage custom menus'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
gen_admin_menu($tpl);
add_new_button($tpl, $sql);
if (isset($_GET['delete_id'])) {
    delete_button($tpl, $sql);
}
if (isset($_GET['edit_id'])) {
    edit_button($tpl, $sql);
}
update_button($tpl, $sql);
gen_button_list($tpl, $sql);
$tpl->assign(array('TR_TITLE_CUSTOM_MENUS' => tr('Manage custom menus'), 'TR_ADD_NEW_BUTTON' => tr('Add new button'), 'TR_BUTTON_NAME' => tr('Button name'), 'TR_BUTTON_LINK' => tr('Button link'), 'TR_BUTTON_TARGET' => tr('Button target'), 'TR_VIEW_FROM' => tr('Show in'), 'RESELLER' => tr('Reseller level'), 'USER' => tr('Enduser level'), 'RESSELER_AND_USER' => tr('Reseller and enduser level'), 'TR_ADD' => tr('Add'), 'TR_MENU_NAME' => tr('Menu button'), 'TR_ACTON' => tr('Action'), 'TR_EDIT' => tr('Edit'), 'TR_DELETE' => tr('Delete'), 'TR_LEVEL' => tr('Level'), 'TR_SAVE' => tr('Save'), 'TR_EDIT_BUTTON' => tr('Edit button')));
gen_page_message($tpl);
if (isset($_GET['edit_id'])) {
    $tpl->assign('ADD_BUTTON', '');
} else {
Ejemplo n.º 7
0
//  |                                                                               |
//   -------------------------------------------------------------------------------
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['CLIENT_TEMPLATE_PATH'] . '/puser_assign.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
$tpl->define_dynamic('already_in', 'page');
$tpl->define_dynamic('grp_avlb', 'page');
$tpl->define_dynamic('add_button', 'page');
$tpl->define_dynamic('remove_button', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TID' => $_SESSION['layout_id'], 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
// ** Functions
function get_htuser_name(&$sql, &$user_id, &$dmn_id)
{
    $query = <<<SQL_QUERY
        select
            uname
        from
            htaccess_users
        where
             dmn_id = ?
        and 
\t\t\tid = ? 
SQL_QUERY;
    $rs = exec_query($sql, $query, array($dmn_id, $user_id));
    if ($rs->RecordCount() == 0) {
Ejemplo n.º 8
0
//  | of the License, or (at your option) any later version.                        |
//  |                                                                               |
//  | You should have received a copy of the MPL Mozilla Public License             |
//  | along with this program; if not, write to the Open Source Initiative (OSI)    |
//  | http://opensource.org | osi@opensource.org								    |
//  |                                                                               |
//   -------------------------------------------------------------------------------
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/edit_user.tpl');
$tpl->define_dynamic('ip_entry', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_EDIT_USER_PAGE_TITLE' => tr('VHCS - Users/Edit'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
/*
 *
 * static page messages.
 *
 */
$tpl->assign(array('TR_EDIT_USER' => tr('Edit user'), 'TR_CORE_DATA' => tr('Core data'), 'TR_USERNAME' => tr('Username'), 'TR_PASSWORD' => tr('Password'), 'TR_REP_PASSWORD' => tr('Password(repeat)'), 'TR_DMN_IP' => tr('Domain IP'), 'TR_USREMAIL' => tr('Email'), 'TR_ADDITIONAL_DATA' => tr('Additional data'), 'TR_CUSTOMER_ID' => tr('Customer ID'), 'TR_FIRSTNAME' => tr('First name'), 'TR_LASTNAME' => tr('Last name'), 'TR_COMPANY' => tr('Company'), 'TR_POST_CODE' => tr('Zip/Postal code'), 'TR_CITY' => tr('City'), 'TR_COUNTRY' => tr('Country'), 'TR_STREET1' => tr('Street 1'), 'TR_STREET2' => tr('Street 2'), 'TR_MAIL' => tr('Email'), 'TR_PHONE' => tr('Phone'), 'TR_FAX' => tr('Fax'), 'TR_BTN_ADD_USER' => tr('Submit changes')));
gen_reseller_menu($tpl);
gen_logged_from($tpl);
$tpl->assign(array('TR_MANAGE_USERS' => tr('Manage users'), 'TR_USERS' => tr('Users'), 'TR_NO' => tr('No.'), 'TR_USERNAME' => tr('Username'), 'TR_ACTION' => tr('Action'), 'TR_BACK' => tr('Back'), 'TR_TITLE_BACK' => tr('Return to previous menu'), 'TR_TABLE_NAME' => tr('Users list')));
gen_page_message($tpl);
if (isset($_POST['uaction']) && 'save_changes' === $_POST['uaction']) {
    // Process data
    global $dmn_user_name;
    if (isset($_SESSION['edit_ID'])) {
        $hpid = $_SESSION['edit_ID'];
Ejemplo n.º 9
0
//  | as published by the Free Software Foundation; either version 1.1              |
//  | of the License, or (at your option) any later version.                        |
//  |                                                                               |
//  | You should have received a copy of the MPL Mozilla Public License             |
//  | along with this program; if not, write to the Open Source Initiative (OSI)    |
//  | http://opensource.org | osi@opensource.org                    |
//  |                                                                               |
//   -------------------------------------------------------------------------------
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/ahp.tpl');
$tpl->define_dynamic('page_message', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_RESELLER_MAIN_INDEX_PAGE_TITLE' => tr('VHCS - Administrator/Add hosting plan'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
/*
 *
 * static page messages.
 *
 */
gen_admin_menu($tpl);
$tpl->assign(array('TR_ADD_HOSTING_PLAN' => tr('Add hosting plan'), 'TR_HOSTING PLAN PROPS' => tr('Hosting plan properties'), 'TR_TEMPLATE_NAME' => tr('Template name'), 'TR_MAX_SUBDOMAINS' => tr('Max subdomains<br><i>(-1 disabled, 0 unlimited)'), 'TR_MAX_ALIASES' => tr('Max aliases<br><i>(-1 disabled, 0 unlimited)'), 'TR_MAX_MAILACCOUNTS' => tr('Mail account limit<br><i>(0 unlimited)</i>'), 'TR_MAX_FTP' => tr('FTP account limit<br><i>(0 unlimited)</i>'), 'TR_MAX_SQL' => tr('SQL databases limit<br><i>(-1 disabled, 0 unlimited)</i>'), 'TR_MAX_SQL_USERS' => tr('SQL users limit<br><i>(-1 disabled, 0 unlimited)</i>'), 'TR_MAX_TRAFFIC' => tr('Traffic limit [Mb]<br><i>(0 unlimited)</i>'), 'TR_DISK_LIMIT' => tr('Disk limit [Mb]<br><i>(0 unlimited)</i>'), 'TR_PHP' => tr('PHP'), 'TR_CGI' => tr('CGI / Perl'), 'TR_BACKUP_RESTORE' => tr('Backup and restore'), '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_EXAMPEL' => tr('(Ex. EUR)'), 'TR_ADD_PLAN' => tr('Add plan')));
if (isset($_POST['uaction']) && 'add_plan' === $_POST['uaction']) {
    // Process data
    if (check_data_correction($tpl)) {
        save_data_to_db($tpl, $_SESSION['user_id']);
    }
    gen_data_ahp_page($tpl);
} else {
    gen_empty_ahp_page($tpl);
//  | of the License, or (at your option) any later version.                        |
//  |                                                                               |
//  | You should have received a copy of the MPL Mozilla Public License             |
//  | along with this program; if not, write to the Open Source Initiative (OSI)    |
//  | http://opensource.org | osi@opensource.org								    |
//  |                                                                               |
//   -------------------------------------------------------------------------------
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/server_traffic_settings.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('hosting_plans', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_ADMIN_CHANGE_SERVER_TRAFFIC_SETTINGS_TITLE' => tr('VHCS - Admin/Server Traffic Settings'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
function update_server_settings(&$sql)
{
    if (!isset($_POST['uaction']) && !isset($_POST['uaction'])) {
        return;
    } else {
        global $data;
        preg_match("/^(-1|0|[1-9][0-9]*)\$/", $data, $match);
        $max_traffic = $_POST['max_traffic'];
        $traffic_warning = $_POST['traffic_warning'];
        if (!is_numeric($max_traffic) || !is_numeric($traffic_warning)) {
            set_page_message(tr('Wrong data input!'));
        }
        if ($traffic_warning > $max_traffic) {
            set_page_message(tr('Warning traffic is bigger then max traffic!'));
            return;
Ejemplo n.º 11
0
            domain_status = 'restore'
        where
            domain_admin_id = ?
SQL_QUERY;
        $rs = exec_query($sql, $query, array($user_id));
        send_request();
        write_log($_SESSION['user_logged'] . " : restor backup files");
        set_page_message(tr('Backup archive scheduled for restoring!'));
    }
}
//
// common page data.
//
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_CLIENT_BACKUP_PAGE_TITLE' => tr('VHCS - Client/Daily Backup'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TID' => $_SESSION['layout_id'], 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
//
// dynamic page data.
//
send_backup_restore_request($sql, $_SESSION['user_id']);
//
// static page messages.
//
gen_client_menu($tpl);
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_BACKUP' => tr('Backup'), 'TR_DAILY_BACKUP' => tr('Daily backup'), 'TR_DOWNLOAD_DIRECTION' => tr('Direction download today backup'), 'TR_FTP_LOG_ON' => tr('Login with your FTP account'), 'TR_SWITCH_TO_BACKUP' => tr('Switch to backup directory'), 'TR_DOWNLOAD_FILE' => tr('Download the only one file in this directory'), 'TR_USUALY_NAMED' => tr('(usually named backup_YYY_MM_DD.tar)'), 'TR_RESTORE_BACKUP' => tr('Restore backup'), 'TR_RESTORE_DIRECTIONS' => tr('Click Restore button and the system will<br>restore last daily backup'), 'TR_RESTORE' => tr('Restore')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
                $dest_admin = $_POST['dest_admin'];
                $query = <<<SQL_QUERY
                    update
                        admin
                    set
                        created_by = ?
                    where
                        admin_id  = ?
SQL_QUERY;
                $up = exec_query($sql, $query, array($dest_admin, $admin_id));
            }
            $rs->MoveNext();
        }
    }
}
/*
 *
 * static page messages.
 *
 */
$tpl->assign(array('TR_ADMIN_MANAGE_RESELLER_OWNERS_PAGE_TITLE' => tr('VHCS - Admin/Manage users/Reseller assignment'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
gen_admin_menu($tpl);
update_reseller_owner($sql);
gen_reseller_table($tpl, $sql);
$tpl->assign(array('TR_RESELLER_ASSIGNMENT' => tr('Reseller assignment'), 'TR_RESELLER_USERS' => tr('Reseller users'), 'TR_NUMBER' => tr('No.'), 'TR_MARK' => tr('Mark'), 'TR_RESELLER_NAME' => tr('Reseller name'), 'TR_OWNER' => tr('Owner'), 'TR_TO_ADMIN' => tr('To Admin'), 'TR_MOVE' => tr('Move')));
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
unset_messages();
Ejemplo n.º 13
0
            admin_id = ?
SQL_QUERY;
    $rs = exec_query($sql, $query, array($ticket_from));
    $from_user_name = $rs->fields['admin_name'];
    $admin_type = $rs->fields['admin_type'];
    $from_first_name = $rs->fields['fname'];
    $from_last_name = $rs->fields['lname'];
    $from_name = $from_first_name . " " . $from_last_name . " (" . $from_user_name . ")";
    $tpl->assign(array('FROM' => $from_name));
}
//
// common page data.
//
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_CLIENT_VIEW_TICKET_PAGE_TITLE' => tr('VHCS - Reseller : Support System: View Tickets'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
function send_user_message(&$sql, $user_id, $reseller_id, $ticket_id)
{
    if (!isset($_POST['uaction'])) {
        return;
    } elseif ($_POST['uaction'] == "close") {
        close_ticket($sql, $ticket_id);
        return;
    } elseif ($_POST['uaction'] == "open") {
        open_ticket($sql, $ticket_id);
        return;
    } elseif ($_POST['user_message'] === '') {
        set_page_message(tr('Please type your message!'));
        return;
    }
    $ticket_date = time();
$year = 0;
$month = 0;
if (isset($_POST['month']) && isset($_POST['year'])) {
    $year = $_POST['year'];
    $month = $_POST['month'];
} else {
    if (isset($_GET['month']) && isset($_GET['year'])) {
        $month = $_GET['month'];
        $year = $_GET['year'];
    }
}
if (!is_numeric($rid) || !is_numeric($month) || !is_numeric($year)) {
    header("Location: reseller_statistics.php");
    die;
}
$tpl->assign(array('TR_ADMIN_USER_STATISTICS_PAGE_TITLE' => tr('VHCS - Admin/Reseller User Statistics'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
function generate_page(&$tpl, $reseller_id, $reseller_name)
{
    global $sql, $cfg, $rid;
    $start_index = 0;
    $rows_per_page = $cfg['DOMAIN_ROWS_PER_PAGE'];
    if (isset($_GET['psi'])) {
        $start_index = $_GET['psi'];
    } else {
        if (isset($_POST['psi'])) {
            $start_index = $_POST['psi'];
        }
    }
    $tpl->assign(array('POST_PREV_PSI' => $start_index));
    // count query
    $count_query = <<<SQL_QUERY
Ejemplo n.º 15
0
            user_gui_props
        set
            lang = ?
        where
            user_id = ?
SQL_QUERY;
    $rs = exec_query($sql, $query, array($user_lang, $user_id));
    unset($_SESSION['user_def_lang']);
    $_SESSION['user_def_lang'] = $user_lang;
}
//
// common page data.
//
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_RESELLER_MAIN_INDEX_PAGE_TITLE' => tr('VHCS - Reseller/Main Index'), 'TR_SAVE' => tr('Save'), 'TR_OF' => tr('of'), 'TR_MESSAGES' => tr('Messages'), 'TR_LANGUAGE' => tr('Language'), 'TR_CHOOSE_DEFAULT_LANGUAGE' => tr('Choose default language'), 'TR_CHOOSE_DEFAULT_LAYOUT' => tr('Choose default layout'), 'TR_LAYOUT' => tr('Layout'), 'TR_TRAFFIC_USAGE' => tr('Traffic usage'), 'TR_DISK_USAGE' => tr('Disk usage'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
//
// dynamic page data.
//
generate_page_data($tpl, $_SESSION['user_id'], $_SESSION['user_logged']);
// ko ima jump from other user interface neka esik i optica da ostanat tezi na
// ska4ashtijat user
if (!isset($_SESSION['logged_from']) && !isset($_SESSION['logged_from_id'])) {
    list($user_def_lang, $user_def_layout) = get_user_gui_props($sql, $_SESSION['user_id']);
} else {
    $user_def_layout = $_SESSION['user_theme_color'];
    $user_def_lang = $_SESSION['user_def_lang'];
}
gen_messages_table($tpl, $_SESSION['user_id']);
gen_logged_from($tpl);
gen_def_language($tpl, $sql, $user_def_lang);
Ejemplo n.º 16
0
    $headers .= "X-Mailer: VHCS Pro v2.0 marketing mailer";
    $mail_result = mail($to, $subject, $message, $headers);
    $mail_status = $mail_result ? 'OK' : 'NOT OK';
    $user_logged = $_SESSION['user_logged'];
    $log_message = "{$user_logged}: Circular Mail To: |{$to}|, From: |{$from}|, Status: |{$mail_status}| !";
}
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/circular.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_RESELLER_CIRCULAR_PAGE_TITLE' => tr('VHCS - Circular'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
/*
 *
 * static page messages.
 *
 */
gen_reseller_menu($tpl);
gen_logged_from($tpl);
$tpl->assign(array('TR_CIRCULAR' => tr('Circular'), 'TR_CORE_DATA' => tr('Core data'), 'TR_SEND_TO' => tr('Send message to'), 'TR_ALL_USERS' => tr('All users'), 'TR_ALL_RESELLERS' => tr('All resellers'), 'TR_ALL_USERS_AND_RESELLERS' => tr('All users & resellers'), 'TR_MESSAGE_SUBJECT' => tr('Message subject'), 'TR_MESSAGE_TEXT' => tr('Message'), 'TR_ADDITIONAL_DATA' => tr('Additional data'), 'TR_SENDER_EMAIL' => tr('Senders email'), 'TR_SENDER_NAME' => tr('Senders name'), 'TR_SEND_MESSAGE' => tr('Send message'), 'TR_SENDER_NAME' => tr('Senders name')));
send_circular(&$tpl, &$sql);
gen_page_data($tpl, $sql);
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
Ejemplo n.º 17
0
            $i++;
        }
    }
}
//
// common page data.
//
global $cfg;
$support_system = $cfg['VHCS_SUPPORT_SYSTEM'];
if ($support_system !== 'yes') {
    header("Location: index.php");
    die;
}
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_CLIENT_QUESTION_PAGE_TITLE' => tr('VHCS - Client/Questions & Comments'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
//
// dynamic page data.
//
//if (isset($_POST['uaction']) && $_POST['uaction'] === 'del_ticket') {
//	set_page_message(tr('Ticket(s) are deleted!'));
//}
//if (isset($_POST['uaction']) && $_POST['uaction'] === 'close_ticket') {
//	set_page_message(tr('Ticket(s) are closed!'));
//}
gen_tickets_list($tpl, $sql, $_SESSION['user_id']);
//
// static page messages.
//
gen_reseller_menu($tpl);
gen_logged_from($tpl);
Ejemplo n.º 18
0
//  | of the License, or (at your option) any later version.                        |
//  |                                                                               |
//  | You should have received a copy of the MPL Mozilla Public License             |
//  | along with this program; if not, write to the Open Source Initiative (OSI)    |
//  | http://opensource.org | osi@opensource.org								    |
//  |                                                                               |
//   -------------------------------------------------------------------------------
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/domain_details.tpl');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_DETAILS_DOMAIN_PAGE_TITLE' => tr('VHCS - Domain/Details'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
/*
 *
 * static page messages.
 *
 */
$tpl->assign(array('TR_DOMAIN_DETAILS' => tr('Domain details'), 'TR_DOMAIN_NAME' => tr('Domain name'), 'TR_DOMAIN_IP' => tr('Domain IP'), 'TR_STATUS' => tr('Status'), 'TR_PHP_SUPP' => tr('PHP support'), 'TR_CGI_SUPP' => tr('CGI support'), 'TR_MYSQL_SUPP' => tr('MySQL support'), 'TR_TRAFFIC' => tr('Traffic in MB'), 'TR_DISK' => tr('Disk in MB'), 'TR_FEATURE' => tr('Feature'), 'TR_USED' => tr('Used'), 'TR_LIMIT' => tr('Limit'), 'TR_MAIL_ACCOUNTS' => tr('Mail accounts'), 'TR_FTP_ACCOUNTS' => tr('FTP accounts'), 'TR_SQL_DB_ACCOUNTS' => tr('SQL databases'), 'TR_SQL_USER_ACCOUNTS' => tr('SQL users'), 'TR_SUBDOM_ACCOUNTS' => tr('Subdomains'), 'TR_DOMALIAS_ACCOUNTS' => tr('Domain aliases'), 'TR_UPDATE_DATA' => tr('Submit changes'), 'TR_BACK' => tr('Back')));
gen_admin_menu($tpl);
gen_page_message($tpl);
// Get user id that come for manage domain
if (!isset($_GET['domain_id'])) {
    header('Location: manage_users.php');
    die;
}
$editid = $_GET['domain_id'];
gen_detaildom_page($tpl, $_SESSION['user_id'], $editid);
Ejemplo n.º 19
0
}
if (isset($_POST['uname'])) {
    if ($_POST['uname'] != "" and isset($_SESSION['image']) and isset($_POST['capcode'])) {
        $tpl = new pTemplate();
        $tpl->define('page', $cfg['LOGIN_TEMPLATE_PATH'] . '/lostpw_message.tpl');
        $tpl->assign(array('TR_MAIN_INDEX_PAGE_TITLE' => tr('VHCS - Virtual Hosting Control System'), 'THEME_COLOR_PATH' => "themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TC_BLUE_SELECTED' => $theme_color === 'blue' ? 'selected' : '', 'TC_GREEN_SELECTED' => $theme_color === 'green' ? 'selected' : '', 'TC_YELLOW_SELECTED' => $theme_color === 'yellow' ? 'selected' : '', 'TC_RED_SELECTED' => $theme_color === 'red' ? 'selected' : '', 'TR_THEME_COLOR' => tr('Theme color'), 'TR_BLUE' => tr('Blue'), 'TR_GREEN' => tr('Green'), 'TR_YELLOW' => tr('Yellow'), 'TR_RED' => tr('Red'), 'TR_TIME' => date("g:i a"), 'TR_DATE' => date("l dS of F Y"), 'TR_VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
        if ($_SESSION['image'] == $_POST['capcode']) {
            if (lostpw($_POST['uname'])) {
                $tpl->assign(array('TR_MESSAGE' => tr('The password was requested'), 'TR_LINK' => "<A CLASS=\"submenu\" href=\"index.php\">" . tr('Login') . "</A>"));
            } else {
                $tpl->assign(array('TR_MESSAGE' => tr('ERROR: Unknown user'), 'TR_LINK' => "<A CLASS=\"submenu\" href=\"index.php\">" . tr('Retry') . "</A>"));
            }
        } else {
            $tpl->assign(array('TR_MESSAGE' => tr('ERROR: Security code was not correct!'), 'TR_LINK' => "<A CLASS=\"submenu\" href=\"index.php\">" . tr('Retry') . "</A>"));
        }
        $tpl->parse('PAGE', 'page');
        $tpl->prnt();
        if (isset($cfg['DUMP_GUI_DEBUG'])) {
            dump_gui_debug();
        }
        exit(0);
    }
}
$tpl = new pTemplate();
$tpl->define('page', $cfg['LOGIN_TEMPLATE_PATH'] . '/lostpw.tpl');
$tpl->assign(array('TR_MAIN_INDEX_PAGE_TITLE' => tr('VHCS - Virtual Hosting Control System'), 'THEME_COLOR_PATH' => "themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TC_BLUE_SELECTED' => $theme_color === 'blue' ? 'selected' : '', 'TC_GREEN_SELECTED' => $theme_color === 'green' ? 'selected' : '', 'TC_YELLOW_SELECTED' => $theme_color === 'yellow' ? 'selected' : '', 'TC_RED_SELECTED' => $theme_color === 'red' ? 'selected' : '', 'TR_CAPCODE' => tr('Security code'), 'TR_IMGCAPCODE_DESCRIPTION' => tr('Imagecode description'), 'TR_IMGCAPCODE' => "<IMG SRC=\"include/imagecode.php\" BORDER=\"0\" NOSAVE ALT=\"\">", 'TR_USERNAME' => tr('Username'), 'TR_THEME_COLOR' => tr('Theme color'), 'TR_BLUE' => tr('Blue'), 'TR_GREEN' => tr('Green'), 'TR_YELLOW' => tr('Yellow'), 'TR_RED' => tr('Red'), 'TR_SEND' => tr('Request password'), 'TR_BACK' => tr('Back'), 'TR_TIME' => date("g:i a"), 'TR_DATE' => date("l dS of F Y"), 'TR_VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
Ejemplo n.º 20
0
//  | http://opensource.org | osi@opensource.org								    |
//  |                                                                               |
//   -------------------------------------------------------------------------------
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/domain_statistics.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('hosting_plans', 'page');
$tpl->define_dynamic('month_list', 'page');
$tpl->define_dynamic('year_list', 'page');
$tpl->define_dynamic('traffic_table', 'page');
$tpl->define_dynamic('traffic_table_item', 'traffic_table');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_ADMIN_DOMAIN_STATISTICS_PAGE_TITLE' => tr('VHCS - Domain Statistics Data'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
if (isset($_POST['domain_id'])) {
    $domain_id = $_POST['domain_id'];
} else {
    if (isset($_GET['domain_id'])) {
        $domain_id = $_GET['domain_id'];
    }
}
$year = 0;
$month = 0;
if (isset($_POST['month']) && isset($_POST['year'])) {
    $year = $_POST['year'];
    $month = $_POST['month'];
} else {
    if (isset($_GET['month']) && isset($_GET['year'])) {
        $month = $_GET['month'];
Ejemplo n.º 21
0
//   -------------------------------------------------------------------------------
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/domain_alias.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('table_list', 'page');
$tpl->define_dynamic('table_item', 'table_list');
$tpl->define_dynamic('custom_buttons', 'page');
$tpl->define_dynamic('scroll_prev', 'page');
$tpl->define_dynamic('scroll_next_gray', 'page');
$tpl->define_dynamic('scroll_next', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_ALIAS_PAGE_TITLE' => tr('VHCS - Manage Domain/Alias'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
/*
 *
 * static page messages.
 *
 */
gen_reseller_menu($tpl);
gen_logged_from($tpl);
$err_txt = "_off_";
generate_als_list($tpl, $_SESSION['user_id'], $err_txt);
generate_als_messages($tpl, $err_txt);
$tpl->assign(array('TR_MANAGE_ALIAS' => tr('Manage alias'), 'TR_NAME' => tr('Name'), 'TR_REAL_DOMAIN' => tr('Real domain'), 'TR_FORWARD' => tr('Forward'), 'TR_STATUS' => tr('Status'), 'TR_ACTION' => tr('Action'), 'TR_ADD_ALIAS' => tr('Add alias'), 'TR_MESSAGE_DELETE' => tr('Are you sure you want to delete')));
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
Ejemplo n.º 22
0
                    message = ?
                where
                    owner_id = ?
                  and
                    name = 'after-order-msg'
SQL_QUERY;
            $rs = exec_query($sql, $query, array($auto_subject, $auto_message, $user_id));
            set_page_message(tr('Auto email template data updated!'));
            //  Header("Location: users.php");
            //  die();
        }
    }
}
/*
 *
 * static page messages.
 *
 */
$tpl->assign(array('TR_RESELLER_ORDER_EMAL' => tr('VHCS - Reseller/Order email setup'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
gen_reseller_menu($tpl);
gen_logged_from($tpl);
update_email_data($tpl, $sql);
gen_email_data($tpl, $sql);
$tpl->assign(array('TR_EMAIL_SETUP' => tr('Email setup'), 'TR_MANAGE_ORDERS' => tr('Manage orders'), 'TR_MESSAGE_TEMPLATE_INFO' => tr('Message template info'), 'TR_USER_LOGIN_NAME' => tr('User login (system) name'), 'TR_USER_DOMAIN' => tr('Domain name'), 'TR_USER_REAL_NAME' => tr('User (first and last) name'), 'TR_MESSAGE_TEMPLATE' => tr('Message template'), 'TR_SUBJECT' => tr('Subject'), 'TR_MESSAGE' => tr('Message'), 'TR_SENDER_EMAIL' => tr('Senders email'), 'TR_SENDER_NAME' => tr('Senders name'), 'TR_APPLY_CHANGES' => tr('Apply changes')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
unset_messages();
Ejemplo n.º 23
0
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/orders.tpl');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
$tpl->define_dynamic('page_message', 'page');
// Table with orders
$tpl->define_dynamic('orders_table', 'page');
$tpl->define_dynamic('order', 'orders_table');
// scrolling
$tpl->define_dynamic('scroll_prev_gray', 'page');
$tpl->define_dynamic('scroll_prev', 'page');
$tpl->define_dynamic('scroll_next_gray', 'page');
$tpl->define_dynamic('scroll_next', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_RESELLER_MAIN_INDEX_PAGE_TITLE' => tr('VHCS - Reseller/Order management'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
// Functions
//*
//*
function gen_order_page(&$tpl, &$sql, $user_id)
{
    $start_index = 0;
    $current_psi = 0;
    if (isset($_GET['psi']) && is_numeric($_GET['psi'])) {
        $start_index = $_GET['psi'];
        $current_psi = $_GET['psi'];
    }
    global $cfg;
    $rows_per_page = $cfg['DOMAIN_ROWS_PER_PAGE'];
    // count query
    $count_query = <<<SQL_QUERY
Ejemplo n.º 24
0
             ticket_date,
             ticket_subject,
             ticket_message)
        values
            (?, ?, ?, ?, ?, ?, ?, ?, ?)
SQL_QUERY;
    $rs = exec_query($sql, $query, array($ticket_level, $user_id, $user_created_by, $ticket_status, $ticket_reply, $urgency, $ticket_date, htmlspecialchars($subj, ENT_QUOTES, "UTF-8"), htmlspecialchars($user_message, ENT_QUOTES, "UTF-8")));
    send_tickets_msg($user_created_by, $user_id, $subj);
    header("Location: support_system.php");
}
//
// common page data.
//
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_CLIENT_NEW_TICKET_PAGE_TITLE' => tr('VHCS - Support system - New ticket'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
//
// dynamic page data.
//
global $cfg;
$support_system = $cfg['VHCS_SUPPORT_SYSTEM'];
if ($support_system !== 'yes') {
    header("Location: index.php");
    die;
}
send_user_message($sql, $_SESSION['user_id'], $_SESSION['user_created_by']);
//
// static page messages.
//
gen_reseller_menu($tpl);
gen_logged_from($tpl);
Ejemplo n.º 25
0
//   -------------------------------------------------------------------------------
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/admin_log.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('hosting_plans', 'page');
$tpl->define_dynamic('log_row', 'page');
$tpl->define_dynamic('scroll_prev_gray', 'page');
$tpl->define_dynamic('scroll_prev', 'page');
$tpl->define_dynamic('scroll_next_gray', 'page');
$tpl->define_dynamic('scroll_next', 'page');
$tpl->define_dynamic('clear_log', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_ADMIN_ADMIN_LOG_PAGE_TITLE' => tr('VHCS - Admin/Admin Log'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
function generate_page(&$tpl)
{
    global $sql, $cfg;
    $start_index = 0;
    $rows_per_page = 15;
    if (isset($_GET['psi']) && is_numeric($_GET['psi'])) {
        $start_index = $_GET['psi'];
    }
    $count_query = <<<SQL_QUERY
                select
                    count(log_id) as cnt
                from
                    log
SQL_QUERY;
    $query = <<<SQL_QUERY
Ejemplo n.º 26
0
              status = ?
          where
              mail_id = ?
SQL_QUERY;
    $rs = exec_query($sql, $query, array($forward_list, $status, $mail_id));
    send_request();
    write_log($_SESSION['user_logged'] . ": change mail forward -> {$mail_account}");
    header("Location: email_accounts.php");
    die;
}
//
// end page functions.
//
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_CLIENT_EDIT_EMAIL_PAGE_TITLE' => tr('VHCS - Manage Mail and FTP / Edit mail account'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TID' => $_SESSION['layout_id'], 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
//
// dynamic page data.
//
edit_mail_account($tpl, $sql);
update_email_pass($sql);
update_email_forward($tpl, $sql);
//
// static page messages.
//
gen_client_menu($tpl);
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_EDIT_EMAIL_ACCOUNT' => tr('Edit email account'), 'TR_SAVE' => tr('Save'), 'TR_PASSWORD' => tr('Password'), 'TR_PASSWORD_REPEAT' => tr('Password repeat'), 'TR_EDIT' => tr('Edit')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
        $fstype[$ar_buf[5]] ? $results[$i - 1]['fstype'] = $fstype[$ar_buf[5]] : ($results[$i - 1]['fstype'] = $fsdev[$ar_buf[0]]);
    }
    return $results;
}
/* END system functions */
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/sysinfo.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('hosting_plans', 'page');
$tpl->define_dynamic('disk_list', 'page');
$tpl->define_dynamic('disk_list_item', 'disk_list');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_ADMIN_SYSTEM_INFO_PAGE_TITLE' => tr('VHCS - Virtual Hosting Control System'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
function gen_mount_point(&$tpl)
{
    $mount_points = filesystems();
    while (list($number, $row) = each($mount_points)) {
        if (($number + 1) % 2 == 0) {
            $tpl->assign(array('ITEM_CLASS' => 'content'));
        } else {
            $tpl->assign(array('ITEM_CLASS' => 'content2'));
        }
        $tpl->assign(array('MOUNT' => $row['mount'], 'TYPE' => $row['fstype'], 'PARTITION' => $row['disk'], 'PERCENT' => $row['percent'], 'FREE' => make_hr($row['free'] * 1014), 'USED' => make_hr($row['used'] * 1024), 'SIZE' => make_hr($row['size'] * 1024)));
        $tpl->parse('DISK_LIST_ITEM', '.disk_list_item');
    }
    $tpl->parse('DISK_LIST', 'disk_list');
}
/*
Ejemplo n.º 28
0
            select sqlu_name as db_user_name from sql_user where sqlu_id = ?
SQL_QUERY;
        $rs = exec_query($sql, $query, array($db_user_id));
        $tpl->assign(array('USER_NAME' => $rs->fields['db_user_name'], 'SQL_QUERY' => '', 'SQL_RESULT' => ''));
    }
    $tpl->assign('ID', $db_user_id);
}
//
// common page data.
//
if (isset($_SESSION['sql_support']) && $_SESSION['sql_support'] == "no") {
    header("Location: index.php");
}
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_CLIENT_SQL_EXECUTE_QUERY_PAGE_TITLE' => tr('VHCS - Client/Execute SQL Query'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TID' => $_SESSION['layout_id'], 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
//
// dynamic page data.
//
check_usr_sql_perms($sql, $db_user_id);
gen_page_post_data($tpl, $sql, $db_user_id);
execute_sql_query($tpl, $sql, $_SESSION['user_id'], $db_user_id);
//
// static page messages.
//
gen_client_menu($tpl);
gen_logged_from($tpl);
check_permissions($tpl);
$tpl->assign(array('TR_EXECUTE_SQL_QUERY' => tr('Execute SQL query'), 'TR_USER_NAME' => tr('User name'), 'TR_SQL_QUERY' => tr('SQL query'), 'TR_QUERY_STATUS' => tr('Query status'), 'TR_QUERY_RESULT' => tr('Query result'), 'TR_EXECUTE' => tr('Execute')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
Ejemplo n.º 29
0
                where
                    owner_id = ?
                  and
                    name = 'add-user-auto-msg'

SQL_QUERY;
            $rs = exec_query($sql, $query, array($auto_subject, $auto_message, $user_id));
            //            $_SESSION['email_updated'] = 1;
            set_page_message(tr('Email Updated!'));
            //           Header("Location: manage_users.php");
            //            die();
        }
    }
}
/*
 *
 * static page messages.
 *
 */
$tpl->assign(array('TR_ADMIN_MANAGE_EMAIL_SETUP_PAGE_TITLE' => tr('VHCS - Admin/Manage users/Email setup'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
gen_admin_menu($tpl);
update_email_data($tpl, $sql);
gen_email_data($tpl, $sql);
$tpl->assign(array('TR_EMAIL_SETUP' => tr('Email setup'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'TR_MESSAGE_TEMPLATE_INFO' => tr('Message template info'), 'TR_USER_LOGIN_NAME' => tr('User login (system) name'), 'TR_USER_PASSWORD' => tr('User password'), 'TR_USER_REAL_NAME' => tr('User real (first and last) Name'), 'TR_MESSAGE_TEMPLATE' => tr('Message template'), 'TR_SUBJECT' => tr('Subject'), 'TR_MESSAGE' => tr('Message'), 'TR_SENDER_EMAIL' => tr('Senders email'), 'TR_SENDER_NAME' => tr('Senders name'), 'TR_APPLY_CHANGES' => tr('Apply changes')));
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}
unset_messages();
Ejemplo n.º 30
0
//   -------------------------------------------------------------------------------
//  |             VHCS(tm) - Virtual Hosting Control System                         |
//  |              Copyright (c) 2001-2005 be moleSoftware		            		|
//  |			http://vhcs.net | http://www.molesoftware.com		           		|
//  |                                                                               |
//  | This program is free software; you can redistribute it and/or                 |
//  | modify it under the terms of the MPL General Public License                   |
//  | as published by the Free Software Foundation; either version 1.1              |
//  | of the License, or (at your option) any later version.                        |
//  |                                                                               |
//  | You should have received a copy of the MPL Mozilla Public License             |
//  | along with this program; if not, write to the Open Source Initiative (OSI)    |
//  | http://opensource.org | osi@opensource.org								    |
//  |                                                                               |
//   -------------------------------------------------------------------------------
include 'include/vhcs-lib.php';
unset_user_login_data();
if (isset($_SESSION['user_theme_color'])) {
    global $cfg;
    $theme_color = $cfg['USER_INITIAL_THEME'];
} else {
    $theme_color = $cfg['USER_INITIAL_THEME_COLOR'];
}
$tpl = new pTemplate();
$tpl->define('page', $cfg['LOGIN_TEMPLATE_PATH'] . '/index.tpl');
$tpl->assign(array('TR_MAIN_INDEX_PAGE_TITLE' => tr('VHCS - Virtual Hosting Control System'), 'THEME_COLOR_PATH' => "themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'TC_BLUE_SELECTED' => $theme_color === 'blue' ? 'selected' : '', 'TC_GREEN_SELECTED' => $theme_color === 'green' ? 'selected' : '', 'TC_YELLOW_SELECTED' => $theme_color === 'yellow' ? 'selected' : '', 'TC_RED_SELECTED' => $theme_color === 'red' ? 'selected' : '', 'TR_LOGIN' => tr('Login'), 'TR_USERNAME' => tr('Username'), 'TR_PASSWORD' => tr('Password'), 'TR_THEME_COLOR' => tr('Theme color'), 'TR_BLUE' => tr('Blue'), 'TR_GREEN' => tr('Green'), 'TR_YELLOW' => tr('Yellow'), 'TR_RED' => tr('Red'), 'TR_LOSTPW' => tr('Lost password'), 'TR_TIME' => date("g:i a"), 'TR_DATE' => date("l dS of F Y"), 'TR_VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {
    dump_gui_debug();
}