reUser = new rowEditor('user'); $this->reUser->addPKInt('user_id', null, false, RE_INSERT_AUTOINCREMENT); $this->reUser->addString('statpic_text', '', false); $this->reUser->addString('statpic_logo', 0, false); $this->nUserId = $nNewUserId+0; $this->reUser->load($this->nUserId); } function getStyle() { return $this->reUser->getValue('statpic_logo'); } function setStyle($value) { return $this->reUser->setValue('statpic_logo', $value); } function getText() { return $this->reUser->getValue('statpic_text'); } function setText($value) { if ($value != '') if (!mb_ereg_match(REGEX_STATPIC_TEXT, $value)) return false; return $this->reUser->setValue('statpic_text', $value); } function save() { $retval = $this->reUser->save(); if ($retval) $this->invalidate(); return $retval; } // force regeneration of image on next call of ocstats.php function invalidate() { sql("DELETE FROM `user_statpic` WHERE `user_id`='&1'", $this->nUserId); } } ?>