|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace XoopsModules\Tdmdownloads; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* TDMDownload |
|
7
|
|
|
* |
|
8
|
|
|
* You may not change or alter any portion of this comment or credits |
|
9
|
|
|
* of supporting developers from this source code or any supporting source code |
|
10
|
|
|
* which is considered copyrighted (c) material of the original comment or credit authors. |
|
11
|
|
|
* This program is distributed in the hope that it will be useful, |
|
12
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
14
|
|
|
* |
|
15
|
|
|
* @copyright Gregory Mage (Aka Mage) |
|
16
|
|
|
* @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) |
|
17
|
|
|
* @author Gregory Mage (Aka Mage) |
|
18
|
|
|
*/ |
|
19
|
|
|
defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* Class Broken |
|
23
|
|
|
* @package XoopsModules\Tdmdownloads |
|
24
|
|
|
*/ |
|
25
|
|
|
class Broken extends \XoopsObject |
|
26
|
|
|
{ |
|
27
|
|
|
// constructor |
|
28
|
|
|
|
|
29
|
|
|
public function __construct() |
|
30
|
|
|
{ |
|
31
|
|
|
parent::__construct(); |
|
32
|
|
|
$this->initVar('reportid', XOBJ_DTYPE_INT, null, false, 5); |
|
33
|
|
|
$this->initVar('lid', XOBJ_DTYPE_INT, null, false, 11); |
|
34
|
|
|
$this->initVar('sender', XOBJ_DTYPE_INT, null, false, 11); |
|
35
|
|
|
$this->initVar('ip', XOBJ_DTYPE_TXTBOX, null, false); |
|
36
|
|
|
//pour les jointures: |
|
37
|
|
|
$this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false); |
|
38
|
|
|
$this->initVar('cid', XOBJ_DTYPE_INT, null, false, 5); |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @param $lid |
|
43
|
|
|
* @param bool $action |
|
44
|
|
|
* |
|
45
|
|
|
* @return \XoopsThemeForm |
|
46
|
|
|
*/ |
|
47
|
|
|
public function getForm($lid, $action = false) |
|
48
|
|
|
{ |
|
49
|
|
|
// global $xoopsDB, $xoopsModule, $xoopsModuleConfig; |
|
50
|
|
|
if (false === $action) { |
|
51
|
|
|
$action = $_SERVER['REQUEST_URI']; |
|
|
|
|
|
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
$form = new \XoopsThemeForm(_MD_TDMDOWNLOADS_BROKENFILE_REPORTBROKEN, 'brokenform', 'brokenfile.php', 'post'); |
|
55
|
|
|
$form->setExtra('enctype="multipart/form-data"'); |
|
56
|
|
|
$form->addElement(new \XoopsFormCaptcha(), true); |
|
57
|
|
|
$form->addElement(new \XoopsFormHidden('op', 'save')); |
|
58
|
|
|
$form->addElement(new \XoopsFormHidden('lid', $lid)); |
|
59
|
|
|
// Submit button |
|
60
|
|
|
$button_tray = new \XoopsFormElementTray(_MD_TDMDOWNLOADS_BROKENFILE_REPORTBROKEN, '', ''); |
|
61
|
|
|
$button_tray->addElement(new \XoopsFormButton('', 'post', _MD_TDMDOWNLOADS_BROKENFILE_REPORTBROKEN, 'submit')); |
|
62
|
|
|
$form->addElement($button_tray); |
|
63
|
|
|
|
|
64
|
|
|
return $form; |
|
65
|
|
|
} |
|
66
|
|
|
} |
|
67
|
|
|
|