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


PHP do_header函数代码示例

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


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

示例1: view_article

function view_article()
{
    do_header();
    include "templates/index_viewarticle.inc.php";
    build_matrix('news', $_REQUEST['id']);
    do_footer();
}
开发者ID:raziel23x,项目名称:Obsedb_CMS,代码行数:7,代码来源:index.php

示例2: main

 function main()
 {
     global $db;
     if (isset($_REQUEST['id'])) {
         $result = $db->Execute("SELECT * FROM `Obsedb_Mods` WHERE `id` = '{$_REQUEST['id']}' LIMIT 1");
         while ($row = $result->FetchNextObject()) {
             do_header();
             $header = new Template();
             $header->open_template('cheats_header');
             $header->addvar('{id}', $row->ID);
             $header->addvar('{title}', stripslashes($row->TITLE));
             $header->parse_template();
             $header->print_template();
             $cheats = $db->Execute("SELECT id,Modid,title,cheat FROM `Obsedb_cheats` WHERE `Modid` = '{$_REQUEST['id']}' ORDER BY `title`");
             while ($cheat = $cheats->FetchNextObject()) {
                 // CHEAT HTML
                 echo "<b>" . clean($cheat->TITLE) . "</b><br />\n      \t\t\t        " . stripslashes($cheat->CHEAT) . "<br /><br />";
                 // END CHEAT HTML
             }
             do_footer();
         }
     } else {
         do_header();
         echo "<b>System Error Message</b><br />";
         echo "You cannot access this page directly, please go back and select a Mod.<br />";
         echo "If the problem persists, please contact the webmaster.";
         do_footer();
     }
 }
开发者ID:raziel23x,项目名称:Obsedb_CMS,代码行数:29,代码来源:modCheatsClass.php

示例3: awshit

function awshit($deathmessage)
{
    global $headerisprinted;
    if (!$headerisprinted) {
        do_header('Barf Report', true);
    }
    printf('<div class="message_box">%s</div>', $deathmessage);
    do_footer();
    exit;
}
开发者ID:bonkersinc,项目名称:phux0red,代码行数:10,代码来源:inc.common.php

示例4: _display_password_form

function _display_password_form()
{
    bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');
    textdomain('postfixadmin');
    do_header('Postfixadmin Squirrelmail - Login');
    echo _('The PostfixAdmin plugin needs your current mailbox password');
    echo "<form action='' method='post'>";
    echo _('Password for');
    echo " " . $_SESSION['username'] . " :";
    echo "<input type='password' name='password' value=''>";
    echo "<input type='submit' value='" . _('Submit') . "'></form>";
    do_footer();
}
开发者ID:mpietruschka,项目名称:postfixadmin,代码行数:13,代码来源:functions.inc.php

示例5: handle_error

function handle_error($status = '404 Not Found', $header, $text)
{
    global $config;
    header('HTTP/1.0 ' . $status);
    header('Status: ' . $status);
    do_header();
    echo '<h3>' . $header . '</h3>';
    echo '<p class="warning">Sorry :-(</p>';
    echo '<p>' . $text . '</p>';
    echo '<p class="leave"><a href="' . $config['base'] . '">Go to ' . $config['shortener'] . '</a></p>';
    do_footer();
    die;
}
开发者ID:neiko,项目名称:nsamblr,代码行数:13,代码来源:go.php

示例6: view

 function view()
 {
     global $db;
     if (!is_numeric($_REQUEST['id'])) {
         die("Critical Error: Aborting script operations.");
     }
     $result = $db->Execute("SELECT * FROM Obsedb_companies WHERE id = {$_REQUEST['id']} LIMIT 1");
     $company = array();
     $company['title'] = stripslashes($result->fields['title']);
     $company['description'] = clean($result->fields['description']);
     if (!empty($result->fields['homepage'])) {
         $company['homepage'] = '<a href="' . stripslashes($result->fields['homepage']) . '" target="_blank">' . stripslashes($result->fields['homepage']) . '</a>';
     }
     if (!empty($result->fields['logo'])) {
         $company['logo'] .= "<img src=\"";
         $company['logo'] .= stripslashes($result->fields['logo']);
         $company['logo'] .= "\" alt=\"" . $company['title'] . " align=\"right\" hspace=\"2\" vspace=\"2\">";
     }
     $result = $db->Execute("\n\t\t\tSELECT id, title, section, developer\n\t\t\tFROM Obsedb_Mods\n\t\t\tWHERE developer = " . $_REQUEST['id'] . "\n\t\t\tORDER BY title;");
     while ($row = $result->FetchNextObject()) {
         $company['dev_links'] .= '<a href="Moddetails.php?id=' . $row->ID . '">' . stripslashes($row->TITLE) . '</a><br />';
     }
     $result = $db->Execute("\n\t\t\tSELECT id, title, section, publisher\n\t\t\tFROM Obsedb_Mods\n\t\t\tWHERE publisher = " . $_REQUEST['id'] . "\n\t\t\tORDER BY title;");
     while ($row = $result->FetchNextObject()) {
         $company['pub_links'] .= '<a href="Moddetails.php?id=' . $row->ID . '">' . stripslashes($row->TITLE) . '</a><br />';
     }
     do_header();
     $template = new Template();
     $template->open_template('company_profile');
     $template->addvar('{title}', $company['title']);
     $template->addvar('{homepage}', $company['homepage']);
     $template->addvar('{logo}', $company['logo']);
     $template->addvar('{description}', $company['description']);
     $template->parse_template();
     $template->print_template();
     if (!empty($company['dev_links'])) {
         $company_profile_devlinks = new Template();
         $company_profile_devlinks->open_template('company_profile_devlinks');
         $company_profile_devlinks->addvar('{links}', $company['dev_links']);
         $company_profile_devlinks->parse_template();
         $company_profile_devlinks->print_template();
     }
     if (!empty($company['pub_links'])) {
         $company_profile_publinks = new Template();
         $company_profile_publinks->open_template('company_profile_publinks');
         $company_profile_publinks->addvar('{links}', $company['pub_links']);
         $company_profile_publinks->parse_template();
         $company_profile_publinks->print_template();
     }
     do_footer();
 }
开发者ID:raziel23x,项目名称:Obsedb_CMS,代码行数:51,代码来源:modCompaniesClass.php

示例7: main

 function main()
 {
     global $db;
     do_header();
     if (!empty($_REQUEST['id'])) {
         $poll = $db->Execute("\n\t\t\t\tSELECT id,title\n\t\t\t\tFROM `Obsedb_polls`\n\t\t\t\tWHERE `id` = '" . $_REQUEST['id'] . "'");
         $result = $db->Execute("SELECT * FROM Obsedb_polls_options WHERE poll_id = '{$_REQUEST['id']}' ORDER BY id");
         while ($row = $result->FetchNextObject()) {
             $poll_options .= "<tr><td bgcolor='#FFFFFF'>" . stripslashes($row->TEXT) . " - {$row->COUNT} votes</td></tr>";
         }
         if ($poll->RecordCount() < 1) {
             include "templates/poll_error.inc.php";
         } else {
             include "templates/poll_view.inc.php";
         }
     }
     do_footer();
 }
开发者ID:raziel23x,项目名称:Obsedb_CMS,代码行数:18,代码来源:modPollsClass.php

示例8: main

 function main()
 {
     global $db;
     // Get Mod Info
     if (isset($_REQUEST['id'])) {
         $result = $db->Execute("SELECT * FROM `Obsedb_Mods` WHERE `id` = '{$_REQUEST['id']}' LIMIT 1");
         while ($row = $result->FetchNextObject()) {
             $cheats = $db->Execute("SELECT id,Modid FROM `Obsedb_cheats` WHERE Modid = {$_REQUEST['id']} LIMIT 1");
             if ($cheats->RecordCount() >= 1) {
                 $cheat_link = "<a href=\"cheats.php?id={$row->ID}\">Cheats</a>";
             } else {
                 $cheat_link = "Cheats";
             }
             do_header();
             $tplHeader = new Template();
             $tplHeader->open_template('downloads_header');
             $tplHeader->addvar('{title}', stripslashes($row->TITLE));
             $tplHeader->addvar('{id}', $row->ID);
             $tplHeader->addvar('{cheat_link}', $cheat_link);
             $tplHeader->parse_template();
             $tplHeader->print_template();
             $downloads = $db->Execute("SELECT id,Modid,title,download FROM `Obsedb_downloads` WHERE `Modid` = '{$_REQUEST['id']}' ORDER BY `title`");
             while ($download = $downloads->FetchNextObject()) {
                 // DOWNLOAD HTML
                 echo "<a href='" . stripslashes($download->DOWNLOAD) . "'>" . clean($download->TITLE) . "</a><br /><br />";
                 // END DOWNLOAD HTML
             }
             $tplFooter = new Template();
             $tplFooter->open_template('downloads_footer');
             $tplFooter->parse_template();
             $tplFooter->print_template();
             do_footer();
         }
     } else {
         do_header();
         echo "<b>System Error Message</b><br />";
         echo "You cannot access this page directly, please go back and select a Mod.<br />";
         echo "If the problem persists, please contact the webmaster.";
         do_footer();
     }
 }
开发者ID:raziel23x,项目名称:Obsedb_CMS,代码行数:41,代码来源:modDownloadsClass.php

示例9: mailbag_main

function mailbag_main()
{
    global $db;
    do_header();
    $tplHeader = new Template();
    $tplHeader->open_template('mailbag_header');
    $tplHeader->print_template();
    $tplItem = new Template();
    $tplItem->open_template('mailbag_item');
    $result = $db->Execute("SELECT * FROM `Obsedb_mailbag` ORDER BY `id` DESC");
    while ($row = $result->FetchNextObject()) {
        $tplItem->addvar('{title}', stripslashes($row->TITLE));
        $tplItem->addvar('{message}', clean($row->MESSAGE));
        $tplItem->addvar('{reply}', clean($row->REPLY));
        $tplItem->parse_template();
        $tplItem->print_template();
    }
    $tplFooter = new Template();
    $tplFooter->open_template('mailbag_footer');
    $tplFooter->print_template();
    do_footer();
}
开发者ID:raziel23x,项目名称:Obsedb_CMS,代码行数:22,代码来源:mailbag.php

示例10: do_modified_headers

}
do_modified_headers($link->modified, $current_user->user_id . '-' . $globals['link_id'] . '-' . $link->comments . '-' . $link->modified);
// Enable user AdSense
// do_user_ad: 0 = noad, > 0: probability n/100
if ($link->status == 'published' && $link->user_karma > 7 && !empty($link->user_adcode)) {
    $globals['do_user_ad'] = $link->user_karma;
    $globals['user_adcode'] = $link->user_adcode;
    $globals['user_adchannel'] = $user->adchannel;
}
if ($link->status != 'published') {
    $globals['do_vote_queue'] = true;
}
if (!empty($link->tags)) {
    $globals['tags'] = $link->tags;
}
do_header($link->title, 'post');
// Show the error if the comment couldn't be inserted
if (!empty($new_comment_error)) {
    echo '<script type="text/javascript">';
    echo '$(function(){alert(\'' . _('comentario no insertado') . ":  {$new_comment_error}" . '\')});';
    echo '</script>';
}
do_banner_top();
echo '<div id="container">' . "\n";
do_sidebar(false);
echo '<div id="contents">';
do_tabs("main", _('noticia'), true);
$link->print_summary();
switch ($tab_option) {
    case 1:
    case 2:
开发者ID:brainsqueezer,项目名称:fffff,代码行数:31,代码来源:story.php

示例11: include

// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
// 		http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
include('config.php');
include(mnminclude.'html1.php');
include(mnminclude.'link.php');
include(mnminclude.'tags.php');

force_authentication();



do_header(_("editar noticia"), "post");
do_navbar(_('editar noticia'));


echo '<div id="genericform-contents">'."\n";

if (!empty($_REQUEST['id']) && is_numeric($_REQUEST['id'])) { 
	$linkres=new Link;
	$linkres->id=$link_id = intval($_REQUEST['id']);
	$linkres->read();
	if (!$linkres->is_editable() || intval($_GET['user'] != $current_user->user_id)) {
		echo '<div class="form-error-submit">&nbsp;&nbsp;'._("noticia no modificable").'</div>'."\n";
		return;
	} 
	if ($_POST['phase'] == "1") 
		do_save();
开发者ID:BackupTheBerlios,项目名称:meneamenet-svn,代码行数:31,代码来源:editlink.php

示例12: geo_init

<?php

// The source code packaged with this file is Free Software, Copyright (C) 2007 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
// 		http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
include 'config.php';
include mnminclude . 'html1.php';
include mnminclude . 'geo.php';
geo_init('onLoad', false, 2);
array_push($globals['extra_js'], 'markermanager.js');
do_header(_('mapa de las últimas noticias') . ' | ' . _('menéame'));
do_tabs('main', 'map');
/*** SIDEBAR ****/
echo '<div id="sidebar">';
do_banner_right();
do_vertical_tags();
echo '</div>' . "\n";
/*** END SIDEBAR ***/
echo '<div id="newswrap">' . "\n";
echo '<div class="topheading"><h2>' . _('noticias de las últimas 24 horas') . '</h2></div>';
echo '<div style="margin:0 0 10px 20px; text-align:center">';
echo '<form action="" id="map-control" name="map-control">';
echo '<label>' . _('publicadas') . '&nbsp;<img src="' . $globals['base_static'] . 'img/geo/common/geo-published01.png" width="20" height="25" alt="' . _('publicadas') . '" title="' . _('publicadas') . '"/><input type="checkbox" checked="checked"  id="published" onclick="toggle(\'published\')" /></label>';
echo '&nbsp;&nbsp;&nbsp;';
echo '<label>' . _('pendientes') . '&nbsp;<img src="' . $globals['base_static'] . 'img/geo/common/geo-new01.png" width="20" height="25" alt="' . _('pendientes') . '" title="' . _('pendientes') . '"/><input type="checkbox" checked="checked"  id="queued" onclick="toggle(\'queued\')" /></label>';
echo '&nbsp;&nbsp;&nbsp;';
echo '<label>' . _('autores') . '&nbsp;<img src="' . $globals['base_static'] . 'img/geo/common/geo-user01.png" width="20" height="25" alt="' . _('autores') . '" title="' . _('autores') . '"/><input type="checkbox"  id="author" onclick="toggle(\'author\')" /></label>';
echo '</form>';
开发者ID:brainsqueezer,项目名称:fffff,代码行数:31,代码来源:map.php

示例13: do_submit_cancel

    do_submit_cancel('', __('Regresar'), $return_url);
} elseif (!empty($CFG->public_proposals) && preg_match('#^general/proposals/\\d+$#', $q)) {
    define('Context', 'main');
    define('Action', 'viewproposal');
    $return_url = get_url('general/proposals');
    do_header(__('Detalles de propuesta'));
    include $CFG->comdir . 'prop_view.php';
} elseif (!empty($CFG->public_proposals) && preg_match('#^general/proposals/\\d+/files/\\d+/?.*$#', $q)) {
    define('Context', 'main');
    define('Action', 'downloadfile');
    include $CFG->comdir . 'prop_files_download.php';
} elseif (preg_match('#^general/information$#', $q)) {
    do_header(__('Modalidades de participación'));
    include $CFG->tpldir . 'proposals_info.tmpl.php';
    do_submit_cancel('', __('Regresar'), get_url());
} elseif (preg_match('#^admin/?.*#', $q)) {
    // Delegate routing
    include $CFG->incdir . 'admin_views.php';
} elseif (preg_match('#^speaker/?.*#', $q)) {
    // Delegate routing
    include $CFG->incdir . 'speaker_views.php';
} elseif (preg_match('#^person/?.*#', $q)) {
    // Delegate routing
    include $CFG->incdir . 'person_views.php';
} else {
    do_header(__('Página no encontrada'));
    include $CFG->tpldir . 'error_404.tmpl.php';
    do_submit_cancel('', __('Regresar'));
}
// finally
do_footer();
开发者ID:BackupTheBerlios,项目名称:yupana,代码行数:31,代码来源:index.php

示例14: array

$words_limit = 100;
$line_height = $max_pts * 0.75;
$range_names = array(_('48 horas'), _('última semana'), _('último mes'), _('último año'), _('todas'));
$range_values = array(172800, 604800, 2592000, 31536000, 0);
if (($from = check_integer('range')) >= 0 && $from < count($range_values) && $range_values[$from] > 0) {
    $from_time = time() - $range_values[$from];
    $from_where = "FROM tags, links WHERE  tag_lang='{$dblang}' and tag_date > FROM_UNIXTIME({$from_time}) and link_id = tag_link_id and link_status != 'discard'";
    $time_query = "&amp;from={$from_time}";
} else {
    $from_where = "FROM tags, links WHERE tag_lang='{$dblang}' and link_id = tag_link_id and link_status != 'discard'";
}
$from_where .= " GROUP BY tag_words";
$max = max($db->get_var("select count(*) as words {$from_where} order by words desc limit 1"), 2);
//echo "MAX= $max\n";
$coef = ($max_pts - $min_pts) / ($max - 1);
do_header(_('nube de etiquetas'));
do_navbar(_('etiquetas'));
echo '<div id="contents">';
echo '<h2>+ ' . $words_limit . '</h2>';
echo '<div style="margin: 20px 0 20px 0; line-height: ' . $line_height . 'pt; margin-left: 100px;">';
$res = $db->get_results("select tag_words, count(*) as count {$from_where} order by count desc limit {$words_limit}");
if ($res) {
    foreach ($res as $item) {
        $words[$item->tag_words] = $item->count;
    }
    ksort($words);
    foreach ($words as $word => $count) {
        $size = intval($min_pts + ($count - 1) * $coef);
        echo '<span style="font-size: ' . $size . 'pt"><a href="index.php?search=tag:' . urlencode($word) . $time_query . '">' . $word . '</a></span>&nbsp;&nbsp; ';
    }
}
开发者ID:brainsqueezer,项目名称:fffff,代码行数:31,代码来源:cloud.php

示例15: do_header

<?php

include '../inc/header.php';
do_header('Thanks');
$thanks = array('commit' => array('Thank you', 'Thank you for committing to vote November 3!'), 'contrib' => array('Thank you', 'Thank you for your contribution!'), 'vol' => array('Thank you', 'Thank you for signing up to volunteer!'), 'signup' => array('Thank you!', 'Please check your inbox for an email and click the link to confirm your email address.'), 'confirm' => array('Thank you', 'Thank you for confirming your email address!'));
?>

<div class="container-12">
    <div class="row">
        <div class="grid-12 alpha omega">
            <h1><?php 
echo $thanks[$_GET['ty']][0];
?>
</h1>
            <h2><?php 
echo $thanks[$_GET['ty']][1];
?>
</h2>
        </div>
    </div>
    <div class="row module-container">
        <div class="endorse-module grid-4 alpha">
            <h3 class="module-header">Endorsements</h3>
            <?php 
include '../inc/endorse-list.php';
endorseList(true);
?>
        </div>
        <div class="twitter-module grid-4 omega push-4">
            <script>
                !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
开发者ID:kedruff,项目名称:kedruff.github.io,代码行数:31,代码来源:index.php


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