if (!isset($_GET['save']) && !isset($_GET['print'])) { $bgcolor = ' bgcolor="#DFEFFF"'; } $i = 0; while ($tmpval = mysql_fetch_array($res)) { $sum = 0; echo '<tr align="left" class="main" ' . $bgcolor . ' valign="top">'; if (!isset($_GET['save']) && !isset($_GET['print']) && $write_mode === true) { echo '<td align="center" width="60"> <a href="javascript:del_confirm(\'' . f_ro($tmpval['id']) . '\',\'№'; // <abarmin date="23.07.2009"> // ошибка undefined index page $page = 1; if (array_key_exists("page", $_GET)) { $page = $_GET['page']; } echo f_ro($tmpval['num']) . ' от ' . f_ro($tmpval['date_text']) . '\',\'' . f_ro($page) . '\')" title="Удалить">'; // </abarmin> echo '<img src="images/todelete.png" alt="Удалить" border="0"></a> '; echo '<a href="?item_id=' . $tmpval['id'] . '&type=edit" title="Правка"> <img src="images/toupdate.png" alt="Правка" border="0"></a></td>'; } $i++; echo '<td width="30"> ' . color_mark($q, $tmpval['num']) . '</td>'; $date_text = DateTimeCustomConvert($tmpval['date_text'], 'd', 'mysql2rus'); echo '<td width="60" valign=top> '; if (!isset($_GET['save']) && !isset($_GET['print'])) { echo '<a href="?item_id=' . $tmpval['id'] . '&type=view" title="просмотреть">' . color_mark($q, $date_text) . '</a>'; } else { echo $date_text; } echo '</td>';
echo '<td class="notinfo">комментарий</td>'; } echo "</tr>\n"; $bgcolor = ''; if (!isset($_GET['save']) && !isset($_GET['print'])) { $bgcolor = ' bgcolor="#DFEFFF"'; } $i = 0; while ($tmpval = mysql_fetch_array($res)) { $sum = 0; echo '<tr align="left" class="main" ' . $bgcolor . ' valign="top">'; if (!isset($_GET['save']) && !isset($_GET['print'])) { echo ' <td align="center"> '; if ($write_mode) { echo '<a href="#del" onclick=javascript:del_confirm_act("' . str_replace(" ", " ", f_ro($tmpval['fio_short'])) . '","?item_id=' . $tmpval['id'] . '&action=del") title="удалить"> <img src="images/todelete.png" alt="Удалить" border="0"></a> <a href="?item_id=' . $tmpval['id'] . '&action=edit" title="править"> <img src="images/toupdate.png" alt="Правка" border="0"></a> '; } echo '<a href="filial_form.php?item_id=' . $tmpval['id'] . '&print" title="печать" target="_blank"> <img src="images/print.gif" alt="Печать" border="0"></a> <a href="filial_form.php?save&attach=doc&item_id=' . $tmpval['id'] . '" title="передать в Word" target="_blank"> <img src="images/design/file_types/word_file.gif" alt="Печать" border="0"></a> </td>'; } $i++; echo '<td> ' . ($i + ($page - 1) * $pgVals) . '</td>'; echo '<td> <a href="lect_anketa.php?kadri_id=' . $tmpval['kadri_id'] . '&action=update" title="перейти в анкету преподавателя">' . color_mark($q, $tmpval['fio_short']) . '</a></td>'; echo '<td> ' . color_mark($q, $tmpval['fil_name']) . '</td>'; echo '<td> ' . color_mark($q, intval($tmpval['day_cnt']) > 0 ? intval($tmpval['day_cnt']) : '') . '</td>'; echo '<td> ' . color_mark($q, intval($tmpval['hours_cnt']) > 0 ? intval($tmpval['hours_cnt']) : '') . '</td>';
} if (!isset($_GET['save']) && !isset($_GET['print'])) { echo '<td width="100" class="notinfo">комментарий</td>'; } //------------------------------------------- шапка списочной таблицы -конец----------------------------------------------------- $bgcolor = ''; if (!isset($_GET['save']) && !isset($_GET['print'])) { $bgcolor = ' bgcolor="#DFEFFF"'; } $i = 0; while ($tmpval = mysql_fetch_array($res)) { $sum = 0; echo '<tr align="left" class="main" ' . $bgcolor . ' valign="top">'; if (!isset($_GET['save']) && !isset($_GET['print'])) { echo '<td align="center"> <a href="javascript:del_confirm(\'' . f_ro($tmpval['id']) . '\',\'' . str_replace(" ", "_", f_ro($tmpval['fio'])) . '\');" title="Удалить"> <img src="images/todelete.png" alt="Удалить" border="0"></a> <a href="?item_id=' . $tmpval['id'] . '&type=edit&' . $query_string . '" title="Правка"> <img src="images/toupdate.png" alt="Правка" border="0"></a></td>'; } $i++; echo '<td> ' . ($i + ($page - 1) * $pgVals) . '</td>'; echo '<td> <a href="lect_anketa.php?kadri_id=' . $tmpval['fio_id'] . '&action=update" title="в анкету преподавателя">' . color_mark($q, $tmpval['fio']) . '</a></td>'; echo '<td> ' . color_mark($q, $tmpval['dolgnost']) . '</td>'; echo '<td> ' . color_mark($q, $tmpval['trip_count']) . '</td>'; $date_start = DateTimeCustomConvert(substr($tmpval['date_start'], 0, 10), 'd', 'mysql2rus'); echo '<td> ' . color_mark($q, $date_start) . '</td>'; $date_end = DateTimeCustomConvert(substr($tmpval['date_end'], 0, 10), 'd', 'mysql2rus'); echo '<td> ' . color_mark($q, $date_end) . '</td>'; echo '<td> ' . color_mark($q, $tmpval['trip_cost']) . '</td>'; echo '<td> ' . color_mark($q, $tmpval['dotation']) . '</td>';
function arr_replace(&$arr_val, $arr_key) { $arr_val = f_ro($arr_val); }