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

PHP template_header函数代码示例

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

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



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

示例1: template_header

<?php

template_header('INACTIVE EMPLOYEE');
template_navigation();
$obj->only("users");
$obj->noaccess("superadmin");
define("BACK_PAGE", "inactive_employee");
define("THIS_PAGE", "inactive_employee_reg");
define("TABLE", "tbl_employee");
require_once 'config/updatedelete.php';
if (isset($_POST['btn-save'])) {
    $form = $_POST;
    extract($_POST);
    if ($pdo->existData(TABLE, array('employee_id' => $form['employee_id'])) == false) {
        if ($obj->if_match($_SESSION['userType'], "hr")) {
            $params = array('name' => $form['name'], 'employee_id' => $form['employee_id'], 'type' => $form['type'], 'gender' => $form['gender'], 'birthdate' => $form['birthdate'], 'address' => $form['address'], 'designation' => $form['designation'], 'hire' => $form['hire']);
        } else {
            if ($obj->if_match($_SESSION['userType'], "accounting")) {
                $params = array('tax' => $form['tax'], 'sss' => $form['sss'], 'pag_ibig' => $form['pag_ibig'], 'philhealth' => $form['philhealth'], 'sss_loan' => $form['sss_loan'], 'pag_ibig_loan' => $form['pag_ibig_loan'], 'salary' => $form['salary'], 'company_loan' => $form['company_loan']);
            }
        }
        if ($pdo->insertData(TABLE, $params)) {
            $message = $obj->_message("success", "Save Successfully");
        }
    } else {
        $message = $obj->_message("error", "Employee ID is already exist");
    }
}
if (isset($_POST['btn-update'])) {
    $form = $_POST;
    if ($obj->if_match($_SESSION['userType'], "hr")) {
开发者ID:jhernani,项目名称:TAN,代码行数:31,代码来源:inactive_employee_reg.php


示例2: get_option

/style.css" media="screen"/>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<script language="JavaScript" type="text/javascript" src="<?php 
echo get_option('baseurl');
?>
inc/js/jquery.js"></script>
<script language="JavaScript" type="text/javascript" src="<?php 
echo get_option('baseurl');
?>
inc/js/jquery.scrollTo.js"></script>
<script language="JavaScript" type="text/javascript" src="<?php 
template_directory();
?>
/effects.js"></script>
<?php 
template_header();
?>
</head>
<body class="river-page">
<div id="navigation">
  	<a href="<?php 
template_siteurl();
?>
">
	<img src="<?php 
template_siteurl();
?>
admin/logo-small.png" alt="<?php 
template_sitename();
?>
" title="<?php 
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:index.php


示例3: die404

function die404()
{
    header('HTTP/1.1 404 Not Found');
    template_header('HTTP/1.1 404 Not Found');
    template_navigation();
    echo '';
    template_footer();
}
开发者ID:jhernani,项目名称:TAN,代码行数:8,代码来源:common.template.php


示例4: show_log

/**
 * show_log
 *
 * Actually show the log for this specific day
 *
 * @param PDO $db A PDO object referring to the database
 * @param string $table The name of the logging table 
 * @return void
 * @author Eli White <[email protected]>
 **/
function show_log(PDO $db, $table)
{
    $channel = $_GET['c'];
    $host = $_GET['h'];
    $day = $_GET['d'];
    $parts = explode('-', $day);
    $formatted_date = "{$parts[0]}-{$parts[1]}-{$parts[2]}";
    // Begin the HTML page:
    template_header('Date: ' . utf8specialchars($formatted_date) . ' - Channel: ' . utf8specialchars($channel) . ' (' . utf8specialchars($host) . ')');
    // Query the database to get all log lines for this date:
    $prepared = $db->prepare("SELECT time(`created_on`) AS t, type, nick, message\n         FROM {$table}\n         WHERE `host` = ? AND `channel` = ? AND date(`created_on`) = ?\n         ORDER by `created_on` asc");
    $prepared->execute(array($host, $channel, $day));
    // Loop through each line,
    foreach ($prepared as $result) {
        // Prepare some basic details for output:
        $color = nick_color($result->nick);
        $time = utf8specialchars($result->t);
        $msg = utf8specialchars($result->message);
        $nick = utf8specialchars($result->nick);
        $type = false;
        // Now change the format of the line based upon the type:
        switch ($result->type) {
            case 'privmsg':
                // PRIVMSG (A Regular Message)
                echo "[{$time}] <span style=\"color:#{$color};\">" . "&lt;{$nick}&gt;</span> {$msg}<br />\n";
                break;
            case 'action':
                // ACTION (emote)
                echo "[{$time}] <span style=\"color:#{$color};\">" . "*{$nick} {$msg}</span><br />\n";
                break;
            case 'join':
                // JOIN
                echo "[{$time}] -> {$nick} joined the room.<br />\n";
                break;
            case 'part':
                // PART (leaves channel)
                echo "[{$time}] -> {$nick} left the room: {$msg}<br />\n";
                break;
                /* Not currently logged 
                   case 3: // QUIT (quits the server)
                       echo "[$time] -> {$nick} left the server: {$msg}<br />\n";
                       break;
                   case 6: // NICK (changes their nickname)
                       echo "[$time] -> {$nick} is now known as: {$msg}<br />\n";
                       break;
                   case 7: // KICK (booted)
                       echo "[$time] -> {$nick} boots {$msg} from the room.<br />\n";
                       break;
                   case 8: // MODE (changed their mode)
                       $type = 'MODE';
                   case 9: // TOPIC (changed the topic)
                       $type = $type ? $type : 'TOPIC';
                       echo "[$time] -> {$nick}: :{$type}: {$msg}<br />\n";
                   */
        }
    }
    // Finish up the page:
    template_footer();
}
开发者ID:phergie,项目名称:phergie,代码行数:69,代码来源:index.php


示例5: obExit

/**
 * Ends execution.
 *
 * What it does:
 * - Takes care of template loading and remembering the previous URL.
 * - Calls ob_start() with ob_sessrewrite to fix URLs if necessary.
 *
 * @param bool|null $header = null
 * @param bool|null $do_footer = null
 * @param bool $from_index = false
 * @param bool $from_fatal_error = false
 */
function obExit($header = null, $do_footer = null, $from_index = false, $from_fatal_error = false)
{
    global $context, $txt;
    static $header_done = false, $footer_done = false, $level = 0, $has_fatal_error = false;
    // Attempt to prevent a recursive loop.
    ++$level;
    if ($level > 1 && !$from_fatal_error && !$has_fatal_error) {
        exit;
    }
    if ($from_fatal_error) {
        $has_fatal_error = true;
    }
    // Clear out the stat cache.
    trackStats();
    // If we have mail to send, send it.
    if (!empty($context['flush_mail'])) {
        // @todo this relies on 'flush_mail' being only set in AddMailQueue itself... :\
        AddMailQueue(true);
    }
    $do_header = $header === null ? !$header_done : $header;
    if ($do_footer === null) {
        $do_footer = $do_header;
    }
    // Has the template/header been done yet?
    if ($do_header) {
        // Was the page title set last minute? Also update the HTML safe one.
        if (!empty($context['page_title']) && empty($context['page_title_html_safe'])) {
            $context['page_title_html_safe'] = Util::htmlspecialchars(un_htmlspecialchars($context['page_title'])) . (!empty($context['current_page']) ? ' - ' . $txt['page'] . ' ' . ($context['current_page'] + 1) : '');
        }
        // Start up the session URL fixer.
        ob_start('ob_sessrewrite');
        call_integration_buffer();
        // Display the screen in the logical order.
        template_header();
        $header_done = true;
    }
    if ($do_footer) {
        // Show the footer.
        loadSubTemplate(isset($context['sub_template']) ? $context['sub_template'] : 'main');
        // Just so we don't get caught in an endless loop of errors from the footer...
        if (!$footer_done) {
            $footer_done = true;
            template_footer();
            // (since this is just debugging... it's okay that it's after </html>.)
            if (!isset($_REQUEST['xml'])) {
                displayDebug();
            }
        }
    }
    // Need user agent
    $req = request();
    // Remember this URL in case someone doesn't like sending HTTP_REFERER.
    $invalid_old_url = array('action=dlattach', 'action=jsoption', 'action=viewadminfile', ';xml', ';api');
    $make_old = true;
    foreach ($invalid_old_url as $url) {
        if (strpos($_SERVER['REQUEST_URL'], $url) !== false) {
            $make_old = false;
            break;
        }
    }
    if ($make_old === true) {
        $_SESSION['old_url'] = $_SERVER['REQUEST_URL'];
    }
    // For session check verification.... don't switch browsers...
    $_SESSION['USER_AGENT'] = $req->user_agent();
    // Hand off the output to the portal, etc. we're integrated with.
    call_integration_hook('integrate_exit', array($do_footer));
    // Don't exit if we're coming from index.php; that will pass through normally.
    if (!$from_index) {
        exit;
    }
}
开发者ID:joshuaadickerson,项目名称:Elkarte,代码行数:84,代码来源:Subs.php


示例6: template_header

<?php

template_header("USERS");
template_navigation();
$obj->only("superadmin");
define("NEXT_PAGE", "users_reg");
define("PDF_PAGE", "pdf_users");
echo $obj->table_header("<th>Name</th><th>Account Type</th><th>Username</th><th>Action</th>");
foreach ($pdo->conn->query("SELECT * FROM tbl_users WHERE type != 'superadmin'") as $value) {
    extract($value);
    echo '<tr>';
    echo '<td>' . $name . '</td>';
    echo '<td>' . $type . '</td>';
    echo '<td>' . $username . '</td>';
    echo '<td>';
    echo $obj->_attribute(NEXT_PAGE, "update", $obj->encrypt($id));
    echo $obj->_attribute(NEXT_PAGE, "delete", $obj->encrypt($id));
    echo '</td>';
    echo '</tr>';
}
echo $obj->table_footer();
echo '<p>';
echo $obj->_button(NEXT_PAGE, "add");
echo '</p>';
template_footer();
开发者ID:jhernani,项目名称:TAN,代码行数:25,代码来源:users.php


示例7: template_header

<?php

template_header('USER REGISTRATION');
template_navigation();
$obj->only("superadmin");
define("BACK_PAGE", "users");
define("THIS_PAGE", "users_reg");
define("TABLE", "tbl_users");
require_once 'config/updatedelete.php';
if (isset($_POST['btn-save'])) {
    $form = $_POST;
    extract($_POST);
    if ($pdo->existData(TABLE, array('username' => $form['username'])) == false) {
        if ($pdo->insertData(TABLE, array('name' => $form['name'], 'username' => $form['username'], 'password' => $form['password'], 'type' => $form['type']))) {
            $message = $obj->_message("success", "Save Successfully");
        }
    } else {
        $message = $obj->_message("error", "Username is already exist");
    }
}
if (isset($_POST['btn-update'])) {
    $form = $_POST;
    if ($pdo->existData(TABLE, array('username' => $form['username'])) == true and $username == $form['username'] or $pdo->existData(TABLE, array('username' => $form['username'])) == false and $username != $form['username']) {
        if ($pdo->updateData(TABLE, array('name' => $form['name'], 'username' => $form['username'], 'password' => $form['password'], 'type' => $form['type']), array('id' => $obj->decrypt($ACTION[2])))) {
            extract($pdo->fetchData(TABLE, array('id' => $obj->decrypt($ACTION[2]))));
            $message = $obj->_message("success", "Update Successfully");
        }
    } else {
        $message = $obj->_message("error", "Username is already exist");
    }
}
开发者ID:jhernani,项目名称:TAN,代码行数:31,代码来源:users_reg.php


示例8: show_log

/**
 * show_log
 *
 * Actually show the log for this specific day
 *
 * @param PDO $db A PDO object referring to the database
 *
 * @return void
 * @author Eli White <[email protected]>
 **/
function show_log(PDO $db)
{
    $channel = $_GET['w'];
    $day = $_GET['d'];
    $parts = explode('-', $day);
    $formatted_date = "{$parts[0]}-{$parts[1]}-{$parts[2]}";
    // Begin the HTML page:
    template_header('Date: ' . utf8specialchars($formatted_date) . ' - Channel: ' . utf8specialchars($channel));
    // Query the database to get all log lines for this date:
    $prepared = $db->prepare("select time(tstamp) as t, type, nick, message\n        from logs\n        where lower(chan) = :chan and date(tstamp) = :day\n        order by tstamp asc");
    $prepared->execute(array(':chan' => $channel, ':day' => $day));
    // Loop through each line,
    foreach ($prepared as $row) {
        // Prepare some basic details for output:
        $color = nick_color($row['nick']);
        $time = utf8specialchars($row['t']);
        $msg = utf8specialchars($row['message']);
        $nick = utf8specialchars($row['nick']);
        $type = false;
        // Now change the format of the line based upon the type:
        switch ($row['type']) {
            case 4:
                // PRIVMSG (A Regular Message)
                echo "[{$time}] <span style=\"color:#{$color};\">" . "&lt;{$nick}&gt;</span> {$msg}<br />\n";
                break;
            case 5:
                // ACTION (emote)
                echo "[{$time}] <span style=\"color:#{$color};\">" . "*{$nick} {$msg}</span><br />\n";
                break;
            case 1:
                // JOIN
                echo "[{$time}] -> {$nick} joined the room.<br />\n";
                break;
            case 2:
                // PART (leaves channel)
                echo "[{$time}] -> {$nick} left the room: {$msg}<br />\n";
                break;
            case 3:
                // QUIT (quits the server)
                echo "[{$time}] -> {$nick} left the server: {$msg}<br />\n";
                break;
            case 6:
                // NICK (changes their nickname)
                echo "[{$time}] -> {$nick} is now known as: {$msg}<br />\n";
                break;
            case 7:
                // KICK (booted)
                echo "[{$time}] -> {$nick} boots {$msg} from the room.<br />\n";
                break;
            case 8:
                // MODE (changed their mode)
                $type = 'MODE';
            case 9:
                // TOPIC (changed the topic)
                $type = $type ? $type : 'TOPIC';
                echo "[{$time}] -> {$nick}: :{$type}: {$msg}<br />\n";
        }
    }
    // Finish up the page:
    template_footer();
}
开发者ID:alexmace,项目名称:phergie,代码行数:71,代码来源:index.php


示例9: obExit

function obExit($header = null, $do_footer = null, $from_index = false)
{
    global $context, $settings, $modSettings, $txt;
    static $header_done = false, $footer_done = false;
    // Clear out the stat cache.
    trackStats();
    $do_header = $header === null ? !$header_done : $header;
    if ($do_footer === null) {
        $do_footer = $do_header;
    }
    // Has the template/header been done yet?
    if ($do_header) {
        // Start up the session URL fixer.
        ob_start('ob_sessrewrite');
        // Just in case we have anything bad already in there...
        if ((isset($_REQUEST['debug']) || isset($_REQUEST['xml']) || WIRELESS && WIRELESS_PROTOCOL == 'wap') && in_array($txt['lang_locale'], array('UTF-8', 'ISO-8859-1'))) {
            ob_start('validate_unicode__recursive');
        }
        if (!empty($settings['output_buffers']) && is_string($settings['output_buffers'])) {
            $buffers = explode(',', $settings['output_buffers']);
        } elseif (!empty($settings['output_buffers'])) {
            $buffers = $settings['output_buffers'];
        } else {
            $buffers = array();
        }
        if (isset($modSettings['integrate_buffer'])) {
            $buffers = array_merge(explode(',', $modSettings['integrate_buffer']), $buffers);
        }
        if (!empty($buffers)) {
            foreach ($buffers as $buffer_function) {
                if (function_exists(trim($buffer_function))) {
                    ob_start(trim($buffer_function));
                }
            }
        }
        // Display the screen in the logical order.
        template_header();
        $header_done = true;
    }
    if ($do_footer) {
        if (WIRELESS && !isset($context['sub_template'])) {
            fatal_lang_error('wireless_error_notyet', false);
        }
        // Just show the footer, then.
        loadSubTemplate(isset($context['sub_template']) ? $context['sub_template'] : 'main');
        // Just so we don't get caught in an endless loop of errors from the footer...
        if (!$footer_done) {
            $footer_done = true;
            template_footer();
            // (since this is just debugging... it's okay that it's after </html>.)
            if (!isset($_REQUEST['xml'])) {
                db_debug_junk();
            }
        }
    }
    // Remember this URL in case someone doesn't like sending HTTP_REFERER.
    if (strpos($_SERVER['REQUEST_URL'], 'action=dlattach') === false) {
        $_SESSION['old_url'] = $_SERVER['REQUEST_URL'];
    }
    // For session check verfication.... don't switch browsers...
    $_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
    // Hand off the output to the portal, etc. we're integrated with.
    if (isset($modSettings['integrate_exit'], $context['template_layers']) && in_array('main', $context['template_layers']) && function_exists($modSettings['integrate_exit'])) {
        call_user_func($modSettings['integrate_exit'], $do_footer && !WIRELESS);
    }
    // Don't exit if we're coming from index.php; that will pass through normally.
    if (!$from_index || WIRELESS) {
        exit;
    }
}
开发者ID:bbon,项目名称:mjncms,代码行数:70,代码来源:Subs.php


示例10: template_header

<?php

template_header("EMPLOYEE");
template_navigation();
$obj->only("users");
define("NEXT_PAGE", "employee_reg");
echo $obj->table_header("<th>Employee</th><th>ID Number</th><th>Designation</th><th>Action</th>");
foreach ($pdo->conn->query("SELECT * FROM tbl_employee WHERE active='1'") as $value) {
    extract($value);
    echo '<tr>';
    echo '<td>' . $name . '</td>';
    echo '<td>' . $employee_id . '</td>';
    echo '<td>' . $obj->designation($designation) . '</td>';
    echo '<td>';
    if ($obj->if_match($_SESSION['userType'], "superadmin") == false) {
        echo $obj->_attribute(NEXT_PAGE, "update", $obj->encrypt($id));
        if ($obj->if_match($_SESSION['userType'], "hr")) {
            echo $obj->_attribute(NEXT_PAGE, "inactive", $obj->encrypt($id));
            echo $obj->_attribute("employee_attendance", "attendance", $obj->encrypt($id));
        }
    }
    echo '</td>';
    echo '</tr>';
}
echo $obj->table_footer();
if ($obj->if_match($_SESSION['userType'], "superadmin") == false) {
    echo '<p>';
    if ($obj->if_match($_SESSION['userType'], "hr")) {
        echo $obj->_button(NEXT_PAGE, "add");
    }
    if ($obj->if_match($_SESSION['userType'], "accounting")) {
开发者ID:jhernani,项目名称:TAN,代码行数:31,代码来源:employee.php


示例11: template_header

<?php

template_header('EMPLOYEE REGISTRATION');
template_navigation();
$obj->only("users");
$obj->noaccess("superadmin");
define("BACK_PAGE", "employee");
define("THIS_PAGE", "employee_reg");
define("TABLE", "tbl_employee");
require_once 'config/updatedelete.php';
if (isset($_POST['btn-save'])) {
    $form = $_POST;
    extract($_POST);
    if ($pdo->existData(TABLE, array('employee_id' => $form['employee_id'])) == false) {
        if ($obj->if_match($_SESSION['userType'], "hr")) {
            $params = array('name' => $form['name'], 'employee_id' => $form['employee_id'], 'gender' => $form['gender'], 'birthdate' => $form['birthdate'], 'address' => $form['address'], 'designation' => $form['designation'], 'hire' => $form['hire'], 'active' => 1);
        } else {
            if ($obj->if_match($_SESSION['userType'], "accounting")) {
                $params = array('tax' => $form['tax'], 'sss' => $form['sss'], 'pag_ibig' => $form['pag_ibig'], 'philhealth' => $form['philhealth'], 'sss_loan' => $form['sss_loan'], 'pag_ibig_loan' => $form['pag_ibig_loan'], 'salary' => $form['salary'], 'company_loan' => $form['company_loan'], 'active' => 1);
            }
        }
        if ($pdo->insertData(TABLE, $params)) {
            $message = $obj->_message("success", "Save Successfully");
        }
    } else {
        $message = $obj->_message("error", "Employee ID is already exist");
    }
}
if (isset($_POST['btn-update'])) {
    $form = $_POST;
    if ($obj->if_match($_SESSION['userType'], "hr")) {
开发者ID:jhernani,项目名称:TAN,代码行数:31,代码来源:employee_reg.php


示例12: template_header

<body background="theme/img/background.jpg"> 
<?php 
template_header("ATTENDANCE");
template_navigation();
$obj->only("users");
define("NEXT_PAGE", "attendance_reg");
echo $obj->table_header("<th>Employee</th><th>ID Number</th><th>Date</th><th>Time In</th><th>Time Out</th>");
//WHERE date='".date("Y-m-d")."' ORDER by datetime DESC
foreach ($pdo->conn->query("SELECT * FROM tbl_time  ") as $value) {
    extract($value);
    echo '<tr>';
    echo '<td>' . strtoupper($pdo->selectData('tbl_employee', 'name', array('id' => $value['employee_id']))) . '</td>';
    echo '<td>' . strtoupper($pdo->selectData('tbl_employee', 'employee_id', array('id' => $value['employee_id']))) . '</td>';
    echo '<td>' . $date . '</td>';
    echo '<td>' . $obj->normal_time($time_in) . '</td>';
    echo '<td>' . $obj->normal_time($time_out) . '</td>';
    echo '</tr>';
}
echo $obj->table_footer();
template_footer();
开发者ID:jhernani,项目名称:TAN,代码行数:20,代码来源:attendance.php


示例13: template_header

<?php

template_header("EMPLOYEE ATTENDANCE");
template_navigation();
$obj->only("users");
define("BACK_PAGE", "employee");
define("PDF_PAGE", "pdf");
define("TABLE", "tbl_time");
require_once 'config/updatedelete.php';
echo '<p>Employee Name: <b> ' . $pdo->selectData("tbl_employee", "name", array('id' => $id)) . ' </b></p>';
echo '<p>Employee ID NUMBER: <b> ' . $pdo->selectData("tbl_employee", "employee_id", array('id' => $id)) . ' </b> </p>';
echo '<br />';
echo $obj->table_header("<th>Date</th><th>Time In</th><th>Time Out</th>");
foreach ($pdo->conn->query("SELECT * FROM tbl_time WHERE employee_id='" . $obj->decrypt($ACTION[2]) . "'") as $value) {
    extract($value);
    echo '<tr>';
    echo '<td>' . $obj->normal_date($date) . '</td>';
    echo '<td>' . $obj->normal_time($time_in) . '</td>';
    echo '<td>' . $obj->normal_time($time_out) . '</td>';
    echo '</tr>';
}
echo $obj->table_footer();
if ($obj->if_match($_SESSION['userType'], "superadmin") == false) {
    echo '<p>';
    echo $obj->_button(BACK_PAGE, "back");
    echo '</p>';
}
template_footer();
开发者ID:jhernani,项目名称:TAN,代码行数:28,代码来源:employee_attendance.php


示例14: template_header

<?php

template_header("INACTIVE EMPLOYEE");
template_navigation();
$obj->only("users");
$obj->noaccess("superadmin");
$obj->noaccess("accounting");
define("NEXT_PAGE", "inactive_employee_reg");
define("PDF_PAGE", "pdf");
echo $obj->table_header("<th>Employee</th><th>ID Number</th><th>Designation</th><th>Action</th>");
foreach ($pdo->conn->query("SELECT * FROM tbl_employee WHERE active='0'") as $value) {
    extract($value);
    echo '<tr>';
    echo '<td>' . $name . '</td>';
    echo '<td>' . $employee_id . '</td>';
    echo '<td>' . $obj->designation($designation) . '</td>';
    echo '<td>';
    if ($obj->if_match($_SESSION['userType'], "superadmin") == false) {
        // echo $obj->_attribute(NEXT_PAGE,"update",$obj->encrypt($id));
        if ($obj->if_match($_SESSION['userType'], "hr")) {
            // echo $obj->_attribute(NEXT_PAGE,"delete",$obj->encrypt($id));
            echo $obj->_attribute(NEXT_PAGE, "active", $obj->encrypt($id));
        }
    }
    echo '</td>';
    echo '</tr>';
}
echo $obj->table_footer();
if ($obj->if_match($_SESSION['userType'], "superadmin") == false) {
    echo '<p>';
}
开发者ID:jhernani,项目名称:TAN,代码行数:31,代码来源:inactive_employee.php


示例15: template_header

<?php

template_header('WELCOME');
template_navigation();
$obj->only("users");
?>

<img background="theme/img/background.jpg"> 

<div class="row" style="max-width: 50%; margin: 0 auto 10px; "> 
<a href="#" class="thumbnail"> <img src="theme/img/image.png" alt="<?php 
echo TITLE_EXTENSION;
?>
"> </a>

 <center>
 <a href="<?php 
echo URL_ROOT . "attendance";
?>
" type="button" class="btn btn-default btn-lg btn-block"> <i class="list layout icon"> Attendance </i> </a>
 <?php 
if ($_SESSION['userType'] == "superadmin") {
    ?>
 <a href="<?php 
    echo URL_ROOT . "users";
    ?>
" type="button" class="btn btn-default btn-lg btn-block"> <i class="users icon"> Manage Users </i> </a>
 <?php 
}
?>
 <a href="<?php 
开发者ID:jhernani,项目名称:TAN,代码行数:31,代码来源:home.php


示例16: template_header

<?php

template_header("TIME");
if (isset($_SESSION['userID'])) {
    template_navigation();
} else {
    echo "<br><br><br><br>";
}
$tt = date(DATE_FORMAT);
if (isset($_POST['btn-in'])) {
    $var = $_POST;
    if ($pdo->existData("tbl_employee", array("employee_id" => $var['employee_id']))) {
        $tbl_employee = $pdo->fetchData("tbl_employee", array("employee_id" => $var['employee_id']));
        if ($obj->if_match($tbl_employee['active'], 1)) {
            if ($pdo->existData("tbl_time", array("employee_id" => $tbl_employee['id'], "date" => date("Y-m-d"))) == false) {
                if ($pdo->insertData("tbl_time", array('employee_id' => $tbl_employee['id'], 'time_out' => 0, 'time_in' => $tt, 'date' => $tt, 'datetime' => $tt))) {
                    $message = $obj->_message("success", "Save Successfully");
                }
            } else {
                $message = $obj->_message("error", "You already timed in this day");
            }
        } else {
            $message = $obj->_message("error", "The account is already deactivate");
        }
    } else {
        $message = $obj->_message("error", "Unknown ID Number");
    }
}
// time in
if (isset($_POST['btn-out'])) {
    $var = $_POST;
开发者ID:jhernani,项目名称:TAN,代码行数:31,代码来源:time.php


示例17: template_header

<?php

template_header('LOGIN');
template_navigation();
$obj->noaccess("superadmin");
$obj->noaccess("accounting");
$obj->noaccess("hr");
define("TABLE", "tbl_users");
if (isset($_POST['btn-save'])) {
    extract($_POST);
    if ($pdo->existData(TABLE, array('username' => $username, 'password' => $password))) {
        $obj->_header("home");
        $tbl_employee = $pdo->fetchData(TABLE, array('username' => $username, 'password' => $password));
        $_SESSION['userID'] = $tbl_employee['id'];
        $_SESSION['userName'] = $tbl_employee['name'];
        $_SESSION['userType'] = $tbl_employee['type'];
    } else {
        $message = $obj->_message("error", "Login Details Incorrect. Please try again.");
    }
}
?>


<h3 class="ui block header" style="max-width: 350px; margin: 0 auto 10px;">
<div class="row" style="max-width: 350px; margin: 0 auto 10px;" > 

<h2 class="ui header"> <center>
  <img src="theme/img/icon.png" class="ui circular image">
  
</h2>
	<hr>
开发者ID:jhernani,项目名称:TAN,代码行数:31,代码来源:login.php


示例18: obExit

function obExit($header = null, $do_footer = null, $from_index = false, $from_fatal_error = false)
{
    global $context, $settings, $modSettings, $txt, $smcFunc;
    static $header_done = false, $footer_done = false, $level = 0, $has_fatal_error = false;
    // Attempt to prevent a recursive loop.
    ++$level;
    if ($level > 1 && !$from_fatal_error && !$has_fatal_error) {
        exit;
    }
    if ($from_fatal_error) {
        $has_fatal_error = true;
    }
    // Clear out the stat cache.
    trackStats();
    // If we have mail to send, send it.
    if (!empty($context['flush_mail'])) {
        AddMailQueue(true);
    }
    $do_header = $header === null ? !$header_done : $header;
    if ($do_footer === null) {
        $do_footer = $do_header;
    }
    // Has the template/header been done yet?
    if ($do_header) {
        // Was the page title set last minute? Also update the HTML safe one.
        if (!empty($context['page_title']) && empty($context['page_title_html_safe'])) {
            $context['page_title_html_safe'] = $smcFunc['htmlspecialchars'](un_htmlspecialchars($context['page_title']));
        }
        // Start up the session URL fixer.
        ob_start('ob_sessrewrite');
        if (!empty($settings['output_buffers']) && is_string($settings['output_buffers'])) {
            $buffers = explode(',', $settings['output_buffers']);
        } elseif (!empty($settings['output_buffers'])) {
            $buffers = $settings['output_buffers'];
        } else {
            $buffers = array();
        }
        if (isset($modSettings['integrate_buffer'])) {
            $buffers = array_merge(explode(',', $modSettings['integrate_buffer']), $buffers);
        }
        if (!empty($buffers)) {
            foreach ($buffers as $function) {
                $function = trim($function);
                $call = strpos($function, '::') !== false ? explode('::', $function) : $function;
                // Is it valid?
                if (is_callable($call)) {
                    ob_start($call);
                }
            }
        }
        // Display the screen in the logical order.
        template_header();
        $header_done = true;
    }
    if ($do_footer) {
        if (WIRELESS && !isset($context['sub_template'])) {
            fatal_lang_error('wireless_error_notyet', false);
        }
        // Just show the footer, then.
        loadSubTemplate(isset($context['sub_template']) ? $context['sub_template'] : 'main');
        // Anything special to put out?
        if (!empty($context['insert_after_template']) && !isset($_REQUEST['xml'])) {
            echo $context['insert_after_template'];
        }
        // Just so we don't get caught in an endless loop of errors from the footer...
        if (!$footer_done) {
            $footer_done = true;
            template_footer();
            // (since this is just debugging... it's okay that it's after </html>.)
            if (!isset($_REQUEST['xml'])) {
                db_debug_junk();
            }
        }
    }
    // Remember this URL in case someone doesn't like sending HTTP_REFERER.
    if (strpos($_SERVER['REQUEST_URL'], 'action=dlattach') === false && strpos($_SERVER['REQUEST_URL'], 'action=viewsmfile') === false) {
        $_SESSION['old_url'] = $_SERVER['REQUEST_URL'];
    }
    // For session check verfication.... don't switch browsers...
    $_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
    if (!empty($settings['strict_doctype'])) {
        // The theme author wants to use the STRICT doctype (only God knows why).
        $temp = ob_get_contents();
        if (function_exists('ob_clean')) {
            ob_clean();
        } else {
            ob_end_clean();
            ob_start('ob_sessrewrite');
        }
        echo strtr($temp, array('var smf_iso_case_folding' => 'var target_blank = \'_blank\'; var smf_iso_case_folding', 'target="_blank"' => 'onclick="this.target=target_blank"'));
    }
    // Hand off the output to the portal, etc. we're integrated with.
    call_integration_hook('integrate_exit', array($do_footer && !WIRELESS));
    // Don't exit if we're coming from index.php; that will pass through normally.
    if (!$from_index || WIRELESS) {
        exit;
    }
}
开发者ID:AhoyLemon,项目名称:ballpit,代码行数:98,代码来源:Subs.backup.2.php


示例19: obExit

function obExit($header = null, $do_footer = null, $from_index = false, $from_fatal_error = false)
{
    global $context, $modSettings;
    static $header_done = false, $footer_done = false, $level = 0, $has_fatal_error = false;
    if (EoS_Smarty::isActive()) {
        return EoS_Smarty::obExit($header, $do_footer, $from_index, $from_fatal_error);
    }
    // Attempt to prevent a recursive loop.
    ++$level;
    if ($level > 1 && !$from_fatal_error && !$has_fatal_error) {
        exit;
    }
    if ($from_fatal_error) {
        $has_fatal_error = true;
    }
    // Custom templates to load, or just default?
    /*$is_admin = isset($_REQUEST['action']) && $_REQUEST['action'] === 'admin';
    	$templates = array('index');
    
    	// Load each template...
    	foreach ($templates as $template) {
    		if(!$is_admin)
    			loadTemplate($template);
    		else
    			loadAdminTemplate($template);
    	}
    	$context['template_layers'] = array('html', 'body');
    	*/
    // Clear out the stat cache.
    trackStats();
    // If we have mail to send, send it.
    if (!empty($context['flush_mail'])) {
        AddMailQueue(true);
    }
    $do_header = $header === null ? !$header_done : $header;
    if ($do_footer === null) {
        $do_footer = $do_header;
    }
    $context['template_benchmark'] = microtime();
    // Has the template/header been done yet?
    if ($do_header) {
        // Was the page title set last minute? Also update the HTML safe one.
        if (!empty($context['page_title']) && empty($context['page_title_html_safe'])) {
            $context['page_title_html_safe'] = $context['forum_name_html_safe'] . ' - ' . commonAPI::htmlspecialchars(un_htmlspecialchars($context['page_title']));
        }
        // Start up the session URL fixer.
        ob_start('ob_sessrewrite');
        HookAPI::integrateOB();
        //if(!empty($modSettings['simplesef_enable']))
        //	ob_start('SimpleSEF::ob_simplesef');
        // Display the screen in the logical order.
        template_header();
        $header_done = true;
    }
    if ($do_footer) {
        if (WIRELESS && !isset($context['sub_template'])) {
            fatal_lang_error('wireless_error_notyet', false);
        }
        // Just show the footer, then.
        loadSubTemplate(isset($context['sub_template']) ? $context['sub_template'] : 'main');
        // Just so we don't get caught in an endless loop of errors from the footer...
        if (!$footer_done) {
            $footer_done = true;
            template_footer();
            // (since this is just debugging... it's okay that it's after </html>.)
            if (!isset($_REQUEST['xml'])) {
                db_debug_junk();
            }
        }
    }
    // Remember this URL in case someone doesn't like sending HTTP_REFERER.
    if (strpos($_SERVER['REQUEST_URL'], 'action=dlattach') === false && strpos($_SERVER['REQUEST_URL'], 'action=viewsmfile') === false) {
        $_SESSION['old_url'] = $_SERVER['REQUEST_URL'];
    }
    // For session check verfication.... don't switch browsers...
    $_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
    // Hand off the output to the portal, etc. we're integrated with.
    HookAPI::callHook('integrate_exit', array($do_footer));
    if (!empty($modSettings['simplesef_enable'])) {
        SimpleSEF::fixXMLOutput($do_footer);
    }
    // Don't exit if we're coming from index.php; that will pass through normally.
    if (!$from_index) {
        exit;
    }
}
开发者ID:norv,项目名称:EosAlpha,代码行数:86,代码来源:Subs.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP template_init函数代码示例发布时间:2022-05-23
下一篇:
PHP template_footer函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap