示例#1
0
 public function preprocess()
 {
     // maintain user logins longer
     refreshSession();
     if (validateUserQuiet('batches')) {
         $this->audited = 0;
     }
     // autoclear old data from clipboard table on intial page load
     $clipboard = $this->connection->tableDefinition('batchCutPaste');
     if (isset($clipboard['tdate'])) {
         $this->connection->query('DELETE FROM batchCutPaste WHERE tdate < ' . $this->connection->curdate());
     }
     $this->addRoute('get<id><paste>', 'post<id><addUPC>', 'post<id><addLC>', 'post<id><upc><price>', 'post<id><autotag>', 'post<id><force>', 'post<id><unsale>', 'post<id><limit>', 'post<id><upc><uid><cut>', 'post<id><upc><price><qty>', 'delete<id><upc>', 'post<id><upc><swap>', 'post<id><qualifiers><discount>', 'post<id><trim>', 'post<id><storeID>');
     return parent::preprocess();
 }
示例#2
0
 function body_content()
 {
     $priv = validateUserQuiet('admin');
     $options = 'all';
     if (!$priv) {
         $options = 'limited';
     }
     ob_start();
     /* password change or reset only allowed if not using
        UNIX or LDAP passwords */
     echo "Welcome {$this->current_user}";
     echo "<ul>";
     if ($options == 'all') {
         echo '<li><a href="AuthClassesPage.php">View authorization classes</a></li>';
         echo '<li><a href="AuthClassesPage.php?new=1">Create authorization classes</a></li>';
         echo '<li><a href="AuthClassesPage.php?edit=1">Edit authorization classes</a></li>';
         echo '<li><a href="AuthClassesPage.php?remove=1">Delete authorization classes</a></li>';
         echo "<br />";
         echo '<li><a href="AuthUsersPage.php">View Users</a></li>';
         echo '<li><a href="AuthUsersPage.php?detail=1">View User\'s Authoriztions</a></li>';
         echo '<li><a href="AuthUsersPage.php?new=1">Create User</a></li>';
         echo '<li><a href="AuthUsersPage.php?newAuth=1">Add Authorization to User</a></li>';
         echo '<li><a href="AuthUsersPage.php?remove=1">Delete User</a></li>';
         echo '<li><a href="AuthUsersPage.php?removeAuth=1">Delete Authorization from User</a></li>';
         if (!$this->config->get('AUTH_SHADOW', false) && !$this->config->get('AUTH_LDAP', false)) {
             echo '<li><a href="AuthUsersPage.php?reset=1">Reset a User\'s password</a></li>';
         }
         echo "<br />";
         echo '<li><a href="AuthGroupsPage.php">View Groups</a></li>';
         echo '<li><a href="AuthGroupsPage.php?detail=1">View Details of a Group</a></li>';
         echo '<li><a href="AuthGroupsPage.php?new=1">Create a Group</a></li>';
         echo '<li><a href="AuthGroupsPage.php?newUser=1">Add User to a Group</a></li>';
         echo '<li><a href="AuthGroupsPage.php?newAuth=1">Add Authorization to a Group</a></li>';
         echo '<li><a href="AuthGroupsPage.php?remove=1">Delete a Group</a></li>';
         echo '<li><a href="AuthGroupsPage.php?removeUser=1">Delete User from Group</a></li>';
         echo '<li><a href="AuthGroupsPage.php?removeAuth=1">Delete Authorization from Group</a></li>';
         echo "<br />";
         echo "<li><a href=AuthPosePage.php>Switch User</a></li>";
     }
     // The 'limited' options
     if (!$this->config->get('AUTH_SHADOW', false) && !$this->config->get('AUTH_LDAP', false)) {
         echo "<li><a href=AuthChangePassword.php>Change password</a></li>";
     }
     echo "</ul>";
     return ob_get_clean();
 }
示例#3
0
 function preprocess()
 {
     global $FANNIE_URL, $FANNIE_WINDOW_DRESSING;
     $this->canDeleteItems = validateUserQuiet('delete_items');
     $this->canEditItems = validateUserQuiet('pricechange');
     $this->excel = FormLib::get_form_value('excel', False);
     if ($this->excel) {
         echo $this->list_content();
         return false;
     }
     if (FormLib::get_form_value('ajax') !== '') {
         $this->ajax_response();
         return false;
     }
     if (FormLib::get_form_value('supertype') !== '') {
         $this->mode = 'list';
     }
     return true;
 }
示例#4
0
 function preprocess()
 {
     global $FANNIE_OP_DB;
     // maintain user logins longer
     refreshSession();
     if (validateUserQuiet('batches')) {
         $this->audited = 0;
     }
     $this->con = FannieDB::get($FANNIE_OP_DB);
     // autoclear old data from clipboard table on intial page load
     $clipboard = $this->con->tableDefinition('batchCutPaste');
     if (isset($clipboard['tdate'])) {
         $this->con->query('DELETE FROM batchCutPaste WHERE tdate < ' . $this->con->curdate());
     }
     $this->__routes[] = 'post<newType><newName><newStart><newEnd><newOwner>';
     $this->__routes[] = 'post<id><batchName><batchType><startDate><endDate><owner>';
     $this->__routes[] = 'get<mode><filter><max>';
     $this->__routes[] = 'post<delete><id>';
     return parent::preprocess();
 }
示例#5
0
<?php

include '../../config.php';
include_once $FANNIE_ROOT . 'classlib2.0/FannieAPI.php';
include_once $FANNIE_ROOT . 'src/SQLManager.php';
$dbc = FannieDB::get($FANNIE_OP_DB);
$sql = $dbc;
include_once $FANNIE_ROOT . 'auth/login.php';
if (!validateUserQuiet('editmembers') && !validateUserQuiet('editmembers_csc') && !validateUserQuiet('viewmembers')) {
    $url = $FANNIE_URL . 'auth/ui/loginform.php?redirect=' . $_SERVER['PHP_SELF'];
    header('Location: ' . $url);
    return;
}
//include('../db.php');
include 'memAddress.php';
$username = validateUserQuiet('editmembers');
if (isset($_GET['memNum'])) {
    $memID = $_GET['memNum'];
} else {
    $memID = $_POST['memNum'];
}
/* audit logging */
$uid = getUID($username);
$auditQ = "insert custUpdate select " . $sql->now() . ",{$uid},1,\n    CardNo,personNum,LastName,FirstName,\n    CashBack,Balance,Discount,ChargeLimit,ChargeOK,\n    WriteChecks,StoreCoupons,Type,memType,staff,SSI,Purchases,\n    NumberOfChecks,memCoupons,blueLine,Shown,id from custdata where cardno={$memID}";
//$auditR = $sql->query($auditQ);
$MI_FIELDS = array();
$memNum = $_POST['memNum'];
$MI_FIELDS['street'] = $_POST['address1'] . (!empty($_POST['address2']) ? "\n" . $_POST['address2'] : '');
$MI_FIELDS['city'] = $_POST['city'];
$MI_FIELDS['state'] = $_POST['state'];
$MI_FIELDS['zip'] = $_POST['zip'];
示例#6
0
  * SpecialOrderContact
  * SpecialOrderStatus
  Values are still maintained in the old tables, but the
  new SpecialOrders table is used for lookups.
*/
include dirname(__FILE__) . '/../config.php';
if (!class_exists('FannieAPI')) {
    include $FANNIE_ROOT . 'classlib2.0/FannieAPI.php';
}
if (!function_exists('checkLogin')) {
    include $FANNIE_ROOT . 'auth/login.php';
}
$dbc = FannieDB::get($FANNIE_OP_DB);
$TRANS = $FANNIE_TRANS_DB . $dbc->sep();
$canEdit = false;
if (validateUserQuiet('ordering_edit')) {
    $canEdit = true;
}
if (!isset($_REQUEST['action'])) {
    return;
}
$orderID = isset($_REQUEST['orderID']) ? (int) $_REQUEST['orderID'] : '';
switch ($_REQUEST['action']) {
    case 'loadCustomer':
        if (isset($_REQUEST['nonForm'])) {
            echo getCustomerNonForm($orderID);
        } else {
            echo getCustomerForm($orderID);
        }
        break;
    case 'reloadMem':
示例#7
0
文件: listDel.php 项目: phpsmith/IS4C
<?php

include '../../config.php';
include $FANNIE_ROOT . 'auth/login.php';
$uid = 1005;
$user = validateUserQuiet('delete_items');
if (!$user) {
    header("Location: {$FANNIE_URL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/queries/listDel.php?upc={$_GET['upc']}&description={$_GET['description']}");
    return;
}
$uid = getUID($user);
?>
<html>
<body bgcolor=#dd0000 text=#ccccff>
<?php 
include '../db.php';
if (isset($_POST['Yes'])) {
    $upc = $_POST['upc'];
    $gatherQ = '';
    $args = array();
    if (isset($_POST['description'])) {
        $desc = base64_decode($_POST['description']);
        $sql->prepare($gatherQ = "select upc,description,normal_price,department,tax,foodstamp,scale,modified,qttyenforced,discount,inuse from products where upc=? and description=?");
        $args = array($upc, $desc);
    } else {
        $gatherQ = $sql->prepare("select upc,description,normal_price,department,tax,foodstamp,scale,modified,qttyenforced,discount,inuse from products where upc=?");
        $args = array($upc);
    }
    $gatherR = $sql->execute($gatherQ, $args);
    $gatherRow = $sql->fetch_row($gatherR);
    $query = '';
示例#8
0
文件: staffAR.php 项目: phpsmith/IS4C
<?php

include '../../config.php';
if (!class_exists("FannieAPI")) {
    require_once $FANNIE_ROOT . "classlib2.0/FannieAPI.php";
}
if (!class_exists("SQLManager")) {
    require_once $FANNIE_ROOT . "src/SQLManager.php";
}
include $FANNIE_ROOT . 'auth/login.php';
include '../db.php';
if (!validateUserQuiet('staffar')) {
    ?>
   <html>
   <head><title>Please log in</title>
   <link href="../styles.css" rel="styleshhet" type="text/css">
   </head>
   <body>
   <div id=logo><img src='../images/newLogo_small.gif'></div>
   <div id=main><?php 
    echo "<a href=\"{$FANNIE_URL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/members/staffAR.php\">Click here</a> to login<p />";
} else {
    $sql->query("use is4c_trans");
    if (isset($_POST['recalc'])) {
        $truncQ = "TRUNCATE TABLE staffAR";
        $truncR = $sql->query($truncQ);
        $query = "SELECT\n              c.CardNo,\n              c.LastName,\n              c.FirstName,\n              n.balance as Ending_Balance\n              FROM is4c_op.custdata as c INNER JOIN staffID as a ON a.cardNo = c.CardNo\n          LEFT JOIN ar_live_balance AS n ON c.CardNo=n.card_no\n              WHERE (c.memType = 9 OR c.memType = 3 OR c.memType = 6)\n              and c.personNum = 1\n              order by c.LastName";
        $result = $sql->query($query);
        $insARQ = "INSERT INTO staffAR (cardNo, lastName, firstName, adjust)\n          SELECT\n              c.CardNo,\n              c.LastName,\n              c.FirstName,\n              n.balance as Ending_Balance\n              FROM is4c_op.custdata as c INNER JOIN staffID as a ON a.cardNo = c.CardNo\n          LEFT JOIN ar_live_balance AS n ON c.CardNo=n.card_no\n              WHERE (c.memType = 9 OR c.memType = 3 OR c.memType=6)\n              and c.personNum = 1\n              order by c.LastName";
        $insARR = $sql->query($insARQ);
    }
示例#9
0
        }
        $ret .= "<td bgcolor={$colors[$c]} id=editLink{$fetchW['0']}><a href=\"\" onclick=\"editPrice('{$fetchW['0']}'); return false;\">Edit</a></td>";
        $ret .= "<td bgcolor={$colors[$c]}><a href=\"\" onclick=\"deleteItem('{$fetchW['0']}'); return false;\">Delete</a></td>";
        $ret .= "</tr>";
        $row++;
    }
    $ret .= "</table>";
    $ret .= "<input type=hidden id=currentBatchID value={$id} />";
    return $ret;
}
include $FANNIE_ROOT . 'auth/login.php';
$user = validateUserQuiet('batches');
$audited = 0;
if (!$user) {
    $audited = 1;
    $user = validateUserQuiet('batches_audited');
}
if (!$user) {
    header("Location: {$FANNIE_URL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/it/newbatch");
    return;
}
?>

<html>
<head><title>Batch controller</title>
<script type="text/javascript" src="index.js"></script>
<script src="<?php 
echo $FANNIE_URL;
?>
src/javascript/jquery.js"
        language="javascript"></script>
示例#10
0
function itemParse($upc, $dupe = 'no', $description = '', $prefix = false)
{
    global $sql;
    /* why am I only checking for being logged in here
     * instead of a specific permission?
     * 
     * The enter and update item pages do that check
     * For new items, permission could be dependent on
     * which subdepartment is selected. For changing an item,
     * changing subdepartment introduces odd scenarios,
     * switching in and out of valid permission. Easier to just
     * check the final changes.
     */
    $logged_in = checkLogin();
    $p_columns = '
        p.upc,
        p.description,
        p.normal_price,
        p.pricemethod,
        p.quantity,
        p.groupprice,
        p.special_price,
        p.end_date,
        p.department,
        p.tax,
        p.foodstamp,
        p.scale,
        p.qttyEnforced,
        p.discount,
        p.modified,
        p.local
    ';
    // last comma omitted on purpose
    $savedUPC = "";
    $queryItem = "";
    $args = array();
    $numType = isset($_REQUEST['ntype']) ? $_REQUEST['ntype'] : 'UPC';
    if (is_numeric($upc)) {
        switch ($numType) {
            case 'UPC':
                $upc = str_pad($upc, 13, 0, STR_PAD_LEFT);
                $savedUPC = $upc;
                $queryItem = "SELECT {$p_columns},x.distributor,x.manufacturer,\n                u.brand,u.description as udesc,u.sizing,u.photo,\n                u.long_text,u.enableOnline,e.expires\n                FROM products as p left join \n                prodExtra as x on p.upc=x.upc \n                LEFT JOIN productUser as u\n                ON p.upc=u.upc LEFT JOIN productExpires\n                AS e ON p.upc=e.upc\n                WHERE p.upc = ? or x.upc = ?";
                $args = array($upc, $upc);
                break;
            case 'SKU':
                $queryItem = "SELECT {$p_columns},x.distributor,x.manufacturer,\n                u.brand,u.description as udesc,u.sizing,u.photo,\n                u.long_text,u.enableOnline,e.expires\n                FROM products as p inner join \n                vendorItems as v ON p.upc=v.upc \n                left join prodExtra as x on p.upc=x.upc \n                LEFT JOIN productUser as u\n                ON p.upc=u.upc LEFT JOIN productExpires\n                AS e ON p.upc=e.upc\n                WHERE v.sku=?";
                $args = array($upc);
                break;
            case 'Brand Prefix':
                $queryItem = "SELECT {$p_columns},x.distributor,x.manufacturer,\n                u.brand,u.description as udesc,u.sizing,u.photo,\n                u.long_text,u.enableOnline,e.expires\n            FROM products as p \n            left join prodExtra as x on p.upc=x.upc \n            LEFT JOIN productUser as u\n            ON p.upc=u.upc LEFT JOIN productExpires\n            AS e ON p.upc=e.upc\n            WHERE p.upc like ? order by p.upc";
                $args = array('%' . $upc . '%');
                break;
        }
    } else {
        $queryItem = "SELECT {$p_columns},x.distributor,x.manufacturer,\n            u.brand,u.description as udesc,u.sizing,u.photo,\n                u.long_text,u.enableOnline,e.expires\n            FROM products as p left join \n            prodExtra as x on p.upc=x.upc \n            LEFT JOIN productUser as u\n            ON p.upc=u.upc LEFT JOIN productExpires\n            AS e ON p.upc=e.upc\n            WHERE p.description LIKE ? OR \n            u.description LIKE ? ORDER BY p.description";
        $args = array('%' . $upc . '%', '%' . $upc . '%');
    }
    //echo $queryItem;
    echo "<script type=\"text/javascript\">";
    echo "function shelftag(u){";
    echo "testwindow= window.open (\"../../item/addShelfTag.php?upc=\"+u, \"New Shelftag\",\"location=0,status=1,scrollbars=1,width=300,height=220\");";
    echo "testwindow.moveTo(50,50);";
    echo "}";
    echo "</script>";
    $barcodeUPC = ltrim($upc, "0");
    echo "<script language=JavaScript>";
    echo "function popup(){";
    echo "testwindow= window.open (\"addLikeCode.php\", \"Add Like Code\",\"location=0,status=1,scrollbars=1,width=200,height=200\");";
    echo "testwindow.moveTo(50,50);";
    echo "}";
    echo "</script>";
    echo "<script language=JavaScript>";
    echo "function newTagCheck(){";
    echo "if (document.getElementById('newTag').checked)";
    //echo "shelftag();";
    echo "}";
    echo "</script>";
    $num = 0;
    $prepItem = $sql->prepare($queryItem);
    $resultItem = $sql->execute($prepItem, $args);
    $num = $sql->num_rows($resultItem);
    $likeCodeQ = $sql->prepare("SELECT u.*,l.likeCodeDesc FROM upcLike as u, likeCodes as l \n        WHERE u.likeCode = l.likeCode and u.upc = ?");
    $likeCodeR = $sql->execute($likeCodeQ, array($upc));
    $likeCodeRow = $sql->fetch_row($likeCodeR);
    $likeCodeNum = $sql->num_rows($likeCodeR);
    $listCodeQ = "SELECT * from likeCodes";
    $listCodeR = $sql->query($listCodeQ);
    $listCodeRow = $sql->fetch_row($likeCodeR);
    if ($num == 0) {
        noItem();
        echo "<head><title>Enter New Item</title></head>";
        echo "<BODY onLoad='putFocus(0,1);'>";
        printMods($savedUPC);
        echo "Item not found, would you like to enter it?";
        echo "<form action=enterTestItem.php method=post onsubmit=\"newTagCheck();\">";
        echo "<table>";
        echo "<tr><td align=right><b>UPC</b></td><td><font color='red'></font>\n            <input type=text value={$upc} name=upc maxlength=13></td>";
        echo "</tr><tr><td><b>Description</b></td><td>\n            <input type=text size=35 name=descript maxlength=30></td>";
        echo "<td><b>Price</b></td><td>\$<input type=text name=price></td></tr>";
        echo "<tr><td><b>Manufacturer</b></td><td><input type=text size=35 value=\"\" name=manufacturer /></td>";
        echo "<td><b>Distributor</b></td><td>&nbsp;<input type=text value=\"\" name=distributor /></td></tr>";
        echo "</table>";
        echo "<table border=0><tr>";
        echo "<th>Dept<th>Tax<th>FS<th>Scale<th>QtyFrc<th>NoDisc<th>Local<th>Like Code<th>Shelf Tag</b>";
        echo "</tr>";
        echo "<tr>";
        $query2 = "SELECT * FROM departments as d,\n                MasterSuperDepts AS s WHERE s.dept_ID=d.dept_no AND dept_no NOT IN (60,225)\n                ORDER BY superID, dept_no";
        echo "<td>";
        $upc_split = substr($upc, 0, 7);
        $guessQ = $sql->prepare("select department from products where upc like ?\n                   group by department\n                   order by count(*) desc");
        $guessR = $sql->execute($guessQ, array($upc_split . '%'));
        $guess = 60;
        if ($sql->num_rows($guessR) > 0) {
            $guessW = $sql->fetch_array($guessR);
        }
        $guess = $guessW['department'];
        echo '<select name="dept">';
        $result2 = $sql->query($query2);
        while ($row2 = $sql->fetch_row($result2)) {
            printf('<option %s value="%d">%d %s</option>', $row2['dept_no'] == $guess ? 'selected' : '', $row2['dept_no'], $row2['dept_no'], $row2['dept_name']);
        }
        echo '</select>';
        echo " </td>";
        echo "<td align=right>Reg";
        echo "<input type=radio name=tax value=1><br>";
        echo "Deli<input type=radio name=tax value=2><br>";
        echo "No Tax<input type=radio name=tax value=0";
        echo "></td><td align=center><input type=checkbox value=1 name=FS";
        echo "></td><td align=center><input type=checkbox value=1 name=Scale";
        echo "></td><td align=center><input type=checkbox value=1 name=ForcQty";
        echo "></td><td align=center><input type=checkbox value=1 name=NoDisc";
        echo "></td><td align=center><select name=local><option value=0>No</option>\n        <option value=1>SC</option><option value=2>300mi</option></select>";
        echo "<input type=hidden value=1 name=inUse";
        echo "><td align=center>";
        //echo "<input type=text align=right size=4 name=likeCode>";
        echo "<select name=likeCode style=\"{width: 175px;}\">";
        echo "<option value=\"\">(none)</option>";
        $likelistQ = "select * from likeCodes order by likecode";
        $likelistR = $sql->query($likelistQ);
        while ($llRow = $sql->fetch_array($likelistR)) {
            echo "<option value={$llRow[0]}";
            if (isset($likecode) && $llRow[0] == $likecode) {
                echo " selected";
            }
            echo ">{$llRow[0]} {$llRow[1]}</option>";
        }
        echo "</select>";
        echo "</td><td align=center><input type=checkbox value=1 id=newTag name=shelftag></td></tr>";
        if ($logged_in) {
            echo "<tr><td><input type='submit' name='submit' value='submit'>";
        } else {
            echo "<tr><td>Please <a href=/auth/ui/loginform.php?redirect=/queries/productTest.php?upc={$upc}>";
            echo "login</a> to add items";
        }
        echo "</td></tr> ";
        echo "</tr></table>";
    } elseif ($num > 1) {
        moreItems($upc);
        $upcs = array();
        $descriptions = array();
        for ($i = 0; $i < $num; $i++) {
            $rowItem = $sql->fetch_array($resultItem);
            $upcs[$i] = $rowItem['upc'];
            $descriptions[$i] = $rowItem['description'];
            $modified[$i] = $rowItem['modified'];
            //echo "<a href='productTest.php?upc=$upc'>" . $upc . " </a>- " . $rowItem['description'] . "<br>";
        }
        for ($i = 0; $i < $num; $i++) {
            $dupe = false;
            for ($j = 0; $j < $num; $j++) {
                if ($i != $j and $upcs[$i] == $upcs[$j]) {
                    $enc = base64_encode($descriptions[$i]);
                    echo "<a href=productTest.php?upc={$upcs[$i]}&duplicate=yes&description={$enc}>{$upcs[$i]}</a>-{$descriptions[$i]} - <b>DUPLICATE</b> - ";
                    echo "<a href=javascript:delete_popup(\"{$upcs[$i]}\",\"{$enc}\")><img src=trash.png border=0/></a><br />";
                    $j = $num;
                    $dupe = true;
                }
            }
            if (!$dupe) {
                echo "<a href=productTest.php?upc={$upcs[$i]}>{$upcs[$i]}</a>-{$descriptions[$i]}<br />";
            }
        }
    } else {
        oneItem($upc);
        $rowItem = $sql->fetch_array($resultItem);
        $upc = $rowItem['upc'];
        $currentDepartment = $rowItem['department'];
        $prev = $next = 0;
        $modified = $rowItem['modified'];
        deptPrevNext($currentDepartment, $upc, $prev, $next);
        $modDate = $modified;
        $likecode = '';
        if (!empty($likeCodeRow[1])) {
            $likecode = $likeCodeRow[1];
        }
        echo "<head><title>Update Item</title></head>";
        echo "<BODY onLoad='putFocus(0,2);'>";
        printMods($savedUPC);
        echo "<form action=updateItemTest.php method=post>";
        echo "<table>";
        echo "<tr><td align=right><b>UPC</b></td><td><font color='red'>" . $rowItem['upc'] . "</font><input type=hidden value='{$rowItem['upc']}' name=upc>";
        if ($prev != -1) {
            echo "&nbsp;&nbsp;<a href=productTest.php?upc={$prev}>Previous</a>";
        }
        if ($next != -1) {
            echo "&nbsp;&nbsp;<a href=productTest.php?upc={$next}>Next</a>";
        }
        echo "</td>";
        echo "</tr><tr><td><b>Description</b></td><td><input type=text size=35 maxlength=30 value=\"{$rowItem['description']}\" name=descript></td>";
        echo "<td><b>Price</b></td><td>\$<input type=text value='{$rowItem['normal_price']}' name=price></td></tr>";
        echo "<tr><td colspan=2 align=right><b>Enable Volume Price</b> <input type=checkbox name=doVolume ";
        echo ($rowItem['pricemethod'] != 0 ? "checked" : "") . " /></td><td colspan=2>";
        echo "<input type=hidden name=pricemethod value=\"{$rowItem['pricemethod']}\">";
        echo "<input type=text size=4 name=vol_qtty value=" . ($rowItem['quantity'] != 0 ? $rowItem['quantity'] : "\"\"") . " />";
        echo " for \$<input type=text size=4 name=vol_price value=" . ($rowItem['groupprice'] != 0 ? $rowItem['groupprice'] : "\"\"") . " /></td></tr>";
        echo "<tr><td><b>Manufacturer</b></td><td><input type=text size=35 value=\"{$rowItem['manufacturer']}\" name=manufacturer /></td>";
        echo "<td><b>Distributor</b></td><td>&nbsp;<input type=text value=\"{$rowItem['distributor']}\" name=distributor /></td></tr>";
        echo "<a href=/git/fannie/reports/PriceHistory/?upc={$rowItem['upc']} target=blank>Click for Price History</a>";
        if ($rowItem['special_price'] != 0) {
            echo "<tr><td><font size=+1 color=green><b>Sale Price:</b></font></td><td><font size=+1 color=green>{$rowItem['special_price']}</font>";
            echo "<td colspan=2><font size=+1 color=green>End Date: {$rowItem['end_date']}</font></td><tr>";
            $findBatchQ = $sql->prepare("select batchName from batches as b, batchList as l\n              where b.batchID = l.batchID and l.upc like ?\n              and " . $sql->curdate() . " BETWEEN b.startDate AND b.endDate");
            $findBatchR = $sql->execute($findBatchQ, array($upc));
            $batchName = $sql->num_rows($findBatchR) == 0 ? "Unknown" : array_pop($sql->fetch_array($findBatchR));
            if ($batchName == "Unknown" && $likecode != "") {
                $findBatchQ = $sql->prepare("select batchName from batches as b, batchList as l\n                where b.batchID=l.batchID and l.upc = ?\n                  and " . $sql->curdate() . " BETWEEN b.startDate AND b.endDate");
                $findBatchR = $sql->execute($findBatchQ, array('LC' . $likecode));
                $batchName = $sql->num_rows($findBatchR) == 0 ? "Unknown" : array_pop($sql->fetch_array($findBatchR));
            }
            echo "<tr><td colspan=4><b>Batch: {$batchName}</b> ";
            if (validateUserQuiet('pricechange') || substr($upc, 0, 3) == "002") {
                echo "(<a href=unsale.php?upc={$upc}><font color=red>Take this item off sale now</font></a>)</td>";
            }
        }
        echo "</table>";
        echo "<table border=0><tr>";
        echo "<th>Dept<th>Tax<th>FS<th>Scale<th>QtyFrc<th>NoDisc<th>Local<th>Like Code<th>&nbsp;</b>";
        echo "</tr>";
        echo "<tr align=top>";
        //$dept=$row1[3];
        $query2 = "SELECT * FROM departments as d,\n                MasterSuperDepts AS s WHERE s.dept_ID=d.dept_no AND dept_no NOT IN (60,225)\n                ORDER BY superID, dept_no";
        echo "<td>";
        $query3 = $sql->prepare("SELECT dept_no,superID FROM departments as d\n                LEFT JOIN MasterSuperDepts AS s ON d.dept_no=s.dept_ID\n                WHERE dept_no = ?");
        $result3 = $sql->execute($query3, $rowItem['department']);
        $row3 = $sql->fetch_array($result3);
        echo '<select name="dept">';
        $result2 = $sql->query($query2);
        while ($row2 = $sql->fetch_row($result2)) {
            printf('<option %s value="%d">%d %s</option>', $row2['dept_no'] == $rowItem['department'] ? 'selected' : '', $row2['dept_no'], $row2['dept_no'], $row2['dept_name']);
        }
        echo '</select>';
        echo " </td>";
        echo "<td align=right>Reg ";
        echo "<input type=radio name=tax value=1";
        if ($rowItem['tax'] == 1) {
            echo " checked";
        }
        echo "><br>Deli <input type=radio name=tax value=2";
        if ($rowItem['tax'] == 2) {
            echo " checked";
        }
        echo "><br>NoTax <input type=radio name=tax value=0";
        if ($rowItem['tax'] == 0) {
            echo " checked";
        }
        echo "></td><td align=center><input type=checkbox value=1 name=FS";
        if ($rowItem['foodstamp'] == 1) {
            echo " checked";
        }
        echo "></td><td align=center><input type=checkbox value=1 name=Scale";
        if ($rowItem['scale'] == 1) {
            echo " checked";
        }
        echo "></td><td align=center><input type=checkbox value=1 name=QtyFrc";
        if ($rowItem['qttyEnforced'] == 1) {
            echo " checked";
        }
        echo "></td><td align=center><input type=checkbox value=0 name=NoDisc";
        if ($rowItem['discount'] == 0) {
            echo " checked";
        }
        echo ">" . "</td><input type=hidden value=1 name=inUse";
        echo "></td><td align=center><select name=local>";
        printf("<option value=0 %s>No</option>", $rowItem['local'] == 0 ? 'selected' : '');
        printf("<option value=1 %s>SC</option>", $rowItem['local'] == 1 ? 'selected' : '');
        printf("<option value=2 %s>300mi</option>", $rowItem['local'] == 2 ? 'selected' : '');
        echo "</select><td align=center>";
        //echo "<input type=text align=right size=4 value='$likecode' name=likeCode>";
        echo "<select name=likeCode style=\"{width: 175px;}\">";
        echo "<option value=-1>(none)</option>";
        $likelistQ = "select * from likeCodes order by likecode";
        $likelistR = $sql->query($likelistQ);
        while ($llRow = $sql->fetch_array($likelistR)) {
            echo "<option value={$llRow[0]}";
            if ($llRow[0] == $likecode) {
                echo " selected";
            }
            echo ">{$llRow[0]} {$llRow[1]}</option>";
        }
        echo "</select>";
        echo "</td><td>";
        echo "<a href=javascript:popup()>Add like code</a>";
        echo "</td>";
        echo "<a href=javascript:shelftag('{$upc}')>New Shelf Tag</a>";
        echo "</tr>";
        echo "</tr>";
        echo "<tr><td align=right><font size=-1 color=purple><i><b>Last Modified: </b></i></font></td>";
        echo "<td colspan=3><font size=-1 color=purple><i>{$modDate}</i></td>";
        echo "<td colspan=5><a href=/git/fannie/reports/RecentSales/index.php?upc={$upc} target=blank>Click for History</a></td></tr>";
        echo "<tr><td colspan=4>";
        // kick out a scale input for upcs starting with 002
        // pass variables with prefix s_
        if (preg_match("/^002/", $rowItem['upc']) && $row3[1] == 3) {
            $scaleQuery = $sql->prepare("select * from scaleItems where plu=?");
            $scaleRes = $sql->execute($scaleQuery, array($upc));
            $scaleRow = $sql->fetch_row($scaleRes);
            echo "<table border=1 cellspacing=0 cellpadding=7><tr>";
            echo "<td bgcolor=\"#FFFFCC\">";
            echo "Scale Information:<br />";
            echo "UPC: <font color=red>{$rowItem['upc']}</font><p />";
            echo "<input type=hidden name=s_plu value={$rowItem['upc']}>";
            // update:  some items might need a longer description
            echo "Longer description:";
            // only show a longer description if the description differs
            echo "&nbsp;&nbsp;<input type=text name=s_longdesc size=40 maxlength=100";
            if ($rowItem['description'] != $scaleRow[2]) {
                echo " value='{$scaleRow[2]}'";
            }
            echo ">";
            echo "<p />";
            // EXCEPTION PRICE?
            //   Unnecessary to users but expected by csv package
            echo "<input type=hidden name=s_exception value=0.00>";
            echo "<table border=1 cellspacing=0 cellpadding=7><tr>";
            echo "<th>Weight</th><th>By Count</th><th>Tare</th><th>Shelf Life</th><th>Net Wt (oz)</th><th>Label</th><th>Safehandling</th>";
            echo "</tr><tr><td>";
            echo "<input type=radio name=s_type value=\"Random Weight\"";
            if ($scaleRow[4] == 0) {
                echo " checked> Random<br />";
            } else {
                echo "> Random<br />";
            }
            echo "<input type=radio name=s_type value=\"Fixed Weight\"";
            if ($scaleRow[4] == 1) {
                echo " checked> Fixed<br />";
            } else {
                echo "> Fixed<br />";
            }
            echo "</td><td align=center>";
            echo "<input type=checkbox name=s_bycount";
            if ($scaleRow['bycount'] == 1) {
                echo " checked>";
            } else {
                echo ">";
            }
            echo "</td><td>";
            echo "<input type=text name=s_tare size=5 value={$scaleRow['tare']}>";
            echo "</td><td>";
            echo "<input type=text name=s_shelflife size=5 value={$scaleRow['shelflife']}>";
            echo "</td><td>";
            echo "<input type=text name=s_netwt size=5 value={$scaleRow['netWeight']}>";
            echo "</td><td>";
            echo "<select name=s_label size=2>";
            if ($scaleRow['label'] == 133 || $scaleRow['label'] == 63) {
                echo "<option value=horizontal selected>Horizontal</option>";
            } else {
                echo "<option value=horizontal>Horizontal</option>";
            }
            if ($scaleRow['label'] == 103 || $scaleRow['label'] == 53 || $scaleRow['label'] == 23) {
                echo "<option value=vertical selected>Vertical</option>";
            } else {
                echo "<option value=vertical>Vertical</option>";
            }
            echo "</select>";
            echo "</td><td align=center>";
            if ($scaleRow['graphics'] == 0) {
                echo "<input type=checkbox name=s_graphics />";
            } else {
                echo "<input type=checkbox name=s_graphics checked />";
            }
            echo "</td>";
            echo "</td></tr></table><br />";
            echo "<p />Expanded text:<br /><textarea name=s_text rows=4\n           cols=40>{$scaleRow['text']}</textarea>";
            echo "<p /></td></tr></table>";
        }
        echo "<br /></td></tr><tr><td>";
        echo "Like Code Linked Items</td><td>&nbsp;</td><td><input type=checkbox name=update value='no'></td><td colspan=4>Check to not update like code items</td></tr><tr><td>";
        if ($likeCodeNum > 0) {
            $selLikeQ = "SELECT p.upc,p.description,p.normal_price FROM products as p, upcLike as u WHERE u.upc = p.upc and u.likeCode = ?";
            likedtotable($selLikeQ, $likeCodeRow[0], 0, 'FFFFCC');
            echo "<td valign=top colspan=3><a href=/git/fannie/reports/PriceHistory/?likecode={$likeCodeRow['1']} target=lc_hist>Click for Like Code History</a></td>";
        }
        if ($logged_in || preg_match("/^002/", $rowItem['upc']) && $row3[1] == 3) {
            echo "</td></tr><tr><td colspan=4><input type='submit' name='submit' value='submit'> ";
            echo " <a href=../../item/DeleteItemPage.php?id={$upc}>Delete this item</a> | ";
        } else {
            echo "</td></tr><tr><td colspan=4>Please <a href=/auth/ui/loginform.php?redirect=/queries/productTest.php?upc={$upc}>";
            echo "login</a> to change prices";
        }
        echo " <a href=javascript:back()>Back</a></td></tr> ";
        echo "<tr><td colspan=5>";
        echo '<a href="" onclick="$(\'#topSecret\').toggle();return false;">Extra</a>';
        echo "<div id=\"topSecret\" style=\"display:none;\">";
        echo "<div style=\"float:left;width:500px;\">";
        echo "<b>Sane Brand &amp; Description</b>: ";
        printf("<input name=\"u_brand\" value=\"%s\" /> \n            <input name=\"u_desc\" value=\"%s\" /><br />", $rowItem["brand"], $rowItem["udesc"]);
        printf("<b>Size</b>: <input name=\"u_size\" value=\"%s\" />", $rowItem["sizing"]);
        printf('&nbsp;&nbsp;<input type="checkbox" name="u_enableOnline" %s />Sell online<br />', $rowItem['enableOnline'] == 1 ? 'checked' : '');
        printf("<b>Expires</b>: <input name=\"u_expires\" value=\"%s\" />", $rowItem["expires"]);
        printf('<p><b>Page Text</b><br /><textarea rows=15 cols=80 name=u_long_text>%s</textarea></p>', str_replace("<br />", "\n", $rowItem['long_text']));
        echo "</div>";
        if (!empty($rowItem["photo"])) {
            echo "<div style=\"float:left;\">";
            printf("<a href=\"/git/fannie/item/images/done/%s\"><img src=\"/git/fannie/item/images/done/%s\" /></a>", $rowItem["photo"], str_replace("png", "thumb.png", $rowItem["photo"]));
            echo "</div>";
        }
        echo "<div style=\"clear:left;\"></div>";
        echo "</div>";
        echo "</tr>";
        echo "<tr><td height=5>&nbsp;</td></tr><tr><td bgcolor=#ddffdd colspan=3>";
        allLanes($upc);
        echo "</td></tr>";
    }
    return $num;
}
示例#11
0
}
$FS = isset($_POST["FS"]) ? 1 : 0;
$NoDisc = isset($_POST["NoDisc"]) ? 0 : 1;
$inUse = isset($_POST["inUse"]) ? 1 : 0;
$QtyFrc = isset($_POST["QtyFrc"]) ? 1 : 0;
$local = isset($_POST["local"]) ? (int) $_POST["local"] : 0;
/* if the user isn't validated but is logged in, then
   they don't have permission to change prices on all
   items.  So get the sub department and check that.
*/
$deptSubQ = $sql->prepare("select superID from MasterSuperDepts where dept_ID = ?");
$deptSubR = $sql->execute($deptSubQ, array($dept));
$deptSubW = $sql->fetch_array($deptSubR);
$deptSub = $deptSubW[0];
if (!$validatedUser && !$auditedUser && $logged_in) {
    $validatedUser = validateUserQuiet('pricechange', $deptSub);
}
$uid = 1005;
if ($validatedUser) {
    $validatedUID = getUID($validatedUser);
    $uid = $validatedUID;
} elseif ($auditedUser) {
    $auditedUID = getUID($auditedUser);
    $uid = $auditedUID;
    include '../../item/audit.php';
    if (!empty($likeCode)) {
        audit($deptSub, $auditedUser, $upc, $descript, $price, $tax, $FS, $Scale, $NoDisc, $likeCode);
    } else {
        audit($deptSub, $auditedUser, $upc, $descript, $price, $tax, $FS, $Scale, $NoDisc);
    }
}
示例#12
0
    $note_text = $_POST['note_text'];
    $note_text = str_replace("\r", "", $note_text);
    $note_text = str_replace("\n", "<br />", $note_text);
    $note_text = str_replace("'", "\\'", $note_text);
    if ($noteID == -1) {
        $insQ = $sql->prepare("INSERT INTO notes (appID,note_date,note_text,username) VALUES\n            (?, ?, ?, ?)");
        $sql->execute($insQ, array($appID, $note_date, $note_text, $username));
    } else {
        $upQ = $sql->prepare("UPDATE notes SET note_text=? WHERE noteID=?");
        $sql->execute($upQ, array($note_text, $noteID));
    }
    header("Location: /it/ApplicationTracking/view.php?appID={$appID}");
    return;
}
$id = $_GET['id'];
$username = validateUserQuiet('apptracking', 0);
if (!$username) {
    header("Location: {$FANNIE_RUL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/it/ApplicationTracking/comment.php?id={$id}");
    return;
}
refreshSession();
$temp = explode(":", $id);
$noteID = $temp[0];
$appID = $temp[1];
$note_text = "";
$note_date = date("Y-m-d");
if ($noteID != -1) {
    $dataQ = $sql->prepare("SELECT note_text,note_date FROM notes WHERE noteID=?");
    $dataR = $sql->execute($dataQ, array($noteID));
    $dataW = $sql->fetch_row($dataR);
    $note_date = $dataW[1];
示例#13
0
<?php

include '../../../../config.php';
require $FANNIE_ROOT . 'auth/login.php';
include '../db.php';
$name = checkLogin();
$perm = validateUserQuiet('evals');
if ($name === false && $perm === false) {
    header("Location: {$FANNIE_URL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/it/hours/eval/list.php");
    return;
} else {
    if ($perm === false) {
        echo "Error";
        return;
    }
}
$db = hours_dbconnect();
$order = 'name';
if (isset($_REQUEST['o'])) {
    switch ($_REQUEST['o']) {
        case 'adpID':
            $order = 'adpID';
            break;
        case 'hireDate':
            $order = 'hireDate';
            break;
        case 'evalDate':
            $order = 'evalDate';
            break;
        default:
            $order = 'name';
示例#14
0
function activate($memNum)
{
    global $sql;
    $model = new CustomerAccountSuspensionsModel($sql);
    $model->card_no($memNum);
    $username = checkLogin();
    $uid = getUID($username);
    $auditQ = "insert custUpdate select now(),{$uid},1,* from custdata where cardno={$memNum}";
    //$auditR = $sql->query($auditQ);
    $query = $sql->prepare("select type,memtype1,memtype2,discount,chargelimit,mailflag from suspensions where cardno=?");
    $result = $sql->execute($query, array($memNum));
    $row = $sql->fetch_array($result);
    // type S shouldn't exist any more, in here to deal with historical rows
    $mQ = $sql->prepare("update meminfo set ads_OK=? where card_no=?");
    $cQ = $sql->prepare("update custdata set memType=?, Type=?,ChargeOk=1,Discount=?,MemDiscountLimit=?,ChargeLimit=?\n        where CardNo=?");
    if ($row[0] == 'I' || $row[0] == 'T' || $row[0] == 'S') {
        $mR = $sql->execute($mQ, array($row['mailflag'], $memNum));
        $cR = $sql->execute($cQ, array($row['memtype1'], $row['memtype2'], $row['discount'], $row['chargelimit'], $row['chargelimit'], $memNum));
    } else {
        if ($row[0] == 'X') {
            $mR = $sql->execute($mQ, array($row['mailflag'], $memNum));
            $cR = $sql->execute($cQ, array($row['memtype1'], $row['memtype2'], $row['discount'], $row['chargelimit'], $row['chargelimit'], $memNum));
        }
    }
    $query = $sql->prepare("delete from suspensions where cardno=?");
    $result = $sql->execute($query, array($memNum));
    $username = validateUserQuiet('editmembers');
    $now = date("Y-m-d h:i:s");
    $query = $sql->prepare("insert into suspension_history (username, postdate, post, cardno, reasoncode)\n            values (?,?,'Account reactivated',?,-1)");
    $result = $sql->execute($query, array($username, $now, $memNum));
    // add record to denote account was activated
    // this record is not considered "active" because
    // the account is not suspended
    $model->reasonCode(0);
    $model->suspensionTypeID(0);
    $model->username($username);
    $model->tdate($now);
    $model->active(0);
    $model->save();
    $model->reset();
    $model->card_no($memNum);
    $model->active(1);
    foreach ($model->find() as $obj) {
        $obj->active(0);
        $obj->save();
    }
}
示例#15
0
文件: index.php 项目: phpsmith/IS4C
<?php

include '../../../config.php';
require $FANNIE_ROOT . 'auth/login.php';
if (!validateUserQuiet('barcodes')) {
    ?>
   <html>
   <head><title>Please log in</title>
   <link href="../../styles.css" rel="stylesheet" type="text/css">
   </head>
   <body>
   <div id=logo><img src='../../members/images/newLogo_small.gif'></div>
   <div id=main> <?php 
    echo "Must be logged in to view barcode page...";
    echo "<a href={$FANNIE_URL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/queries/labels/index.php>Click here</a> to login<p />";
} else {
    ?>
<html>
<head>
<title>Barcode Label Page</title>
<link href="../../styles.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
function goToPage(the_url){
    var offset = document.getElementById('offset').value;
    var str = "0";
    if (!isNaN(parseInt(offset)))
        str = parseInt(offset);

    var final_url = the_url+"&offset="+str;
    window.top.location = final_url;
}
示例#16
0
<body>

<?php 
include '../../../config.php';
if (!class_exists("SQLManager")) {
    require_once $FANNIE_ROOT . "src/SQLManager.php";
}
include $FANNIE_ROOT . 'src/Credentials/projects.wfc.php';
require $FANNIE_ROOT . 'auth/login.php';
$q = array();
$q[0] = "select projDesc, ITName, reqestDate, projID, priority from projects where status = 1 order by priority";
$q[1] = "select projDesc, NULL, reqestDate, projID, priority from projects where status = 0 order by priority";
$q[2] = "select projDesc, ITName, reqestDate, projID, priority, completeDate from projects where status = 2\n         order by completeDate desc";
$n = array("In progress", "Pending", "Complete");
if (validateUserQuiet('projects')) {
    echo "<a href=newproject.php>New project</a><p />";
} else {
    echo "<a href={$FANNIE_URL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/it/projects/index.php>Login</a> to add projects<p />";
}
echo "<a href=report.php>Report</a><p />";
for ($i = 0; $i < 3; $i++) {
    echo "<h3>{$n[$i]}</h3>";
    echo "<table border=1 cellspacing=2 cellpadding=2><tr>";
    echo "<th>Project name</th><th>IT contact</th><th>Request date</th><th align=center>Priority</th>";
    if ($i == 2) {
        echo "<th>Complete date</th>";
    }
    echo "</tr>";
    $r = $sql->query($q[$i]);
    while ($row = $sql->fetch_array($r)) {
示例#17
0
        $codes = array();
        if (isset($_POST["reasoncodes"])) {
            $codes = $_POST["reasoncodes"];
        }
        $status = $_POST["status"];
        $reasonCode = 0;
        foreach ($codes as $c) {
            $reasonCode = $reasonCode | (int) $c;
        }
        alterReason($memNum, $reasonCode, $status);
        addressList($memNum);
        // FIRE ALL UPDATE
        include 'custUpdates.php';
        updateCustomerAllLanes($memNum);
    } else {
        if (validateUserQuiet('editmembers_csc') && isset($_GET['fixedaddress'])) {
            $curQ = "select reasoncode from suspensions where cardno={$memNum}";
            $curR = $sql->query($curQ);
            $curCode = (int) array_pop($sql->fetch_array($curR));
            $newCode = $curCode & ~16;
            alterReason($memNum, $newCode);
            addressList($memNum);
            // FIRE ALL UPDATE
            include 'custUpdates.php';
            updateCustomerAllLanes($memNum);
        }
    }
}
?>

<table>
示例#18
0
    if (!isset($currentW[$column])) {
        continue;
    }
    if ($currentW[$column] != trim($new_value, "'")) {
        $CHANGES[$column] = array('old' => $currentW[$column], 'new' => trim($new_value, "'"));
    }
}
$sR = $dbc->query("SELECT superID FROM MasterSuperDepts WHERE dept_ID=" . $up_array['department']);
$sID = 0;
if ($dbc->num_rows($sR) > 0) {
    $sID = array_pop($dbc->fetch_row($sR));
}
/* 1. Validate credentials of the operator.  */
$uid = 0;
if (!$validatedUser && !$auditedUser && $logged_in) {
    $validatedUser = validateUserQuiet('pricechange', $subdepartment);
}
if ($validatedUser) {
    $validatedUID = getUID($validatedUser);
    $uid = $validatedUID;
} elseif ($auditedUser) {
    /* 2el. Notify dept manager of the new values.  */
    if (!empty($likeCode)) {
        \COREPOS\Fannie\API\lib\AuditLib::itemUpdate($upc, $likeCode);
    } else {
        \COREPOS\Fannie\API\lib\AuditLib::itemUpdate($upc);
    }
}
/* 2. Insert or update per-coop products data  */
/* For WEFC_Toronto only
 * Store the raw versions of products.description and productUser.description in products_WEFC_Toronto.
示例#19
0
}
if (!isset($empID) || empty($empID)) {
    $empID = getUID($name);
}
if (!validateUserQuiet('view_all_hours')) {
    /* see if logged in user has access to any
          department. if so, see if the selected employee
          is in that department
       */
    $validated = false;
    $sql = hours_dbconnect();
    $depts = array(10, 11, 12, 13, 20, 21, 30, 40, 41, 50, 60, 998);
    $checkQ = $sql->prepare_statement("select department from employees where empID=?");
    $checkR = $sql->exec_statement($checkQ, array($empID));
    $checkW = $sql->fetch_row($checkR);
    if (validateUserQuiet('view_all_hours', $checkW['department'])) {
        $validated = true;
    }
    /* no access permissions found, so only allow the
          logged in user to see themself
       */
    if (!$validated) {
        $empID = getUID($name);
    }
}
echo "<html><head><title>View</title>";
echo "<style type=text/css>\n#payperiods {\n    margin-top: 50px;\n}\n\n#payperiods td {\n    text-align: right;\n}\n\n#payperiods th {\n    text-align: center;\n}\n\n#payperiods td.left {\n    text-align: left;\n}\n\n#payperiods th.left {\n    text-align: left;\n}\n\n#payperiods th.right {\n    text-align: right;\n}\n\ntr.one td {\n    background: #ffffcc;\n}\ntr.one th {\n    background: #ffffcc;\n    text-align: right;\n}\n\ntr.two td {\n    background: #ffffff;\n}\ntr.two th {\n    background: #ffffff;\n    text-align: right;\n}\na {\n    color: blue;\n}\n\n#temptable th {\n    text-align: left;\n}\n#temptable td {\n    text-align: right;\n    padding-left: 2em;\n}\n\n#temptable {\n    font-size: 125%;\n}\n\n#newtable th{\n    text-align: left;\n}\n#newtable td{\n    text-align: right;\n}\n\n</style>";
echo "</head><body>";
echo "<h3>Salary Employee PTO Status</h3>";
$sql = hours_dbconnect();
$infoQ = $sql->prepare_statement("select e.name,e.adpID,\n    s.totalTaken as daysTaken\n    from employees as e left join\n    salarypto_ytd as s on e.empID=s.empID\n    where e.empID=?");
示例#20
0
    * make a list of these chunks
    * process one of these files
    * redirect back to this page (resetting the memory limit)
      and process the next file
*/
/* configuration for your module - Important */
include dirname(__FILE__) . '/../../config.php';
if (!class_exists('FannieAPI')) {
    include_once $FANNIE_ROOT . 'classlib2.0/FannieAPI.php';
}
if (basename(__FILE__) != basename($_SERVER['PHP_SELF'])) {
    return;
}
$dbc = FannieDB::get($FANNIE_OP_DB);
require $FANNIE_ROOT . 'auth/login.php';
if (!validateUserQuiet('admin')) {
    $redirect = $_SERVER['REQUEST_URI'];
    $url = $FANNIE_URL . 'auth/ui/loginform.php';
    header('Location: ' . $url . '?redirect=' . $redirect);
}
$tpath = sys_get_temp_dir() . "/misc/";
// Are we dev-side?
$isposdev = preg_match("/0A-38/", php_uname('n')) ? True : False;
/* Return the number of decimal places to use in a price format spec: %.#f .
 * Minimum is 2.
 * > 2 only if the price is in a quantity-enforced situation.
 * 
 * I renamed this sigdecimals2 to prevent a name conflict with another
 * sigdecimals function in prodFunction_WEFC_Toronto
 * Andy - 26Aug14
*/
示例#21
0
<?php

include '../../../config.php';
require $FANNIE_ROOT . 'auth/login.php';
$all = validateUserQuiet('view_all_hours');
$name = checkLogin();
if ($all) {
    header("Location: menu.php");
} elseif ($name) {
    header("Location: viewEmployee.php?id=" . getUID($name));
} else {
    header("Location: {$FANNIE_URL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/it/hours/");
}
示例#22
0
文件: memGen.php 项目: phpsmith/IS4C
        echo '</select>';
        echo "</td><td><input type='submit' name='submit2' value='submit'></td>";
        echo "</tr></table>";
        echo "</form>";
    }
}
$memNext = $memID + 1;
$memPrec = $memID - 1;
?>
<table>
<tr>
<?php 
if (!validateUserQuiet('editmembers') && !validateUserQuiet('editmembers_csc')) {
    echo "<td><a href=\"{$FANNIE_URL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/members/memGen.php?memNum={$memID}\">Login to edit</a> | </td>";
} else {
    if (validateUserQuiet('editmembers')) {
        echo "<td><a href=testEdit.php?memnum={$memID}>[ Logged in ] Edit Info</a> | <a href=\"{$FANNIE_URL}auth/ui\">Logout</a></td>";
    } else {
        echo "<td><a href=limitedEdit.php?memnum={$memID}>[ Logged in ] Edit Info</a> | <a href=\"{$FANNIE_URL}auth/ui\">Logout</a></td>";
    }
}
?>
<td>
&nbsp;
</td>
<td>
<a href="memGen.php?memNum=<?php 
echo $memPrec;
?>
 ">
Prev Mem</a>
示例#23
0
    require_once $FANNIE_ROOT . "src/SQLManager.php";
}
include $FANNIE_ROOT . 'src/Credentials/projects.wfc.php';
$q = $sql->prepare("select projDesc, ITName, reqestDate, status, notes, link, priority from projects where projID = ?");
$r = $sql->execute($q, array($projID));
$row = $sql->fetch_array($r);
$emailQ = $sql->prepare("select email from project_parties where projID=? order by email");
$emailR = $sql->execute($emailQ, array($projID));
$emaillist = "";
while ($emailW = $sql->fetch_array($emailR)) {
    $emaillist .= $emailW[0] . ", ";
}
$emaillist = substr($emaillist, 0, strlen($emaillist) - 2);
require $FANNIE_ROOT . 'auth/login.php';
$admin_user = validateUserQuiet('admin');
$proj_user = validateUserQuiet('projects');
switch ($row['status']) {
    case 0:
        echo "<h3>STATUS: PENDING</h3>";
        echo "Project name: {$row['projDesc']}<br />";
        echo "Link: <a href={$row['link']}>{$row['link']}</a><br />";
        echo "Request date: {$row['reqestDate']}<br />";
        echo "Email receivers: {$emaillist}<br />";
        echo "Notes:<br />{$row['notes']}<p />";
        if ($admin_user) {
            echo "<form action=assign.php method=post>";
            echo "<input type=hidden name=projID value={$projID}>";
            echo "<select name=assign>";
            $q2 = "select * from employees";
            $r2 = $sql->query($q2);
            while ($row2 = $sql->fetch_array($r2)) {
示例#24
0
            $date = $_GET["date"];
            $out .= mainDisplay($date, False);
            break;
        case 'save':
            $date = $_GET["date"];
            $type = $_GET["type"];
            $data = $_GET["data"];
            save($date, $type, $data);
            if ($type == "X") {
                $out .= "Save successful";
            }
    }
    echo $out;
    return;
}
if (!validateUserQuiet('mas90_journal')) {
    header("Location: {$FANNIE_URL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/it/mas90/journal.php");
    return;
}
function mainDisplay($date, $checkForSave = True)
{
    global $sql;
    $ret = "";
    $FROM_SAVED = False;
    if ($checkForSave) {
        $checkQ = $sql->prepare("select * from dailyJournal where datediff(dd,tdate,?) = 0");
        $checkR = $sql->execute($checkQ, array($date));
        if ($sql->num_rows($checkR) > 0) {
            $FROM_SAVED = True;
        }
    }
示例#25
0
<?php

include '../../../config.php';
require $FANNIE_ROOT . 'auth/login.php';
$admin = validateUserQuiet('apptracking');
if (!$admin) {
    if (!validateUserQuiet('apptracking', 0)) {
        header("Location: {$FANNIE_URL}auth/ui/loginform.php?redirect={$FANNIE_URL}legacy/it/ApplicationTracking/list.php");
        return;
    }
}
refreshSession();
require 'db.php';
$sql = db_connect();
?>

<html>
<head>
    <title>List of applicants</title>
<style type=text/css>
a {
    color: blue;
}
</style>
</head>
<body>

<?php 
$positionQ = "select positionID,name from positions order by case when name='Any' then '' else name end";
$positionR = $sql->query($positionQ);
$positions = array();