Esempio n. 1
0
     if (isset($_GET['label'])) {
         $label = $_GET['label'];
     } else {
         $label = "Select Tool To Edit";
     }
     $tool->setTypeID($_GET['ttyid']);
     $tool->createToolList();
     $sel = new selectlist($id, $tool->getToolList(), $label, 'Tool_ID', 'td', '', '');
     break;
 case 'holder':
     $holder = new Holder();
     $holder->createHolderList();
     $sel = new selectlist('Holder_ID', $holder->getHolderList(), 'Select Holder', 'Holder_ID', 'Holder_Description', '', '');
     break;
 case 'tmisc':
     $tmisc = new Tmisc();
     $tmisc->createTmiscList();
     $sel = new selectlist('ToolMisc_ID', $tmisc->getTmiscList(), 'Select Accessory', 'ToolMisc_ID', 'Misc_Desc', '', '');
     break;
 case 'toolbody':
     $toolbody = new Toolbody();
     if (isset($_GET['tdia'])) {
         $toolbody->setCdiameter($_GET['tdia']);
     }
     if (isset($_GET['ttyid'])) {
         $toolbody->setTypeID($_GET['ttyid']);
     }
     if (isset($_GET['tid'])) {
         $toolbody->setToolID($_GET['tid']);
     }
     if (isset($_GET['id'])) {
Esempio n. 2
0
<?php

require_once 'autoload.php';
$_SESSION['LAST_ACTIVITY'] = time();
$toolmisc = new Tmisc();
if (isset($_POST['desc'])) {
    print_r($_POST);
    //print_r($_FILES);
    if (isset($_POST['ToolMisc_ID'])) {
        $toolmisc->setTmiscID($_POST['ToolMisc_ID']);
        $tmiscid = $_POST['ToolMisc_ID'];
    } else {
        $tmiscid = '';
    }
    ///get tool_id if we are editing an existing tool.
    $toolmisc->setDesc($_POST['desc']);
    $toolmisc->setMfgPartNO($_POST['mfgpartno']);
    $toolmisc->setType($_POST['type']);
    if (isset($_POST['price'])) {
        $toolmisc->setPrice($_POST['price']);
    }
    if (isset($_POST['ToolBody_ID'])) {
        $toolmisc->setToolBodyID($_POST['ToolBody_ID']);
    } elseif (isset($_POST['ToolBody_ID_E'])) {
        $toolmisc->setToolBodyID($_POST['ToolBody_ID_E']);
    }
    if (isset($_POST['minimumstock'])) {
        $toolmisc->setMinimumStock($_POST['minimumstock']);
    }
    if (isset($_POST['remarks'])) {
        $toolmisc->setRemarks($_POST['remarks']);