Ejemplo n.º 1
0
            // ошибка undefined variable search_query
            $query_control = "SELECT protocol_details.id as details_id,protocol_details.section_id,protocol_details.text_content,\n\t\t\t \tkadri.fio_short FROM protocol_details \n\t\t\t \tleft join  kadri on kadri.id=protocol_details.kadri_id \n\t\t\twhere protocol_id='" . $tmpval['id'] . "' and on_control=1 ";
            if (isset($search_query)) {
                $query_control .= $search_query;
            }
            $query_control .= " order by section_id,kadri_id ASC limit 0,20";
            // </abarmin>
            //echo $query_control;
            $res_control = mysql_query($query_control);
            while ($a_control = mysql_fetch_array($res_control)) {
                echo '' . $a_control['section_id'] . ' <b>' . $a_control['fio_short'] . '</b> ' . substr($a_control['text_content'], 0, strpos($a_control['text_content'], ' ', 40)) . '' . '<a href="?item_id=' . $tmpval['id'] . '&type=edit#detailsId_' . $a_control['details_id'] . '" title="перейти к пункту для правки"> <b>... -></b></a><br style="font-size:2pt;"><br style="font-size:2pt;">';
            }
            //echo $query;
            echo '&nbsp;</td>';
            echo '<td class="notinfo">&nbsp;' . echoIf(intval($tmpval['trip_cnt']) > 0, intval($tmpval['trip_cnt']), '') . '</td>';
            echo '<td class="notinfo">&nbsp;' . echoIf(intval($tmpval['asp_cnt']) > 0, intval($tmpval['asp_cnt']), '') . '</td>';
            echo '<td class="notinfo">&nbsp;' . $tmpval['comment'] . '</td>';
        }
    }
    ?>
</table></form>
<?php 
    //---------------------------------конец списочная форма -------------------------------------------------
    //постраничный вывод списка данных о протоколе (по 10)
    /*if (isset($filtr) & $filtr!=0) {$query='select id from items_dep where items_type="'.$filtr.'"';}
    else {$query='select id from items_dep';}
    */
    //echo $query;
    /*
    $res=mysql_query($query);
    //$pages_cnt=floor(mysql_num_rows($res)/$pgVals)+1;
Ejemplo n.º 2
0
                               LEFT OUTER JOIN
                                  subjects subjects
                               ON (subjects.id = sa.subject_id)                           
						LEFT OUTER JOIN
                              kadri kadri
                           ON (kadri.id = sa.kadri_id)
                       LEFT OUTER JOIN
                          users users
                       ON (kadri.id = users.kadri_id)
                   LEFT OUTER JOIN
                      study_marks sm
                   ON (sm.id = sa.study_mark)               
       LEFT OUTER JOIN
          study_act study_act
       ON (study_act.id = sa.study_act_id)  
	   where sa.student_id=' . $student_id . ' and ' . echoIf($archiv == 'on', 'sa.date_act<"' . $def_settings['date_start'] . '"', '(sa.date_act>="' . $def_settings['date_start'] . '" or sa.date_act is null)') . ' ';
            $query .= " order by " . $sort . " " . $stype . " ";
            $res = mysql_query($query . 'limit ' . ($page - 1) * $pageVals . ',' . $pageVals);
            $rec_cnt = mysql_num_rows($res);
            if ($rec_cnt > 0) {
                $i = 1;
                $table_headers = array(1 => array('дата', '40'), 2 => array('дисциплина', '100'), 3 => array('преподаватель', '100'), 4 => array('вид контроля', ''), 5 => array('номер контроля', ''), 6 => array('оценка', '50'));
                echo '<table name=tab1 border=1 cellpadding="10" cellspacing="0" width="99%">
<tr align="center" class="title">';
                //------------------------------------------- шапка списочной таблицы -начало-----------------------------------------------------
                echo '<td width="50">№</td>';
                for ($i = 1; $i <= count($table_headers); $i++) {
                    echo '<td width="' . $table_headers[$i][1] . '">' . print_col($i, $table_headers[$i][0]) . '</td>';
                }
                //------------------------------------------- шапка списочной таблицы -конец-----------------------------------------------------
                $bgcolor = '';
Ejemplo n.º 3
0
    }
    if ($go == 1) {
        $rows_total = 0;
        $rows_cnt = 0;
        $list_str = '';
        if (isset($binlog_name_arr) && count($binlog_name_arr) > 0) {
            for ($i = 0; $i < count($binlog_name_arr); $i++) {
                $list_str .= '--  ' . $binlog_name_arr[$i]['Log_name'] . ' лог-файл' . "\n\n\n\n" . getBinLogEventsList($query_events . " IN '" . addcslashes($binlog_name_arr[$i]['Log_name'], '\'\\"') . "'", $exept_mask, $type_mask, $regex_mask);
            }
        } else {
            //формирование по 1 выбранному бинарному-логу
            $list_str = getBinLogEventsList($query_events, $exept_mask, $type_mask, $regex_mask);
        }
        ?>
<div>Был произведен поиск по <b><?php 
        echo echoIf($binlog_name != '', $binlog_name . ' лог-файлу', 'всем лог-файлам');
        ?>
</b> <br>
    результат поиска (записей: <b><?php 
        echo $rows_cnt;
        ?>
 из <?php 
        echo $rows_total;
        ?>
</b>):
    <div class=text style="border: solid black 1px; padding:10px;width:95%"><!--textarea rows="60" cols="120"--> <?php 
        echo str_ireplace("\n\n", "<br>", $list_str);
        ?>
 <!--/textarea--> </div>
</div>
<?php 
Ejemplo n.º 4
0
          where 1 ' . $where_sql . '   
          group by 1,2 order by 3 desc limit 0,20';
 //echo $query;
 $res = mysql_query($query);
 $outstr .= '<div class="title">адреса пользователей</div>
 <table><tr bgcolor="#B3B3FF" class="text"><td width=30></td><td width=100>DNS/IP адреса</td><td width=40>запросов</td></tr>';
 $i = 0;
 while ($a = mysql_fetch_array($res)) {
     $i++;
     if ($i / 2 != round($i / 2)) {
         $outstr .= "<tr  bgcolor=#E6E6FF class=text>\n";
     } else {
         $outstr .= "<tr  bgcolor=#D7D7FF class=text>\n";
     }
     $host_name = $a['host_name'];
     $outstr .= '<td>' . $i . '</td><td>' . echoIf($host_name != '', $host_name . ' (' . $a['host_ip'] . ')', $a['host_ip']) . '</td><td>' . $a['nums'] . '</td></tr>';
 }
 $outstr .= '</table>';
 $outstr .= '</td>';
 //-----------------------------------------------------------------------
 $outstr .= '<td width=300 valign=top>';
 //--------------
 $query = 'SELECT s.url,T.title,count(*)as nums 
 FROM `' . $sql_stats_base . '`.`stats` s  left join (select name,title from pg_uploads union select url,name from tasks)T on T.name=s.url 
 where 1 ' . $where_sql . ' 
 group by 1,2 order by 3 desc limit 0,20';
 $res = mysql_query($query);
 //$outstr.= $query;
 $outstr .= '<div class="title">посещенные страницы</div>
 <table><tr bgcolor="#B3B3FF" class="text"><td width=30 class=text></td><td width=150>url-адрес</td><td width=40>запросов</td></tr>';
 $i = 0;
Ejemplo n.º 5
0
function print_col($col_num, $col_name)
{
    //формирование заголовка столбца  списочной таблицы
    global $sort, $stype, $files_path;
    $query_string = $_SERVER['QUERY_STRING'];
    if ($col_num > 0 && $col_name != '') {
        $col = '';
        $col = '<a href="?' . reset_param_name_ARR($query_string, array('sort', 'page', 'stype')) . '&sort=' . $col_num;
        $col .= '&stype=' . echoIf($sort == $col_num && $stype == 'asc', 'desc', 'asc') . '" title="сортировать">' . $col_name;
        if ($sort == $col_num) {
            $col .= '<img border=0 src="' . $files_path . 'images/design/' . echoIf($stype == 'asc', 's_asc.png', 's_desc.png') . '">';
        }
        $col .= '</a>';
        return $col;
    }
}