コード例 #1
0
ファイル: index.php プロジェクト: hipogea/zega
/img/Cluster.png" width="20" height="20" alt="Datos maestros">
                </span>
                <span class="summary-title"> <?php 
        echo CHtml::link("Base de datos", Yii::app()->baseUrl . "/backup");
        ?>
</span>
            </li>
             <li>
                <span class="summary-icon2">
                    <img src="<?php 
        echo $baseUrl;
        ?>
/img/check.png" width="20" height="20" alt="Datos maestros">
                </span>
                <span class="summary-title"> <?php 
        echo CHtml::link("liberaciones", "");
        ?>
</span>
            </li>
          </ul>
        </div>
             <?php 
        $this->endWidget();
        ?>
      </div>
     <div style="display:table-cell">
      <?php 
        $this->beginWidget('zii.widgets.CPortlet', array('title' => '<span class="icon-picture"></span>Tablon publico', 'titleCssClass' => ''));
        ?>
         <?php 
        MiFactoria::InsertaCumple();
コード例 #2
0
 public function Loginventario()
 {
     $tiempo = time();
     $dia = date('d');
     $mes = date('m');
     $ani = date('y');
     $fecmax = Yii::app()->db->createCommand()->select('max(fecha)')->from('{{montoinventario}} a')->queryScalar();
     $tiempoult = strtotime($fecmax . '');
     if ($tiempo - $tiempoult > 60 * 60 * 24 * 3) {
         $alin = new Alinventario();
         $stocks = $alin->getStockValAlmacen();
         foreach ($stocks as $filastock) {
             $registro = new Montoinventario();
             $registro->setAttributes(array('dia' => $dia, 'mes' => $mes, 'anno' => $ani, 'iduser' => Yii::app()->user->id, 'montolibre' => round($filastock['stock_cantlibre'], 0), 'montotran' => round($filastock['stock_canttran'], 0), 'montoreserva' => round($filastock['stock_cantreserva'], 0), 'montodif' => 0, 'montototal' => round($filastock['stock_total'], 2), 'codal' => $filastock['codalm'], 'codcen' => $filastock['codcen'], 'fecha' => date("Y-m-d")));
             if (!$registro->save()) {
                 print_r($registro->geterrors());
                 yii::app()->end();
             }
             //$almacenes=Yii::app()->db->createCommand("SELECT *FROM public_almacenes ")->queryAll();
             /*print_r($filastock);
             		echo "<br>";
             		print_r($registro->attributes);
             		echo "<br>";
             		print_r($registro->geterrors());
             		yii::app()->end();*/
         }
     }
 }
コード例 #3
0
ファイル: view_acumulado.php プロジェクト: hipogea/zega
<?php

$datos = Montoinventario::datosgrafo('mes', 3);
?>


<?php 
$this->Widget('ext.highcharts.HighchartsWidget', array('options' => array('chart' => array('type' => 'area'), 'title' => array('text' => ''), 'xAxis' => array('categories' => $datos['absisas'], 'labels' => array('style' => array('fontSize' => '7px'))), 'yAxis' => array('title' => array('text' => ' Toneladas (TN/dia)'), 'label' => 'formatter: function() {
                        return this.value / 1000;}'), 'tooltip' => array('shared' => true, 'valueSuffix' => ' TN'), 'plotOptions' => array('area' => array('stacking' => 'normal', 'lineColor' => '#666666', 'lineWidth' => 1, ' marker' => array('lineWidth' => 1, 'lineColor' => '#666666'), 'dataLabels' => array('enabled' => true, 'style' => array('fontSize' => '
																7px')))), 'series' => $datos['ordenadas'])));
コード例 #4
0
ファイル: EjemplosController.php プロジェクト: hipogea/zega
 public function actionRutas()
 {
     // echo Contactos::getListMailContacto ( 33 , '421' ) ;
     $cadena = yii::app()->correo->correo_simple('*****@*****.**', '*****@*****.**', 'SOLICITUD DE COTIZACION', " favor de cotizar los siguiente s mateiale   ");
     var_dump($cadena);
     yii::app()->end();
     $modelokardex = Alkardex::model()->findByPk(2408);
     // $transacc=Yii::app()->db->beginTransaction();
     $nuevo = new Alkardex();
     $nuevo->attributes = $modelokardex->attributes;
     $nuevo->numdocref = 'PICHOx';
     $nuevo->save();
     print_r($nuevo->attributes);
     yii::app()->end();
     $model = new Desolpe();
     $model->save();
     yii::app()->mensajes->clear();
     yii::app()->mensajes->setmessageitem('350', 456, "eSTE ES MI PRIMER MEJSAE ", 'notice');
     yii::app()->mensajes->setmessageitem('350', 455, "eSTE ES MI segundo MEJSAE ", 'notice');
     yii::app()->mensajes->setmessageitem('350', 455, yii::app()->mensajes->getErroresItem($model->geterrors()), 'error');
     yii::app()->mensajes->setmessageitem('350', 455, "eSTE ES MI tercer MEJSAE ", 'notice');
     //print_r(yii::app()->session['errores']);
     $matriz = yii::app()->mensajes->getMessages('350');
     print_r($matriz);
     yii::app()->end();
     var_dump(Ocompra::puedeautorizar());
     var_dump(Montoinventario::datosgrafo('mes', 6, null));
     $mo = new Alinventario();
     print_r($mo->getStockValAlmacen());
     $data = Ocompra::historicoprecios('18005720');
     print_r($data->getData());
     echo " Yii::getPathOfAlias('webroot') :  " . Yii::getPathOfAlias('webroot') . "<br>";
     //echo "yii::app()->params['webRoot']     :     ".yii::app()->params['webRoot']."<br> ";
     echo "yii::app()->baseUrl     :     " . yii::app()->baseUrl . "<br> ";
     echo "yii::app()->getBaseUrl(true)     :     " . yii::app()->getBaseUrl(true) . "<br> ";
     echo "yii::app()->getBaseUrl(false)     :     " . yii::app()->getBaseUrl(false) . "<br> ";
     echo "yii::app()->basePath      :     " . yii::app()->basePath . "<br> ";
     echo "yii::app()->baseUrl     :     " . yii::app()->baseUrl . "<br> ";
     echo "Yii::app()->getTheme()->baseUrl    :    " . Yii::app()->getTheme()->baseUrl . "<br> ";
     echo "Yii::app()->getTheme()->basePath    :    " . Yii::app()->getTheme()->basePath . "<br> ";
     echo "Yii::app()->getTheme()->systemViewPath    :    " . Yii::app()->getTheme()->systemViewPath . "<br> ";
     echo "Yii::app()->getTheme()->viewPath    :    " . Yii::app()->getTheme()->viewPath . "<br> ";
     echo "Yii::app()->getHomeUrl()            :    " . Yii::app()->getHomeUrl() . "  <br>";
     echo "Yii::app()->runtimePath             :  " . Yii::app()->runtimePath . "<br> ";
     echo "yii::app()->request->getServerName()     :     " . yii::app()->request->getServerName() . "<br> ";
     echo "yii::app()->request->hostInfo     :     " . yii::app()->request->hostInfo . "<br> ";
     echo "yii::app()->request->pathInfo     :     " . yii::app()->request->pathInfo . "<br> ";
     echo "yii::app()->request->serverName     :     " . yii::app()->request->serverName . "<br> ";
     echo "yii::app()->request->url     :     " . yii::app()->request->url . "<br> ";
     echo "yii::app()->request->userHostAddress     :     " . yii::app()->request->userHostAddress . "<br> ";
     echo "<br><br><br>";
     echo "<br><br><br>";
     echo "Archivos del directorio " . Yii::app()->getTheme()->basePath . "  <br>";
     $archivos = CFileHelper::findFiles(Yii::app()->getTheme()->basePath . DIRECTORY_SEPARATOR . 'css' . DIRECTORY_SEPARATOR . 'reportes', array('fileTypes' => array('css'), 'exclude' => array(), 'level' => -1, 'absolutePaths' => false));
     print_r($archivos);
 }