Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="definicion-servidores">
- <form id="form1" name="form1" method="post" action="<?=$_SERVER ['PHP_SELF'];?>" onsubmit="return valida();">
- <h2>Agregar Servidores</h2>
- <table id="table-param">
- <colgroup>
- <col class="col1"/>
- <col class="col2"/>
- </colgroup>
- <thead>
- <tr>
- <th colspan="2">Parametros</th>
- <tr>
- </thead>
- <tbody>
- <tr>
- <td class="label">Nombre</td>
- <td class="input">
- <input type="hidden" name="band" id="band" value="0" />
- <input type="hidden" name="delserv" id="delserv" value="" />
- <input type="text" id="servername" name="servername"/>
- </td>
- </tr>
- <tr>
- <td class="label">IP/Hostname</td>
- <td class="input"><input type="text" name="serverhostip" id="serverhostip" /></td>
- </tr>
- <tr>
- <td class="label">Timeout</td>
- <td class="input"><input type="text" name="timeout" id="timeout" /></td>
- </tr>
- <tr>
- <td class="label">Nombre de Instancia</td>
- <td class="input"><input type="text" name="instancian" id="instancian" /></td>
- </tr>
- <tr>
- <td class="label">Puerto Instancia Cache</td>
- <td class="input"><input type="text" name="puerto" id="puerto" /></td>
- </tr>
- <tr>
- <td class="label">Peso (PRI)</td>
- <td class="input"><input type="text" name="peso" id="peso" /></td>
- </tr>
- <tr>
- <td class="label">Backend</td>
- <td class="input">
- <select name="backend" id="backend">
- <?php foreach($rsbackends as $row):?>
- <option value="<?=$row["backend"]; ?>" <? if ($row["backend"] == 'DEFAULT') { echo 'selected';}; ?>><?=$row["backend"]; ?></option>
- <?php endforeach; ?>
- </select>
- </td>
- </tr>
- <tr>
- <td colspan="2" class="button"><input type="submit" value="Agregar"/></td>
- </tr>
- </tbody>
- </table>
- </form>
- </div>
- <div id="servidores-activos">
- <h2>Servidores Activos</h2>
- <table id="table-data">
- <thead>
- <tr>
- <th>Nombre Servidor</th>
- <th>IP/Hostname</th>
- <th>Timeout</th>
- <th>Nombre Instancia</th>
- <th>Puerto Instancia</th>
- <th>Backend</th>
- <th>Peso (PRI)</th>
- <th>Editar</th>
- <th>Borrar</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach($result as $row):?>
- <tr>
- <td><? echo $row["servername"]; ?></td>
- <td><? echo $row["serverhostip"]; ?></td>
- <td><? echo $row["timeout"]; ?></td>
- <td><? echo $row["instancian"]; ?></td>
- <td><? echo $row["puerto"]; ?></td>
- <td><? echo $row["backend"]; ?></td>
- <td><? echo $row["peso"]; ?></td>
- <td><a href="#" onclick="edita('<? echo $row["id_ser"]; ?>');return false">[Editar]</a></td>
- <td><a href="#" onclick="borra('<? echo $row["id_ser"]; ?>','<? echo $row["servername"]; ?>');return false">[Borrar]</a></td>
- </tr>
- <?php
- $lista .= "'" . $row["instancian"] . "' ,";
- $listapuerto .= "'" . $row["puerto"] . "' ,";
- endforeach;
- $largo = strlen($lista)-1;
- $listintan = substr($lista,0,$largo);
- $largo = strlen($listapuerto)-1;
- $listaport = substr($listapuerto,0,$largo);
- $db = NULL;
- ?>
- </tbody>
- </table>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement