Example #1
0
include_once $site_full . CLS . DB . 'SQL_Class.php';
$sql_voyager = new SQL_Class();
// Массив всех врачей
$temp_doctors = $sql_voyager->GetDoctorsArray();
$temp_number = count($temp_doctors);
// Убрать в массиве повторяющихся врачей
$all_doctors = array();
$doc_number = 0;
while ($temp_number != 0) {
    $flag = TRUE;
    for ($j = 0; $j < $doc_number; $j++) {
        if ($all_doctors[$j]["id"] == $temp_doctors[0]["id"]) {
            $flag = FALSE;
            break;
        }
    }
    if ($flag) {
        $all_doctors[] = $temp_doctors[0];
        $doc_number = count($all_doctors);
    }
    $gabage = array_shift($temp_doctors);
    $temp_number = count($temp_doctors);
}
// Подключение класса вывода фото врача
include_once $site_full . CLS . MODL . 'DoctorView_Class.php';
for ($i = 0; $i < $doc_number; $i++) {
    $the_viewer = new DoctorView_Class($all_doctors[$i], $site_0);
    $the_viewer->Show();
    unset($the_viewer);
}
unset($sql_voyager);
Example #2
0
<?php

session_start();
// Подключение файла с путями и конфигурационного файла
//include_once htmlspecialchars($_SERVER['DOCUMENT_ROOT']).'/config/paths.php';
include_once htmlspecialchars($_SERVER['DOCUMENT_ROOT']) . '/NewConcept_detimediart/config/paths.php';
include_once $site_full . CONFIG . 'config.php';
// Подключение класса для работы с БД и создание экземпляра обработчика запросов к БД с подключением к БД
include_once $site_full . CLS . DB . 'DB_Class.php';
include_once $site_full . CLS . DB . 'SQL_Class.php';
$sql_voyager = new SQL_Class();
// Массив всех врачей
$all_doctors = $sql_voyager->GetDoctorsArray();
$this_doctor = array();
// Получение массива одного данного врача
foreach ($all_doctors as $doc) {
    if ($doc["id"] == $_SESSION["id"]["vrach"]) {
        $this_doctor = $doc;
        break;
    }
}
// Подключение класса вывода фото врача
include_once $site_full . CLS . MODL . 'DoctorView_Class.php';
$doctor_viewer = new DoctorView_Class($this_doctor, $site_0);
echo '<br><br>А здесь будет контент с информацией какого-то одного конкретного врача<br><br><br>';
$doctor_viewer->MainShow();
unset($doctor_viewer);
unset($sql_voyager);