} // get perspectives global $ari; $handle = $ari->url->getVars(); $ari->t->caching = 0; // dynamic content //// check the delete selector, and delete if selected if (isset($_POST['delete_submit']) && isset($_POST['selected_perspectives'])) { foreach ($_POST['selected_perspectives'] as $name_perspective) { // $perspective = new seguridad_perspective($name_perspective); // $perspective->delete(); } } // finally get the data $return = array(); if ($perspectivas = oob_perspective::listPerspectives()) { // show time $i = 0; foreach ($perspectivas as $p) { $return[$i]['name'] = $p; $return[$i]['path'] = $ari->get('filesdir') . DIRECTORY_SEPARATOR . 'perspectives' . DIRECTORY_SEPARATOR . $p; $return[$i]['path2'] = str_replace(DIRECTORY_SEPARATOR, "/", $return[$i]['path']); ++$i; } } $ari->t->assign("perspectives", $return); // display $ari->t->display($ari->module->admintpldir() . "/perspectiveslist.tpl"); ?>
<?php #OOB/N1 Framework [�2004,2005 - Nutus] /* * Created on 17-jun-2005 * @author Victor Stornati (victor.stornati@nutus.com.ar) */ global $ari; $handle = $ari->url->getVars(); $ari->t->caching = false; if (isset($handle[3])) { //todo: falta validacion de handle[1] //if (OOB_validatetext :: isNumeric ($handle[1]) ) //{ $perspective = new oob_perspective($handle[3]); $ari->t->assign("name_perspective", $perspective->name()); //} } else { throw new OOB_exception("INVALID_PERSPECTIVE", "501", "INVALID_PERSPECTIVE", false); } $ari->t->assign("new_name", ""); $ari->t->assign("new_name", $perspective->name()); if (isset($_POST['name'])) { $ari->t->assign("new_name", $_POST['name']); } //Adds the selected roles if (isset($_POST['AddRole']) && isset($_POST['roles_select'])) { foreach ($_POST['roles_select'] as $id_role) { $perspective->addRole($id_role); } }