public function info_onus_designate()
 {
     $session = new session_students();
     $id = $session->Get_id_user();
     $db = new data_base(tpl_onus_designate::onus_designate(), array(tpl_onus_designate::id(), tpl_onus_designate::id_degree(), tpl_onus_designate::id_models(), tpl_onus_designate::id_student(), tpl_onus_designate::id_onus(), data_base::select_multiple_table(tpl_onus::onus(), tpl_onus::onus() . '.' . tpl_onus::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_onus(), tpl_onus::name(), tpl_onus::onus() . '_' . tpl_onus::name()), data_base::select_multiple_table(tpl_onus::onus(), tpl_onus::onus() . '.' . tpl_onus::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_onus(), tpl_onus::description(), tpl_onus::onus() . '_' . tpl_onus::description()), data_base::select_multiple_table(tpl_degree::degree(), tpl_degree::degree() . '.' . tpl_degree::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_degree(), tpl_degree::name(), tpl_degree::degree() . '_' . tpl_degree::name())), array(tpl_onus_designate::id_student() => $id, tpl_onus_designate::status() => 1));
     return $db->get_where();
 }
 public function update_status()
 {
     $id = $_POST[tpl_degree::degree() . '_' . tpl_degree::id()];
     $status = $_POST[tpl_degree::degree() . '_' . tpl_degree::active()];
     $db = new data_base(tpl_degree::degree(), array(tpl_degree::active() => $status), array(tpl_degree::id() => $id));
     $results = $db->change();
     $status_data = $status == 1 ? 'active' : 'dative';
     if ($results) {
         echo json_encode(array('valid' => 1, 'title' => 'Successfully !!', 'massage' => 'I\'ve been Update ' . $status_data));
     } else {
         echo json_encode(array('valid' => 0, 'title' => 'Oops !!', 'massage' => 'Was not Update ' . $status_data . ', please try again'));
     }
 }
                        <th data-field="<?php 
echo tpl_onus::onus() . '_' . tpl_onus::name();
?>
"
                            data-halign="center" data-sortable="true">onus name
                        </th>

                        <th data-field="<?php 
echo tpl_students::students() . '_' . tpl_students::first_name();
?>
"
                            data-halign="center" data-sortable="true">students name
                        </th>

                        <th data-field="<?php 
echo tpl_degree::degree() . '_' . tpl_degree::name();
?>
"
                            data-halign="center" data-sortable="true">degree name
                        </th>

                        <th data-field="<?php 
echo tpl_companies::companies() . '_' . tpl_companies::name();
?>
"
                            data-halign="center" data-sortable="true">companies name
                        </th>

                        <th data-field="<?php 
echo tpl_onus_designate::status();
?>
 public function count_degree()
 {
     $db = new data_base(tpl_degree::degree(), array(tpl_degree::id()), array(tpl_degree::active() => 1));
     return count($db->get_where());
 }
                    </thead>
                    <tbody>
                    <?php 
    foreach ($lib->info_onus_designate($row[tpl_students::id()]) as $rows) {
        ?>
                        <tr>
                            <td><?php 
        echo $rows[tpl_onus::onus() . '_' . tpl_onus::name()];
        ?>
</td>
                            <td><?php 
        echo $rows[tpl_onus::onus() . '_' . tpl_onus::description()];
        ?>
</td>
                            <td><?php 
        echo $rows[tpl_degree::degree() . '_' . tpl_degree::name()];
        ?>
</td>
                        </tr>
                    <?php 
    }
    ?>
                    </tbody>
                </table>

            </div>
            <?php 
}
?>
        </div>
    </div>
 public function info_onus_designate($id = null)
 {
     $db = new data_base(tpl_onus_designate::onus_designate(), array(tpl_onus_designate::id(), tpl_onus_designate::id_degree(), tpl_onus_designate::id_models(), tpl_onus_designate::id_student(), tpl_onus_designate::id_onus(), data_base::select_multiple_table(tpl_onus::onus(), tpl_onus::onus() . '.' . tpl_onus::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_onus(), tpl_onus::name(), tpl_onus::onus() . '_' . tpl_onus::name()), data_base::select_multiple_table(tpl_onus::onus(), tpl_onus::onus() . '.' . tpl_onus::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_onus(), tpl_onus::description(), tpl_onus::onus() . '_' . tpl_onus::description()), data_base::select_multiple_table(tpl_degree::degree(), tpl_degree::degree() . '.' . tpl_degree::id(), tpl_onus_designate::onus_designate() . '.' . tpl_onus_designate::id_degree(), tpl_degree::name(), tpl_degree::degree() . '_' . tpl_degree::name())), array(tpl_onus_designate::id_student() => $id));
     return $db->get_where();
 }
 public function find_degree()
 {
     $db = new data_base(tpl_degree::degree(), array(tpl_degree::id(), tpl_degree::name()), array(tpl_degree::active() => 1));
     $data = $db->get();
     $w = '';
     foreach ($data as $row) {
         $w = $w . '<option value="' . $row[tpl_degree::id()] . '">' . $row[tpl_degree::name()] . '</option>';
     }
     return $w;
 }
echo tpl_degree::degree() . '_' . tpl_degree::name() . '_update';
?>
"/>
                    </div>

                    <div class="form-group">
                        <label for=""><?php 
echo tpl_degree::star_number() . ' ' . tpl_degree::degree();
?>
 : </label>
                        <input type="text" class="form-control"
                               id="<?php 
echo tpl_degree::degree() . '_' . tpl_degree::star_number() . '_update';
?>
"
                               name="<?php 
echo tpl_degree::degree() . '_' . tpl_degree::star_number() . '_update';
?>
"/>
                    </div>

                    <button type="submit" class="btn btn-success" id="update" name="update">Save</button>
                </form>
                </br>
                </br>
                <div class="" id="result_massages_update"></div>
            </div>
        </div>
    </div>
</div>