本文整理汇总了PHP中draw_success_message函数的典型用法代码示例。如果您正苦于以下问题:PHP draw_success_message函数的具体用法?PHP draw_success_message怎么用?PHP draw_success_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了draw_success_message函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: encode_text
b_city = \'' . encode_text($b_city) . '\',
b_zipcode = \'' . encode_text($b_zipcode) . '\',
b_country = \'' . encode_text($b_country) . '\',
b_state = \'' . encode_text($b_state) . '\',
phone = \'' . encode_text($phone) . '\',
fax = \'' . encode_text($fax) . '\',
email = \'' . encode_text($email) . '\',
url = \'' . encode_text($url) . '\',
' . ($user_password1 != '' && $user_password2 != '' ? $user_password . ',' : '') . '
preferred_language = \'' . $selLanguages . '\',
notification_status_changed = IF(email_notifications <> \'' . $send_updates . '\', \'' . date('Y-m-d H:i:s') . '\', notification_status_changed),
email_notifications = \'' . $send_updates . '\'
WHERE id = ' . (int) $objLogin->GetLoggedID();
if (database_void_query($sql) > 0) {
$objLogin->UpdateLoggedEmail($email);
$objLogin->UpdateLoggedFirstName(encode_text($first_name));
$objLogin->UpdateLoggedLastName(encode_text($last_name));
$msg = draw_success_message(_ACCOUNT_WAS_UPDATED, false);
} else {
$msg = draw_important_message(_UPDATING_ACCOUNT_ERROR, false);
}
}
}
$objCustomers = new Customers();
$customer_info = $objCustomers->GetInfoByID($objLogin->GetLoggedID());
$total_groups = CustomerGroups::GetAllGroups();
$arr_groups = array();
foreach ($total_groups[0] as $key => $val) {
$arr_groups[$val['id']] = $val['name'];
}
}
示例2: SendMassMail
//.........这里部分代码省略.........
if ($email_to_subtype == 'all') {
$member_where_clause = '';
} else {
if ($email_to_subtype == 'uncategorized') {
$member_where_clause = 'group_id=0 AND';
} else {
if ($email_to_subtype != '') {
$member_where_clause = 'group_id=' . $email_to_subtype . ' AND';
} else {
$member_where_clause = '';
}
}
}
if ($email_to == 'test') {
$emails_total = '1';
if (send_email_wo_template($admin_email, $admin_email, $subject, $message)) {
$emails_sent = '1';
}
} else {
$result = database_query('SELECT COUNT(*) as cnt FROM ' . $this->TABLE_NAME . ' WHERE is_active = 1 AND ' . $member_where_clause . ' email_notifications = 1 AND email != \'\'', DATA_ONLY, FIRST_ROW_ONLY);
$members_emails_total = $result['cnt'];
$result = database_query('SELECT COUNT(*) as cnt FROM ' . TABLE_ACCOUNTS . ' WHERE is_active = 1 AND email != \'\'', DATA_ONLY, FIRST_ROW_ONLY);
$admins_emails_total = $result['cnt'];
$result = database_query('SELECT COUNT(*) as cnt FROM ' . TABLE_NEWS_SUBSCRIBED . ' WHERE email != \'\'', DATA_ONLY, FIRST_ROW_ONLY);
$newsletter_email_total = $result['cnt'];
if ($email_to == 'members') {
$emails_total = $members_emails_total;
} else {
if ($email_to == 'admins') {
$emails_total = $admins_emails_total;
} else {
if ($email_to == 'all') {
$emails_total = $members_emails_total + $admins_emails_total;
} else {
if ($email_to == 'newsletter_subscribers') {
$emails_total = $newsletter_email_total;
}
}
}
}
if ($email_to == 'members' || $email_to == 'all') {
$sql = 'SELECT id, first_name, last_name, email, user_name
FROM ' . $this->TABLE_NAME . '
WHERE is_active = 1 AND ' . $member_where_clause . ' email_notifications = 1 AND email != \'\'
ORDER BY id ASC';
$result = database_query($sql, DATA_AND_ROWS, ALL_ROWS);
for ($i = 0; $i < $result[1]; $i++) {
$body_middle = str_ireplace('{FIRST NAME}', $result[0][$i]['first_name'], $message);
$body_middle = str_ireplace('{LAST NAME}', $result[0][$i]['last_name'], $body_middle);
$body_middle = str_ireplace('{USER NAME}', $result[0][$i]['user_name'], $body_middle);
$body_middle = str_ireplace('{USER EMAIL}', $result[0][$i]['email'], $body_middle);
if (send_email_wo_template($result[0][$i]['email'], $admin_email, $subject, $body_middle)) {
$emails_sent++;
}
}
}
if ($email_to == 'admins' || $email_to == 'all') {
$sql = 'SELECT id, first_name, last_name, email, user_name
FROM ' . TABLE_ACCOUNTS . '
WHERE is_active = 1 AND email != \'\'
ORDER BY id ASC';
$result = database_query($sql, DATA_AND_ROWS, ALL_ROWS);
for ($i = 0; $i < $result[1]; $i++) {
$body_middle = str_ireplace('{FIRST NAME}', $result[0][$i]['first_name'], $message);
$body_middle = str_ireplace('{LAST NAME}', $result[0][$i]['last_name'], $body_middle);
$body_middle = str_ireplace('{USER NAME}', $result[0][$i]['user_name'], $body_middle);
$body_middle = str_ireplace('{USER EMAIL}', $result[0][$i]['email'], $body_middle);
if (send_email_wo_template($result[0][$i]['email'], $admin_email, $subject, $body_middle)) {
$emails_sent++;
}
}
}
if ($email_to == 'newsletter_subscribers') {
$sql = 'SELECT email FROM ' . TABLE_NEWS_SUBSCRIBED . ' WHERE email != \'\' ORDER BY id ASC';
$result = database_query($sql, DATA_AND_ROWS, ALL_ROWS);
for ($i = 0; $i < $result[1]; $i++) {
$body_middle = $message;
if (send_email_wo_template($result[0][$i]['email'], $admin_email, $subject, $body_middle)) {
$emails_sent++;
}
}
}
if ($send_copy_to_admin == '1') {
send_email_wo_template($admin_email, $admin_email, $subject . ' (admin copy)', $message);
}
}
if ($emails_sent) {
Session::Set('email_random_code', $email_post_code);
$msg = str_replace('_SENT_', $emails_sent, _EMAILS_SUCCESSFULLY_SENT);
$msg = str_replace('_TOTAL_', $emails_total, $msg);
$this->error = false;
draw_success_message($msg);
} else {
$this->error = true;
draw_important_message(_EMAILS_SENT_ERROR);
}
} else {
draw_important_message(_EMAIL_FIELDS_EMPTY_ALERT);
}
}
示例3: defined
* @project ApPHP Business Directory
* @copyright (c) 2012 ApPHP
* @author ApPHP <info@apphp.com>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
$act = isset($_POST['act']) ? prepare_input($_POST['act']) : '';
$password_sent = (bool) Session::Get('activation_email_resent');
$email = isset($_POST['email']) ? prepare_input($_POST['email']) : '';
$msg = '';
if ($act == 'resend') {
if (!$password_sent) {
if (Customers::Reactivate($email)) {
$msg = draw_success_message(str_replace('_EMAIL_', $email, _ACTIVATION_EMAIL_WAS_SENT), false);
Session::Set('activation_email_resent', true);
} else {
$msg = draw_important_message(Customers::GetStaticError(), false);
}
} else {
$msg = draw_message(_ACTIVATION_EMAIL_ALREADY_SENT, false);
}
}
// Draw title bar
draw_title_bar(_RESEND_ACTIVATION_EMAIL);
// Check if customer is logged in
if (!$objLogin->IsLoggedIn() && ModulesSettings::Get('customers', 'allow_registration') == 'yes') {
echo $msg;
?>
<div class="pages_contents">
示例4: DrawArticleComments
/**
* Draws article comments
* @param $article_id
* @param $draw
*/
public function DrawArticleComments($article_id = '', $draw = true)
{
if (!$article_id) {
return '';
}
global $objLogin;
$delete_pending_time = ModulesSettings::Get('comments', 'delete_pending_time');
$user_type = ModulesSettings::Get('comments', 'user_type');
$comment_length = ModulesSettings::Get('comments', 'comment_length');
$image_verification = ModulesSettings::Get('comments', 'image_verification_allow');
$comments_on_page = ModulesSettings::Get('comments', 'page_size');
$is_published = ModulesSettings::Get('comments', 'pre_moderation_allow') == 'yes' ? '0' : '1';
if ($image_verification == 'yes') {
include_once 'modules/captcha/securimage.php';
$objImg = new Securimage();
}
//echo '<pre>';
//print_r($_SERVER);
//echo '</pre>';
$task = isset($_POST['task']) ? prepare_input($_POST['task']) : '';
$comment_id = isset($_POST['comment_id']) ? (int) $_POST['comment_id'] : '';
$init_state = 'closed';
$user_id = isset($_POST['user_id']) ? (int) $_POST['user_id'] : '';
$user_name = isset($_POST['comment_user_name']) ? prepare_input($_POST['comment_user_name']) : '';
$user_email = isset($_POST['comment_user_email']) ? prepare_input($_POST['comment_user_email']) : '';
$comment_text = isset($_POST['comment_text']) ? prepare_input($_POST['comment_text']) : '';
$captcha_code = isset($_POST['captcha_code']) ? prepare_input($_POST['captcha_code']) : '';
$msg = '';
$task_completed = false;
$focus_field = '';
$current_page = isset($_GET['p']) ? abs((int) $_GET['p']) : '1';
if ($task == 'publish_comment') {
$init_state = 'opened';
if ($user_name == '') {
$msg = draw_important_message(_USERNAME_EMPTY_ALERT, false);
$focus_field = 'comment_user_name';
} else {
if (!check_email_address($user_email) && !$objLogin->IsLoggedInAs($this->user_type_name)) {
$msg = draw_important_message(_EMAIL_IS_WRONG, false);
$focus_field = 'comment_user_email';
} else {
if ($comment_text == '') {
$msg = draw_important_message(_MESSAGE_EMPTY_ALERT, false);
$focus_field = 'comment_text';
} else {
if ($comment_text != '' && strlen($comment_text) > $comment_length) {
$msg = draw_important_message(str_replace('_LENGTH_', $comment_length, _COMMENT_LENGTH_ALERT), false);
$focus_field = 'comment_text';
} else {
if ($image_verification == 'yes' && !$objImg->check($captcha_code)) {
$msg = draw_important_message(_WRONG_CODE_ALERT, false);
$focus_field = 'captcha_code';
} else {
// Block operation in demo mode
if (strtolower(SITE_MODE) == 'demo') {
$msg = draw_important_message(_OPERATION_BLOCKED, false);
} else {
if ($objLogin->IpAddressBlocked(get_current_ip())) {
$msg = draw_important_message(_IP_ADDRESS_BLOCKED, false);
} else {
if ($objLogin->EmailBlocked($user_email)) {
$msg = draw_important_message(_EMAIL_BLOCKED, false);
} else {
$sql = 'INSERT INTO ' . TABLE_COMMENTS . '(
id,
article_id,
user_id,
user_name,
user_email,
comment_text,
date_created,
date_published,
is_published
)VALUES(
NULL,
' . (int) $article_id . ',
' . (int) $user_id . ',
\'' . encode_text($user_name) . '\',
\'' . encode_text($user_email) . '\',
\'' . encode_text(strip_tags($comment_text, '<b><i><u><br>')) . '\',
\'' . date('Y-m-d H:i:s') . '\',
\'' . ($is_published == '1' ? date('Y-m-d H:i:s') : '0000-00-00 00:00:00') . '\',
\'' . $is_published . '\'
)';
if (database_void_query($sql)) {
if ($is_published == '1') {
$msg = draw_success_message(_COMMENT_POSTED_SUCCESS, false);
} else {
$msg = draw_success_message(_COMMENT_SUBMITTED_SUCCESS, false);
}
$task_completed = true;
} else {
$msg = draw_important_message(_TRY_LATER, false);
}
}
//.........这里部分代码省略.........
示例5: defined
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
if ($objLogin->IsLoggedInAs('owner') && Modules::IsModuleInstalled('backup')) {
$submition_type = isset($_POST['submition_type']) ? prepare_input($_POST['submition_type']) : '';
$backup_file = isset($_POST['backup_file']) ? prepare_input($_POST['backup_file']) : '';
$st = isset($_GET['st']) ? prepare_input($_GET['st']) : '';
$fname = isset($_GET['fname']) ? prepare_input($_GET['fname']) : '';
$msg = '';
$objBackup = new Backup();
if ($st == 'restore') {
// restore previouse backup
if ($objBackup->RestoreBackup($fname)) {
$msg = draw_success_message(str_replace('_FILE_NAME_', $fname, _BACKUP_WAS_RESTORED), false);
} else {
$msg = draw_important_message($objBackup->error, false);
}
} else {
$msg = draw_message(_BACKUP_RESTORE_NOTE, false);
}
// draw title bar and message
draw_title_bar(prepare_breadcrumbs(array(_MODULES => '', _BACKUP => '', _BACKUP_RESTORE => '')), prepare_permanent_link('index.php?admin=mod_backup_installation', _BACKUP_INSTALLATION));
echo $msg;
draw_content_start();
$objBackup->DrawRestoreForm();
draw_content_end();
} else {
draw_title_bar(_ADMIN);
draw_important_message(_NOT_AUTHORIZED);
示例6: defined
<?php
/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <info@apphp.com>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
if (Modules::IsModuleInstalled('inquiries')) {
draw_title_bar(_SEND_INQUIRY);
draw_success_message(_INQUIRY_SENT_SUCCESS_MSG);
echo '<br>';
} else {
draw_title_bar(_PAGE);
draw_important_message(_NOT_AUTHORIZED);
}
示例7: prepare_input
if (isset($_POST['access_level'])) {
$params['access_level'] = prepare_input($_POST['access_level']);
}
if (isset($_POST['page_title'])) {
$params['page_title'] = prepare_input($_POST['page_title']);
}
if (isset($_POST['page_text'])) {
$params['page_text'] = prepare_input($_POST['page_text'], false, 'low');
}
if (isset($_POST['menu_link'])) {
$params['menu_link'] = prepare_input($_POST['menu_link']);
}
$params['menu_id'] = isset($_POST['menu_id']) ? prepare_input($_POST['menu_id']) : '0';
$params['page_key'] = create_seo_url(prepare_input($_POST['page_title']));
$params['language_id'] = isset($_POST['language_id']) ? prepare_input($_POST['language_id']) : '';
$params['finish_publishing'] = isset($_POST['finish_publishing']) && check_date($_POST['finish_publishing']) ? prepare_input($_POST['finish_publishing']) : '0000-00-00';
if ($objPage->PageUpdate($params)) {
$msg = draw_success_message(_PAGE_SAVED, false);
///if(Application::Get('page_id') != 'home'){
///$objSession->SetMessage('notice', $msg);
///header('location: index.php?admin=pages'.((Application::Get('type') != '') ? '&type='.Application::Get('type'): '').'&mg_language_id='.$params['language_id']);
///exit;
///}
} else {
$msg = draw_important_message($objPage->error, false);
}
}
if ($msg == '') {
$msg = draw_message(_ALERT_REQUIRED_FILEDS, false);
}
}
示例8: send_email
} else {
if ($reg_confirmation == 'by admin') {
$email_template = 'new_account_created_confirm_by_admin';
} else {
$email_template = 'new_account_created';
}
}
send_email($email, $objSettings->GetParameter('admin_email'), $email_template, array('{FIRST NAME}' => $first_name, '{LAST NAME}' => $last_name, '{USER NAME}' => $user_name, '{USER PASSWORD}' => $user_password1, '{WEB SITE}' => $_SERVER['SERVER_NAME'], '{REGISTRATION CODE}' => $registration_code, '{BASE URL}' => APPHP_BASE, '{YEAR}' => date('Y')));
if ($admin_alert_new_registration == 'yes') {
send_email($objSettings->GetParameter('admin_email'), $objSettings->GetParameter('admin_email'), 'new_account_created_notify_admin', array('{FIRST NAME}' => $first_name, '{LAST NAME}' => $last_name, '{USER NAME}' => $user_name, '{USER EMAIL}' => $email, '{WEB SITE}' => $_SERVER['SERVER_NAME'], '{BASE URL}' => APPHP_BASE, '{YEAR}' => date('Y')));
}
////////////////////////////////////////////////////////////
if ($reg_confirmation == 'by email') {
$msg = draw_success_message(_ACCOUNT_CREATED_CONF_BY_EMAIL_MSG, false);
$msg .= '<br />' . draw_message(_ACCOUT_CREATED_CONF_LINK, false);
} else {
if ($reg_confirmation == 'by admin') {
$msg = draw_success_message(_ACCOUNT_CREATED_CONF_BY_ADMIN_MSG, false);
$msg .= '<br />' . draw_message(_ACCOUT_CREATED_CONF_LINK, false);
} else {
$msg = draw_success_message(_ACCOUNT_CREATED_NON_CONFIRM_MSG, false);
$msg .= '<br />' . draw_message(_ACCOUNT_CREATED_NON_CONFIRM_LINK, false);
}
}
$account_created = true;
} else {
$msg = draw_important_message(_CREATING_ACCOUNT_ERROR, false);
}
}
}
}
示例9: DrawRegistrationForm
/**
* Draws registration form
* @param $news_id
* @param $event_title
* @param $draw
*/
public function DrawRegistrationForm($news_id = '0', $event_title = '', $draw = true)
{
if (!$news_id) {
return '';
}
global $objSettings, $objLogin;
$lang = Application::Get('lang');
$focus_element = 'first_name';
// post fields
$task = isset($_POST['task']) ? prepare_input($_POST['task']) : '';
$event_id = isset($_POST['event_id']) ? (int) $_POST['event_id'] : '0';
$first_name = isset($_POST['first_name']) ? prepare_input($_POST['first_name']) : '';
$last_name = isset($_POST['last_name']) ? prepare_input($_POST['last_name']) : '';
$email = isset($_POST['email']) ? prepare_input($_POST['email']) : '';
$phone = isset($_POST['phone']) ? prepare_input($_POST['phone']) : '';
$message = isset($_POST['message']) ? substr(prepare_input($_POST['message']), 0, 2048) : '';
$captcha_code = isset($_POST['captcha_code']) ? prepare_input($_POST['captcha_code']) : '';
$admin_email = $objSettings->GetParameter('admin_email');
$msg = '';
if ($task == 'register_to_event') {
include_once 'modules/captcha/securimage.php';
$objImg = new Securimage();
if ($first_name == '') {
$msg = draw_important_message(_FIRST_NAME_EMPTY_ALERT, false);
$focus_element = 'first_name';
} else {
if ($last_name == '') {
$msg = draw_important_message(_LAST_NAME_EMPTY_ALERT, false);
$focus_element = 'last_name';
} else {
if ($email == '') {
$msg = draw_important_message(_EMAIL_EMPTY_ALERT, false);
$focus_element = 'email';
} else {
if ($email != '' && !check_email_address($email)) {
$msg = draw_important_message(_EMAIL_VALID_ALERT, false);
$focus_element = 'email';
} else {
if ($phone == '') {
$msg = draw_important_message(str_replace('_FIELD_', _PHONE, _FIELD_CANNOT_BE_EMPTY), false);
$focus_element = 'phone';
} else {
if (!$objImg->check($captcha_code)) {
$msg = draw_important_message(_WRONG_CODE_ALERT, false);
$focus_element = 'captcha_code';
} else {
$sql = 'SELECT * FROM ' . TABLE_EVENTS_REGISTERED . ' WHERE event_id = \'' . (int) $event_id . '\' AND email = \'' . $email . '\'';
if (database_query($sql, ROWS_ONLY, FIRST_ROW_ONLY) > 0) {
$msg = draw_important_message(_EVENT_USER_ALREADY_REGISTERED, false);
}
}
}
}
}
}
}
// deny all operations in demo version
if (strtolower(SITE_MODE) == 'demo') {
$msg = draw_important_message(_OPERATION_BLOCKED, false);
}
if ($msg == '') {
if ($objLogin->IpAddressBlocked(get_current_ip())) {
$msg = draw_important_message(_IP_ADDRESS_BLOCKED, false);
} else {
if ($objLogin->EmailBlocked($email)) {
$msg = draw_important_message(_EMAIL_BLOCKED, false);
} else {
$sql = 'INSERT INTO ' . TABLE_EVENTS_REGISTERED . ' (id, event_id, first_name, last_name, email, phone, message, date_registered)
VALUES (NULL, ' . (int) $event_id . ', \'' . encode_text($first_name) . '\', \'' . encode_text($last_name) . '\', \'' . encode_text($email) . '\', \'' . encode_text($phone) . '\', \'' . encode_text($message) . '\', \'' . @date('Y-m-d H:i:s') . '\')';
if (database_void_query($sql)) {
$msg = draw_success_message(_EVENT_REGISTRATION_COMPLETED, false);
////////////////////////////////////////////////////////////
send_email($email, $admin_email, 'events_new_registration', array('{FIRST NAME}' => $first_name, '{LAST NAME}' => $last_name, '{EVENT}' => '<b>' . $event_title . '</b>'), '', $admin_email, 'Events - new user was registered (admin copy)');
////////////////////////////////////////////////////////////
$first_name = $last_name = $email = $phone = $message = '';
} else {
///echo mysql_error();
$msg = draw_important_message(_TRY_LATER, false);
}
}
}
}
}
$output = '
' . ($msg != '' ? $msg : '') . '<br />
<fieldset style="border:1px solid #cccccc;padding-left:10px;margin:0px 12px 12px 12px;">
<legend><b>' . _REGISTRATION_FORM . '</b></legend>
<form method="post" name="frmEventRegistration" id="frmEventRegistration">
' . draw_hidden_field('task', 'register_to_event', false) . '
' . draw_hidden_field('event_id', $news_id, false) . '
' . draw_token_field(false);
$output .= '
<table cellspacing="1" cellpadding="2" border="0" width="100%">
<tbody>
//.........这里部分代码省略.........
示例10: draw_success_message
} else {
if ($action == 'invoice') {
$mode = 'invoice';
} else {
if ($action == 'send_invoice') {
if ($objOrders->SendInvoice($rid)) {
$msg = draw_success_message(_INVOICE_SENT_SUCCESS, false);
} else {
$msg = draw_important_message($objOrders->error, false);
}
$mode = "view";
$title_action = "Send Invoice";
} else {
if ($action == 'clean_credit_card') {
if ($objOrders->CleanCreditCardInfo($rid)) {
$msg = draw_success_message(_OPERATION_COMMON_COMPLETED, false);
} else {
$msg = draw_important_message($objOrders->error, false);
}
$mode = 'view';
$title_action = 'Clean';
}
}
}
}
}
}
}
}
}
}
示例11: isset
$order_number = isset($_POST['order_number']) ? prepare_input($_POST['order_number']) : '';
if ($payment_method == 'paypal') {
$title_desc = _PAYPAL_ORDER;
} else {
if ($payment_method == '2co') {
$title_desc = _2CO_ORDER;
} else {
if ($payment_method == 'authorize') {
$title_desc = _AUTHORIZE_NET_ORDER;
} else {
$title_desc = _ONLINE_ORDER;
}
}
}
draw_title_bar(prepare_breadcrumbs(array(_MY_ACCOUNT => '', _CHECKOUT => '', $title_desc => '')), prepare_permanent_link('index.php?customer=advertise', _BUTTON_BACK));
// test mode alert
if (ModulesSettings::Get('payments', 'mode') == 'TEST MODE') {
draw_message(_TEST_MODE_ALERT_SHORT, true, true);
}
if ($task == "place_order") {
if (AdvertisePlans::PlaceOrder($order_number, $cc_params)) {
draw_success_message(_ORDER_PLACED_MSG);
} else {
draw_important_message(AdvertisePlans::$message);
}
} else {
draw_important_message(_WRONG_PARAMETER_PASSED);
}
} else {
draw_important_message(_NOT_AUTHORIZED);
}
示例12: defined
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
if ($objLogin->IsLoggedInAsAdmin() && $objLogin->HasPrivileges('edit_menus')) {
$act = isset($_POST['act']) ? prepare_input($_POST['act']) : '';
$mid = isset($_REQUEST['mid']) ? prepare_input($_REQUEST['mid']) : '';
$menu = new Menu($mid);
$msg = '';
// edit new menu catagory
if ($act == 'edit') {
$params = array();
$params['name'] = isset($_POST['name']) ? prepare_input($_POST['name']) : '';
$params['menu_placement'] = isset($_POST['menu_placement']) ? prepare_input($_POST['menu_placement']) : '';
$params['order'] = isset($_POST['order']) ? prepare_input($_POST['order']) : '';
$params['language_id'] = isset($_POST['language_id']) ? prepare_input($_POST['language_id']) : '';
$params['access_level'] = isset($_POST['access_level']) ? prepare_input($_POST['access_level']) : '';
if ($menu->MenuUpdate($params)) {
$msg = draw_success_message(_MENU_SAVED, false);
$objSession->SetMessage('notice', $msg);
header('location: index.php?admin=menus&language_id=' . $params['language_id']);
exit;
} else {
$msg = draw_important_message($menu->error, false);
}
}
if ($msg == '') {
$msg = draw_message(_ALERT_REQUIRED_FILEDS, false);
}
}
示例13: defined
* @author ApPHP <info@apphp.com>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
if ($objLogin->IsLoggedInAsCustomer()) {
$submit = isset($_POST['submit']) ? prepare_input($_POST['submit']) : '';
$msg = '';
$account_deleted = false;
if ($submit == 'remove') {
if (strtolower(SITE_MODE) == 'demo') {
$msg = draw_important_message(_OPERATION_BLOCKED, false);
} else {
if ($objLogin->RemoveAccount()) {
$msg = draw_success_message(_ACCOUNT_WAS_DELETED, false);
$account_deleted = true;
////////////////////////////////////////////////////////////////
send_email($objLogin->GetLoggedEmail(), $objSettings->GetParameter('admin_email'), 'account_deleted_by_user', array('{USER NAME}' => $objLogin->GetLoggedName()), $objLogin->GetPreferredLang());
////////////////////////////////////////////////////////////
$objSession->EndSession();
} else {
$msg = draw_important_message(_DELETING_ACCOUNT_ERROR, false);
}
}
}
draw_title_bar(prepare_breadcrumbs(array(_MY_ACCOUNT => '', _REMOVE_ACCOUNT => '')));
?>
<form action="index.php" method="post" id="frmLogout" style="display:inline; margin-top:0px; padding-top:0px;">
<?php
draw_hidden_field('submit_logout', 'logout');
示例14: draw_important_message
}
}
}
}
}
}
}
} else {
$msg = draw_important_message(str_replace('_COUNT_', $maximum_inquiries, _MAXIMUM_ALLOWED_INQUIRIES_PER_SESSION), false);
}
} else {
if ($act == 'location_reload') {
// currently do nothing
} else {
if ($act == 'inquiry_sent') {
$msg = draw_success_message(_INQUIRY_SENT_SUCCESS_MSG, false);
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Inquiry Form</title>
<link href="<?php
echo $host;
?>
templates/default/css/style.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php
示例15: defined
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
if ($objLogin->IsLoggedInAsAdmin() && $objLogin->HasPrivileges('add_menus')) {
$act = isset($_POST['act']) ? prepare_input($_POST['act']) : '';
$mid = isset($_POST['mid']) ? prepare_input($_POST['mid']) : '';
$language_id = isset($_POST['language_id']) ? prepare_input($_POST['language_id']) : Languages::GetDefaultLang();
$menu = new Menu($mid);
$msg = '';
// add new menu catagory
if ($act == 'add') {
$params = array();
$params['name'] = isset($_POST['name']) ? prepare_input($_POST['name']) : '';
$params['menu_placement'] = isset($_POST['menu_placement']) ? prepare_input($_POST['menu_placement']) : '';
$params['order'] = isset($_POST['order']) ? prepare_input($_POST['order']) : '';
$params['language_id'] = isset($_POST['language_id']) ? prepare_input($_POST['language_id']) : '';
$params['access_level'] = isset($_POST['access_level']) ? prepare_input($_POST['access_level']) : '';
if ($menu->MenuCreate($params)) {
$msg = draw_success_message(_MENU_CREATED, false);
$objSession->SetMessage('notice', $msg);
header('location: index.php?admin=menus');
exit;
} else {
$msg = draw_important_message($menu->error, false);
}
}
if ($msg == '') {
$msg = draw_message(_ALERT_REQUIRED_FILEDS, false);
}
}