コード例 #1
0
ファイル: modsesion.php プロジェクト: rramirez0202/pedidos
 private function getPerfiles()
 {
     $this->load->model('modusuario');
     $this->load->model('modperfil');
     $this->load->model('modpermiso');
     $musuario = new Modusuario();
     $musuario->getFromDatabase($this->session->userdata('idusuario'));
     $this->perfiles = array();
     foreach ($musuario->getPerfiles() as $perf) {
         $perfil = new Modperfil();
         $perfil->getFromDatabase($perf);
         array_push($this->perfiles, array("idperfil" => $perf, "permisos" => $perfil->getPermisos()));
     }
 }
コード例 #2
0
ファイル: index.php プロジェクト: rramirez0202/pedidos
								<th>Creado Por</th>
								<th>Cliente</th>
								<th>Fecha/Hora Pedido</th>
								<th>Fecha/Hora Entrega</th>
								<th>Total</th>
								<th>Estado</th>
							</tr>
						</tfoot>
						<tbody>
							<?php 
if ($pedidos !== false) {
    foreach ($pedidos as $pedido) {
        $ped = new Modpedido();
        $ped->setIdpedido($pedido["idpedido"]);
        $ped->getFromDatabase();
        $usr = new Modusuario();
        $usr->setIdusuario($ped->getIdusuario());
        $usr->getFromDatabase();
        $cte = new Modcliente();
        $cte->setIdcliente($ped->getIdcliente());
        $cte->getFromDatabase();
        if (!in_array($ped->getStatus(), $this->config->item("estadospedidomostrar"))) {
            continue;
        }
        ?>
								<tr>
									<td>
										<?php 
        if ($this->modsesion->hasPermisoHijo(43)) {
            ?>
										<a href="<?php