} } else { switch ($_GET['sec']) { case "Activate": $controller->__changeStatus($_GET['keywordId'], 1); $controller->listKeywords($_GET); break; case "Inactivate": $controller->__changeStatus($_GET['keywordId'], 0); $controller->listKeywords($_GET); break; case "reports": $controller->showKeywordReports($_GET['keywordId']); break; case "delete": $controller->__deleteKeyword($_GET['keywordId']); $controller->listKeywords($_GET); break; case "edit": $controller->editKeyword($_GET['keywordId']); break; case "new": $controller->set('post', $_GET); $controller->newKeyword(); break; case "import": $controller->set('post', $_GET); $controller->importKeywords(); break; case "keywordbox": $controller->set('keyNull', $_GET['keyNull']);
function __deleteWebsite($websiteId) { $websiteId = intval($websiteId); $sql = "delete from websites where id={$websiteId}"; $this->db->query($sql); # delete all keywords under this website $sql = "select id from keywords where website_id={$websiteId}"; $keywordList = $this->db->select($sql); $keywordCtrler = new KeywordController(); foreach ($keywordList as $keywordInfo) { $keywordCtrler->__deleteKeyword($keywordInfo['id']); } }
function __deleteWebsite($websiteId) { $websiteId = intval($websiteId); $sql = "delete from websites where id={$websiteId}"; $this->db->query($sql); # delete all keywords under this website $sql = "select id from keywords where website_id={$websiteId}"; $keywordList = $this->db->select($sql); $keywordCtrler = new KeywordController(); foreach ($keywordList as $keywordInfo) { $keywordCtrler->__deleteKeyword($keywordInfo['id']); } # remove rank results $sql = "delete from rankresults where website_id={$websiteId}"; $this->db->query($sql); # remove backlink results $sql = "delete from backlinkresults where website_id={$websiteId}"; $this->db->query($sql); # remove saturation results $sql = "delete from saturationresults where website_id={$websiteId}"; $this->db->query($sql); # remove site auditor results $sql = "select id from auditorprojects where website_id={$websiteId}"; $info = $this->db->select($sql, true); if (!empty($info['id'])) { $auditorObj = $this->createController('SiteAuditor'); $auditorObj->__deleteProject($info['id']); } #remove directory results $sql = "delete from dirsubmitinfo where website_id={$websiteId}"; $this->db->query($sql); $sql = "delete from skipdirectories where website_id={$websiteId}"; $this->db->query($sql); }