Location: PHPKode > projects > NOLA > adminestcostcenteradd.php
<? include('includes/main.php'); ?>
<? //adminestcostcenteradd.php
     echo texttitle('Cost Center Add');
     if ($name) { //if the user has submitted info
//             checkpermissions('l3');
             if ($conn->Execute('insert into estcostcenter (name,cctype,orderflag) VALUES ('.sqlprep($name).', '.sqlprep($cctype).', '.sqlprep($orderflag).')') === false) {
                echo texterror("Error adding cost center.");
             } else {
                echo textsuccess("Cost center added successfully.");
             };
     };
     echo '<form action="adminestcostcenteradd.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.'">Cost Center Type:</td><td><select name="cctype"'.INC_TEXTBOX.'"><option value="'.SD_CCTYPE_PREFLIGHT.'">Pre-Flight<option value="'.SD_CCTYPE_PROOF.'">Proof<option value="'.SD_CCTYPE_PREPRESS.'">Prepress<option value="'.SD_CCTYPE_INK.'">Ink<option value="'.SD_CCTYPE_PAPER.'">Paper<option value="'.SD_CCTYPE_PRINT.'">Print<option value="'.SD_CCTYPE_FINISH.'">Finish<option value="'.SD_CCTYPE_QC.'">QC<option value="'.SD_CCTYPE_SHIP.'">Ship</select></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"></form>';
?>
<? include('includes/footer.php'); ?>
Return current item: NOLA