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 abr 15 13:04:35 ART 2004
23 Autor: Martin Marrese <mmarre@mecon.gov.ar>
24 -------------------------------------------------------------------------------
26 -------------------------------------------------------------------------------
28 Prueba de alta y ejecución de un script verdadero.
29 -----------------------------------------------------------------------------*/
32 require_once 'YATTA/Controlador.php';
33 require_once 'DB.php';
34 require_once 'PEAR.php';
37 //{{{Creo una conexion mysql al servidor
38 //$db =& DB::connect('mysql://yatta:75f22dcd27c9b24e7@unix(/var/run/mysqld/mysqld.sock)/yatta', true);
39 $db =& DB::connect('mysql://intranet:intranet@unix(/var/run/mysqld/mysqld.sock)/yatta', true);
40 if (DB::isError($db)) {
41 trigger_error($db->getMessage(), E_USER_ERROR);
45 //{{{Identificador del sistema al cual pertenecen los procesos.
46 $id_sistema = 74; //Identificador de YATTA
49 //{{{Proceso con array de datos obligatorios solamente.
52 '/home/mmarrese/public_html/yatta/test/casos/caso_2_alta_proceso/clase.php',
53 'id_sistema' => $id_sistema,
54 'descripcion' => 'Pruebas de los forks, etc.',
55 'owner' => 'mmarre@mecon',
57 $controlador =& new YATTA_Controlador;
58 $res = $controlador->agregarProceso($db, $datos);
59 if (PEAR::isError($res)) {
60 trigger_error('Error: ' . $res->getMessage() . "\n", E_USER_ERROR);