Запись добавлена!"; $qstr = "insert into projects_locotech (action, company, status, loco_type,loco_number,depo,depo_service ) values (".$action_num.",".$companyID.",1,'$loco_type',$loco_number,'$depo','$depo_service' )"; //echo ' qstr '.$qstr; mysqli_query($link, $qstr); } else if ($new == "3") { echo "Запись $del_id удалена!"; mysqli_query($link, "delete from projects_locotech where id =".$del_id); } else if ($new == "4") { echo "

Не предоставлен образец входного документа!

"; /* // echo "
",  print_r($_FILES),  "
"; if ( $_FILES ) { $data = XLSRead($_FILES['filename']['tmp_name'], 1); //TODO преобразовать файл в таблицу for ($i=3; $i'; $qstr = "insert into projects_locotech (id_inner, project_number, pallet_number, current_cell, action, whereto, company, status) values (".$inner_id.",".$project_number.",".$pallet_number.",'".$current_cell."',".$action_num.",".$where.",".$companyID.",1)"; //echo "query string ".$qstr."
"; mysqli_query($link, $qstr); } } */ } else if ($new == "5") { mysqli_query($link, "delete from projects_locotech"); echo "Все задачи удалены!"; } echo "
"; echo "

Проекты, компания ".$companyname.":

"; $query1 = mysqli_query($link, "select * from projects_locotech where company=$companyID"); while ($res1 = mysqli_fetch_array($query1)) { $data_id = $res1['id']; $action = $res1['action']; $status = intval($res1['status']); $loco_type = $res1['loco_type']; $loco_number = intval($res1['loco_number']); $depo = $res1['depo']; $depo_service = $res1['depo_service']; if ($status == 1) { //echo ''; echo "$data_id:"; } else { echo "$data_id:"; if ($status == 3) echo "[Выполнено] "; else if ($status == 3) echo "[В работе] "; } $action_data = FindAction($action); echo " ".$action_data["name"] ."[$action] тип $loco_type$loco_number Депо $depo"; if ($status == 3) echo ", новая ячейка $new_cell"; else echo " "; if($status == 2) { echo "

"; $query1 = mysqli_query($link, "select * from projects_locotech where company=$companyID"); } else if($status == 1) echo ""; echo "
"; } echo "
"; echo "
"; echo '

'; //XLSRead();

} function AddNewProject() { echo '
Введите данные нового проекта:

Действие проекта:

Серия локомотива:

Номер локомотива:

Депо приписки:

Депо сервисного обслуживания:

'; } function GetSelected($whereto, $num) { if ($whereto == $num) return 'selected'; return ''; } ?>