本文整理汇总了PHP中pTemplate::assign方法的典型用法代码示例。如果您正苦于以下问题:PHP pTemplate::assign方法的具体用法?PHP pTemplate::assign怎么用?PHP pTemplate::assign使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pTemplate
的用法示例。
在下文中一共展示了pTemplate::assign方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: system_message
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);
}
示例2: array
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();
示例3: tr
$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();
示例4: gen_cron_jobs
// | 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.
*
*/
示例5: pTemplate
// | |
// | 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
示例6: pTemplate
}
}
// 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 {
示例7: get_htuser_name
// | |
// -------------------------------------------------------------------------------
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) {
示例8: pTemplate
// | 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'];
示例9: pTemplate
// | 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);
示例10: update_server_settings
// | 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;
示例11: array
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'])) {
示例12: array
$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();
示例13: send_user_message
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();
示例14: generate_page
$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
示例15: array
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);