function smarty_function_componente($params, &$smarty)
{
    $nucleo = Nucleo::getInstancia();
    if ($params['c'] != "") {
        //llamar la ejecucion del modulo, mostrar salida y aplicar llamado
        $nucleo->ejecutar($params['c'], $params['p'], true, true);
    }
    return;
}
示例#2
0
include_once 'afw/lib/error.class.php';
include_once 'afw/lib/enrutador.class.php';
include_once 'afw/lib/smarty/Smarty.class.php';
include_once 'afw/lib/smarty/SmartyAFW.class.php';
include_once 'afw/lib/adodb/adodb.inc.php';
include_once 'afw/lib/adodb/adodb-active-record.inc.php';
include_once 'afw/lib/libscaffold.class.php';
include_once 'afw/lib/componente.class.php';
include_once 'afw/lib/modelo.class.php';
include_once 'afw/nucleo.class.php';
include_once 'afw/lib/libsesion.class.php';
include_once 'afw/autoload.php';
spl_autoload_register("autoload");
//error_reporting (FATAL + ERROR);
ADODB_Active_Record::$_changeNames = false;
//Obtener la peticion
preg_match("/^.*index.php\\?([^?]*)\\?*(.*)\$/", $_SERVER['REQUEST_URI'], $url);
$url_index = $url[1];
if ($url[2]) {
    $url_index .= "&{$url['2']}";
}
$url_index = explode("&", $url_index);
if (count($url_index) != 0) {
    $peticion = $url_index[0];
} else {
    $peticion = $url_index;
}
$peticion = Enrutador::enrutar($peticion);
$nucleo = Nucleo::getInstancia();
$nucleo->ejecutar($peticion);
exit(0);