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

PHP location函数代码示例

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

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



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

示例1: Login

function Login()
{
    if ($_COOKIE["ID_USUARIO"] == "") {
        msg_box("ERRO! Faça Login.");
        parent . location("index.php");
    }
}
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:7,代码来源:func_sys.php


示例2: restrict_access

function restrict_access($levels)
{
    if (!user_access($levels)) {
        // Access forbidden
        $user_level = $_SESSION['permissions'];
        if ($user_level == 'X') {
            alert('You need to log in to do that.', -1);
            require_once PATH::root() . '/Account/Signin.php';
            die;
        } else {
            if ($user_level == 'E') {
                location('Account/Verify_Email');
            } else {
                if ($user_level == 'P') {
                    location('Account/Approve');
                } else {
                    if ($user_level == '+') {
                        location('Admin/Super_Admin');
                    } else {
                        if ($user_level == 'B') {
                            location('Account/Banned');
                        } else {
                            // Go home - e.g. if you're logged in and it's restrict_access('X') on Signin, you shouldn't be signing in again. It'll just bring you back home.
                            location('Home');
                        }
                    }
                }
            }
        }
    }
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:31,代码来源:functions.users.php


示例3: OtherLogin

 public function OtherLogin()
 {
     $ary_get = $this->_get();
     $ary_data = array();
     $ary_data['state'] = $_SESSION['state'] = md5(uniqid(rand(), TRUE));
     if ($ary_get['t'] == 'qq') {
         $ary_data['scope'] = $_SESSION['scope'] = "get_user_info,add_share,get_info,list_album,add_album,upload_pic,add_topic,add_one_blog,add_weibo";
     } else {
         if ($ary_get['t'] == 'tqq') {
             $ary_data['scope'] = 'all';
         } else {
             if ($ary_get['scope']) {
                 $ary_data['scope'] = 'email,direct_messages_write,direct_messages_read,friendships_groups_read,friendships_groups_write,statuses_to_me_read';
             }
         }
     }
     $ary_data['response_type'] = "code";
     $url = str_replace('__APP__/', '/', 'http://' . $_SERVER['HTTP_HOST'] . U('Home/Oauth/OtherCallbackLogin', array('t' => $ary_get['t'])));
     $ary_data['redirect_uri'] = $url;
     $type = ucwords($ary_get['t']);
     $config = M("Oauth")->where(array('code' => $type, 'status' => '1'))->find();
     $ary_config = json_decode($config['config'], true);
     ${$ary_get}['t'] = new $type($ary_config['app_key'], $ary_config['app_secret']);
     $loginUrl = ${$ary_get}['t']->getOauthUrl($ary_data);
     location($loginUrl);
     exit;
 }
开发者ID:wjgjb1109,项目名称:huicms,代码行数:27,代码来源:OauthAction.class.php


示例4: admin

 public function admin()
 {
     if ($this->is_back()) {
         if ($this->parent->get_type() == 'Base_Admin') {
             $this->parent->reset();
         } else {
             location(array());
         }
         return;
     }
     $form = $this->init_module(Libs_QuickForm::module_name(), 'Changing template');
     $themes = Base_Theme::list_themes();
     $form->addElement('header', 'install_module_header', __('Themes Administration'));
     $form->addElement('select', 'theme', __('Choose template'), $themes);
     $form->addElement('static', null, '', '<br /><br />');
     $form->addElement('header', 'upload_theme_header', __('Upload template'));
     $form->setDefaults(array('theme' => Variable::get('default_theme')));
     if ($form->validate()) {
         $form->process(array(&$this, 'submit_admin'));
     } else {
         $form->display();
         if (class_exists('ZipArchive')) {
             $this->pack_module(Utils_FileUpload::module_name(), array(array($this, 'upload_template'), __('Upload template')));
             //				Base_ActionBarCommon::add('edit',__('Manage templates'),$this->create_callback_href(array($this,'download_template')));
         }
     }
     Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());
     Base_ActionBarCommon::add('save', __('Save'), $form->get_submit_form_href());
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:29,代码来源:Administrator_0.php


示例5: process

 public function process()
 {
     $http_host = $_SERVER['HTTP_HOST'];
     if ($http_host == 'localhost:8080') {
         $http_host = 'localhost';
     }
     $host_name = 'http://' . $http_host;
     $actual_url = str_replace($host_name, '', APPLICATION_ROOT);
     $actual_url = str_replace($actual_url, '', $_SERVER['REQUEST_URI']);
     $size = $this->getP3();
     if (!$size) {
         location('/error/base/' . urlencode('The url was invalid'));
     }
     $size_ex = explode('x', $size);
     $height = isset($size_ex[0]) ? $size_ex[0] : '100';
     $width = isset($size_ex[1]) ? $size_ex[1] : '100';
     $image_path = str_replace('/images/process/' . $size, '', $actual_url);
     $full_image_path = 'http://' . $http_host . $image_path;
     $headers = get_headers($full_image_path);
     foreach ($headers as $header) {
         if (strpos($header, 'Content-Type') !== false) {
             header($header);
         }
     }
     $new_url = 'http://' . $http_host . href('/framework/external/timthumb/timthumb.php');
     $new_url .= '?src=' . $image_path;
     $new_url .= '&h=' . $height;
     $new_url .= '&w=' . $width;
     echo file_get_contents($new_url);
 }
开发者ID:nikhildixit,项目名称:Generatrix,代码行数:30,代码来源:imagesController.php


示例6: redirectWhenNotSignedIn

 public static function redirectWhenNotSignedIn()
 {
     $session = CL_Session::get_instance();
     $id = $session->get('signedId');
     if ($id === FALSE) {
         location('/user/login');
         exit;
     }
 }
开发者ID:stefda,项目名称:pocketsail,代码行数:9,代码来源:Security.php


示例7: admin

	/**
	 * For internal use only.
	 */
	public function admin() {
		if($this->is_back()) {
			if($this->parent->get_type()=='Base_Admin')
				$this->parent->reset();
			else
				location(array());
			return;
		}
		Base_ActionBarCommon::add('back',__('Back'),$this->create_back_href());

		$this->browse();
	}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:15,代码来源:CommonData_0.php


示例8: login

 public function login()
 {
     //如果已经登录则,进入主页
     if ($this->admin_id) {
         location(U(MODULE_NAME . '/Index/index'));
         exit;
     }
     //如果没有登录
     if (!IS_POST) {
         $this->display();
         exit;
     }
     //获取表单数据
     $passwd = $_POST['passwd'];
     $name = $_POST['username'];
     //验证数据
     /* if (!$this->checkCaptcha($_POST['codeinput'])) {
            $this->error('验证码错误!');
        } */
     /* 验证是否存在该用户 */
     $admin = D('sys_admin');
     $data_get = $admin->where("name='%s'", $name)->find();
     if (!$data_get) {
         $this->error('该用户不存在');
         exit;
     }
     //如果该用户被锁定则不能登入
     if ($data_get['lock']) {
         $this->error('该用户已被锁定!!!请换其他帐号登录');
         exit;
     }
     //验证密码是否正确
     if (!strcmp(md5($passwd), $data_get['password'])) {
         $admin->where("id='%d'", $data_get['id'])->setField('login_ip', $_SERVER['REMOTE_ADDR']);
         //存入session
         session('admin_info', array('admin_id' => $data_get['id'], 'secret_key' => md5($data_get['id'] . C('secret_key')), 'admin_authority' => M('sys_role')->where('id="%d"', $data_get['role_id'])->getField('authority'), 'admin_name' => $data_get['name']));
         //存入cookie
         cookie('admin_info', array('admin_name' => $data_get['name']));
         //获取登录用户管理模块
         $lAuthLogic = D('Auth', 'Logic');
         $return = $lAuthLogic->init_auth($data_get);
         if ($return['status'] != 1) {
             $this->error($return['info']);
             exit;
         } else {
             redirect(U('Index/index'));
         }
     } else {
         $this->error('密码验证失败');
         exit;
     }
 }
开发者ID:sea009,项目名称:wkAdmin,代码行数:52,代码来源:PublicController.class.php


示例9: submit_login

 public static function submit_login($x)
 {
     $username = $x[0];
     $pass = $x[1];
     $ret = Base_User_LoginCommon::check_login($username, $pass);
     if (!$ret) {
         $limit_exceeded = self::log_failed_login($username);
         if ($limit_exceeded) {
             location(array());
         }
     }
     return $ret;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:13,代码来源:LoginCommon_0.php


示例10: admin

 public function admin()
 {
     if ($this->is_back()) {
         if ($this->parent->get_type() == 'Base_Admin') {
             $this->parent->reset();
         } else {
             location(array());
         }
         return;
     }
     Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());
     $this->pack_module(Utils_CommonData::module_name(), 'Countries', 'admin_array');
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:13,代码来源:Countries_0.php


示例11: admin

 public function admin()
 {
     if ($this->is_back()) {
         if ($this->parent->get_type() == 'Base_Admin') {
             $this->parent->reset();
         } else {
             location(array());
         }
         return;
     }
     Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());
     $this->rb = $this->init_module(Utils_RecordBrowser::module_name(), 'data_tax_rates', 'data_tax_rates_module');
     $this->display_module($this->rb);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:14,代码来源:TaxRates_0.php


示例12: forward

 public static function forward()
 {
     if (self::is_forward()) {
         $_SESSION['client']['__history_id__']++;
     }
     self::$action = true;
     $data = DB::GetOne('SELECT data FROM history WHERE session_name=%s AND page_id=%d AND client_id=%d', array(self::session_id(), $_SESSION['client']['__history_id__'] - 1, CID));
     //		$data = DB::BlobDecode($data);
     if (GZIP_HISTORY && function_exists('gzuncompress')) {
         $data = gzuncompress($data);
     }
     $_SESSION['client']['__module_vars__'] = unserialize($data);
     location(array());
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:14,代码来源:history.php


示例13: admin

	public function admin() {
		if ($this->is_back()) {
			$this->parent->reset();
		}
		Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());

		$google_login = Variable::get('utils_attachments_google_user', false);
		$google_pass = Variable::get('utils_attachments_google_pass', false);

		$form = $this->init_module('Libs_QuickForm');
		$theme = $this->init_module('Base_Theme');

		$form->addElement('header', 'header', __('Google Username and Password'));

		$form->addElement('text', 'google_user', __('Username'));
		$form->addElement('password', 'google_pass', __('Password'));

		$form->setDefaults(array('google_user'=>$google_login));
		$form->setDefaults(array('google_pass'=>$google_pass));

		if ($form->validate()) {
			$vals = $form->exportValues();

			$ok = true;
			if ($vals['google_user']) {
				$g_auth = Utils_AttachmentCommon::get_google_auth($vals['google_user'], $vals['google_pass']);
				if (!$g_auth) $ok = false;
			}

			if ($ok) {
				Variable::set('utils_attachments_google_user', $vals['google_user']);
				Variable::set('utils_attachments_google_pass', $vals['google_pass']);

				Base_StatusBarCommon::message(__('Settings saved'));
			} else {
				Base_StatusBarCommon::message(__('Unable to authenticate'), 'error');
			}
			location(array());
			return;
		}

		$form->assign_theme('form', $theme);

		Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());
		Base_ActionBarCommon::add('save', __('Save'), $form->get_submit_form_href());
		
		Base_ThemeCommon::load_css('Utils_RecordBrowser','View_entry');
		$theme->display('admin');
	}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:49,代码来源:Attachment_0.php


示例14: admin

 public function admin()
 {
     if ($this->is_back()) {
         if ($this->parent->get_type() == 'Base_Admin') {
             $this->parent->reset();
         } else {
             location(array());
         }
         return;
     }
     Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());
     $this->rb = $this->init_module('Utils/RecordBrowser', 'quick_search', 'quick_searach');
     $this->display_module($this->rb);
     return true;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:15,代码来源:QuickSearch_0.php


示例15: parseurl

 private static function parseurl()
 {
     if (isset($_REQUEST['act']) && isset($_REQUEST['mod'])) {
         $act = ucfirst(trim($_REQUEST['act']) . 'Action');
         $method = trim($_REQUEST['mod']);
     } else {
         $act = 'IndexAction';
         $method = 'index';
     }
     if (isset($_REQUEST['app']) && !defined('APP_NAME')) {
         define('APP_NAME', trim($_REQUEST['app']));
     }
     if (CREATE_DEMO) {
         //if need create demo
         $demo = new Demo();
         $demo->run();
     }
     if (!class_exists($act)) {
         if (APP_DEBUG) {
             die('controller class: ' . $act . ' not find. ');
         } else {
             location();
         }
     }
     $controller = new $act();
     if (!method_exists($controller, $method)) {
         if (APP_DEBUG) {
             die('controller class: ' . $act . ', method: ' . $method . ' not find. ');
         } else {
             location();
         }
     }
     self::$controller_obj = $controller;
     $controller->method = $method;
     $controller->open_token = OPEN_TOKEN;
     $controller->act = str_ireplace('Action', '', $act);
     self::$act = $controller->act;
     self::$mod = $method;
     $controller->{$method}();
 }
开发者ID:koycloud,项目名称:rain-php-framework,代码行数:40,代码来源:Application.php


示例16: admin

 public function admin()
 {
     if ($this->is_back()) {
         if ($this->parent->get_type() == 'Base_Admin') {
             $this->parent->reset();
         } else {
             location(array());
         }
         return;
     }
     $gb = $this->init_module('Utils_GenericBrowser', null, 'currencies');
     $gb->set_table_columns(array(array('name' => __('ID')), array('name' => __('Code')), array('name' => __('Symbol')), array('name' => __('Symbol position')), array('name' => __('Decimal sign')), array('name' => __('Thousand sign')), array('name' => __('Decimals')), array('name' => __('Default')), array('name' => __('Active'))));
     $ret = DB::Execute('SELECT * FROM utils_currency ORDER BY id ASC');
     while ($row = $ret->FetchRow()) {
         $gb_row = $gb->get_new_row();
         $gb_row->add_data_array(array($row['id'], $row['code'], $row['symbol'], self::$positions[$row['pos_before']], $row['decimal_sign'], $row['thousand_sign'], $row['decimals'], self::$active[$row['default_currency']], self::$active[$row['active']]));
         $gb_row->add_action($this->create_callback_href(array($this, 'edit_currency'), array($row['id'])), 'edit');
     }
     Base_ActionBarCommon::add('add', __('New'), $this->create_callback_href(array($this, 'edit_currency'), array(null)));
     Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());
     $this->display_module($gb);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:22,代码来源:CurrencyField_0.php


示例17: body

 public function body()
 {
     if (!Acl::is_user()) {
         return;
     }
     $th = $this->init_module('Base/Theme');
     eval_js_once('crm_filters_deactivate = function(){leightbox_deactivate(\'crm_filters\');}');
     $th->assign('my', '<a ' . $this->create_callback_href(array('CRM_FiltersCommon', 'set_profile'), 'my') . ' id="crm_filters_my">' . __('My records') . '</a>');
     eval_js('Event.observe(\'crm_filters_my\',\'click\', crm_filters_deactivate)');
     /*$th->assign('all','<a '.$this->create_callback_href(array('CRM_FiltersCommon','set_profile'),'all').' id="crm_filters_all">'.__('All records').'</a>');
     		eval_js('Event.observe(\'crm_filters_all\',\'click\', crm_filters_deactivate)');*/
     $th->assign('manage', '<a ' . $this->create_callback_href(array($this, 'manage_filters')) . ' id="crm_filters_manage">' . __('Manage presets') . '</a>');
     eval_js('Event.observe(\'crm_filters_manage\',\'click\', crm_filters_deactivate)');
     $ret = DB::Execute('SELECT id,name,description FROM crm_filters_group WHERE user_login_id=%d', array(Acl::get_user()));
     $filters = array();
     while ($row = $ret->FetchRow()) {
         $filters[] = array('title' => $row['name'], 'description' => '', 'open' => '<a ' . Utils_TooltipCommon::open_tag_attrs($row['description'], false) . ' ' . $this->create_callback_href(array('CRM_FiltersCommon', 'set_profile'), $row['id']) . ' id="crm_filters_' . $row['id'] . '">', 'close' => '</a>');
         eval_js('Event.observe(\'crm_filters_' . $row['id'] . '\',\'click\', crm_filters_deactivate)');
     }
     $th->assign('filters', $filters);
     $qf = $this->init_module('Libs/QuickForm');
     $fcallback = array('CRM_ContactsCommon', 'contact_format_no_company');
     $recent_crits = array();
     if (!Base_User_SettingsCommon::get('CRM_Contacts', 'show_all_contacts_in_filters')) {
         $recent_crits = array('(company_name' => CRM_ContactsCommon::get_main_company(), '|related_companies' => array(CRM_ContactsCommon::get_main_company()));
     }
     if (Base_User_SettingsCommon::get('CRM_Contacts', 'show_only_users_in_filters')) {
         $recent_crits['!login'] = '';
     }
     $contacts = CRM_ContactsCommon::get_contacts($recent_crits, array(), array(), 15);
     $cont = array();
     foreach ($contacts as $v) {
         $cont[$v['id']] = call_user_func($fcallback, $v, true);
     }
     asort($cont);
     $crits = array();
     if (!Base_User_SettingsCommon::get('CRM_Contacts', 'show_all_contacts_in_filters')) {
         $crits = array('(company_name' => CRM_ContactsCommon::get_main_company(), '|related_companies' => array(CRM_ContactsCommon::get_main_company()));
     }
     $qf->addElement('autoselect', 'crm_filter_contact', __('Records of'), $cont, array(array('CRM_ContactsCommon', 'autoselect_contact_suggestbox'), array($crits, $fcallback, false)), $fcallback);
     if (isset($_SESSION['client']['filter_' . Acl::get_user()]['value'])) {
         $qf->setDefaults(array('crm_filter_contact' => explode(',', $_SESSION['client']['filter_' . Acl::get_user()]['value'])));
     }
     $qf->addElement('submit', 'submit', __('Show'), array('onclick' => 'crm_filters_deactivate()'));
     if ($qf->validate()) {
         $c = $qf->exportValue('crm_filter_contact');
         CRM_FiltersCommon::set_profile('c' . $c);
         location(array());
     }
     $th->assign('saved_filters', __('Saved Presets'));
     $qf->assign_theme('contacts', $th);
     //$th->assign('contacts',$qf->toHtml());
     ob_start();
     $th->display();
     $profiles_out = ob_get_clean();
     Libs_LeightboxCommon::display('crm_filters', $profiles_out, __('Perspective'), true);
     if (!isset($_SESSION['client']['filter_' . Acl::get_user()]['desc'])) {
         CRM_FiltersCommon::set_profile('my');
     }
     //Base_ActionBarCommon::add('folder',__('Filters'),'class="lbOn" rel="crm_filters"',$this->get_module_variable('profile_desc',__('My records')));
     if (isset($_REQUEST['__location'])) {
         $in_use = CRM_FiltersCommon::$in_use === $_REQUEST['__location'];
     } else {
         $in_use = CRM_FiltersCommon::$in_use;
     }
     print '<a class="lbOn' . ($in_use ? '' : ' disabled') . ' button" rel="crm_filters">' . __('Perspective') . ': ' . '<b>' . $_SESSION['client']['filter_' . Acl::get_user()]['desc'] . '</b><div class="filter_icon_img"></div></a>';
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:67,代码来源:Filters_0.php


示例18: display_status

 public static function display_status($record, $nolink, $desc)
 {
     $prefix = 'crm_tasks_leightbox';
     $v = $record[$desc['id']];
     if (!$v) {
         $v = 0;
     }
     $status = Utils_CommonDataCommon::get_translated_array('CRM/Status');
     if ($v >= 3 || $nolink) {
         return $status[$v];
     }
     CRM_FollowupCommon::drawLeightbox($prefix);
     if (!Utils_RecordBrowserCommon::get_access('task', 'edit', $record) && !Base_AclCommon::i_am_admin()) {
         return $status[$v];
     }
     if (isset($_REQUEST['form_name']) && $_REQUEST['form_name'] == $prefix . '_follow_up_form' && $_REQUEST['id'] == $record['id']) {
         unset($_REQUEST['form_name']);
         $v = $_REQUEST['closecancel'];
         $action = $_REQUEST['action'];
         $note = $_REQUEST['note'];
         if ($note) {
             if (get_magic_quotes_gpc()) {
                 $note = stripslashes($note);
             }
             $note = str_replace("\n", '<br />', $note);
             Utils_AttachmentCommon::add('task/' . $record['id'], 0, Acl::get_user(), $note);
         }
         if ($action == 'set_in_progress') {
             $v = 1;
         }
         Utils_RecordBrowserCommon::update_record('task', $record['id'], array('status' => $v));
         if ($action == 'set_in_progress') {
             location(array());
         }
         $values = $record;
         $values['date_and_time'] = date('Y-m-d H:i:s');
         $values['title'] = __('Follow-up') . ': ' . $values['title'];
         $values['status'] = 0;
         if ($action != 'none') {
             $x = ModuleManager::get_instance('/Base_Box|0');
             $values['follow_up'] = array('task', $record['id'], $record['title']);
             if ($action == 'new_task') {
                 $x->push_main('Utils/RecordBrowser', 'view_entry', array('add', null, $values), array('task'));
             }
             if ($action == 'new_meeting') {
                 $x->push_main('Utils/RecordBrowser', 'view_entry', array('add', null, array('title' => $values['title'], 'permission' => $values['permission'], 'priority' => $values['priority'], 'description' => $values['description'], 'date' => date('Y-m-d'), 'time' => date('H:i:s'), 'duration' => 3600, 'status' => 0, 'employees' => $values['employees'], 'customers' => $values['customers'], 'follow_up' => $values['follow_up'])), array('crm_meeting'));
             }
             if ($action == 'new_phonecall') {
                 $x->push_main('Utils/RecordBrowser', 'view_entry', array('add', null, array('subject' => $values['title'], 'permission' => $values['permission'], 'priority' => $values['priority'], 'description' => $values['description'], 'date_and_time' => date('Y-m-d H:i:s'), 'employees' => $values['employees'], 'status' => 0, 'customer' => !empty($values['customers']) ? array_pop($values['customers']) : '', 'follow_up' => $values['follow_up'])), array('phonecall'));
             }
             return false;
         }
         location(array());
     }
     if ($v == 0) {
         return '<a href="javascript:void(0)" onclick="' . $prefix . '_set_action(\'set_in_progress\');' . $prefix . '_set_id(\'' . $record['id'] . '\');' . $prefix . '_submit_form();">' . $status[$v] . '</a>';
     }
     return '<a href="javascript:void(0)" class="lbOn" rel="' . $prefix . '_followups_leightbox" onMouseDown="' . $prefix . '_set_id(' . $record['id'] . ');">' . $status[$v] . '</a>';
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:59,代码来源:TasksCommon_0.php


示例19: html

        $html['switch'] = $rows['bbs_switch'];
        $html['signature'] = $rows['bbs_signature'];
        $html = html($html);
        //性别
        if ($html['sex'] == '男') {
            $html['sex_html'] = '<label for="man" class="radio"><input type="radio" id="man" name="sex" value="男" checked >男 </label>
                            <label for="woman" class="radio"><input type="radio" id="woman" name="sex" value="女" >女</label>';
        } else {
            $html['sex_html'] = '<label for="man" class="radio"><input type="radio" id="man" name="sex" value="男" >男 </label>
                            <label for="woman" class="radio"><input type="radio" id="woman" name="sex" value="女" checked >女</label>';
        }
    } else {
        alert('该用户不存在');
    }
} else {
    location('请先登录再进行本操作!', 'login.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
    <?php 
require ROOT_PATH . 'includes/header.inc.php';
?>
    <div class="container oh uz">
开发者ID:dothin,项目名称:bbs,代码行数:31,代码来源:modify.php


示例20: handle_error

function handle_error($message, $trace)
{
    log_message($message . " " . json_encode($trace));
    if (DEBUG) {
        show_error($message, 'error', $trace);
    } else {
        location('/oops');
    }
    exit(-1);
}
开发者ID:stefda,项目名称:pocketsail,代码行数:10,代码来源:Common.php



注:本文中的location函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP lock函数代码示例发布时间:2022-05-15
下一篇:
PHP locate_template函数代码示例发布时间: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