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


PHP showHeader函数代码示例

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


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

示例1: showLogin

/**
 * Show login page 
 * 
 * @return void
 */
function showLogin()
{
    showHeader();
    ?>

<form name="login" method="post" action="">

<table class="form">
  <tr>
    <th class="title" colspan="2">Authentification administrateur obligatoire</th>
  </tr>
  <tr>
    <th><label for="username">Nom d'utilisateur :</label></th>
    <td><input type="text" name="username" autofocus="autofocus" /></td>
  </tr>
  <tr>
    <th><label for="password">Mot de passe :</label></th>
    <td><input type="password" name="password" /></td>
  </tr>
  <tr>
    <td class="button" colspan="2"><button class="submit" type="submit">Valider</button></td>
  </tr>
</table>

</form>

<?php 
    showFooter();
}
开发者ID:fbone,项目名称:mediboard4,代码行数:34,代码来源:checkauth.php

示例2: display

function display($title, $content)
{
    print showHeader($title);
    print $content;
    print showFooter();
    exit;
}
开发者ID:guodman,项目名称:lpas,代码行数:7,代码来源:functions.inc.php

示例3: showHead

function showHead($loggedin)
{
    if ($loggedin) {
        include "modules/home/userhome.php";
        showHeader();
    } else {
        include "login/login.php";
        showLoginHeader();
    }
}
开发者ID:SnowySailor,项目名称:CodeStuff,代码行数:10,代码来源:home.php

示例4: getConn

 /**
  * This method returns the connection object.
  * If it has not been yet created, this method
  * instantiates it based on the $connStr, $user and $pass
  * global variables defined in common.inc.php
  * @return PDO the connection object
  */
 static function getConn()
 {
     if (!self::$conn) {
         global $connStr, $user, $pass;
         try {
             self::$conn = new PDO($connStr, $user, $pass);
             self::$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
         } catch (PDOException $e) {
             showHeader('Error');
             showError("Sorry, an error has occurred. Please\n\t\t\t\t\ttry your request later\n" . $e->getMessage());
         }
     }
     return self::$conn;
 }
开发者ID:joelotz,项目名称:pmdb,代码行数:21,代码来源:classes.inc.php

示例5: showLogin

function showLogin($error = '')
{
    showHeader();
    if ($error) {
        print $error;
    }
    print <<<LOGINFORM
\t\t<form action="{$_SERVER['PHP_SELF']}" method="post">
\t\t<table>
\t\t\t<tr><td><b>Username:</b></td><td><input type="text" name="username" /></td></tr>
\t\t\t<tr><td><b>Password:</b></td><td><input type="password" name="password" /></td></tr>
\t\t\t<tr><td colspan="2"><button name="Login" value="Login" type="submit">Login</button></td></tr>
\t\t</table>
\t\t</form>
LOGINFORM;
    showFooter();
}
开发者ID:TheDevine,项目名称:pt_refund,代码行数:17,代码来源:refundFunctions.php

示例6: session_start

<?php

include_once "../Controller/functions.php";
/**
 * Created by Latendresse Antoine && Yannick Delaire.
 * Date: 11/16/15
 */
if (session_status() == PHP_SESSION_NONE) {
    session_start();
}
showHeader("Identifiant Depot d'images");
?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
        <title>All your photos organized and easy to find</title>
        <link href='https://fonts.googleapis.com/css?family=Roboto:500' rel='stylesheet' type='text/css'>
        <link href="../Styles/style.css" rel="stylesheet" media="all" type="text/css">
        <link rel="apple-touch-icon" sizes="57x57" href="ico/apple-icon-57x57.png">
        <link rel="apple-touch-icon" sizes="60x60" href="ico/apple-icon-60x60.png">
        <link rel="apple-touch-icon" sizes="72x72" href="ico/apple-icon-72x72.png">
        <link rel="apple-touch-icon" sizes="76x76" href="ico/apple-icon-76x76.png">
        <link rel="apple-touch-icon" sizes="114x114" href="ico/apple-icon-114x114.png">
        <link rel="apple-touch-icon" sizes="120x120" href="ico/apple-icon-120x120.png">
        <link rel="apple-touch-icon" sizes="144x144" href="ico/apple-icon-144x144.png">
        <link rel="apple-touch-icon" sizes="152x152" href="ico/apple-icon-152x152.png">
        <link rel="apple-touch-icon" sizes="180x180" href="ico/apple-icon-180x180.png">
        <link rel="icon" type="image/png" sizes="192x192"  href="ico/android-icon-192x192.png">
        <link rel="icon" type="image/png" sizes="32x32" href="ico/favicon-32x32.png">
        <link rel="icon" type="image/png" sizes="96x96" href="ico/favicon-96x96.png">
开发者ID:200755008,项目名称:Reingenierie,代码行数:31,代码来源:login.php

示例7: session_start

<?php

include_once "../Controller/functions.php";
/**
 * Created by Latendresse Antoine && Yannick Delaire.
 * Date: 11/16/15
 */
if (session_status() == PHP_SESSION_NONE) {
    session_start();
}
getSessionVar();
showHeader("Gestionnaire d'images");
verifyConnected();
?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
        <title>All your photos organized and easy to find</title>
        <link href='https://fonts.googleapis.com/css?family=Roboto:500' rel='stylesheet' type='text/css'>
        <link href="../Styles/style.css" rel="stylesheet" media="all" type="text/css">
        <link rel="apple-touch-icon" sizes="57x57" href="ico/apple-icon-57x57.png">
        <link rel="apple-touch-icon" sizes="60x60" href="ico/apple-icon-60x60.png">
        <link rel="apple-touch-icon" sizes="72x72" href="ico/apple-icon-72x72.png">
        <link rel="apple-touch-icon" sizes="76x76" href="ico/apple-icon-76x76.png">
        <link rel="apple-touch-icon" sizes="114x114" href="ico/apple-icon-114x114.png">
        <link rel="apple-touch-icon" sizes="120x120" href="ico/apple-icon-120x120.png">
        <link rel="apple-touch-icon" sizes="144x144" href="ico/apple-icon-144x144.png">
        <link rel="apple-touch-icon" sizes="152x152" href="ico/apple-icon-152x152.png">
        <link rel="apple-touch-icon" sizes="180x180" href="ico/apple-icon-180x180.png">
        <link rel="icon" type="image/png" sizes="192x192"  href="ico/android-icon-192x192.png">
开发者ID:200755008,项目名称:Reingenierie,代码行数:31,代码来源:gestimage.php

示例8: showPage

function showPage($username = '', $accessLvl = '', $errors = '')
{
    showHeader($username, $accessLvl);
    global $db;
    if ($errors) {
        //show errors at top of page
        print '<h2 class = "error"> The following errors were encountered:</h2>';
        print '<ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    $parts_emailName_30 = explode("@", $_SESSION['mailto_over30']);
    $parts_emailName_15 = explode("@", $_SESSION['mailto_over15']);
    print <<<ADDUSERPAGE

\t\t\t<h2 align="center">Configure Email Settings</h2>
\t\t\t<form method="POST" action="{$_SERVER['PHP_SELF']}" name="add_user">
\t\t  <table style="width: 100%" border="1">
\t\t\t<tbody>

\t\t\t  <tr>
\t\t\t\t<td>Email After 30 Days</td>
\t\t\t\t<td>
\t              <select name="30_days_overdue">
ADDUSERPAGE;
    $query_users = 'SELECT user_id, first_name, last_name, username FROM users';
    $result_users = mysqli_query($db, $query_users);
    $selected = 1;
    while ($row_users = mysqli_fetch_array($result_users)) {
        $selected = $row_users['username'] === $parts_emailName_30[0] ? ' selected="selected"' : '';
        print "<option value=\"{$row_users['user_id']}\" {$selected} ";
        print ">{$row_users['first_name']} {$row_users['last_name']}</option>";
    }
    print <<<ADDUSERPAGE
              </select>
              <br>
            </td>
          </tr>
          <tr>
\t\t  <td>Email After 15 Days</td>

\t\t  <td>
\t\t  <select name="15_days_overdue">
ADDUSERPAGE;
    $result_users_15 = mysqli_query($db, $query_users);
    //$selected=1;
    while ($row_users_15 = mysqli_fetch_array($result_users_15)) {
        $selected = $row_users_15['username'] === $parts_emailName_15[0] ? ' selected="selected"' : '';
        print "<option value=\"{$row_users_15['user_id']}\" {$selected} ";
        print ">{$row_users_15['first_name']} {$row_users_15['last_name']}</option>";
    }
    print <<<ADDUSERPAGE
              </select>
              <br>
            </td>
          </tr>
          <tr>
\t\t  
\t\t</tbody>
      </table>
      <input type="hidden" name="_submit_check" value="1" />
\t  <br>
      <button formmethod="post" formaction="{$_SERVER['PHP_SELF']}" value="submit" name="Submit">Add User</button></form>


ADDUSERPAGE;
    print '<h4 align="center"><a href="admin.php">Return to User Administration Page</a></h4>';
    showFooter();
}
开发者ID:TheDevine,项目名称:pt_refund,代码行数:69,代码来源:configureEmailSendDatesAndTimes.php

示例9: showPage

function showPage($username = '', $accessLvl = '', $errors = '')
{
    showHeader($username, $accessLvl);
    global $db;
    include 'connectToDB.php';
    if ($errors) {
        //show errors at top of page
        print '<h2 class = "error"> The following errors were encountered:</h2>';
        print '<ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    //if(isset($_POST['first_name']) && isset($_POST['last_name']) && isset($_POST['username'])){
    print <<<ADDUSERPAGE

\t\t\t<h2 align="center">Add/Edit Accounting Recipients</h2>
\t\t\t<form method="POST" action="{$_SERVER['PHP_SELF']}" name="add_acc_rec">
\t\t  <table style="width: 100%" border="1">
\t\t\t<tbody>
\t\t\t  <tr>
\t\t\t\t<td>Accounting Recipient 1</td>
\t\t\t\t<td><input maxlength="50" name="accounting_recipient_1" type="text" value ="{$_POST['accounting_recipient_1']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t  \t<tr>
\t\t\t\t<td>Accounting Recipient 2</td>
\t\t\t\t<td><input maxlength="50" name="accounting_recipient_2" type="text" value ="{$_POST['accounting_recipient_2']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t  \t<tr>
\t\t\t\t<td>Accounting Recipient 3</td>
\t\t\t\t<td><input maxlength="50" name="accounting_recipient_3" type="text" value ="{$_POST['accounting_recipient_3']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t  
\t\t\t  <tr>
\t\t\t\t<td>Billing Recipient 1</td>
\t\t\t\t<td><input maxlength="50" name="par1_recipient_1" type="text" value ="{$_POST['par1_recipient_1']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t<tr>
\t\t\t\t<td>Billing Recipient 2</td>
\t\t\t\t<td><input maxlength="50" name="par1_recipient_2" type="text" value ="{$_POST['par1_recipient_2']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t  <tr>
\t\t\t\t<td>Billing Recipient 3</td>
\t\t\t\t<td><input maxlength="50" name="par1_recipient_3" type="text" value ="{$_POST['par1_recipient_3']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t  \t\t  
\t\t\t\t\t  
\t\t\t\t\t  <tr>
\t\t\t\t<td>Overdue 15 Days Recipient 1</td>
\t\t\t\t<td><input maxlength="50" name="over15_recipient_1" type="text" value ="{$_POST['over15_recipient_1']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t<tr>
\t\t\t\t<td>Overdue 15 Days Recipient 2</td>
\t\t\t\t<td><input maxlength="50" name="over15_recipient_2" type="text" value ="{$_POST['over15_recipient_2']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t  <tr>
\t\t\t\t<td>Overdue 15 Days Recipient 3</td>
\t\t\t\t<td><input maxlength="50" name="over15_recipient_3" type="text" value ="{$_POST['over15_recipient_3']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t  
\t\t\t\t\t  <tr>
\t\t\t\t<td>Overdue 30 Days Recipient 1</td>
\t\t\t\t<td><input maxlength="50" name="over30_recipient_1" type="text" value ="{$_POST['over30_recipient_1']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t<tr>
\t\t\t\t<td>Overdue 30 Days Recipient 2</td>
\t\t\t\t<td><input maxlength="50" name="over30_recipient_2" type="text" value ="{$_POST['over30_recipient_2']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t  <tr>
\t\t\t\t<td>Overdue 30 Days Recipient 3</td>
\t\t\t\t<td><input maxlength="50" name="over30_recipient_3" type="text" value ="{$_POST['over30_recipient_3']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>\t\t\t  
\t\t\t\t\t  
\t\t\t\t  
\t\t\t\t\t  <tr>
\t\t\t\t<td>Completed Recipient 1</td>
\t\t\t\t<td><input maxlength="50" name="completed_recipient_1" type="text" value ="{$_POST['completed_recipient_1']}"><br>
\t\t\t\t</td>
\t\t\t  </tr>
\t\t\t  
\t\t\t  \t\t    <tr>
            <td>Re-Assign Refund To: </td>
            <td>
              <select name="assignee">
ADDUSERPAGE;
    $query_users = 'SELECT user_id, first_name, last_name FROM users';
    $result_users = mysqli_query($db, $query_users);
    $selected = 1;
    while ($row_users = mysqli_fetch_array($result_users)) {
//.........这里部分代码省略.........
开发者ID:TheDevine,项目名称:pt_refund,代码行数:101,代码来源:recipientsAccountingEmail_oldbak.php

示例10: mysql_fetch_assoc

    $row = mysql_fetch_assoc($results);
    return composePaymentMethod($row['card_company'], $card_number);
}
function placeOrder()
{
    // TODO: Do not die, display some useful links.
    $books = $_COOKIE['books'];
    if ($_SERVER['REQUEST_METHOD'] != 'POST' || empty($books)) {
        echo "<p class='center'>There is no order to place.</p>";
        return;
    }
    $connection = connect();
    if (!updateInventory($connection, $books)) {
        return;
    }
    $order_id = insertOrder($connection, $books);
    if (empty($order_id)) {
        return;
    }
    clearCart();
    // NOTE: this has to be called prior to any output.
    $payment_method = getPaymentMethodFromCardNumber($connection, $_POST['card_number']);
    $total_price_string = $_POST['total_price_string'];
    echo "\n      <p class='center'>Your credit card\n      <em><strong>{$payment_method}</strong></em>\n      is charged <em><strong>\${$total_price_string}</strong></em>.</p>\n      <p class='center'>\n      <a href='show_order.php?order_id={$order_id}'>\n      <em><strong>Order {$order_id}</strong></em></a>\n      is placed successfully.</p>";
    echo "<h2>Order Details</h2>";
    showOrderFromOrderId($connection, $order_id);
    mysql_close($connection);
}
showHeader('Place Order');
placeOrder();
showFooter();
开发者ID:xukmin,项目名称:aladdin,代码行数:31,代码来源:place_order.php

示例11: showHeader

    <!-- Custom styles for this template -->
    <link href="../css/navbar.css" rel="stylesheet">
    <link href="../css/index.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

    
<?php 
showHeader($lang);
?>
   
  <div class="container" id="container_index">

    <?php 
if ($page == "main") {
    main_page($data, $json_url);
} else {
    if ($page == "video") {
        video_page($data, $json_url);
    } else {
        if ($page == "main_server_error") {
            main_page_error();
        }
    }
开发者ID:jdecastroc,项目名称:Reddit-music-surfer,代码行数:31,代码来源:index.php

示例12: showPage

function showPage($username = '', $accessLvl = '', $errors = '')
{
    //page where user will select user to edit
    global $db;
    showHeader($username, $accessLvl);
    include 'connectToDB.php';
    include 'pagination_functionality.php';
    //include 'dump_all_page_contents.php';
    if ($errors) {
        //show errors at top of page
        print '<h2 class = "error"> The following errors were encountered:</h2>';
        print '<ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    $query_dept = "SELECT dept_id FROM users WHERE user_id={$_SESSION['userid']}";
    $result_dept = mysqli_query($db, $query_dept);
    $dept_row = mysqli_fetch_array($result_dept);
    $query_dept = "SELECT name FROM departments WHERE dept_id={$dept_row['dept_id']}";
    $result_deptName = mysqli_query($db, $query_dept);
    $dept_rowName = mysqli_fetch_array($result_deptName);
    if ($accessLvl == 'U') {
        //is access is only at the user level, then must match the refunds pulled to display only the current users created refunds
        if ($dept_rowName['name'] == "Accounting") {
            if (isset($_GET['refund_id'])) {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request, status, dt_required, payable, \n\t\t\taddr_ln_1, addr_ln_2, city, state, zip, purpose, amount, status, comments, assigned_to,created_by,check_date,check_nbr \n\t\t\tFROM refund AS R \n\t\t\tINNER JOIN users AS U \n\t\t\tON R.created_by= U.user_id \n\t\t\tWHERE refund_id = '{$_GET['refund_id']}' \n\t\t\tAND (status='ACCOUNTING APPROVAL') \n\t\t\tAND assigned_to='{$_SESSION['userid']}' LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            } else {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request, status, dt_required, payable, \n\t\t\taddr_ln_1, addr_ln_2, city, state, zip, purpose, amount, status, comments, assigned_to,created_by,check_date,check_nbr \n\t\t\tFROM refund AS R INNER JOIN users AS U ON R.created_by= U.user_id WHERE refund_id = '{$_POST['refund_id']}' \n\t\t\tAND (status='ACCOUNTING APPROVAL') \n\t\t\tAND assigned_to='{$_SESSION['userid']}' LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            }
        } elseif ($dept_rowName['name'] == "Billing") {
            if (isset($_GET['refund_id'])) {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request, status, dt_required, payable, \n\t\t\taddr_ln_1, addr_ln_2, city, state, zip, purpose, amount, status, comments, assigned_to,created_by,check_date,check_nbr \n\t\t\tFROM refund AS R \n\t\t\tINNER JOIN users AS U \n\t\t\tON R.created_by= U.user_id \n\t\t\tWHERE refund_id = '{$_GET['refund_id']}' \n\t\t\tAND assigned_to='{$_SESSION['userid']}' LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            } else {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request, status, dt_required, payable, \n\t\t\taddr_ln_1, addr_ln_2, city, state, zip, purpose, amount, status, comments, assigned_to,created_by,check_date,check_nbr \n\t\t\tFROM refund AS R INNER JOIN users AS U ON R.created_by= U.user_id \n\t\t\tWHERE refund_id = '{$_POST['refund_id']}' \n\t\t\tAND assigned_to='{$_SESSION['userid']}' LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            }
        }
        if (!isset($_SESSION['order'])) {
            if ($dept_rowName['name'] == "Accounting") {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request,amount, status,refund_id, payable,assigned_to \n\t\t\t\t\tFROM refund AS R \n\t\t\t\t\tINNER JOIN \n\t\t\t\t\tusers AS U \n\t\t\t\t\tON R.created_by = U.user_id \n\t\t\t\t\tWHERE status !='deleted' AND status !='VOIDED' AND (status='ACCOUNTING APPROVAL') AND assigned_to='{$_SESSION['userid']}'  \n\t\t\t\t\tORDER BY dt_request,U.last_name,status LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            } elseif ($dept_rowName['name'] == "Billing") {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request,amount, status,refund_id, payable,assigned_to \n\t\t\t\t\tFROM refund AS R \n\t\t\t\t\tINNER JOIN \n\t\t\t\t\tusers AS U \n\t\t\t\t\tON R.created_by = U.user_id \n\t\t\t\t\tWHERE status !='deleted' AND status !='VOIDED' AND (status='ACCOUNTING APPROVED' OR status='NEW') assigned_to='{$_SESSION['userid']}'  \n\t\t\t\t\tORDER BY dt_request,U.last_name,status AND LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            }
        } else {
            if ($dept_rowName['name'] == "Accounting") {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request,amount, status,refund_id, payable,assigned_to \n\t\t\t\t\tFROM refund AS R \n\t\t\t\t\tINNER JOIN \n\t\t\t\t\tusers AS U \n\t\t\t\t\tON R.created_by = U.user_id \n\t\t\t\t\tWHERE status !='deleted' AND status !='VOIDED' AND (status='ACCOUNTING APPROVAL') AND assigned_to='{$_SESSION['userid']}' \n\t\t\t\t\tORDER BY " . $_SESSION['order'] . " LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            } elseif ($dept_rowName['name'] == "Billing") {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request,amount, status,refund_id, payable,assigned_to \n\t\t\t\t\tFROM refund AS R \n\t\t\t\t\tINNER JOIN \n\t\t\t\t\tusers AS U \n\t\t\t\t\tON R.created_by = U.user_id \n\t\t\t\t\tWHERE status !='deleted' AND status !='VOIDED' AND (status='ACCOUNTING APPROVED' OR status='NEW') AND assigned_to='{$_SESSION['userid']}' \n\t\t\t\t\tORDER BY " . $_SESSION['order'] . " LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            }
        }
    } else {
        //else access levels
        if (!isset($_SESSION['order'])) {
            if ($dept_rowName['name'] == "Accounting") {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request,amount, status,refund_id, payable,assigned_to,\n\t\t\t\t\taccounting_approval,billing_initial_approval,billing_final_approval,urgent \n\t\t\t\t\tFROM refund AS R \n\t\t\t\t\tINNER JOIN \n\t\t\t\t\tusers AS U \n\t\t\t\t\tON R.created_by = U.user_id \n\t\t\t\t\tWHERE status !='deleted' AND status !='VOIDED' AND (status='ACCOUNTING APPROVAL') AND assigned_to='{$_SESSION['userid']}'    \n\t\t\t\t\tORDER BY dt_request,U.last_name,status LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            } elseif ($dept_rowName['name'] == "Billing") {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request,amount, status,refund_id, payable,assigned_to,\n\t\t\t\t\taccounting_approval,billing_initial_approval,billing_final_approval,urgent \n\t\t\t\t\tFROM refund AS R \n\t\t\t\t\tINNER JOIN \n\t\t\t\t\tusers AS U \n\t\t\t\t\tON R.created_by = U.user_id \n\t\t\t\t\tWHERE status !='deleted' AND status !='VOIDED' AND (status='ACCOUNTING APPROVED' OR status='NEW') AND assigned_to='{$_SESSION['userid']}'    \n\t\t\t\t\tORDER BY dt_request,U.last_name,status LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            }
        } else {
            if ($dept_rowName['name'] == "Accounting") {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request,amount, status,refund_id, payable,assigned_to,\n\t\t\t\t\taccounting_approval,billing_initial_approval,billing_final_approval,urgent \t\t\t\n\t\t\t\t\tFROM refund AS R \n\t\t\t\t\tINNER JOIN \n\t\t\t\t\tusers AS U \n\t\t\t\t\tON R.created_by = U.user_id \n\t\t\t\t\tWHERE status !='deleted' AND status !='VOIDED' AND (status='ACCOUNTING APPROVAL') AND assigned_to='{$_SESSION['userid']}'   \n\t\t\t\t\tORDER BY " . $_SESSION['order'] . " LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            } elseif ($dept_rowName['name'] == "Billing") {
                $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request,amount, status,refund_id, payable,assigned_to,\n\t\t\t\t\taccounting_approval,billing_initial_approval,billing_final_approval,urgent \n\t\t\t\t\tFROM refund AS R \n\t\t\t\t\tINNER JOIN \n\t\t\t\t\tusers AS U \n\t\t\t\t\tON R.created_by = U.user_id \n\t\t\t\t\tWHERE status !='deleted' AND status !='VOIDED' and (status='ACCOUNTING APPROVED' OR status='NEW') AND assigned_to='{$_SESSION['userid']}'    \n\t\t\t\t\tORDER BY dt_request,U.last_name,status LIMIT " . $_SESSION['initialOffset'] . "," . $_SESSION['RowsPerPage'];
            }
        }
    }
    echo 'new query <br>';
    echo $query;
    echo '<br>';
    $result = mysqli_query($db, $query);
    $arrayRefundUsers = array();
    $queryUserIDs = "SELECT user_id, first_name, last_name FROM users";
    $resultUserIDs = mysqli_query($db, $queryUserIDs);
    $ctr = 0;
    while ($row = mysqli_fetch_array($resultUserIDs)) {
        $arrayRefundUsers[$row['user_id']] = $row['first_name'] . ' ' . $row['last_name'];
    }
    $row = mysqli_fetch_array($result);
    print '<br /><br /><div align = "center"><b><h2>Assigned Refunds </h2></b>';
    if (sizeof($row)) {
        ///////HEADINGS FROM THE REFUNDS PAGE//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        print '<div align = "center"><p>Refund Requests Currently Assigned to you: </p><br>';
        print '<table border="1" cellpadding = "3">
		<tr>
		<td><center><b><a href=' . $_SERVER['PHP_SELF'] . '?encounter_num=y>Encounter Number</a></b></center></td>
		<td><center><b><a href=' . $_SERVER['PHP_SELF'] . '?refund_id=y>Refund ID</a></b></center></td>
		<td><center><b><a href=' . $_SERVER['PHP_SELF'] . '?encounter_date=y>Date Requested</a></b></center></td>
		<td><center><b><a href=' . $_SERVER['PHP_SELF'] . '?urgent=y>Urgent</a></b></center></td>
		<td><center><b><a href=' . $_SERVER['PHP_SELF'] . '?requested_by=y>Requested By</a></b></center></td>
		<td><center><b><a href=' . $_SERVER['PHP_SELF'] . '?payable_order=y>Payable To</a></b></center></td>
		<td><center><b><a href=' . $_SERVER['PHP_SELF'] . '?amount_order=y>Amount</a></b></center></td>
		<td><center><b><a href=' . $_SERVER['PHP_SELF'] . '?status_order=y>Status</a></b></center></td>
		<td><center><b><a href=' . $_SERVER['PHP_SELF'] . '?status_order=y>Assigned To</a></b></center></td>';
        ///////END HEADINGS FROM THE REFUNDS PAGE////////////////////?////////////////////////////////////////////////////////////////////////////////////////////////////////
        /*
        	<td><b><center>Actions</center></b></td>
        */
        $result_display_ctr = 0;
        $current_date = date("Y-m-d H:i:s");
        $result = mysqli_query($db, $query);
        while ($row = mysqli_fetch_array($result)) {
//.........这里部分代码省略.........
开发者ID:TheDevine,项目名称:pt_refund,代码行数:101,代码来源:refundFunctions.php

示例13: showPage

function showPage($username = '', $accessLvl = '', $errors = '')
{
    showHeader($username, $accessLvl);
    global $db;
    include 'connectToDB.php';
    if ($errors) {
        //show errors at top of page
        print '<h2 class = "error"> The following errors were encountered:</h2>';
        print '<ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    //if(isset($_POST['first_name']) && isset($_POST['last_name']) && isset($_POST['username'])){
    print <<<ADDUSERPAGE

\t\t\t<h2 align="center">Add/Edit PAR1 Recipients</h2>
\t\t\t<form method="POST" action="{$_SERVER['PHP_SELF']}" name="add_acc_rec">
\t\t  <table style="width: 100%" border="1">
\t\t\t<tbody>
\t\t\t  \t\t  
\t\t\t <tr>
            <td>PAR1 Recipient 1 </td>
            <td>
              <select name="par1_recipient_1">
ADDUSERPAGE;
    $query_users = 'SELECT user_id, first_name, last_name FROM users';
    $result_users = mysqli_query($db, $query_users);
    $query_users_rec_1 = "SELECT recipient_1 FROM email_recipients WHERE step='par1' ";
    $result_users_rec_1 = mysqli_query($db, $query_users_rec_1);
    $rec_1 = mysqli_fetch_array($result_users_rec_1);
    while ($row_users = mysqli_fetch_array($result_users)) {
        $selected = $row_users['user_id'] === $rec_1['recipient_1'] ? ' selected="selected"' : '';
        print "<option value=\"{$row_users['user_id']}\"";
        print " {$selected} >{$row_users['first_name']} {$row_users['last_name']}</option>";
    }
    $query_users = 'SELECT user_id, first_name, last_name FROM users';
    $result_users = mysqli_query($db, $query_users);
    print <<<EDITUSERPAGE
              </select>
              <br>
            </td>
          </tr>

\t\t\t  <tr>
            <td>PAR1 Recipient 2</td>
            <td>
              <select name="par1_recipient_2">\t\t  
\t\t\t
EDITUSERPAGE;
    $query_users = 'SELECT user_id, first_name, last_name FROM users';
    $result_users = mysqli_query($db, $query_users);
    $query_users_rec_2 = "SELECT recipient_2 FROM email_recipients WHERE step='par1' ";
    $result_users_rec_2 = mysqli_query($db, $query_users_rec_2);
    $rec_2 = mysqli_fetch_array($result_users_rec_2);
    print "<option value=\"\"></option>";
    while ($row_users = mysqli_fetch_array($result_users)) {
        $selected = $row_users['user_id'] === $rec_2['recipient_2'] ? ' selected="selected"' : '';
        print "<option value=\"{$row_users['user_id']}\"";
        print " {$selected}>{$row_users['first_name']} {$row_users['last_name']}</option>";
    }
    $query_users = 'SELECT user_id, first_name, last_name FROM users';
    $result_users = mysqli_query($db, $query_users);
    print <<<EDITUSERPAGES
          </select>
              <br>
            </td>
          </tr>
\t\t  
\t\t              <td>PAR1 Recipient 3</td>

\t\t  <td>
\t\t      <select name="par1_recipient_3">\t\t  

EDITUSERPAGES;
    $query_users = 'SELECT user_id, first_name, last_name FROM users';
    $result_users = mysqli_query($db, $query_users);
    $selected = 1;
    $query_users_rec_3 = "SELECT recipient_3 FROM email_recipients WHERE step='par1' ";
    $result_users_rec_3 = mysqli_query($db, $query_users_rec_3);
    $rec_3 = mysqli_fetch_array($result_users_rec_3);
    print "<option value=\"\"></option>";
    while ($row_users = mysqli_fetch_array($result_users)) {
        $selected = $row_users['user_id'] === $rec_3['recipient_3'] ? ' selected="selected"' : '';
        print "<option value=\"{$row_users['user_id']}\"";
        print " {$selected}>{$row_users['first_name']} {$row_users['last_name']}</option>";
    }
    print <<<EDITUSERPAGES
          </select>
              <br>
            </td>
          </tr>\t\t  
\t\t 
        </tbody>
      </table>
      <input type="hidden" name="_submit_check" value="1" />
\t  <br>
      <center><button formmethod="post" formaction="{$_SERVER['PHP_SELF']}" value="submit" name="Submit">Submit Changes</button></center>
\t  </form>
\t  
EDITUSERPAGES;
//.........这里部分代码省略.........
开发者ID:TheDevine,项目名称:pt_refund,代码行数:101,代码来源:recipientsBillingEmail_2.php

示例14: showEditPage

function showEditPage($username = '', $accessLvl = '', $errors = '')
{
    //page where user will actually edit user information
    //echo 'hi';
    showHeader($username, $accessLvl);
    global $db;
    ?>
		<html lang="en">
		<head>
		<meta charset="utf-8">
		<title>jQuery UI Datepicker - Default functionality</title>

		<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
		<script src="//code.jquery.com/jquery-1.10.2.js"></script>
		<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
		<link rel="stylesheet" href="/resources/demos/style.css">
		<script>
		$(function() {
		$( "#datepickerSTART" ).datepicker();
		});
		
		$(function() {
		$( "#datepickerEND" ).datepicker();
		});
		</script>
		</head>

		<body>
			
		</body>
		</html>
		
<?php 
    if ($errors) {
        //show errors at top of page
        print '<h2 class = "error"> The following errors were encountered:</h2>';
        print '<ul><li>';
        print implode('</li><li>', $errors);
        print '</li></ul>';
    }
    $query = "SELECT NG_enc_id, U.first_name, U.last_name, dt_request, dt_required, payable, addr_ln_1, addr_ln_2, city, \n\tstate, zip, purpose, amount, status, comments \n\tFROM refund AS R INNER JOIN users AS U \n\tON R.created_by= U.user_id WHERE refund_id = '{$_GET['refund_id']}'";
    $result = mysqli_query($db, $query);
    $row = mysqli_fetch_array($result);
    //echo $query;
    //echo '<br>';
    print <<<EDITUSERPAGE
<h2 align="center">Edit Refund INDEX PAGE</h2>
<a href="index.php">Back to Refunds</a>
\t\t<form method="POST" action="{$_SERVER['PHP_SELF']}" name="update_refund">
      <table style="width: 100%" border="1">
        <tbody>
          <tr>
            <td>Date Required</td>

\t\t\t<td><input type="text" name="dt_request" id="datepickerSTART" value ="{$row['dt_request']}"></td>

          </tr>
          <tr>
          \t<td>Amount</td>
          \t<td>\$<input maxlength="50" name="amount" type="text" value ="{$row['amount']}"><br />
          </tr>
          <tr>
            <td>Check Payable To:</td>
            <td><input name="payable" type="text" value="{$row['payable']}">
            </td>
          </tr>
          <tr>
            <td>Address Line 1</td>
            <td><input name="addr_ln_1" type="text" value="{$row['addr_ln_1']}">
            </td>
          </tr>
          <tr>
            <td>Address Line 2</td>
            <td><input name="addr_ln_2" type="text" value="{$row['addr_ln_2']}">
            </td>
          </tr>
          <tr>
            <td>City</td>
            <td><input  name="city" type="text" value="{$row['city']}">
            </td>
          <tr>
            <td>State</td>
            <td><input maxlength="2" name="state" type="text" value="{$row['state']}">
            </td>
          </tr>
          <tr>
            <td>Zip</td>
            <td><input  maxlength="10" name="zip" type="text" value="{$row['zip']}">
            </td>
          </tr>
          <tr>
            <td>Encounter Number</td>
            <td><input name="enc_nbr" type="text" readonly value="{$row['NG_enc_id']}">
            </td>
          </tr>
\t\t  <tr>
            <td>Refund ID</td>
            <td><input name="refund_id" type="text" value="{$row['refund_id']}">
            </td>
          </tr>
//.........这里部分代码省略.........
开发者ID:TheDevine,项目名称:pt_refund,代码行数:101,代码来源:functions.php

示例15: showExampleQueries

    echo "\n      <form action='manager_database.php' method='post' id='{$description}'>\n      <input type='hidden' name='query' value='{$query}'>\n      <a href='#' onclick='submitQuery(\"{$description}\"); return false;'>\n      {$description}\n      </a>\n      </form>";
}
function showExampleQueries()
{
    echo "\n      <br>\n      <fieldset>\n      <legend>Example Queries</legend>";
    showExampleQuery("Show Books", "SELECT * FROM books JOIN inventory on books.isbn = inventory.isbn;");
    showExampleQuery("Show Customers", "SELECT * FROM customers;");
    showExampleQuery("Show Employees", "SELECT * FROM employees;");
    showExampleQuery("Show Orders", "SELECT * FROM orders;");
    showExampleQuery("Show Customer Addresses", "SELECT customer_id, street_number, street_name, city, state, zip_code " . "FROM customer_address INNER JOIN address USING " . "(street_number, street_name, city, state);");
    showExampleQuery("Show Employee Addresses", "SELECT employee_id, street_number, street_name, city, state, zip_code " . "FROM employee_address INNER JOIN address USING " . "(street_number, street_name, city, state);");
    showExampleQuery("Show Customer Reviews", "SELECT * FROM comments;");
    showExampleQuery("Show Suppliers", "SELECT * FROM suppliers;");
    echo "</fieldset>";
}
showHeader('Direct Access to Database');
?>
<form action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="post">
  <fieldset>
    <legend>Enter the query below</legend>
    <p class="form">
      <label>Query: </label>
      <textarea name="query" style='vertical-align: middle;'
                cols='50' rows='2'><?php 
echo $_POST['query'];
?>
</textarea>
    </p>
开发者ID:xukmin,项目名称:aladdin,代码行数:31,代码来源:manager_database.php


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