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);
}
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/order_email.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'];
function gen_email_data(&$tpl, &$sql)
{
    if (isset($_POST['uaction']) && $_POST['uaction'] === 'order_email') {
        $tpl->assign(array('SUBJECT_VALUE' => $_POST['auto_subject'], 'MESSAGE_VALUE' => $_POST['auto_message'], 'SENDER_EMAIL_VALUE' => $_POST['sender_email'], 'SENDER_NAME_VALUE' => $_POST['sender_name']));
    } else {
        $user_id = $_SESSION['user_id'];
        $query = <<<SQL_QUERY
            select
                fname, lname, email
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['CLIENT_TEMPLATE_PATH'] . '/manage_domains.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('als_message', 'page');
$tpl->define_dynamic('als_list', 'page');
$tpl->define_dynamic('als_item', 'als_list');
$tpl->define_dynamic('sub_message', 'page');
$tpl->define_dynamic('sub_list', 'page');
$tpl->define_dynamic('sub_item', 'sub_list');
$tpl->define_dynamic('custom_buttons', 'page');
//
// page functions.
//
function gen_user_sub_action($sub_id, $sub_status)
{
        $ar_buf = preg_split('/\\s+/', $mounts[$i], 6);
        $results[$i - 1] = array();
        $results[$i - 1]['disk'] = $ar_buf[0];
        $results[$i - 1]['size'] = $ar_buf[1];
        $results[$i - 1]['used'] = $ar_buf[2];
        $results[$i - 1]['free'] = $ar_buf[3];
        $results[$i - 1]['percent'] = round($results[$i - 1]['used'] * 100 / $results[$i - 1]['size']) . '%';
        $results[$i - 1]['mount'] = $ar_buf[5];
        $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 {
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['CLIENT_TEMPLATE_PATH'] . '/language.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('def_language', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
/*
 *
 * page actions.
 *
 */
if (isset($_POST['uaction']) && $_POST['uaction'] === 'save_lang') {
    $user_id = $_SESSION['user_id'];
    $user_lang = $_POST['def_language'];
    $query = <<<SQL_QUERY
        update
//  |              Copyright (c) 2001-2005 by 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';
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) {
Exemple #7
0
//  |			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								    |
//  |                                                                               |
//   -------------------------------------------------------------------------------
// Begin page line
include '../include/vhcs-lib.php';
check_login();
$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'])));
//  |              Copyright (c) 2001-2005 by 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';
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.
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['CLIENT_TEMPLATE_PATH'] . '/add_subdomain.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
//
// page functions.
//
function check_subdomain_permissions($sql, $user_id)
{
    list($dmn_id, $dmn_name, $dmn_gid, $dmn_uid, $dmn_created_id, $dmn_created, $dmn_last_modified, $dmn_mailacc_limit, $dmn_ftpacc_limit, $dmn_traff_limit, $dmn_sqld_limit, $dmn_sqlu_limit, $dmn_status, $dmn_als_limit, $dmn_subd_limit, $dmn_ip_id, $dmn_disk_limit, $dmn_disk_usage, $dmn_php, $dmn_cgi) = get_domain_default_props($sql, $user_id);
    $sub_cnt = get_domain_running_sub_cnt($sql, $dmn_id);
    if ($dmn_subd_limit != 0 && $sub_cnt >= $dmn_subd_limit) {
        set_page_message(tr('Subdomain limit expired!'));
        header("Location: manage_domains.php");
        die;
Exemple #10
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();
}
//  |             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 Free Software                   |
//  | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA     |
//  |                                                                               |
//   -------------------------------------------------------------------------------
include '../include/vhcs-lib.php';
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['PURCHASE_TEMPLATE_PATH'] . '/package_info.tpl');
$tpl->define_dynamic('purchase_list', 'page');
$tpl->define_dynamic('purchase_message', 'page');
$tpl->define_dynamic('purchase_header', 'page');
$tpl->define_dynamic('purchase_footer', 'page');
/*
* Functions start
*/
function translate_sse($value)
{
    if ($value == '_yes_') {
        return tr('Yes');
    } else {
        if ($value == '_no_') {
            return tr('No');
//  |			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								    |
//  |                                                                               |
//   -------------------------------------------------------------------------------
// Begin page line
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/orders_detailst.tpl');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
$tpl->define_dynamic('ip_entry', 'page');
$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 - Reseller/Order details'), '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_details(&$tpl, &$sql, $user_id, $order_id)
{
    $query = <<<SQL_QUERY
        select
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['CLIENT_TEMPLATE_PATH'] . '/sql_execute_query.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('sql_result', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
if (isset($_GET['id'])) {
    $db_user_id = $_GET['id'];
} else {
    if (isset($_POST['id'])) {
        $db_user_id = $_POST['id'];
    } else {
        user_goto('manage_sql.php');
    }
}
//
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['CLIENT_TEMPLATE_PATH'] . '/edit_mail_acc.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('normal_mail', 'page');
$tpl->define_dynamic('forward_mail', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
//
// page functions.
//
function edit_mail_account(&$tpl, &$sql)
{
    if (!isset($_GET['id']) || $_GET['id'] === '' || !is_numeric($_GET['id'])) {
        set_page_message(tr('Email account not found!'));
        header('Location: email_accounts.php');
        die;
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/new_ticket.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
//
// page functions.
//
function send_user_message(&$sql, $user_id, $user_created_by)
{
    if (!isset($_POST['uaction'])) {
        return;
    }
    if ($_POST['subj'] === '') {
        set_page_message(tr('Please specify message subject!'));
        return;
            if ($i % 2 == 0) {
                $tpl->assign(array('CONTENT' => 'content'));
            } else {
                $tpl->assign(array('CONTENT' => 'content2'));
            }
            $tpl->assign(array('MAIL_MESSAGE' => '', 'TR_MAIL_NAME' => $rs->fields['mail_acc'] . "@" . $domain_name, 'TR_MAIL_ERROR' => $rs->fields['status']));
            $tpl->parse('MAIL_LIST', '.mail_list');
            $i++;
            $rs->MoveNext();
        }
    }
}
/* END system functions */
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/vhcs_debugger.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('hosting_plans', 'page');
$tpl->define_dynamic('domain_message', 'page');
$tpl->define_dynamic('alias_message', 'page');
$tpl->define_dynamic('subdomain_message', 'page');
$tpl->define_dynamic('mail_message', 'page');
$tpl->define_dynamic('domain_list', 'page');
$tpl->define_dynamic('alias_list', 'page');
$tpl->define_dynamic('subdomain_list', 'page');
$tpl->define_dynamic('mail_list', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_ADMIN_VHCS_DEBUGGER_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']));
/*
//  |              Copyright (c) 2001-2005 by 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';
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
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/support_system.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('tickets_list', 'page');
$tpl->define_dynamic('tickets_item', 'tickets_list');
$tpl->define_dynamic('custom_buttons', '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');
//
// page functions.
//
function get_last_date(&$tpl, &$sql, &$ticket_id)
{
          menu_name = ?,
          menu_link = ?,
          menu_target = ?
      where
          menu_id = ?
SQL_QUERY;
            $rs = exec_query($sql, $query, array($button_view, $button_name, $button_link, $button_target, $button_id));
            set_page_message(tr('Custom menu data updated successful!'));
            return;
        }
    }
}
// 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);
}
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/ip_manage.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('hosting_plans', 'page');
$tpl->define_dynamic('ip_row', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_ADMIN_IP_MANAGE_PAGE_TITLE' => tr('VHCS - Admin/IP manage'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
function show_IPs(&$tpl, &$sql)
{
    $query = <<<SQL_QUERY
        select
            *
        from
            server_ips
SQL_QUERY;
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/add_reseller.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('hosting_plans', 'page');
$tpl->define_dynamic('rsl_ip_message', 'page');
$tpl->define_dynamic('rsl_ip_list', 'page');
$tpl->define_dynamic('rsl_ip_item', 'rsl_ip_list');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl->assign(array('TR_ADMIN_ADD_RESELLER_PAGE_TITLE' => tr('VHCS - Admin/Manage users/Add reseller'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'ISP_LOGO' => get_logo($_SESSION['user_id']), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE']));
//
//  Get Server IPs;
//
function get_server_ip(&$tpl, &$sql)
{
    $query = <<<SQL_QUERY
//  |              Copyright (c) 2001-2005 by 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';
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')));
//  |              Copyright (c) 2001-2005 by 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';
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;
Exemple #24
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();
}
//  |              Copyright (c) 2001-2005 by 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';
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();
Exemple #26
0
        $selected = '';
    }
    $tpl->assign(array('LAYOUT_VALUE' => $layout, 'LAYOUT_SELECTED' => $selected, 'LAYOUT_NAME' => $layout));
    $tpl->parse('DEF_LAYOUT', '.def_layout');
    $layout = 'yellow';
    if ($layout === $user_def_layout) {
        $selected = 'selected';
    } else {
        $selected = '';
    }
    $tpl->assign(array('LAYOUT_VALUE' => $layout, 'LAYOUT_SELECTED' => $selected, 'LAYOUT_NAME' => $layout));
    $tpl->parse('DEF_LAYOUT', '.def_layout');
}
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['RESELLER_TEMPLATE_PATH'] . '/layout.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('def_layout', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
function save_layout()
{
    global $sql, $theme_color;
    if (isset($_POST['uaction']) && $_POST['uaction'] === 'save_layout') {
        $user_id = $_SESSION['user_id'];
        $user_layout = $_POST['def_layout'];
        $query = <<<SQL_QUERY
            update
            case 403:
                $eid_status = "Forbidden !";
                break;
            case 404:
                $eid_status = "File not found !";
                break;
            case 500:
                $eid_status = "Internal server error !";
                break;
        }
        $tpl->assign(array('ERROR' => $error_standard_content, 'EID_STATUS' => $eid_status));
    }
}
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['CLIENT_TEMPLATE_PATH'] . '/error_edit.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('custom_buttons', 'page');
//
// page functions.
//
function update_error_page(&$sql, $user_id)
{
}
//
// common page data.
//
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
Exemple #28
0
//  |                                                                               |
//  | 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';
check_login();
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/index.tpl');
$tpl->define_dynamic('def_language', 'page');
$tpl->define_dynamic('def_layout', 'page');
$tpl->define_dynamic('no_messages', 'page');
$tpl->define_dynamic('msg_entry', 'page');
$tpl->define_dynamic('traff_warn', 'page');
function gen_system_message(&$tpl, &$sql)
{
    $user_id = $_SESSION['user_id'];
    $query = <<<SQL_QUERY
        select
            count(ticket_id) as cnum
        from
            tickets
        where
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/email_setup.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('hosting_plans', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
function gen_email_data(&$tpl, &$sql)
{
    if (isset($_POST['uaction']) && $_POST['uaction'] === 'email_setup') {
        $tpl->assign(array('SUBJECT_VALUE' => $_POST['auto_subject'], 'MESSAGE_VALUE' => $_POST['auto_message'], 'SENDER_EMAIL_VALUE' => $_POST['sender_email'], 'SENDER_NAME_VALUE' => $_POST['sender_name']));
    } else {
        $user_id = $_SESSION['user_id'];
        $query = <<<SQL_QUERY
            select
                fname, lname, email
            from
//  |              Copyright (c) 2001-2005 by 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';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['CLIENT_TEMPLATE_PATH'] . '/domain_statistics.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$tpl->define_dynamic('month_item', 'page');
$tpl->define_dynamic('year_item', 'page');
$tpl->define_dynamic('traff_list', 'page');
$tpl->define_dynamic('traff_item', 'traff_list');
$tpl->define_dynamic('custom_buttons', 'page');
//
// page functions.
//
function gen_page_date(&$tpl, $month, $year)
{
    for ($i = 1; $i <= 12; $i++) {
        $tpl->assign(array('MONTH_SELECTED' => $i == $month ? 'selected' : '', 'MONTH' => $i));