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

PHP set_header函数代码示例

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

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



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

示例1: showConfigurationError

 /**
  * Stop script and show a configuration error page
  * 
  * @return void
  */
 public static function showConfigurationError()
 {
     while (ob_get_level()) {
         ob_end_clean();
     }
     set_header(404);
     $uri = Uri::getInstance()->getUri(false);
     $tpl = Template::getInstance();
     $tpl->setTemplateDir(HOOKS_DIR . DS . 'errors');
     $tpl->addTemplateDir(FW_DIR . DS . 'errors');
     $tpl->assign('uri', $uri);
     $tpl->assign('routeFilePath', trim(CACHE_DIR . DS . 'routes.xml'));
     $tpl->assign('tests', self::environmentTests());
     try {
         $tpl->setTemplate('configuration.html')->render();
     } catch (Exception $exc) {
         echo $exc->getMessage();
     }
     die;
 }
开发者ID:salomalo,项目名称:php-oxygen,代码行数:25,代码来源:error.class.php


示例2: set_header

<?php

include "header.php";
set_header("Daydream", "club_all");
?>
<form class="form-search row-fluid " style="margin:30px 0">
	<div class="input-append span7" >
		<input class="span6" value="哈尔滨工业大学" id="appendedInputButton" type="text" style="margin-top:0px;height:44px;font-weight:bold;font-size:20px;padding-bottom:0px">
		<button class="btn btn-large" type="button">Go!</button>
	</div>
	<a class="btn btn-large btn-inverse pull-right" style="margin-right:-30px"><strong><i class="icon-plus icon-white"></i> 创建组织</strong></a>
</form>
<div class="container min-height" id="all-club" style="background-image:url(./img/banner.png)">
	<div class="row-fluid">	
		<div class="tabbable tabs-left">
			<ul class="nav nav-tabs span2 pull-left" >
				<li><a href="#myclub" data-toggle="tab" ><big ><strong>我的组织</strong></big></a></li>
				<li class="active"><a href="#all_club" data-toggle="tab"><big ><strong>全校所有</strong></big></a></li>
				<li><a href="#int_club" data-toggle="tab"><big ><strong>兴趣圈</strong></big></a></li>
				<li><a href="#school_club" data-toggle="tab"><big ><strong>社团</strong></big></a></li>
				<li><a href="#acd_club" data-toggle="tab"><big ><strong>学院</strong></big></a></li>
				<li><a href="#other_club" data-toggle="tab"><big ><strong>其他</strong></big></a></li>		
			</ul>
			<div class="span9 allback pull-left">
			<div class="tab-content">			
				<div class="tab-pane" id="myclub">
					<div class="signclub shadow"> 
					<img src="./img/may.jpg" class="club-pic size100 pull-left">
					<div class="club-text">
						<div class="text-min"><a href="#"><strong>五月天,我们的青春</strong></a></div>						
							<small>
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:club_all.php


示例3: get_string

// In case user tries to manually access page - check that settings exist.
if (!$sgs->exists()) {
    $error = get_string('notconfigured', BLOCK_SG_LANG_TABLE);
} else {
    if ($sgs->date_restriction() && time() > $sgs->get_date()) {
        $error = get_string('dateexpired', BLOCK_SG_LANG_TABLE);
    } else {
        $groupingid = $sgs->get_grouping_id();
        $sgrouping = new skills_grouping($courseid);
        // If user is in group - display error.
        if ($sgrouping->check_for_user_in_grouping($USER->id) !== false) {
            $error = get_string('alreadyingroup', BLOCK_SG_LANG_TABLE);
        }
    }
}
set_header();
echo $OUTPUT->header();
display_header();
display_group_view();
display_buttons();
load_yui_modules($courseid, $groupingid, $error);
echo $OUTPUT->footer();
/**
 * This function set the page header -> JS/CSS includes.
 *
 */
function set_header()
{
    global $PAGE;
    $PAGE->requires->css('/blocks/skills_group/css/skills_group.css');
    $PAGE->requires->js_module(get_js_module_info('gallery-datatable-selection'));
开发者ID:MoodleMetaData,项目名称:MoodleMetaData,代码行数:31,代码来源:join_skills_group.php


示例4: set_header

<?php

include 'header.php';
$menu = set_header('contact');
require 'news_last.php';
$main = "<p>A única forma de contato é por email: <a href='mailto:[email protected]'>[email protected]</a>.</p>";
require 'template.php';
开发者ID:rgaiacs,项目名称:camecc_cursos,代码行数:7,代码来源:contact.php


示例5: set_header

<?php

include "header.php";
set_header("Daydream", "personal");
?>



<div class="container min-height tabbable" style="background-image:url(./img/banner.png)">	
	<div class="tabbable">
		<ul class="nav nav-tabs">
			<li class="active"><a href="#tw" data-toggle="tab"><strong class="text-success"><i class="icon-retweet"></i>回复我</strong></a></li>
			<li><a href="#mytw" data-toggle="tab"><strong class="text-info"><i class="icon-reply"></i>我评论</strong></a></li>
			<li><a href="#li" data-toggle="tab"><strong class="text-error"><i class="icon-heart"></i>喜欢</strong></a></li>
		</ul>
		<div class="tab-content">
			<div class="tab-pane active" id="tw">			
				<h4 class="text-success"><ul class="breadcrumb">
					<li>新评论<span class="divider">/</span></li>									
					<li>读过<span class="divider">/</span></li>
					<li>未读</li>
				</ul></h4>
				<div class="alert alert-success span10">
					<a class="close" data-dismiss="alert">
						<i class="icon-remove"></i>
					</a>
					<img src="./img/guan.jpg" class="size40 img-circle"> 
					<strong><a href="#">马森</a>在话题</strong>中给你了评论 
					<i class="icon-quote-left"></i> 
						你说的很对,我也这么觉得,真的何赞
					<i class="icon-quote-right"></i>[<small>2012年3月25日 12:30</small>] <a class="badge badge-success pull-right">去看看</a>
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:message.php


示例6: set_header

<?php

include "header.php";
set_header("Daydream", "activities");
?>
<div class="container min-height" >
<form class="form-horizontal">
    <fieldset class="pull-left" style="height:400px;width:550px;">
    <div id="legend" class="">
        <legend class="">创建活动</legend>
    </div>
	<div class="shadow"style="margin-left:00px;">
    <div class="control-group" >
		<label class="control-label" for="input01">名称</label>
          <!-- Text input--> 
        <div class="controls">
            <input type="text" placeholder="活动名称" class="input-xlarge shadow">
        </div>
    </div>
	<div class="control-group">
          <!-- Text input-->
        <label class="control-label" for="input01">标签</label>
        <div class="controls">
            <input type="text" placeholder="用逗号隔开,不要超过3个" class="input-xlarge">
        </div>
    </div>
	<div class="control-group">
        <label class="control-label">类型</label>
        <div class="controls">
      <!-- Inline Radios -->
		<label class="radio inline">
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:create_act_new.php


示例7: set_header

<?php

include 'header.php';
$menu = set_header('news');
require 'news_last.php';
$db = new PDO('sqlite:db.sqlite');
if (!isset($_GET["id"]) || empty($_GET["id"])) {
    $result = $db->query("SELECT id, data, titulo FROM noticias ORDER BY id DESC");
    if (!$result) {
        echo "Erro na consulta.<br>";
        exit;
    }
    $main = "<h2>Notícias</h2>\n        <table>\n        <tr>\n        <th>Data</th>\n        <th>Título</th>\n        </tr>";
    foreach ($result as $row) {
        $main = $main . "<tr><td>{$row['1']}</td><td><a href='news?id={$row['0']}'>{$row['2']}</a></td></tr>";
    }
    $main = $main . "</table>";
} else {
    $result = $db->query("SELECT data, titulo, mensagem FROM noticias WHERE id=" . $_GET["id"]);
    $row = $result->fetch();
    $main = "<h2>Notícia</h2><p>Data: {$row['0']}</p><p>Título: {$row['1']}</p><p>Mensagem: {$row['2']}</p>";
}
$db = NULL;
require 'template.php';
开发者ID:rgaiacs,项目名称:camecc_cursos,代码行数:24,代码来源:news.php


示例8: sprintf

                        } else {
                            if ($total_folders > 1 && $total_files > 1) {
                                $summary = sprintf(_('%1$s folders and %2$s files, %3$s %4$s in total'), $total_folders, $total_files, $total_size['num'], $total_size['str']);
                            }
                        }
                    }
                }
            }
        }
    }
}
// Merge local settings with global settings
if (isset($loptions)) {
    $options = array_merge($options, $loptions);
}
$header = set_header($bootstrap_cdn);
$footer = set_footer();
// Set breadcrumbs
$breadcrumbs = "    <ol class=\"breadcrumb{$breadcrumb_style}\"" . $direction . ">" . PHP_EOL;
$breadcrumbs .= "      <li><a href=\"" . htmlentities($root_dir, ENT_QUOTES, 'utf-8') . "\">" . $icons['home'] . "</a></li>" . PHP_EOL;
foreach ($dir_name as $dir => $name) {
    if ($name != ' ' && $name != '' && $name != '.' && $name != '/') {
        $parent = '';
        for ($i = 0; $i <= $dir; $i++) {
            $parent .= rawurlencode($dir_name[$i]) . '/';
        }
        $breadcrumbs .= "      <li><a href=\"" . htmlentities($absolute_path . $parent, ENT_QUOTES, 'utf-8') . "\">" . $name . "</a></li>" . PHP_EOL;
    }
}
$breadcrumbs = $breadcrumbs . "    </ol>" . PHP_EOL;
// Show search
开发者ID:siwaphol,项目名称:nong_bootstraplistr,代码行数:31,代码来源:index.php


示例9: set_header

<?php

include 'header.php';
$menu = set_header('links');
require 'news_last.php';
$main = "<h2>Links úteis</h2>\n    <table cellspacing='10'>\n    <tr>\n    <td><a href='http://www.imecc.unicamp.br/~camecc'><img src='images/camecc_logo.png' alt='logo' name='logo' height='100' id='logo_camecc' /></a></td>\n    <td><a href='http://www.dceunicamp.org.br/'><img src='images/dce.png' alt='logo' name='logo' height='100' id='logo_dce' /></a></td>\n    <td><a href='http://www.ime.unicamp.br/'><img src='images/imecc.png' alt='logo' name='logo' height='100' id='logo_imecc' /></a></td>\n    <td><a href='http://www.unicamp.br/'><img src='images/unicamp.png' alt='logo' name='logo' height='100' id='logo_unicamp' /></a></td>\n    </tr>\n    </table>";
require 'template.php';
开发者ID:rgaiacs,项目名称:camecc_cursos,代码行数:7,代码来源:links.php


示例10: validate_session

function validate_session($exists = false)
{
    if ($exists) {
        if (isset($_SESSION['dob'])) {
            set_header('app');
            exit;
        }
    } else {
        if (!isset($_SESSION['dob'])) {
            set_header('login');
            exit;
        }
    }
}
开发者ID:nirwandogra,项目名称:school-work,代码行数:14,代码来源:functions.inc.php


示例11: set_header

<?php

include 'header.php';
$menu = set_header('about');
require 'news_last.php';
$main = "<h2>História</h2>\n<p>O CAMECC Cursos foi idealizado por Raniere Silva em 2012 para organizar o curso de LaTeX preparado por ele e manter o material do curso disponível a todos.</p>\n<h2>Missão</h2>\n<p>Manter material de auxílio técnico (referentes a softwares livres e/ou abertos) para os alunos vinculados ao IMECC e organizar cursos com base neste material.</p>\n<h2>Valores</h2>\n<p>Liberdade e honestidade.</p>\n<h2>Equipe</h2>\n<p>Hoje, o CAMECC Cursos encontra-se sobre responsabilidade de Raniere Silva com a colaboração de:\n<ul>\n<li>Vinícius Ignácio.</li>\n</ul></p>\n<p>A seguir uma lista de antigos colaboradores:</p>";
require 'template.php';
开发者ID:rgaiacs,项目名称:camecc_cursos,代码行数:7,代码来源:about.php


示例12: set_header

<?php

include "header.php";
set_header("Daydream", "home");
?>
<div class="container min-height" style="background-image:url(./img/banner.png)">
	
	<div class="content">
		<h4>晚上好,马森,今天过得还愉快吗?</h4>
		<hr class="bs-docs-separator">
		<div class="stream-content">	
			<div class="stream-item">
				<a href="club_home_new.php"><img src="./img/may.jpg" class="polaroid size48 pull-left" ></a>
				<div class="popover right">
					<div class="arrow"></div>					
						<div class="stream-header">
							<strong class="pull-left"><a href="club_home_new.php">五月天,致青春</a></strong>						
							<a href="#"><span class="pull-right text-error" id="like"> <i class="icon-heart icon-white"></i> 喜欢</span></a>
						</div>
						<br />
						<p class="stream-text">每次听到倔强,无论生活中有多大的困难,我都会鼓起勇气,去迎接明天的生活,因为这是我的青春,“当我和世界不一样,那就让我不一样,坚持对我来说,就是以刚克刚”。呵呵</p>					
					<div class="stream-item-footer">
						<span  class="time-off">
							<small class="muted">2012/10/1 12:33 来自 
								<a href="#">马森</a>								
							</small> 
						</span>					
						<div class="muted pull-right">
							<span ><small ><i class="icon-remove"></i> 删除</small></span>							
							<span><small ><i class="icon-retweet"></i> 评论</small></span>
						</div>
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:index.php


示例13: set_header

<?php

include 'header.php';
$menu = set_header('courses');
require 'news_last.php';
$main = "<h2>GNU Octave</h2>\n    <p>\"GNU Octave é uma linguagem computacional, desenvolvida para computação matemática. Possui compatibilidade com Matlab, possuindo um grande número de funções semelhantes.\" (Fonte: <a href='http://pt.wikipedia.org/wiki/GNU_Octave'>http://pt.wikipedia.org/wiki/GNU_Octave</a>)</p>\n    <p>Ainda não produzimos nenhuma material sobre GNU Octave. A seguir encontra-se uma lista de outros materiais produzido por terceiros.</p>\n    <ol>\n    <li>Básico</li>\n    <ul>\n    <li><a href='http://pt.wikibooks.org/wiki/GNU_Octave'>Wikibook sobre Gnu Octave</a></li>\n    </ul>\n    <li>Intermediádio</li>\n    <ul>\n    <li><a href='http://en.wikibooks.org/wiki/Octave_Programming_Tutorial'>Wikibook sobre GNU Octave</a> (em inglês)</li>\n    </ul>\n    <li>Avançado</li>\n    <ul>\n    <li><a href='http://www.gnu.org/software/octave/doc/interpreter/'>Documentação oficial</a> (em inglês)</li>\n    </ul>\n    </ol>\n    ";
require 'template.php';
开发者ID:rgaiacs,项目名称:camecc_cursos,代码行数:7,代码来源:octave.php


示例14: __

    $form->setRequiredNote('<span class="required_note_star">*</span> <span class="required_note">' . __('denotes required field') . '</span>');
    $form->display();
    print '</div>';
} elseif (!isset($_GET['htaccess'])) {
    ob_start();
    print '<h1>' . __('Welcome to EPESI setup!') . '<br></h1><h2>' . __('Hosting compatibility') . ':</h2><br><div class="license">';
    if (check_htaccess()) {
        $_GET['htaccess'] = 1;
        ob_end_clean();
    } else {
        print '</div><br><a class="button" href="setup.php?license=1&htaccess=1&install_lang=' . $install_lang_load . '">' . __('Ok') . '</a>';
        ob_end_flush();
    }
}
if (isset($_GET['htaccess']) && isset($_GET['license'])) {
    set_header(__('Configuration'));
    $form = new HTML_QuickForm('serverform', 'post', $_SERVER['PHP_SELF'] . '?' . http_build_query($_GET));
    $form->addElement('header', null, __('Database server settings'));
    $form->addElement('text', 'host', __('Database server address'));
    $form->addRule('host', __('Field required'), 'required');
    $form->addElement('text', 'port', __('Custom database port'));
    $form->addElement('select', 'engine', __('Database engine'), array('postgres' => 'PostgreSQL', 'mysqlt' => 'MySQL'));
    $form->addRule('engine', __('Field required'), 'required');
    $form->addElement('text', 'user', __('Database server user'));
    $form->addRule('user', __('Field required'), 'required');
    $form->addElement('password', 'password', __('Database server password'));
    $form->addRule('password', __('Field required'), 'required');
    $form->addElement('text', 'db', __('Database name'));
    $form->addRule('db', __('Field required'), 'required');
    $create_db_warn_msg = __('WARNING: Make sure you have CREATE access level to do this!');
    $form->addElement('select', 'newdb', __('Create new database'), array(0 => __('No'), 1 => __('Yes')), array('onChange' => 'if(this.value==1) alert("' . $create_db_warn_msg . '","warning");'));
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:setup.php


示例15: set_header

<?php

include "header.php";
set_header("Daydream", "");
?>
<div class="container row-fluid min-height" style="background-image:url(./img/banner.png)">
<form>  
       <h2>修改密码</h2>	
        <!-- Appended input-->
        <span class="pull-left span3"><label >原始密码</label>           
        <input  placeholder="placeholder" type="text"></span>
		<span class="pull-left span3"><label class="">新密码</label>           
        <input placeholder="placeholder" type="text"></span>
		<span class="pull-left span3"><label class="control-label">确认密码</label>           
        <input placeholder="placeholder" type="text"></span>
		<button class="btn btn-large btn-inverse" style="margin:25px ">确定</button>
</form>
<form style="background-color:#FBEED5;padding:10px">
    <fieldset >     
		<h2 >修改资料</h2>	
        <!-- Appended input-->
		<div class="span5"> 
			<img src="./img/na.jpg" class="size100"><a href="#"><strong>修改头像</strong></a>
			<label class="">姓名</label>           
			<input class="span8" placeholder="placeholder" type="text">           
			<p class="help-block"></p>      
			
			<label class="">性别</label>          
			<!-- Inline Radios -->
			<label class="radio inline">
			<input type="radio" value="男" name="sex" checked="checked">
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:change_self_information.php


示例16: set_header

<?php

include "header.php";
set_header("Daydream", "acts");
?>
<form class="form-search row-fluid " style="margin:30px 0">
	<div class="input-append span7" >
		<input class="span6" value="哈尔冰工业大学" id="appendedInputButton" type="text" style="margin-top:0px;height:44px;font-weight:bold;font-size:20px;padding-bottom:0px">
		<button class="btn btn-large" type="button">Go!</button>
	</div>
	<a class="btn btn-large btn-inverse pull-right" style="margin-right:-30px"><strong><i class="icon-plus icon-white"></i> 创建活动</strong></a>
</form> 
<div class="min-height row-fluid" style="background-image:url(./img/banner.png)">	
	<div id="act" class="shadow" style="position:fixed;padding:0px 10px;top:150px;left:4%;">
		<ul class="nav nav-pills nav-stacked">
			<li class="active"><a href="#hotty">同校最火</a></li>
			<li><a href="#ving">正在进行</a></li>
			<li><a href="#will">即将进行</a></li>
			<li><a href="#ved">刚刚过去</a></li>			
		</ul>
	</div>
	<h2 class="active">同校最火HOT</h2>
	<div style="height:310px;width:860px;position:relative;padding:20px 40px;margin-bottom:40px" class="shadow"><div id="hotty"></div>
	<div id="myCarousel" data-pause="hover" class="carousel slide span6  pull-left"> 		
        <div class="carousel-inner">
            <div class="item active">
                    <img src="./img/222.jpg"/>
					<div class="carousel-caption">
                      <h4>校园十大歌手</h4>
                     </div>
                  </div>
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:new_act_all.php


示例17: response

 /**
  * response, manipule une instance de Response::class
  *
  * @param string $template, le message a envoyer
  * @param int $code, le code d'erreur
  * @param string $type, le type mime du contenu
  * @return Response
  */
 function response($template = null, $code = 200, $type = 'text/html')
 {
     if (is_null($template)) {
         return Response::takeInstance();
     }
     set_header('Content-Type', $type);
     set_response_code($code);
     query_response('send', $template);
     return Response::takeInstance();
 }
开发者ID:papac,项目名称:framework,代码行数:18,代码来源:helper.php


示例18: set_header

<?php

include "header.php";
set_header("Daydream", "activity");
?>
<div class="container min-height" style="background-image:url(./img/banner.png)">	
	<h3>组织</h3>
	
	<div class="shadow" style="width:600px;height:170px;margin:30px 100px;padding:0 10px"> 
		<img src="./img/1.jpg" class="all-club-pic">		
		<h4 class="text-min"><a href="#" class="span8 ">学学信电信学学信电信学学信</a>	</h4>
		<div>哈尔滨工业大学</div>
		<small>这是哈工大的一个圈子,这是哈工大的一个圈子,这是哈工大的一个圈子,这是哈工大的一个圈子,这是哈工大的一个圈子,这是哈工大的一个圈子,这是哈工大的一个圈子,这是哈工大的一个圈子,这是一个圈子</small>
		
	</div>
	<button type="submit" class="btn btn-large" style="margin-left:310px"><strong>修改资料<strong></button>
	<button type="submit" class="btn btn-large btn-inverse"><strong>进组织<strong></button>
	<hr />
	<h3>201位达人</h3>
	
	<div class="daren">
		<div class="dapic">
			<div><img src="./img/3.jpg" class="size60 img-circle"></div><i class="icon-star"></i><a href="./like.php">马森</a>
		</div>
		<div class="dapic">
			<div><img src="./img/na.jpg" class="size60 img-circle"></div>眼欣荣
		</div>
		<div class="dapic">
			<div><img src="./img/nba.jpg" class="size60 img-circle"></div>眼荣
		</div>
		<div class="dapic">
开发者ID:hitstar,项目名称:daydream,代码行数:31,代码来源:club_information.php


示例19: array

function &signup($edit = false)
{
    // You need to implement it
    // Code below is for test purposes only!
    $HTML = array();
    $HTML['email'] = '';
    $HTML['password'] = '';
    $HTML['confirm_password'] = '';
    $HTML['city'] = '';
    $HTML['countryID'] = '';
    $HTML['country_options_escape'] = getContries();
    $HTML['email_error'] = '';
    //Reset Error
    $HTML['confirm_password_error'] = '';
    //Reset Error
    $HTML['city_error'] = '';
    //Reset Error
    $HTML['countryID_error'] = '';
    //Reset Error
    $HTML['signup_error'] = '';
    //Reset Error
    if (getRequest('submitted', true, 'post') !== 'yes') {
        $HTML['country_options_escape'] = getContries();
        return $HTML;
    }
    print_r($_POST);
    // foreach($_POST as $key => $value)
    // {
    //     $HTML[$key] = $value;
    // }
    foreach ($HTML as $key => &$value) {
        $value = utf8HTML(getRequest($key, true, 'post'));
    }
    $userID = array();
    if (empty($HTML['email'])) {
        $HTML['email_error'] = 'Email Cannot be empty';
    }
    if (empty($HTML['password'])) {
        $HTML['confirm_password_error'] = 'Password cannot be empty';
        //Security measure!
    }
    if (empty($HTML['confirm_password'])) {
        $HTML['confirm_password_error'] = 'Confirm password cannot be empty';
        //Security measure!
    }
    if (!preg_match('((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{6,20})', $HTML['password'])) {
        $HTML['confirm_password_error'] = 'Passwords have to be 6-20 chars and more secure!';
    }
    if ($HTML['password'] != $HTML['confirm_password']) {
        $HTML['confirm_password_error'] = 'Passwords do not match';
    }
    if (empty($HTML['city'])) {
        $HTML['city_error'] = 'City cannot be empty';
        //Security measure!
    }
    if (empty($HTML['countryID'])) {
        $HTML['countryID_error'] = 'Country cannot be empty';
        //Security measure!
    }
    if (filter_var($HTML['email'], FILTER_VALIDATE_EMAIL) === false) {
        $HTML['email_error'] = 'Invalid Email Address';
    }
    // FILTER_SANITIZE_SPECIAL_CHARS
    if (filter_var($HTML['city'], FILTER_SANITIZE_SPECIAL_CHARS) === false) {
        $HTML['city_error'] = 'Invalid city input';
    }
    set_SESSION("country", $HTML['countryID']);
    $arr = connect('Select * from users where email="' . $HTML['email'] . '"');
    $count = count($arr);
    if ($count > 0) {
        $HTML['signup_error'] = "That email already exists";
    }
    $HTML['encrypted'] = encrypt($HTML['password']);
    if (empty($HTML['signup_error']) and empty($HTML['city_error']) and empty($HTML['countryID_error']) and empty($HTML['confirm_password_error'])) {
        connect("INSERT INTO users (email, password, city, country) VALUES ('" . $HTML['email'] . "', '" . encrypt($HTML['password']) . "' , '" . $HTML['city'] . "' , '" . $HTML['countryID'] . "')");
        print_r($arr);
        set_SESSION("userid", mysql_insert_id());
        set_SESSION("email", $HTML['email']);
        set_SESSION("city", $HTML['city']);
        set_SESSION("country", $HTML['countryID']);
        set_header('account');
        //If no errors -> go to account
        exit;
    }
    $HTML['country_options_escape'] = getSContries($HTML['countryID']);
    return $HTML;
    // $HTML=array();
    // $HTML['country_options_escape'] = getContries();
    // return $HTML;
}
开发者ID:umairsajid,项目名称:Homeworks,代码行数:90,代码来源:functions.inc.php


示例20: set_header

<?php

include 'header.php';
$menu = set_header('index');
require 'news_last.php';
$main = "<h2>Bem vindo.</h2>\n    <p>O CAMECC Cursos é um órgão do <a href='http://www.ime.unicamp.br/~camecc'>CAMECC</a> responsável por manter material relacionado a softwares livres (sob a licença GNU GPL) ou software aberto (sob alguma das licenças listadas em <a href='http://opensource.org/licenses/alphabetical'>http://opensource.org/licenses/alphabetical</a>) de interesse dos alunos do IMECC.</p>\n    <p>Todo o material disponibilidado ou indicado neste site encontra-se sob alguma licenças <a href='http://creativecommons.org.br/'>Creative Commons</a>.</p>";
require 'template.php';
开发者ID:rgaiacs,项目名称:camecc_cursos,代码行数:7,代码来源:index.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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