Exemplo n.º 1
0
                    </td>
                    <td class="col2">                        
                        <?php 
$end_datetime_admission = $action == 'EDIT' ? $data['end_datetime_admission'] : '';
if ($action == 'INSERT') {
    $mcconfig = new MainCourse($registry[$nameDataBase]);
    $list_mcconfig = $mcconfig->getMainCourseConfigurationAll($action);
    $itemsSelect = array();
    foreach ($list_mcconfig as $item) {
        echo "<input type='checkbox' name='chk_cursos[]' id='chk_cursos' value=" . $item['pk_id_main_course'] . ">" . $item['description'] . "<br>";
    }
    echo '<br>';
}
if ($action == 'EDIT') {
    $mcconfig = new MainCourse($registry[$nameDataBase]);
    $list_mcconfig = $mcconfig->getMainCourseConfigurationAll($action);
    $itemsSelect = array();
    foreach ($list_mcconfig as $item) {
        $checked = null;
        foreach ($list_cap as $item_i) {
            if ($item_i['fk_id_main_course'] == $item['pk_id_main_course']) {
                $checked = 'checked';
            }
        }
        echo "<input type='checkbox' name='chk_cursos[]' id='chk_cursos' value=" . $item['pk_id_main_course'] . " " . $checked . ">" . $item['description'] . "<br>";
    }
    echo '<br>';
} elseif ($action == 'PREVIEW') {
    foreach ($list_cap as $item) {
        echo "<input type='checkbox' name='chk_cursos[]' id='chk_cursos' value=" . $item['fk_id_main_course'] . " disabled='true' checked>" . $item['description'] . "<br>";
    }
Exemplo n.º 2
0
?>
                                  <?php 
if ($action != 'PREVIEW') {
    ?>
 <span class="rojo_asterisco"></span><span class="rojo_esc">*</span><?php 
}
?>
                              </td>
                            </tr>
                             <tr>   
                              <td>ULTIMO CURSO VENCIDO:</td>
                              <td>
                                                              
                                    <?php 
$mcconfig = new MainCourse($registry[$nameDataBase]);
$catalogo = $mcconfig->getMainCourseConfigurationAll();
$itemsSelect = array();
foreach ($catalogo as $item) {
    $itemsSelect[$item['pk_id_main_course']] = $item['description'];
}
$itemsSelect['0'] = 'SELECCIONE UNA OPCION';
$curso_vencido = '';
if ($action == 'EDIT' || $action == 'PREVIEW') {
    $curso_vencido = $data['ultimo_curso_vencido'];
}
Forms::printInput('SELECT', 'curso_vencido', $curso_vencido, 'select_requerido', array(), $itemsSelect);
?>
                              <?php 
if ($action != 'PREVIEW') {
    ?>
 <span class="rojo_asterisco"></span><span class="rojo_esc">*</span><?php