<?php /** * $Id: do_ex_class_field_predicate_aed.php 19290 2013-05-26 19:48:24Z phenxdesign $ * * @package Mediboard * @subpackage System * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision: 19290 $ */ $ex_class_field_id = CValue::post("ex_class_field_id"); $ex_class_field = new CExClassField(); $ex_class_field->load($ex_class_field_id); if (empty($_POST["value"])) { $_POST["value"] = $_POST[$ex_class_field->name]; } $do = new CDoObjectAddEdit("CExClassFieldPredicate"); $do->doIt();
<?php /** * $Id$ * * @package Mediboard * @subpackage forms * @author SARL OpenXtrem <*****@*****.**> * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html * @version $Revision$ */ CCanDo::checkEdit(); $ex_field_id = CValue::get("ex_field_id"); $ex_field = new CExClassField(); $ex_field->load($ex_field_id); $ex_field->formulaFromDB(); $formula_possible = true; $field_names = array(); $spec_type = $ex_field->getSpecObject()->getSpecType(); if (!CExClassField::formulaCanResult($spec_type)) { $formula_possible = false; } else { $field_names = $ex_field->getFieldNames(true, true); $field_names = array_values($field_names); $field_names = array_map("utf8_encode", $field_names); } $smarty = new CSmartyDP(); $smarty->assign("ex_field", $ex_field); $smarty->assign("field_names", $field_names); $smarty->assign("formula_possible", $formula_possible); $smarty->display("inc_edit_ex_formula.tpl");