コード例 #1
0
    $_POST['FromDate'] = Date($_SESSION['DefaultDateFormat'], mktime(0, 0, 0, Date('m') - $_SESSION['MonthsAuditTrail']));
}
if (!isset($_POST['ToDate'])) {
    $_POST['ToDate'] = Date($_SESSION['DefaultDateFormat']);
}
if ((!Is_Date($_POST['FromDate']) or !Is_Date($_POST['ToDate'])) and isset($_POST['View'])) {
    prnMsg(_('Incorrect date format used, please re-enter'), error);
    unset($_POST['View']);
}
if (isset($_POST['ContainingText'])) {
    $ContainingText = trim(mb_strtoupper($_POST['ContainingText']));
} elseif (isset($_GET['ContainingText'])) {
    $ContainingText = trim(mb_strtoupper($_GET['ContainingText']));
}
// Get list of tables
$TableResult = DB_show_tables($db);
// Get list of users
$UserResult = DB_query("SELECT userid FROM www_users", $db);
echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">';
echo '<div>';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
echo '<table class="selection">';
echo '<tr><td>' . _('From Date') . ' ' . $_SESSION['DefaultDateFormat'] . '</td>
	<td><input tabindex="1" type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size="11" maxlength="10" value="' . $_POST['FromDate'] . '" /></td></tr>';
echo '<tr><td>' . _('To Date') . ' ' . $_SESSION['DefaultDateFormat'] . '</td>
	<td><input tabindex="2" type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="11" maxlength="10" value="' . $_POST['ToDate'] . '" /></td></tr>';
// Show user selections
echo '<tr><td>' . _('User ID') . '</td>
		<td><select tabindex="3" name="SelectedUser">';
echo '<option value="ALL">' . _('All') . '</option>';
while ($users = DB_fetch_row($UserResult)) {
コード例 #2
0
ファイル: MRPReschedules.php プロジェクト: rrsc/KwaMoja
<?php

/* MRPReschedules.php - Report of purchase orders and work orders that MRP determines should be
 * rescheduled.
 */
include 'includes/session.inc';
$result = DB_show_tables($db, 'mrprequirements');
if (DB_num_rows($result) == 0) {
    $Title = 'MRP error';
    include 'includes/header.inc';
    echo '<br />';
    prnMsg(_('The MRP calculation must be run before you can run this report') . '<br />' . _('To run the MRP calculation click') . ' ' . '<a href="' . $RootPath . '/MRP.php">' . _('here') . '</a>', 'error');
    include 'includes/footer.inc';
    exit;
}
if (isset($_POST['PrintPDF'])) {
    include 'includes/PDFStarter.php';
    $pdf->addInfo('Title', _('MRP Reschedule Report'));
    $pdf->addInfo('Subject', _('MRP Reschedules'));
    $FontSize = 9;
    $PageNumber = 1;
    $line_height = 12;
    /*Find mrpsupplies records where the duedate is not the same as the mrpdate */
    $selecttype = " ";
    if ($_POST['Selection'] != 'All') {
        $selecttype = " AND ordertype = '" . $_POST['Selection'] . "'";
    }
    $sql = "SELECT mrpsupplies.*,\n\t\t\t\t   stockmaster.description,\n\t\t\t\t   stockmaster.decimalplaces\n\t\t\t  FROM mrpsupplies,stockmaster\n\t\t\t  WHERE mrpsupplies.part = stockmaster.stockid AND duedate <> mrpdate\n\t\t\t\t {$selecttype}\n\t\t\t  ORDER BY mrpsupplies.part";
    $result = DB_query($sql, $db, '', '', false, true);
    if (DB_error_no($db) != 0) {
        $Title = _('MRP Reschedules') . ' - ' . _('Problem Report');
コード例 #3
0
ファイル: AuditTrail.php プロジェクト: xuxudodo/weberp-cvs
$PageSecurity = 15;
include 'includes/session.inc';
$title = _('Audit Trail');
include 'includes/header.inc';
if (!isset($_POST['FromDate'])) {
    $_POST['FromDate'] = Date($_SESSION['DefaultDateFormat'], mktime(0, 0, 0, Date('m') - $_SESSION['MonthsAuditTrail']));
}
if (!isset($_POST['ToDate'])) {
    $_POST['ToDate'] = Date($_SESSION['DefaultDateFormat']);
}
if ((!Is_Date($_POST['FromDate']) or !Is_Date($_POST['ToDate'])) and isset($_POST['View'])) {
    prnMsg(_('Incorrerct date format used, please re-enter'), error);
    unset($_POST['View']);
}
// Get list of tables
$tableresult = DB_show_tables($db);
// Get list of users
$userresult = DB_query('SELECT userid FROM www_users', $db);
echo '<FORM ACTION=' . $_SERVER['PHP_SELF'] . '?' . SID . ' METHOD=POST>';
echo '<CENTER><TABLE>';
echo '<TR><TD>' . _('From Date') . ' ' . $_SESSION['DefaultDateFormat'] . '</TD>
	<TD><INPUT tabindex="1" TYPE=text name="FromDate" size="11" maxlength="10" value=' . $_POST['FromDate'] . '></TD></TR>';
echo '<TR><TD>' . _('To Date') . ' ' . $_SESSION['DefaultDateFormat'] . '</TD>
	<TD><INPUT tabindex="2" TYPE=text name="ToDate" size="11" maxlength="10" value=' . $_POST['ToDate'] . '></TD></TR>';
// Show user selections
echo '<TR><TD>' . _('User ID') . '</TD>
		<TD><SELECT tabindex="3" name="SelectedUser">';
echo '<OPTION value=ALL>ALL';
while ($users = DB_fetch_row($userresult)) {
    if (isset($_POST['SelectedUser']) and $users[0] == $_POST['SelectedUser']) {
        echo '<OPTION SELECTED value=' . $users[0] . '>' . $users[0];