Example #1
0
 /**
  * Gets the data in array mode.
  *
  * @param integer $pageID The page DB ID which contains the client space
  * @param integer $clientSpaceID The client space DB ID which contains the row
  * @param integer $rowID The row DB ID which contains the block
  * @param integer $location The location of the page
  * @param boolean $public The needed precision for USERSPACE location
  * @return array(mixed=>mixed) The data indexed by data type (value, file, alt_tag, ...), or false on failure (table not found)
  * @access public
  */
 function getRawData($pageID, $clientSpaceID, $rowID, $location, $public)
 {
     parent::getRawData($pageID, $clientSpaceID, $rowID, $location, $public);
     $table = $this->_getDataTableName($location, $public);
     if (!$table) {
         $this->raiseError("Unknown table");
         return false;
     }
     $sql = "\n\t\t\tselect\n\t\t\t\t*\n\t\t\tfrom\n\t\t\t\t" . $table . "\n\t\t\twhere\n\t\t\t\tpage='" . $pageID . "'\n\t\t\t\tand clientSpaceID='" . $clientSpaceID . "'\n\t\t\t\tand rowID='" . $rowID . "'\n\t\t\t\tand blockID='" . $this->_tagID . "'\n\t\t";
     $q = new CMS_query($sql);
     if (!$q->hasError()) {
         if ($q->getNumRows()) {
             $r = $q->getArray();
             $r['value'] = unserialize($r['value']);
             $this->_dbID = $r["id"];
             $this->_pageID = $r["page"];
             $this->_clientSpaceID = $r["clientSpaceID"];
             $this->_rowID = $r["rowID"];
             $this->_tagID = $r["blockID"];
             $this->_value = $r["value"];
             return $r;
         } else {
             return array("value" => array());
         }
     } else {
         return false;
     }
 }
Example #2
0
 /**
  * Gets the data in array mode.
  *
  * @param integer $pageID The page DB ID which contains the client space
  * @param integer $clientSpaceID The client space DB ID which contains the row
  * @param integer $rowID The row DB ID which contains the block
  * @param integer $location The location of the page
  * @param boolean $public The needed precision for USERSPACE location
  * @return array(mixed=>mixed) The data indexed by data type (value, file, alt_tag, ...), or false on failure (table not found)
  * @access public
  */
 function getRawData($pageID, $clientSpaceID, $rowID, $location, $public)
 {
     parent::getRawData($pageID, $clientSpaceID, $rowID, $location, $public);
     $table = $this->_getDataTableName($location, $public);
     if (!$table) {
         $this->raiseError("Unknown table");
         return false;
     }
     $sql = "\n\t\t\tselect\n\t\t\t\t*\n\t\t\tfrom\n\t\t\t\t" . $table . "\n\t\t\twhere\n\t\t\t\tpage='" . $pageID . "'\n\t\t\t\tand clientSpaceID='" . $clientSpaceID . "'\n\t\t\t\tand rowID='" . $rowID . "'\n\t\t\t\tand blockID='" . $this->_tagID . "'\n\t\t";
     $q = new CMS_query($sql);
     if (!$q->hasError()) {
         if ($q->getNumRows()) {
             return $q->getArray();
         } else {
             return array("file" => "", "enlargedFile" => "", "label" => "", "externalLink" => "");
         }
     } else {
         return false;
     }
 }
Example #3
0
 /**
  * Gets the data in array mode.
  *
  * @param integer $pageID The page DB ID which contains the client space
  * @param integer $clientSpaceID The client space DB ID which contains the row
  * @param integer $rowID The row DB ID which contains the block
  * @param integer $location The location of the page
  * @param boolean $public The needed precision for USERSPACE location
  * @return array(mixed=>mixed) The data indexed by data type (value, file, alt_tag, ...), or false on failure (table not found)
  * @access public
  */
 function getRawData($pageID, $clientSpaceID, $rowID, $location, $public)
 {
     parent::getRawData($pageID, $clientSpaceID, $rowID, $location, $public);
     $table = $this->_getDataTableName($location, $public);
     if (!$table) {
         $this->raiseError("Unknown table");
         return false;
     }
     $sql = "\n\t\t\tselect\n\t\t\t\t*\n\t\t\tfrom\n\t\t\t\t" . $table . "\n\t\t\twhere\n\t\t\t\tpage='" . $pageID . "'\n\t\t\t\tand clientSpaceID='" . $clientSpaceID . "'\n\t\t\t\tand rowID='" . $rowID . "'\n\t\t\t\tand blockID='" . $this->_tagID . "'\n\t\t";
     $q = new CMS_query($sql);
     if (!$q->hasError()) {
         if ($q->getNumRows()) {
             return $q->getArray();
         } else {
             return array("file" => "", "name" => "", "width" => "200", "height" => "100", "version" => "9.0.0", "params" => "wmode:'transparent'", "flashvars" => "", "attributes" => "");
         }
     } else {
         return false;
     }
 }