1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3 <title>SAMURAI: Perfil.php Source File</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
6 <!-- Generado por Doxygen 1.3.2 -->
7 <div class="qindex"><a class="qindex" href="main.html">Página principal</a> | <a class="qindex" href="classes.html">Lista alfabética</a> | <a class="qindex" href="annotated.html">Lista de componentes</a> | <a class="qindex" href="files.html">Lista de archivos</a> | <a class="qindex" href="functions.html">Miembros de las clases</a></div>
8 <h1>Perfil.php</h1><a href="Perfil_8php.html">Ir a la documentación de este archivo.</a><div class="fragment"><pre>00001 <?php
9 00002 <span class="comment">// vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:</span>
10 00003 <span class="comment">// +----------------------------------------------------------------------+</span>
11 00004 <span class="comment">// | PHP Version 4 |</span>
12 00005 <span class="comment">// +----------------------------------------------------------------------+</span>
13 00006 <span class="comment">// | Copyright (c) 1997-2003 The PHP Group |</span>
14 00007 <span class="comment">// +----------------------------------------------------------------------+</span>
15 00008 <span class="comment">// | This source file is subject to version 2.02 of the PHP license, |</span>
16 00009 <span class="comment">// | that is bundled with this package in the file LICENSE, and is |</span>
17 00010 <span class="comment">// | available at through the world-wide-web at |</span>
18 00011 <span class="comment">// | http://www.php.net/license/2_02.txt. |</span>
19 00012 <span class="comment">// | If you did not receive a copy of the PHP license and are unable to |</span>
20 00013 <span class="comment">// | obtain it through the world-wide-web, please send a note to |</span>
21 00014 <span class="comment">// | license@php.net so we can mail you a copy immediately. |</span>
22 00015 <span class="comment">// +----------------------------------------------------------------------+</span>
23 00016 <span class="comment">// | Created: Tue May 27 11:20:04 2003</span>
24 00017 <span class="comment">// | Author: Martin Marrese - Myrna Degano <mmarre@mecon.gov.ar - mdegan@mecon.gov.ar></span>
25 00018 <span class="comment">// +----------------------------------------------------------------------+</span>
26 00019 <span class="comment">//</span>
27 00020 <span class="comment">// $Id: Perfil.php 26 2003-07-07 22:45:35Z mmarre $</span>
28 00021 <span class="comment">// $Author: mmarre $</span>
29 00022 <span class="comment">// $URL: http://portal.mecon.ar/svn/samurai/tronco/lib/SAMURAI/Perfil.php $</span>
30 00023 <span class="comment">// $Date: 2003-07-07 19:45:35 -0300 (Mon, 07 Jul 2003) $</span>
31 00024 <span class="comment">// $Rev: 26 $</span>
32 00025 <span class="comment">//</span>
34 00027 <span class="preprocessor">#require_once 'PEAR.php';</span>
35 00028 <span class="preprocessor"></span>
38 00031 <span class="comment">// +X2C Class 208 :SAMURAI_Perfil</span>
39 <a name="l00037"></a><a class="code" href="classSAMURAI__Perfil.html">00037</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="classSAMURAI__Perfil.html">SAMURAI_Perfil</a> {
40 <a name="l00044"></a><a class="code" href="classSAMURAI__Perfil.html#o0">00044</a> var $<a class="code" href="classSAMURAI__Perfil.html#o0">_id</a>;
42 <a name="l00052"></a><a class="code" href="classSAMURAI__Perfil.html#o1">00052</a> var $<a class="code" href="classSAMURAI__Perfil.html#o1">_descripcion</a>;
44 <a name="l00060"></a><a class="code" href="classSAMURAI__Perfil.html#o2">00060</a> var $<a class="code" href="classSAMURAI__Perfil.html#o2">_tipo</a>;
46 <a name="l00068"></a><a class="code" href="classSAMURAI__Perfil.html#o3">00068</a> var $<a class="code" href="classSAMURAI__Perfil.html#o3">_db</a>;
48 <a name="l00076"></a><a class="code" href="classSAMURAI__Perfil.html#o4">00076</a> var $<a class="code" href="classSAMURAI__Perfil.html#o4">_responsable</a>;
50 <a name="l00084"></a><a class="code" href="classSAMURAI__Perfil.html#a0">00084</a> function <a class="code" href="classSAMURAI__Perfil.html#a0">getId</a>()
52 00086 <span class="keywordflow">return</span> $this-><a class="code" href="classSAMURAI__Perfil.html#o0">_id</a>;
54 <a name="l00096"></a><a class="code" href="classSAMURAI__Perfil.html#a1">00096</a> function <a class="code" href="classSAMURAI__Perfil.html#a1">setId</a>($id)
56 00098 $this-><a class="code" href="classSAMURAI__Perfil.html#o0">_id</a> = $id;
59 <a name="l00107"></a><a class="code" href="classSAMURAI__Perfil.html#a2">00107</a> function <a class="code" href="classSAMURAI__Perfil.html#a2">getDescripcion</a>()
61 00109 <span class="keywordflow">return</span> $this-><a class="code" href="classSAMURAI__Perfil.html#o1">_descripcion</a>;
63 <a name="l00119"></a><a class="code" href="classSAMURAI__Perfil.html#a3">00119</a> function <a class="code" href="classSAMURAI__Perfil.html#a3">setDescripcion</a>($descripcion)
65 00121 $this-><a class="code" href="classSAMURAI__Perfil.html#o1">_descripcion</a> = $descripcion;
68 <a name="l00130"></a><a class="code" href="classSAMURAI__Perfil.html#a4">00130</a> function <a class="code" href="classSAMURAI__Perfil.html#a4">getTipo</a>()
70 00132 <span class="keywordflow">return</span> $this-><a class="code" href="classSAMURAI__Perfil.html#o2">_tipo</a>;
72 <a name="l00142"></a><a class="code" href="classSAMURAI__Perfil.html#a5">00142</a> function <a class="code" href="classSAMURAI__Perfil.html#a5">setTipo</a>($tipo)
74 00144 $this-><a class="code" href="classSAMURAI__Perfil.html#o2">_tipo</a> = $tipo;
77 <a name="l00153"></a><a class="code" href="classSAMURAI__Perfil.html#a6">00153</a> function <a class="code" href="classSAMURAI__Perfil.html#a6">getResponsable</a>()
79 00155 <span class="keywordflow">return</span> $this-><a class="code" href="classSAMURAI__Perfil.html#o4">_responsable</a>;
81 <a name="l00165"></a><a class="code" href="classSAMURAI__Perfil.html#a7">00165</a> function <a class="code" href="classSAMURAI__Perfil.html#a7">setResponsable</a>($responsable)
83 00167 $this-><a class="code" href="classSAMURAI__Perfil.html#o4">_responsable</a> = $responsable;
86 00170 <span class="comment">// ~X2C</span>
88 00172 <span class="comment">// +X2C Operation 229</span>
89 <a name="l00182"></a><a class="code" href="classSAMURAI__Perfil.html#a8">00182</a> <span class="comment"></span> function <a class="code" href="classSAMURAI__Perfil.html#a8">SAMURAI_Perfil</a>(&$db, $id = null) <span class="comment">// ~X2C</span>
91 00184 $this-><a class="code" href="classSAMURAI__Perfil.html#o3">_db</a> = $db;
92 00185 <span class="keywordflow">if</span> (!is_null($id)) {
93 00186 $this-><a class="code" href="classSAMURAI__Perfil.html#a1">setId</a>($id);
94 00187 $this-><a class="code" href="classSAMURAI__Perfil.html#a9">_obtenerDatosDb</a>();
96 00189 <span class="keywordflow">else</span> {
97 00190 <span class="comment">//INICIALIZO LA VI</span>
98 00191 $this-><a class="code" href="classSAMURAI__Perfil.html#o0">_id</a> = null;
99 00192 $this-><a class="code" href="classSAMURAI__Perfil.html#o1">_descripcion</a> = null;
100 00193 $this-><a class="code" href="classSAMURAI__Perfil.html#o2">_tipo</a> = null;
103 00196 <span class="comment">// -X2C</span>
105 00198 <span class="comment">// +X2C Operation 322</span>
106 <a name="l00205"></a><a class="code" href="classSAMURAI__Perfil.html#a9">00205</a> <span class="comment"></span> function <a class="code" href="classSAMURAI__Perfil.html#a9">_obtenerDatosDb</a>() <span class="comment">// ~X2C</span>
108 00207 $sql = include 'Perfil/consultas.php'; <span class="comment">//Incluyo las consultas de este objeto nada mas.</span>
109 00208 $tmp = $sql['obtener_datos_perfil'].$sql['obtener_datos_perfil2'];
110 00209 $dbh = $this-><a class="code" href="classSAMURAI__Perfil.html#o3">_db</a>->prepare($tmp);
111 00210 $tmp = array ($this->getId());
112 00211 $res = $this-><a class="code" href="classSAMURAI__Perfil.html#o3">_db</a>->execute($dbh,$tmp);
114 00213 <span class="keywordflow">if</span> ($re = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
115 00214 <span class="keywordflow">if</span> (isset($re['desc_perfil'])) {
116 00215 $this-><a class="code" href="classSAMURAI__Perfil.html#a3">setDescripcion</a>($re['desc_perfil']);
118 00217 <span class="keywordflow">else</span> {
119 00218 $this-><a class="code" href="classSAMURAI__Perfil.html#a3">setDescripcion</a>();
121 00220 <span class="keywordflow">if</span> (isset($re['tipo_perfil'])) {
122 00221 $this-><a class="code" href="classSAMURAI__Perfil.html#a5">setTipo</a>($re['tipo_perfil']);
124 00223 <span class="keywordflow">else</span> {
125 00224 $this-><a class="code" href="classSAMURAI__Perfil.html#a5">setTipo</a>();
127 00226 <span class="keywordflow">if</span> (isset($re['responsable'])) {
128 00227 $this-><a class="code" href="classSAMURAI__Perfil.html#a7">setResponsable</a>($re['responsable']);
130 00229 <span class="keywordflow">else</span> {
131 00230 $this-><a class="code" href="classSAMURAI__Perfil.html#a7">setResponsable</a>();
135 00234 <span class="comment">// -X2C</span>
137 00236 <span class="comment">// +X2C Operation 323</span>
138 <a name="l00245"></a><a class="code" href="classSAMURAI__Perfil.html#a10">00245</a> <span class="comment"></span> function <a class="code" href="classSAMURAI__Perfil.html#a10">guardarDatos</a>($accion = grabar) <span class="comment">// ~X2C</span>
140 00247 trigger_error('Not implemented!', E_USER_WARNING);
142 00249 <span class="comment">// -X2C</span>
144 00251 <span class="comment">// +X2C Operation 324</span>
145 <a name="l00258"></a><a class="code" href="classSAMURAI__Perfil.html#a11">00258</a> <span class="comment"></span> function <a class="code" href="classSAMURAI__Perfil.html#a11">_grabarDb</a>() <span class="comment">// ~X2C</span>
147 00260 trigger_error('Not implemented!', E_USER_WARNING);
149 00262 <span class="comment">// -X2C</span>
151 00264 <span class="comment">// +X2C Operation 325</span>
152 <a name="l00271"></a><a class="code" href="classSAMURAI__Perfil.html#a12">00271</a> <span class="comment"></span> function <a class="code" href="classSAMURAI__Perfil.html#a12">_borrarDb</a>() <span class="comment">// ~X2C</span>
154 00273 trigger_error('Not implemented!', E_USER_WARNING);
156 00275 <span class="comment">// -X2C</span>
158 00277 <span class="comment">// +X2C Operation 326</span>
159 <a name="l00282"></a><a class="code" href="classSAMURAI__Perfil.html#a13">00282</a> <span class="comment"></span> function <a class="code" href="classSAMURAI__Perfil.html#a13">_modificarDb</a>() <span class="comment">// ~X2C</span>
161 00284 trigger_error('Not implemented!', E_USER_WARNING);
163 00286 <span class="comment">// -X2C</span>
165 00288 <span class="comment">// +X2C Operation 338</span>
166 <a name="l00298"></a><a class="code" href="classSAMURAI__Perfil.html#e0">00298</a> <span class="comment"></span> function <a class="code" href="classSAMURAI__Perfil.html#e0">_getIdPerfiles</a>(&$db) <span class="comment">// ~X2C</span>
168 00300 trigger_error('Not implemented!', E_USER_WARNING);
170 00302 <span class="comment">// -X2C</span>
172 00304 <span class="comment">// +X2C Operation 339</span>
173 <a name="l00312"></a><a class="code" href="classSAMURAI__Perfil.html#e1">00312</a> <span class="comment"></span> function <a class="code" href="classSAMURAI__Perfil.html#e1">getPerfiles</a>(&$db) <span class="comment">// ~X2C</span>
175 00314 trigger_error('Not implemented!', E_USER_WARNING);
177 00316 <span class="comment">// -X2C</span>
179 00318 } <span class="comment">// -X2C Class :SAMURAI_Perfil</span>
182 </pre></div><hr size="1"><address style="align: right;"><small>Generado el Tue Jul 8 11:36:20 2003 para SAMURAI por
183 <a href="http://www.doxygen.org/index.html">
184 <img src="doxygen.png" alt="doxygen" align="middle" border=0 >
185 </a>1.3.2 </small></address>