本文整理汇总了PHP中get_logo函数的典型用法代码示例。如果您正苦于以下问题:PHP get_logo函数的具体用法?PHP get_logo怎么用?PHP get_logo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_logo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index()
{
$this->_validation();
// Load the validation rules and fields
$data['extraHeadContent'] = "<script type=\"text/javascript\" src=\"" . base_url() . "js/glider.js\"></script>\n";
$data['extraHeadContent'] .= "<script type=\"text/javascript\" src=\"" . base_url() . "js/settings.js\"></script>\n";
$data['extraHeadContent'] .= "<link type=\"text/css\" rel=\"stylesheet\" href=\"" . base_url() . "css/settings.css\" />\n";
$data['company_logo'] = get_logo($this->settings_model->get_setting('logo'));
if (!$this->validation->run()) {
// if company_name was submitted, but we're here in the failed validation statement, then it means there were errors
if ($this->input->post('company_name')) {
$data['message'] = $this->lang->line('settings_modify_fail');
} else {
$data['message'] = $this->session->flashdata('status');
}
// grab existing prefs
$data['row'] = $this->db->get('settings')->row();
$data['page_title'] = $this->lang->line('menu_settings');
$this->load->view('settings/index', $data);
} else {
$save_invoices = $this->input->post('save_invoices') == 'y' ? 'y' : 'n';
$data = array('company_name' => $this->input->post('company_name'), 'address1' => $this->input->post('address1'), 'address2' => $this->input->post('address2'), 'city' => $this->input->post('city'), 'province' => $this->input->post('province'), 'country' => $this->input->post('country'), 'postal_code' => $this->input->post('postal_code'), 'website' => $this->input->post('website'), 'primary_contact' => $this->input->post('primary_contact'), 'primary_contact_email' => $this->input->post('primary_contact_email'), 'invoice_note_default' => $this->input->post('invoice_note_default'), 'currency_type' => $this->input->post('currency_type'), 'currency_symbol' => $this->input->post('currency_symbol'), 'days_payment_due' => (int) $this->input->post('days_payment_due'), 'tax_code' => $this->input->post('tax_code'), 'tax1_desc' => $this->input->post('tax1_desc'), 'tax1_rate' => $this->input->post('tax1_rate'), 'tax2_desc' => $this->input->post('tax2_desc'), 'tax2_rate' => $this->input->post('tax2_rate'), 'save_invoices' => $save_invoices, 'display_branding' => $this->input->post('display_branding'), 'new_version_autocheck' => $this->input->post('new_version_autocheck'));
// Euro has conversion issues in DOMPDF, this is a fix for it
$data['currency_symbol'] = $data['currency_symbol'] == '€' ? '€' : $data['currency_symbol'];
// Logo uploading
$config['upload_path'] = './img/logo/';
$config['allowed_types'] = 'gif|jpg';
$config['max_size'] = '500';
$config['max_width'] = '900';
$config['max_height'] = '200';
// these are WAY more then someone should need for a logo
$this->load->library('upload', $config);
$extra_message = '';
if ($this->upload->do_upload()) {
$logo_data = $this->upload->data();
// add the logo into the settings update
$data['logo'] = $logo_data['file_name'];
$data['logo_pdf'] = $logo_data['file_name'];
}
$extra_message .= $this->input->post('userfile') != '' ? $this->upload->display_errors('<br />') : '';
// run the update
$update_settings = $this->settings_model->update_settings($data);
if ($this->db->affected_rows() >= 1 or $update_settings === TRUE) {
// was the password getting changed, and if so, be sure this isn't the demo
if ($this->input->post('password') != '' && $this->settings_model->get_setting('demo_flag') != 'y') {
$this->load->model('clientcontacts_model');
$this->clientcontacts_model->password_change(1, $this->input->post('password'));
}
$this->session->set_flashdata('status', $this->lang->line('settings_modify_success') . ' ' . $extra_message);
} else {
$this->session->set_flashdata('status', $this->lang->line('settings_modify_fail') . ' ' . $extra_message);
}
// running a redirect here instead of loading a view because glider.js seems to freeze without the reload
redirect('settings');
}
}
示例2: index
public function index()
{
$this->load->helper('matches');
$this->load->model('matches/matches_m');
$this->matches_m->order_by('date', 'DESC');
$this->matches_m->limit(1);
$query = $this->matches_m->get_upcoming_matches();
$match = null;
if (!empty($query)) {
$match = new stdClass();
$match->opponentlogo = get_logo($query[0]->opponent, 'opponent');
$match->teamlogo = get_logo($query[0]->team, 'team');
$match->date = $query[0]->date;
}
return $this->template->set_layout(null)->set('match', $match)->build('wi_upcoming/main.twig');
}
示例3: exec_query
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'])) {
示例4: utf8_decode
$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();
示例5: check_login
// -------------------------------------------------------------------------------
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
示例6: pTemplate
$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
示例7: check_login
// -------------------------------------------------------------------------------
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();
示例8: base_url
<meta name="Generator" content="TomatoCart" />
</head>
<body>
<!-- page header -->
<!-- BEGIN: Header -->
<div id="header">
<div class="container">
<div class="row-fluid">
<div class="span4 logo">
<a href="<?php
echo base_url();
?>
">
<img src="<?php
echo get_logo();
?>
" alt="<?php
echo config('STORE_NAME');
?>
" title="<?php
echo config('STORE_NAME');
?>
" />
</a>
</div>
<div class="span8">
<div class="top-nav row-fluid clearfix">
<div class="pull-right">
<a class="popup-cart" href="javascript:void(0);">
<i class="icon-shopping-cart"></i>
示例9: exec_query
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();
示例10: get_meta_keywords
<form action="#" method="POST">
<textarea type="text" name="meta-keywords" /><?php
echo get_meta_keywords($con, $options);
?>
</textarea>
<input type="submit" name="meta-keywords_ok" value=" OK " />
</form>
</div>
<div class="general_box logo">
<p>Logo: </p>
<form enctype="multipart/form-data" action="#" method="POST">
<input type="file" name="logo" size=35 />
<input type="submit" name="logo_ok" value=" OK " />
<div class="show_box show_logo">
<?php
if ($logo = get_logo($con, $options)) {
?>
<img src="/images/<?php
echo $logo;
?>
">
<?php
} else {
?>
<img src="/images/logo.png"> <?php
}
?>
</div>
</form>
</div>
</div>
示例11: check_login
include '../include/vhcs-lib.php';
check_login();
$tpl = new pTemplate();
$tpl->define_dynamic('page', $cfg['ADMIN_TEMPLATE_PATH'] . '/ehp.tpl');
$tpl->define_dynamic('page_message', 'page');
global $cfg;
$theme_color = $cfg['USER_INITIAL_THEME'];
/*
*
* static page messages.
*
*/
global $hpid;
// Show main menu
gen_admin_menu($tpl);
$tpl->assign(array('TR_RESELLER_MAIN_INDEX_PAGE_TITLE' => tr('VHCS - Administrator/Edit hosting plan'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
$tpl->assign(array('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_UPDATE_PLAN' => tr('Update plan')));
/*
* Dynamic page process
*
*/
if (isset($_POST['uaction']) && 'add_plan' === $_POST['uaction']) {
// Process data
if (check_data_iscorrect($tpl)) {
// Save data to db
save_data_to_db();
} else {
restore_form($tpl, $sql);
}
} else {
// Get hosting plan id tha come for edit
示例12: check_login
// | 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'];
示例13: check_login
// | 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);
示例14: check_login
// | 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;
示例15: check_login
// | 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'];