芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/fmd/lib/Factory/SettingsFactory.php
setCommonDependencies($store, $log, $sanitizerService); } /** * Query * @param array $sort_order * @param array $filter_by * @return array */ public function query($sort_order = null, $filter_by = []) { if ($sort_order == NULL) $sort_order = ['cat', 'ordering']; $SQL = 'SELECT * FROM `setting` WHERE 1 = 1 '; $params = []; if ($this->getSanitizer()->getInt('userChange', $filter_by) !== null) { $SQL .= ' AND userChange = :userChange '; $params['userChange'] = $this->getSanitizer()->getInt('userChange', $filter_by); } if ($this->getSanitizer()->getInt('userSee', $filter_by) !== null) { $SQL .= ' AND userSee = :userSee '; $params['userSee'] = $this->getSanitizer()->getInt('userSee', $filter_by); } // Sorting? if (is_array($sort_order)) $SQL .= 'ORDER BY ' . implode(',', $sort_order); $sth = $this->getStore()->getConnection()->prepare($SQL); $sth->execute($params); return $sth->fetchAll(); } }