ah no es diferente pero igual gracias
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú <section class="content">
<section class="col-lg-12 connectedSortable">
<div class="box">
<div class="box-header">
<div class="box-title">Lista De Productos</div>
</div>
<div class="box-body">
<button class="btn btn-primary" id="add_item">New item</button>
<table id="example" class="table table-bordered table-striped">
<thead>
<tr>
<th>Nombre del proveedor</th>
<th>RFC</th>
<th>Teléfono</th>
<th>Correo electrónico</th>
<th>Domicilio</th>
</tr>
</thead>
</table>
</div>
</div>
</section>
</section>
$(function(){
URL_GET_DATATABLE = BASE_URL+'inventory/provider/datatable';
$('#example').DataTable({
"lengthChange": false,
ajax: {
url: URL_GET_DATATABLE,
type: 'POST'
}
});
$('#add_item').on('click',function(){
BootstrapDialog.show({
message: $("<form class='form-inline' id='providerForm'><div class='form-group'><label class='full_name'>Full name</label> <input type='text' class='_full_name form-control' name='full_name'></div><div class='form-group'><label class='phone' for='phone'>Phone</label> <input type='text' class='_phone form-control'></div><div class='form-group'><label class='email' for='email'>E-mail</label> <input type='text' class='_email form-control'></div><div class='form-group'><label class='rfc' for='email'>Rfc</label> <input type='text' class='_rfc form-control'></div><div class='form-group'><label class='address' for='address'>Address</label> <input type='text' class='_address form-control'></div>"),
closable: true,
closeByBackdrop: false,
closeByKeyboard: false,
buttons: [{
id: 'submit',
icon: 'glyphicon glyphicon-send',
label: 'Send ajax request',
cssClass: 'btn-primary',
autospin: true,
action: function (dialogRef) {
dialogRef.enableButtons(false);
dialogRef.setClosable(false);
}
}]
});
});
});
[{"id":"1","sección":"Inventario","data":[{"id":"11","icon":"http:\/\/localhost\/storeLTE\/assets\/img\/sidebar\/items.png","value":"Productos","seccion_id":"1","url":"http:\/\/localhost\/storeLTE\/inventario\/product"},{"id":"14","icon":"http:\/\/localhost\/storeLTE\/assets\/img\/sidebar\/employees.png","value":"Provedores","seccion_id":"1","url":"http:\/\/localhost\/storeLTE\/provedor\/provedor"}]},{"id":"2","sección":"Compras","data":[{"id":"22","icon":"http:\/\/localhost\/storeLTE\/assets\/img\/sidebar\/suppliers.png","value":"Compras","seccion_id":"2","url":"http:\/\/localhost\/storeLTE\/compras\/compras"}]}]
public function getModules($id_module){
if($this->session->userdata('log')){
$data = $this->session->userdata('log');
$menu = array();
$seccions = $this->module->get_rows();
foreach ($seccions as $index => $sección){
$modules = $this->module->query("SELECT CONCAT('".$sección['id']."',storelte_modulo.id) AS id,CONCAT('".base_url('assets/img/sidebar')."','/',storelte_modulo.icon) as icon, storelte_modulo.modulo AS value,storelte_modulo.seccion_id,CONCAT('".base_url()."',storelte_modulo.url) AS url FROM storelte_modulo INNER JOIN storelte_modulo_perfil ON storelte_modulo_perfil.modulo_id = storelte_modulo.id WHERE seccion_id = $sección[id] AND storelte_modulo_perfil.perfiles_id = $data[id] AND storelte_modulo_perfil.STATUS = 1");
$seccions[$index]['data']= $modules;
if (!count($seccions[$index]['data']))
unset($seccions[$index]);
}
foreach ($seccions as $item)
array_push($menu,$item);
$this->json($menu);
}
}
public function get_rows(){
$this->db->select('id,sección');
$this->db->from('storelte_seccion');
return $this->db->get()->result_array();
}
public function query($query){
return
<div class="row">
<h3 class="text-center">Welcome to storeLTE, click a module below to get started!</h3>
<div class="home_module_list">
<div class="module_item">
<?php foreach ($seccions as $session) { ?>
<div class="module_item" title="<?= $session['value'];?>">
<a href="<?= $session['url']; ?>"><img src="<?= $session['icon']; ?>"/></a>
<a href="<?= $session['url']; ?>"><?= $session['value']?></a>
</div>
<?php } ?>
</div>
</div>
</div>
[{"id":"1","sección":"Inventario","data":[{"id":"11","icon":"http:\/\/localhost\/storeLTE\/assets\/img\/sidebar\/items.png","value":"Productos","seccion_id":"1","url":"http:\/\/localhost\/storeLTE\/inventario\/product"},{"id":"14","icon":"http:\/\/localhost\/storeLTE\/assets\/img\/sidebar\/employees.png","value":"Provedores","seccion_id":"1","url":"http:\/\/localhost\/storeLTE\/provedor\/provedor"}]},{"id":"2","sección":"Compras","data":[{"id":"22","icon":"http:\/\/localhost\/storeLTE\/assets\/img\/sidebar\/suppliers.png","value":"Compras","seccion_id":"2","url":"http:\/\/localhost\/storeLTE\/compras\/compras"}]}]
public function getModules($id_module){
if($this->session->userdata('log')){
$data = $this->session->userdata('log');
$menu = array();
$seccions = $this->module->get_rows();
foreach ($seccions as $index => $sección){
$modules = $this->module->query("SELECT CONCAT('".$sección['id']."',storelte_modulo.id) AS id,CONCAT('".base_url('assets/img/sidebar')."','/',storelte_modulo.icon) as icon, storelte_modulo.modulo AS value,storelte_modulo.seccion_id,CONCAT('".base_url()."',storelte_modulo.url) AS url FROM storelte_modulo INNER JOIN storelte_modulo_perfil ON storelte_modulo_perfil.modulo_id = storelte_modulo.id WHERE seccion_id = $sección[id] AND storelte_modulo_perfil.perfiles_id = $data[id] AND storelte_modulo_perfil.STATUS = 1");
$seccions[$index]['data']= $modules;
if (!count($seccions[$index]['data']))
unset($seccions[$index]);
}
foreach ($seccions as $item)
array_push($menu,$item);
$this->json($menu);
}
}
public function get_rows(){
$this->db->select('id,sección');
$this->db->from('storelte_seccion');
return $this->db->get()->result_array();
}
public function query($query){
return
<div class="row">
<h3 class="text-center">Welcome to storeLTE, click a module below to get started!</h3>
<div class="home_module_list">
<div class="module_item">
<?php foreach ($seccions as $session) { ?>
<div class="module_item" title="<?= $session['value'];?>">
<a href="<?= $session['url']; ?>"><img src="<?= $session['icon']; ?>"/></a>
<a href="<?= $session['url']; ?>"><?= $session['value']?></a>
</div>
<?php } ?>
</div>
</div>
</div>