• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP prepare_input函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中prepare_input函数的典型用法代码示例。如果您正苦于以下问题:PHP prepare_input函数的具体用法?PHP prepare_input怎么用?PHP prepare_input使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了prepare_input函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: __construct

 function __construct()
 {
     $this->ipAddressBlocked = false;
     $this->emailBlocked = false;
     $this->loginError = '';
     $submit_login = isset($_POST['submit_login']) ? prepare_input($_POST['submit_login']) : '';
     $submit_logout = isset($_POST['submit_logout']) ? prepare_input($_POST['submit_logout']) : '';
     $user_name = isset($_POST['user_name']) ? prepare_input($_POST['user_name'], true) : '';
     $password = isset($_POST['password']) ? prepare_input($_POST['password'], true) : '';
     $this->accountType = isset($_POST['type']) ? prepare_input($_POST['type']) : 'customer';
     $remember_me = isset($_POST['remember_me']) ? prepare_input($_POST['remember_me']) : '';
     $this->wrongLogin = false;
     if (!$this->IsLoggedIn()) {
         if ($submit_login == 'login') {
             if (empty($user_name) || empty($password)) {
                 if (isset($_POST['user_name']) && empty($user_name)) {
                     $this->loginError = '_USERNAME_EMPTY_ALERT';
                 } else {
                     if (isset($_POST['password']) && empty($password)) {
                         $this->loginError = '_WRONG_LOGIN';
                     }
                 }
                 $this->wrongLogin = true;
             } else {
                 $this->DoLogin($user_name, $password, $remember_me);
             }
         }
     } else {
         if ($submit_logout == 'logout') {
             $this->DoLogout();
         }
     }
     $this->activeMenuCount = 0;
 }
开发者ID:mozdial,项目名称:Directory,代码行数:34,代码来源:Login.class.php


示例2: __construct

    function __construct($id = '')
    {
        $this->id = $id;
        $this->languageId = isset($_REQUEST['language_id']) && $_REQUEST['language_id'] != '' ? prepare_input($_REQUEST['language_id']) : Languages::GetDefaultLang();
        $this->whereClause = '';
        $this->whereClause .= $this->languageId != '' ? ' AND language_id = \'' . $this->languageId . '\'' : '';
        $this->langIdByUrl = $this->languageId != '' ? '&language_id=' . $this->languageId : '';
        if ($this->id != '') {
            $sql = 'SELECT
						' . TABLE_MENUS . '.*,
						' . TABLE_LANGUAGES . '.lang_name as language_name
					FROM ' . TABLE_MENUS . '
						LEFT OUTER JOIN ' . TABLE_LANGUAGES . ' ON ' . TABLE_MENUS . '.language_id = ' . TABLE_LANGUAGES . '.abbreviation
					WHERE ' . TABLE_MENUS . '.id = \'' . (int) $this->id . '\'';
            $this->menu = database_query($sql, DATA_ONLY, FIRST_ROW_ONLY);
        } else {
            $this->menu['menu_name'] = '';
            $this->menu['menu_placement'] = '';
            $this->menu['menu_order'] = '';
            $this->menu['language_id'] = '';
            $this->menu['language_name'] = '';
            $this->menu['access_level'] = '';
        }
    }
开发者ID:mozdial,项目名称:Directory,代码行数:24,代码来源:Menu.class.php


示例3: __construct

 function __construct()
 {
     // get filter value
     $this->filterBy = isset($_REQUEST['filter_by']) ? prepare_input($_REQUEST['filter_by']) : '';
     $this->filterByUrl = $this->filterBy != '' ? '&filter_by=' . $this->filterBy : '';
     $this->languageId = isset($_REQUEST['language_id']) && $_REQUEST['language_id'] != '' ? prepare_input($_REQUEST['language_id']) : Languages::GetDefaultLang();
     $this->langIdByUrl = $this->languageId != '' ? '&language_id=' . $this->languageId : '';
     $this->whereClause = '';
     $this->whereClause .= $this->languageId != '' ? ' AND language_id = \'' . $this->languageId . '\'' : '';
     $this->whereClause .= $this->filterBy != '' ? ' AND key_value LIKE \'_' . $this->filterBy . '%\'' : '';
     $this->isKeyUpdated = false;
     $this->vocabularySize = 0;
     $this->currentKey = '';
     $this->updatedKeys = '0';
 }
开发者ID:mozdial,项目名称:Directory,代码行数:15,代码来源:Vocabulary.class.php


示例4: prepare_input

function prepare_input(&$var)
{
    if (is_array($var)) {
        foreach ($var as $key => $value) {
            prepare_input($var[$key]);
        }
    } else {
        if (get_magic_quotes_gpc()) {
            $var = stripslashes($var);
        }
        $var = str_replace("\r\n", "\n", $var);
        //windows linefeeds
        $var = str_replace("\r", "\n", $var);
        //mac linefeeds
    }
}
开发者ID:jefffederman,项目名称:pokersource,代码行数:16,代码来源:Qpoker.php


示例5: __construct

    function __construct($login_type = '')
    {
        parent::__construct();
        global $objSettings;
        $this->params = array();
        if (isset($_POST['first_name'])) {
            $this->params['first_name'] = prepare_input($_POST['first_name']);
        }
        if (isset($_POST['last_name'])) {
            $this->params['last_name'] = prepare_input($_POST['last_name']);
        }
        if (isset($_POST['user_name'])) {
            $this->params['user_name'] = prepare_input($_POST['user_name']);
        }
        if (isset($_POST['password'])) {
            $this->params['password'] = prepare_input($_POST['password']);
        }
        if (isset($_POST['email'])) {
            $this->params['email'] = prepare_input($_POST['email']);
        }
        if (isset($_POST['preferred_language'])) {
            $this->params['preferred_language'] = prepare_input($_POST['preferred_language']);
        }
        if (isset($_POST['account_type'])) {
            $this->params['account_type'] = prepare_input($_POST['account_type']);
        }
        if (isset($_POST['date_created'])) {
            $this->params['date_created'] = prepare_input($_POST['date_created']);
        }
        if (isset($_POST['is_active'])) {
            $this->params['is_active'] = (int) $_POST['is_active'];
        } else {
            $this->params['is_active'] = '0';
        }
        if (self::$PROJECT == 'HotelSite') {
            if (isset($_POST['hotels'])) {
                $this->params['hotels'] = prepare_input($_POST['hotels']);
            }
        }
        $this->primaryKey = 'id';
        $this->tableName = TABLE_ACCOUNTS;
        $this->dataSet = array();
        $this->error = '';
        $this->formActionURL = 'index.php?admin=admins_management';
        $this->actions = array('add' => true, 'edit' => true, 'details' => true, 'delete' => true);
        $this->actionIcons = true;
        $this->allowRefresh = true;
        $this->allowLanguages = false;
        if ($login_type == 'owner') {
            $this->WHERE_CLAUSE = 'WHERE (' . TABLE_ACCOUNTS . '.account_type = \'mainadmin\' || ' . TABLE_ACCOUNTS . '.account_type = \'admin\' || ' . TABLE_ACCOUNTS . '.account_type = \'hotelowner\')';
        } else {
            if ($login_type == 'mainadmin') {
                $this->WHERE_CLAUSE = 'WHERE (' . TABLE_ACCOUNTS . '.account_type = \'admin\' || ' . TABLE_ACCOUNTS . '.account_type = \'hotelowner\')';
            } else {
                if ($login_type == 'admin') {
                    $this->WHERE_CLAUSE = 'WHERE ' . TABLE_ACCOUNTS . '.account_type = \'admin\'';
                } else {
                    if ($login_type == 'hotelowner') {
                        $this->WHERE_CLAUSE = 'WHERE ' . TABLE_ACCOUNTS . '.account_type = \'hotelowner\'';
                    }
                }
            }
        }
        $this->ORDER_CLAUSE = 'ORDER BY id ASC';
        $this->isAlterColorsAllowed = true;
        $this->isPagingAllowed = true;
        $this->pageSize = 20;
        $this->isSortingAllowed = true;
        $this->isFilteringAllowed = true;
        // define filtering fields
        $this->arrFilteringFields = array(_FIRST_NAME => array('table' => $this->tableName, 'field' => 'first_name', 'type' => 'text', 'sign' => 'like%', 'width' => '80px'), _LAST_NAME => array('table' => $this->tableName, 'field' => 'last_name', 'type' => 'text', 'sign' => 'like%', 'width' => '80px'), _ACTIVE => array('table' => $this->tableName, 'field' => 'is_active', 'type' => 'dropdownlist', 'source' => array('0' => _NO, '1' => _YES), 'sign' => '=', 'width' => '85px'));
        // prepare languages array
        $total_languages = Languages::GetAllActive();
        $arr_languages = array();
        foreach ($total_languages[0] as $key => $val) {
            $arr_languages[$val['abbreviation']] = $val['lang_name'];
        }
        $arr_account_types = array('admin' => _ADMIN, 'mainadmin' => _MAIN_ADMIN);
        if (self::$PROJECT == 'HotelSite') {
            $arr_account_types['hotelowner'] = _HOTEL_OWNER;
        }
        $arr_is_active = array('0' => '<span class=no>' . _NO . '</span>', '1' => '<span class=yes>' . _YES . '</span>');
        $datetime_format = get_datetime_format();
        if (self::$PROJECT == 'HotelSite') {
            $total_hotels = Hotels::GetAllActive();
            $arr_hotels = array();
            foreach ($total_hotels[0] as $key => $val) {
                $this->arrCompanies[$val['id']] = $val['name'];
            }
            $this->additionalFields = ', hotels';
            $this->accountTypeOnChange = 'onchange="javascript:AccountType_OnChange(this.value)"';
        }
        if ($objSettings->GetParameter('date_format') == 'mm/dd/yyyy') {
            $this->sqlFieldDatetimeFormat = '%b %d, %Y %H:%i';
        } else {
            $this->sqlFieldDatetimeFormat = '%d %b, %Y %H:%i';
        }
        $this->SetLocale(Application::Get('lc_time_name'));
        //----------------------------------------------------------------------
        // VIEW MODE
//.........这里部分代码省略.........
开发者ID:mozdial,项目名称:Directory,代码行数:101,代码来源:AdminsAccounts.class.php


示例6: __construct

    function __construct()
    {
        parent::__construct();
        $this->params = array();
        ## for standard fields
        if (isset($_POST['name'])) {
            $this->params['name'] = prepare_input($_POST['name']);
        }
        if (isset($_POST['is_active'])) {
            $this->params['is_active'] = (int) $_POST['is_active'];
        }
        // $this->params['language_id'] 	  = MicroGrid::GetParameter('language_id');
        $this->primaryKey = 'id';
        $this->tableName = TABLE_LISTINGS_LOCATIONS;
        $this->dataSet = array();
        $this->error = '';
        $this->formActionURL = 'index.php?admin=mod_listings_locations';
        $this->actions = array('add' => true, 'edit' => true, 'details' => true, 'delete' => true);
        $this->actionIcons = true;
        $this->allowRefresh = true;
        $this->allowLanguages = false;
        //$this->languageId  	= ($this->params['language_id'] != '') ? $this->params['language_id'] : Languages::GetDefaultLang();
        $this->WHERE_CLAUSE = '';
        // WHERE .... / 'WHERE language_id = \''.$this->languageId.'\'';
        $this->ORDER_CLAUSE = 'ORDER BY name ASC';
        // ORDER BY '.$this->tableName.'.date_created DESC
        $this->isAlterColorsAllowed = true;
        $this->isPagingAllowed = true;
        $this->pageSize = 30;
        $this->isSortingAllowed = true;
        $this->isFilteringAllowed = true;
        $arr_default_types = array('0' => _NO, '1' => _YES);
        $arr_activity_types = array('0' => _NO, '1' => _YES);
        // define filtering fields
        $this->arrFilteringFields = array(_NAME => array('table' => $this->tableName, 'field' => 'name', 'type' => 'text', 'sign' => 'like%', 'width' => '100px'), _ACTIVE => array('table' => $this->tableName, 'field' => 'is_active', 'type' => 'dropdownlist', 'source' => $arr_activity_types, 'sign' => '=', 'width' => '90px', 'visible' => true));
        //----------------------------------------------------------------------
        // VIEW MODE
        //----------------------------------------------------------------------
        $this->VIEW_MODE_SQL = 'SELECT ' . $this->primaryKey . ',
									name,
									CONCAT("<a href=index.php?admin=mod_listings_sub_locations&lid=", ' . $this->tableName . '.' . $this->primaryKey . ',
										">[ ", "' . _SUB_LOCATIONS . ' ]</a> (",
										(SELECT COUNT(*) FROM ' . TABLE_LISTINGS_SUB_LOCATIONS . ' sl WHERE sl.location_id = ' . $this->tableName . '.' . $this->primaryKey . '),
										")") as link_sub_locations,
									IF(is_active, \'<span class=yes>' . _YES . '</span>\', \'<span class=no>' . _NO . '</span>\') as mod_is_active
								FROM ' . $this->tableName;
        // define view mode fields
        $this->arrViewModeFields = array('name' => array('title' => _NAME, 'type' => 'label', 'align' => 'left', 'width' => '', 'height' => '', 'maxlength' => ''), 'mod_is_active' => array('title' => _ACTIVE, 'type' => 'label', 'align' => 'center', 'width' => '110px', 'height' => '', 'maxlength' => ''), 'link_sub_locations' => array('title' => '', 'type' => 'label', 'align' => 'left', 'width' => '160px', 'maxlength' => '', 'visible' => true));
        //----------------------------------------------------------------------
        // ADD MODE
        // Validation Type: alpha|numeric|float|alpha_numeric|text|email
        // Validation Sub-Type: positive (for numeric and float)
        // Ex.: 'validation_type'=>'numeric', 'validation_type'=>'numeric|positive'
        //----------------------------------------------------------------------
        // define add mode fields
        $this->arrAddModeFields = array('name' => array('title' => _NAME, 'type' => 'textbox', 'width' => '210px', 'required' => true, 'readonly' => false, 'maxlength' => '50', 'default' => '', 'validation_type' => 'text'), 'is_active' => array('title' => _ACTIVE, 'type' => 'enum', 'required' => true, 'width' => '90px', 'readonly' => false, 'default' => '1', 'source' => $arr_activity_types, 'unique' => false, 'javascript_event' => ''));
        //----------------------------------------------------------------------
        // EDIT MODE
        // Validation Type: alpha|numeric|float|alpha_numeric|text|email
        // Validation Sub-Type: positive (for numeric and float)
        // Ex.: 'validation_type'=>'numeric', 'validation_type'=>'numeric|positive'
        //----------------------------------------------------------------------
        $this->EDIT_MODE_SQL = 'SELECT
								' . $this->tableName . '.' . $this->primaryKey . ',
								' . $this->tableName . '.name,
								' . $this->tableName . '.is_active,
								IF(is_active, \'<span class=yes>' . _YES . '</span>\', \'<span class=no>' . _NO . '</span>\') as mod_is_active
							FROM ' . $this->tableName . '
							WHERE ' . $this->tableName . '.' . $this->primaryKey . ' = _RID_';
        // define edit mode fields
        $this->arrEditModeFields = array('name' => array('title' => _NAME, 'type' => 'textbox', 'width' => '210px', 'required' => true, 'readonly' => false, 'maxlength' => '50', 'default' => '', 'validation_type' => 'text'), 'is_active' => array('title' => _ACTIVE, 'type' => 'enum', 'required' => true, 'width' => '90px', 'readonly' => false, 'default' => '1', 'source' => $arr_activity_types, 'unique' => false, 'javascript_event' => ''));
        //----------------------------------------------------------------------
        // DETAILS MODE
        //----------------------------------------------------------------------
        $this->DETAILS_MODE_SQL = $this->EDIT_MODE_SQL;
        $this->arrDetailsModeFields = array('name' => array('title' => _NAME, 'type' => 'label'), 'mod_is_active' => array('title' => _ACTIVE, 'type' => 'label'));
    }
开发者ID:mozdial,项目名称:Directory,代码行数:77,代码来源:ListingsLocations.class.php


示例7: defined

<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <[email protected]>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
$mg_language_id = isset($_REQUEST['mg_language_id']) ? prepare_input($_REQUEST['mg_language_id']) : Application::Get('lang');
if ($objLogin->IsLoggedInAsAdmin()) {
    $objPage = new Pages(Application::Get('page_id'), false, $mg_language_id);
} else {
    $objPage = new Pages(Application::Get('system_page') != '' ? Application::Get('system_page') : Application::Get('page_id'), true, $mg_language_id);
}
$button_text = '';
// check if there is a page
if ($objSession->IsMessage('notice')) {
    draw_title_bar(_PAGE);
    echo $objSession->GetMessage('notice');
} else {
    if ($objPage->CheckAccessRights($objLogin->IsLoggedIn())) {
        // check if there is a page
        if ($objPage->GetId() != '') {
            if ($objLogin->IsLoggedInAsAdmin() && Application::Get('preview') != 'yes') {
                $button_text = prepare_permanent_link('index.php?admin=pages' . (Application::Get('type') == 'system' ? '&type=system' : '') . '&mg_language_id=' . $mg_language_id, _BUTTON_BACK);
            }
            $objPage->DrawTitle($button_text);
            if (Modules::IsModuleInstalled('adsense') && (ModulesSettings::Get('adsense', 'adsense_code_activation') == 'All' || ModulesSettings::Get('adsense', 'adsense_code_activation') == 'Horizontal')) {
开发者ID:mozdial,项目名称:Directory,代码行数:31,代码来源:pages.php


示例8: defined

<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2012 ApPHP
* @author ApPHP <[email protected]>
* @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') {
开发者ID:mozdial,项目名称:Directory,代码行数:31,代码来源:resend_activation.php


示例9: prepare_input

if (!empty($_POST) && isset($_POST['shippay'])) {
    $email_info = prepare_input($_POST['email_info']);
    $phone = prepare_input($_POST['phone']);
    $ship_address1 = prepare_input($_POST['ship_address1']);
    $ship_address2 = prepare_input($_POST['ship_address2']);
    $ship_city = prepare_input($_POST['ship_city']);
    $ship_state = prepare_input($_POST['ship_state']);
    $ship_postalcode = prepare_input($_POST['ship_postalcode']);
    $sameBilling = prepare_input($_POST['sameBilling']);
    $bill_address1 = $sameBilling == "1" ? $ship_address1 : prepare_input($_POST['bill_address1']);
    $bill_address2 = $sameBilling == "1" ? $ship_address2 : prepare_input($_POST['bill_address2']);
    $bill_city = $sameBilling == "1" ? $ship_city : prepare_input($_POST['bill_city']);
    $bill_state = $sameBilling == "1" ? $ship_state : prepare_input($_POST['bill_state']);
    $bill_postalcode = $sameBilling == "1" ? $ship_postalcode : prepare_input($_POST['bill_postalcode']);
    $paytype = prepare_input($_POST['paytype']);
    $sess_orderID = prepare_input($_POST["currOrderId"]);
    $_SESSION['orderStatus'] = $sess_orderStatus = "review";
    //update orders table with these values.
    //run the update query for the $pieceid.
    $updQuery1 = "UPDATE `orders` SET `status` = ?, `paymenttype` = ?, `shippingaddress1` = ?, `shippingaddress2` = ?, `shippingstate` = ?, `shippingcity` = ?, `shippingpostal` = ?, `billingaddress1` = ?, `billingaddress2` = ?, `billingcity` = ?, `billingstate` = ?, `billingpostal` = ?, `useremail`= ?, `phone`= ?  WHERE `orders`.`orderid` = {$sess_orderID} ";
    $stmt = $dbcon->prepare($updQuery1);
    $stmt->bind_param('ssssssssssssss', $sess_orderStatus, $paytype, $ship_address1, $ship_address2, $ship_state, $ship_city, $ship_postalcode, $bill_address1, $bill_address2, $bill_state, $bill_city, $bill_postalcode, $email_info, $phone);
    if (!$stmt->execute()) {
        die('Error : (' . $dbcon->errno . ') ' . $dbcon->error);
    }
    $stmt->close();
    $shipAddressStr = $ship_address1 . ", <br>";
    if (!empty($ship_address2)) {
        $shipAddressStr .= $ship_address2 . ", <br>";
    }
    $shipAddressStr .= $ship_city . ", " . $ship_state . ", India <br>";
开发者ID:Jasabd,项目名称:Plumms,代码行数:31,代码来源:orders.php


示例10: isset

 $INSTALL_OS_TYPE_INFO = $INSTALL_EMAIL_ADDRESS_INFO = $INSTALL_SITE_NAME_INFO = '';
 $INSTALL_EMAIL_PASSWORD_INFO = $INSTALL_HELPDESK_MAILSERVER_INFO = $INSTALL_SEO_URLS_INFO = '';
 if (file_exists(FILE_TMP_CONFIG)) {
     @unlink(FILE_TMP_CONFIG);
 }
 if ($action == 'config') {
     break;
 }
 $error = false;
 $INSTALL_TEMPLATE = isset($_POST['TEMPLATE']) ? prepare_input($_POST['TEMPLATE']) : DEFAULT_TEMPLATE;
 $INSTALL_OS_TYPE = isset($_POST['INSTALL_OS_TYPE']) ? (int) $_POST['INSTALL_OS_TYPE'] : 0;
 $INSTALL_SEO_URLS = isset($_POST['INSTALL_SEO_URLS']) ? 1 : 0;
 $INSTALL_EMAIL_ADDRESS = isset($_POST['INSTALL_EMAIL_ADDRESS']) ? prepare_input($_POST['INSTALL_EMAIL_ADDRESS']) : '';
 $INSTALL_EMAIL_PASSWORD = isset($_POST['INSTALL_EMAIL_PASSWORD']) ? prepare_input($_POST['INSTALL_EMAIL_PASSWORD']) : '';
 $INSTALL_SITE_NAME = isset($_POST['INSTALL_SITE_NAME']) ? prepare_input($_POST['INSTALL_SITE_NAME']) : '';
 $INSTALL_HELPDESK_MAILSERVER = isset($_POST['INSTALL_HELPDESK_MAILSERVER']) ? prepare_input($_POST['INSTALL_HELPDESK_MAILSERVER']) : '';
 if (empty($INSTALL_EMAIL_ADDRESS)) {
     $INSTALL_EMAIL_ADDRESS_INFO = ERROR_EMAIL_ADDRESS;
     $error = true;
 }
 if (empty($INSTALL_SITE_NAME)) {
     $INSTALL_SITE_NAME_INFO = ERROR_SITE_NAME;
     $error = true;
 }
 $contents = '';
 read_contents(FILE_TMP_FRONT_SERVER, $contents);
 eval($contents);
 $templates_array = array();
 $dir_array = array_filter(glob('templates/' . '*'), 'is_dir');
 $template_found = false;
 foreach ($dir_array as $key => $value) {
开发者ID:enigma1,项目名称:i-metrics-cms,代码行数:31,代码来源:index.php


示例11: array

 $params_tab3 = array();
 $params_tab3['date_format'] = isset($_POST['date_format']) ? prepare_input($_POST['date_format']) : $objSettings->GetParameter('date_format');
 $params_tab3['time_zone'] = isset($_POST['time_zone']) ? prepare_input($_POST['time_zone']) : $objSettings->GetParameter('time_zone');
 $params_tab3["price_format"] = isset($_POST['price_format']) ? prepare_input($_POST['price_format']) : $objSettings->GetParameter("price_format");
 $params_tab4 = array();
 $params_tab4['mailer'] = isset($_POST['mailer']) ? prepare_input($_POST['mailer']) : $objSettings->GetParameter('mailer');
 $params_tab4['admin_email'] = isset($_POST['admin_email']) ? prepare_input($_POST['admin_email']) : $objSettings->GetParameter('admin_email');
 $params_tab4['mailer_type'] = isset($_POST['mailer_type']) ? prepare_input($_POST['mailer_type']) : $objSettings->GetParameter('mailer_type');
 $params_tab4['smtp_host'] = isset($_POST['smtp_host']) ? prepare_input($_POST['smtp_host']) : $objSettings->GetParameter('smtp_host');
 $params_tab4['smtp_port'] = isset($_POST['smtp_port']) ? prepare_input($_POST['smtp_port']) : $objSettings->GetParameter('smtp_port');
 $params_tab4['smtp_username'] = isset($_POST['smtp_username']) ? prepare_input($_POST['smtp_username']) : $objSettings->GetParameter('smtp_username');
 $params_tab4['smtp_password'] = isset($_POST['smtp_password']) ? prepare_input($_POST['smtp_password']) : $objSettings->GetParameter('smtp_password');
 $params_cron = array();
 $params_cron['cron_type'] = isset($_POST['cron_type']) ? prepare_input($_POST['cron_type']) : $objSettings->GetParameter('cron_type');
 $params_cron['cron_run_period'] = isset($_POST['cron_run_period']) ? prepare_input($_POST['cron_run_period']) : $objSettings->GetParameter('cron_run_period');
 $params_cron['cron_run_period_value'] = isset($_POST['cron_run_period_value']) ? prepare_input($_POST['cron_run_period_value']) : $objSettings->GetParameter('cron_run_period_value');
 // SAVE CHANGES
 if ($submition_type == 'general') {
     if (strlen($params['offline_message']) > 255) {
         $msg_text = str_replace('_FIELD_', '<b>' . _OFFLINE_MESSAGE . '</b>', _FIELD_LENGTH_ALERT);
         $msg_text = str_replace('_LENGTH_', '255', $msg_text);
         $msg = draw_important_message($msg_text, false);
         $focus_on_field = 'offline_message';
     } else {
         if ($objSettings->UpdateFields($params) == true) {
             $msg = draw_success_message(_SETTINGS_SAVED, false);
         } else {
             $msg = draw_important_message($objSettings->error, false);
         }
     }
 } else {
开发者ID:mozdial,项目名称:Directory,代码行数:31,代码来源:handler_settings.php


示例12: defined

<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <[email protected]>
* @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', 'mainadmin')) {
    $file = isset($_GET['file']) ? prepare_input($_GET['file']) : '';
    if ($file == 'export.csv') {
        $file_path = 'tmp/export/' . $file;
        header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
        // Date in the past
        header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
        // always modified
        header('Cache-Control: no-cache, must-revalidate');
        // HTTP/1.1
        header('Pragma: no-cache');
        // HTTP/1.0
        header('Content-type: application/force-download');
        header('Content-Disposition: inline; filename="' . $file . '"');
        header('Content-Transfer-Encoding: binary');
        header('Content-length: ' . filesize($file_path));
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename="' . $file . '"');
        readfile($file_path);
        exit(0);
开发者ID:mozdial,项目名称:Directory,代码行数:31,代码来源:export.php


示例13: isset

 }
 if (substr($imagebasedir, -1, 1) != '/' && $imagebasedir != '') {
     $imagebasedir = $imagebasedir . '/';
 }
 $leadon = $imagebasedir;
 if ($leadon == '.') {
     $leadon = '';
 }
 if (substr($leadon, -1, 1) != '/' && $leadon != '') {
     $leadon = $leadon . '/';
 }
 $startdir = $leadon;
 $file = isset($_GET['file']) ? prepare_input($_GET['file']) : "";
 $get_dir = isset($_GET['dir']) ? prepare_input($_GET['dir']) : "";
 $get_sort = isset($_GET['sort']) ? prepare_input($_GET['sort']) : "";
 $get_order = isset($_GET['order']) ? prepare_input($_GET['order']) : "";
 $dotdotdir = "";
 $dirok = false;
 $basedir = "";
 // delete image from gallery
 if ($allowuploads) {
     if (!$is_demo) {
         @unlink($leadon . $file);
     }
 }
 if ($get_dir) {
     $dir = base64_decode($get_dir);
     if (substr($dir, -1, 1) != '/') {
         $dir = $dir . '/';
     }
     $dirok = true;
开发者ID:mozdial,项目名称:Directory,代码行数:31,代码来源:select_image.php


示例14: AfterInsertRecord

    /**
     * After-insertion function
     */
    public function AfterInsertRecord()
    {
        $name = isset($_POST['descr_name']) ? prepare_input($_POST['descr_name']) : '';
        $description = isset($_POST['descr_description']) ? prepare_input($_POST['descr_description']) : '';
        // languages array
        $total_languages = Languages::GetAllActive();
        foreach ($total_languages[0] as $key => $val) {
            $sql = 'INSERT INTO ' . TABLE_CATEGORIES_DESCRIPTION . '(
						id, category_id, language_id, name, description)
					VALUES(
						NULL, ' . $this->lastInsertId . ', \'' . $val['abbreviation'] . '\', \'' . $name . '\', \'' . $description . '\'
					)';
            if (!database_void_query($sql)) {
                // error
            }
        }
    }
开发者ID:mozdial,项目名称:Directory,代码行数:20,代码来源:Categories.class.php


示例15: defined

<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <[email protected]>
* @license http://www.gnu.org/licenses/
*/
// *** Make sure the file isn't accessed directly
defined('APPHP_EXEC') or die('Restricted Access');
//--------------------------------------------------------------------------
$task = isset($_POST['task']) ? prepare_input($_POST['task']) : '';
$keyword = isset($_POST['keyword']) ? strip_tags(prepare_input($_POST['keyword'])) : '';
if ($keyword == _SEARCH_KEYWORDS . '...') {
    $keyword = '';
}
$p = isset($_POST['p']) ? (int) $_POST['p'] : '';
$objSearch = new Search();
$search_result = '';
$title_bar = _LOOK_IN . ': 
		<select class="look_in" name="search_in" onchange="javascript:document.getElementById(\'search_in\').value=this.value;appQuickSearch();">
			<option value="listings" ' . (Application::Get('search_in') == 'listings' ? 'selected="selected"' : '') . '>' . _LISTINGS . '</option>
			<option value="pages" ' . (Application::Get('search_in') == 'pages' ? 'selected="selected"' : '') . '>' . _PAGES . '</option>
			<option value="news" ' . (Application::Get('search_in') == 'news' ? 'selected="selected"' : '') . '>' . _NEWS . '</option>
		</select>';
// Check if there is a page
if ($keyword != '') {
    draw_title_bar(_SEARCH_RESULT_FOR . ': ' . $keyword . '', $title_bar);
    if ($task == 'quick_search') {
        $search_result = $objSearch->SearchBy($keyword, $p, Application::Get('search_in'));
    }
开发者ID:mozdial,项目名称:Directory,代码行数:31,代码来源:search.php


示例16: __construct

    function __construct($customer_id = '')
    {
        global $objLogin;
        $this->SetRunningTime();
        $this->params = array();
        if (isset($_POST['status'])) {
            $this->params['status'] = prepare_input($_POST['status']);
        }
        if (isset($_POST['status_changed'])) {
            $this->params['status_changed'] = prepare_input($_POST['status_changed']);
        }
        if (isset($_POST['additional_info'])) {
            $this->params['additional_info'] = prepare_input($_POST['additional_info']);
        }
        $this->currencyFormat = get_currency_format();
        $this->params['language_id'] = MicroGrid::GetParameter('language_id');
        $rid = MicroGrid::GetParameter('rid');
        $this->primaryKey = 'id';
        $this->tableName = TABLE_ORDERS;
        $this->dataSet = array();
        $this->error = '';
        $this->order_number = '';
        $this->order_status = '';
        $this->order_customer_id = '';
        $this->order_listings = '';
        $this->order_advertise_plan_id = '';
        $arr_statuses = array('0' => _PREPARING, '1' => _PENDING, '2' => _PAID, '3' => _COMPLETED, '4' => _REFUNDED);
        $arr_statuses_edit = array('1' => _PENDING, '2' => _PAID, '3' => _COMPLETED, '4' => _REFUNDED);
        $arr_statuses_edit_cut = array('1' => _PENDING, '2' => _PAID, '3' => _COMPLETED);
        $arr_statuses_refund = array('4' => _REFUNDED);
        $arr_statuses_customer_edit = array('4' => '');
        if ($customer_id != '') {
            $this->customer_id = $customer_id;
            $this->page = 'customer=my_orders';
            $this->actions = array('add' => false, 'edit' => false, 'details' => false, 'delete' => false);
        } else {
            $this->customer_id = '';
            $this->page = 'admin=mod_payments_orders';
            $this->actions = array('add' => false, 'edit' => false, 'details' => false, 'delete' => $objLogin->IsLoggedInAs('owner') ? true : false);
        }
        $this->actionIcons = true;
        $this->allowRefresh = true;
        $this->formActionURL = 'index.php?' . $this->page;
        $this->allowLanguages = false;
        $this->languageId = '';
        // ($this->params['language_id'] != '') ? $this->params['language_id'] : Languages::GetDefaultLang();
        $this->WHERE_CLAUSE = 'WHERE 1=1';
        if ($customer_id != '') {
            $this->WHERE_CLAUSE = 'WHERE ' . $this->tableName . '.status != 0 AND ' . $this->tableName . '.customer_id = ' . (int) $customer_id;
        }
        $this->ORDER_CLAUSE = 'ORDER BY ' . $this->tableName . '.id DESC';
        // ORDER BY date_created DESC
        $this->isAlterColorsAllowed = true;
        $this->isPagingAllowed = true;
        $this->pageSize = 30;
        $this->isSortingAllowed = true;
        $datetime_format = get_datetime_format();
        $date_format = get_date_format();
        $date_format_settings = get_date_format('view', true);
        $this->currency_format = get_currency_format();
        $pre_currency_symbol = Application::Get('currency_symbol_place') == 'left' ? Application::Get('currency_symbol') : '';
        $post_currency_symbol = Application::Get('currency_symbol_place') == 'right' ? Application::Get('currency_symbol') : '';
        $this->collect_credit_card = ModulesSettings::Get('payments', 'online_collect_credit_card');
        $this->isFilteringAllowed = true;
        // define filtering fields
        $this->arrFilteringFields = array(_ORDER_NUMBER => array('table' => $this->tableName, 'field' => 'order_number', 'type' => 'text', 'sign' => 'like%', 'width' => '70px'), _DATE => array('table' => $this->tableName, 'field' => 'payment_date', 'type' => 'calendar', 'date_format' => $date_format_settings, 'sign' => 'like%', 'width' => '80px', 'visible' => true));
        if ($this->customer_id == '') {
            $this->arrFilteringFields[_CUSTOMER] = array('table' => TABLE_CUSTOMERS, 'field' => 'user_name', 'type' => 'text', 'sign' => 'like%', 'width' => '70px');
        }
        $this->arrFilteringFields[_STATUS] = array('table' => $this->tableName, 'field' => 'status', 'type' => 'dropdownlist', 'source' => $arr_statuses_edit, 'sign' => '=', 'width' => '');
        //----------------------------------------------------------------------
        // VIEW MODE
        //----------------------------------------------------------------------
        $this->VIEW_MODE_SQL = 'SELECT
								' . $this->tableName . '.' . $this->primaryKey . ',
								' . $this->tableName . '.order_number,
								' . $this->tableName . '.order_description,
								' . $this->tableName . '.order_price,
								' . $this->tableName . '.total_price,
								CONCAT(' . TABLE_CURRENCIES . '.symbol, "", ' . $this->tableName . '.total_price) as mod_total_price,
								' . $this->tableName . '.currency,
								' . $this->tableName . '.advertise_plan_id,
								' . $this->tableName . '.listings_amount,
								' . $this->tableName . '.customer_id,
								' . $this->tableName . '.transaction_number,
								' . $this->tableName . '.created_date,
								' . $this->tableName . '.payment_date,
								' . $this->tableName . '.payment_type,
								' . $this->tableName . '.payment_method,
								' . $this->tableName . '.status,
								' . $this->tableName . '.status_changed,
								CASE
									WHEN ' . $this->tableName . '.payment_type = 0 THEN "' . _ONLINE_ORDER . '"
									WHEN ' . $this->tableName . '.payment_type = 1 THEN "' . _PAYPAL . '"
									WHEN ' . $this->tableName . '.payment_type = 2 THEN "2CO"
									WHEN ' . $this->tableName . '.payment_type = 3 THEN "Authorize.Net"
									ELSE "' . _UNKNOWN . '"
								END as m_payment_type,
								CASE
									WHEN ' . $this->tableName . '.payment_method = 0 THEN "' . _PAYMENT_COMPANY_ACCOUNT . '"
//.........这里部分代码省略.........
开发者ID:mozdial,项目名称:Directory,代码行数:101,代码来源:Orders.class.php


示例17: DrawInquiryForm

 /**
  *	Draws inquiry form
  *		@param $params
  *		@param $draw
  */
 public static function DrawInquiryForm($params, $draw = true)
 {
     $output = '';
     $inquiry_category = isset($params['inquiry_category']) ? prepare_input($params['inquiry_category']) : '';
     $widget = isset($params['widget']) ? prepare_input($params['widget']) : '';
     $widget_host = isset($params['widget_host']) ? prepare_input($params['widget_host']) : '';
     $widget_key = isset($params['widget_key']) ? prepare_input($params['widget_key']) : '';
     // prepare categories array
     $objCategories = Categories::Instance();
     $total_categories = $objCategories->GetAllExistingCategories();
     $arr_categories = array();
     foreach ($total_categories as $key => $val) {
         if ($val['level'] == '1') {
             $arr_categories[$val['id']] = $val['name'];
         } else {
             if ($val['level'] == '2') {
                 $arr_categories[$val['id']] = '&nbsp;&nbsp;&bull; ' . $val['name'];
             } else {
                 if ($val['level'] == '3') {
                     $arr_categories[$val['id']] = '&nbsp;&nbsp;&nbsp;&nbsp;:: ' . $val['name'];
                 }
             }
         }
     }
     if ($widget) {
         $output .= '<form id="frmInquiryForm" action="' . APPHP_BASE . 'index.php?host=' . $widget_host . '&key=' . $widget_key . '" method="post">';
     } else {
         $output .= '<form id="frmInquiryForm" action="index.php?page=inquiry_form" method="post">';
     }
     $output .= draw_token_field(false);
     $output .= draw_hidden_field('act', 'send', false, 'id_act');
     $output .= draw_hidden_field('inquiry_type', '0', false);
     $output .= '<div class="inquiry_wrapper">';
     $output .= _WHAT_DO_YOU_NEED . '<br>';
     $output .= '<select id="inquiry_category" name="inquiry_category">';
     $output .= '<option value="">-- ' . _SELECT . ' --</option>';
     foreach ($arr_categories as $key => $val) {
         $output .= '<option value="' . $key . '"' . ($inquiry_category == $key ? ' selected="selected"' : '') . '>' . $val . '</option>';
     }
     $output .= '</select><br><br>';
     $output .= self::DrawInquirySubForm($params, false);
     $output .= '</div>';
     $output .= '</form>';
     if ($draw) {
         echo $output;
     } else {
         return $output;
     }
 }
开发者ID:mozdial,项目名称:Directory,代码行数:54,代码来源:Inquiries.class.php


示例18: defined

<?php

/**
* @project ApPHP Business Directory
* @copyright (c) 2011 ApPHP
* @author ApPHP <[email protected]>
* @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_pages') || $objLogin->HasPrivileges('delete_pages')) {
    $act = isset($_GET['act']) ? prepare_input($_GET['act']) : '';
    $language_id = isset($_REQUEST['language_id']) 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP prepare_menu函数代码示例发布时间:2022-05-15
下一篇:
PHP prepare_for_db函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap