419 // default to the global read db420 if (!$dbx) {421 global $db;422 $dbx = $db;423 }424 // execute the query425 elapsed('begin SQL: ' . $sql);426 $rows = $dbx->query($sql, PDO::FETCH_OBJ);427 elapsed('end SQL');428 return $rows->fetchAll();429 }430431 function sql_array($SQL, $dbx=NULL){432 $rows = sql($SQL,$dbx);433 $rs = array();
SELECT id FROM news WHERE active = 1 and news.slug = 'breaking:-pa-non-depository-licensees-not-required-to-shut-their-offices-due-to-governor-wolfe's-order'
182 if ($this->settings['database_folder']['where']) {183 $sql .= ' and ' . $this->settings['database_folder']['where'];184 }185 if ($this->settings['database_folder']['order_by']) {186 $sql .= ' order by ' . $this->settings['database_folder']['order_by'];187 }188 \elapsed($sql);189 $rs = sql($sql);190 if (count($rs)) {191 $lookup_id = $rs[0]->id;192 }193 $rs = null;194 }195196 // clear database folder settings
SELECT id FROM news WHERE active = 1 and news.slug = 'breaking:-pa-non-depository-licensees-not-required-to-shut-their-offices-due-to-governor-wolfe's-order'
49 }5051 /*52 @param (string)53 shortcut to checkPath using $path as a string54 */55 public function routePath($path) {56 return $this->checkPath(explode('/', $path), 'pages');57 }5859 /*60 resets found settings to a clean state61 keeps codebases/db/default_page/page_40462 */63 public function cleanSettings() {
breaking:-pa-non-depository-licensees-not-required-to-shut-their-offices-due-to-governor-wolfe's-order
41 $this->db = $o->db;42 if ($o->page_path_default) $this->page_path_default = $o->page_path_default;43 if ($o->page_path_404) $this->page_path_404 = $o->page_path_404;44 $this->uri = $o->uri;45 }4647 public function routeURI() {48 return $this->routePath($this->uri);49 }5051 /*52 @param (string)53 shortcut to checkPath using $path as a string54 */55 public function routePath($path) {
/newsroom/breaking:-pa-non-depository-licensees-not-required-to-shut-their-offices-due-to-governor-wolfe's-order
319320321 /*322 returns an array of properties used to configure a new Page object323 */324 public function getPageProperties() {325326 $this->routeURI();327 $this->checkPagePath();328329 $incpath = ($this->is_default)330 ? substr($this->default_page, 0, strrpos($this->default_page, '/'))331 : null;332333 $path_keys = array_keys($this->page_path);
110 'db' => $db,111 'page_path_404' => $page_404,112 'page_path_default' => $default_page,113 'uri' => $uri['path']114 ));115116 # instantiate page using PageRouter117 $p = new \Sky\Page($router->getPageProperties());118 $p->sky_start_time = $sky_start_time;119120 $protocol = 'http';121 if ($server_ssl_header && $_SERVER[$server_ssl_header]) $protocol = 'https';122 if ($_SERVER['HTTPS']) $protocol = 'https';123124 $p->protocol = $_SERVER['HTTPS'] ? 'https' : 'http';
23 'www.mbanj.com' => 'mbanj.com'24 ];252627 // make sure this folder is writable28 $skyphp_storage_path = "/var/www/storage/";2930 include $skyphp_codebase_path . 'sky.php';