1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11:
12: 13: 14: 15: 16: 17: 18: 19: 20: 21:
22:
23: use Xoops\Core\Database\Connection;
24: use Xoops\Core\Kernel\XoopsObject;
25: use Xoops\Core\Kernel\XoopsPersistableObjectHandler;
26:
27: class BannersBanner extends XoopsObject
28: {
29: 30: 31:
32: public function __construct()
33: {
34: $this->initVar('banner_bid', XOBJ_DTYPE_INT, null, false, 5);
35: $this->initVar('banner_cid', XOBJ_DTYPE_INT, null, false, 3);
36: $this->initVar('banner_imptotal', XOBJ_DTYPE_INT, null, false, 8);
37: $this->initVar('banner_impmade', XOBJ_DTYPE_INT, null, false, 8);
38: $this->initVar('banner_clicks', XOBJ_DTYPE_INT, null, false, 8);
39: $this->initVar('banner_imageurl', XOBJ_DTYPE_TXTBOX, null, false);
40: $this->initVar('banner_clickurl', XOBJ_DTYPE_TXTBOX, null, false);
41: $this->initVar('banner_datestart', XOBJ_DTYPE_INT, null, false, 10);
42: $this->initVar('banner_dateend', XOBJ_DTYPE_INT, null, false, 10);
43: $this->initVar('banner_htmlbanner', XOBJ_DTYPE_INT, null, false, 1);
44: $this->initVar('banner_htmlcode', XOBJ_DTYPE_TXTBOX, null, false);
45: $this->initVar('banner_status', XOBJ_DTYPE_INT, null, false, 1);
46: }
47: }
48:
49: class BannersBannerHandler extends XoopsPersistableObjectHandler
50: {
51: 52: 53:
54: public function __construct(Connection $db = null)
55: {
56: parent::__construct($db, 'banners_banner', 'BannersBanner', 'banner_bid', 'banner_imageurl');
57: }
58: }
59: