예제 #1
0
	<nav>
		<?php 
nav_html();
?>
	</nav>

	<? if ($per[0]['crear']==1) { button_add_modal("#new"); ?>
	<div id="new" class="modal">
	    <h4>Ingresar Proveedor</h4>
	    <div class="row">
		<form action="?op=insert" method="POST" class="col s12">
			<div class="input-field col s3" >
				<select class='tableInput' name='id_doc' id='id_doc' required>
					<option value='0' disabled selected>Tipo de Documento</option>
					<?php 
foreach ($tipo_doc->findAll() as $td) {
    ?>
						<option value='<? echo $td['id']; ?>'><? echo $td['abr']; ?></option>
					<?php 
}
?>
					</select>
				<label for='id_rol'>Tipo de Documento:</label>
			</div>
			<div class="input-field col s9" >
				<input type="text" name="doc" id='doc' class='validate' required>
				<label for='doc'>Documento de Identidad:</label>
			</div>
			<div class="input-field col s6" >
				<input type="text" name="nom" id='nom' class='validate' required>
				<label for='nom'>Nombres:</label>
예제 #2
0
파일: tipo_doc.php 프로젝트: pedrubiano/pos
				<input class='btn' type="submit" value="Guardar">
				<input class='btn modal-close' type="button" value="Cancelar">
			</div>
		</form>
		</div>
  	</div>
	<? } ?>
	
	<div class='content'>
		<h4>Tipo de Documentos</h4>	
		<table class="bordered hoverable">
			<th>Tipo Documento</th>
			<th>Abreviatura</th>
			<th></th>
			<? 
			if ($lista=$tipo_doc->findAll())
				foreach ($lista as $value) { ?>
					<tr>
						<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><input class='tableInput' type='text' name='abr' id='<? echo $value['id']; ?>' value='<? echo $value['abr']; ?>' 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 Tipo de Documento?</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>
				<? }
			?>
		</table>