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) |
13
|
|
|
* @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) |
14
|
|
|
* @author Gregory Mage (Aka Mage) |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
if (!defined("XOOPS_ROOT_PATH")) { |
18
|
|
|
die("XOOPS root path not defined"); |
19
|
|
|
} |
20
|
|
|
|
21
|
|
|
class TDMDownloads_broken extends XoopsObject |
22
|
|
|
{ |
23
|
|
|
// constructor |
24
|
|
|
public function __construct() |
25
|
|
|
{ |
26
|
|
|
$this->initVar("reportid",XOBJ_DTYPE_INT,null,false,5); |
27
|
|
|
$this->initVar("lid",XOBJ_DTYPE_INT,null,false,11); |
28
|
|
|
$this->initVar("sender",XOBJ_DTYPE_INT,null,false,11); |
29
|
|
|
$this->initVar("ip",XOBJ_DTYPE_TXTBOX,null,false); |
30
|
|
|
//pour les jointures: |
31
|
|
|
$this->initVar("title",XOBJ_DTYPE_TXTBOX, null, false); |
32
|
|
|
$this->initVar("cid",XOBJ_DTYPE_INT,null,false,5); |
33
|
|
|
} |
34
|
|
|
public function TDMDownloads_broken() |
35
|
|
|
{ |
36
|
|
|
$this->__construct(); |
37
|
|
|
} |
38
|
|
|
public function getForm($lid, $action = false) |
39
|
|
|
{ |
40
|
|
|
global $xoopsDB, $xoopsModule, $xoopsModuleConfig; |
41
|
|
|
if ($action === false) { |
42
|
|
|
$action = $_SERVER['REQUEST_URI']; |
|
|
|
|
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
$form = new XoopsThemeForm(_MD_TDMDOWNLOADS_BROKENFILE_REPORTBROKEN, 'brokenform', 'brokenfile.php', 'post'); |
46
|
|
|
$form->setExtra('enctype="multipart/form-data"'); |
47
|
|
|
$form->addElement(new XoopsFormCaptcha(), true); |
48
|
|
|
$form->addElement(new XoopsFormHidden('op', 'save')); |
49
|
|
|
$form->addElement(new XoopsFormHidden('lid', $lid)); |
50
|
|
|
// Submit button |
51
|
|
|
$button_tray = new XoopsFormElementTray(_MD_TDMDOWNLOADS_BROKENFILE_REPORTBROKEN, '' ,''); |
52
|
|
|
$button_tray->addElement(new XoopsFormButton('', 'post', _MD_TDMDOWNLOADS_BROKENFILE_REPORTBROKEN, 'submit')); |
53
|
|
|
$form->addElement($button_tray); |
54
|
|
|
|
55
|
|
|
return $form; |
56
|
|
|
} |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
class TDMDownloadstdmdownloads_brokenHandler extends XoopsPersistableObjectHandler |
60
|
|
|
{ |
61
|
|
|
public function __construct(&$db) |
62
|
|
|
{ |
63
|
|
|
parent::__construct($db, "tdmdownloads_broken", 'tdmdownloads_broken', 'reportid', 'lid'); |
64
|
|
|
} |
65
|
|
|
} |
66
|
|
|
|