forked from XOOPS/XoopsCore
/
banner.php
58 lines (53 loc) · 2.11 KB
/
banner.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/*
You may not change or alter any portion of this comment or credits
of supporting developers from this source code or any supporting source code
which is considered copyrighted (c) material of the original comment or credit authors.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* banners module
*
* @copyright XOOPS Project (http://xoops.org)
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @package banners
* @since 2.6.0
* @author Mage Gregory (AKA Mage)
* @version $Id$
*/
use Xoops\Core\Database\Connection;
use Xoops\Core\Kernel\XoopsObject;
use Xoops\Core\Kernel\XoopsPersistableObjectHandler;
class BannersBanner extends XoopsObject
{
/**
* Constructor
*/
public function __construct()
{
$this->initVar('banner_bid', XOBJ_DTYPE_INT, null, false, 5);
$this->initVar('banner_cid', XOBJ_DTYPE_INT, null, false, 3);
$this->initVar('banner_imptotal', XOBJ_DTYPE_INT, null, false, 8);
$this->initVar('banner_impmade', XOBJ_DTYPE_INT, null, false, 8);
$this->initVar('banner_clicks', XOBJ_DTYPE_INT, null, false, 8);
$this->initVar('banner_imageurl', XOBJ_DTYPE_TXTBOX, null, false);
$this->initVar('banner_clickurl', XOBJ_DTYPE_TXTBOX, null, false);
$this->initVar('banner_datestart', XOBJ_DTYPE_INT, null, false, 10);
$this->initVar('banner_dateend', XOBJ_DTYPE_INT, null, false, 10);
$this->initVar('banner_htmlbanner', XOBJ_DTYPE_INT, null, false, 1);
$this->initVar('banner_htmlcode', XOBJ_DTYPE_TXTBOX, null, false);
$this->initVar('banner_status', XOBJ_DTYPE_INT, null, false, 1);
}
}
class BannersBannerHandler extends XoopsPersistableObjectHandler
{
/**
* @param null|Connection $db database
*/
public function __construct(Connection $db = null)
{
parent::__construct($db, 'banners_banner', 'BannersBanner', 'banner_bid', 'banner_imageurl');
}
}