'?', 'use_name'=>'Unknown', 'use_admin'=>0, 'use_usertype'=>'user', 'use_theme'=>'classic', 'use_login'=>$p_user); $a=pg_fetch_array($Ret,0); return $a; } /* function GetModeleId * Purpose : Give the mod_id from modeledef * * parm : * - p_cn database connection (repository) * - p_modname template name * gen : * - none * return: * template id or 0 if not found */ function GetModeleId($p_cn,$p_modname) { $Res=ExecSql($p_cn,"select mod_id from modeledef where mod_name='$p_modname'"); if (pg_NumRows($Res) == 0) return 0; $name=pg_fetch_array($Res,0); return $name['mod_id']; } /* function GetArray * purpose return the result of a sql statment * in a array * param : $p_cn database connection * $p_sql sql query */ function GetArray($p_cn,$p_sql) { echo_debug(__FILE__,__LINE__,"GetArray"); $r=ExecSql($p_cn,$p_sql); if ( ($Max= pg_NumRows($r)) == 0 ) return null; $array=pg_fetch_all($r); echo_debug(__FILE__,__LINE__,var_export($array,true)); return $array; } ?>