public function obtenerConf($direccion) { function ejecutar($comando) { //Ejecutando el comando MS-DOS $respuesta = shell_exec($comando); //Determinar la posicion del = $posicion = strpos($respuesta, '='); //retornamos todo lo que este DESPUES del igual return substr($respuesta, $posicion + 1); } $res['nso'] = ejecutar("WMIC {$direccion} OS get Caption /FORMAT:List"); $res['vso'] = ejecutar("WMIC {$direccion} OS get Version /FORMAT:List"); $res['aso'] = ejecutar("WMIC {$direccion} OS get OSArchitecture /FORMAT:List"); return $res; }
public function obtenerMemoria($direccion) { //***temporallllllllllllllllllllllllllllll $direccion = null; //Determinar el # de Memorias $cant = ejecutar("WMIC {$direccion} MEMPHYSICAL get MemoryDevices /FORMAT:List"); if ($cant > "1") { for ($f = 0; $f < $cant; $f++) { $res[$f]['ser'] = $this->ejecutar("WMIC {$direccion} memoryChip WHERE Tag='Physical Memory " . $f . "' get SerialNumber /FORMAT:List"); $res[$f]['mar'] = $this->ejecutar("WMIC {$direccion} memoryChip WHERE Tag='Physical Memory " . $f . "' get Manufacturer /FORMAT:List"); $res[$f]['cap'] = $this->ejecutar("WMIC {$direccion} memoryChip WHERE Tag='Physical Memory " . $f . "' get Capacity /FORMAT:List"); $res[$f]['vel'] = $this->ejecutar("WMIC {$direccion} memoryChip WHERE Tag='Physical Memory " . $f . "' get Speed /FORMAT:List"); $res[$f]['tip'] = $this->ejecutar("WMIC {$direccion} memoryChip WHERE Tag='Physical Memory " . $f . "' get MemoryType /FORMAT:List"); } } else { $res['ser'] = $this->ejecutar("WMIC {$direccion} memoryChip get SerialNumber /FORMAT:List"); $res['mar'] = $this->ejecutar("WMIC {$direccion} memoryChip get Manufacturer /FORMAT:List"); $res['cap'] = $this->ejecutar("WMIC {$direccion} memoryChip get Capacity /FORMAT:List"); $res['vel'] = $this->ejecutar("WMIC {$direccion} memoryChip get Speed /FORMAT:List"); $res['tip'] = $this->ejecutar("WMIC {$direccion} memoryChip get MemoryType /FORMAT:List"); } return $res; }
director:"required", iglesia:"required" }}); </script> </head> <body> <?php include_once 'funciones.php'; $query1 = "select * from clubes"; //Sql a ejecutar $query2 = "select * from roles"; $conn = conectar(); //cerrarConexion($conn); $clubes = ejecutar($query1, $conn); $roles = ejecutar($query2, $conn); cerrarConexion($conn); $option_club = generarLista($clubes, 'club'); $option_roles = generarLista($roles, 'rol'); ?> <!-- Begin 1st Page --> <div data-role="page" id="unete"> <div data-role="header">
<script type="text/javascript" src="forms.js"></script> </head> <body> <?php include_once 'funciones.php'; $query1 = "SELECT * FROM clubes ORDER BY nombre ASC"; //Sql a ejecutar $query2 = "SELECT * FROM roles ORDER BY nombre ASC"; $query3 = "SELECT * FROM iglesias ORDER BY nombre ASC"; $conn = conectar(); //cerrarConexion($conn); $clubes = ejecutar($query1, $conn); $roles = ejecutar($query2, $conn); $iglesias = ejecutar($query3, $conn); cerrarConexion($conn); $option_club = generarLista($clubes, 'club'); $option_roles = generarLista($roles, 'rol'); $option_iglesia = generarLista($iglesias, 'iglesia'); ?> <!-- Begin 1st Page --> <div data-role="page" id="unete">
ejecutar("rebuild"); break; case "logs": if (empty($_POST['l'])) { $var = shell_exec("cat /var/log/nginx/error.log"); $l = null; } else { $l = ereg_replace("/[0-9]/", "", $_POST['l']); $var = shell_exec("tail -{$l} /var/log/nginx/error.log"); } echo "<p style=\"color: #009\"><b>Log Viewer - Showing Last {$l} Lines</b></p>"; echo "<pre>{$var}</pre>"; break; case "cleanup": echo "<p style=\"color: #009\"><b>Temperary Files Cleanup:</b></p>"; ejecutar("cleanup"); break; default: $run = "Down"; $var = shell_exec("ps -A"); if (strstr($var, "nginx")) { $run = "UP"; } echo "Nginx Service Status: <font style=\"color: #0c0\"><b>{$run}</b></font>"; ?> <p style="color: #0c0">To automated /tmp cleanup add bellow cron <br><b>0 */1 * * * /usr/sbin/tmpwatch -am 1 /tmp/nginx_client</b><br> via crontab -e command</p> <p style="color: #03F"><b>About Nginx Admin</b></p> <p>Nginx Admin is WHM interface of Nginx installer for cPanel server. This plugin will increase your server performance and decrease the server Apache Load. So you can host more websites in a cPanel server than usual. <br>Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption. <br> Unlike traditional servers, Nginx doesn't rely on threads to handle requests. Instead it uses a much more scalable event-driven architecture. This architecture uses small, but more importantly, predictable amounts of memory under load. <br></p> <p>For Support Visit <a href="http://www.nginxcp.com/forums" target='_blank'>http://www.nginxcp.com/forums</a></p> <?php }
<?php include "includes/jfunciones.php"; $n = $_REQUEST['n']; $q = "select * from tbl_noticias where id_noticia='{$n}';"; $r = ejecutar($q); $f = asignar_a($r); echo cabecera($titulo); echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">"; ?> <tr> <td> <img src="images/noticia_01.jpg" width="635" height="32" alt=""></td> </tr> <tr> <td style="background: url(images/noticia_02.jpg);" width="635" height="357" valign="top"> <div class="profesional" style="width: 500;padding-left:40px;"> <?php echo "<span style=\"color: #8A7C4D;font-size: 11px;\"><b>{$f['titulo']}</b></span><span style=\"color: #656251;font-size: 9px;\"><b> ({$f['fecha']})</b></span><br><br><div style=\"text-align:justify;color: #8A7C4D;font-size: 10px; line-height: 13pt;\">{$f['noticia']}</span>"; ?> </div> </td> </tr> </table> <?php echo pie();