示例#1
0
		function delete() {
			$ip = Loader::helper('validation/ip');
			if (!$ip->check()) {
				$this->set('invalidIP', $ip->getErrorMessage());			
				return;
			}
			$c = Page::getCurrentPage();
			$E = new GuestBookBlockEntry($this->bID, $c->getCollectionID());
			$bo = $this->getBlockObject();
			$E->removeAllEntries( $c->getCollectionID() );
			parent::delete();
		}
示例#2
0
 function delete()
 {
     $db = Loader::db();
     $v = array($this->bID);
     $q = "delete from btSurveyOptions where bID = ?";
     $db->query($q, $v);
     $q = "delete from btSurveyResults where bID = ?";
     $db->query($q, $v);
     return parent::delete();
 }
示例#3
0
 function delete()
 {
     $db = Loader::db();
     $deleteData['questionsIDs'] = array();
     $deleteData['strandedAnswerSetIDs'] = array();
     $miniSurvey = new MiniSurvey();
     $info = $miniSurvey->getMiniSurveyBlockInfo($this->bID);
     //get all answer sets
     $q = "SELECT asID FROM {$this->btAnswerSetTablename} WHERE questionSetId = " . intval($info['questionSetId']);
     $answerSetsRS = $db->query($q);
     //delete the questions
     $deleteData['questionsIDs'] = $db->getAll("SELECT qID FROM {$this->btQuestionsTablename} WHERE questionSetId = " . intval($info['questionSetId']) . ' AND bID=' . intval($this->bID));
     foreach ($deleteData['questionsIDs'] as $questionData) {
         $db->query("DELETE FROM {$this->btQuestionsTablename} WHERE qID=" . intval($questionData['qID']));
     }
     //delete left over answers
     $strandedAnswerIDs = $db->getAll('SELECT fa.aID FROM `btFormAnswers` AS fa LEFT JOIN btFormQuestions as fq ON fq.msqID=fa.msqID WHERE fq.msqID IS NULL');
     foreach ($strandedAnswerIDs as $strandedAnswerIDs) {
         $db->query('DELETE FROM `btFormAnswers` WHERE aID=' . intval($strandedAnswer['aID']));
     }
     //delete the left over answer sets
     $deleteData['strandedAnswerSetIDs'] = $db->getAll('SELECT aset.asID FROM btFormAnswerSet AS aset LEFT JOIN btFormAnswers AS fa ON aset.asID=fa.asID WHERE fa.asID IS NULL');
     foreach ($deleteData['strandedAnswerSetIDs'] as $strandedAnswerSetIDs) {
         $db->query('DELETE FROM btFormAnswerSet WHERE asID=' . intval($strandedAnswerSetIDs['asID']));
     }
     //delete the form block
     $q = "delete from {$this->btTable} where bID = '{$this->bID}'";
     $r = $db->query($q);
     parent::delete();
     return $deleteData;
 }
 public function delete()
 {
     $db = Loader::db();
     $db->query("DELETE FROM btGithubRepositories WHERE bID = ?", array(intval($this->bID)));
     parent::delete();
 }
 function delete()
 {
     $db = Loader::db();
     $db->query("DELETE FROM btSlideshowImg WHERE bID=" . intval($this->bID));
     parent::delete();
 }
 public function delete()
 {
     $db = Loader::db();
     $db->query("DELETE FROM btBuilderPackage WHERE bID = ?", array(intval($this->bID)));
     parent::delete();
 }
 public function delete()
 {
     parent::delete();
 }