Exemple #1
0
    $status[] = $row['status'];
    $data[] = $items;
}
echo "<table>";
//<a href='view_for_approve.php?type=With Po'>
//<a href='view_for_approve.php?type=Without Po'>
echo "<tr>\n<td colspan=10  >\n<div>\n    <table  class='filter' align=left>\n          <tr>\n               <td role='presentation'> \n                    <input  type='button' {$active_po} onclick='po_go(this.value)' value='With PO'>\n               </td>\n               <td role='presentation'>\n                    <input   type='button' {$active_wpo} onclick='po_go(this.value)' value='Without PO'>\n               </td>\n          </tr>\n     </table>\n    \n</div>\n</td></tr>\n";
$status_array = array('pending', 'For Approval', 'Rejected');
echo selectMakerValue('Status', 'status', $status_array, '', $status_array, $status_type);
echo "<tr><th style='border:none;text-align:left'>Date Sent</th>\n        <th colspan=10 style='text-align:left; border:none'>\n     <table align=left><tr> <td style='border:none'>\n     <input title='parseMe' style='width:120px' id='date_from' name='date_from' value='{$date_from}'>\n     <span id='date_from_cal' class='calendar-icon'></span>\n     \n     </td><td style='padding:1px;border:none'>-</td><td style='border:none'>\n     <input title='parseMe' style='width:120px' id='date_to' name='date_to' value='{$date_to}'>\n     <span id='date_to_cal' class='calendar-icon'></span>\n     \n     </td></table></td></tr>";
$select = "select concat(first_name,' ',last_name) as name,account_id from master_address_file where mas_status=1 and account_type='Account Executive' order by name";
$result1 = $conn->query($select);
while ($row1 = $result1->fetch_assoc()) {
    $requestor[$row1['account_id']] = $row1['name'];
}
echo selectMakerEach('Requestor', 'requestor_id', $requestor, '', $requestor_id);
echo "<tr ><td colspan=2 style='padding:10px;text-align:center'><input type='submit' value='Search'></td></tr>";
echo "<TR><TD colspan=10><h2 style='text-align:left' >RM {$type}</h2></td></tr>   ";
?>

<table class='table_data'>
    <?php 
echo "<tr>";
for ($a = 0; $a < count($column); $a++) {
    echo "<th>" . $column[$a] . "</th>";
}
echo "<th colspan=2>Action</th>";
echo "</tr>";
for ($a = 0; $a < count($data); $a++) {
    echo "<tr>";
    for ($k = 0; $k < count($data[$a]) - 1; $k++) {
Exemple #2
0
while ($row1 = $result1->fetch_assoc()) {
    $engineer[$row1['account_id']] = $row1['name'];
}
echo selectMakerEach('Secretary', 'secretary_id', $secretary, '', $secretary_id);
$select = "select company_name from po_file where mas_status=1 and company_name!='' group by company_name order by company_name";
$result1 = $conn->query($select);
while ($row1 = $result1->fetch_assoc()) {
    $company[$row1['company_name']] = $row1['company_name'];
}
echo selectMakerEach('Company Name', 'company_name', $company, '', $company_name);
$select = "select supplier from po_file where mas_status=1 and supplier!='' group by supplier order by supplier";
$result1 = $conn->query($select);
while ($row1 = $result1->fetch_assoc()) {
    $supplier[$row1['supplier']] = $row1['supplier'];
}
echo selectMakerEach('Supplier', 'supplier', $supplier, '', $supplier_id);
echo "<tr ><td colspan=2 style='padding:10px;text-align:center'><input type='submit' value='Search'></td></tr>";
?>
    <tr><td><?php 
echo "<h2 style='text-align:left;padding:0px' >RM {$type}</h2>";
?>
</td></tr>
</table>
    <br>
</div>
<?php 
$limit = 10;
$start = 0;
$page = 1;
if (!empty($_POST['page'])) {
    $page = $_POST['page'];
Exemple #3
0
                    $table .= "<td style='text-align:center'>" . $row[$select_list[$a]] . "</td>";
                }
            }
        }
    }
    $table .= "<td>";
    if (!empty($access['Hide'])) {
        if ($row['hide'] != 0) {
            $table .= "<td><img  src='assets/check.png' name='image' width='20' height='20' onclick='check_list(" . $row[$this_id] . ")'></td>";
        } else {
            $table .= "<td><img  src='assets/cross.jpg' name='image' width='21' height='20' onclick='deactivate(" . $row[$this_id] . ")'></td>";
        }
    }
    $table .= "</tr>";
}
echo selectMakerEach('Received', 'phone_number', $received_name, '', $phone_number);
echo "<tr><th colspan=10 style='text-align:left; border:none'>\n     <table align=left><tr><th style='border:none;text-align:left'>Date Sent</th><td style='border:none'>\n     <input title='parseMe' style='width:120px' id='date_from' name='date_from' value='{$date_from}'>\n     <span id='date_from_cal' class='calendar-icon'></span>\n     \n     </td><td style='padding:1px;border:none'>-</td><td style='border:none'>\n     <input title='parseMe' style='width:120px' id='date_to' name='date_to' value='{$date_to}'>\n     <span id='date_to_cal' class='calendar-icon'></span>\n     \n     </td></table></td></tr>";
echo "<tr><td colspan=2 style='text-align:center   '><input type='submit' value='Submit'></td><td colspan=10></td></tr>";
echo $table;
?>
    <tr>
     <td colspan=20 style='text-align:center'>
            <table align=center > 
                <?php 
if ($page != 1) {
    echo "<td><input type='button' value='First' onclick='getPage(1)'></td>";
}
if ($page > 1) {
    echo "<td><input type='button' value='Prev' onclick='getPage(" . ($page - 1) . ")'></td>";
}
if ($page + 1 <= $pages) {
        $select = "delete from po_header_file where user_name='" . $_SESSION['uname'] . "' limit 1";
        $result = $conn->query($select);
        $insert = "insert into po_header_file (number_code,date,user_name)\n        values({$number_code},now(),'" . $_SESSION['uname'] . "')\n        ";
        $conn->query($insert);
        //echo $insert;
    }
    //echo "<br>".$number_code;
    echo "<input type='hidden' name='number_code' value='{$number_code}'>";
}
$letter_code = get_letter_code($number_code);
echo "<tr><th style='text-align:left'>Letter Code:</th><th style='text-align:left'>\n" . $letter_code . "</th><td></td></tr>";
echo selectMakerEach('Requestor', 'requestor', $requestor, 'getRequestor(this.value)', $requestor1);
echo textMaker('Title/Remarks', 'title', $title);
echo textMaker('Company Name', 'company_name', $company_name);
echo selectMakerEach('Secretary', 'secretary', $secretary, '', $secretary1);
echo selectMakerEach('Engineer', 'engineer', $engineer, '', $engineer1);
echo textMaker('jo', 'jo', $jo);
if ($type == 'With Po') {
    echo textMaker('PO#', 'po', $po);
}
echo textMaker('Item Description', 'item_description', $item_description);
echo textMaker('Page#', 'page', $page);
echo textMaker('Supplier', 'supplier', $supplier);
echo selectMaker('Payment Type', 'payment_type', array('Cash', 'Check'), '', $payment_type);
?>
    <tr>
        <th style='text-align:left;padding-top:10px'><h2>Items</h3></th>
    </tr>
    <tr>
        <td><input type='button' value='add items' style='color:blue;background-color:transparent;border:none' onclick='addMore()' ></td>
        <tr>