コード例 #1
0
 public function fonts($group = null)
 {
     $fonts = $this->dao->getFonts();
     if ($group != null) {
         $fonts = $this->filterFontsByGroup($group, $fonts);
     }
     return $this->returnJson($fonts);
 }
コード例 #2
0
 function __construct()
 {
     // $this->conn = new PDO('mysql:host=localhost;dbname=sistema','root','root');
     parent::__construct();
 }
コード例 #3
0
ファイル: GenericDao.php プロジェクト: pablozabo/Diarco
 public static function getKeyValueListDependent($table, $key, $value, $dependentField, $dependentValue)
 {
     $sql = 'select ' . $key . ', ' . $value . ' from ' . $table . ' where ' . $dependentField . ' = ' . $dependentValue . ' order by ' . $value;
     $params = array();
     return GenericDao::executeQuery($sql, $params, $table, true, false, false);
 }
コード例 #4
0
 function __construct()
 {
     parent::__construct();
 }
コード例 #5
0
ファイル: form.php プロジェクト: kvirella/magrocket-backend
     echo __editor('data.' . $field, $attributes);
     break;
 case 'hidden':
     $attributes = array();
     if (isset($e[1]) && !empty($e[1])) {
         $attributes = $e[1];
     }
     echo __hidden('data.' . $field, $attributes);
     break;
 case 'radio':
     $options = array();
     $params = array();
     if (isset($e[1]) && !empty($e[1])) {
         if (array_key_exists('option_table', $e[1])) {
             if (array_key_exists('option_key', $e[1]) && array_key_exists('option_value', $e[1])) {
                 $_dao = new GenericDao($e[1]['option_table'], $this->da);
                 $params['fields'] = array($e[1]['option_key'], $e[1]['option_value']);
                 $rs = $_dao->find($params);
                 if (!empty($rs)) {
                     foreach ($rs as $v) {
                         $options[$v[$e[1]['option_key']]] = $v[$e[1]['option_value']];
                     }
                 }
             }
         } else {
             $options = $e[1];
         }
     }
     $attributes = array();
     if (isset($e[2]) && !empty($e[2])) {
         $attributes = $e[2];