<?php #OOB/N1 Framework [2008 - Nutus] - PM // CODIGO POR JPCOSEANI // Script que genera el FORM LISTADO DE PERMISOS if (!seguridad::isAllowed(seguridad_action::nameConstructor('list', 'impuesto', 'impuestos'))) { throw new OOB_exception("Acceso Denegado", "403", "Acceso Denegado. Consulte con su Administrador!", true); } //LIBRERIAS PhpExt_Javascript::sendContentType(); global $ari; $ari->popup = 1; // no mostrar el main_frame $page_size = PAGE_SIZE; //STORE PARA TRAER LOS DATOS $store = new PhpExt_Data_JsonStore(); $store->setUrl("/seguridad/permission/get_permissions")->setRoot("topics")->setTotalProperty("totalCount"); //DEFINICION DE LOS CAMPOS DEL STORE $store->addField(new PhpExt_Data_FieldConfigObject("id")); $store->addField(new PhpExt_Data_FieldConfigObject("nombre")); $store->addField(new PhpExt_Data_FieldConfigObject("descripcion")); $store->addField(new PhpExt_Data_FieldConfigObject("modulo")); $store->addField(new PhpExt_Data_FieldConfigObject("contacto")); $store->addField(new PhpExt_Data_FieldConfigObject("sucursal::nombre")); $store->addField(new PhpExt_Data_FieldConfigObject("sucursal")); $filter_plugin = new PhpExtUx_Grid_GridFilters(); $filter_plugin->addFilter(PhpExt_Grid_FilterConfigObject::createFilter("numeric", "id")); $filter_plugin->addFilter(PhpExt_Grid_FilterConfigObject::createFilter("string", "nombre")); $filter_plugin->addFilter(PhpExt_Grid_FilterConfigObject::createFilter("string", "contacto::apellido")); $filter_plugin->addFilter(PhpExt_Grid_FilterConfigObject::createFilter("string", "sucursal::nombre")); $paging = new PhpExt_Toolbar_PagingToolbar();
<?php /** ######################################## #OOB/N1 Framework [©2004,2006] # # @copyright Pablo Micolini # @license BSD ######################################## */ if (!seguridad::isAllowed(seguridad_action::nameConstructor('phpinfo', 'info', 'about'))) { throw new OOB_exception("Acceso Denegado", "403", "Acceso Denegado. Consulte con su Administrador!", true); } global $ari; $ari->popup = 1; // no mostrar el main_frame ob_start(); phpinfo(); preg_match('%<style type="text/css">(.*?)</style>.*?(<body>.*</body>)%s', ob_get_clean(), $matches); //esto para sacar los estilos del body echo "<br/><div class='phpinfodisplay'><style type='text/css'>\n", join("\n", array_map(create_function('$i', 'return ".phpinfodisplay " . preg_replace( "/,/", ",.phpinfodisplay ", $i );'), preg_split('/\\n/', $matches[1]))), "</style>\n", $matches[2], "\n</div>\n"; $ari->t->display($ari->module->admintpldir() . "/phpinfo.tpl");
<?php #OOB/N1 Framework [�2004,2005 - Nutus] /* * Created on 22-jun-2005 * @author Victor Stornati (victor.stornati@nutus.com.ar) */ if (!seguridad::isAllowed(seguridad_action::nameConstructor('perspectives', 'config', 'admin'))) { throw new OOB_exception("Acceso Denegado", "403", "Acceso Denegado. Consulte con su Administrador!", true); } // 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']);
<?php /** ######################################## #OOB/N1 Framework [©2004,2006] # # @copyright Pablo Micolini # @license BSD ######################################## */ OOB_module::includeClass('seguridad', 'seguridad_permission'); if (!seguridad::isAllowed(seguridad_action::nameConstructor('new', 'permission', 'seguridad'))) { throw new OOB_exception("Acceso Denegado", "403", "Acceso Denegado. Consulte con su Administrador!", true); } global $ari; $ari->t->assign("form", true); $sp = new oob_safepost("form"); $modSelect = ''; $arrModulo = array(); $arrIdModulo = array(); if ($objModulo = OOB_module::listModules()) { foreach ($objModulo as $m) { $arrModulo[] = $m->nicename(); $arrIdModulo[] = $m->name(); if (isset($_POST['cboModulo'])) { //echo $_POST['cboModulo']."<br>"; if ($_POST['cboModulo'] == $m->name()) { $modSelect = $m->name(); } } }
<?php #OOB/N1 Framework [2008 - Nutus] - PM // Código por JPCOSEANI // SCRIPT QUE GENERA EL FORM LISTADO DE MODULOS if (!seguridad::isAllowed(seguridad_action::nameConstructor('update', 'user', 'seguridad'))) { throw new OOB_exception("Acceso Denegado", "403", "Acceso Denegado. Consulte con su Administrador!", true); } PhpExt_Javascript::sendContentType(); global $ari; $ari->popup = 1; // no mostrar el main_frame //STORE PARA TRAER EL LISTADO DE MODULOS $store = new PhpExt_Data_JsonStore(); $store->setUrl("/admin/module/get_modules")->setRoot("topics")->setAutoLoad(true)->setTotalProperty("totalCount"); //AGREGO LOS CAMPOS AL STORE $store->addField(new PhpExt_Data_FieldConfigObject("nicename")); $store->addField(new PhpExt_Data_FieldConfigObject("modulename")); $store->addField(new PhpExt_Data_FieldConfigObject("description")); $store->addField(new PhpExt_Data_FieldConfigObject("checked")); $store->addField(new PhpExt_Data_FieldConfigObject("optional")); //CHECKBOX PARA SELECCIONAR LOS MODULOS $checkColumn = new PhpExtUx_Grid_CheckColumn("Habilitado"); $checkColumn->setDataIndex("checked")->setId("check")->setWidth(55); //AGREGO LAS COLUMNAS A LA GRILLA $col_model = new PhpExt_Grid_ColumnModel(); $col_model->addColumn(PhpExt_Grid_ColumnConfigObject::createColumn("Nombre del Módulo", "nicename", null, 150)); $col_model->addColumn(PhpExt_Grid_ColumnConfigObject::createColumn("Descripción", "description", null, 340)); $col_model->addColumn($checkColumn); //GRILLA $grid = new PhpExt_Grid_GridPanel();
<?php #OOB/N1 Framework [�2004,2005 - Nutus] /* * Created on 22-jun-2005 * @author Victor Stornati (victor.stornati@nutus.com.ar) */ global $ari; $ari->t->caching = 0; // dynamic content if (!seguridad::isAllowed(seguridad_action::nameConstructor('cache', 'config', 'admin'))) { throw new OOB_exception("Acceso Denegado", "403", "Acceso Denegado. Consulte con su Administrador!", true); } $delete = false; if (isset($_POST['delete_button'])) { $delete = true; $ari->clearCache(); } $ari->t->assign("delete", $delete); //display $ari->t->display($ari->module->admintpldir() . "/cache.tpl");
<?php #OOB/N1 Framework [2008 - Nutus] - PM // Código por JPCOSEANI // Script que genera el FORM NUEVO ROL if (!seguridad::isAllowed(seguridad_action::nameConstructor('new', 'role', 'seguridad'))) { throw new OOB_exception("Acceso Denegado", "403", "Acceso Denegado. Consulte con su Administrador!", true); } PhpExt_Javascript::sendContentType(); global $ari; $ari->popup = 1; // no mostrar el main_frame $field_width = 180; //ancho de los controles $grid_id = ''; if (isset($_POST['gid'])) { $grid_id = $_POST['gid']; } //creacion de controles $txt_nombre = PhpExt_Form_TextField::createTextField("txt_nombre", "Nombre")->setMsgTarget(PhpExt_Form_FormPanel::MSG_TARGET_SIDE)->setWidth($field_width); $txt_descripcion = PhpExt_Form_TextArea::createTextArea("txt_descripcion", "Descripción")->setMsgTarget(PhpExt_Form_FormPanel::MSG_TARGET_SIDE)->setWidth($field_width); $chk_anonimo = PhpExt_Form_Checkbox::createCheckbox("chk_anonimo", "Anónimo")->setMsgTarget(PhpExt_Form_FormPanel::MSG_TARGET_SIDE)->setWidth($field_width); $chk_confiados = PhpExt_Form_Checkbox::createCheckbox("chk_confiados", "Confiado")->setMsgTarget(PhpExt_Form_FormPanel::MSG_TARGET_SIDE)->setWidth($field_width); //Boton grabar OnClick $handler_grabar = " \nfunction(){\nthis.findParentByType('form').getForm().submit(\n\t{ \t \n\t\t\t\t\t\t reset : true,\n\t\t\t\t\t waitMsg : 'Enviando Datos',\n\t\t\t\t\t waitTitle : 'Emporika',\t\t\t\t \n\t\t\t grid_reload_id : '{$grid_id}',\n\t\t\t\t new_tab_dir : '/seguridad/role/update',\n\t\t\t\t new_tab_title : 'Modificar Rol',\n new_tab_pass_response_params : { id : 'id'}, \n\t\t\t\t load_tab_here : true\t \n\t}\n\t\n\t);\t\t\t\t\n\t\n}"; $btn_grabar = PhpExt_Button::createTextButton("Grabar", new PhpExt_JavascriptStm($handler_grabar)); //Data_Reader para leer los resultados devueltos $error_reader = new PhpExt_Data_JsonReader(); $error_reader->setRoot("errors"); $error_reader->setSuccessProperty("success"); $error_reader->addField(new PhpExt_Data_FieldConfigObject("id"));
<?php /* Nutus, Todos los derechos reservados 2005 * Creado: 28-nov-2005 * */ 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());
<?php # Nutus [2006 - Nutus, Todos los derechos reservados] /* * Created on 13/08/2005 * @author Flavio Robles (flavio.robles@nutus.com.ar) */ if (!seguridad::isAllowed(seguridad_action::nameConstructor('union', 'state', 'address'))) { throw new OOB_exception("Acceso Denegado", "403", "Acceso Denegado. Consulte con su Administrador!", true); } global $ari; $ari->t->caching = false; $ari->t->assign("error", false); $handle = $ari->url->getVars(); //selector de pais if ($countries = address_country::listCountries(USED, 'name', OPERATOR_EQUAL)) { foreach ($countries as $c) { $array_countries[$c->get('id')] = $c->get('name'); } } $ari->t->assign("countries", $array_countries); //ciudades if ($cities = address_city::listCitiesByStates()) { // show time $i = 0; foreach ($cities as $s) { $array_cities[$i]['id'] = $s->get('id'); $array_cities[$i]['name'] = $s->get('name'); $array_cities[$i]['stateName'] = $s->get('state')->get("name"); $array_cities[$i]['countryName'] = $s->get('state')->get("country")->get("name"); //verifico origenes seleccionados
<?php #OOB/N1 Framework [2008 - Nutus] - PM // Código por JPCOSEANI // Script que genera el FORM NUEVA MONEDA if (!seguridad::isAllowed(seguridad_action::nameConstructor('new', 'currency', 'currency'))) { throw new OOB_exception("Acceso Denegado", "403", "Acceso Denegado. Consulte con su Administrador!", true); } PhpExt_Javascript::sendContentType(); include_once 'PhpExtUx/Multiselect/Itemselector.php'; global $ari; $ari->popup = 1; // no mostrar el main_frame $field_width = 180; //ancho de los controles $separador_decimal = trim($ari->locale->get('decimal', 'numbers')); $grid_id = ''; if (isset($_POST['gid'])) { $grid_id = $_POST['gid']; } //CREACION DE LOS CONTROLES //MONEDA $txt_moneda = PhpExt_Form_TextField::createTextField("txt_moneda", "Moneda")->setMsgTarget(PhpExt_Form_FormPanel::MSG_TARGET_SIDE)->setWidth($field_width); //SIGNO $txt_signo = PhpExt_Form_TextField::createTextField("txt_signo", "Signo")->setMsgTarget(PhpExt_Form_FormPanel::MSG_TARGET_SIDE)->setWidth($field_width); //TIPO DE CAMBIO $opt_tipo_fijo = new PhpExt_Form_Radio(); $opt_tipo_fijo->setBoxLabel("Fijo")->setValue("fixed")->setName("opt-tipo-cambio"); $opt_tipo_flotante = new PhpExt_Form_Radio(); $opt_tipo_flotante->setBoxLabel("Flotante")->setValue("float")->setName("opt-tipo-cambio"); $opt_tipo_flotante->setChecked(true);
<?php # Eumafes v2 [�2005 - Nutus, Todos los derechos reservados] /* * Created on 04-ago-2005 * @author Victor Stornati (victor.stornati@nutus.com.ar) */ OOB_module::includeClass('currency', 'currency_currency'); if (!seguridad::isAllowed(seguridad_action::nameConstructor('view', 'currency', 'currency')) && !seguridad::RequireLogin()) { throw new OOB_exception("Acceso Denegado", "403", "Acceso Denegado. Consulte con su Administrador!"); } global $ari; $handle = $ari->url->getVars(); $ari->t->caching = 0; // dynamic content $sp = new oob_safepost("view"); $ari->t->assign("mostrar", false); //------ Refrescar valores ------ //fecha desde if (!isset($_POST['desdeCheck'])) { $ari->t->assign("desdeChecked", ''); //fecha desde if (isset($_POST['desdeYear']) && isset($_POST['desdeMonth']) && isset($_POST['desdeDay'])) { //begin if $ari->t->assign("desde", $_POST['desdeYear'] . "-" . $_POST['desdeMonth'] . "-" . $_POST['desdeDay']); $ari->t->assign("desdeDisabled", ""); } } else { $ari->t->assign("desdeChecked", 'checked'); $ari->t->assign("desdeDisabled", "disabled"); }