1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* TDMDownload |
4
|
|
|
* |
5
|
|
|
* You may not change or alter any portion of this comment or credits |
6
|
|
|
* of supporting developers from this source code or any supporting source code |
7
|
|
|
* which is considered copyrighted (c) material of the original comment or credit authors. |
8
|
|
|
* This program is distributed in the hope that it will be useful, |
9
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
10
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
11
|
|
|
* |
12
|
|
|
* @copyright Gregory Mage (Aka Mage) and Hossein Azizabadi (Aka voltan) |
13
|
|
|
* @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) |
14
|
|
|
* @author Gregory Mage (Aka Mage) and Hossein Azizabadi (Aka voltan) |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
if (!defined("XOOPS_ROOT_PATH")) { |
18
|
|
|
die("XOOPS root path not defined"); |
19
|
|
|
} |
20
|
|
|
|
21
|
|
|
class TDMDownloads_downlimit extends XoopsObject |
22
|
|
|
{ |
23
|
|
|
// constructor |
24
|
|
|
public function __construct() |
25
|
|
|
{ |
26
|
|
|
$this->initVar("downlimit_id",XOBJ_DTYPE_INT,null,false,11); |
27
|
|
|
$this->initVar("downlimit_lid",XOBJ_DTYPE_INT,null,false,11); |
28
|
|
|
$this->initVar("downlimit_uid",XOBJ_DTYPE_INT,null,false,11); |
29
|
|
|
$this->initVar("downlimit_hostname",XOBJ_DTYPE_TXTBOX, null, false); |
30
|
|
|
$this->initVar("downlimit_date",XOBJ_DTYPE_INT,null,false,10); |
31
|
|
|
} |
32
|
|
|
function TDMDownloads_downlimit() |
|
|
|
|
33
|
|
|
{ |
34
|
|
|
$this->__construct(); |
35
|
|
|
} |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
class TDMDownloadstdmdownloads_downlimitHandler extends XoopsPersistableObjectHandler |
39
|
|
|
{ |
40
|
|
|
public function __construct(&$db) |
41
|
|
|
{ |
42
|
|
|
parent::__construct($db, "tdmdownloads_downlimit", 'tdmdownloads_downlimit', 'downlimit_id', 'downlimit_lid'); |
43
|
|
|
} |
44
|
|
|
} |
45
|
|
|
|
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.