예제 #1
0
     echo _makeAutoSelectInput('CUSTOM_' . $field['ID'], $field['TITLE'], $request);
     echo '</TD></TR>';
     break;
 case 'edits':
     echo '<TR><TD>';
     echo _makeAutoSelectInput('CUSTOM_' . $field['ID'], $field['TITLE'], $request);
     echo '</TD></TR>';
     break;
 case 'numeric':
     echo '<TR><TD>';
     echo _makeTextInput('CUSTOM_' . $field['ID'], $field['TITLE'], 'size=5 maxlength=10', $request);
     echo '</TD></TR>';
     break;
 case 'date':
     echo '<TR><TD>';
     echo _makeDateInput('CUSTOM_' . $field['ID'], $field['TITLE'], $request);
     echo '</TD></TR>';
     break;
 case 'codeds':
 case 'select':
     echo '<TR><TD>';
     echo _makeSelectInput('CUSTOM_' . $field['ID'], $field['TITLE'], $request);
     echo '</TD></TR>';
     break;
 case 'multiple':
     echo '<TR><TD>';
     echo _makeMultipleInput('CUSTOM_' . $field['ID'], $field['TITLE'], $request);
     echo '</TD></TR>';
     break;
 case 'radio':
     echo '<TR><TD>';
예제 #2
0
     echo '<TD>';
     echo _makeTextInput('CUSTOM_' . $field['ID'], $field['TITLE'], 'size=5 maxlength=10', 'staff');
     echo '</TD>';
     if ($i % $per_row == 0) {
         echo '</TR>';
     } else {
         echo '<TD style="width:50px;"></TD>';
     }
     $i++;
     break;
 case 'date':
     if (($i - 1) % $per_row == 0) {
         echo '<TR>';
     }
     echo '<TD>';
     echo _makeDateInput('CUSTOM_' . $field['ID'], $field['TITLE'], 'staff');
     echo '</TD>';
     if ($i % $per_row == 0) {
         echo '</TR>';
     } else {
         echo '<TD style="width:50px;"></TD>';
     }
     $i++;
     break;
 case 'exports':
 case 'codeds':
 case 'select':
     if (($i - 1) % $per_row == 0) {
         echo '<TR>';
     }
     echo '<TD>';
예제 #3
0
 }
 echo '</SELECT>';
 echo '<TABLE></CENTER><HR>';
 if (count($fields_RET['text'])) {
     foreach ($fields_RET['text'] as $field) {
         echo '<TR><TD align=right><small><b>' . ParseMLField($field['TITLE']) . '</b></small></TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID']) . '</TD></TR>';
     }
 }
 if (count($fields_RET['numeric'])) {
     foreach ($fields_RET['numeric'] as $field) {
         echo '<TR><TD align=right><small><b>' . ParseMLField($field['TITLE']) . '</b></small></TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID'], true) . '</TD></TR>';
     }
 }
 if (count($fields_RET['date'])) {
     foreach ($fields_RET['date'] as $field) {
         echo '<TR><TD align=right><small><b>' . ParseMLField($field['TITLE']) . '</b></small></TD><TD>' . _makeDateInput('CUSTOM_' . $field['ID']) . '</TD></TR>';
     }
 }
 if (count($fields_RET['select'])) {
     foreach ($fields_RET['select'] as $field) {
         $select_options = array();
         $field['SELECT_OPTIONS'] = str_replace("\n", "\r", str_replace("\r\n", "\r", $field['SELECT_OPTIONS']));
         $options = explode("\r", $field['SELECT_OPTIONS']);
         if (count($options)) {
             foreach ($options as $option) {
                 if ($option != '') {
                     $select_options[$option] = $option;
                 }
             }
         }
         echo "<TR><TD align=right><small><b>" . ParseMLField($field[TITLE]) . "</b></small></TD><TD>" . _makeSelectInput('CUSTOM_' . $field['ID'], $select_options) . '</TD></TR>';
예제 #4
0
             }
         }
         if ($f == 0) {
             $title = 'CUSTOM_' . trim($field['ID']);
         }
         echo '<TR><TD class=lable>' . $field['TITLE'] . '</TD><TD>' . _makeTextInput($title) . '</TD></TR>';
     }
 }
 if (count($fields_RET['numeric'])) {
     foreach ($fields_RET['numeric'] as $field) {
         echo '<TR><TD class=lable>' . $field['TITLE'] . '</TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID'], true) . '</TD></TR>';
     }
 }
 if (count($fields_RET['date'])) {
     foreach ($fields_RET['date'] as $field) {
         echo '<TR><TD class=lable>' . $field['TITLE'] . '</TD><TD>' . _makeDateInput('CUSTOM_' . $field['ID']) . '</TD></TR>';
     }
 }
 if (count($fields_RET['select'])) {
     foreach ($fields_RET['select'] as $field) {
         if ($field[TITLE] == 'Ethnicity' || $field[TITLE] == 'Gender' || $field[TITLE] == 'Language') {
             $select_options = array();
             $field['SELECT_OPTIONS'] = str_replace("\n", "\r", str_replace("\r\n", "\r", $field['SELECT_OPTIONS']));
             $options = explode("\r", $field['SELECT_OPTIONS']);
             if (count($options)) {
                 foreach ($options as $option) {
                     $select_options[$option] = $option;
                 }
             }
             echo "<TR><TD class=lable_right valign=top>{$field['TITLE']}</TD><TD>" . _makeSelectInput($field[TITLE], $select_options) . '</TD></TR>';
             echo "</TD></TR>";
예제 #5
0
    $a = DeletePromptStaffCert('Certificate');
}
if ($_REQUEST['delete_ok'] == '1') {
    DBQuery("DELETE FROM staff_certification WHERE STAFF_CERTIFICATION_ID=" . $_REQUEST['certification_id']);
    unset($_REQUEST['modfunc']);
}
if (!$_REQUEST['modfunc']) {
    if ($_REQUEST['certification_id'] != '' && $_REQUEST['certification_id'] != 'new') {
        $this_certification_RET = DBGet(DBQuery("SELECT * FROM staff_certification\r\n        WHERE STAFF_ID=" . UserStaffID()));
        $this_certification = $this_certification_RET[1];
    }
    $sql = "SELECT STAFF_CERTIFICATION_ID AS ID,STAFF_ID,STAFF_CERTIFICATION_DATE,STAFF_CERTIFICATION_EXPIRY_DATE,\r\n        STAFF_CERTIFICATION_CODE,STAFF_CERTIFICATION_SHORT_NAME,STAFF_CERTIFICATION_NAME,\r\n        STAFF_PRIMARY_CERTIFICATION_INDICATOR,STAFF_CERTIFICATION_DESCRIPTION FROM staff_certification\r\n        WHERE  STAFF_ID=" . UserStaffID();
    $QI = DBQuery($sql);
    $cert_RET = DBGet($QI, array('STAFF_CERTIFICATION_NAME' => '_makeTextInput', 'STAFF_CERTIFICATION_CODE' => '_makeTextInput', 'STAFF_CERTIFICATION_DATE' => '_makeDateInput', 'STAFF_CERTIFICATION_SHORT_NAME' => '_makeTextInput', 'STAFF_PRIMARY_CERTIFICATION_INDICATOR' => '_makeSelectInput', 'STAFF_CERTIFICATION_EXPIRY_DATE' => '_makeDateInput', 'STAFF_CERTIFICATION_DESCRIPTION' => '_makeContentInput'));
    $columns = array('STAFF_CERTIFICATION_NAME' => 'Certification Name', 'STAFF_CERTIFICATION_CODE' => 'Certification Code', 'STAFF_CERTIFICATION_DATE' => 'Certification Date', 'STAFF_CERTIFICATION_SHORT_NAME' => 'Certification Short Name', 'STAFF_PRIMARY_CERTIFICATION_INDICATOR' => 'Primary Certification Indicator', 'STAFF_CERTIFICATION_EXPIRY_DATE' => 'Certification Expiry Date', 'STAFF_CERTIFICATION_DESCRIPTION' => 'Certification Description');
    $link['add']['html'] = array('STAFF_CERTIFICATION_NAME' => _makeTextInput('', 'STAFF_CERTIFICATION_NAME'), 'STAFF_CERTIFICATION_CODE' => _makeTextInput('', 'STAFF_CERTIFICATION_CODE'), 'STAFF_CERTIFICATION_DATE' => _makeDateInput('', 'STAFF_CERTIFICATION_DATE'), 'STAFF_CERTIFICATION_SHORT_NAME' => _makeTextInput('', 'STAFF_CERTIFICATION_SHORT_NAME'), 'STAFF_PRIMARY_CERTIFICATION_INDICATOR' => _makeSelectInput('', 'STAFF_PRIMARY_CERTIFICATION_INDICATOR'), 'STAFF_CERTIFICATION_EXPIRY_DATE' => _makeDateInput('', 'STAFF_CERTIFICATION_EXPIRY_DATE'), 'STAFF_CERTIFICATION_DESCRIPTION' => _makeContentInput('', 'STAFF_CERTIFICATION_DESCRIPTION'));
    //	$link['remove']['link'] = "Modules.php?modname=$_REQUEST[modname]&include=$_REQUEST[include]&category_id=$_REQUEST[category_id]&staff_id=".UserStaffID()."&modfunc=remove";
    $link['remove']['link'] = "Modules.php?modname={$_REQUEST['modname']}&include={$_REQUEST['include']}&category_id={$_REQUEST['category_id']}&modfunc=remove";
    $link['remove']['variables'] = array('id' => 'ID');
    ListOutputStaffCert($cert_RET, $columns, 'Certificate', 'Certificates', $link);
    //echo '<pre>';print_r($_REQUEST);echo '</pre>';
}
function _makeTextInput($value, $name)
{
    global $THIS_RET;
    if ($THIS_RET['ID']) {
        $id = $THIS_RET['ID'];
    } else {
        $id = 'new';
    }
    if ($name != 'TITLE') {
예제 #6
0
     echo '<TD style="width:100px">';
     //			echo _makeTextInput('CUSTOM_'.$field['ID'],$field['TITLE'],'size=5 maxlength=10 class=cell_floating');
     echo $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID'], '', 'size=5 maxlength=10 class=cell_floating');
     echo '</TD>';
     //			if($i%3==0)
     echo '</TR>';
     //			else
     //				echo '<TD width=50></TD>';
     //			$i++;
     break;
 case 'date':
     //			if(($i-1)%3==0)
     echo '<TR>';
     echo '<TD style="width:100px">';
     //			echo _makeDateInput('CUSTOM_'.$field['ID'],$field['TITLE']);
     echo $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeDateInput('CUSTOM_' . $field['ID'], '');
     echo '</TD>';
     //			if($i%3==0)
     echo '</TR>';
     //			else
     //				echo '<TD width=50></TD>';
     //			$i++;
     break;
 case 'codeds':
 case 'select':
     //			if(($i-1)%3==0)
     echo '<TR>';
     echo '<TD style="width:100px">';
     //			echo _makeSelectInput('CUSTOM_'.$field['ID'],$field['TITLE']);
     echo $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeSelectInput('CUSTOM_' . $field['ID'], '');
     echo '</TD>';
예제 #7
0
 }
 echo '</SELECT>';
 echo '</span><TABLE class="widefat cellspacing-0">';
 if (count($fields_RET['text'])) {
     foreach ($fields_RET['text'] as $field) {
         echo '<TR><TD style="text-align:right"><b>' . ParseMLField($field['TITLE']) . '</b></TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID']) . '</TD></TR>';
     }
 }
 if (count($fields_RET['numeric'])) {
     foreach ($fields_RET['numeric'] as $field) {
         echo '<TR><TD style="text-align:right"><b>' . ParseMLField($field['TITLE']) . '</b></TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID'], true) . '</TD></TR>';
     }
 }
 if (count($fields_RET['date'])) {
     foreach ($fields_RET['date'] as $field) {
         echo '<TR><TD style="text-align:right"><b>' . ParseMLField($field['TITLE']) . '</b></TD><TD>' . _makeDateInput('CUSTOM_' . $field['ID']) . '</TD></TR>';
     }
 }
 if (count($fields_RET['select'])) {
     foreach ($fields_RET['select'] as $field) {
         $select_options = array();
         $field['SELECT_OPTIONS'] = str_replace("\n", "\r", str_replace("\r\n", "\r", $field['SELECT_OPTIONS']));
         $options = explode("\r", $field['SELECT_OPTIONS']);
         if (count($options)) {
             foreach ($options as $option) {
                 if ($option != '') {
                     $select_options[$option] = $option;
                 }
             }
         }
         echo '<TR><TD style="text-align:right"><b>' . ParseMLField($field[TITLE]) . '</b></TD><TD>' . _makeSelectInput('CUSTOM_' . $field['ID'], $select_options) . '</TD></TR>';
예제 #8
0
     echo '<TD style="width:100px">';
     echo ($field['REQUIRED'] == 'Y' ? '<span class=red>*</span>' : '') . $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeAutoSelectInput('CUSTOM_' . $field['ID']);
     echo '</TD>';
     echo '</TR>';
     break;
 case 'numeric':
     echo '<TR>';
     echo '<TD style="width:100px">';
     echo ($field['REQUIRED'] == 'Y' ? '<span class=red>*</span>' : '') . $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeTextInput('CUSTOM_' . $field['ID'], '', 'size=5 maxlength=10 class=cell_floating');
     echo '</TD>';
     echo '</TR>';
     break;
 case 'date':
     echo '<TR>';
     echo '<TD style="width:100px">';
     echo ($field['REQUIRED'] == 'Y' ? '<span class=red>*</span>' : '') . $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeDateInput('CUSTOM_' . $field['ID'], '');
     echo '</TD>';
     echo '</TR>';
     break;
 case 'codeds':
 case 'select':
     echo '<TR>';
     echo '<TD style="width:100px">';
     echo ($field['REQUIRED'] == 'Y' ? '<span class=red>*</span>' : '') . $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeSelectInput('CUSTOM_' . $field['ID'], '');
     echo '</TD>';
     echo '</TR>';
     break;
 case 'multiple':
     echo '<TR>';
     echo '<TD style="width:100px">';
     echo ($field['REQUIRED'] == 'Y' ? '<span class=red>*</span>' : '') . $field['TITLE'] . '</TD><TD>:</TD><TD>' . _makeMultipleInput('CUSTOM_' . $field['ID'], '');