Exemplo n.º 1
0
 function showUI()
 {
     $db = Database::getInstance();
     $cxn = $db->getConnection();
     $any = new Anylist();
     $any->createlist('Information_Catagory');
     if ($this->infoid != '') {
         $q = "SELECT * FROM Gen_Info WHERE Info_ID={$this->infoid}";
         if (!($res = $cxn->query($q))) {
             exit("error (saveGenInfo): {$cxn->error}");
         }
         $r = mysqli_fetch_assoc($res);
         $this->infodesc = $r['Info_Description'];
         $this->catagoryid = $r['Catagory_ID'];
     }
     echo '<fieldset><legend>General Information File Details</legend>';
     if ($this->infoid != '') {
         $sel = new selectlist('Catagory_ID', $any->anylist, 'Select Information Type', 'Catagory_ID', 'Catagory', 'class="required"', $this->catagoryid, '1');
     }
     echo '<p><label>Information Description</label><input id="infodesc" name="infodesc" class="required" size="50" value="' . $this->infodesc . '"></p>';
     if ($this->infoid != '') {
         $this->listGenInfoFiles();
     }
     echo '</fieldset>';
 }
Exemplo n.º 2
0
    function showNCUI()
    {
        $db = Database::getInstance();
        $cxn = $db->getConnection();
        $ncd = $ncddb = $stage = $quantity = $pd = $ef = $ca = $tm = $fd = $tddb = $fddb = $nctypeid = $ncno = $cont = '';
        if ($this->nonconformanceid != '') {
            $q = "SELECT *,DATE_FORMAT(NC_Date,'%d-%m-%Y') as nd,DATE_FORMAT(Finished_Date,'%d-%m-%Y') as fd FROM NonConformance \n\t\tWHERE NonConformance_ID={$this->nonconformanceid}";
            if (!($res = $cxn->query($q))) {
                exit("error : {$cxn->error}");
            }
            $row = mysqli_fetch_assoc($res);
            $stage = $row['Stage'];
            $quantity = $row['NC_Qty'];
            $ncddb = $row['NC_Date'];
            $ncd = $row['nd'];
            $pd = $row['Problem_Description'];
            $ef = $row['Effectiveness'];
            $ca = $row['Corr_Action'];
            $fd = $row['fd'];
            $fddb = $row['Finished_Date'];
            $nctypeid = $row['NC_Type_ID'];
            $ncno = $row['NC_NO'];
            $cont = $row['Containment'];
            $corr = $row['Correction'];
            $qwhy = "SELECT * FROM NC_Root_Cause WHERE NonConformance_ID={$this->nonconformanceid} ORDER BY NC_Root_Cause_ID ASC";
            if (!($resw = $cxn->query($qwhy))) {
                exit("error : {$cxn->error}");
            }
            $i = 0;
            while ($r = mysqli_fetch_assoc($resw)) {
                $why[$i] = $r['Why'];
                $reason[$i] = $r['Reason'];
                $ncrcid[$i] = $r['NC_Root_Cause_ID'];
                $i++;
            }
            $qop = "SELECT *,DATE_FORMAT(Target_Date,'%d-%m-%Y') as td FROM NC_Team_Members WHERE NonConformance_ID={$this->nonconformanceid}";
            if (!($resqop = $cxn->query($qop))) {
                exit("error : {$cxn->error}");
            }
            $tm = $resqop->num_rows;
        }
        $anynct = new Anylist();
        $anynct->createList('NC_Type');
        echo <<<_END
<fieldset><legend>Non Conformance Details</legend>
<p><label>NC Date</label><input id="ncd" name="ncd" class="required" value="{$ncd}"><input type="hidden" id="ncddb" name="ncddb" value="{$ncddb}"></p>
<p><label>NC Number</label><input id="ncnumber" name="ncnumber" class="required" value="{$ncno}"></p>
<p><label>NC Stage</label><input id="stage" name="stage" class="required" value="{$stage}"></p>
<p><label>NC Qty</label><input id="quantity" name="quantity" class="required number" value="{$quantity}"></p>
_END;
        $sel = new selectlist('NC_Type_ID', $anynct->anylist, 'Select NC Type', 'NC_Type_ID', 'NC_Type', 'class="required"', $nctypeid, '1');
        echo <<<_END
<p><label>Problem Description</label><textarea id="problemdescription" name="problemdescription" class="required" rows="5" cols="40">{$pd}</textarea></p>
<p><label>Containment Action</label><textarea id="containment" name="containment" class="required" rows="5" cols="40">{$cont}</textarea></p>
<p><label>Correction</label><textarea id="correction" name="correction" class="required" rows="5" cols="40">{$corr}</textarea></p>
<p><label>Root Cause Analysis</label><input type="button" id="rcbutton" value="Add Row"></p>
<table id="rootcause" width="100%" class="u"><tr><th align="center">Why</th><th align="center">Reason</th></tr>
_END;
        if (isset($why)) {
            $i = 0;
            $j = count($why);
            while ($i < $j) {
                echo '<tr><td><input type="hidden" id="ncrcid[' . $i . ']" name="ncrcid[' . $i . ']" value="' . $ncrcid[$i] . '"><textarea rows="3" cols="35" id="why[' . $i . ']" name="why[' . $i . ']" class="required">' . $why[$i] . '</textarea></td>
			<td><textarea  rows="3" cols="35" id="reason[' . $i . ']" name="reason[' . $i . ']" class="required">' . $reason[$i] . '</textarea></td></tr>';
                $i++;
            }
        } else {
            echo <<<_END
<tr><td><textarea id="why[0]" name="why[0]"  rows="3" cols="35" class="required"></textarea></td><td><textarea id="reason[0]"  rows="3" cols="35" name="reason[0]" class="required"></textarea></td></tr>
<tr><td><textarea id="why[1]" name="why[1]"  rows="3" cols="35" class="required"></textarea></td><td><textarea id="reason[1]"  rows="3" cols="35" name="reason[1]" class="required"></textarea></td></tr>
<tr><td><textarea id="why[2]" name="why[2]"  rows="3" cols="35" class="required"></textarea></td><td><textarea id="reason[2]"  rows="3" cols="35" name="reason[2]" class="required"></textarea></td></tr>
_END;
        }
        echo <<<_END
</table>

<p><label>Corrective Action</label><textarea id="correctiveaction" name="correctiveaction" class="required" rows="5" cols="40">{$ca}</textarea></p>
<p><label>Preventive Action Team Members</label><input type="button" id="addmember" value="Add Team Member"></p>
<table id="tm" width="100%" class="u"><tr><th align="center">Name</th><th align="center">Department</th><th align="center">Work Desc.</th><th align="center">Target Date</th><th align="center">Remarks</th></tr>
_END;
        $ope = new Operator();
        $ope->createOperatorList();
        $any = new Anylist();
        $any->createList('Department');
        if ($tm > 0) {
            $i = 0;
            while ($rop = mysqli_fetch_assoc($resqop)) {
                echo '<tr><td><input type="hidden" id="nctmid[' . $i . ']" name="nctmid[' . $i . ']" value="' . $rop['NC_Team_Member_ID'] . '">';
                $sel = new selectlist("teammember[" . $i . "]", $ope->getOperatorList(), 'Select Member Name', 'Operator_ID', 'Operator_Name', 'class="required"', $rop['Team_Member_ID'], '');
                echo '</td><td>';
                $sel = new selectlist("department[" . $i . "]", $any->anylist, 'Select Department', 'Department', 'Department', 'class="required"', $rop['Department'], '');
                //	<input id="department['.$i.']" name="department['.$i.']" class="required" value="'.$rop['Department'].'">
                echo '</td><td><input id="work[' . $i . ']" name="work[' . $i . ']" class="required" value="' . $rop['Work'] . '" size="75"></td>';
                echo '<td><input id="tdate[' . $i . ']" name="tdate[' . $i . ']" class="required" value="' . $rop['td'] . '"></td><td><input id="memberremarks[' . $i . ']" name="memberremarks[' . $i . ']" value="' . $rop['Remarks'] . '"></td>';
                echo '<input type="hidden" id="tdatedb[' . $i . ']" name="tdatedb[' . $i . ']" value="' . $rop['Target_Date'] . '"></tr>';
                $i++;
            }
        } else {
            echo '<tr><td>';
            $sel = new selectlist("teammember[0]", $ope->getOperatorList(), 'Select Member Name', 'Operator_ID', 'Operator_Name', 'class="required"', '', '');
            echo '</td><td>';
            $sel = new selectlist("department[0]", $any->anylist, 'Select Department', 'Department', 'Department', 'class="required"', '', '');
            //	<input id="department[0]" name="department[0]" class="required">
            echo '</td><td><input id="work[0]" name="work[0]" class="required" size="75"></td>';
            echo '<td><input id="tdate[0]" name="tdate[0]" class="required"></td><td><input id="memberremarks[0]" name="memberremarks[0]"></td>';
            echo '<input type="hidden" id="tdatedb[0]" name="tdatedb[0]"></tr>';
        }
        echo <<<_END
</table>
<p><label>Effectiveness of CA/PA</label><textarea id="effectiveness" name="effectiveness" class="required" rows="5" cols="40">{$ef}</textarea></p>

_END;
        if ($this->nonconformanceid != '') {
            echo <<<_END
<p><label>Finish Date</label><input id="fdate" name="fdate" value="{$fd}"><input type="hidden" id="fdatedb" name="fdatedb" value="{$fddb}"></p>
<p><label>Closing Remarks</label><input name="appremarks" size="75" id="appremarks"><input type="button" Value="Approe and Close NC Log" id="abutton"></p>
_END;
            self::showLogimages();
        }
    }
Exemplo n.º 3
0
                print "{$message}";
            } else {
                $message = $upload->show_errors();
                print "{$message}";
            }
        }
    }
} else {
    if (isset($_GET['ui'])) {
        $nc->showNCUI();
    }
    if (isset($_GET['newtmrow'])) {
        $id = $_GET['id'];
        $ope = new Operator();
        $ope->createOperatorList();
        $any = new Anylist();
        $any->createList('Department');
        echo '<tr><td>';
        $sel = new selectlist("teammember[" . $id . "]", $ope->getOperatorList(), 'Select Member Name', 'Operator_ID', 'Operator_Name', 'class="required"', '', '');
        echo '</td><td>';
        $sel = new selectlist("department[" . $id . "]", $any->anylist, 'Select Department', 'Department', 'Department', 'class="required"', '', '');
        echo '</td><td><input id="work[' . $id . ']" name="work[' . $id . ']" class="required"></td>';
        echo '<td><input id="tdate[' . $id . ']" name="tdate[' . $id . ']" class="required"></td><td><input id="memberremarks[' . $id . ']" name="memberremarks[' . $id . ']"></td>';
        echo '<input type="hidden" id="tdatedb[' . $id . ']" name="tdatedb[' . $id . ']"></tr>';
    }
    if (isset($_GET['nclid'])) {
        $nc->setValue('nonconformanceid', $_GET['nclid']);
        $nc->showNCUI();
    }
    if (isset($_GET['sgid'])) {
        $au = new Approval();
Exemplo n.º 4
0
 function showQuestionUI()
 {
     $db = Database::getInstance();
     $cxn = $db->getConnection();
     $any = new Anylist();
     $any->createList('Training_Catagory');
     if ($this->questionid != '') {
         $q = "SELECT * FROM Question WHERE Question_ID={$this->questionid}";
         if (!($res = $cxn->query($q))) {
             exit("error (showQuestionUI): {$cxn->error}");
         }
         $r = mysqli_fetch_assoc($res);
         $this->catagoryid = $r['Catagory_ID'];
         $this->question = $r['Question'];
     }
     echo '<fieldset><legend>Question Details</legend>';
     if ($this->question != '') {
         $sel = new selectlist('ECatagory_ID', $any->anylist, 'Select Catagory', 'Catagory_ID', 'Catagory', 'class="required"', $this->catagoryid, '1');
     }
     echo '<p><label>Question</label><textarea id="question" name="question" cols="45" rows="5" class="required" maxlength="250">' . $this->question . '</textarea></p>';
     if ($this->question != '') {
         $this->listQuestionImage();
     }
     echo '</fieldset>';
 }
Exemplo n.º 5
0
    function showRoutecardUI()
    {
        $db = Database::getInstance();
        $cxn = $db->getConnection();
        $operator = new Operator();
        $operator->createOperatorList();
        if ($this->operationid != '' && $this->batchid != '') {
            if ($this->operationid == '0') {
                $any = new Anylist();
                $any->createList('Batch_Commit', 'Batch_ID', $this->batchid);
                echo '<table class="tl">
		<tr><th>Commitment Date</th><td>';
                $sel = new selectlist("Commit_ID", $any->anylist, 'Select Commitment Date', 'Commit_ID', 'Commited_Date', 'class="required"', $this->commitid, '');
                echo '</td></tr></table>';
                echo '<div id="np"></div>';
                $this->displayDispatchRow();
                exit;
            }
            if ($this->operationid == '99999') {
                $qd = "SELECT Remarks FROM Routecard WHERE Batch_ID={$this->batchid} AND Operation_ID=99999";
                if (!($rd = $cxn->query($qd))) {
                    exit("error : {$cxn->error}");
                }
                $n = $rd->num_rows;
                if ($n > 0) {
                    $opn = mysqli_fetch_assoc($rd);
                    $this->remarks = $opn['Remarks'];
                }
                echo '<p><label>Batch Notes</label><textarea id="remarks" name="remarks" cols="40" rows="5" class="required">' . $this->remarks . '</textarea></p>';
                exit;
            }
            $this->setOPNotation();
            if (in_array($this->opnotation, $this->nonmachining)) {
                //
                $any = new Anylist();
                $any->createList('Batch_Commit', 'Batch_ID', $this->batchid);
                echo '<table class="tl">
		<tr><th>Commitment Date</th><td>';
                $sel = new selectlist("Commit_ID", $any->anylist, 'Select Commitment Date', 'Commit_ID', 'Commited_Date', 'class="required"', $this->commitid, '');
                echo '</td></tr></table>';
                echo '<div id="np"></div>';
                $this->nonProdRow();
            } else {
                $this->setOperationDetails();
                if ($this->batchqty != $this->quantity) {
                    $c = 'class="r"';
                } else {
                    $c = 'class="g"';
                }
                echo '<table class="tl">
		<tr><th>Machine</th><td>' . $this->machinename;
                echo '</td></tr>
		<tr><th>Operation Initiated By</th><td>' . $this->operatorname;
                echo '</td></tr>
		<tr><th>Operation Start Date</th><td>' . $this->startdate . '</td></tr>
		<tr><th>Operation End Date</th><td>' . $this->enddate . ' ' . $this->eopratorname . ' : ' . $this->eremarks . '</td></tr>
		<tr><th>Quantity Produced</th><td><input id="quantity" name="quantity" value="' . $this->quantity . '" ' . $c . ' ></td></tr>
		<tr><th>Accepted Quantity</th><td><input id="acceptedqty" name="acceptedqty" value="' . $this->acceptedqty . '" class="required"></td></tr>
		<tr><th>Rejected Quantity</th><td><input id="rejectedqty" name="rejectedqty" value="' . $this->rejectedqty . '">Rejection Remarks<input id="rejrem" name="rejrem" size="50" value="' . $this->rejrem . '"></td></tr>
		<tr><th>Non Conforming Quantity</th><td><input id="ncqty" name="ncqty" value="' . $this->ncqty . '">NonConf. Remarks<input id="ncrem" name="ncrem" size="50" value="' . $this->ncrem . '"></td></tr>
		<tr><th>Inspected By</th><td>';
                echo $this->inspectedbyname ?: 'Not Inspected!!</td></tr>';
                if ($this->jobno != '') {
                    echo ', Job No: ' . $this->jobno;
                }
                echo '<tr><th>Inspection Date</th><td>';
                echo $this->inspdate ?: 'Not Inspected!!</td></tr>';
                echo '<tr><th>Re Qualified By</th><td>';
                echo $this->approvername ?: 'Not Requalified !!</td></tr>';
                echo '<tr><th>Re Qualification Date</th><td>';
                echo $this->approvaldate ?: 'Not Inspected !!</td></tr>';
                if ($this->appremark != '') {
                    echo ', Remarks: ' . $this->appremark;
                }
                if ($this->routecardid != '') {
                    echo '<tr><td><input type="hidden" name="routecardid" id="routecardid" value="' . $this->routecardid . '"></td></tr>';
                }
            }
            echo '<tr><th>Remarks</th><td><textarea id="remarks" name="remarks" cols="40" rows="5">' . $this->remarks . '</textarea></td></tr>';
            if ($this->routecardid != '') {
                echo '<tr><td>';
                $this->listImages();
                echo '</td></tr>';
            }
            echo '</table>';
        } else {
            exit("Operation ID or Batch ID Not Set!");
        }
    }
Exemplo n.º 6
0
    function addDimensionRow($data = array())
    {
        $tf = "0";
        $pd1 = "";
        $pd0 = "Checked";
        $cd1 = "";
        $cd0 = "Checked";
        $sd1 = '';
        $sd0 = 'Checked';
        if (isset($data['id'])) {
            $i = $data['id'];
        } else {
            $i = 0;
        }
        if (isset($data['zone'])) {
            $zone = $data['zone'];
        } else {
            $zone = '';
        }
        if (isset($data['critical'])) {
            $critical = $data['critical'];
        } else {
            $critical = '';
        }
        if (isset($data['bno'])) {
            $bno = $data['bno'];
        } else {
            $bno = '';
        }
        if (isset($data['ddid'])) {
            $ddid = $data['ddid'];
        } else {
            $ddid = '';
        }
        if (isset($data['instid'])) {
            $instid = $data['instid'];
        } else {
            $instid = '';
        }
        if (isset($data['bdimn'])) {
            $bdimn = $data['bdimn'];
        } else {
            $bdimn = '';
        }
        if (isset($data['tl'])) {
            $tl = $data['tl'];
        } else {
            $tl = '';
        }
        if (isset($data['tu'])) {
            $tu = $data['tu'];
        } else {
            $tu = '';
        }
        if (isset($data['stgdimn'])) {
            if ($data['stgdimn'] == 1) {
                $sd1 = "Checked";
                $sd0 = '';
            }
        }
        if (isset($data['cdimn'])) {
            if ($data['cdimn'] == 1) {
                $cd1 = "Checked";
                $cd0 = '';
            }
        }
        if (isset($data['prod'])) {
            if ($data['prod'] == 1) {
                $pd1 = "Checked";
                $pd0 = '';
            }
        }
        if (isset($data['did'])) {
            $did = '<input type="hidden" id="dimensionid[' . $i . ']" name="dimensionid[' . $i . ']" value="' . $data['did'] . '">';
            $del = '<input type="checkbox" name="deldimn[' . $i . ']" id="deldimn[' . $i . ']" value="1" />';
        } else {
            $did = '';
            $del = '';
        }
        $a = new Anylist();
        $a->createList('Dimn_Criticality');
        if ($i == null) {
            $i = 0;
        }
        $dd = new DimnDescription();
        $dd->createDimnDescList();
        $in = new InstrumentType();
        $in->createInstrumentTypeList();
        echo <<<_END
\t\t<tr><td><input name="baloonno[{$i}]" id="baloonno[{$i}]" class="required" unique="baloonno" size="5" value="{$bno}">{$did}</td>
\t\t<td><input id="zone[{$i}]" name="zone[{$i}]" value="{$zone}"></td><td>
_END;
        $sel = new selectlist('dimndesc[' . $i . ']', $dd->getDimnDescList(), 'Select Dimension Comment', 'Desc_ID', 'Dimn_Desc', 'class="required"', $ddid, '');
        echo <<<_END
\t\t</td><td><input name="basicdimn[{$i}]" id="basicdimn[{$i}]" class="required" size="7" value="{$bdimn}"></td>
\t\t<td><input name="tollower[{$i}]" id="tollower[{$i}]" size="5" class="number" value="{$tl}"/></td>
\t\t<td><input name="tolupper[{$i}]" id="tolupper[{$i}]" size="5" class="number greaterThan" data-min="tollower\\[{$i}\\]" value="{$tu}"/></td><td>
_END;
        $sel = new selectlist('instrumenttypeid[' . $i . ']', $in->getInstrumentTypeList(), 'Select Instrument Type', 'Instrument_Type_ID', 'Instrument', 'class="required"', $instid, '');
        echo '</td><td>';
        $sel = new selectlist('critical[' . $i . ']', $a->anylist, 'Select Characteristic', 'Criticality_ID', 'Criticality', '', $critical, '');
        echo <<<_END
\t\t</td><td><input type="radio" name="stagedimn[{$i}]" value="1" {$sd1}/>Y
\t\t<input type="radio" name="stagedimn[{$i}]" value="0" {$sd0}/>N</td>
\t\t<td><input type="radio" name="proddimn[{$i}]" id="proddimn[{$i}]" value="1" {$pd1}/>Y
\t\t<input type="radio" name="proddimn[{$i}]" id="proddimn[{$i}]" value="0" {$pd0}/>N</td>
\t\t<td><input type="radio" name="compulsary[{$i}]" id="compulsary[{$i}]" value="1" {$cd1} />Y
\t\t<input type="radio" name="compulsary[{$i}]" id="compulsary[{$i}]" value="0" {$cd0}/>N</td><td>{$del}</td></tr>
_END;
    }
Exemplo n.º 7
0
            //machine list
            $l = new Operator();
            $l->createLEaveList();
            $sel = new selectlist('Leave_ID', $l->getLeaveList(), 'Select Leave to Approve', 'Leave_ID', 'leavedesc', '', '', '1');
            break;
        case 'qmsactivity':
            //machine list
            $l = new QMS();
            if (isset($_GET['id'])) {
                $id = $_GET['id'];
            } else {
                $id = '';
            }
            $l->createQMSTitleList();
            $sel = new selectlist('QMS_Sch_ID', $l->getQMSTitleList(), 'Select QMS Activity', 'QMS_Sch_ID', 'QMS_Title', 'class="required"', $id, '1');
            break;
        case 'qmsdesc':
            //machine list
            $any = new Anylist();
            if (isset($_GET['qmsdescid'])) {
                $qmsdescid = $_GET['qmsdescid'];
            } else {
                $qmsdescid = '';
            }
            $any->createAnyGrid('QMS_Desc', 'QMS_Desc', 'QMS_Desc_ID', $qmsdescid, 'QMS_Sch_ID', $_GET['qmsschid']);
            break;
        default:
            # code...
            break;
    }
}
Exemplo n.º 8
0
 if (isset($_GET['ui'])) {
     if (isset($_GET['poid'])) {
         $po->setValue('poid', $_GET['poid']);
     }
     $po->setValue('supplierid', $_GET['sid']);
     $po->showPurchaseOrderUI();
 }
 if (isset($_GET['newtmrow'])) {
     $po->addItemRow($_GET['id']);
 }
 if (isset($_GET['getlist'])) {
     $po->setValue('supplierid', $_GET['sid']);
     $po->getSuppliedItemList();
 }
 if (isset($_GET['scope'])) {
     $any = new Anylist();
     $any->createlist('Supplier_Scope');
     $sel = new selectlist("Scope_ID", $any->anylist, 'Select Supply Scope', 'Scope_ID', 'Scope', '', '', '1');
 }
 if (isset($_GET['pregister'])) {
     if (isset($_GET['sid'])) {
         $po->setValue('supplierid', $_GET['sid']);
     }
     if (isset($_GET['scopeid'])) {
         $po->setValue('scopeid', $_GET['scopeid']);
     }
     $po->listPurchases();
 }
 if (isset($_GET['mlist'])) {
     if (isset($_GET['poid'])) {
         $po->setValue('poid', $_GET['poid']);
Exemplo n.º 9
0
 function showSpareUI()
 {
     $db = Database::getInstance();
     $cxn = $db->getConnection();
     $any = new Anylist();
     if ($this->spareid != '') {
         $q = "SELECT * FROM Spare WHERE Spare_ID={$this->spareid}";
         if (!($res = $cxn->query($q))) {
             exit("error (showSpareUI) : {$cxn->error}");
         }
         $r = mysqli_fetch_assoc($res);
         $this->description = $r['Description'];
         $this->supppartno = $r['Supplier_Part_NO'];
         $this->mfgpartno = $r['Mfg_Part_NO'];
         $this->machineid = $r['Machine_ID'];
     }
     echo '<fieldset><legend>Enter Spare Details</legend>';
     echo '<p><label>Description</label><input id="description" name="description" class="required" value="' . $this->description . '">';
     echo '<p><label>Supplier Part No</label><input id="supppartno" name="supppartno" class="required" value="' . $this->supppartno . '">';
     echo '<p><label>Manufacturres\'s Part No</label><input id="mfgpartno" name="mfgpartno" value="' . $this->mfgpartno . '">';
     echo '<fieldset><legend>Select Machines This Spare is Used For</legend>';
     $any->createAnyGrid('Machine', 'Machine_Name', 'Machine_ID', $this->machineid);
     echo '</fieldset>';
 }
Exemplo n.º 10
0
    function showInstrumentUI()
    {
        $db = Database::getInstance();
        $cxn = $db->getConnection();
        $ity = new InstrumentType();
        $ity->createInstrumentTypeList();
        $islno = $idesc = $caldate = $calfreq = $make = $range = $error = $lc = $rem = $ityid = $caldatedb = $cloc = '';
        if ($this->instrumentid != '') {
            $q = "SELECT * FROM Instrument WHERE Instrument_ID={$this->instrumentid}";
            if (!($res = $cxn->query($q))) {
                exit("error : {$cxn->error}");
            }
            $row = mysqli_fetch_assoc($res);
            $islno = $row['Instrument_SLNO'];
            $idesc = $row['Instrument_Description'];
            $calfreq = $row['Calibration_Frequency'];
            $make = $row['Make'];
            $range = $row['Instrument_Range'];
            $error = $row['Acceptable_Error'];
            $lc = $row['Least_Count'];
            $rem = $row['Remarks'];
            $ityid = $row['Instrument_Type_ID'];
            $cloc = $row['Current_Location'];
            $qc = "SELECT *,DATE_FORMAT(Calibration_Date,'%d-%m-%Y') as cd FROM Calibration_History WHERE Instrument_ID={$this->instrumentid}";
            if (!($rcd = $cxn->query($qc))) {
                exit("error : {$cxn->error}");
            }
            $n = $rcd->num_rows;
        }
        $any = new Anylist();
        $any->Createlist('Instrument_Location');
        echo <<<_END
\t\t\t<label>Instrument Type</label>
_END;
        $sel = new selectlist('Instrument_Type_ID', $ity->getInstrumentTypeList(), 'Select Instrument Type', 'Instrument_Type_ID', 'Instrument', 'class="required"', $ityid, '');
        echo <<<_END
\t\t\t<p>
\t\t\t<label>Instrument Serial NO</label>
\t\t\t<input id="slno" name="slno" value="{$islno}">
\t\t\t</p>
\t\t\t<p>
\t\t\t<label>Instrument Description</label>
\t\t\t<input id="instrumentdesc" name="instrumentdesc" value="{$idesc}" class="required">
\t\t\t</p>
\t\t\t<p>
\t\t\t<label>Calibration Frequency</label>
\t\t\t<input id="frequency" name="frequency" value="{$calfreq}">
\t\t\t</p>
\t\t\t<p>
\t\t\t<label>Instrument Make</label>
\t\t\t<input id="make" name="make" value="{$make}" class="required">
\t\t\t</p>
\t\t\t<p>
\t\t\t<label>Instrument Range</label>
\t\t\t<input id="range" name="range" value="{$range}" >
\t\t\t</p>
\t\t\t<p>
\t\t\t<label>Acceptable Error</label>
\t\t\t<input id="acceptableerror" name="acceptableerror" value="{$error}" >
\t\t\t</p>
\t\t\t<p>
\t\t\t<label>Instrument Least Count</label>
\t\t\t<input id="leastcount" name="leastcount" value="{$lc}">
\t\t\t</p>
\t\t\t<p>
\t\t\t<label>Remarks</label>
\t\t\t<input id="remarks" name="remarks" value="{$rem}">
\t\t\t</p>
\t\t\t<p>
\t\t\t<label>Current Location</label>

_END;
        $sel = new selectlist('Location_ID', $any->anylist, 'Select Instrument Location', 'Location_ID', 'Location', 'class="required"', $cloc, '');
        echo '<p><label>Calibration Date</label><input id="calibrationdate" name="calibrationdate" ><input type="hidden" id="caldatedb" name="caldatedb"></p>';
        echo '<p><label>Calibration Certificate No</label><input id="certno" name="certno"></p>';
        echo '<p><label>Calibration Remarks</label><input id="calremarks" name="calremarks"></p>';
        if (isset($n)) {
            echo '<p><label>Calibration History</label>';
            echo '<table class="tl"><tr><th>Calibration Date</th><th>Certificate No.</th><th>Remarks</th></tr>';
            while ($rc = mysqli_fetch_assoc($rcd)) {
                echo '<tr><td>' . $rc['cd'] . '</td><td>' . $rc['Certificate_NO'] . '</td><td>' . $rc['Remarks'] . '</td></tr>';
            }
            echo '</table>';
        }
        echo '</p>';
    }
Exemplo n.º 11
0
 function showECNUI()
 {
     $db = Database::getInstance();
     $cxn = $db->getConnection();
     $tm = '';
     if ($this->ecnid != '') {
         $q = "SELECT *,DATE_FORMAT(Request_Date,'%d-%m-%Y') as rdt FROM ECN WHERE ECN_ID={$this->ecnid}";
         if (!($res = $cxn->query($q))) {
             exit("error : {$cxn->error}");
         }
         $row = mysqli_fetch_assoc($res);
         $this->ecnno = $row['ECN_NO'];
         $this->problemdescription = $row['Problem_Description'];
         $this->solutionrequirement = $row['Solution_Requirement'];
         //		$this->requesterid=$row['Requetser_ID'];
         $this->requestdate = $row['rdt'];
         $this->requestdatedb = $row['Request_Date'];
         $this->disposition = $row['Disposition'];
         $qop = "SELECT *,DATE_FORMAT(Target_Date,'%d-%m-%Y') as td FROM ECN_Team_Members WHERE ECN_ID={$this->ecnid}";
         if (!($resqop = $cxn->query($qop))) {
             exit("error : {$cxn->error}");
         }
         $tm = $resqop->num_rows;
     }
     $ope = new Operator();
     $ope->createOperatorList();
     echo '<fieldset><legend>Engineering Change Note Details</legend>';
     echo '<p><label>ECN Date</label><input id="ecnd" name="ecnd" class="required" value="' . $this->requestdate . '"><input type="hidden" id="ecnddb" name="ecnddb" value="' . $this->requestdatedb . '"></p>';
     echo '<p><label>ECN No</label><input id="ecnno" name="ecnno" class="required" value="' . $this->ecnno . '"></p>';
     echo '<p><label>Problem Description/Reason for Change</label><textarea id="problemdescription" name="problemdescription" class="required" rows="5" cols="40">' . $this->problemdescription . '</textarea></p>';
     echo '<p><label>Solution Requirement</label><textarea id="solutionrequirement" name="solutionrequirement" class="required" rows="5" cols="40">' . $this->solutionrequirement . '</textarea></p>';
     echo '<p><label>Team Members</label><input type="button" id="addmember" value="Add Team Member"></p>';
     echo '<table id="tm" width="100%" class="u"><tr><th align="center">Name</th><th align="center">Department</th><th align="center">Work Desc.</th><th align="center">Target Date</th><th align="center">Remarks</th></tr>';
     $any = new Anylist();
     $any->createList('Department');
     if ($tm > 0) {
         $i = 0;
         while ($rop = mysqli_fetch_assoc($resqop)) {
             echo '<tr><td><input type="hidden" id="ecntmid[' . $i . ']" name="ecntmid[' . $i . ']" value="' . $rop['ECN_Team_Member_ID'] . '">';
             $sel = new selectlist("teammember[" . $i . "]", $ope->getOperatorList(), 'Select Member Name', 'Operator_ID', 'Operator_Name', 'class="required"', $rop['Team_Member_ID'], '');
             echo '</td><td>';
             $sel = new selectlist("department[" . $i . "]", $any->anylist, 'Select Department', 'Department', 'Department', 'class="required"', $rop['Department'], '');
             //		<input id="department['.$i.']" name="department['.$i.']" class="required" value="'.$rop['Department'].'">
             echo '</td><td><input id="work[' . $i . ']" name="work[' . $i . ']" class="required" value="' . $rop['Work'] . '" size="75"></td>';
             echo '<td><input id="tdate[' . $i . ']" name="tdate[' . $i . ']" class="required" value="' . $rop['td'] . '"></td><td><input id="memberremarks[' . $i . ']" name="memberremarks[' . $i . ']" value="' . $rop['Remarks'] . '"></td>';
             echo '<input type="hidden" id="tdatedb[' . $i . ']" name="tdatedb[' . $i . ']" value="' . $rop['Target_Date'] . '"></tr>';
             $i++;
         }
     } else {
         echo '<tr><td>';
         $sel = new selectlist("teammember[0]", $ope->getOperatorList(), 'Select Member Name', 'Operator_ID', 'Operator_Name', 'class="required"', '', '');
         echo '</td><td>';
         $sel = new selectlist("department[0]", $any->anylist, 'Select Department', 'Department', 'Department', 'class="required"', '', '');
         echo '</td><td><input id="work[0]" name="work[0]" class="required" size="75"></td>';
         echo '<td><input id="tdate[0]" name="tdate[0]" class="required"></td><td><input id="memberremarks[0]" name="memberremarks[0]" size="75"></td>';
         echo '<input type="hidden" id="tdatedb[0]" name="tdatedb[0]"></tr>';
     }
     echo '</table>';
     if ($this->ecnid != '') {
         echo '<p><label>Closing Remarks</label><input name="appremarks" size="75" id="appremarks"><input type="button" Value="Approve and Close NC Log" id="abutton"></p>';
         self::showLogimages();
     }
     echo '<input class="submit" type="submit" value="Save"/>';
 }
Exemplo n.º 12
0
         $supplier->setValue('supratingid', $_POST['supratingid']);
     }
     $supplier->saveRating();
 } else {
     if (isset($_GET['ui'])) {
         if (isset($_GET['cid'])) {
             $cid = $_GET['cid'];
             $supplier->setSID($cid);
         }
         $supplier->showSupplierUI();
     }
     if (isset($_GET['newscrow'])) {
         $id = $_GET['id'];
         $any = new Anylist();
         $any->createlist('Supplier_Scope');
         $anys = new Anylist();
         $anys->createlist('Supplier_Status');
         echo '<tr><td>';
         $sel = new selectlist("Scope_ID[" . $id . "]", $any->anylist, 'Select Supply Scope', 'Scope_ID', 'Scope', 'class="required"', '', '');
         echo '</td><td><input id="appdate[' . $id . ']" name="appdate[' . $id . ']" class="required" >';
         echo '<input type="hidden" id="appdatedb[' . $id . ']" name="appdatedb[' . $id . ']" ></td><td>';
         $sel = new selectlist("Status_ID[" . $id . "]", $anys->anylist, 'Select Status', 'Status_ID', 'Status', 'class="required"', '', '');
         echo '</td><td><input id="sremarks[' . $id . ']" name="sremarks[' . $id . ']"></td></tr>';
     }
     if (isset($_GET['rating'])) {
         $supplier->setSID($_GET['cid']);
         $supplier->listSupplierRating();
     }
     if (isset($_GET['sid'])) {
         $supplier->setValue('id', $_GET['sid']);
         $supplier->showScopeList();
Exemplo n.º 13
0
 function showSPMUI()
 {
     $db = Database::getInstance();
     $cxn = $db->getConnection();
     if ($this->spmid != '') {
         $q = "SELECT * FROM Scheduled_PM WHERE SPM_ID={$this->spmid}";
         if (!($res = $cxn->query($q))) {
             exit("error (showSPMUI) : {$cxn->error}");
         }
         $r = mysqli_fetch_assoc($res);
         $this->machineid = $r['Machine_ID'];
         $this->spmtitle = $r['SPM_Title'];
         $this->spmtol = $r['SPM_Tol'];
         $this->spminterval = $r['SPM_Interval'];
     }
     echo '<fieldset><legend>Scheduled Preventive Maintenance Details</legend>';
     if ($this->spmid != '') {
         $mc = new Machine();
         $mc->createMachineList();
         $sel = new selectlist('EMachine_ID', $mc->getMachineList(), 'Select Machine', 'Machine_ID', 'mnslno', 'class="required"', $this->machineid, '1');
     }
     echo '<p><label>Maintenance Title</label><input id="spmtitle" name="spmtitle" class="required" value="' . $this->spmtitle . '"/></p>';
     echo '<p><label>Maintenance Interval in Days</label><input id="spminterval" name="spminterval" class="required" value="' . $this->spminterval . '"/></p>';
     echo '<p><label>Tolerance in Days</label><input id="spmtol" name="spmtol" class="required" value="' . $this->spmtol . '"/></p>';
     echo '<fieldset><legend>Maintanance activites for this Schedule</legend>';
     echo '<input type="button" id="addrow" value="Add New Activity"><p/>';
     if ($this->spmid != '') {
         self::listSPMDesc();
     } else {
         echo '<table class="pcd" id="spmt">';
         echo '<tr><th>Description</th></tr>';
         $this->showSPMrow(0);
         echo '</table>';
     }
     echo '</fieldset>';
     echo '<fieldset><legend>Geometric Parameters to be Checked</legend>';
     echo '<input type="button" id="addgprow" value="Add Selected Parameter to List"><p/>';
     $any = new Anylist();
     $any->createList('Geometric_Parameter');
     $sel = new selectlist('GP_ID', $any->anylist, 'Select Geometric Properties to Check', 'GP_ID', 'Parameter', '', '', '');
     echo '<input id="gpidlist" name="gpidlist" type="hidden">';
     if ($this->spmid != '') {
         $this->listGPIDs();
     }
     echo '<div id="gplist"></div>';
     echo '</fieldset>';
     echo '</fieldset>';
     echo '<input class="submit" type="submit" value="Save Sechduled Maintenance"/>';
 }
Exemplo n.º 14
0
 function showPurchaseOrderUI()
 {
     $db = Database::getInstance();
     $cxn = $db->getConnection();
     $any = new Anylist();
     if ($this->poid != '') {
         $q = "SELECT *,DATE_FORMAT(PO_Date,'%d-%m-%Y') as pod,DATE_FORMAT(Supp_Ref_Date,'%d-%m-%Y') as srd,DATE_FORMAT(Required_Date,'%d-%m-%Y') as rdate,DATE_FORMAT(Not_Later_Date,'%d-%m-%Y') as nldate FROM Purchase_Order WHERE PO_ID={$this->poid}";
         if (!($res = $cxn->query($q))) {
             exit("error (showPurchaseOrderUI) {$q} : {$cxn->error}");
         }
         $r = mysqli_fetch_assoc($res);
         $this->pono = $r['PO_NO'];
         $this->supplierid = $r['Supplier_ID'];
         $this->podatedb = $r['PO_Date'];
         $this->podate = $r['pod'];
         $this->suppref = $r['Supp_Ref'];
         $this->supprefdatedb = $r['Supp_Ref_Date'];
         $this->supprefdate = $r['srd'];
         $this->potermid = $r['Terms_ID'];
         $this->currency = $r['Currency'];
         $this->notes = $r['Notes'];
         $this->requireddatedb = $r['Required_Date'];
         $this->requireddate = $r['rdate'];
         $this->notlaterdatedb = $r['Not_Later_Date'];
         $this->notlaterdate = $r['nldate'];
         $qi = "SELECT * FROM PO_Item WHERE PO_ID={$this->poid}";
         if (!($res2 = $cxn->query($qi))) {
             exit("error (showPurchaseOrderUI2) {$qi} : {$cxn->error}");
         }
         $desc = array();
         $i = 0;
         while ($ri = mysqli_fetch_assoc($res2)) {
             $desc[$i] = ['poitemid' => $ri['PO_Item_ID'], 'desc' => $ri['Description'], 'qty' => $ri['Item_Qty'], 'price' => $ri['Unit_Price'], 'discount' => $ri['Discount']];
             $i++;
         }
     }
     echo '<fieldset><legend>Enter Purchase Order Details</legend>';
     echo '<p><label>Purchase Order No</label><input id="pono" name="pono" class="required" value="' . $this->pono . '">';
     echo '<p><label>Purchase Order Date</label><input id="podate" name="podate" class="required" value="' . $this->podate . '"><input id="podatedb" name="podatedb" type="hidden" value="' . $this->podatedb . '">';
     echo '<p><label>Supplier Ref No</label><input id="suppref" name="suppref" value="' . $this->suppref . '">';
     echo '<p><label>Supplier Ref Date</label><input id="supprefdate" name="supprefdate" class="required" value="' . $this->supprefdate . '"><input id="supprefdatedb" name="supprefdatedb" type="hidden" value="' . $this->supprefdatedb . '">';
     echo '<p><label>Currency</label><input id="currency" name="currency" value="' . $this->currency . '">';
     echo '<p><label>Notes</label><input id="notes" name="notes" value="' . $this->notes . '" size="100">';
     echo '<p><label>Required Date</label><input id="requireddate" name="requireddate" class="required" value="' . $this->requireddate . '"><input id="requireddatedb" name="requireddatedb" type="hidden" value="' . $this->requireddatedb . '">';
     echo '<p><label>Not Later Then Date</label><input id="notlaterdate" name="notlaterdate" class="required" value="' . $this->notlaterdate . '"><input id="notlaterdatedb" name="notlaterdatedb" type="hidden" value="' . $this->notlaterdatedb . '">';
     echo '<p><label>Purchase Order Item Details</label><input type="button" id="additem" value="Add One More Item">';
     echo '<table class="pcd" id="item"><tr><th>Sl No</th><th>Description</th><th>Quantity</th><th>Unit Price</th><th>Discount</th></tr>';
     if ($this->poid != '') {
         if (isset($desc[0]['poitemid'])) {
             $i = 0;
             $j = count($desc);
             while ($i < $j) {
                 $slno = $i + 1;
                 echo '<tr><td><input id="poitemid[' . $i . ']" name="poitemid[' . $i . ']" value="' . $desc[$i]['poitemid'] . '" type="hidden">' . $slno . '</td><td><input id="description[' . $i . ']" name="description[' . $i . ']" class="required" value="' . $desc[$i]['desc'] . '"></td>';
                 echo '<td><input i="itemqty[' . $i . ']" name="itemqty[' . $i . ']" class="required" value="' . $desc[$i]['qty'] . '"></td>';
                 echo '<td><input i="price[' . $i . ']" name="price[' . $i . ']" class="required" value="' . $desc[$i]['price'] . '"></td>';
                 echo '<td><input i="discount[' . $i . ']" name="discount[' . $i . ']" value="' . $desc[$i]['discount'] . '"></td></tr>';
                 $i++;
             }
         } else {
             $this->addItemRow('0');
         }
     } else {
         $this->addItemRow('0');
     }
     echo '</table>';
     echo '<fieldset><legend>Select Terms and Condition</legend>';
     $any->createAnyGrid('PO_Terms', 'Term', 'PO_Term_ID', $this->potermid);
     echo '<input type="button" id="preview" value="Preview PO">';
     echo '<input type="checkbox" id="previewok" name="previewok" value="1">PreView Checked OK';
     echo '</fieldset>';
 }
Exemplo n.º 15
0
<?php

require_once 'autoload.php';
$mc = new Machine();
if (isset($_GET['typeid'])) {
    $mc->setValue('typeid', $_GET['typeid']);
    $mc->showEquipmentList();
}
if (isset($_GET['type'])) {
    $any = new Anylist();
    $any->createList('Machine_Type');
    $sel2 = new selectlist('Type_ID', $any->anylist, 'Select Equipment Type', 'Type_ID', 'Type_Description', 'class="required"', '', '1');
}
?>


Exemplo n.º 16
0
    function showToolBodyStockUI()
    {
        if ($this->toolbodystockid == '') {
            echo <<<_END
\t\t\t<fieldset>
\t\t\t\t<legend>Tool Details</legend>
   \t\t\t\t<p>
\t\t\t     <label>New Tool Body Quantity</label>
\t\t\t     <input id="qty" name="qty" size="25" class="number"/>
\t\t\t   </p>
   \t\t\t\t<p>
\t\t\t     <label>Price of Each New Tool</label>
\t\t\t     <input id="price" name="price" size="25" class="number"/>
\t\t\t   </p>
   \t\t\t\t<p>
\t\t\t     <label>Storage Bin ID</label>
\t\t\t     <input id="binid" name="binid" size="25" />
\t\t\t   </p>

\t\t\t\t</fieldset>
\t\t\t   <p>
\t\t\t     <input class="submit" type="submit" value="Save"/>
\t\t\t   </p>


_END;
        } else {
            $db = Database::getInstance();
            $cxn = $db->getConnection();
            $q = "SELECT * FROM ToolBody_Stock WHERE ToolBody_Stock_ID={$this->toolbodystockid}";
            if (!($res = $cxn->query($q))) {
                echo "error :", $cxn->error;
            } else {
                $row = mysqli_fetch_assoc($res);
                $any = new Anylist();
                echo <<<_END
\t\t\t<fieldset>
\t\t\t\t<legend>Tool Details</legend>

_END;
                if ($this->typeid != 18) {
                    echo <<<_END
   \t\t\t\t<p>
\t\t\t     <label>Cutting Dia (Dc)</label>
\t\t\t     <input id="cdiameter" name="cdiameter" size="25" class="number" value="{$row['Cutting_Dia']}"/>
\t\t\t   </p>
\t\t\t   <p>
\t\t\t     <label>Shank Diameter (Ds)</label>
\t\t\t     <input id="sdiameter" name="sdiameter" size="25" class="number" value="{$row['Shank_Dia']}"/>
\t\t\t   </p>
\t\t\t   <p>
\t\t\t     <label>Flute Length (FL)</label>
\t\t\t     <input id="flutelength" name="flutelength" size="25"  class="required number" value="{$row['Tool_FL']}"/>
\t\t\t   </p>

_END;
                    if ($this->typeid != 3) {
                        echo <<<_END

   \t\t\t\t<p>
\t\t\t     <label>Neck Diameter (Dn)</label>
\t\t\t     <input id="ndiameter" name="ndiameter" size="25" class="number" value="{$row['Neck_Dia']}"/>
\t\t\t   </p>
_END;
                    }
                    echo <<<_END
\t\t\t   <p>
\t\t\t     <label>Neck Length/Reach (NL)</label>
\t\t\t     <input id="reach" name="reach" size="25" class="number greaterThan" data-min="flutelength" value="{$row['Neck_Length']}"/>
\t\t\t   </p>



\t\t\t   <p>
\t\t\t   <p>
\t\t\t     <label>Overall Length (OAL)</label>
\t\t\t     <input id="tooloal" name="tooloal" size="25" class="number greaterThan" data-min="flutelength" data-min="reach" value="{$row['Tool_OAL']}"/>
\t\t\t   </p>
_END;
                    if ($this->typeid == 9) {
                        echo <<<_END
\t\t\t   <p>
\t\t\t     <label>Max Radial Depth (Tmax)</label>
\t\t\t     <input id="tmax" name="tmax" size="25" class="number" class="required" value="{$row['T_Max']}"/>
\t\t\t   </p>
_END;
                    }
                }
                echo <<<_END
\t\t\t     <label>Price</label>
\t\t\t     <input id="price" name="price" size="25" class="number" value="{$row['Price']}"/>
\t\t\t   </p>
   \t\t\t\t<p>
\t\t\t     <label>Storage Bin ID</label>
\t\t\t     <input id="binid" name="binid" size="25" value="{$row['Bin_ID']}"/>
\t\t\t   </p>
\t\t\t   <p>
\t\t\t     <label>Current Location</label>
_END;
                $any->createList('Tool_Storage');
                $sel = new selectlist('Tool_Storage_ID', $any->getValue('anylist'), 'Storage Location', 'Tool_Storage_ID', 'Cur_Location', 'class="required"', $row['Cur_Location'], null);
                echo <<<_END
\t\t\t   </p>
   \t\t\t\t<p>
\t\t\t     <label>Remarks</label>
\t\t\t     <input id="remarks" name="remarks" size="25" value="{$row['Remarks']}"/>
\t\t\t   </p>

\t\t\t\t</fieldset>
\t\t\t   <p>
\t\t\t     <input class="submit" type="submit" value="Save"/>
\t\t\t   </p>


_END;
            }
        }
    }
Exemplo n.º 17
0
 function showMachineUI()
 {
     $db = Database::getInstance();
     $cxn = $db->getConnection();
     $selc = '<option value="1">Yes</option><option value="0">No</option></select>';
     if ($this->machineid != '') {
         $q = "SELECT *,DATE_FORMAT(Install_Date,'%d-%m-%Y') as id FROM Machine WHERE Machine_ID={$this->machineid}";
         if (!($res = $cxn->query($q))) {
             exit("error (showMachineUI : {$q}) : {$cxn->error}");
         }
         $r = mysqli_fetch_assoc($res);
         $this->machinename = $r['Machine_Name'];
         $this->machineslno = $r['Machine_SLNO'];
         $this->ncserialno = $r['NC_Serial_NO'];
         $this->installdatedb = $r['Install_Date'];
         $this->installdate = $r['id'];
         $this->showinlogentry = $r['Show_In_Logentry'];
         $this->supplierid = $r['Supplier_ID'];
         $this->machinedesc = $r['Machine_Desc'];
         $this->spindletaper = $r['Spindle_Taper'];
         $this->atcsize = $r['ATC_Size'];
         $this->maxrpm = $r['Max_RPM'];
         $this->tablesize = $r['Table_Size'];
         $this->stroke = $r['Stroke'];
         $this->toolclampingforce = $r['Tool_Clamping_Force'];
         $this->torque = $r['Torque'];
         $this->typeid = $r['Type_ID'];
         if ($this->showinlogentry == 1) {
             $selc = '<option value="1" selected >Yes</option><option value="0">No</option></select>';
         } else {
             $selc = '<option value="1">Yes</option><option value="0" selected>No</option></select>';
         }
     }
     echo '<fieldset><legend>Machine Details</legend>';
     $any = new Anylist();
     $any->createList('Machine_Type');
     $supp = new Supplier();
     $supp->createSupplierList();
     $sel = new selectlist('Supplier_ID', $supp->getSupplierList(), 'Select Supplier', 'Supplier_ID', 'Supplier_Name', 'class="required"', $this->supplierid, '1');
     $sel2 = new selectlist('Type_ID', $any->anylist, 'Select Equipment Type', 'Type_ID', 'Type_Description', 'class="required"', $this->typeid, '1');
     echo '<p><label>Machine Name</label><input id="machinename" name="machinename" class="required" value="' . $this->machinename . '"></p>';
     echo '<p><label>Machine Description</label><input id="machinedesc" name="machinedesc" class="required" value="' . $this->machinedesc . '"></p>';
     echo '<p><label>Machine Serial Number</label><input id="machineslno" name="machineslno" value="' . $this->machineslno . '"></p>';
     echo '<p><label>NC Serial Number</label><input id="ncserialno" name="ncserialno" value="' . $this->ncserialno . '"></p>';
     echo '<p><label>Spindle Taper</label><input id="spindletaper" name="spindletaper" value="' . $this->spindletaper . '"></p>';
     echo '<p><label>ATC Size</label><input id="atcsize" name="atcsize" value="' . $this->atcsize . '"></p>';
     echo '<p><label>Maximum RPM</label><input id="maxrpm" name="maxrpm" value="' . $this->maxrpm . '"></p>';
     echo '<p><label>Table Size</label><input id="tablesize" name="tablesize" value="' . $this->tablesize . '"></p>';
     echo '<p><label>Axis Strokes</label><input id="stroke" name="stroke" value="' . $this->stroke . '"></p>';
     echo '<p><label>Tool Clamping force</label><input id="toolclampingforce" name="toolclampingforce" value="' . $this->toolclampingforce . '"></p>';
     echo '<p><label>Torque</label><input id="torque" name="torque" value="' . $this->torque . '"></p>';
     echo '<p><label>Date OF Installation</label><input id="installdate" name="installdate" value="' . $this->installdate . '"><input id="installdatedb" type="hidden" name="installdatedb" value="' . $this->installdatedb . '"></p>';
     echo '<p><label>Show Machine In Log Entry Page?</label><select id="showinlogentry" name="showinlogentry">' . $selc;
     echo '</fieldset>';
     echo '<input type="submit" class="submit" value="Save Machine Details">';
 }
Exemplo n.º 18
0
 function listSupplierScope()
 {
     $any = new Anylist();
     $any->createlist('Supplier_Scope');
     $anys = new Anylist();
     $anys->createlist('Supplier_Status');
     echo '<p><label>Supplier Scope</label><table class="tt" id="tscope"><tr><td><input type="button" id="addscoperow" value="Add One More Row"></td></tr>';
     echo '<tr><th>Scope</th><th>Date of Approval</th><th>Approval Status</th><th>Remarks</th></tr>';
     if (isset($this->scopeid[0])) {
         $i = 0;
         $j = count($this->scopeid);
         while ($i < $j) {
             echo '<tr><td><input type="hidden" id="supscopeid[' . $i . ']" name="supscopeid[' . $i . ']" value="' . $this->supscopeid[$i] . '">';
             $sel = new selectlist("Scope_ID[{$i}]", $any->anylist, 'Select Supply Scope', 'Scope_ID', 'Scope', 'class="required"', $this->scopeid[$i], '');
             echo '</td><td><input id="appdate[' . $i . ']" name="appdate[' . $i . ']" class="required" value="' . $this->appdate[$i] . '">';
             echo '<input type="hidden" id="appdatedb[' . $i . ']" name="appdatedb[' . $i . ']" value="' . $this->appdatedb[$i] . '"></td><td>';
             $sel = new selectlist("Status_ID[{$i}]", $anys->anylist, 'Select Status', 'Status_ID', 'Status', 'class="required"', $this->appstatus[$i], '');
             echo '</td><td><input id="sremarks[' . $i . ']" name="sremarks[' . $i . ']" value="' . $this->sremarks[$i] . '"></td></tr>';
             $i++;
         }
     } else {
         echo '<tr><td>';
         $sel = new selectlist("Scope_ID[0]", $any->anylist, 'Select Supply Scope', 'Scope_ID', 'Scope', 'class="required"', '', '');
         echo '</td><td><input id="appdate[0]" name="appdate[0]" class="required" >';
         echo '<input type="hidden" id="appdatedb[0]" name="appdatedb[0]" ></td><td>';
         $sel = new selectlist("Status_ID[0]", $anys->anylist, 'Select Status', 'Status_ID', 'Status', 'class="required"', '', '');
         echo '</td><td><input id="sremarks[0]" name="sremarks[0]"></td></tr>';
     }
     echo '</table>';
 }
Exemplo n.º 19
0
 function adminUI()
 {
     $db = Database::getInstance();
     $cxn = $db->getConnection();
     if (isset($_SESSION['operatorid'])) {
         $this->operatorid = $_SESSION['operatorid'];
     } else {
         exit('Not Logged In!!');
     }
     if (in_array($this->operatorid, $this->admin)) {
         self::createOperatorList();
         echo '<fieldset><legend>Mark Absent/Leave</legend>';
         $sel = new selectlist("Operator_IDab", $this->getOperatorList(), 'Select Name', 'Operator_ID', 'Operator_Name', 'class="required"', '', '1');
         $any = new Anylist();
         $any->createList('Att_Status');
         $sel = new selectlist('Att_Status_IDab', $any->anylist, 'Select Status', 'Att_Status_ID', 'Status', '', '', '1');
         echo '<p><label>Absent/Leave Date</label><input id="absentdate" name="absentdate" class="required" ><input id="absentdatedb" name="absentdatedb" type="hidden"></p>';
         echo '<p><label>Remarks</label><input id="remarks" name="remarks"></p>';
         echo '<input type="hidden" id="abs" name="abs">';
         echo '<p><input type="button" Value="Mark Absent" id="absbutton"></p></fieldset>';
     }
 }
Exemplo n.º 20
0
    function showOpeToolBatchUI()
    {
        $db = Database::getInstance();
        $cxn = $db->getConnection();
        $q = "SELECT * From Ope_Tool_Batch WHERE Batch_ID={$this->batchid} AND Ope_Drawing_ID={$this->operevid}";
        if (!($res = $cxn->query($q))) {
            exit("error (showOpeToolBatchUI) {$q} : {$cxn->error}");
        }
        $r = $res->num_rows;
        print '<table>';
        if ($r == 0) {
            print '<thead><tr><th class="v">Ope Tool ID</th><th class="v">Tool Description</th><th>Tool Used</th><th class="v">Tool Body Description</th><th>Tool Body Used</th><th class="v">Holder Description</th><th width:"25">Holder Used</th></tr></thead><tbody>';
            $qs = "SELECT * FROM Ope_Tool WHERE Ope_Drawing_ID={$this->operevid} AND Deleted!=1";
            if (!($ress = $cxn->query($qs))) {
                echo "error :", $cxn->error;
            }
            $i = 0;
            while ($row = mysqli_fetch_assoc($ress)) {
                $id = $row['Ope_Tool_ID'];
                $qt = "SELECT Tool_Desc,Brand_Description From Tool as t inner join Tool_Brand as tb on tb.Brand_ID=t.Brand_ID WHERE Tool_ID={$row['Tool_ID_1']}";
                if (!($rest = $cxn->query($qt))) {
                    echo "error :", $cxn->error;
                }
                $t = mysqli_fetch_assoc($rest);
                $qh = "SELECT Holder_Description From Holder WHERE Holder_ID={$row['Holder_ID_1']}";
                if (!($resh = $cxn->query($qh))) {
                    echo "error :", $cxn->error;
                }
                $h = mysqli_fetch_assoc($resh);
                $qb = "SELECT Tool_Desc,Brand_Description,Mfg_Part_NO From ToolBody as t inner join Tool_Brand as tb on tb.Brand_ID=t.Brand_ID WHERE ToolBody_ID={$row['ToolBody_ID_1']}";
                if (!($resb = $cxn->query($qb))) {
                    echo "error :", $cxn->error;
                }
                $tb = mysqli_fetch_assoc($resb);
                $optid = new Form(array('type' => 'hidden', 'id' => 'opetoolid[' . $i . ']', 'name' => 'opetoolid[' . $i . ']', 'value' => $row['Ope_Tool_ID']));
                $tsid = new Form(array('id' => 'toolstockid[' . $i . ']', 'name' => 'toolstockid[' . $i . ']', 'class' => 'required', 'unique' => 'toolstockid'));
                $tbsid = new Form(array('id' => 'toolbodystockid[' . $i . ']', 'name' => 'toolbodystockid[' . $i . ']'));
                $hsid = new Form(array('id' => 'holderstockid[' . $i . ']', 'name' => 'holderstockid[' . $i . ']', 'class' => 'required number'));
                echo <<<_END

\t\t\t\t\t\t\t<tr><th class="v">{$optid->ip} {$row['Ope_Tool_ID']}</th>
\t\t\t\t\t\t\t\t<th class="v">{$t['Brand_Description']} Make {$t['Tool_Desc']}</th><td>{$tsid->ip}</td>
\t\t\t\t\t\t\t\t<th class="v">{$tb['Brand_Description']} Make {$tb['Tool_Desc']}</th><td>{$tbsid->ip}</td>
\t\t\t\t\t\t\t\t<th class="v">{$h['Holder_Description']}</th><td>{$hsid->ip}</td></tr>
_END;
                $i++;
            }
        } else {
            ///we are either changing a tool to returning back all tools
            print '<thead><tr><th class="v">Ope Tool ID</th><th class="v">Tool Description</th><th>Tool Used</th><th>No Of Jobs</th><th>Storage Location</th>
							<th class="v">Tool Body Description</th><th>Tool Body Used</th><th>Body Storage Location</th>
							<th class="v">Holder Description</th><th width:"25">Holder Used</th><th>Holder Storage Location</th><th>Remarks</th></tr></thead><tbody>';
            $qs = "SELECT * FROM Ope_Tool WHERE Ope_Drawing_ID={$this->operevid} AND Deleted!=1";
            if (!($ress = $cxn->query($qs))) {
                exit("error (showOpeToolBatchUI 2) {$qs} : {$cxn->error}");
            }
            $any = new Anylist();
            $i = 0;
            while ($row = mysqli_fetch_assoc($ress)) {
                $qt = "SELECT Tool_Desc,Brand_Description From Tool as t inner join Tool_Brand as tb on tb.Brand_ID=t.Brand_ID WHERE Tool_ID={$row['Tool_ID_1']}";
                if (!($rest = $cxn->query($qt))) {
                    echo "error :", $cxn->error;
                }
                $t = mysqli_fetch_assoc($rest);
                $qtt = "SELECT * FROM Ope_Tool_Batch WHERE Ope_Tool_ID={$row['Ope_Tool_ID']} AND Cutting_Mins=0 AND Qty=0";
                if (!($restt = $cxn->query($qtt))) {
                    echo "error :", $cxn->error;
                }
                $tt = mysqli_fetch_assoc($restt);
                $qt = "SELECT Tool_Desc,Brand_Description From Tool as t inner join Tool_Brand as tb on tb.Brand_ID=t.Brand_ID WHERE Tool_ID={$row['Tool_ID_1']}";
                if (!($rest = $cxn->query($qt))) {
                    echo "error :", $cxn->error;
                }
                $t = mysqli_fetch_assoc($rest);
                $qh = "SELECT Holder_Description From Holder WHERE Holder_ID={$row['Holder_ID_1']}";
                if (!($resh = $cxn->query($qh))) {
                    echo "error :", $cxn->error;
                }
                $h = mysqli_fetch_assoc($resh);
                $qb = "SELECT Tool_Desc,Brand_Description,Mfg_Part_NO From ToolBody as t inner join Tool_Brand as tb on tb.Brand_ID=t.Brand_ID WHERE ToolBody_ID={$row['ToolBody_ID_1']}";
                if (!($resb = $cxn->query($qb))) {
                    echo "error :", $cxn->error;
                }
                $tb = mysqli_fetch_assoc($resb);
                if ($tt['Ope_Tool_Batch_ID'] != '') {
                    $optbid = new Form(array('type' => 'hidden', 'id' => 'opetoolbatchid[' . $i . ']', 'name' => 'opetoolbatchid[' . $i . ']', 'value' => $tt['Ope_Tool_Batch_ID']));
                } else {
                    //if there in no tool associated with entry in tool list
                    $optbid = new Form(array('type' => 'hidden', 'id' => 'opetoolid[' . $i . ']', 'name' => 'opetoolid[' . $i . ']', 'value' => $row['Ope_Tool_ID']));
                }
                $tsid = new Form(array('id' => 'toolstockid[' . $i . ']', 'name' => 'toolstockid[' . $i . ']', 'class' => 'required', 'value' => $tt['Tool_Stock_ID'], 'unique' => 'toolstockid', 'size' => "10"));
                $tbsid = new Form(array('id' => 'toolbodystockid[' . $i . ']', 'name' => 'toolbodystockid[' . $i . ']', 'value' => $tt['Tool_Body_Stock_ID'], 'size' => "10"));
                $hsid = new Form(array('id' => 'holderstockid[' . $i . ']', 'name' => 'holderstockid[' . $i . ']', 'class' => 'required number', 'value' => $tt['Holder_Stock_ID'], 'unique' => 'holderstockid', 'size' => "10"));
                $tqty = new Form(array('id' => 'jobqty[' . $i . ']', 'name' => 'jobqty[' . $i . ']', 'class' => 'number', 'value' => '0', 'size' => "10"));
                $trem = new Form(array('id' => 'remarks[' . $i . ']', 'name' => 'remarks[' . $i . ']'));
                echo <<<_END

\t\t\t\t\t\t\t<tr><th class="v" style="width:30px">{$optbid->ip} {$row['Ope_Tool_ID']}</th>
\t\t\t\t\t\t\t\t<th class="v" style="width:100px">{$t['Brand_Description']} Make {$t['Tool_Desc']}</th><td>{$tsid->ip}</td><td>{$tqty->ip}</td>
\t\t\t\t\t\t\t\t<td>
_END;
                $any->createList('Tool_Storage');
                $sel = new selectlist('Tool_Storage_ID[' . $i . ']', $any->getValue('anylist'), 'Storage Location', 'Tool_Storage_ID', 'Cur_Location', 'class="required"', 2, null);
                echo <<<_END
\t\t\t\t\t\t\t\t</td><th class="v">{$tb['Brand_Description']} Make {$tb['Tool_Desc']}</th><td>{$tbsid->ip}</td><td>
_END;
                $any->createList('Tool_Storage');
                $sel = new selectlist('ToolBody_Storage_ID[' . $i . ']', $any->getValue('anylist'), 'Storage Location', 'Tool_Storage_ID', 'Cur_Location', 'class="required"', 2, null);
                echo <<<_END
\t\t\t\t\t\t\t\t</td><th class="v" style="width:50px">{$h['Holder_Description']}</th><td>{$hsid->ip}</td><td>
_END;
                $any->createList('Tool_Storage');
                $sel = new selectlist('Holder_Storage_ID[' . $i . ']', $any->getValue('anylist'), 'Storage Location', 'Tool_Storage_ID', 'Cur_Location', 'class="required"', 2, null);
                echo <<<_END
\t\t\t\t\t\t\t\t</td><td>{$trem->ip}</td></tr>
_END;
                $i++;
            }
        }
        $bt = new Form(array('id' => 'save', 'name' => 'save', 'type' => 'button', 'value' => 'Save', 'class' => 'submit'));
        echo '<tr><td colspan="4" style="text-align:center;">' . $bt->ip . '</td></tr>';
        echo '</tbody></table>';
    }
Exemplo n.º 21
0
    function showHolderStockUI()
    {
        if ($this->holderstockid == '') {
            echo <<<_END
\t\t\t<fieldset>
\t\t\t\t<legend>Tool Holder Details</legend>
   \t\t\t\t<p>
\t\t\t     <label>New Tool Holder Quantity</label>
\t\t\t     <input id="qty" name="qty" size="25" class="number"/>
\t\t\t   </p>
   \t\t\t\t<p>
\t\t\t     <label>Price of Each New Holder</label>
\t\t\t     <input id="price" name="price" size="25" class="number"/>
\t\t\t   </p>
\t\t\t\t</fieldset>
\t\t\t   <p>
\t\t\t     <input class="submit" type="submit" value="Save"/>
\t\t\t   </p>


_END;
        } else {
            $db = Database::getInstance();
            $cxn = $db->getConnection();
            $q = "SELECT * FROM Holder_Stock WHERE Holder_Stock_ID={$this->holderstockid}";
            if (!($res = $cxn->query($q))) {
                echo "error :", $cxn->error;
            } else {
                $row = mysqli_fetch_assoc($res);
                $any = new Anylist();
                echo <<<_END
\t\t\t<fieldset>
\t\t\t\t<legend>Holder Location Details</legend>
\t\t\t   <p>
\t\t\t     <label>Current Location</label>
_END;
                $any->createList('Tool_Storage');
                $sel = new selectlist('Tool_Storage_ID', $any->getValue('anylist'), 'Storage Location', 'Tool_Storage_ID', 'Cur_Location', 'class="required"', $row['Cur_Location'], null);
                echo <<<_END

\t\t\t   </p>
   \t\t\t\t<p>
\t\t\t     <label>Remarks</label>
\t\t\t     <input id="remarks" name="remarks" size="25" value="{$row['Remarks']}"/>
\t\t\t   </p>

\t\t\t\t</fieldset>
\t\t\t   <p>
\t\t\t     <input class="submit" type="submit" value="Save"/>
\t\t\t   </p>


_END;
            }
        }
    }