| 1: | <?php
|
| 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: | class SystemBannerclient extends XoopsObject
|
| 28: | {
|
| 29: |
|
| 30: | public $cid;
|
| 31: | public $name;
|
| 32: | public $contact;
|
| 33: | public $email;
|
| 34: | public $login;
|
| 35: | public $passwd;
|
| 36: | public $extrainfo;
|
| 37: |
|
| 38: | |
| 39: | |
| 40: |
|
| 41: | public function __construct()
|
| 42: | {
|
| 43: | parent::__construct();
|
| 44: | $this->initVar('cid', XOBJ_DTYPE_INT, null, false, 5);
|
| 45: | $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, false);
|
| 46: | $this->initVar('contact', XOBJ_DTYPE_TXTBOX, null, false);
|
| 47: | $this->initVar('email', XOBJ_DTYPE_TXTBOX, null, false);
|
| 48: | $this->initVar('login', XOBJ_DTYPE_TXTBOX, null, false);
|
| 49: | $this->initVar('passwd', XOBJ_DTYPE_TXTBOX, null, false);
|
| 50: | $this->initVar('extrainfo', XOBJ_DTYPE_TXTAREA, null, false);
|
| 51: |
|
| 52: |
|
| 53: | }
|
| 54: |
|
| 55: | |
| 56: | |
| 57: | |
| 58: | |
| 59: |
|
| 60: | public function getForm($action = false)
|
| 61: | {
|
| 62: | if ($action === false) {
|
| 63: | $action = $_SERVER['REQUEST_URI'];
|
| 64: | }
|
| 65: |
|
| 66: | $title = $this->isNew() ? sprintf(_AM_SYSTEM_BANNERS_ADDNWCLI) : sprintf(_AM_SYSTEM_BANNERS_EDITADVCLI);
|
| 67: |
|
| 68: | xoops_load('XoopsFormLoader');
|
| 69: |
|
| 70: | $form = new XoopsThemeForm($title, 'form', $action, 'post', true);
|
| 71: |
|
| 72: | $form->addElement(new XoopsFormText(_AM_SYSTEM_BANNERS_CLINAMET, 'name', 50, 255, $this->getVar('name')), true);
|
| 73: | $form->addElement(new XoopsFormText(_AM_SYSTEM_BANNERS_CONTNAMET, 'contact', 50, 255, $this->getVar('contact')));
|
| 74: | $form->addElement(new XoopsFormText(_AM_SYSTEM_BANNERS_CONTMAILT, 'email', 50, 255, $this->getVar('email')));
|
| 75: | $form->addElement(new XoopsFormText(_AM_SYSTEM_BANNERS_CLILOGINT, 'login', 50, 255, $this->getVar('login')));
|
| 76: | $form->addElement(new XoopsFormText(_AM_SYSTEM_BANNERS_CLIPASST, 'passwd', 50, 255, $this->getVar('passwd')));
|
| 77: |
|
| 78: | $form->addElement(new xoopsFormTextArea(_AM_SYSTEM_BANNERS_EXTINFO, 'extrainfo', $this->getVar('extrainfo'), 5, 50), false);
|
| 79: |
|
| 80: | $form->addElement(new XoopsFormHidden('op', 'banner_client_save'));
|
| 81: | $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
|
| 82: |
|
| 83: | return $form;
|
| 84: | }
|
| 85: | }
|
| 86: |
|
| 87: | |
| 88: | |
| 89: | |
| 90: | |
| 91: | |
| 92: | |
| 93: | |
| 94: | |
| 95: | |
| 96: |
|
| 97: | class SystemBannerclientHandler extends XoopsPersistableObjectHandler
|
| 98: | {
|
| 99: | |
| 100: | |
| 101: |
|
| 102: | public function __construct($db)
|
| 103: | {
|
| 104: | parent::__construct($db, 'bannerclient', 'SystemBannerclient', 'cid', 'name');
|
| 105: | }
|
| 106: | }
|
| 107: | |