Exemple #1
0
 {
     static $KB = 1024;
     static $MB = 1048576;
     $size = intval($value);
     if ($size < $KB) {
Exemple #2
0
 /**
  * @Author: ANH DUNG Jul 02, 2014
  * @Todo: get listoption search
  * @Param: $type
  */
 public static function getListOption($type)
 {
     $criteria = new CDbCriteria();
     $criteria->compare('t.type', $type);
     $criteria->order = 't.value';
     $models = self::model()->findAll($criteria);
     $aRes = array();
     foreach ($models as $item) {
         $aRes[round($item->value)] = MyFormat::formatPriceSign($item->value);
     }
     return $aRes;
 }