public function fonts($group = null)
 {
     $fonts = $this->dao->getFonts();
     if ($group != null) {
         $fonts = $this->filterFontsByGroup($group, $fonts);
     }
     return $this->returnJson($fonts);
 }
 function __construct()
 {
     // $this->conn = new PDO('mysql:host=localhost;dbname=sistema','root','root');
     parent::__construct();
 }
Exemple #3
0
 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);
 }
 function __construct()
 {
     parent::__construct();
 }
Exemple #5
0
     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];