query("select * from rock_seo where seo_url<>'';"); return $result; } public function loadSeo() { $seo_id = $this->escapeString($_REQUEST['id']); $row = $this->query("select * from rock_seo where seo_id='".$seo_id."';"); return $row[0]; } public function saveSeo() { $data = $this->escapeArray($_REQUEST); if ($data['seo_id']!='') { $this->execute("update rock_seo set " . "seo_url='".$data['seo_url']."', " . "seo_title='".$data['seo_title']."', " . "seo_keywords='".$data['seo_keywords']."', " . "seo_description='".$data['seo_description']."' " . "where seo_id='".$data['seo_id']."';"); return true; } else { $this->execute("insert into rock_seo set " . "seo_url='".$data['seo_url']."', " . "seo_title='".$data['seo_title']."', " . "seo_keywords='".$data['seo_keywords']."', " . "seo_description='".$data['seo_description']."';"); return true; } } public function deleteSeo() { $seo_id = $this->escapeString($_REQUEST['id']); $this->execute("delete from rock_seo where seo_id='".$seo_id."';"); return true; } }