Exemplo n.º 1
0
 public function insertPermisoMenu()
 {
     $rol = new Rol();
     foreach ($rol->findAll() as $value) {
         $sql = "INSERT INTO " . $this->table . " (id_rol,id_submenu,id_menu) ";
         $sql .= "VALUES ('" . $value['id'] . "','" . $this->id . "','" . $this->id_menu . "')";
         $stmt = DB::execute($sql);
     }
 }
Exemplo n.º 2
0
				<input type="text" name="ape" id='ape' class='validate' required>
				<label for='ape'>Apellidos:</label>
			</div>
			<div class="input-field col s6" >
				<input type="text" name="user" id='user' class='validate'  required>
				<label for='user'>Usuario:</label>
			</div>
			<div class="input-field col s6">
				<input type="password" name="pwd" id='pwd' class='validate'  required>
				<label for='pwd'>Password:</label>
			</div>
			<div class="input-field col s12" >
				<select class='tableInput' name='id_rol' id='id_rol' <? if ($per[0]['editar']==0) echo "disabled"; ?> required>
					<option value='0' disabled selected>Seleccione Rol de Usuario</option>
					<?php 
foreach ($rol->findAll() as $r) {
    ?>
						<option value='<? echo $r['id']; ?>'><? echo $r['nom']; ?></option>
					<?php 
}
?>
					</select>
				<label for='id_rol'>Rol de Usuario:</label>
			</div>
			<div>
				<input class='btn' type="submit" value="Guardar">
				<input class='btn modal-close' type="button" value="Cancelar">
			</div>
		</form>
		</div>
  	</div>
Exemplo n.º 3
0
			<div>
				<input class='btn' type="submit" value="Guardar">
				<input class='btn modal-close' type="button" value="Cancelar">
			</div>
		</form>
  	</div>
  	<? } ?>
	
	<div class='content row'>
		<h4>Roles de Usuario</h4>	
		<div class='col s4'>
		<table class="bordered hoverable" align='center' style='width:300px;'>
			<th></th>
			<th>Rol</th>
			<? 
				if ($lista=$rol->findAll())
				foreach ($lista as $value) {
					?>
					<tr>
						<td><input type='radio' name='ver' value='<? echo $value['id']; ?>' onClick='javascript:cargarRoles(this.value);'></td>
						<td><input class='tableInput' type='text' name='nom' id='<? echo $value['id']; ?>' value='<? echo $value['nom']; ?>' onchange='javascript:updateField(this.name,this.id,this.value);' <? if ($per[0]['editar']==0) echo "disabled"; ?>></td>

						<td><?php 
if ($per[0]['eliminar'] == 1) {
    echo "<a onclick=\"toast(&apos;<span>¿Seguro Desea Borrar Este Rol?</span><a class=&quot;btn-flat yellow-text&quot; href=&quot;?op=delete&id=" . $value['id'] . "&quot;>Confirmar<a>&apos;, 5000)\"><i class='large mdi-content-clear'></i></a>";
}
?>
</td>

					</tr>
				<? }