Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.29 KB | None | 0 0
  1. <div id="definicion-servidores">
  2.     <form id="form1" name="form1" method="post" action="<?=$_SERVER ['PHP_SELF'];?>" onsubmit="return valida();">
  3.         <h2>Agregar Servidores</h2>
  4.         <table id="table-param">  
  5.             <colgroup>
  6.                 <col class="col1"/>
  7.                 <col class="col2"/>
  8.             </colgroup>
  9.             <thead>
  10.                 <tr>
  11.                     <th colspan="2">Parametros</th>
  12.                 <tr>
  13.             </thead>
  14.             <tbody>
  15.                 <tr>
  16.                     <td class="label">Nombre</td>
  17.                     <td class="input">
  18.                         <input type="hidden" name="band" id="band" value="0" />
  19.                         <input type="hidden" name="delserv" id="delserv" value="" />
  20.                         <input type="text" id="servername" name="servername"/> 
  21.                     </td>  
  22.                 </tr>  
  23.                 <tr>
  24.                     <td class="label">IP/Hostname</td>
  25.                     <td class="input"><input type="text" name="serverhostip" id="serverhostip" /></td>  
  26.                 </tr>
  27.                 <tr>
  28.                     <td class="label">Timeout</td>
  29.                     <td class="input"><input type="text" name="timeout" id="timeout" /></td>  
  30.                 </tr>
  31.                 <tr>
  32.                     <td class="label">Nombre de Instancia</td>
  33.                     <td class="input"><input type="text" name="instancian" id="instancian" /></td>  
  34.                 </tr>
  35.                 <tr>
  36.                     <td class="label">Puerto Instancia Cache</td>
  37.                     <td class="input"><input type="text" name="puerto" id="puerto" /></td>  
  38.                 </tr>
  39.                 <tr>
  40.                     <td class="label">Peso (PRI)</td>
  41.                     <td class="input"><input type="text" name="peso" id="peso" /></td>  
  42.                 </tr>
  43.                 <tr>
  44.                     <td class="label">Backend</td>
  45.                     <td class="input">
  46.                         <select name="backend" id="backend">
  47.                             <?php foreach($rsbackends as $row):?>
  48.                                 <option value="<?=$row["backend"]; ?>" <? if ($row["backend"] == 'DEFAULT') { echo 'selected';}; ?>><?=$row["backend"]; ?></option>
  49.                             <?php endforeach; ?>
  50.                         </select>  
  51.                     </td>  
  52.                 </tr>
  53.                 <tr>
  54.                     <td colspan="2" class="button"><input type="submit" value="Agregar"/></td>
  55.                 </tr>
  56.             </tbody>
  57.         </table>                    
  58.     </form>
  59. </div>
  60.  
  61. <div id="servidores-activos">
  62.     <h2>Servidores Activos</h2>
  63.     <table id="table-data">
  64.             <thead>
  65.                 <tr>
  66.                     <th>Nombre Servidor</th>
  67.                     <th>IP/Hostname</th>
  68.                     <th>Timeout</th>
  69.                     <th>Nombre Instancia</th>
  70.                     <th>Puerto Instancia</th>
  71.                     <th>Backend</th>
  72.                     <th>Peso (PRI)</th>
  73.                     <th>Editar</th>
  74.                     <th>Borrar</th>
  75.                 </tr>
  76.             </thead>
  77.             <tbody>
  78.                 <?php foreach($result as $row):?>
  79.                 <tr>
  80.                       <td><? echo $row["servername"]; ?></td>
  81.                       <td><? echo $row["serverhostip"]; ?></td>
  82.                       <td><? echo $row["timeout"]; ?></td>
  83.                       <td><? echo $row["instancian"]; ?></td>
  84.                       <td><? echo $row["puerto"]; ?></td>
  85.                       <td><? echo $row["backend"]; ?></td>
  86.                       <td><? echo $row["peso"]; ?></td>
  87.                       <td><a href="#" onclick="edita('<? echo $row["id_ser"]; ?>');return false">[Editar]</a></td>
  88.                       <td><a href="#" onclick="borra('<? echo $row["id_ser"]; ?>','<? echo $row["servername"]; ?>');return false">[Borrar]</a></td>
  89.                 </tr>
  90.                 <?php
  91.                     $lista .= "'" . $row["instancian"] . "' ,";
  92.                     $listapuerto .= "'" . $row["puerto"] . "' ,";
  93.                     endforeach;
  94.                     $largo = strlen($lista)-1;
  95.                     $listintan = substr($lista,0,$largo);
  96.                    
  97.                     $largo = strlen($listapuerto)-1;
  98.                     $listaport = substr($listapuerto,0,$largo);  
  99.                     $db = NULL;
  100.                   ?>
  101.             </tbody>
  102.         </table>
  103.     </div>            
  104. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement