2 <?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80 foldmethod=marker:
3 -------------------------------------------------------------------------------
6 -------------------------------------------------------------------------------
7 This file is part of YATTA!.
9 YATTA! is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 2 of the License, or (at your option)
14 YATTA! is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License; if not,
19 write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20 Boston, MA 02111-1307 USA
21 -------------------------------------------------------------------------------
22 Creado: jue ene 8 16:53:47 ART 2004
23 Autor: Martin Marrese <mmarre@mecon.gov.ar>
24 -------------------------------------------------------------------------------
26 -----------------------------------------------------------------------------*/
28 //Sacar el \n al final
29 $SERVIDOR = substr(file_get_contents('/etc/hostname'), 0, strpos
30 (file_get_contents('/etc/hostname'), "\n"));
36 require_once 'YATTA/Proceso.php';
37 require_once 'DB.php';
40 //CREO UNA CONEXION MYSQL{{{
41 $DB =& DB::connect('mysql://intranet:intranet@bal747f/yatta', true);
42 if (DB::isError($DB)) {
43 die ($DB->getMessage());
47 //BUSCO EL ESTADO DEL SERVIDOR EN LA BASE {{{
48 $sql = 'SELECT count(procesos.id) AS cuenta
49 FROM procesos, servidores
50 WHERE servidores.nombre = ? and procesos.server = servidores.id and
51 procesos.status = 1;'; //Status 1 -> Procesando