/**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
         $wpdb->update($wpdb->prefix . $this->table_name, array('donation_amount' => $this->donation_amount), array('id' => $this->id), array('%f'), array('%d'));
     }
 }
 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
     }
     $wpdb->update($wpdb->prefix . $this->table_name, array('tickets_sent' => $this->wereTicketsSent() ? 1 : 0), array('id' => $this->id), array('%d'), array('%d'));
 }
 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
     }
     $wpdb->update($wpdb->prefix . $this->table_name, array('message' => $this->message, 'color' => $this->color), array('id' => $this->id), array('%s', '%s'), array('%d'));
 }
 public function doPOST()
 {
     require_once DB_PATH . '/core/lib/entry.php';
     $id = intval($this->request->entry);
     try {
         $entry = new Entry($this->db, $id);
         if (!($this->auth->authenticated() && $entry->get('user') == $_SESSION['auth_id'])) {
             $entry->check_pass($_POST['password']);
         }
         $entry->update_tags($_POST['tags']);
         $entry->update('title', $_POST['title']);
         $entry->update('safe', intval($_POST['rating']));
         $entry->save();
         redirect('view', $id);
     } catch (Exception $e) {
         die($e->GetMessage());
         redirect('edit', $id);
     }
 }
 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
         $wpdb->update($wpdb->prefix . $this->table_name, array('amount' => $this->amount, 'position' => $this->position, 'local_position' => $this->local_position, 'local_email' => $this->local_email, 'local_phone' => $this->local_phone, 'local_first_name' => $this->local_first_name, 'local_last_name' => $this->local_last_name, 'local_address' => $this->local_address, 'local_city' => $this->local_city, 'local_state' => $this->local_state !== NULL ? substr($this->local_state, 0, 2) : NULL, 'local_zip' => $this->local_zip, 'level' => $this->level, 'url' => $this->url), array('id' => $this->id), array('%f', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s'), array('%d'));
     }
 }
 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
     }
     $wpdb->update($wpdb->prefix . $this->table_name, array('vegetarian_qty' => $this->vegetarian_qty, 'tickets_sent' => $this->wereTicketsSent() ? 1 : 0, 'is_sponsor' => $this->isSponsor() ? 1 : 0, 'is_upgraded' => $this->isUpgraded() ? 1 : 0), array('id' => $this->id), array('%d', '%d', '%d', '%d'), array('%d'));
 }
 public function createentry($authenticated = false)
 {
     try {
         $entry = new Entry($this->db);
         $entry->update('title', $this->title);
         $entry->update('type', $this->type);
         $entry->update('size', $this->size);
         $entry->update('width', $this->width);
         $entry->update('height', $this->height);
         $entry->update('ip', $this->host);
         $entry->update('password', $this->password);
         $entry->update('safe', $this->worksafe);
         $entry->update('hash', $this->hash);
         if ($authenticated) {
             $entry->update('user', $_SESSION['auth_id']);
         }
         $nsid = $_SESSION['namespace_id'] ? $_SESSION['namespace_id'] : DB_PUBNS;
         if ($nsid != DB_PUBNS) {
             $ns = new DBNamespaces($this->db);
             if (!$ns->check_permission($nsid, $_SESSION['auth_id'], ACL_WRITE)) {
                 throw new ImageException('no permission to upload into this namespace');
             }
         }
         $entry->update('namespace', $nsid);
         $entry->save();
         $this->entryid = $entry->get_id();
         return true;
     } catch (Exception $e) {
         throw new ImageException('application error while creating entry', true);
     }
 }
 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
         $wpdb->update($wpdb->prefix . $this->table_name, array('entry_types' => $this->getEntryTypes(TRUE), 'float_parking_spaces' => $this->float_parking_spaces, 'float_parking_space_cost' => $this->float_parking_space_cost, 'donation_amount' => $this->donation_amount, 'description' => $this->description, 'needs_amped_sound' => $this->needs_amped_sound, 'group_size' => $this->group_size), array('id' => $this->id), array('%s', '%d', '%f', '%f', '%s', '%d', '%d'), array('%d'));
     }
 }
 /**
  *
  */
 public function update()
 {
     global $wpdb;
     if ($this->id !== NULL) {
         parent::update();
         $wpdb->update($wpdb->prefix . $this->table_name, array('entry_type_id' => $this->entry_type_id, 'is_corner_booth' => $this->is_corner_booth, 'price_for_corner_booth' => $this->price_for_corner_booth, 'description' => $this->getDescription()), array('id' => $this->id), array('%d', '%d', '%f', '%s'), array('%d'));
     }
 }