Location: PHPKode > projects > NOLA > premplreviewadd.php
<? include('includes/main.php'); ?>
<script language="JavaScript">
      var calDateFormat='yyyy-MM-DD';
</script>
<script language="JavaScript" src="js/calendar.js"></script>
<? //premplreviewadd.php
     echo texttitle('Employee Review Add');
     if ($employeeid) { //if the user has submitted info
             checkpermissions('pay');
             if ($conn->Execute('insert into premplreview (employeeid,evaluatorname,evaldate,premplreviewratingid,comments,entrydate,entryuserid,lastchangeuserid) VALUES ('.sqlprep($employeeid).', '.sqlprep($evaluatorname).', '.sqlprep($evaldate).', '.sqlprep($premplreviewratingid).', '.sqlprep($comments).', NOW(), '.sqlprep($userid).', '.sqlprep($userid).')') === false) {
                echo texterror("Error adding employee review.");
             } else {
                echo textsuccess("Employee review added successfully.");
             };
     };
     echo '<form action="premplreviewadd.php" method="post" name="mainform"><input type="hidden" name="nonprintable" value="1"><table>';
     echo '<tr><td>Employee:</td><td><select name="employeeid"'.INC_TEXTBOX.'>';
     $recordSet=&$conn->Execute('select id,lastname,firstname from premployee where gencompanyid='.sqlprep($active_company).' and cancel=0 and status=1 order by lastname,firstname');
     while (!$recordSet->EOF) {
             echo '<option value="'.$recordSet->fields[0].'">'.$recordSet->fields[1].', '.$recordSet->fields[2];
             $recordSet->MoveNext();
     };
     echo '</td></tr>';
     echo '<tr><td>Evaluator Name:</td><td><input type="text" name="evaluatorname" size="30" maxlength="50"'.INC_TEXTBOX.'></td></tr>';
     echo '<tr><td>Evaluation Date:</td><td><input type="text" name="evaldate" onchange="formatDate(this)" size="30"'.INC_TEXTBOX.'><a href="javascript:doNothing()" onclick="setDateField(document.mainform.evaldate); top.newWin = window.open(\'calendar.html\',\'cal\',\'dependent=yes,width=210,height=230,screenX=200,screenY=300,titlebar=yes\')"><img src="'.IMAGE_DATE_LOOKUP.'" border="0" alt="Display Calendar"></a></td></tr>';
     echo '<tr><td>Rating:</td><td><select name="premplreviewratingid"'.INC_TEXTBOX.'>';
     $recordSet=&$conn->Execute('select id,description from premplreviewrating order by description');
     while (!$recordSet->EOF) {
             echo '<option value="'.$recordSet->fields[0].'">'.$recordSet->fields[1];
             $recordSet->MoveNext();
     };
     echo '</td></tr>';
     echo '<tr><td>Comments:</td><td><textarea name="comments" cols="40" rows="8"></textarea></td></tr>';
     echo '</table><input type="submit" value="Add"></form>';
?>
<? include('includes/footer.php'); ?>
Return current item: NOLA