public function generateOutput() { global $ari; // $ari->internalChrono('p_start'); //start smarty-section template $this->template->caching = 0; if ($ari->get('mode') == 'admin') { $this->template->template_dir = $ari->enginedir . DIRECTORY_SEPARATOR . "admin" . DIRECTORY_SEPARATOR . $ari->agent->getLang(); $this->template->compile_id = $ari->mode . "__" . $ari->agent->getLang() . "__"; } else { $this->template->template_dir = $ari->filesdir . DIRECTORY_SEPARATOR . 'perspectives' . DIRECTORY_SEPARATOR . $this->perspective . DIRECTORY_SEPARATOR . $ari->agent->getLang(); $this->template->compile_id = $ari->agent->getLang() . "_" . $this->perspective . "__"; } // $ari->internalChrono('p_new'); ///end smarty load //check to see if section template exist if (file_exists($this->template->template_dir . DIRECTORY_SEPARATOR . $ari->filename)) { $this->template->assign("maincontent", $ari->get('mod_content')); $this->template->assign("title", $ari->get('title')); $this->template->assign("keywords", $ari->get('keywords')); $this->template->assign("description", $ari->get('description')); $this->template->assign("author", $ari->get('author')); $this->template->assign("encoding", $ari->locale->get('encoding', 'general')); // $ari->internalChrono('p_vars'); if ($ari->get('mode') == 'user') { $this->template->assign("webdir", $ari->webaddress); } // . $this->safeName() if ($ari->get('mode') == 'admin') { $this->template->assign("webdir", $ari->adminaddress); // Modules Selector /* if ($menu = oob_module::adminModulesSelector ()) { $this->template->assign("mod_names", $menu["name"]); $this->template->assign("mod_values", $menu["value"]); $this->template->assign("mod_selected", $menu["selected"]); $this->template->assign("mod_selectedName", $menu["selectedName"]); } // Selected Module Menu $this->template->assign("modulemenu", $ari->module->adminMenu()); */ $this->template->assign("modules_menu", oob_module::adminFullMenu()); $this->template->assign("mod_selected", $ari->module->name()); } //----------------------------------------------------------------------- //@todo => ver si quitar luego if ($ari->get("user")) { $this->template->assign("currentUser", $ari->get("user")->name()); $this->template->assign("logued", true); } else { $this->template->assign("logued", false); } //----------------------------------------------------------------------- // $ari->internalChrono('p_morevars'); $this->template->display($ari->filename); } else { throw new OOB_exception('No existe la plantilla en la perspectiva: ' . $ari->get('filename'), "73", "No existe la plantilla en la perspectiva", true); } // $ari->internalChrono('p_end'); }
/** * Smarty {oob_block} plugin, loads user blocks inside a template * */ function smarty_function_oob_block($params, &$smarty) { global $ari; if (empty($params['module'])) { $smarty->_trigger_fatal_error("[plugin:oob_block] parameter 'module' cannot be empty"); return; } if (empty($params['block'])) { $smarty->_trigger_fatal_error("[plugin:oob_block] parameter 'block' cannot be empty"); return; } $modulo = new oob_module($params['module']); if ($ari->get("mode") == "user" || $ari->get("mode") == "cron") { @(include $modulo->userdir() . DIRECTORY_SEPARATOR . "bl_" . $params['block'] . ".php"); } if ($ari->get("mode") == "admin") { @(include $modulo->admindir() . DIRECTORY_SEPARATOR . "bl_" . $params['block'] . ".php"); } }
# # */ try { @ignore_user_abort ( true ); set_time_limit('200000000'); echo "Executing CRON at " . date("h:i:s") . " ...\n"; require_once ("oob" . DIRECTORY_SEPARATOR . "engine.php"); global $ari; oob_ari::initEngine("cron"); $modulos = oob_module::listModules(); foreach ($modulos as $modulo) { $ari->module = $modulo; print "Modulo: " . $modulo->name() . "\n"; @include ($modulo->admindir() . DIRECTORY_SEPARATOR . 'cron.php'); } print "END CRON"; } catch (OOB_exception $e) { print $e->getUserMessage(); } ?>
* */ if (!seguridad::isAllowed(seguridad_action::nameConstructor('selectforemployee', 'user', 'seguridad'))) { throw new OOB_exception("Acceso Denegado", "403", "Acceso Denegado. Consulte con su Administrador!", true); } global $ari; $handle = $ari->url->getVars(); $ari->t->caching = 0; $ari->popup = true; // valida pos $pos = 0; if (isset($_GET['pos']) && OOB_validatetext::isNumeric($_GET['pos']) && $_GET['pos'] > 0) { $pos = $_GET['pos']; } //levanta el limit $modulo = new oob_module("personnel"); $limit = $modulo->config()->get('limit', 'employee'); $ari->t->assign('limit', $limit); $ari->t->assign('total', oob_user::userCountNoAsigned()); $users = array(); if ($return = oob_user::listNoAssigned('uname', $pos, $limit)) { // show time $i = 0; foreach ($return as $u) { $users[$i]['id'] = $u->get('user'); $users[$i]['uname'] = $u->name(); $users[$i]['unameClean'] = OOB_validatetext::cleanToScript($u->name()); $users[$i]['email'] = $u->get('email'); $users[$i]['status'] = oob_user::getStatus($u->get('status')); ++$i; }
<?php global $ari; $plantilla = $ari->newTemplate(); $plantilla->caching = 0; $plantilla->force_compile = true; $modulo = new oob_module('perfil'); $limit = 4 * 8 - 1; // dejamos un lugar para el link. // 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]; $plantilla->assign("amigos", perfil_amigo::get_mis_amigos_bloque($limit)); $plantilla->display($modulo->usertpldir() . DIRECTORY_SEPARATOR . "bl_amigos.tpl"); } }
<?php #OOB/N1 Framework [2008 - Nutus] - PM // menu JSON para EXT-JS //error_reporting(0); global $ari; $ari->popup = 1; // no mostrar el main_frame $menu = oob_module::adminFullMenu(); $json_menu = array(); foreach ($menu as $datos_padre) { $padre = array(); $padre['cls'] = 'Father-node'; $padre['leaf'] = false; $padre['text'] = $datos_padre['name']; $padre['id'] = $datos_padre['id']; $padre['children'] = array(); if (isset($datos_padre['menu']) && is_array($datos_padre['menu'])) { foreach ($datos_padre['menu'] as $datos_hijo) { $hijo = array(); $hijo['iconCls'] = 'ChildNode'; $hijo['leaf'] = true; $hijo['text'] = $datos_hijo['name']; $hijo['id'] = array($datos_hijo['name'], $ari->adminaddress . '/' . $datos_hijo['link']); // nombre del tab, url $padre['children'][] = $hijo; } } $json_menu[] = $padre; } //RESULTADO
<? # Nutus [©2007 - Nutus, Todos los derechos reservados] /* * Created on 22/06/2007 * @author Flavio Robles (flavio.robles@nutus.com.ar) */ global $ari; $plantilla = $ari->newTemplate(); $plantilla->caching = 0; $modulo = new oob_module ('seguridad'); $plantilla->assign("userID", $ari->get("user")->id()); $plantilla->display($modulo->usertpldir(). "/bl_user_delete.tpl"); ?>
<? /** ######################################## #OOB/N1 Framework [©2004,2006] # # @copyright Pablo Micolini # @license BSD ######################################## */ // LOGIN BLOCK global $ari; $plantilla = $ari->newTemplate(); $plantilla->caching = 0; $modulo = new oob_module ('seguridad'); if ($ari->user) { $plantilla->assign ("logued", true); $plantilla->assign ("uname", $ari->user->get('uname')); } else $plantilla->assign ("logued", false); $plantilla->display($modulo->usertpldir(). "/bl_login.tpl"); ?>
//list modules members if ($modules_miembros = OOB_perspective::listModulesFor($perspective->name())) { $i = 0; $return = array(); foreach ($modules_miembros as $m) { $m = new oob_module($m); $return[$i]['id'] = $m->name(); $return[$i]['name'] = $m->nicename(); ++$i; } $ari->t->assign("modules_miembros", $return); } //end if //search modules no members if ($modules = oob_perspective::searchNoMembers("", DELETED, OPERATOR_DISTINCT, $perspective->name(), MODULE)) { $i = 0; $return = array(); foreach ($modules as $m) { $m = new oob_module($m); $return[$i]['id'] = $m->name(); $return[$i]['name'] = $m->nicename(); ++$i; } $ari->t->assign("modules", $return); } //end if //display $ari->t->display($ari->module->admintpldir() . "/updateperspective.tpl"); ?>