1: <?php
2: 3: 4: 5: 6: 7: 8: 9: 10:
11:
12: 13: 14: 15: 16: 17: 18: 19: 20: 21:
22:
23: class ProtectorCenterForm extends Xoops\Form\ThemeForm
24: {
25: 26: 27:
28: public function __construct($obj = null)
29: {
30: }
31:
32: 33: 34: 35:
36: public function getPrefIp($bad_ips4disp, $group1_ips4disp)
37: {
38: global $xoopsDB;
39: $db = $xoopsDB;
40: $protector = Protector::getInstance($db->conn);
41: require_once dirname(__DIR__) . '/gtickets.php';
42:
43: parent::__construct('', "form_prefip", "center.php", 'post', true);
44:
45: $bad_ips = new Xoops\Form\TextArea(_AM_TH_BADIPS, 'bad_ips', $bad_ips4disp, 3, 90);
46: $bad_ips->setDescription('<br />' . htmlspecialchars($protector->get_filepath4badips()));
47: $bad_ips->setClass('span3');
48: $this->addElement($bad_ips);
49:
50: $group1_ips = new Xoops\Form\TextArea(_AM_TH_GROUP1IPS, 'group1_ips', $group1_ips4disp, 3, 90);
51: $group1_ips->setDescription('<br />' . htmlspecialchars($protector->get_filepath4group1ips()));
52: $group1_ips->setClass('span3');
53: $this->addElement($group1_ips);
54: $formTicket = new xoopsGTicket;
55: $this->addElement(new Xoops\Form\Hidden("action", "update_ips"));
56: $ticket = $formTicket->getTicketXoopsForm(__LINE__, 1800, 'protector_admin');
57: $this->addElement($ticket);
58: $this->addElement(new Xoops\Form\Button('', "submit_prefip", XoopsLocale::A_SUBMIT, "submit"));
59: }
60: }
61: