Esempio n. 1
0
                    <th>Должность</th>
                    <th>ФИО</th>
                    <th>Табельный</th>
                    <th>Пришел</th>
                    <th>Ушел</th>
                </tr>
            </thead>  
            <tbody>
<?php 
    while ($myrow = mysqli_fetch_array($result)) {
        $fio = $myrow["fio"];
        $tabnumber = $myrow["tabnumber"];
        $ori_id = $myrow["ori_id"];
        $u->post = "";
        $u->jpegphoto = "noimage.jpg";
        $u->GetByCode($tabnumber);
        $ent_time = GetEnterTime($ori_id);
        $exit_time = GetExitTime($ori_id);
        if ($ent_time == $exit_time) {
            $exit_time = '-';
        }
        if ($ent_time != '-' or $exit_time != '-') {
            $num++;
            echo "            \n                                        <tr>\n                                            <td>{$num}</td>\n                                            <td><img src='photos/{$u->jpegphoto}' width='100px' height='100px'></td>                          \n                                            <td>{$fio}</td>\n                                            <td>{$u->post}</td>\n                                            <td>{$tabnumber}</td>                                                \n                                            <td>{$ent_time}</td>\n                                            <td>{$exit_time}</td>\n                             </tr>";
        }
    }
    ?>
        </tbody>             
        </table>
<?php 
}
Esempio n. 2
0
include_once "../../../inc/connect.php";
// соеденяемся с БД, получаем $mysql_base_id
include_once "../../../inc/config.php";
// подгружаем настройки из БД, получаем заполненый класс $cfg
include_once "../../../inc/functions.php";
// загружаем функции
include_once "../../../inc/login.php";
// загружаем функции
if (file_exists('../../../import/employees.xml')) {
    $xml = simplexml_load_file('../../../import/employees.xml');
    //echo "<table class='table table-hover'> <thead><tr><th>Фото</th><th>ФИО/Должность</th><th>Фаза</th></tr></thead><tbody>";
    $ts = new Tusers();
    foreach ($xml->employees as $em) {
        if ($em->faza != "Работает" and $em->faza != "В отпуске по уходу за ребенком") {
            //var_dump($em);
            $ts->GetByCode($em->code);
            $photo = "client/view/themes/{$cfg->theme}/noimage.jpg";
            if ($ts->jpegphoto != "") {
                $photo = "photos/{$ts->jpegphoto}";
            }
            echo "<div class='row-fluid'>";
            echo "<div class='span2'>\n                  <ul class='thumbnails'>\n                    <li class='span12'>\n                        <a href='#' class='thumbnail'>\n                            <img src='{$photo}' alt=''>\n                        </a>\n                    </li> \n                </ul>";
            echo "</div>";
            echo "<div class='span8'>";
            echo "<h4>{$em->fio}</h4>";
            echo "<p class='text-info'>{$em->post}<br>";
            echo "{$em->faza} до {$em->enddate}</p>";
            echo "</div>";
            echo "</div>";
            //            echo "<tr><td>
            //            <ul class='thumbnails'>