Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <style type="text/css">
- .tr{
- text-align:center;
- }
- .body{
- font-family: Times new Roman;
- font-size: 12pt;
- }
- </style>
- <link rel="stylesheet" href="css/bootstrap.min.css">
- <link rel="stylesheet" href="css/bootstrap-theme.min.css">
- </head>
- <body class="body">
- <div class="panel panel-success">
- <div class="panel-heading">
- <h3 class="panel-title" style="text-align: center;font-size: 16pt;">Транспортная задача</h3>
- </div>
- <p style="font-size: 14pt;margin-bottom: 0;">Введите тарифы,запасы и потребности в числовом формате</p>
- <?php
- if(isset($_POST["s1"]) && isset($_POST["s2"])){
- $potrebitel=htmlspecialchars($_POST['s1']);
- $postavchik=htmlspecialchars($_POST['s2']); }
- $t=0;
- $z=0;
- $p=0;
- echo "<form>";
- echo "<table border=1>";
- echo "<tr class=\"tr\"><td>";
- for($i=1;$i<=$potrebitel;$i++){
- echo "<td>B$i</td>";
- }
- echo "<td>Запасы</td></tr>";
- echo "<tr class=\"tr\">";
- for($i=1;$i<= $postavchik;$i++){
- echo "<tr class=\"tr\"><td>А$i</td>";
- for($j=1;$j<=$potrebitel;$j++){
- echo "<td><input type=\"text\" id=\"b$t\" size=\"7\" maxlength=\"9\" onchange=\"resolution(this)\"></td>";
- $t++;
- }
- echo "<td><input type=\"text\" id=\"s$z\" size=\"7\" maxlength=\"9\" onchange=\"resolution(this)\"></td>";
- echo "</tr>";
- $z++;
- }
- echo "<tr><td>Потребности</td>";
- for($j=1;$j<=$potrebitel;$j++){
- echo "<td><input type=\"text\" id=\"f$p\" size=\"7\" maxlength=\"9\" onchange=\"resolution(this)\"></td>";
- $p++;
- }
- echo "</table>";
- echo "<input type=\"radio\" id=\"sv\" name=\"rb\">"; echo " Метод северо-западного угла<br>";
- echo "<input type=\"radio\" id=\"mn\" name=\"rb\">"; echo " Метод минимального элемента<br>";
- echo "<input type=\"button\" name=\"s1\" onclick=\"vibor($potrebitel,$postavchik)\">";
- echo "</form>";
- ?>
- </div>
- <script src="s3.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement