--- /dev/null
+<?php
+
+class AccountName extends DatabaseTable {
+
+ public function __construct($id)
+ {
+ if (is_numeric($id))
+ parent::__construct('account_names', $id);
+ else
+ parent::__construct('account_names', $id, 'blz_kto');
+ }
+
+}
+
+?>
global $db;
$this->db = $db;
}
+
+ public function salesText()
+ {
+ $sales = new Sales($_POST['id']);
+ $sales->setDescription($_POST['text']);
+ }
}
?>
\ No newline at end of file
--- /dev/null
+<?php
+
+class Sales extends DatabaseTable {
+
+ public function __construct($id)
+ {
+ $this->idcolumn = 'nr';
+ parent::__construct('sales', $id);
+ }
+
+ public function setPaid()
+ {
+ return $this->modify('paid', 1);
+ }
+
+ public function unsetPaid()
+ {
+ return $this->modify('paid', 0);
+ }
+
+ public function setDescription($text)
+ {
+ return $this->modify('description', $text);
+ }
+
+}
+
+?>