public function index()
 {
     ini_set('display_errors', 'Off');
     $this->view->title = 'Особистий кабінет';
     switch (SC::getSession('group')) {
         case 'abiturient':
             $this->view->title = 'Кафедра КІ';
             $this->view->meta_k = '<META NAME="Keywords" CONTENT="Кафедра КІ,Кафедра КІ ТНЕУ ,компютерна інженерія,кафедра КІ ФКІТ,Графіка">';
             $this->view->meta_d = '<META NAME="Description" CONTENT="Кафедра КІ, головна.">';
             $this->view->css = array('menu');
             $this->view->js = array('guestbook/guestbook');
             $this->view->render('abiturient/index');
             break;
         case 'lector':
             $this->view->title = 'Кафедра КІ';
             $this->view->meta_k = '<META NAME="Keywords" CONTENT="Кафедра КІ,Кафедра КІ ТНЕУ ,компютерна інженерія,кафедра КІ ФКІТ,Графіка">';
             $this->view->meta_d = '<META NAME="Description" CONTENT="Кафедра КІ, головна.">';
             $this->view->css = array('menu');
             $this->view->doc = $this->model->getNumNewDoc();
             $this->view->render('lector/index');
             break;
         case 'admin':
             $this->view->css = array('menu');
             $this->view->render('admin/index');
             break;
     }
 }
 public function success()
 {
     $this->view->title = 'Налаштування';
     $this->view->alert = 'Налаштування успішно збережено';
     $this->view->data = $this->model->getUserInfo(SC::getSession('id'));
     $this->view->render('userSettings/index');
 }
 public function getNumNewDoc()
 {
     if (SC::getSession('group') == 'lector') {
         $current_date = date('Y-m-d');
         $e = $this->db->select('lab_documents', '*', ' date > ' . $current_date . '');
         $e = $this->db->getCount();
     } else {
         $e = null;
     }
     return $e;
 }
 public function addElementscheck($data, $data_1)
 {
     $data['name'] = addslashes(strip_tags(trim($data['name'], ' ')));
     unset($data['type']);
     $errors = null;
     $date = date("Y-m-d");
     $uploaddir = 'public/lab_documents/';
     $upfile = basename($_FILES['file']['name']);
     $last = end(explode(".", $upfile));
     $blacklist = array(".php", ".phtml", ".php3", ".php4");
     foreach ($blacklist as $item) {
         if (preg_match("/{$item}\$/i", $_FILES['file']['name'])) {
             $errors .= '<span class="glyphicon glyphicon-remove-circle"></span>&nbsp;Некоректний формат файлу <br />';
         }
     }
     $uploadfile = $uploaddir . $date . '.' . $last;
     $img_name = $this->excep($last);
     $data["date"] = $date;
     $data["file_img"] = $img_name;
     if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) {
         $img = $uploadfile;
         $data["file"] = $img;
     } else {
         $errors .= '<span class="glyphicon glyphicon-remove-circle"></span>&nbsp;При завантаженні сталась помилка<br />';
     }
     if (empty($data['name'])) {
         $errors .= '<span class="glyphicon glyphicon-remove-circle"></span>&nbsp;Усі поля повинні бути заповнені!<br />';
     }
     if ($errors != null) {
         return $errors;
     }
     if ($this->db->insert('lab_documents', $data) == 1) {
         $n_id = $this->db->lastInsertId('lab_documents');
         header('location: ' . URL . '?c=manageLabDoc&f=show');
         Statistics::documents(3, SC::getSession("id"), $data['name'], 1);
     } else {
         header('location: ' . URL . '?c=manageLabDoc&f=error');
     }
 }
<ol class="breadcrumb">
  <li class="active">Видалення запису</li>
</ol>

<?php 
if (SC::getSession('group') == 'admin' or SC::getSession('group') == 'lector') {
    ?>
<div class="essential">
    <div class="row">
        <div class="col-xs-12 col-sm-11 col-md-11 col-lg-7">
            <center>
                <h5>
                    Ви справді бажаєте видалити цей запис"<b>  <?php 
    print $this->data[0]['name'];
    ?>
 </b>" ?
                 </h5></br></br>
                <p>
                    <a  class="btn btn-success" role="button"  href="?c=manageLabDoc&f=checkFileDelete&p=<?php 
    print $this->data[0]['id'];
    ?>
" >Так</a>
                    <a  class="btn btn-danger" role="button"  href="?c=manageLabDoc&f=show" >Ні</a>
                </p>
            </center>
        </div>
    </div>
</div>
<?php 
}
 private function add_new_article($data)
 {
     $data['text'] = addslashes(strip_tags(trim($data['text'], ' ')));
     $data['en_text'] = addslashes(strip_tags(trim($data['en_text'], ' ')));
     $data['author_id'] = SC::getSession('id');
     $data['href'] = addslashes(strip_tags(trim($data['href'], ' ')));
     $data['year_id'] = $data['year_id'];
     if ($this->db->insert('bio_gr_articles', $data) == 1) {
         $n_id = $this->db->lastInsertId('bio_gr_articles');
         /*
          * Додавання запису в статистику
          */
         //Statistics::add ( 1, SC::getSession( 'id' ), $n_id );
         header('location: ' . URL . '?c=manageResearch&f=show');
     } else {
         header('location: ' . URL . '?c=manageResearch&f=error');
     }
 }
Esempio n. 7
0
    <div class="overlay" id="overlay">
        <div class="wrap"></div>
    </div>

    <?php 
for ($i = 0; $i < count($days); $i++) {
    print '
            <table class="table table-condensed table-bordered table-hover" border="1">
                <thead>
                    <tr  class="success" >
                        <th scope="col">' . $days[$i] . '</th>
                        <th scope="col">8:00</th>
                        <th scope="col">9:35</th>
                        <th scope="col">11:10</th>
                        <th scope="col">12:50</th>
                        <th scope="col">14:25</th>
                        <th scope="col">16:00</th>
                        <th scope="col">17:25</th>
                    </tr>
                </thead>
                <tbody>';
    if (SC::getSession('group') == 'admin') {
        $obj = new TimeTableStudents('group_id', $_GET['p'], $i + 1, "sub");
        print $obj->getOneDayContentForAdmin();
    } else {
        print 'Немає доступу';
    }
    print '
                </tbody>
            </table>';
}
 public function check_create_comm_teacher($data)
 {
     $data['text'] = addslashes(strip_tags(trim($data['text'], ' ')));
     $data['teacher_id'] = $data['teacher_id'];
     $data['day'] = $data['day'];
     $data['count'] = $data['count'];
     $data['par'] = $data['par'];
     $data['group_id'] = 0;
     $kurs_id = SC::getSession('kurs_id');
     if ($this->db->insert('temp_rozklad_subjects', $data) == 1) {
         $n_id = $this->db->lastInsertId('temp_rozklad_subjects');
         header('location: ' . URL . '?c=showTimeTable&f=showOneTeacher&p=' . $data['teacher_id'] . '');
     } else {
         header('location: ' . URL . '?c=showTimeTable&f=error');
     }
 }
Esempio n. 9
0
width:80%;
padding:5px;
border: 3px solid #75bfd1;
 -webkit-border-radius:3px; 
 background:#c2f2ea;
}
.coment:hover
{
padding:5px;
border: 3px solid white;
-webkit-border-radius:3px;
background:#75bfd1;
}
</style>
<?php 
$u = $this->data;
?>
<ol class="breadcrumb">
    <li class="active"><?php 
print $u[0]['title'];
?>
</li>
</ol>

            <?php 
print $u[0]['text'];
print '<br/><br/> ';
$gro = SC::getSession('group');
?>

Esempio n. 10
0
<ol class="breadcrumb">
  <li><a href="<?php 
print URL;
?>
">Кабінет</a></li>
  <li><a href="<?php 
print URL;
?>
?c=manageRozklads&f=show">Розклад(курси)</a></li>
  <li><a href="<?php 
print URL;
?>
?c=manageRozklads&f=showSomeGroups&p=<?php 
print SC::getSession('kurs_id');
?>
">Розклад(групи)	</a></li>
  <li class="active">Редагування </li>
</ol>

<div class="row">
    <div class="col-xs-12 col-sm-6 col-md-6 col-lg-8">
        <form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" action="<?php 
print URL;
?>
?c=manageRozklads&f=checkEditing_group">

<?php 
$class = '';
$error = '';
$errors = '';
if (isset($this->error[$v[1]])) {
 /**
  * Функція для редагування користувача
  * 
  * @param array $data Дані для додавання
  */
 private function edit_user($data)
 {
     $id = $data['id'];
     unset($data['id']);
     /*
      * Шифрування паролю
      */
     if ($data['password'] != '') {
         $data['password'] = Hash::getHash($data['password']);
     } else {
         unset($data['password']);
     }
     $data['name'] = strip_tags(trim($data['name'], ' '));
     $data['surname'] = strip_tags(trim($data['surname'], ' '));
     $data['fathername'] = strip_tags(trim($data['fathername'], ' '));
     /*
      * Видалення непотрібних елементів масиву
      */
     unset($data['login']);
     unset($data['re_password']);
     unset($data['email']);
     /*
      * Додавання додаткових елементів масиву
      */
     $data['date'] = time();
     if ($this->db->update('users', $data, "id='{$id}'")) {
         /*
          * Додавання запису в статистику
          */
         Statistics::add(4, SC::getSession('id'));
     }
     header('location: ' . URL . '?c=userSettings&f=success');
 }
 public function delete($id)
 {
     $teacher_id = SC::getSession('id');
     $this->db->delete('research_events_teacher', "teacher_id={$teacher_id}");
     header('Location: ' . URL . '?c=showResearchPublication&f=show');
 }
 /**
  * @param $data
  * function to copy subject to another place
  * $data['action_flag']:
  * 1 - to top
  * 2 - to left
  * 3 - to right
  * 4 - to bottom
  */
 public function move_subject_down($data)
 {
     $data['day'] = addslashes(strip_tags(trim($data['day'], ' ')));
     $data['par'] = addslashes(strip_tags(trim($data['par'], ' ')));
     $data['count'] = addslashes(strip_tags(trim($data['count'], ' ')));
     $data['group_id'] = SC::getSession('group_id');
     $data['name'] = $this->getSubjectById($data['day'], $data['par'], $data['count'], $data['group_id']);
     $data['teacher_id'] = $this->getTeacherById($data['day'], $data['par'], $data['count'], $data['group_id']);
     $data['lab'] = $this->getLaboratoryById($data['day'], $data['par'], $data['count'], $data['group_id']);
     $data['less_type_id'] = $this->getLessonTypeById($data['day'], $data['par'], $data['count'], $data['group_id']);
     if ($data['action_flag'] == 1) {
         $data['par'] = $data['par'] - 1;
     } elseif ($data['action_flag'] == 2) {
         $data['count'] = $data['count'] - 1;
     } elseif ($data['action_flag'] == 3) {
         $data['count'] = $data['count'] + 1;
     } elseif ($data['action_flag'] == 4) {
         $data['par'] = $data['par'] + 1;
     }
     unset($data['action_flag']);
     if ($this->db->insert('rozklad_subjects', $data) == 1) {
         $n_id = $this->db->lastInsertId('rozklad_subjects');
         header('location: ' . URL . '?c=manageRozklads&f=showGroup&p=' . $data['group_id'] . '');
     } else {
         header('location: ' . URL . '?c=manageRozklads&f=error');
     }
 }
 public function delete($id)
 {
     $res = $this->db->select('articles', 'title', "`id`='{$id}'");
     $this->db->delete('articles', "`id`='{$id}'");
     header('Location: ' . URL . '?c=manageCafedra&f=show');
     Statistics::articles(2, SC::getSession("id"), $res[0]['title']);
 }
 public function delete($id)
 {
     Statistics::add(3, SC::getSession('id'), $id);
     $this->db->delete('teachers', "`id`='{$id}'");
     header('Location: ' . URL . '?c=manageTc&f=show');
 }
 /**
  * Функція для редагування користувача
  * 
  * @param array $data Дані для додавання
  */
 private function edit_user($data)
 {
     $id = $data['id'];
     unset($data['id']);
     $data['login'] = addslashes(strip_tags(trim($data['login'], ' ')));
     /*
      * Шифрування паролю
      */
     if ($data['password'] != '') {
         $data['password'] = Hash::getHash($data['password']);
     } else {
         unset($data['password']);
     }
     $data['name'] = strip_tags(trim($data['name'], ' '));
     $data['surname'] = strip_tags(trim($data['surname'], ' '));
     $data['fathername'] = strip_tags(trim($data['fathername'], ' '));
     $data['email'] = strip_tags(trim($data['email'], ' '));
     $data['telephone'] = strip_tags(trim($data['telephone'], ' '));
     $data['birthday'] = strip_tags(trim($data['birthday'], ' '));
     $data['region'] = strip_tags(trim($data['region'], ' '));
     $data['district'] = strip_tags(trim($data['district'], ' '));
     $data['hometown'] = strip_tags(trim($data['hometown'], ' '));
     /*
      * Видалення непотрібних елементів масиву
      */
     unset($data['re_password']);
     /*
      * Додавання додаткових елементів масиву
      */
     $data['date'] = time();
     if ($this->db->update('users', $data, "id='{$id}'")) {
         /*
          * Додавання запису в статистику
          */
         Statistics::add(2, SC::getSession('id'), $id);
     }
     header('location: ' . URL . '?c=manageUsers&f=show');
 }
Esempio n. 17
0
     */
    include "config.php";
    include "core/comment.class.php";
    $res = mysql_query("SELECT * FROM `comm` WHERE article_id={$article_id} ORDER BY `id` DESC LIMIT 10");
    $articles = array();
    while ($row = mysql_fetch_assoc($res)) {
        $articles[] = new Comment($row);
    }
    ?>

    <div id="addCommentContainer">
        <p></p>
        <form id="addCommentForm" method="post" action="">
            <div>
                <input type="hidden" name="name" id="name" value="<?php 
    print SC::getSession('login');
    ?>
" />
                <input type="hidden" name="article_id" id="article_id"  value="<?php 
    print $_GET['p'];
    ?>
" />
                <input type="hidden" name="email" id="email"  value="*****@*****.**" />
                <input type="hidden" name="url" id="url"  value="oleh" />
                <textarea name="body" id="body" cols="20" rows="5"></textarea>
                <input type="submit" id="submit" value="&#1044;&#1086;&#1076;&#1072;&#1090;&#1080;" />
            </div>
        </form>
    </div>

    <div id="articles">
Esempio n. 18
0
 /**
  * &#1060;&#1091;&#1085;&#1082;&#1094;&#1110;&#1103; &#1076;&#1083;&#1103; &#1087;&#1077;&#1088;&#1077;&#1074;&#1110;&#1088;&#1082;&#1080; &#1087;&#1088;&#1072;&#1074; &#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1091;&#1074;&#1072;&#1095;&#1072;
  * 
  * @param string $page &#1053;&#1072;&#1079;&#1074;&#1072; &#1089;&#1090;&#1086;&#1088;&#1110;&#1085;&#1082;&#1080;
  * @param bool $loginUser &#1063;&#1080; &#1079;&#1072;&#1083;&#1086;&#1075;&#1110;&#1085;&#1077;&#1085;&#1080;&#1081; &#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1091;&#1074;&#1072;&#1095;
  * @return string &#1057;&#1090;&#1086;&#1088;&#1110;&#1085;&#1082;&#1072;, &#1103;&#1082;&#1091; &#1084;&#1086;&#1078;&#1085;&#1072; &#1074;&#1110;&#1076;&#1082;&#1088;&#1080;&#1090;&#1080;
  */
 public static function checkRights($page)
 {
     $loginUser = self::check();
     /** &#1055;&#1077;&#1088;&#1077;&#1074;&#1110;&#1088;&#1082;&#1072; &#1087;&#1088;&#1072;&#1074; &#1076;&#1086;&#1089;&#1090;&#1091;&#1087;&#1091; * */
     /*
      * &#1042;&#1089;&#1090;&#1072;&#1085;&#1086;&#1074;&#1083;&#1077;&#1085;&#1085;&#1103; &#1075;&#1088;&#1091;&#1087;&#1080; &#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1091;&#1074;&#1072;&#1095;&#1072;
      */
     if ($loginUser == 0) {
         $group = 'guest';
     } elseif ($loginUser == 0 and $_GET['c'] == 'cabinet') {
         return 'index';
     } else {
         if ($loginUser == 1 && SC::getSession('group') != 'admin') {
             $group = SC::getSession('group');
         } else {
             if ($page == null) {
                 return 'cabinet';
             } else {
                 return $page;
             }
         }
     }
     /*
      * &#1047;&#1072;&#1087;&#1080;&#1089; &#1084;&#1072;&#1089;&#1080;&#1074;&#1091; &#1089;&#1090;&#1086;&#1088;&#1110;&#1085;&#1086;&#1082; &#1076;&#1086;&#1089;&#1090;&#1091;&#1087;&#1085;&#1080;&#1093; &#1076;&#1083;&#1103; &#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1091;&#1074;&#1072;&#1095;&#1110;&#1074;
      */
     $rights = array('lector' => array('manageUsers', 'statistics', 'manageCafedra', 'manageTc', 'manageAboutCafedra', 'manageGallery', 'manageGroup', 'manageImages', 'manageMenu', 'managePages', 'manageRozklad', 'manageSlider', 'manageSubjects', 'manageTeachers', 'admin', 'manageDiscussion', 'manageEvents', 'manageGraduates', 'manageHeand', 'manageAbiturients', 'manageRT', 'registration', 'Roz', 'manageUp'), 'abiturient' => array('manageUsers', 'statistics', 'testadmin', 'manageTests', 'manageCafedra', 'manageTc', 'manageAboutCafedra', 'manageGallery', 'manageGroup', 'manageImages', 'manageMenu', 'manageMetod', 'manageNews', 'managePages', 'manageRozklad', 'manageSlider', 'manageSubjects', 'manageTeachers', 'admin', 'manageDiscussion', 'manageEvents', 'manageGraduates', 'manageHeand', 'manageAbiturients', 'manageLabDoc', 'manageGuestBook', 'manageHeand', 'manageRozklad', 'manageRozkladsTeachers', 'manageRT', 'registration', 'Roz', 'manageResearch', 'manageUp'), 'guest' => array('manageUsers', 'statistics', 'testadmin', 'manageTests', 'cabinet', 'userSettings', 'manageCafedra', 'manageTc', 'manageAboutCafedra', 'manageGallery', 'manageGroup', 'manageImages', 'manageMenu', 'manageMetod', 'manageNews', 'managePages', 'manageRozklads', 'manageSlider', 'manageAbiturients', 'manageSubjects', 'manageTeachers', 'manageTests', 'manageGraduates', 'manageGuestBook', 'manageHeand', 'manageRozklad', 'manageRozkladsTeachers', 'manageRT', 'testsResult', 'testing', 'showMetod', 'manageLabDoc', 'showLabDoc', 'Roz', 'showDiscussion', 'manageResearch', 'manageUp'));
     foreach ($rights[$group] as $k => $v) {
         if ($page == null) {
             if ($loginUser == 0) {
                 return 'index';
             } else {
                 return 'cabinet';
             }
         }
         /*
          * &#1057;&#1090;&#1086;&#1088;&#1110;&#1085;&#1082;&#1072; &#1079;&#1072;&#1073;&#1086;&#1088;&#1086;&#1085;&#1077;&#1085;&#1072; &#1076;&#1083;&#1103; &#1082;&#1086;&#1088;&#1080;&#1089;&#1090;&#1091;&#1074;&#1072;&#1095;&#1072;
          */
         if ($page == $v) {
             header('Location: ' . URL . '?c=error403');
             exit;
         }
     }
     return $page;
 }
 private function edit_user($data)
 {
     $id = $data['id'];
     $id = addslashes(strip_tags(trim($id)));
     $id = (int) filter_var(abs($id), FILTER_SANITIZE_NUMBER_INT);
     if ($id == null or $id == 0) {
         header('location: ' . URL);
     }
     unset($data['id']);
     $data['autor'] = SC::getSession('login');
     $data['text'] = addslashes(strip_tags(trim($data['text'], ' ')));
     /*
      * Додавання додаткових елементів масиву
      */
     $data['date'] = date('Y-m-d');
     if ($this->db->update('news', $data, "id='{$id}'")) {
     }
     header('location: ' . URL . '?c=manageNews&f=show');
     Statistics::articles(4, SC::getSession("id"), $data['text']);
 }
Esempio n. 20
0
 /**
  * @param $data
  * private function for check user input data
  */
 private function edit_test($data)
 {
     $count_questions = $data['count_questions'];
     $data['question_id'];
     for ($i = 0; $i < $count_questions - 1; $i++) {
         $g = $data['question_id' . $i . ''];
         $r = $this->db->select('test', 'test_type, right_answer', "`id`='{$g}'");
         $unique_user = SC::getSession('unique_user');
         if (gettype($data['answer' . $i . '']) != 'array') {
             if ($r[0]['right_answer'] == $data['answer' . $i . '']) {
                 $result = 1;
             } else {
                 $result = 0;
             }
         } else {
             $right = unserialize($r[0]['right_answer']);
             $ans = $data['answer' . $i . ''];
             if ($r[0]['test_type'] == "order") {
                 $count_order = 0;
                 for ($o = 0; $o < count($ans); $o++) {
                     if ($ans[$o] == $right[$o]) {
                         $count_order++;
                     }
                 }
                 $result = $count_order / count($right);
                 $data['ans_' . $i . ''] = $result;
                 unset($_SESSION['ans_' . $i . '']);
                 SC::setSession('ans_' . $i . '', $result);
             } else {
                 $result1 = array();
                 foreach ($ans as $v) {
                     if (in_array($v, $right) && !in_array($v, $result1)) {
                         array_push($result1, $v);
                     }
                 }
                 $right1 = count($result1);
                 $rans_count = count($right);
                 $result = $right1 / $rans_count;
             }
         }
         $data['ans_' . $i . ''] = $result;
         unset($_SESSION['ans_' . $i . '']);
         SC::setSession('ans_' . $i . '', $result);
     }
     $final_ocinka = $this->getResult($count_questions);
     unset($_SESSION['redsultOfTest']);
     SC::setSession('redsultOfTest', $final_ocinka);
     $n_data['result'] = $final_ocinka;
     $n_data['unique_user'] = SC::getSession('unique_user');
     $un = $n_data['unique_user'];
     $n_data['date'] = date('Y-m-d H:i:s');
     $this->db->update('tests_result', $n_data, "`unique_user`='{$un}'");
     header('location: ' . URL . '?c=testing&f=showResult');
 }
Esempio n. 21
0
</div>
</div>
<div class="modal fade" id="basicModal" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header"><button class="close" type="button" data-dismiss="modal">x</button>
                <h4 class="modal-title" id="myModalLabel">Задати питання</h4>
            </div>
            <div class="modal-body">
                <div class="form-group''">
                    <form  enctype="multipart/form-data" role="form" method="post" id="form_id"  action="">
                        <div class="form-group">
                            <div class="panel-body">
                                <div class="col-xs-9 col-sm-10 col-md-10 col-lg-7"> <br/>
                                    <input type="hidden" id="name" name="name" value="<?php 
print SC::getSession('id');
?>
" /></br>
                                    <input type="text" id="email" name="email" placeholder="Email *" class="form-control" /></br>
                                    <textarea rows="4" cols="37" id="text" name="text" placeholder="Текст *"></textarea>

                                </div> <br /><br /><br>
                            </div>
                        </div>
                        <div class="form-group"><br/><br/>
                            <input type="button" class="btn btn-success" value="Відправити" onclick="checkForm('result_div_id', 'form_id', '<?php 
print URL;
?>
?c=guestBook&f=show')" >
                            <div class="col-xs-9 col-sm-8 col-md-6 col-lg-4 col-xs-offset-3 col-sm-offset-2 col-md-offset-2 col-lg-offset-2">
                                <div style=" width: 90%; height: 180px; padding: 5px;" id="result_div_id">
 private function add_new_test($data)
 {
     $id_user = SC::getSession('id');
     $data['user_id'] = $id_user;
     $data['date'] = date('Y-m-d');
     if ($this->db->insert('tests', $data) == 1) {
         $n_id = $this->db->lastInsertId('tests');
         //Statistics::add ( 1, SC::getSession( 'id' ), $n_id );
         header('location: ' . URL . '?c=testadmin&f=success');
     } else {
         header('location: ' . URL . '?c=testadmin&f=error');
     }
 }
Esempio n. 23
0
    print '
            <table class="table table-condensed table-bordered table-hover" border="1" >
                <thead>
                    <tr  class="active" >
                        <th scope="col">' . $days[$i] . '</th>
                        <th scope="col">8:00</th>
                        <th scope="col">9:35</th>
                        <th scope="col">11:10</th>
                        <th scope="col">12:50</th>
                        <th scope="col">14:25</th>
                        <th scope="col">16:00</th>
                        <th scope="col">17:25</th>
                    </tr>
                </thead>
                <tbody>';
    $status = "sub";
    if (SC::getSession('group') == 'lector') {
        $obj = new TimeTableStudents('group_id', $s_id, $i + 1, $status);
        print $obj->getOneDayContentForLector();
    } else {
        $obj = new TimeTableStudents('group_id', $s_id, $i + 1, $status);
        print $obj->getOneDayContent();
    }
    print '
                </tbody>
            </table>
            ';
}
?>
        </div>
 private function edit_teachers($data, $data_1)
 {
     $id = $data['id'];
     unset($data['id']);
     $data['surname'] = addslashes(strip_tags(trim($data['surname'], ' ')));
     $data['name'] = strip_tags(trim($data['name'], ' '));
     $data['fathername'] = strip_tags(trim($data['fathername'], ' '));
     $data['post'] = strip_tags(trim($data['post'], ' '));
     $data['degree'] = strip_tags(trim($data['degree'], ' '));
     $data['e-mail'] = strip_tags(trim($data['e-mail'], ' '));
     $data['birth_date'] = $data['birth_date'];
     $data['scholar'] = $data['scholar'];
     if (is_uploaded_file($data_1["filename"]["tmp_name"])) {
         $r = rand(1, 200);
         $date = date("Ymdhs");
         $new_file_name = $r . $date;
         move_uploaded_file($data_1["filename"]["tmp_name"], "public/teachers/" . $new_file_name . '.jpg');
         $img = 'public/teachers/' . $new_file_name . '.jpg';
         $data["img"] = $img;
     } else {
     }
     if ($this->db->update('teachers', $data, "id='{$id}'")) {
         /*
          * Додавання запису в статистику
          */
         Statistics::add(2, SC::getSession('id'), $id);
     }
     header('location: ' . URL . '?c=manageTeachers&f=show');
 }
Esempio n. 25
0
    <?php 
$doc = $this->doc;
Menu::add("Мої документи", "?c=manageMetod&f=show", "files.png");
Menu::add("Додати новину", "?c=manageNews&f=show", "copy-1.png");
Menu::add("Редагувати розклад", "?c=showTimeTable", "notepad.png");
Menu::add("Перегляд тестів", "?c=testadmin", "list-view.png");
Menu::add("(" . $doc . ") Розпорядження, накази ...", "?c=showLabDoc", "list-view.png");
if (SC::getSession("login") == "stlaborant") {
    Menu::add("Додати розпорядження, накази ...", "?c=manageLabDoc&f=show", "list-view.png");
}
if (SC::getSession("login") == "verbovyy" or SC::getSession("login") == "lector") {
    Menu::add("Наукова група", "?c=manageResearch&f=show", "dribbble-player.png");
}
print Menu::get();
?>

    </div>
</div>
    </br></br>