link = mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD); $this->db = mysql_select_db(DB_NAME); $this->sql = "SELECT * FROM content WHERE content_path='$content_path'"; $this->query = mysql_query($this->sql); while ($result = mysql_fetch_array($this->query)) { $this->content_title = $result['content_title']; $this->content_desc = $result['content_desc']; $this->content_path = $result['content_path']; $this->url = SWB.'index.php?p='.$this->content_path; } } public function get_between($start, $end) { $r = explode($start, $this->content_desc); if (isset($r[1])){ $r = explode($end, $r[1]); return $r[0]; } return ''; } public function is_page($dest = 'frontpage') { if (!isset($_GET['p'])) { if ((!isset($_GET['keywords'])) AND (!isset($_GET['page'])) AND (!isset($_GET['title'])) AND (!isset($_GET['author'])) AND (!isset($_GET['subject'])) AND (!isset($_GET['location']))) { $page = 'frontpage'; } else { $page = 'detail'; } } else { $page = $_GET['p']; } if ($dest === $page) { return 1; } elseif ($dest === 'all') { return 1; } else { return 0; } } public function get_url() { return $this->url; } public function get_content_title() { return $this->content_title; } public function get_content_desc() { return $this->content_desc; } }