This commit is contained in:
Roly Rudy Gutierrez Pinto
2015-11-18 14:59:08 -04:00
parent e28827e081
commit 6cf6e4b17e
2 changed files with 33 additions and 31 deletions

View File

@@ -603,6 +603,9 @@ class ReportTables
if(is_array($aFields[$aField['sFieldName']])){
$sQuery .= "'" . (isset( $aFields[$aField['sFieldName']] ) ? $aFields[$aField['sFieldName']][0] : '') . "',";
}else{
if (!isset($aFields[$aField['sFieldName'] . '_label'])) {
$aFields[$aField['sFieldName'].'_label'] = '';
}
if($aFields[$aField['sFieldName']] == $aFields[$aField['sFieldName'].'_label']){
$sQuery .= "'" . (isset( $aFields[$aField['sFieldName']] ) ? @mysql_real_escape_string( $aFields[$aField['sFieldName']] ) : '') . "',";
}else{

View File

@@ -467,47 +467,46 @@ class Consolidated
$xmlfrm->fields = array();
foreach ($fieldsDyna as $key => $value) {
foreach ($value as $val) {
if ($val->type == 'title' || $val->type == 'submit' || $val->type == 'panel' || $val->type == 'image' || $val->type == 'button' || $val->type == 'grid' || $val->type == 'checkgroup' || $val->type == 'radiogroup' || $val->type == 'radio' || $val->type == 'hidden' || $val->type == 'link' || $val->type == 'file' || $val->type == 'subform' || $val->type == 'label') {
continue;
}
$temp = new \stdclass();
$temp->type = $val->type;
$temp->label = $val->label;
$temp->name = $val->name;
$temp->required = (isset($val->required)) ? $val->required : 0;
$temp->mode = (isset($val->mode)) ? $val->mode : 'edit';
if (isset($val->type) && ($val->type == 'text' || $val->type == 'textarea' || $val->type == 'dropdown' || $val->type == 'checkbox' || $val->type == 'datetime')) {
$temp = new \stdclass();
$temp->type = $val->type;
$temp->label = $val->label;
$temp->name = $val->name;
$temp->required = (isset($val->required)) ? $val->required : 0;
$temp->mode = (isset($val->mode)) ? $val->mode : 'edit';
if ((isset($val->options) && !empty($val->options)) || (isset($val->optionsSql) && !empty($val->optionsSql))) {
$temp->storeData = '[';
if ((isset($val->options) && !empty($val->options)) || (isset($val->optionsSql) && !empty($val->optionsSql))) {
$temp->storeData = '[';
if (isset($val->options) && !empty($val->options)) {
foreach ($val->options as $valueOption) {
if(isset($valueOption->value)){
$temp->storeData .= '["' . $valueOption->value . '", "' . $valueOption->label . '"],';
}else{
$temp->storeData .= '["' . $valueOption['value'] . '", "' . $valueOption['label'] . '"],';
if (isset($val->options) && !empty($val->options)) {
foreach ($val->options as $valueOption) {
if (isset($valueOption->value)) {
$temp->storeData .= '["' . $valueOption->value . '", "' . $valueOption->label . '"],';
} else {
$temp->storeData .= '["' . $valueOption['value'] . '", "' . $valueOption['label'] . '"],';
}
}
}
}
if (isset($val->optionsSql) && !empty($val->optionsSql)) {
foreach ($val->optionsSql as $valueOption) {
if(isset($valueOption->value)){
$temp->storeData .= '["' . $valueOption->value . '", "' . $valueOption->label . '"],';
}else{
$temp->storeData .= '["' . $valueOption['value'] . '", "' . $valueOption['label'] . '"],';
if (isset($val->optionsSql) && !empty($val->optionsSql)) {
foreach ($val->optionsSql as $valueOption) {
if (isset($valueOption->value)) {
$temp->storeData .= '["' . $valueOption->value . '", "' . $valueOption->label . '"],';
} else {
$temp->storeData .= '["' . $valueOption['value'] . '", "' . $valueOption['label'] . '"],';
}
}
}
$temp->storeData = substr($temp->storeData, 0, -1);
$temp->storeData .= ']';
}
$temp->storeData = substr($temp->storeData,0,-1);
$temp->storeData .= ']';
}
$temp->readOnly = ($temp->mode == 'view') ? "1" : "0";
$temp->colWidth = 200;
$xmlfrm->fields[] = $temp;
$temp->readOnly = ($temp->mode == 'view') ? "1" : "0";
$temp->colWidth = 200;
$xmlfrm->fields[] = $temp;
}
}
}
} else {
$filename = $pro_uid . PATH_SEP . $dyn_uid . ".xml";