Beispiel #1
0
 public function Update()
 {
     $pdo = DataSystem::GetPDO();
     $query = "UPDATE " . System::GetConfigurationValue("Database.TablePrefix") . $this->GetCommentTableName() . " SET comment_Title = :comment_Title, comment_Content = :comment_Content WHERE comment_ID = :comment_ID";
     $statement = $pdo->prepare($query);
     $result = $statement->execute(array(":comment_Title" => $this->Title, ":comment_Content" => $this->Content, ":comment_ID" => $this->ID));
     return $result;
 }
Beispiel #2
0
 public function Delete()
 {
     $pdo = DataSystem::GetPDO();
     $query = "DELETE FROM " . System::GetConfigurationValue("Database.TablePrefix") . "Contents WHERE content_Path = :content_Path AND content_LanguageID = :content_LanguageID";
     $statement = $pdo->prepare($query);
     $result = $statement->execute(array(":content_Path" => $this->Path, ":content_LanguageID" => $this->Language->ID));
     return $result !== false;
 }
Beispiel #3
0
 public static function GetByName($name)
 {
     $pdo = DataSystem::GetPDO();
     $query = "SELECT * FROM " . System::GetConfigurationValue("Database.TablePrefix") . "Themes WHERE theme_Name = :theme_Name";
     $statement = $pdo->prepare($query);
     $result = $statement->execute(array(":theme_Name" => $name));
     if ($statement->rowCount() > 0) {
         $values = $statement->fetch(PDO::FETCH_ASSOC);
         return Theme::GetByAssoc($values);
     }
     return null;
 }
Beispiel #4
0
 public function GetSlices($max = null)
 {
     $pdo = DataSystem::GetPDO();
     $query = "SELECT * FROM " . System::GetConfigurationValue("Database.TablePrefix") . "AvatarBaseSlices";
     $query .= " WHERE slice_BaseID = :slice_BaseID AND slice_ParentSliceID = :slice_ParentSliceID";
     if (is_numeric($max)) {
         $query .= " LIMIT " . $max;
     }
     $statement = $pdo->prepare($query);
     $result = $pdo->execute(array(":slice_BaseID" => $this->Base->ID, ":slice_ParentSliceID" => $this->ID));
     $count = $statement->rowCount();
     $retval = array();
     for ($i = 0; $i < $count; $i++) {
         $values = $result->fetch(PDO::FETCH_ASSOC);
         $retval[] = AvatarBaseSlice::GetByAssoc($values);
     }
     return $retval;
 }
 public static function Get($max = null)
 {
     $pdo = DataSystem::GetPDO();
     $query = "SELECT * FROM " . System::GetConfigurationValue("Database.TablePrefix") . "DashboardPostImpressions";
     if (is_numeric($max)) {
         $query .= " LIMIT " . $max;
     }
     $retval = array();
     $statement = $pdo->prepare($query);
     $result = $statement->execute();
     if ($result === false) {
         return $retval;
     }
     $count = $statement->rowCount();
     for ($i = 0; $i < $count; $i++) {
         $values = $statement->fetch(PDO::FETCH_ASSOC);
         $retval[] = DashboardPostImpression::GetByAssoc($values);
     }
     return $retval;
 }