<tr> <td class=let_list_data> Отчёт по рейсу <b>$translist_row['tname'] $translist_row['number']</b> </td> </tr> </table> */ /* <tr> <td class='otcmenu_on' style='border:0pt;' height=35> Отчёт по рейсу <b>".$translist_row['tname']." ".$translist_row['number']."</b> </td> </tr> */ echo "\n <table width=100% align=center valign=top border=0 cellpadding=0 cellspacing=1>\n <tr><td class=let_list_data style='border:0pt;background-color:#707052'> </td></tr>\n <tr>\n <td bgcolor=#FFFFFF>\n "; dw_transport_cap($translist); echo "\n </td>\n </tr>\n <tr><td class=let_list_data style='border:0pt;background-color:#707052'> </td></tr>"; $query = "select distinct t.div_id, d.divname from {$trans_query} AS t, {$dbname}.div d\n where t.div_id=d.div_id"; $res = mysql_query($query) or die(mysql_error()); $num = mysql_num_rows($res); while ($row = mysql_fetch_array($res)) { echo "\n <tr>\n <td class=let_list_fixed>\n\n <table width=100% align=center valign=top border=0 cellpadding=0 cellspacing=1>\n <tr>\n <td class=let_list_fixed><b>{$row['1']}</b></td>\n </tr>\n <tr>\n <td class=let_list_data>\n\n <table width=100% align=center valign=top border=0 cellpadding=0 cellspacing=1>\n <tr>\n <td class=let_list_fixed align=center width=130>Тип транспорта</td>\n <td class=let_list_fixed align=center width=80>№</td>\n <td class=let_list_fixed align=center width=230>Направление</td>\n <td class=let_list_fixed align=center width=90>На погрузку</td>\n <td class=let_list_fixed align=center width=90>Вышел</td>\n <td class=let_list_fixed align=center width=90>Пришёл</td>\n <td class=let_list_fixed align=right width=100>Мест вышло</td>\n <td class=let_list_fixed align=right width=100>Мест пришло</td>\n <td class=let_list_fixed align=center width=120>Инфо</td>\n <td class=let_list_fixed align=right> </td>\n </tr>\n "; $query = "select distinct t.trans_id, t.transtype_id, t.transno, t.sourcediv_id, t.destdiv_id,\n t.transin, t.transout, t.transcame, t.positions, t.transinfo,\n tt.tname, concat(sourcediv.divname, ' -> ', destdiv.divname) as naprav, t.tdate\n from {$trans_query} t, {$dbname}.div destdiv, {$dbname}.div sourcediv, transtype tt\n where t.transtype_id=tt.transtype_id and destdiv.div_id=t.destdiv_id\n and sourcediv.div_id=t.sourcediv_id and t.div_id={$row['0']}\n order by tdate desc"; $res1 = mysql_query($query) or die(mysql_error()); $num1 = mysql_num_rows($res1); while ($row1 = mysql_fetch_array($res1)) { $query_row = "select sum(p.ibtpos) from ibag_movement m, properties p where\n m.prop_id=p.prop_id and m.strans_id={$translist} and m.trans_id=" . $row1[0] . " and m.div_id=" . $row1[3]; $res_row = mysql_query($query_row) or die(mysql_error()); $row_row = mysql_fetch_array($res_row); $pos_sent = $row_row[0]; if ($pos_sent == null) {
if (!isset($translist)) { $translist = -1; } echo "<input type='hidden' name='translist' id='translist' value='" . $translist . "'>"; if ($translist != -1) { require 'form_transfull.php'; } else { echo "\n <table width=100% align=center valign=top border=0 cellpadding=0 cellspacing=0>\n <tr><td class=let_list_data style='border:0pt;background-color:#707052'> </td></tr>\n <tr>\n <td height=45>\n <table width=100% align=center valign=top border=0 cellpadding=0 cellspacing=0>\n <tr>\n <td width=110 bgcolor=#FFFFFF align=center valign=middle>\n <img src='images/sign23.gif'>\n </td>\n <td width=25 bgcolor=#ffffff> </td>\n <td bgcolor=#FFFFFF valign=middle>\n <table width=100% align=center valign=top border=0 cellpadding=0 cellspacing=0>\n <tr>\n <td style='background-color:#FFFFFF;font-family:Arial;font-size:16pt;color:#454532;' style='border:0pt;'>\n <b>Выберите транспорт для получения отчёта</b>\n </td>\n </tr>\n <tr>\n <td style='background-color:#FFFFFF;font-family:Arial;font-size:8pt;color:#454532;' style='border:0pt;'>\n Время формирования отчёта не менее 5 минут.\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </tr>\n <tr><td class=let_list_data style='border:0pt;background-color:#707052' height=3> </td></tr>\n <tr>\n <td class=let_list_data>"; echo "\n <table width=100% align=center valign=top border=0 cellpadding=0 cellspacing=1>\n <tr>\n <td class=let_list_fixed align=left width=100%>Транспорт</td>\n </td>\n </tr>"; $query = "select * from translist\n order by transdate desc"; $res = mysql_query($query) or die(mysql_error()); $num = mysql_num_rows($res); while ($row = mysql_fetch_array($res)) { $tdnum++; echo "\n <tr>\n <td id='td" . $tdnum . "' class=let_list_data2 style='cursor:hand;' align=left width=100% onMouseOut=\"change_on(1, {$tdnum}, 'list_onFoff0b');\" onMouseOver=\"change_on(0, {$tdnum}, 'list_onFoff0b');\" onclick='javascript:document.forms[0].translist.value={$row['id']};parent.wsform.submit();' >"; dw_transport_cap($row[id]); echo "\n </td>\n </tr>"; } echo "\n "; /* <table width=100% align=center valign=top border=0 cellpadding=0 cellspacing=1> <tr> <td class=let_list_fixed align=center width=440>Транспорт</td> <td class=let_list_fixed align=center width=70>На погрузку</td> <td class=let_list_fixed align=center width=70>Вышел</td> <td class=let_list_fixed align=center width=70>Пришёл</td> <td class=let_list_fixed align=left width=150>Параметры</td> <td class=let_list_fixed align=center width=170>Инфо</td> <td class=let_list_fixed align=right> </td> </tr>";