Exemple #1
0
 function filteredgrid()
 {
     $this->rapyd->uri->keep_persistence();
     $this->rapyd->load('datafilter', 'datagrid');
     $filter = new DataFilter('', 'gpt_pro');
     $filter->parr = new inputField('Parámetro', 'parr');
     $filter->parr->rule = 'trim|required';
     $filter->parr->clause = '';
     //$filter->submit = new submitField('Buscar', 'submitbtn');
     //$filter->submit->in='parr';
     $filter->buttons('reset', 'search');
     $filter->build();
     $uri = anchor($this->url . 'dataedit/show/<raencode><#id_pro#></raencode>', '<#nom_pro#>', 'target="framedetrepo" onclick="$(\'#cajafiltro\').hide();"');
     //$uri = anchor($this->url.'dataedit/show/<raencode><#id_pro#></raencode>','<#nom_pro#>');
     $grid = new DataGrid('Especialidades farmaceuticas');
     if (strlen($filter->parr->newValue) > 0) {
         $dbparr = $this->db->escape($filter->parr->newValue);
         $grid->db->where('MATCH(nom_pro,pres_pro,lab_pro,gen_pro,mono_pro) AGAINST (' . $dbparr . ')');
     }
     $grid->order_by('nom_pro');
     $grid->per_page = 15;
     $grid->column_orderby('Nombre', $uri, 'nom_pro', 'align="left"');
     $grid->column_orderby('Presentaci&oacute;n', 'pres_pro', 'pres_pro', 'align="left"');
     $grid->column_orderby('Laboratorio', 'lab_pro', 'lab_pro', 'align="left"');
     //$grid->column_orderby('Cod. Pro','cod_pro','cod_pro','align="left"');
     //$grid->column_orderby('Gen. Pro','gen_pro','gen_pro','align="left"');
     $grid->build();
     $data['filtro'] = $filter->output . $grid->output;
     $data['content'] = '<script type="text/javascript"> $(function(){ $("#cajafiltro").show(); }); </script>';
     //$data['content'].= $acti->output;
     $data['content'] .= '<IFRAME src="' . site_url('farmacia/gpt_pro/dummy') . '" width="100%" height="500" scrolling="auto" frameborder="0" name="framedetrepo">iframe no son soportados</IFRAME>';
     $data['head'] = $this->rapyd->get_head() . script('jquery.js') . script('jquery.highlight.js');
     $data['title'] = heading($this->titp);
     $this->load->view('view_ventanas', $data);
 }
Exemple #2
0
function render_field($id, $data, $userId)
{
    $type_hint = FALSE;
    $result = preg_split('/\\./', $id);
    if (count($result) > 1) {
        $id = $result[0];
        $type_hint = $result[1];
    }
    if ($type_hint == 'daterange') {
        if (isset($data["{$id}-from"]) && isset($data["{$id}-to"])) {
            $data[$id] = $data["{$id}-from"] . " to " . $data["{$id}-to"];
        }
    }
    if (!isset($data[$id])) {
        return format_value(NULL);
    }
    if ($type_hint == 'file') {
        return anchor("admin/volunteers/download/{$userId}/{$id}", $data[$id]['name'], array('target' => '_blank'));
    } else {
        if ($type_hint == 'img') {
            return '<div style="padding: 3px; border: 1px solid #ccc; float: left"><img src="' . site_url("admin/volunteers/download/{$userId}/{$id}") . '" height="200"/></div><br clear="all"/>';
        }
    }
    return format_value($data[$id], $type_hint);
}
Exemple #3
0
 function filteredgrid()
 {
     $this->datasis->modulo_id(40, 1);
     $this->rapyd->load("datafilter2", "datagrid");
     //
     $filter = new DataFilter2("", "uejecutora");
     $filter->codigo = new inputField("C&oacute;digo", "codigo");
     $filter->codigo->size = 5;
     //$filter->codigo->clause="likerigth";
     $filter->nombre = new inputField("Nombre", "nombre");
     $filter->nombre->size = 40;
     $filter->nombre->clause = "likerigth";
     //$filter->director = new inputField("Director", "director");
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('presupuesto/uejecuta/dataedit/show/<#codigo#>', '<#codigo#>');
     $grid = new DataGrid("");
     $grid->order_by("codigo", "asc");
     $grid->column_orderby("Unidades Ejecutoras", $uri, "codigo", "align='left'      ");
     //$grid->column_orderby("Codigo administrativo","codigoadm"    ,"codigoadm"     ,"align='left'NOWRAP");
     $grid->column_orderby("Nombre", "nombre", "nombre", "align='left'NOWRAP");
     $grid->column_orderby("Director", "director", "director", "align='left'NOWRAP");
     $grid->add("presupuesto/uejecuta/dataedit/create");
     $grid->build();
     $data['content'] = $grid->output;
     $data['filtro'] = $filter->output;
     $data['title'] = "Unidades Ejecutoras";
     //"  ";
     $data["script"] = script("jquery.js") . "\n";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemple #4
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("", 'pres');
     $filter->numero = new inputField("N&uacute;mero", "numero");
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('nomina/pres/dataedit/show/<#cod_cli#>/<#tipo_doc#>/<#numero#>', '<#numero#>');
     $grid = new DataGrid("");
     $grid->order_by("numero", "asc");
     $grid->per_page = 20;
     $grid->column_orderby("N&uacute;mero", $uri, "numero");
     $grid->column_orderby("Nombre", "nombre", "nombre", "align='left'NOWRAP");
     $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'    ");
     $grid->column_orderby("Tipo", "tipo_doc", "tipo_doc", "align='center'    ");
     $grid->column_orderby("Monto", "monto", "monto", "align='right'     ");
     //		$grid->column("Observaciones","observ1");
     //		$grid->column(".","oberv2");
     $grid->add("nomina/pres/dataedit/create");
     $grid->build();
     //$data['content'] = $filter->output.$grid->output;
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['script'] = script("jquery.js") . "\n";
     $data['title'] = " Adelantos de Prestaciones ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemple #5
0
 function filteredgrid()
 {
     $this->rapyd->load('datafilter', 'datagrid');
     $filter = new DataFilter($this->titp, 'r_sector');
     $filter->id = new inputField('Id', 'id');
     $filter->id->rule = 'trim';
     $filter->id->size = 13;
     $filter->id->maxlength = 11;
     $filter->descrip = new inputField('Descrip', 'descrip');
     $filter->descrip->rule = 'trim';
     $filter->descrip->size = 102;
     $filter->descrip->maxlength = 100;
     $filter->buttons('reset', 'search');
     $filter->build();
     $uri = anchor($this->url . 'dataedit/show/<raencode><#id#></raencode>', '<#id#>');
     $grid = new DataGrid('');
     $grid->order_by('id');
     $grid->per_page = 40;
     $grid->column_orderby('Id', "{$uri}", 'id', 'align="left"');
     $grid->column_orderby('Descrip', "descrip", 'descrip', 'align="left"');
     $grid->add($this->url . 'dataedit/create');
     $grid->build();
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['head'] = $this->rapyd->get_head() . script('jquery.js');
     $data['title'] = $this->titp;
     $this->load->view('view_ventanas', $data);
 }
Exemple #6
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("", 'nomina');
     $filter->nombre = new inputField("Nombre", "nombre");
     $filter->descrip = new inputField("Descripci&oacute;n", "descrip");
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('nomina/nomina/dataedit/show/<#numero#>/<#codigo#>/<#concepto#>/<#fecha#>', '<#numero#>');
     $grid = new DataGrid("");
     $grid->order_by("numero", "asc");
     $grid->per_page = 20;
     $grid->column_orderby("N&uacute;mero", $uri, "numero");
     $grid->column_orderby("Nombre", "nombre", "nombre", "align='left'NOWRAP  ");
     $grid->column_orderby("Descripci&oacute;n", "descrip", "descrip", "align='left'NOWRAP  ");
     $grid->column_orderby("Formula", "formula", "formula", "align='left'NOWRAP  ");
     $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'NOWRAP");
     $grid->add("nomina/nomina/dataedit/create");
     $grid->build();
     //$data['content'] = $filter->output.$grid->output;
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['script'] = script("jquery.js") . "\n";
     $data['title'] = " Nomina ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemple #7
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     //$this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("Filtro de Carta", 'menu');
     $filter->codigo = new inputField("C&oacute;digo", "codigo");
     $filter->codigo->size = 15;
     $filter->descri1 = new inputField("Descripci&oacute;n", "descri1");
     $filter->descri1->size = 35;
     $filter->grupo = new dropdownField("Grupo", "grupo");
     $filter->grupo->option("", "");
     $filter->grupo->options("SELECT grupo,descri1 FROM grme ORDER BY grupo ");
     $filter->grupo->style = "width:180px";
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('hospitalidad/carta/dataedit/show/<#codigo#>', '<#codigo#>');
     $grid = new DataGrid("Lista de Carta");
     $grid->order_by("codigo", "asc");
     $grid->per_page = 10;
     $grid->column("C&oacute;digo", $uri);
     $grid->column("Descripci&oacute;n ", "descri1");
     $grid->column("Grupo", "descgru");
     $grid->column("Base", "base");
     $grid->column("Impuesto", "impuesto");
     $grid->column("Precio", "precio");
     $grid->column("Servicio", "servicio");
     $grid->add("hospitalidad/carta/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "<h1>Carta</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemple #8
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("Buscar", 'tarjeta');
     $filter->tipo = new dropdownField("Tipo", "tipo");
     $filter->tipo->options("SELECT tipo, nombre from tarjeta ORDER BY tipo");
     $filter->tipo->style = "width:180px";
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('ventas/tarjeta/dataedit/show/<#tipo#>', '<#tipo#>');
     $grid = new DataGrid("Lista de Formas de Pago");
     $grid->order_by("nombre", "asc");
     $grid->per_page = 10;
     $grid->column("Tipo", $uri);
     $grid->column("Nombre", "nombre", "nombre");
     $grid->column("Comisi&oacute;n", "comision");
     $grid->column("Impuesto", "impuesto");
     $grid->column("Mensaje", "mensaje");
     $grid->add("ventas/tarjeta/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "<h1>Formas de Pago</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemple #9
0
 function listing()
 {
     $this->load->model('MProduto', '', TRUE);
     $qry = $this->MProduto->listProduto();
     $table = $this->table->generate($qry);
     $tmpl = array('table_open' => '<table id="tabela">');
     $this->table->set_template($tmpl);
     $this->table->set_empty("&nbsp;");
     $this->table->set_heading('Editar', 'Codigo', 'Nome', 'Categoria', 'Unidade', 'Minimo', 'Excluir');
     $table_row = array();
     foreach ($qry->result() as $produto) {
         $table_row = NULL;
         $table_row[] = anchor('Produto/edit/' . $produto->id_produto, '<span class="ui-icon ui-icon-pencil"></span>');
         $table_row[] = $produto->codigo;
         $table_row[] = $produto->nome_produto;
         $table_row[] = $produto->nome_categoria;
         $table_row[] = $produto->nome_apresentacao;
         $table_row[] = $produto->qtd_minima;
         $table_row[] = anchor('Produto/delete/' . $produto->id_produto, '<span class="ui-icon ui-icon-trash"></span>', "onClick=\" return confirm('Tem certeza que deseja remover o registro?')\"");
         $this->table->add_row($table_row);
     }
     $table = $this->table->generate();
     $data['title'] = "Listagem de Produtos - Controle de Estoque";
     $data['headline'] = "Listagem de Produtos";
     $data['include'] = 'Produto_listing';
     $data['data_table'] = $table;
     $this->load->view('template', $data);
 }
Exemple #10
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("Filtro por N&uacute;mero", 'apan');
     $filter->tipo = new inputField("N&uacute;mero", "numero");
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('inventario/anticipos/dataedit/show/<#numero#>', '<#numero#>');
     $grid = new DataGrid("Lista de Aplicaci&oacute;n de Anticipos");
     $grid->order_by("numero", "asc");
     $grid->per_page = 20;
     $grid->column("N&uacute;mero", $uri);
     $grid->column("Fecha", "fecha");
     $grid->column("Tipo", "tipo");
     $grid->column("Clipro", "clipro");
     $grid->column("Nombre", "nombre");
     $grid->column("Monto", "monto");
     $grid->column("Reintegro", "reinte");
     $grid->column("Observaciones", "observa1");
     $grid->column(".", "observa2");
     $grid->column("Transacc", "transac");
     $grid->column("Estampa", "estampa");
     $grid->column("Hora", "hora");
     $grid->column("Usuario", "usuario");
     $grid->add("inventario/anticipos/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "<h1>Aplicaci&oacute;n de Anticipos</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
 /**
  * Grabs all new notifications and adds them to the sender's inform queue.
  *
  * This method gets called by dashboard's hooks file to display new
  * notifications on every pageload.
  *
  * @since 2.0.18
  * @access public
  *
  * @param Gdn_Controller $Sender The object calling this method.
  */
 public static function informNotifications($Sender)
 {
     $Session = Gdn::session();
     if (!$Session->isValid()) {
         return;
     }
     $ActivityModel = new ActivityModel();
     // Get five pending notifications.
     $Where = array('NotifyUserID' => Gdn::session()->UserID, 'Notified' => ActivityModel::SENT_PENDING);
     // If we're in the middle of a visit only get very recent notifications.
     $Where['DateUpdated >'] = Gdn_Format::toDateTime(strtotime('-5 minutes'));
     $Activities = $ActivityModel->getWhere($Where, 0, 5)->resultArray();
     $ActivityIDs = array_column($Activities, 'ActivityID');
     $ActivityModel->setNotified($ActivityIDs);
     $Sender->EventArguments['Activities'] =& $Activities;
     $Sender->fireEvent('InformNotifications');
     foreach ($Activities as $Activity) {
         if ($Activity['Photo']) {
             $UserPhoto = anchor(img($Activity['Photo'], array('class' => 'ProfilePhotoMedium')), $Activity['Url'], 'Icon');
         } else {
             $UserPhoto = '';
         }
         $Excerpt = Gdn_Format::plainText($Activity['Story']);
         $ActivityClass = ' Activity-' . $Activity['ActivityType'];
         $Sender->informMessage($UserPhoto . Wrap($Activity['Headline'], 'div', array('class' => 'Title')) . Wrap($Excerpt, 'div', array('class' => 'Excerpt')), 'Dismissable AutoDismiss' . $ActivityClass . ($UserPhoto == '' ? '' : ' HasIcon'));
     }
 }
Exemple #12
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("", 'civa');
     $filter->fecha = new dateonlyField("Fecha", "fecha", 'd/m/Y');
     $filter->fecha->clause = $filter->fecha->clause = "where";
     $filter->fecha->dbformat = "Y-m-d";
     $filter->fecha->size = 12;
     $filter->tasa = new inputField("Tasa", "Tasa");
     $filter->tasa->size = 12;
     $filter->tasa->maxlength = 6;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('tesoreria/civa/dataedit/show/<#fecha#>', '<dbdate_to_human><#fecha#></dbdate_to_human>');
     $grid = new DataGrid("");
     $grid->order_by("fecha", "asc");
     $grid->per_page = 20;
     $grid->column_orderby("Fecha", $uri, "fecha", "align='center'");
     $grid->column_orderby("Tasa", "tasa", "tasa", "align='right' ");
     $grid->column_orderby("Tasa Reducida ", "redutasa", "redutasa", "align='right' ");
     $grid->column_orderby("Tasa Adicional", "sobretasa", "sobretasa", "align='right' ");
     $grid->add("tesoreria/civa/dataedit/create");
     $grid->build();
     //echo $grid->db->last_query();
     //$data['content'] = $filter->output.$grid->output;
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['script'] = script("jquery.js") . "\n";
     $data['title'] = "Tasa de IVA";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemple #13
0
 public function index()
 {
     $offset = $this->general_lib->get_offset();
     $limit = $this->general_lib->get_limit();
     $total = $this->user_mdl->count_all();
     $xdata['action'] = 'user/search' . $this->_filter();
     $xdata['action_delete'] = 'user/delete' . $this->_filter();
     $xdata['add_btn'] = anchor('user/add', '<span class="glyphicon glyphicon-plus"></span> Tambah', array('class' => 'btn btn-success btn-sm'));
     $xdata['delete_btn'] = '<button id="delete-btn" class="btn btn-danger btn-sm"><span class="glyphicon glyphicon-trash"></span> Delete Checked</button>';
     $this->table->set_template(tbl_tmp());
     $head_data = array('fullname' => 'Fullname', 'username' => 'Username', 'level_name' => 'Level', 'ip_login' => 'Last IP Login', 'user_agent' => 'Last User Agent', 'date_login' => 'Last Login', 'status_name' => 'Status');
     $heading[] = form_checkbox(array('id' => 'selectAll', 'value' => 1));
     $heading[] = '#';
     foreach ($head_data as $r => $value) {
         $heading[] = anchor('user' . $this->_filter(array('order_column' => "{$r}", 'order_type' => $this->general_lib->order_type($r))), "{$value} " . $this->general_lib->order_icon("{$r}"));
     }
     $heading[] = 'Action';
     $this->table->set_heading($heading);
     $result = $this->user_mdl->get()->result();
     $i = 1 + $offset;
     foreach ($result as $r) {
         $this->table->add_row(array('data' => form_checkbox(array('name' => 'check[]', 'value' => $r->id)), 'width' => '10px'), $i++, $r->fullname, $r->username, $r->level_nama, $r->ip_login, $r->user_agent, $r->date_login, '<label class="label label-' . ($r->status_kode == 'ON' ? 'success' : 'danger') . '">' . $r->status_nama . '</label>', anchor('user/edit/' . $r->id . $this->_filter(), 'Edit') . "&nbsp;|&nbsp;" . anchor('user/delete/' . $r->id . $this->_filter(), 'Delete', array('onclick' => "return confirm('you sure')")));
     }
     $xdata['table'] = $this->table->generate();
     $xdata['total'] = page_total($offset, $limit, $total);
     $config = pag_tmp();
     $config['base_url'] = site_url("user" . $this->_filter());
     $config['total_rows'] = $total;
     $config['per_page'] = $limit;
     $this->pagination->initialize($config);
     $xdata['pagination'] = $this->pagination->create_links();
     $data['content'] = $this->load->view('user_list', $xdata, true);
     $this->load->view('template', $data);
 }
    /**
     *
     *
     * @param $Sender
     */
    public function roleController_afterRolesInfo_handler($Sender)
    {
        if (!Gdn::session()->checkPermission('Garden.Settings.Manage')) {
            return;
        }
        ?>
        <div class="row form-group">
            <div class="label-wrap-wide">
                <div class="label"><?php 
        echo t('Enable Private Communities');
        ?>
</div>
                <div class="info"><?php 
        echo t('Once enabled, only members will see inside your community.');
        ?>
</div>
            </div>
            <div class="input-wrap-right">
                <span id="private-community-toggle">
                    <?php 
        if (c('Garden.PrivateCommunity', false)) {
            echo wrap(anchor('<div class="toggle-well"></div><div class="toggle-slider"></div>', 'settings/privatecommunity/on/' . Gdn::session()->TransientKey()), 'span', array('class' => "toggle-wrap toggle-wrap-on"));
        } else {
            echo wrap(anchor('<div class="toggle-well"></div><div class="toggle-slider"></div>', 'settings/privatecommunity/off/' . Gdn::session()->TransientKey()), 'span', array('class' => "toggle-wrap toggle-wrap-off"));
        }
        ?>
                </span>
            </div>
        </div>

        <?php 
    }
Exemple #15
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $filter = new DataFilter("Filtro de Sucursales", 'sucu');
     $filter->codigo = new inputField("C&oacute;digo", "codigo");
     $filter->codigo->size = 10;
     $filter->sucursal = new inputField("Sucursal", "sucursal");
     $filter->sucursal->size = 20;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('supervisor/sucu/dataedit/show/<#codigo#>', '<#codigo#>');
     $grid = new DataGrid("Lista de Sucursales");
     $grid->order_by("codigo", "asc");
     $grid->per_page = 15;
     $grid->column("Sucursal", $uri);
     $grid->column("Nombre", "sucursal");
     $grid->column("URL", "url");
     $grid->column("Prefijo", "prefijo");
     $grid->column("Proteo", "proteo");
     $grid->add("supervisor/sucu/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "<h1>Sucursal</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemple #16
0
 function failed()
 {
     echo 'Maaf, Anda tidak memiliki hak untuk mengakses menu ini!';
     echo anchor(base_url(), 'Dashboard');
     echo '<br/>';
     print_r($this->session->userdata('privilage'));
 }
Exemple #17
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("Filtro de Conceptos", 'icon');
     $filter->codigo = new inputField("Código", "codigo");
     $filter->codigo->size = 20;
     $filter->cedula = new inputField("Concepto", "concepto");
     $filter->cedula->size = 20;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('inventario/concepto/dataedit/show/<#codigo#>', '<#codigo#>');
     $grid = new DataGrid("Lista de Conceptos");
     $grid->order_by("codigo", "asc");
     $grid->per_page = 20;
     $grid->column("Código", $uri);
     $grid->column("Concepto ", "concepto");
     $grid->column("Gasto", "gasto");
     $grid->column("Gastos de:", "gastode");
     $grid->column("Ingreso", "ingreso");
     $grid->column("Ingresos de:", "ingresod");
     $grid->add("hospitalidad/concepto/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = " Otros Conceptos ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemple #18
0
 function filteredgrid()
 {
     $this->datasis->modulo_id(138, 1);
     $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;odigo', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'C&oacute;digo', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'cod_prov'), 'titulo' => 'Buscar Beneficiario');
     $this->rapyd->load("datafilter", "datagrid");
     $bSPRV = $this->datasis->p_modbus($mSPRV, "proveed");
     $mBANC = array('tabla' => 'banc', 'columnas' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'numcuent' => 'Cuenta', 'saldo' => 'Saldo'), 'filtro' => array('codbanc' => 'C&oacute;odigo', 'banco' => 'Banco', 'numcuent' => 'Cuenta', 'saldo' => 'Saldo'), 'retornar' => array('codbanc' => 'codbanc'), 'where' => 'activo = "S"', 'titulo' => 'Buscar Bancos');
     $bBANC = $this->datasis->p_modbus($mBANC, "banc");
     $filter = new DataFilter("");
     //		$filter->db->select(array("fecha","a.tipo tipo","a.cod_prov cod_prov","a.codbanc codbanc1","cheque","a.id id","a.monto","a.observa observa","a.benefi benefi"));
     $filter->db->from("mbanc");
     //$filter->db->join("banc b" ,"a.codbanc=b.codbanc","left");
     //$filter->db->join("sprv c" ,"a.cod_prov=c.proveed","left");
     $filter->db->where("(status = 'A' OR status='AN' OR status='A2' OR status='NC'  OR status='AN') ");
     $filter->db->_escape_char = '';
     $filter->db->_protect_identifiers = false;
     $filter->id = new inputField("Ref.", 'id');
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->dbformat = "Y-m-d";
     $filter->fecha->size = 12;
     $filter->cod_prov = new inputField("Beneficiario", 'cod_prov');
     //		$filter->cod_prov->db_name = "a.cod_prov";
     $filter->cod_prov->size = 6;
     $filter->cod_prov->append($bSPRV);
     $filter->cod_prov->rule = "required";
     $filter->codbanc = new inputField("Banco", 'codbanc');
     //		$filter->codbanc->db_name = "a.codbanc";
     $filter->codbanc->size = 5;
     $filter->codbanc->append($bBANC);
     $filter->cheque = new inputField("Cheque", "cheque");
     //		$filter->cheque->size   = 60;
     //		$filter->cheque->db_name = "a.cheque";
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor($this->url . 'dataedit/show/<#id#>', '<str_pad><#id#>|8|0|' . STR_PAD_LEFT . '</str_pad>');
     $grid = new DataGrid("");
     $grid->db->_escape_char = '';
     $grid->db->_protect_identifiers = false;
     $grid->order_by("numero", "asc");
     $grid->per_page = 20;
     $grid->use_function('substr', 'str_pad');
     $grid->column_orderby("N&uacute;mero", $uri, "id");
     $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'    ");
     //		$grid->column_orderby("Banco"        ,"nombanco"                                      ,"nombanco","align='left'NOWRAP");
     $grid->column_orderby("Cheque", "cheque", "cheque");
     $grid->column_orderby("Monto", "<number_format><#monto#>|2|,|.</number_format>", "monto", "align='right'     ");
     //		$grid->column_orderby("Beneficiario" ,"proveed1"                                      ,"proveed1"  ,"align='left'NOWRAP");
     $grid->column_orderby("Observasion", "observa", "observa", "align='left'NOWRAP");
     //$grid->column("Tipo"             ,"tipo"                                        ,"align='center'");
     //$grid->column("Estado"           ,"status"                                        ,"align='center'");
     $grid->add($this->url . "dataedit/create");
     $grid->build();
     //$data['content'] = $filter->output.$grid->output;
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['script'] = script("jquery.js") . "\n";
     $data['title'] = "{$this->titp}";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
 public function listing()
 {
     $access_level = $this->session->userdata('user_indicator');
     $sources = Visit_Purpose::getThemAll();
     $tmpl = array('table_open' => '<table class="setting_table table table-bordered table-striped">');
     $this->table->set_template($tmpl);
     $this->table->set_heading('Id', 'Name', 'Options');
     foreach ($sources as $source) {
         $array_param = array('id' => $source->id, 'role' => 'button', 'class' => 'edit_user', 'data-toggle' => 'modal', 'name' => $source->Name);
         $links = "";
         if ($source->Active == 1) {
             $links .= anchor('#edit_form', 'Edit', $array_param);
         }
         if ($access_level == "facility_administrator") {
             if ($source->Active == 1) {
                 $links .= " | ";
                 $links .= anchor('visit_management/disable/' . $source->id, 'Disable', array('class' => 'disable_user'));
             } else {
                 $links .= anchor('visit_management/enable/' . $source->id, 'Enable', array('class' => 'enable_user'));
             }
         }
         $this->table->add_row($source->id, $source->Name, $links);
     }
     $data['sources'] = $this->table->generate();
     $data['title'] = "Visit Purposes";
     $data['banner_text'] = "Visit Purposes";
     $data['link'] = "visit";
     $actions = array(0 => array('Edit', 'edit'), 1 => array('Disable', 'disable'));
     $data['actions'] = $actions;
     $this->base_params($data);
 }
Exemple #20
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("Filtro por Descripci&oacute;n", 'conc');
     $filter->concepto = new inputField("Concepto", "concepto");
     $filter->concepto->size = 5;
     $filter->descrip = new inputField("Descripci&oacute;n", "descrip");
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('nomina/conc/dataedit/show/<#concepto#>', '<#concepto#>');
     $grid = new DataGrid("Lista de Conceptos");
     $grid->order_by("concepto", "asc");
     $grid->per_page = 20;
     $grid->column_orderby("Concepto", $uri, 'concepto');
     $grid->column("Tipo", "tipo");
     $grid->column("Descripci&oacute;n", "descrip");
     $grid->column("Tipoa", "tipoa");
     //$grid->column("F&oacute;rmula","formula");
     $grid->add("nomina/conc/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "<h1>Conceptos</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemple #21
0
 public function register()
 {
     $this->form_validation->set_rules('reg_username', 'Username', 'required|trim|alpha_numeric|min_length[6]|max_length[50]|xss_clean|strtolower|callback_check_new_username');
     $this->form_validation->set_rules('reg_name', 'Name', 'trim|min_length[6]|max_length[50]|xss_clean');
     $this->form_validation->set_rules('reg_email', 'Email Address', 'trim|min_length[6]|max_length[50]|valid_email|xss_clean|callback_check_new_email');
     $this->form_validation->set_rules('reg_password', 'Password', 'required|trim|min_length[6]|max_length[50]|xss_clean');
     $this->form_validation->set_rules('reg_conf_password', 'Password Confirmation', 'required|trim|min_length[6]|max_length[50]|matches[reg_password]|xss_clean');
     if ($this->form_validation->run() == FALSE) {
         $this->load->view('view_register');
     } else {
         // we are good. we will process the form
         extract($_POST);
         $this->user_model->register_user($reg_username, $reg_password, $reg_name, $reg_email);
         // Send activation email
         $this->load->library('email');
         $this->email->from('*****@*****.**', 'al');
         $this->email->to($reg_email);
         $this->email->subject('Registration Confirmation');
         $this->load->helper('string');
         $activation_code = random_string('alnum', 10);
         $this->email->message('Click the link below to activate your account' . anchor('http://localhost/codetwo/index.php/user/confirmation_activation/' . $activation_code, 'Confirmation Register'));
         $this->email->send();
         echo "Activation email has been sent to {$reg_email}<br>";
         echo "You have successfully registered!";
     }
 }
Exemple #22
0
 public function index()
 {
     if ($this->session->userdata('user_islogin')) {
         redirect(base_url('admin'));
     }
     $this->load->helper('captcha');
     $vals = array('word' => strtoupper(random_string('alnum', 4)), 'img_path' => './media/captcha/', 'img_url' => base_url() . 'media/captcha/', 'img_width' => '150', 'img_height' => 35, 'expiration' => 720);
     $data = create_captcha($vals);
     if ($this->input->post()) {
         $post = $this->input->post();
         #echo sha1($post['user_id'].md5($post['user_id'].$post['user_pass'])); die;
         $this->_userid = $post['user_id'];
         $this->_userpass = $post['user_pass'];
         $this->form_validation->set_rules('captcha', 'Captcha', 'required');
         $this->form_validation->set_rules('user_id', 'User Id', 'trim|required|min_length[5]|max_length[8]|xss_clean');
         $this->form_validation->set_rules('user_pass', 'Password', 'required|callback_signin_check|xss_clean');
         if ($this->form_validation->run('Login') != false) {
             $this->general->writelog('LOGR', 'Berhasil Login');
             redirect(base_url('admin'));
         }
     }
     $data['menu'] = anchor(base_url(), 'Home', 'title="Home"');
     $data['nav'] = 'Admin';
     $data['sub'] = 'Dashboard';
     $data['contain'] = $this->load->View('sample/blank', $data, true);
     $this->header = $this->load->view('fo/header', $data, true);
     $this->js = $this->load->view('fo/js', array(), true);
     $this->load->view('bo/login/index', $data);
 }
Exemple #23
0
function printS($id)
{
    $ci =& get_instance();
    $s = new Section();
    $s->get_by_id($id);
    $s->e = anchor($ci->app->app_url('edit/') . $s->id, 'Edit');
    $s->d = anchor($ci->app->app_url('delete/') . $s->id, 'Delete');
    $output = "<li>";
    $output .= $s->id . '|';
    $output .= $s->name;
    $output .= add($id, 0, "add first child for {$s->name}");
    $output .= '|';
    $output .= $s->e;
    $output .= '|';
    $output .= $s->d;
    $c = new Section();
    $c->where('parent_section', $id);
    $c->order_by('sort', 'asc');
    $c->get();
    if (count($c->all) > 0) {
        $output .= "<ul>";
        foreach ($c->all as $item) {
            $output .= printS($item->id);
            $output .= "<li>" . add($id, $item->sort + 1) . "</li>";
        }
        $output .= "</ul>";
    }
    $output .= "</li>";
    return $output;
}
 function showOpts()
 {
     //---------------------------------------------------------------------
     //
     //---------------------------------------------------------------------
     global $glChapterID;
     $displayData = array();
     $displayData['formData'] = new stdClass();
     //------------------------------------------------
     // libraries and utilities
     //------------------------------------------------
     $this->load->model('sponsorship/msponsor_charge_pay', 'clsSCP');
     $this->load->model('admin/madmin_aco', 'clsACO');
     $this->load->helper('dl_util/web_layout');
     $this->load->library('generic_form');
     $this->load->model('admin/morganization', 'clsChapter');
     $this->clsChapter->lChapterID = $glChapterID;
     $this->clsChapter->loadChapterInfo();
     $displayData['formData']->strACORadio = $this->clsACO->strACO_Radios($this->clsChapter->chapterRec->lDefaultACO, 'rdoACO');
     //--------------------------
     // breadcrumbs
     //--------------------------
     $displayData['pageTitle'] = anchor('main/menu/reports', 'Reports', 'class="breadcrumb"') . ' | Sponsor Past Due Report';
     $displayData['title'] = CS_PROGNAME . ' | Reports';
     $displayData['nav'] = $this->mnav_brain_jar->navData();
     $displayData['mainTemplate'] = 'reports/pre_spon_past_due_view';
     $this->load->vars($displayData);
     $this->load->view('template');
 }
Exemple #25
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $filter = new DataFilter("Filtro por Expediente", "bi_bienes");
     $filter->id = new inputField("C&oacute;digo", "id");
     $filter->id->size = 10;
     $filter->nombre = new inputField("Nombre", "nombre");
     $filter->nombre->size = 20;
     $filter->descrip = new inputField("Descripci&oacute;n", "descrip");
     $filter->descrip->size = 20;
     $filter->modelo = new inputField("Modelo", "modelo");
     $filter->modelo->size = 20;
     $filter->color = new inputField("Color", "color");
     $filter->color->size = 20;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('bienes/bi_bienes/dataedit/show/<#id#>', '<#id#>');
     $grid = new DataGrid("Lista de muebles");
     $grid->order_by("id", "asc");
     $grid->per_page = 20;
     $grid->column_orderby("Codigo", $uri, "id", "align='center'");
     $grid->column_orderby("Nombren", "nombre", "nombre", "align='center'");
     $grid->column_orderby("Color", "color", "color", "align='center'");
     $grid->column_orderby("Modelo", "modelo", "moldelo", "align='center'");
     $grid->column_orderby("Descripci&oacute;n", "descrip", "descrip", "align='left'");
     //              $grid->column_orderby("Duplicar"             ,$uri_2                        ,"align='center'");
     $grid->add("bienes/bi_bienes/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "Bienes Muebles";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemple #26
0
 function filteredgrid()
 {
     $this->rapyd->load('datafilter', 'datagrid');
     $filter = new DataFilter($this->titp, 'parroquia');
     $filter->id = new inputField('id', 'id');
     $filter->id->rule = 'max_length[11]';
     $filter->id->size = 13;
     $filter->id->maxlength = 11;
     $filter->nombre = new inputField('nombre', 'nombre');
     $filter->nombre->rule = 'max_length[255]';
     $filter->nombre->size = 257;
     $filter->nombre->maxlength = 255;
     $filter->buttons('reset', 'search');
     $filter->build();
     $uri = anchor($this->url . 'dataedit/show/<raencode><#id#></raencode>', '<#id#>');
     $grid = new DataGrid('');
     $grid->order_by('id');
     $grid->per_page = 40;
     $grid->column_orderby('id', "{$uri}", 'id', 'align="left"');
     $grid->column_orderby('nombre', "nombre", 'nombre', 'align="left"');
     $grid->add($this->url . 'dataedit/create');
     $grid->build();
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['head'] = $this->rapyd->get_head() . script('jquery.js');
     $data['title'] = $this->titp;
     $this->load->view('view_ventanas', $data);
 }
Exemple #27
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter2", "datagrid");
     $mSPRV = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'C&oacute;odigo', 'nombre' => 'Nombre', 'contacto' => 'Contacto'), 'filtro' => array('proveed' => 'C&oacute;digo', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'proveed'), 'titulo' => 'Buscar Beneficiario');
     $bSPRV = $this->datasis->modbus($mSPRV);
     $filter = new DataFilter2("Filtro por Producto", 'sinv');
     $filter->codigo = new inputField("C&oacute;digo", "codigo");
     $filter->descrip = new inputField("Descripci&oacute;n", "descrip");
     $filter->descrip->db_name = 'CONCAT_WS(" ",descrip,descrip2)';
     $filter->clave = new inputField("Clave", "clave");
     $filter->proveed = new inputField("Beneficiario", "proveed");
     $filter->proveed->append($bSPRV);
     $filter->proveed->clause = "in";
     $filter->proveed->db_name = '( prov1, prov2, prov3 )';
     $filter->marca = new dropdownField("Marca", "marca");
     $filter->marca->option("", "Todas");
     $filter->marca->options("SELECT TRIM(marca) AS clave, TRIM(marca) AS valor FROM marc ORDER BY marca");
     $filter->buttons("reset", "search");
     $filter->build();
     $link = anchor('/inventario/barras/dataedit/modify/<#id#>', '<#codigo#>');
     $grid = new DataGrid("Lista de Art&iacute;culos");
     $grid->order_by("codigo", "asc");
     $grid->per_page = 20;
     $grid->use_function('str_replace');
     $grid->column("C&oacute;digo", $link);
     $grid->column("Descripci&oacute;n", "descrip");
     $grid->column("Precio 1", "precio1");
     $grid->column("Barras", "barras");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = " Lista de Art&iacute;culos ";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
Exemple #28
0
 function filteredgrid()
 {
     $this->rapyd->load('datafilter', 'datagrid');
     $filter = new DataFilter($this->titp, 'r_interes');
     $filter->ano = new inputField('Ano', 'ano');
     $filter->ano->rule = 'trim';
     $filter->ano->size = 13;
     $filter->ano->maxlength = 11;
     $filter->mes = new inputField('Mes', 'mes');
     $filter->mes->rule = 'trim';
     $filter->mes->size = 13;
     $filter->mes->maxlength = 11;
     $filter->monto = new inputField('Monto', 'monto');
     $filter->monto->rule = 'trim|numeric';
     $filter->monto->css_class = 'inputnum';
     $filter->monto->size = 21;
     $filter->monto->maxlength = 19;
     $filter->buttons('reset', 'search');
     $filter->build();
     $uri = anchor($this->url . 'dataedit/show/<raencode><#ano#></raencode>/<raencode><#mes#></raencode>', '<#ano#>-<#mes#>');
     $grid = new DataGrid('');
     $grid->order_by(' ano desc, mes desc', '');
     $grid->per_page = 40;
     $grid->column_orderby('Ano', "{$uri}", 'ano', 'align="left"');
     $grid->column_orderby('Mes', "<nformat><#mes#></nformat>", 'mes', 'align="right"');
     $grid->column_orderby('Monto', "<nformat><#monto#></nformat>", 'monto', 'align="right"');
     $grid->add($this->url . 'dataedit/create');
     $grid->build();
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['head'] = $this->rapyd->get_head() . script('jquery.js');
     $data['title'] = $this->titp;
     $this->load->view('view_ventanas', $data);
 }
Exemple #29
0
 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $modbus = array('tabla' => 'grcl', 'columnas' => array('grupo' => 'Codigo', 'gr_desc' => 'Descripci&oacute;n'), 'filtro' => array('grupo' => 'C&oacute;digo', 'gr_desc' => 'Descripci&oacute;n'), 'retornar' => array('grupo' => 'grupo'), 'titulo' => 'Buscar Grupo');
     $boton = $this->datasis->modbus($modbus);
     $filter = new DataFilter("Filtro Maestro de Gastos", 'mgas');
     $filter->codigo = new inputField("C&oacute;digo", "codigo");
     $filter->codigo->size = 20;
     $filter->cuenta = new inputField('Cuenta contable', 'cuenta');
     $filter->cuenta->like_side = 'after';
     $filter->descrip = new inputField("Descripci&oacute;n", "descrip");
     $filter->descrip->size = 20;
     $filter->grupo = new inputField("Grupo", "grupo");
     $filter->grupo->size = 20;
     $filter->grupo->append($boton);
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('finanzas/mgas/dataedit/show/<#codigo#>', '<#codigo#>');
     $grid = new DataGrid("Lista de Maestro de Gastos");
     $grid->order_by("codigo", "asc");
     $grid->per_page = 15;
     $grid->column_orderby("C&oacute;digo", $uri, 'codigo');
     $grid->column("Tipo", "tipo");
     $grid->column_orderby("Descripci&oacute;n", "descrip", 'descrip');
     $grid->column_orderby("Grupo", "grupo", 'grupo');
     $grid->column_orderby('Nombre del Grupo', 'nom_grup', 'nom_grup');
     $grid->add("finanzas/mgas/dataedit/create");
     $grid->build();
     $data['content'] = $filter->output . $grid->output;
     $data['title'] = "<h1>Maestro de Gastos</h1>";
     $data["head"] = $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
 /**
  * Create the form elements to map matrix fields
  *
  * @param string $field_name 
  * @param string $field_label 
  * @param string $field_type 
  * @param string $data 
  * @return void
  * @author Andrew Weaver
  */
 function display_configuration($field_name, $field_label, $field_type, $data)
 {
     $config = array();
     $config["label"] = form_label($field_label) . BR . anchor("http://brandnewbox.co.uk/support/details/datagrab_and_matrix_fields", "(&#946;eta notes)", 'class="help"');
     $this->EE->db->select("col_id, col_label");
     $query = $this->EE->db->get("exp_matrix_cols");
     $matrix_columns = array();
     foreach ($query->result_array() as $row) {
         $matrix_columns[$row["col_id"]] = $row["col_label"];
     }
     $cells = form_hidden($field_name, "1");
     foreach ($data["field_settings"][$field_name]["col_ids"] as $col_id) {
         if (isset($data["default_settings"]["cf"][$field_name . "_columns"])) {
             $default_cells = $data["default_settings"]["cf"][$field_name . "_columns"];
         } else {
             $default_cells = array();
         }
         $cells .= "<p>" . $matrix_columns[$col_id] . NBS . ":" . NBS . form_dropdown($field_name . "_columns[" . $col_id . "]", $data["data_fields"], isset($default_cells[$col_id]) ? $default_cells[$col_id] : '') . "</p>";
     }
     $column_options = array();
     $column_options["-1"] = "Delete all existing rows";
     $column_options["0"] = "Keep existing rows and append new";
     $sub_options = array();
     foreach ($data["field_settings"][$field_name]["col_ids"] as $col_id) {
         $sub_options[$col_id] = $matrix_columns[$col_id];
     }
     $column_options["Update the row if this column matches:"] = $sub_options;
     $cells .= "<p>" . "Action to take when an entry is updated: " . form_dropdown($field_name . "_unique", $column_options, isset($data["default_settings"]["cf"][$field_name . "_unique"]) ? $data["default_settings"]["cf"][$field_name . "_unique"] : '') . "</p>";
     $config["value"] = $cells;
     return $config;
 }