Exemplo n.º 1
0
    }
    $ari->t->assign("error", true);
    $errores = array();
    // errores del usuario
    if ($e = $usuario->error()->getErrors()) {
        $errores = array_merge($e, $errores);
    }
    // errores del perfil
    $perfil->isValid();
    if ($e = $perfil->error()->getErrors()) {
        $errores = array_merge($e, $errores);
    }
    //var_dump ($errores);
    foreach ($errores as $error) {
        $ari->t->assign($error, true);
    }
}
// mostramos los datos en la pantalla
// usuario
$ari->t->assign("usuario", $usuario->get('uname'));
$ari->t->assign("email", $ct->dropHTML($usuario->get('email')));
// asignamos datos del perfil
$ari->t->assign("nombre", $ct->dropHTML($perfil->get('nombre')));
$fecha_nacimiento = $perfil->get('fecha_nacimiento');
if (is_a($fecha_nacimiento, 'Date')) {
    $ari->t->assign("fecha_nacimiento", $ct->dropHTML($fecha_nacimiento->format("%Y-%m-%d")));
}
$ari->t->assign("telefono", $ct->dropHTML($perfil->get('telefono')));
$ari->t->assign("bio", $ct->dropHTML($perfil->get('bio')));
$ari->t->assign("url", $ct->dropHTML($perfil->get('url')));
$ari->t->display($ari->module->usertpldir() . DIRECTORY_SEPARATOR . "perfil_modificar.tpl");
Exemplo n.º 2
0
<?php

global $ari;
$ari->t->force_compile = true;
$ari->t->cache = false;
$ct = new OOB_cleantext();
$limit = 20;
if (!isset($_GET['pos']) || !oob_validatetext::isNumeric($_GET['pos'])) {
    $_GET['pos'] = 0;
}
// check user permissions
if (is_a($ari->user, 'oob_user')) {
    $usuario = $ari->user;
    // asignamos datos del usuario
    if ($perfil_existente = perfil_perfil::existe_usuario($ari->user)) {
        $perfil = $perfil_existente[0];
    }
} else {
    seguridad::requireLogin();
}
// mostramos los datos en la pantalla
$ari->t->assign("nombre", $perfil->name());
$ari->t->assign("telefono", $ct->dropHTML($perfil->get('telefono')));
$ari->t->assign("bio", $ct->dropHTML($perfil->get('bio')));
$ari->t->assign("url", $ct->dropHTML($perfil->get('url')));
$ari->t->assign("foto", $perfil->foto());
$ari->t->assign("mensajes", perfil_mensaje::get_actualizaciones_usuario($_GET['pos']));
$ari->t->assign("mensajes_count", perfil_mensaje::get_actualizaciones_usuario_count());
$ari->t->assign("limit", $limit);
$ari->t->display($ari->module->usertpldir() . DIRECTORY_SEPARATOR . "perfil_actualizaciones.tpl");
Exemplo n.º 3
0
<?php

/*
 * Created on 03/02/2005
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
include "..\\oob_cleantext.php";
$allowed_tags = array('<br>', '<i>');
$ct = new OOB_cleantext($allowed_tags);
$text = '<a href="http://www.yahoo.com">http://www.yahoo.com/</a>' . '<br><b>Yahoo Server</b><br><i>Search Engine</i>';
echo $ct->dropHTML($text) . "<br><br><br>";
echo $ct->dropHTML($text, '<a>,<br>,<i>') . "<br><br><br>";
echo $ct->shortText($text, 10) . "<br>";