iId = $iId; $this->aTaggedEntries = $this->getTagObject($this->iId)->getTaggedEntries(); } protected function objectGetSQLTable() { return $this->getTagObject()->getSQLTableForAssignments(); } public function create() { return false; } public function update() { $i = 0; foreach($this->aTaggedEntries as $oTag) { $hResult = query_parameters("UPDATE ? SET position = '?' WHERE taggedId = '?'", $this->objectGetSQLTable(), $i, $oTag->objectGetId()); if(!$hResult) return false; $i++; } return true; } public function objectGetEntries() { return false; } public function objectGetHeader() { return null; } public function objectGetTableRow() { return null; } public function outputEditor() { if(sizeof($this->aTaggedEntries) == 0) echo 'This page allows you to sort associated entries, but since there are none . . . have fun!

'; else if(sizeof($this->aTaggedEntries) == 1) echo 'This page allows you to sort associated entries, but since there\'s only one . . . have fun!

'; echo 'The following tags are assigned to this entry; this page allows you to change the order in which they are displayed:

'; $iSize = min(sizeof($this->aTaggedEntries), 10); echo '
'; $i = 0; $shOptions = ''; foreach($this->aTaggedEntries as $oTag) { $shOptions .= '\n"; echo ''; $i++; } echo "
'; echo '
'; echo "\n"; echo '
'; echo ''; echo '
'; } public function getOutputEditorValues($aClean) { $aDBTags = $this->getTagObject($this->iId)->getTaggedEntries(); $this->aTaggedEntries = array(); for($i = 0; $i < sizeof($aDBTags); $i++) { foreach($aDBTags as $oTag) { if($oTag->objectGetId() == $aClean['iTagPlace'.$i]) { $this->aTaggedEntries[] = $oTag; break; } } } if(sizeof($aDBTags) != sizeof($this->aTaggedEntries)) $this->aTaggedEntries = $aDBTags; } public function checkOutputEditorInput($aClean) { $shErrors = ''; return $shErrors; } protected abstract function getTagObject($iId = null, $oRow = null); } ?>