shop-old/core/shippingareas/edit.class.php
2026-04-20 01:03:43 +02:00

60 lines
1.3 KiB
PHP

<?php
/*
* @version $Id: index.php 10381 2008-06-01 03:35:53Z $
* @package Carteasy
* @copyright Copyright (C) 2005 - 2011 Wlanium
* @license proprietary
* @author Thomas Bartelt
* Carteasy is a web shop system
*/
include_once './core/base/edit.class.php';
class ShippingAreas_Edit extends Base_Edit {
public function __construct($base_object, $id = false) {
parent::__construct($base_object, $id);
} // end __construct
public function get_data($id = false) {
if ($id) {
$this->set_id($id);
}
return $this->select_one('shipping_areas');
} // end get_data
public function delete_data($id = false) {
if ($id) {
$this->set_id($id);
}
return $this->delete_one('shipping_areas');
} // end delete
public function create($data) {
return $this->create_one('shipping_areas', $data);
} // end create
public function update($data, $id = false) {
if ($id) {
$this->set_id($id);
}
return $this->update_one('shipping_areas', $data);
} // end update
public function get_all() {
$result = $this->db->query("SELECT * FROM shipping_areas");
$data = array();
while ($obj = $result->fetch_object()) {
$data[$obj->shipping_area_id] = $obj;
}
return $data;
} // end get_all
}// end ItemTypeDefinition_Edit
/* EOF */