Location: PHPKode > projects > NOLA > adminestcostcentersubtypeadd.php
<? include('includes/main.php'); ?>
<? //adminestcostcentersubtypeadd.php
     if ($costcenterid) {
         $recordSet = &$conn->Execute('select name from estcostcenter where cancel=0 and id='.sqlprep($costcenterid));
     } else {
         echo 'No Cost Center Selected';
         die();
     };
     echo texttitle($recordSet->fields[0].' Cost Center Machine Family Add');
     if ($name) { //if the user has submitted info
//             checkpermissions('l3');
             if ($conn->Execute('insert into estcostcentersubtype (name,costcenterid,orderflag) VALUES ('.sqlprep($name).', '.sqlprep($costcenterid).', '.sqlprep($orderflag).')') === false) {
                echo texterror("Error adding cost center family.");
             } else {
                echo textsuccess("Cost Center Family added successfully.");
             };
     };
     echo '<form action="adminestcostcentersubtypeadd.php" method="post" name="mainform"><input type="hidden" name="nonprintable" value="1"><table>';
     echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">Name:</td><td><input type="text" name="name" size="30" maxlength="30"'.INC_TEXTBOX.'"></td></tr>';
     echo '<tr><td align="'.TABLE_LEFT_SIDE_ALIGN.'">Sort Order:</td><td><input type="text" name="orderflag" size="30" maxlength="5" onchange="validateint(this)"'.INC_TEXTBOX.'"></td></tr>';
     echo '</table><input type="submit" value="Add">';
     echo '<input type="hidden" name="costcenterid" value="'.$costcenterid.'">';
     echo '<br><br><a href="adminestcostcenterupd.php">Select a new Cost Center</a>';
     echo '<br><br><a href="adminestcostcentersubtypeupd.php?costcenterid='.$costcenterid.'">Machine Family Selection</a>';

     echo '</form>';

?>
<? include('includes/footer.php'); ?>
Return current item: NOLA