Advertisement
Guest User

Untitled

a guest
May 25th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.08 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.    
  5.     <style type="text/css">
  6.         .tr{
  7.             text-align:center;
  8.         }
  9.         .body{
  10.             font-family: Times new Roman;
  11.             font-size: 12pt;
  12.         }
  13.     </style>
  14.  
  15.     <link rel="stylesheet" href="css/bootstrap.min.css">
  16. <link rel="stylesheet" href="css/bootstrap-theme.min.css">
  17.  
  18.  
  19. </head>
  20. <body class="body">
  21.     <div class="panel panel-success">
  22.     <div class="panel-heading">
  23.     <h3 class="panel-title" style="text-align: center;font-size: 16pt;">Транспортная задача</h3>
  24.   </div>
  25.     <p style="font-size: 14pt;margin-bottom: 0;">Введите тарифы,запасы и потребности в числовом формате</p>
  26.      <?php
  27. if(isset($_POST["s1"]) && isset($_POST["s2"])){
  28.  $potrebitel=htmlspecialchars($_POST['s1']);
  29.  $postavchik=htmlspecialchars($_POST['s2']); }
  30.  
  31.  $t=0;
  32.  $z=0;
  33.  $p=0;
  34.  echo "<form>";
  35.   echo "<table border=1>";
  36.   echo "<tr class=\"tr\"><td>";
  37.   for($i=1;$i<=$potrebitel;$i++){
  38.     echo "<td>B$i</td>";
  39.   }
  40.   echo "<td>Запасы</td></tr>";
  41.   echo "<tr class=\"tr\">";
  42.   for($i=1;$i<= $postavchik;$i++){
  43.    echo "<tr class=\"tr\"><td>А$i</td>";
  44.     for($j=1;$j<=$potrebitel;$j++){
  45.      echo "<td><input type=\"text\" id=\"b$t\" size=\"7\" maxlength=\"9\" onchange=\"resolution(this)\"></td>";
  46.       $t++;
  47.     }
  48.     echo "<td><input type=\"text\" id=\"s$z\" size=\"7\" maxlength=\"9\" onchange=\"resolution(this)\"></td>";
  49.     echo "</tr>";
  50.     $z++;
  51.   }
  52.   echo "<tr><td>Потребности</td>";
  53.   for($j=1;$j<=$potrebitel;$j++){
  54.     echo "<td><input type=\"text\" id=\"f$p\" size=\"7\" maxlength=\"9\" onchange=\"resolution(this)\"></td>";
  55.     $p++;
  56.   }
  57.   echo "</table>";
  58.   echo "<input type=\"radio\" id=\"sv\" name=\"rb\">"; echo " Метод северо-западного угла<br>";
  59.   echo "<input type=\"radio\" id=\"mn\" name=\"rb\">"; echo " Метод минимального элемента<br>";
  60.   echo "<input type=\"button\" name=\"s1\" onclick=\"vibor($potrebitel,$postavchik)\">";
  61.   echo "</form>";
  62.  
  63.  ?>
  64.  
  65. </div>
  66. <script src="s3.js"></script>
  67. </body>
  68. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement