Esempio n. 1
0
require_once 'autoload.php';
$_SESSION['LAST_ACTIVITY'] = time();
$holder = new Holder();
if (isset($_POST['holderdesc'])) {
    //print_r($_POST);
    //print_r($_FILES);
    if (isset($_POST['Holder_ID'])) {
        $holder->setHolderID($_POST['Holder_ID']);
        $holderid = $_POST['Holder_ID'];
    } else {
        $holderid = '';
    }
    ///get holder_id if we are editing an existing tool.
    $holder->setHolderDesc($_POST['holderdesc']);
    $holder->setMfgPartNO($_POST['mfgpartno']);
    if (isset($_POST['gagelength'])) {
        $holder->setGageLength($_POST['gagelength']);
    }
    if (isset($_POST['spindletaper'])) {
        $holder->setSpindleTaper($_POST['spindletaper']);
    }
    if (isset($_POST['price'])) {
        $holder->setPrice($_POST['price']);
    }
    $holder->saveHolder($holderid);
} else {
    if (isset($_GET['hid'])) {
        $holder->setHolderID($_GET['hid']);
    }
    $holder->showHolderUI();
}