コード例 #1
0
ファイル: grouping.php プロジェクト: hughnguy/php
$SESSION = new \Zend_Session_Namespace('internal', true);
if (!isset($SESSION->lang)) {
    $SESSION->lang = DEFAULT_LANGUAGE;
}
\Locale::setDefault($SESSION->lang);
$l10n->setLanguage($SESSION->lang);
//============================================================================================
// Model
//============================================================================================
require 'models/grouping.php';
require 'models/cpu.php';
require 'models/mon.php';
require 'models/per.php';
require 'models/key.php';
require 'models/furniture.php';
$cpu = new Cpu();
$mon = new Monitor();
$per = new Peripheral();
$key = new Key();
$furniture = new Furniture();
$equip = new Grouping();
//============================================================================================
// Load the page requested by the user
//============================================================================================
if (!isset($_GET['page'])) {
    $data = $equip->listItems();
    for ($i = 0; $i < count($data); $i++) {
        $z = $equip->countItems($data[$i]['group_id']);
        $data[$i]['noi'] = $z[0]['count'];
    }
    $employees = $equip->listEmployees();
コード例 #2
0
ファイル: visitor.php プロジェクト: EdenChan/Instances
 public function visitCpu(Cpu $cpu)
 {
     echo "hello, " . $cpu->getName() . "\n";
 }
コード例 #3
0
 public static function findByNbCoeur($nbCoeur)
 {
     $data = BaseSingleton::select('SELECT cpu.id as id, ' . 'cpu.nb_coeur as nb_coeur, ' . 'cpu.visible as visible ' . ' FROM cpu' . ' WHERE LOWER(cpu.nb_coeur) = LOWER(?)', array('i', &$nbCoeur));
     $cpus = new Cpu();
     if (sizeof($data) > 0) {
         $cpus->hydrate($data[0]);
     } else {
         $cpus = null;
     }
     return $cpus;
 }
コード例 #4
0
ファイル: CpuController.php プロジェクト: jencina/checklist
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Cpu the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Cpu::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
コード例 #5
0
ファイル: cpu.php プロジェクト: hughnguy/php
//============================================================================================
// Session, configuration file, localization constructor
//============================================================================================
require '../includes/php/bootstrap.php';
$SESSION = new \Zend_Session_Namespace('internal', true);
if (!isset($SESSION->lang)) {
    $SESSION->lang = DEFAULT_LANGUAGE;
}
\Locale::setDefault($SESSION->lang);
$l10n->setLanguage($SESSION->lang);
//============================================================================================
// Model
//============================================================================================
require 'models/cpu.php';
$equip = new Cpu();
//============================================================================================
// Load the page requested by the user
//============================================================================================
if (!isset($_GET['page'])) {
    if (!isset($_GET['status'])) {
        $_GET["status"] = '0';
    }
    if (!isset($_GET['dep'])) {
        $_GET['dep'] = $SESSION->department;
        if ($_GET['dep'] === '8') {
            $cur_dep = '0';
        } else {
            $cur_dep = $_GET['dep'];
        }
    } else {
コード例 #6
0
ファイル: update.php プロジェクト: jencina/checklist
                    <div class="col-md-6">
                        <?php 
        echo $form->textFieldGroup($migracion, 'ram_despues', array('wrapperHtmlOptions' => array('class' => 'col-sm-5')));
        ?>
                    </div>

                    <div class="col-md-6">
                        <?php 
        echo $form->textFieldGroup($migracion, 'disco_despues', array('wrapperHtmlOptions' => array('class' => 'col-sm-5')));
        ?>
                    </div>


                    <div class="col-md-6">
                        <?php 
        echo $form->dropDownListGroup($migracion, 'cpu_id_despues', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => CHtml::listData(Cpu::model()->findAll(), 'id', 'procesador', 'marca'), 'htmlOptions' => array('prompt' => 'Seleccione Cpu'))));
        ?>
                    </div>

                    <div class="col-md-6">
                        <?php 
        echo $form->dropDownListGroup($migracion, 'monitor_id_despues', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => CHtml::listData(Monitor::model()->findAll(), 'id', 'modelo', 'marca'), 'htmlOptions' => array('prompt' => 'Seleccione Monitor'))));
        ?>
                    </div>


                </div>
            </div>
        </div>
        <?php 
    }