当前位置: 首页>>代码示例>>PHP>>正文


PHP write_header函数代码示例

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


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

示例1: write_database

function write_database($database)
{
    global $root_path, $img_path;
    //
    // Connect to the database
    //
    $db = db_connect($database);
    //
    // Prepare some SQL queries
    //
    $query = "SELECT id, date, description, type FROM batches";
    $db['batch_sth'] = $db['dbh']->prepare($query);
    check_db_error($db['batch_sth'], __FILE__, __LINE__);
    $page_title = "RAD-Tag Analyses";
    write_header($page_title);
    echo <<<EOQ
<h4 class="info_head">
  <img id="sources_img" src="{$img_path}/caret-d.png" />
  <a onclick="toggle_div('sources', '{$img_path}', 'page_state');">RAD-Tag Samples</a>
</h4>

<a name="results_top"></a>
<table class="db" style="width: 75%;">
<tr>
  <th style="width: 10%;">&nbsp;</th>
  <th style="width: 10%;">&nbsp;</th>
  <th style="width: 10%;">Batch ID</th>
  <th style="width: 10%;">Date</th>
  <th style="width: 10%;">Type</th> 
  <th style="width: 50%;">Description</th>
</tr>

EOQ;
    $result = $db['batch_sth']->execute();
    check_db_error($result, __FILE__, __LINE__);
    while ($row = $result->fetchRow()) {
        print "<tr>\n" . "  <td class=\"s\"><a href=\"{$root_path}/catalog.php?db={$database}&id={$row['id']}\">Catalog</a></td>\n" . "  <td class=\"s\"><a href=\"{$root_path}/samples.php?db={$database}&id={$row['id']}\">Samples</a></td>\n" . "  <td>" . $row['id'] . "</td>\n" . "  <td>" . $row['date'] . "</td>\n" . "  <td>" . $row['type'] . "</td>\n" . "  <td>" . $row['description'] . "</td>\n" . "</tr>\n";
    }
    echo <<<EOQ
</table>

EOQ;
    write_footer();
}
开发者ID:kdmurray91,项目名称:stacks,代码行数:44,代码来源:index.php

示例2: write_error_page

function write_error_page($msg)
{
    write_header();
    echo "<h2>Sorry, an error occurred<br />", $msg, "</h2>";
    write_footer();
}
开发者ID:rohitvyavahare,项目名称:Summer-Camp-Project,代码行数:6,代码来源:helpers.php

示例3: write_header

<?php

require 'functions.php';
write_header();
if (!isset($_REQUEST['dir']) || $_REQUEST['dir'] == "" || substr($_REQUEST['dir'], 0, 1) == "." || !is_dir(__DIR__ . '/' . PHOTOS_PATH . $_REQUEST['dir'])) {
    $_REQUEST['dir'] = "";
}
echo '<div class=gallery>';
if ($_REQUEST['dir'] !== "") {
    show_back(PHOTOS_PATH . $_REQUEST['dir']);
}
list_dirs(get_dirs($_REQUEST['dir']));
list_photos(get_images(PHOTOS_PATH . $_REQUEST['dir']));
echo '</div>';
开发者ID:nmrugg,项目名称:Photos-Now,代码行数:14,代码来源:index.php

示例4: check_db_error

} else {
    $cols['gcnt'] = false;
}
//
// Pull information about this batch
//
$result = $db['batch_sth']->execute($batch_id);
check_db_error($result, __FILE__, __LINE__);
$row = $result->fetchRow();
$batch = array();
$batch['id'] = $row['id'];
$batch['desc'] = $row['description'];
$batch['date'] = $row['date'];
$batch['type'] = $row['type'];
$page_title = "RAD-Tag Catalog Viewer";
write_header($page_title, $batch);
echo <<<EOQ
<script type="text/javascript"
        src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript"
        src="{$root_path}/population_view.js"></script>

<h3 class="info_head" style="margin-left: 1em;">
  <a href="{$root_path}/index.php?db={$database}">
  Batch #{$batch['id']} <span class="s">[{$batch['date']}; {$batch['desc']}]</span></a>
</h3>

EOQ;
if ($batch['type'] == "population") {
    write_pop_filter($cols);
} else {
开发者ID:kdmurray91,项目名称:stacks,代码行数:31,代码来源:catalog.php

示例5: session_start

<?php

session_start();
$user = $_SESSION['userblanco'];
include 'encabezado.php';
write_header('busqueda_servicios');
write_body('busqueda_servicios', $user);
write_notificacion();
include 'groups.php';
?>
<div id="main" role="main" style="margin-bottom:10px; height:auto;">

<div id="body_principal" class="body_menu"><!--BODY PRINCIPAL-->
	<div id="navegador" class="navegador_bloque">
    	<div id="texto_busqueda" class="textos_busqueda">
        	<span>Elija el m&eacute;todo de b&uacute;squeda : </span>
        </div>
    	<div id="menu_accesos_directos" class="accesos_directos">
        	<ul>
            	<li><a href="clientes.php">Raz&oacute;n Social</a></li>
                <li class="center_menu"><a href="tarjeta.php">Serie Fabricante</a></li>
                <li><a href="contratos.php">C&oacute;digo Contrato</a></li>
            </ul>
        </div>    	
    </div>

</div><!--FIN //BODY PRINCIPAL-->		
        
        
<?php 
include 'footer.php';
开发者ID:neojoker,项目名称:blablabla,代码行数:31,代码来源:menu_servicios.php

示例6: session_start

<?php

session_start();
$user = $_SESSION['userblanco'];
include 'encabezado.php';
write_header('Tarjeta de equipo');
write_body('Tarjeta de equipo', $user);
write_notificacion();
if (isset($_GET['par'])) {
    $parametro_oculto = $_GET['par'];
} else {
    $parametro_oculto = '';
}
?>

<div id="main" role="main" style="margin-bottom:20px;">

<div id="body_principal" class="bloque_principal"><!--BODY PRINCIPAL-->

	<div id="buscador" class="bloque_buscador"><!--BODY DEL BUSCADOR PARA CADA PAGINA-->
    <form class="menu_busqueda">
    <ol class="replace">
    	<li class="filas_problema">
        	<input type="hidden" id="parametro_oculto" style="width:0px; height:0px;" value="<?php 
echo $parametro_oculto;
?>
" />
    		<label class="menu_label" for="busqueda">Numero de serie:</label>
    		<input class="menu_input" type="text" id="busqueda">
            <img src="img/lupa2.png" class="menu_imagen" id="busqueda_link" width="23" height="20"/>
     	</li>
开发者ID:neojoker,项目名称:blablabla,代码行数:31,代码来源:tarjeta.php

示例7: session_start

<?php

session_start();
$user = $_SESSION['userblanco'];
$departmen = $_SESSION['departmen'];
$manager = $_SESSION['manager'];
include "encabezado.php";
write_header('Servicio de vacaciones');
write_body('Servicio de vacaciones', $user);
write_notificacion();
$username = "root";
$password = "critical";
$hostname = "localhost";
//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL+++" . mysql_error());
$selected = mysql_select_db("registroVacaciones", $dbhandle) or die("Could not select examples");
$sql = "SELECT Saldo,idEmpleado,nombre\n\t\t\tFROM Empleados\n\t\t\tWHERE user = '" . $user . "'";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$_SESSION['saldo'] = $row[0];
$_SESSION['idEmpleado'] = $row[1];
$_SESSION['nombre_empleado'] = $row[2];
$departmen = $_SESSION['departmen'];
$manager = $_SESSION['manager'];
?>

<div id="main" role="main" class="blanco">
			<div id="movimiento_tamano" class="mov_tam">
			<form class="dashboard" id="index_extendido_vacaciones">
					
			<fieldset>
开发者ID:neojoker,项目名称:blablabla,代码行数:31,代码来源:request_vacation.php

示例8: session_start

<?php

session_start();
$user = $_SESSION['userblanco'];
include "encabezado.php";
write_header('Blog de solicitudes');
write_body('Blog de solicitudes', $user);
write_notificacion();
//ESPACIO PARA OBTENER TODOS LOS DEPARTAMENTOS Y DESPUES AGREGAR METODOS EN EL JQUERY PARA PONER EL MANAGER DEL GRUPO
?>
			
		<div id="main" role="main">
			
			<form class="dashboard">
					
			<fieldset>
			
				<legend>Ingresar Solicitud al blog</legend>
		
			<ol>
				<li>
					<label for="cliente_label">Cliente</label>
					<input type="text" autofocus="" required="" placeholder="Cliente" name="Cliente" id="cliente">
                    <img src="img/lupa.png" href="#" id="link_clientes" width="15" height="20" />
                    <br/>
				</li>	
				<li>
				  <label for="departamento">Departamento</label>
					<select name="departamentos" id="departamentos">
                       
                        
开发者ID:neojoker,项目名称:blablabla,代码行数:29,代码来源:blog_solicitud.php

示例9: session_start

<?php

session_start();
if (isset($_SESSION['ultimo_id'])) {
    $id = $_SESSION['ultimo_id'];
} else {
    header('Location: post_pendientes.php');
}
$user = $_SESSION['userblanco'];
include "encabezado.php";
write_header('Peticion');
write_body('Peticicion', $user);
write_notificacion();
//FUNCION PARA OBTENER TODA LA INFO ACTUAL DEL POST PRINCIPAL, RESTO DE LA CONSULTA EN UN POST DE JQUERY CON UN SET INTERVAR
$username = "root";
$password = "critical";
$hostname = "localhost";
//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL+++" . mysql_error());
$selected = mysql_select_db("Blog", $dbhandle) or die("Could not select examples");
$sql = 'select * from Solicitud where id_solicitud = ' . $id;
$result = mysql_query($sql, $dbhandle);
$datos_principal = array();
while ($row = mysql_fetch_array($result)) {
    $datos_principal = $row;
}
function calcular_tiempo($date)
{
    date_default_timezone_set('America/Costa_Rica');
    $fecha_actual = strtotime(date("Y-m-d H:i:s"));
    $date = strtotime($date);
开发者ID:neojoker,项目名称:blablabla,代码行数:31,代码来源:post.php

示例10: session_start

<?php

session_start();
$user = $_SESSION['userblanco'];
$departmen = $_SESSION['departmen'];
$manager = $_SESSION['manager'];
include "encabezado.php";
write_header('Mantenimiento feriados');
write_body('Mantenimiento feriados', $user);
write_notificacion();
?>

<div id="main" role="main" class="blanco">
			<div id="movimiento_tamano" class="mov_tam">
			<form class="dashboard" id="index_extendido_manager">
					
			<fieldset>
            
            <legend style="text-align: center; font-size:12px"> Mantenimiento de dias festivos </legend>
            
            <ol>
            	
                <li>
                	<label for="lista_feriados">Dias festivos : </label>
                  	<div id="dias">
                        <table id="tabla_feriados" border="0" cellspacing="0">
                          <thead>
                              <tr>
                                <th></th>
                                <th>Nombre</th>
                                <th>Dia</th>
开发者ID:neojoker,项目名称:blablabla,代码行数:31,代码来源:mantenimiento_feriados.php

示例11: write_header

<?php

include "encabezado.php";
write_header('login');
write_body('Login', 'login');
write_notificacion();
?>
<div id="main" role="main" class="blanco">
			<div id="movimiento_tamano" class="mov_tam">
            <form class="dashboard" id="index_extendido" method="post" action="index.php">
		
			<fieldset>
			
				<legend class="letra_12">Iniciar sesi&oacute;n</legend>
		
				<ol class="mover_izquierda_ol" >
					
					<li>
						<label for="name">Usuario</label>
                        <br/>
						<input type="text" autofocus="" required="" placeholder="" name="name" id="name">
                        <br/>
					</li>
					
					<li>
						<label for="email">Contrase&ntilde;a</label>
                        <br/>
						<input type="password" required="" name="password" id="password">
					</li>
						
				</ol>
开发者ID:neojoker,项目名称:blablabla,代码行数:31,代码来源:index.php

示例12: session_start

<?php

session_start();
$user = $_SESSION['userblanco'];
include 'encabezado.php';
write_header('Grupo Electrot&eacute;cnica');
write_body('Grupo Electrotecnica', $user);
write_notificacion();
include 'groups.php';
$grupos = array();
$grupos = generar_lista_grupos();
?>
		<div id="main" role="main" class="blanco espacio_superior">
			<div class="rows">
<div class="row even"><h2>General</h2>
					<a href="blog_request.php"><img src="img/icons/blog-de-ideas.png" alt="Blog" width="70" height="70"/><span>Crear solicitud</span></a>
                	<a href="requests.php"><img src="img/icons/blog-de-ideas.png" alt="Blog" width="70" height="70"/><span>Solicitudes pendientes</span></a>
                    
</div>       

<?php 
if (in_array('comercial', $grupos) || in_array('portalmanager', $grupos)) {
    echo "<div class=\"rows\">\n<div class=\"row even\"><h2>Comercial</h2>\n\t\t\t\t\t<a href=\"menu_servicios.php\"><img src=\"img/icons/busqueda-de-equipos-en-garantia.png\" alt=\"Servicios\" width=\"70\" height=\"70\"/><span>Servicios</span></a>\n\t\t\t\t\t</div>   \n";
}
?>
                    
<div class="row even"><h2>Gestion Humana</h2>
                    <a href="request_vacation.php"><img src="img/icons/vacaciones.png" alt="Solicitud" width="70" height="70"/><span>Solicitud de vacaciones</span></a>
                    
<?php 
if (in_array('portalvacacionesmanager', $grupos)) {
开发者ID:neojoker,项目名称:blablabla,代码行数:31,代码来源:portal.php

示例13: session_start

<?php

session_start();
$user = $_SESSION['userblanco'];
include 'encabezado.php';
write_header('Contrato de servicio');
write_body('Contrato de servicio', $user);
write_notificacion();
if (isset($_GET['par'])) {
    $parametro_oculto = $_GET['par'];
} else {
    $parametro_oculto = '';
}
?>
<div id="main" role="main" style="margin-bottom:20px;">

<div id="body_principal" class="bloque_principal"><!--BODY PRINCIPAL-->

	<div id="buscador" class="bloque_buscador"><!--BODY DEL BUSCADOR PARA CADA PAGINA-->
    <form class="menu_busqueda">
    <ol class="replace">
    	<li class="filas_problema">
        	<input type="hidden" id="parametro_oculto" style="width:0px; height:0px;" value="<?php 
echo $parametro_oculto;
?>
"/>
    		<label class="menu_label" for="busqueda";>Codigo de contrato :</label>
    		<input class="menu_input" type="text" id="busqueda"> 
            <img class="menu_imagen" src="img/lupa2.png" id="busqueda_link" width="23" height="20"/>
            
     	</li>
开发者ID:neojoker,项目名称:blablabla,代码行数:31,代码来源:contratos.php

示例14: session_start

<?php

session_start();
$user = $_SESSION['userblanco'];
include "encabezado.php";
write_header('Solicitudes Pendientes');
write_body('Solicitudes Pendientes', $user);
write_notificacion();
////////////////////////////////////////////////////////ESPACIO PARA EL CODIGO CONSULTOR DE LA INFORMACION, FORMAR TODOS LOS ARRAY AQUI Y SOLO PINTAR EN MAS ADELANTE
$tofind = "ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ";
$replac = "abcdeeghijklaaoiqosuunwxyzabcdeeghijklmaoiqosuunwxyza";
$user = $_SESSION['userblanco'];
$ldappass = $_SESSION['pass'];
$ldaprdn = "electrotecnica\\" . $user;
$adServer = "pegasus.electrotecnica.local";
#replace with your AD server ip/hostname
$ldapconn = ldap_connect($adServer) or die("Couldn't connect to AD!");
// Bind to the directory server.
$ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass) or die("Couldn't bind to AD!");
$dn = 'OU=Electrotecnica,dc=electrotecnica,dc=local';
$filter = '(samaccountname=' . $user . ')';
$result = ldap_search($ldapconn, $dn, $filter);
$entries = ldap_get_entries($ldapconn, $result);
try {
    $nombre_completo = strtr($entries[0]['displayname'][0], $tofind, $replac);
    $departemt_propio = strtr($entries[0]['department'][0], $tofind, $replac);
} catch (Exception $e) {
}
$username = "root";
$password = "critical";
$hostname = "localhost";
开发者ID:neojoker,项目名称:blablabla,代码行数:31,代码来源:requests.php

示例15: write_header

<?php

include "./include.php";
$title = "SolarMonitor Slideshow";
$indexnum = "1";
$dir = "{$arm_data_path}data/{$date}/pngs";
?>

<html>
	<?php 
write_header($date, $title, $this_page);
?>
	<body onload="runSlideShow()">
		<center>
			<table background=common_files/brushed-metal.jpg width=830 border=0 cellpadding=0 cellspacing=0>
				<tr>
					<td background=common_files/brushed-top-big.jpg align=center colspan=3>
						<?php 
write_title($date, $title, $this_page, $indexnum);
?>
					</td>
				</tr>
				<tr>
					<td valign=top align=center>
						<?php 
write_left($date, -1);
?>
					</td>
    				<td>
						<table>
						<tr>
开发者ID:okludator,项目名称:solarmonitor,代码行数:31,代码来源:slideshow.php


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