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


PHP lmt_page_header函数代码示例

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


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

示例1: show_page

function show_page()
{
    lmt_page_header('Undelete');
    echo <<<HEREDOC
      <h1><span class="dontMess">**</span>Undelete</h1>
      
      <h3>Individuals</h3>

HEREDOC;
    $result = DB::queryRaw('SELECT id, name FROM individuals WHERE deleted="1"');
    $row = mysqli_fetch_assoc($result);
    while ($row) {
        echo '      <a href="Undelete?Individual=' . htmlentities($row['id']) . '">' . htmlentities($row['name']) . '</a><br />' . "\n";
        $row = mysqli_fetch_assoc($result);
    }
    echo "\n      <h3>Teams</h3>\n";
    $result = DB::queryRaw('SELECT team_id, name FROM teams WHERE deleted="1"');
    $row = mysqli_fetch_assoc($result);
    while ($row) {
        echo '      <a href="Undelete?Team=' . htmlentities($row['team_id']) . '">' . htmlentities($row['name']) . '</a><br />' . "\n";
        $row = mysqli_fetch_assoc($result);
    }
    echo "\n      <h3>Schools</h3>\n";
    $result = DB::queryRaw('SELECT school_id, name FROM schools WHERE deleted="1"');
    $row = mysqli_fetch_assoc($result);
    while ($row) {
        echo '      <a href="Undelete?School=' . htmlentities($row['school_id']) . '">' . htmlentities($row['name']) . '</a><br />' . "\n";
        $row = mysqli_fetch_assoc($result);
    }
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:30,代码来源:Undelete.php

示例2: show_page

function show_page()
{
    global $javascript;
    $javascript = <<<HEREDOC
      window.onbeforeunload = function (evt) {
        return "If you navigate away from this page, you will have to re-select your teams!";
      }
HEREDOC;
    lmt_page_header('Guts Round');
    echo <<<HEREDOC
      <h1>Guts Round</h1>
      
      <table id="gutsTable">
        <tr>
          <td><object class="gutsFrame" data="Embed" type="text/html"></object></td>
          <td><object class="gutsFrame" data="Embed" type="text/html"></object></td>
        </tr><tr>
          <td><object class="gutsFrame" data="Embed" type="text/html"></object></td>
          <td><object class="gutsFrame" data="Embed" type="text/html"></object></td>
        </tr><tr>
          <td><object class="gutsFrame" data="Embed" type="text/html"></object></td>
          <td><object class="gutsFrame" data="Embed" type="text/html"></object></td>
        </tr>
      </table>
HEREDOC;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:26,代码来源:Enter_Scores.php

示例3: show_page

function show_page($err)
{
    lmt_page_header('Refrigerator');
    if (scoring_is_enabled()) {
        $scoring_status = 'Enabled';
        $scoring_action = 'lmt_freeze_scoring';
        $scoring_action_name = 'Freeze';
    } else {
        $scoring_status = 'Frozen';
        $scoring_action = 'lmt_enable_scoring';
        $scoring_action_name = 'Enable';
    }
    echo <<<HEREDOC
      <h1><span class="dontMess">*</span>Refrigerator</h1>
      
      <div class="text-centered">
        <span class="b red">WARNING: The only person who should use this page is the Scoring Czar!</span>
        <div class="halfbreak"></div>
        Before printing results, disable score entry using this feature.
        <div class="halfbreak"></div>
        If you need to re-enable scoring, first destroy all printed copies of the results list,<br />
        and make sure to re-freeze scoring and refresh your browser before viewing it again!
        <br /><br />
        <form method="post" action="{$_SERVER['REQUEST_URI']}"><div>
          <input type="hidden" name="xsrf_token" value="{$_SESSION['xsrf_token']}" />
          <input type="submit" name="{$scoring_action}" value="{$scoring_action_name}" />
        </div></form>
      </div>
HEREDOC;
    die;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:31,代码来源:Refrigerator.php

示例4: show_page

function show_page()
{
    global $body_onload;
    $body_onload = 'document.forms[\'lmtSearchAll\'].Query.focus()';
    global $jquery_function;
    $jquery_function = <<<HEREDOC
      //<![CDATA[
      \$.widget( "custom.catcomplete", \$.ui.autocomplete, {
        _renderMenu: function( ul, items ) {
          var self = this,
          currentCategory = "";
          \$.each( items, function( index, item ) {
            if ( item.category != currentCategory ) {
              ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
              currentCategory = item.category;
            }
            self._renderItem( ul, item );
          });
        }
      });
      \$(function() {
        \$( "#autocomplete" ).catcomplete({
          source: "../Autocomplete?School&Team&Individual"
        });
      });
      //]]>
HEREDOC;
    lmt_page_header('Data Home');
    echo <<<HEREDOC
      <h1>Data Home</h1>
      
      <div class="text-centered b">WARNING: Please be careful when changing information through the Data pages.
      When in doubt (or if you think you might have messed something up), ask the Tech Czar.</div>
      
      <h3>Search</h3>
      <form id="lmtSearchAll" method="get" action="../Search"><div>
        <input type="text" id="autocomplete" name="Query" size="35" />
        <input type="hidden" name="Scope" value="School Team Individual" />
        <input type="hidden" name="From" value="Data Home" />
        <input type="hidden" name="Return" value="Data" />
        <input type="submit" value="Search" />
      </div></form>
      
      <h3>View Data</h3>
      <table class="contrasting">
        <tr><td><a href="List?Schools">Schools &amp; Coaches</a></td></tr>
        <tr><td><a href="List?Teams">Teams</a></td></tr>
        <tr><td><a href="List?Individuals">All Individuals</a></td></tr>
        <tr><td><a href="List?Unaffiliated">Unaffiliated Individuals</a></td></tr>
      </table>
      
      <h3 class="smbottom">Add</h3>
      <span class="small b" style="color: #d00;">(Can cause major problems. Ask the Tech Czar first, really!)</span>
      <div class="halfbreak"></div>
      ...<a href="Add?School">a School</a><br />
      ...<a href="Add?Team">a Team</a><br />
      ...<a href="Add?Individual">an Individual</a><br />
      ...<a href="Undelete">Undelete</a>
HEREDOC;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:60,代码来源:Home.php

示例5: show_page

function show_page()
{
    $row = DB::queryFirstRow('SELECT * FROM pages WHERE page_id="' . mysqli_real_escape_string(DB::get(), $_GET['ID']) . '"');
    $name = htmlentities($row['name']);
    $content = "      " . str_replace("\n", "\n      ", $row['content']);
    if (strpos($content, '<h1>') != 6) {
        $content = '<h1></h1><br /><br />' . $content;
    }
    global $LMT_EMAIL;
    $content = str_replace('{CONTACT_LINK}', email_obfuscate($LMT_EMAIL, null, '<span class="b">Please email us at:</span> '), $content);
    $page_id = htmlentities($_GET['ID']);
    global $use_rel_external_script;
    $use_rel_external_script = true;
    lmt_page_header($name);
    echo <<<HEREDOC
\t  <div style="float: left; margin-top: 40px;">
        <a href="List"><img src="../../../res/icons/arrow_left.png" alt="" /> Return to Page List</a>
        <div class="halfbreak"></div>
        <a href="Edit?ID={$page_id}"><img src="../../../res/icons/edit.png" alt="" /></a>
        <a href="Delete?ID={$page_id}"><img src="../../../res/icons/delete.png" alt="" /></a>
      </div>
      

HEREDOC;
    echo $content;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:26,代码来源:View.php

示例6: show_page

function show_page()
{
    // If the Registration page does not exist, add it
    if (DB::queryFirstField('SELECT COUNT(*) FROM pages WHERE page_id="-1"') == 0) {
        $new_order_num = DB::queryFirstField('SELECT (MIN(order_num) - 1) AS new_order FROM pages');
        DB::insert('pages', array('page_id' => '-1', 'name' => 'Registration', 'content' => '', 'order_num' => $new_order_num));
    }
    lmt_page_header('Page List');
    $delete_alert = fetch_alert('deletePage');
    echo <<<HEREDOC
      <h1>Page List</h1>
      {$delete_alert}
      <a href="Add"><img src="../../../res/icons/add.png" alt="+" /> Add a Page</a><br />
      <a href="Add_Separator?xsrf_token={$_SESSION['xsrf_token']}"><img src="../../../res/icons/add.png" alt="+" /> Add a Separator</a><br />
      <br />
      <h4 class="smbottom">Pages</h4>
HEREDOC;
    $table = lmt_db_table('SELECT page_id, name, order_num FROM pages ORDER BY order_num', array('name' => ''), array('<img src="../../../res/icons/eye.png" alt="View" />' => 'View?ID={page_id}', '<img src="../../../res/icons/edit.png" alt="Edit" />' => 'Edit?ID={page_id}', '<img src="../../../res/icons/delete.png" alt="Delete" />' => 'Delete?ID={page_id}'), 'No Pages', 'contrasting indented', array('page' => 'Order', 'field' => 'page_id'));
    //Make the Separators come out nicely
    $search = '#<td></td>(\\s+)<td><a href="View\\?ID=(\\d+)"><img src="../../../res/icons/eye.png" alt="View" /></a></td>(\\s+)<td><a href="Edit\\?ID=(\\d+)"><img src="../../../res/icons/edit.png" alt="Edit" /></a></td>(\\s+)<td><a href="Delete\\?ID=(\\d+)"><img src="../../../res/icons/delete.png" alt="Delete" /></a></td>(\\s+)</tr>#';
    $replace = '<td>[Separator]</td>${1}<td></td>${1}<td></td>${1}<td><a href="Delete_Separator?ID=${2}&amp;xsrf_token=' . $_SESSION['xsrf_token'] . '"><img src="../../../res/icons/delete.png" alt="Delete" /></a></td>${1}</tr>';
    $table = preg_replace($search, $replace, $table);
    // Make Registration uneditable
    $search = '#<td><a href="View\\?ID=-1"><img src="../../../res/icons/eye.png" alt="View" /></a></td>(\\s+)<td><a href="Edit\\?ID=-1"><img src="../../../res/icons/edit.png" alt="Edit" /></a></td>(\\s+)<td><a href="Delete\\?ID=-1"><img src="../../../res/icons/delete.png" alt="Delete" /></a></td>(\\s+)</tr>#';
    $replace = '<td></td>${1}<td></td>${1}<td></td>${1}</tr>';
    $table = preg_replace($search, $replace, $table);
    echo $table;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:28,代码来源:List.php

示例7: show_form

function show_form()
{
    lmt_page_header('Pre-LMT');
    ?>
	<h1>Pre-LMT</h1>
	<p>This page is for preparing things before each LMT. If you're not an admin, you <b>should not be here</b>. 
  <b>If you are an admin, please follow <i>every</i> step on this page.</b></p>
<?php 
    die;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:10,代码来源:Pre_LMT.php

示例8: lmt_custom_errors

function lmt_custom_errors($errno, $errstr, $errfile, $errline)
{
    $rh = fopen(PATH::errfile(), 'a+');
    fwrite($rh, date(DATE_RFC822) . ' Error [' . $errno . '] on line ' . $errline . ' in ' . $errfile . ': ' . $errstr . "\n");
    fclose($rh);
    global $miniature_page;
    if (isset($miniature_page)) {
        $miniature_page = '?Mini';
    }
    if (headers_sent()) {
        echo '<meta http-equiv="refresh" content="0;url=' . URL::root() . '/LMT/Error' . $miniature_page . '">';
    } else {
        if (isset($_GET['xsrf_token'])) {
            header('Location: ' . URL::root() . '/LMT/Error' . $miniature_page);
        } else {
            if (isset($miniature_page)) {
                $urlroot = URL::root();
                echo <<<HEREDOC
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title></title>
    <link rel="stylesheet" href="{$urlroot}/res/default.css" type="text/css" media="all" />
    <link rel="stylesheet" href="{$urlroot}/res/lmt.css" type="text/css" media="all" />
    <link rel="stylesheet" href="{$urlroot}/res/print.css" type="text/css" media="print" />
  </head>
  
  <body class="gutsEmbedSetup">
    <div style="width: 350px; height: 30px; background-color: #fd0; margin: -10px;"></div>
    <br />
    <br />
    <div class="text-centered b">
      An error occurred.
      <div class="halfbreak"></div>
      (<a href="{$_SERVER['REQUEST_URI']}">reload</a>)
    </div>
  </body>
</html>
HEREDOC;
            } else {
                header("HTTP/1.1 500 Internal Server Error");
                lmt_page_header('Error');
                echo <<<HEREDOC
      <h1>Error</h1>
      
      Whoops! Something went wrong. Try again?
HEREDOC;
            }
        }
    }
    die;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:55,代码来源:lmt-functions.php

示例9: preview_message

function preview_message()
{
    if (!validate_message()) {
        return;
    }
    global $subject, $bb_body, $body, $email, $EMAIL_ADDRESS, $LMT_EMAIL;
    // Get info for the byline
    $query = 'SELECT name, email FROM users WHERE id="' . $_SESSION['user_id'] . '"';
    $result = DB::queryRaw($query);
    $row = mysqli_fetch_assoc($result);
    $disp_subject = '[LMT ' . htmlentities(map_value('year')) . '] ' . $subject;
    lmt_page_header('Email Coaches');
    echo <<<HEREDOC
      <h1>Email Coaches</h1>
      
      <table class="spacious">
        <tr>
          <td>From:</td>
          <td><span class="b">LMT Mailbot &lt;{$EMAIL_ADDRESS}&gt;</span></td>
        </tr><tr>
          <td>Reply To:&nbsp;</td>
          <td><span class="b">{$LMT_EMAIL}</span><br /></td>
        </tr><tr>
          <td>Subject:</td>
          <td><span class="b">{$disp_subject}</span><br /><br /></td>
        </tr><tr>
          <td>Body:</td>
          <td>{$bb_body}<br /><br /></td>
        </tr><tr>
          <td></td>
          <td>
            <form id="composeMessage" method="post" action="{$_SERVER['REQUEST_URI']}"><div>
              <input type="hidden" name="subject" value="{$subject}" />
              <input type="hidden" name="body" value="{$body}" />
              <input type="hidden" name="email" value="{$email}" />
              <input type="hidden" name="xsrf_token" value="{$_SESSION['xsrf_token']}" />
              <input type="submit" name="lmtc_do_reedit_message" value="Back to Editing" />
              <input type="submit" name="lmtc_do_post_message" value="Send Message" />
            </div></form>
          </td>
        </tr><tr>
          <td></td>
          <td><span class="small">Please do not click the &quot;Send Message&quot; button twice!</span></td>
        </tr>
      </table>
      

HEREDOC;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:49,代码来源:Coaches.php

示例10: show_frozen_page

function show_frozen_page()
{
    if (scoring_is_enabled()) {
        trigger_error('Error: Scoring is enabled!', E_USER_ERROR);
    }
    lmt_page_header('Scoring Frozen');
    echo <<<HEREDOC
      <h1>Scoring Frozen</h1>
      
      <div class="text-centered b">Scoring has been frozen so that results
      may be tabulated. If some results have not yet been entered or are incorrect,
      please see the Head Grader immediately!</div>
HEREDOC;
    die;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:15,代码来源:Scoring_Frozen.php

示例11: do_signout

function do_signout()
{
    session_destroy();
    unset($_SESSION);
    session_start();
    lmt_page_header('Signed Out');
    echo <<<HEREDOC
      <h1>Signed Out</h1>
      
      <div class="text-centered">
        You have been signed out. You may continue to add or modify teams until<br />
        registration closes through the link in the confirmation email.
      </div>
HEREDOC;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:15,代码来源:Signout.php

示例12: show_form

function show_form($err)
{
    global $use_rel_external_script;
    $use_rel_external_script = true;
    lmt_page_header('Edit Page');
    if ($err != '') {
        $err = "\n        <div class=\"error\">{$err}</div><br />\n";
    }
    @($name = htmlentities($_POST['name']));
    @($content = htmlentities($_POST['content']));
    // Fetch data if this is the first time the form has been shown
    if ($name == '' || $content == '') {
        $row = DB::queryFirstRow('SELECT name, content FROM pages WHERE page_id="' . mysqli_real_escape_string(DB::get(), $_GET['ID']) . '"');
        if ($name == '') {
            $name = htmlentities($row['name']);
        }
        if ($content == '') {
            $content = htmlentities($row['content']);
        }
    }
    echo <<<HEREDOC
      <h1>Edit Page</h1>
      {$err}
      <form id="lmtAddPage" method="post" action="{$_SERVER['REQUEST_URI']}">
        <table class="spacious">
          <tr>
            <td>Title:</td>
            <td><input type="text" name="name" value="{$name}" size="25" maxlength="25" /></td>
          </tr><tr>
            <td>Content:&nbsp;</td>
            <td>
              <textarea name="content" rows="25" cols="80" class="code">{$content}</textarea>
              <div class="small">Please write XHTML-compliant code.<br />
              Links marked with rel=&quot;external&quot; open in a new window. Links are relative to /LMT.</div><br />
            </td>
          </tr><tr>
            <td></td>
            <td>
              <input type="hidden" name="xsrf_token" value="{$_SESSION['xsrf_token']}" />
              <input type="submit" name="lmt_do_edit_page" value="Save Changes" />
              &nbsp;&nbsp;<a href="List">Cancel</a><br /><br /><br />
            </td>
          </tr>
        </table>
      </form>
HEREDOC;
    die;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:48,代码来源:Edit.php

示例13: show_page

function show_page()
{
    global $meta_refresh;
    $meta_refresh = '900; URL=Backup';
    lmt_page_header('Backup');
    echo <<<HEREDOC
      <h1>Backup</h1>
      
      <div class="text-centered b">
        This page will generate a database backup and refresh every 15 minutes.
      </div>
      
      <iframe src="Backup?Download" style="display: none;">
      </iframe>
HEREDOC;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:16,代码来源:Backup.php

示例14: show_page

function show_page()
{
    lmt_page_header('Guts Extra');
    echo <<<HEREDOC
      <h1>Guts Extra</h1>
      
      <span class="b">Average x:</span> 
HEREDOC;
    $c_sub = "SELECT (SELECT AVG(guts_ans_c) FROM teams WHERE deleted=\"0\") as avg";
    $row = DB::queryFirstRow($c_sub);
    $avg = $row['avg'];
    if ($avg == '' || is_null($avg)) {
        $avg = '0';
    }
    echo $avg;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:16,代码来源:Extra.php

示例15: show_page

function show_page()
{
    global $header_noprint;
    $header_noprint = true;
    lmt_page_header('Attendance Sheets');
    echo <<<HEREDOC
      <h1 class="noPrint">Attendance Sheets</h1>
      
      <div class="text-centered b noPrint">To generate attendance sheets for the coaches, please print<br />
      this page single-sided in portrait mode at normal size.</div>
      
      <div class="printOnly">

HEREDOC;
    $result = DB::queryRaw('SELECT team_id, teams.name AS team_name, teams.school AS school_id,' . ' schools.name AS school_name FROM teams LEFT JOIN schools' . ' ON teams.school=schools.school_id WHERE teams.deleted="0" ORDER BY school_name, team_name');
    $row = mysqli_fetch_assoc($result);
    while ($row) {
        $team_id = htmlentities($row['team_id']);
        $team_name = htmlentities($row['team_name']);
        $school = htmlentities($row['school_name']);
        if ($school == '') {
            $school = 'None';
        }
        echo <<<HEREDOC
\t\t<h2 style="float: right;">{$team_id}</h2>
        <h1 style="text-align: left; margin: 0;">{$team_name}</h1>
        <h3 class="i noMargin">{$school}</h3>
        <br /><br />
HEREDOC;
        $result2 = DB::queryRaw('SELECT name FROM individuals WHERE team="' . mysqli_real_escape_string(DB::get(), $team_id) . '" AND deleted="0" ORDER BY name');
        $row2 = mysqli_fetch_assoc($result2);
        if (!$row2) {
            echo "\n" . '        <h3 class="text-centered">No Members</span>' . "\n\n";
        }
        while ($row2) {
            $name = htmlentities($row2['name']);
            echo "\n" . '        <div class="attendPerson"><div class="checkBox"></div>' . $name . '</div>';
            $row2 = mysqli_fetch_assoc($result2);
        }
        echo "\n" . '        <div class="pageBreak"></div>' . "\n\n";
        $row = mysqli_fetch_assoc($result);
    }
    echo "      </div>";
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:44,代码来源:Print.php


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