# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Or read it online: http://www.gnu.org/licenses/licenses.html#GPL #------------------------------------------------------------------------- if (!is_object(@cmsms())) { exit; } if (!$this->CheckAccess()) { exit; } $aeform = new fbForm($this, $params, true); $aefield = $aeform->NewField($params); $val = $aefield->AdminValidate(); if ($val[0]) { $aefield->PostAdminSubmitCleanup(); $aefield->Store(true); $aefield->PostFieldSaveProcess($params); $params['fbrp_message'] = $params['fbrp_op']; $this->DoAction('admin_add_edit_form', $id, $params); } else { $aefield->LoadField($params); $params['fbrp_message'] = $val[1]; echo $aeform->AddEditField($id, $aefield, isset($params['fbrp_dispose_only']) ? $params['fbrp_dispose_only'] : 0, $returnid, isset($params['fbrp_message']) ? $params['fbrp_message'] : ''); } # # EOF #
function GetFormBrowserField($form_id) { $db = $this->GetDb(); $sql = 'SELECT * FROM ' . cms_db_prefix() . 'module_fb_field WHERE form_id=? and type=?'; $rs = $this->module_ptr->dbHandle->Execute($sql, array($form_id, 'DispositionFormBrowser')); $result = array(); if (!$rs || $rs->RecordCount() == 0) { return false; } $thisRes = $rs->GetArray(); $params = array(); $aeform = new fbForm($this, $params, false); $className = $aeform->MakeClassName($thisRes[0]['type'], ''); // create the field object $field = $aeform->NewField($thisRes[0]); return $field; }