<?php 
            echo $arwrk[$rowcntwrk][1];
            if ($arwrk[$rowcntwrk][2] != "") {
                echo ew_ValueSeparator(1, $autobroadcast->realmid);
                echo $arwrk[$rowcntwrk][2];
            }
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
fautobroadcastadd.Lists["x_realmid"].Options = <?php 
    echo is_array($autobroadcast->realmid->EditValue) ? ew_ArrayToJson($autobroadcast->realmid->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $autobroadcast->realmid->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($autobroadcast->weight->Visible) {
    // weight
    ?>
	<tr id="r_weight"<?php 
    echo $autobroadcast->RowAttributes();
Example #2
0
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
fUsersadd.Lists["x_Type"].Options = <?php 
    echo is_array($Users->Type->EditValue) ? ew_ArrayToJson($Users->Type->EditValue, 1) : "[]";
    ?>
;
</script>
</span>
<?php 
    echo $Users->Type->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
?>
</table>
</td></tr></table>
<button class="btn btn-primary ewButton" name="btnAction" id="btnAction" type="submit"><?php 
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
ftbl_lesson_videoedit.Lists["x_lesson_id"].Options = <?php 
    echo is_array($tbl_lesson_video->lesson_id->EditValue) ? ew_ArrayToJson($tbl_lesson_video->lesson_id->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $tbl_lesson_video->lesson_id->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($tbl_lesson_video->video_link->Visible) {
    // video_link
    ?>
	<tr id="r_video_link"<?php 
    echo $tbl_lesson_video->RowAttributes();
Example #4
0
 function Page_Main()
 {
     global $objForm, $Language, $gsFormError;
     set_error_handler("ew_ErrorHandler");
     // Set up Breadcrumb
     //$this->SetupBreadcrumb(); // Not used
     // Process form if post back
     if ($objForm->GetValue("a_addopt") != "") {
         $this->CurrentAction = $objForm->GetValue("a_addopt");
         // Get form action
         $this->LoadFormValues();
         // Load form values
         // Validate form
         if (!$this->ValidateForm()) {
             $this->CurrentAction = "I";
             // Form error, reset action
             $this->setFailureMessage($gsFormError);
         }
     } else {
         // Not post back
         $this->CurrentAction = "I";
         // Display blank record
         $this->LoadDefaultValues();
         // Load default values
     }
     // Perform action based on action code
     switch ($this->CurrentAction) {
         case "I":
             // Blank record, no action required
             break;
         case "A":
             // Add new record
             $this->SendEmail = TRUE;
             // Send email on add success
             if ($this->AddRow()) {
                 // Add successful
                 $row = array();
                 $row["x_codigo"] = $this->codigo->DbValue;
                 $row["x_localidad"] = $this->localidad->DbValue;
                 $row["x_cp"] = $this->cp->DbValue;
                 $row["x_id_provincia"] = $this->id_provincia->DbValue;
                 if (!EW_DEBUG_ENABLED && ob_get_length()) {
                     ob_end_clean();
                 }
                 echo ew_ArrayToJson(array($row));
             } else {
                 $this->ShowMessage();
             }
             $this->Page_Terminate();
             exit;
     }
     // Render row
     $this->RowType = EW_ROWTYPE_ADD;
     // Render add type
     $this->ResetAttrs();
     $this->RenderRow();
 }
Example #5
0
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
ftbl_docadd.Lists["x_subject_general_faculty_id"].Options = <?php 
    echo is_array($tbl_doc->subject_general_faculty_id->EditValue) ? ew_ArrayToJson($tbl_doc->subject_general_faculty_id->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $tbl_doc->subject_general_faculty_id->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
?>
</table>
</div>
</td></tr></table>
<br>
Example #6
0
 function GetLookupValues($sql)
 {
     $rsarr = array();
     $rowcnt = 0;
     $conn = ew_Connect();
     if ($rs = $conn->Execute($sql)) {
         $rowcnt = $rs->RecordCount();
         $fldcnt = $rs->FieldCount();
         $rsarr = $rs->GetRows();
         $rs->Close();
     }
     $conn->Close();
     // Clean output buffer
     if (!EW_DEBUG_ENABLED && ob_get_length()) {
         ob_end_clean();
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n"), array("\\r", "\\n"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n"), array(" ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
     }
     echo ew_ArrayToJson($rsarr);
 }
Example #7
0
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
fShowedit.Lists["x_ID"].Options = <?php 
    echo is_array($Show->ID->EditValue) ? ew_ArrayToJson($Show->ID->EditValue, 1) : "[]";
    ?>
;
</script>
</span>
<?php 
    echo $Show->ID->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
?>
</table>
</td></tr></table>
<button class="btn btn-primary ewButton" name="btnAction" id="btnAction" type="submit"><?php 
Example #8
0
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
fUsersMetaadd.Lists["x_ID"].Options = <?php 
    echo is_array($UsersMeta->ID->EditValue) ? ew_ArrayToJson($UsersMeta->ID->EditValue, 1) : "[]";
    ?>
;
</script>
</span>
<?php 
    echo $UsersMeta->ID->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($UsersMeta->EducationalStatus->Visible) {
    // EducationalStatus
    ?>
	<tr id="r_EducationalStatus">
 function GetAutoFill($id, $val)
 {
     $rsarr = array();
     $rowcnt = 0;
     if (preg_match('/^x(\\d)*_socio_nro$/', $id)) {
         $sSqlWrk = "SELECT `cuit_cuil` AS FIELD0, `propietario` AS FIELD1, `comercio` AS FIELD2 FROM `socios`";
         $sWhereWrk = "(`socio_nro` = " . ew_AdjustSql($val) . ")";
         if (!$GLOBALS["v_total_estado_cuenta_x_anio_mes"]->UserIDAllow("info")) {
             $sWhereWrk = $GLOBALS["socios"]->AddUserIDFilter($sWhereWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->socio_nro, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `comercio` DESC";
         if ($rs = ew_LoadRecordset($sSqlWrk)) {
             while ($rs && !$rs->EOF) {
                 $ar = array();
                 $this->cuit_cuil->setDbValue($rs->fields[0]);
                 $this->propietario->setDbValue($rs->fields[1]);
                 $this->comercio->setDbValue($rs->fields[2]);
                 $this->RowType == EW_ROWTYPE_EDIT;
                 $this->RenderEditRow();
                 $ar[] = $this->cuit_cuil->AutoFillOriginalValue ? $this->cuit_cuil->CurrentValue : $this->cuit_cuil->EditValue;
                 $ar[] = $this->propietario->CurrentValue;
                 $ar[] = $this->comercio->CurrentValue;
                 $rowcnt += 1;
                 $rsarr[] = $ar;
                 $rs->MoveNext();
             }
             $rs->Close();
         }
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         $fldcnt = count($rsarr[0]);
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n"), array("\\r", "\\n"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n"), array(" ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
         return ew_ArrayToJson($rsarr);
     } else {
         return FALSE;
     }
 }
 function GetAutoFill($id, $val)
 {
     $rsarr = array();
     $rowcnt = 0;
     if (preg_match('/^x(\\d)*_id_tramite$/', $id)) {
         $sSqlWrk = "SELECT `Titulo` AS FIELD0 FROM `tramites`";
         $sWhereWrk = "(`codigo` = " . ew_AdjustSql($val) . ")";
         $lookuptblfilter = "`estado`<>'F'";
         if (strval($lookuptblfilter) != "") {
             ew_AddFilter($sWhereWrk, $lookuptblfilter);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_tramite, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `fecha` ASC";
         if ($rs = ew_LoadRecordset($sSqlWrk)) {
             while ($rs && !$rs->EOF) {
                 $ar = array();
                 $this->titulo->setDbValue($rs->fields[0]);
                 $this->RowType == EW_ROWTYPE_EDIT;
                 $this->RenderEditRow();
                 $ar[] = $this->titulo->AutoFillOriginalValue ? $this->titulo->CurrentValue : $this->titulo->EditValue;
                 $rowcnt += 1;
                 $rsarr[] = $ar;
                 $rs->MoveNext();
             }
             $rs->Close();
         }
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         $fldcnt = count($rsarr[0]);
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n"), array("\\r", "\\n"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n"), array(" ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
         return ew_ArrayToJson($rsarr);
     } else {
         return FALSE;
     }
 }
Example #11
0
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
fVideosedit.Lists["x_VideoCategory"].Options = <?php 
    echo is_array($Videos->VideoCategory->EditValue) ? ew_ArrayToJson($Videos->VideoCategory->EditValue, 1) : "[]";
    ?>
;
</script>
</span>
<?php 
    echo $Videos->VideoCategory->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
?>
</table>
</td></tr></table>
<button class="btn btn-primary ewButton" name="btnAction" id="btnAction" type="submit"><?php 
<?php 
            echo $arwrk[$rowcntwrk][1];
            if ($arwrk[$rowcntwrk][2] != "") {
                echo ew_ValueSeparator(1, $account_access->id);
                echo $arwrk[$rowcntwrk][2];
            }
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
faccount_accessadd.Lists["x_id"].Options = <?php 
    echo is_array($account_access->id->EditValue) ? ew_ArrayToJson($account_access->id->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $account_access->id->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($account_access->gmlevel->Visible) {
    // gmlevel
    ?>
	<tr id="r_gmlevel"<?php 
    echo $account_access->RowAttributes();
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
fdetail_nilaiadd.Lists["x_id_mapel"].Options = <?php 
    echo is_array($detail_nilai->id_mapel->EditValue) ? ew_ArrayToJson($detail_nilai->id_mapel->EditValue, 1) : "[]";
    ?>
;
</script>
</span>
<?php 
    echo $detail_nilai->id_mapel->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($detail_nilai->nilai_afektif->Visible) {
    // nilai_afektif
    ?>
	<tr id="r_nilai_afektif">
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
ftbl_teacheredit.Lists["x_teacher_dept"].Options = <?php 
    echo is_array($tbl_teacher->teacher_dept->EditValue) ? ew_ArrayToJson($tbl_teacher->teacher_dept->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $tbl_teacher->teacher_dept->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($tbl_teacher->teacher_rate->Visible) {
    // teacher_rate
    ?>
	<tr id="r_teacher_rate"<?php 
    echo $tbl_teacher->RowAttributes();
Example #15
0
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
fEvaluateAnswersadd.Lists["x_ID"].Options = <?php 
    echo is_array($EvaluateAnswers->ID->EditValue) ? ew_ArrayToJson($EvaluateAnswers->ID->EditValue, 1) : "[]";
    ?>
;
</script>
</span>
<?php 
    echo $EvaluateAnswers->ID->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
?>
</table>
</td></tr></table>
<button class="btn btn-primary ewButton" name="btnAction" id="btnAction" type="submit"><?php 
Example #16
0
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
fusuariosedit.Lists["x_activo"].Options = <?php 
    echo is_array($usuarios->activo->EditValue) ? ew_ArrayToJson($usuarios->activo->EditValue, 1) : "[]";
    ?>
;
</script>
</span>
<?php 
    echo $usuarios->activo->CustomMsg;
    ?>
</div></div>
	</div>
<?php 
}
?>
</div>
<div class="form-group">
	<div class="col-sm-offset-2 col-sm-10">
Example #17
0
 function ExecuteJsonArray($SQL)
 {
     $rs = $this->LoadRecordset($SQL);
     if ($rs && !$rs->EOF && $rs->FieldCount() > 0) {
         $res = $rs->GetRows();
         $rs->Close();
         return ew_ArrayToJson($res);
     }
     return "false";
 }
<?php 
            echo $arwrk[$rowcntwrk][1];
            if ($arwrk[$rowcntwrk][2] != "") {
                echo ew_ValueSeparator(1, $rbac_linked_permissions->linkedId);
                echo $arwrk[$rowcntwrk][2];
            }
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
frbac_linked_permissionsadd.Lists["x_linkedId"].Options = <?php 
    echo is_array($rbac_linked_permissions->linkedId->EditValue) ? ew_ArrayToJson($rbac_linked_permissions->linkedId->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $rbac_linked_permissions->linkedId->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
?>
</table>
</div>
</td></tr></table>
<br>
Example #19
0
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
fEssaysadd.Lists["x_TopicID"].Options = <?php 
    echo is_array($Essays->TopicID->EditValue) ? ew_ArrayToJson($Essays->TopicID->EditValue, 1) : "[]";
    ?>
;
</script>
</span>
<?php 
    echo $Essays->TopicID->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($Essays->DateModified->Visible) {
    // DateModified
    ?>
	<tr id="r_DateModified">
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
ftbl_subject_teacheradd.Lists["x_teacher_id"].Options = <?php 
    echo is_array($tbl_subject_teacher->teacher_id->EditValue) ? ew_ArrayToJson($tbl_subject_teacher->teacher_id->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $tbl_subject_teacher->teacher_id->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($tbl_subject_teacher->is_active->Visible) {
    // is_active
    ?>
	<tr id="r_is_active"<?php 
    echo $tbl_subject_teacher->RowAttributes();
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
ftbl_lessonedit.Lists["x_lesson_subject"].Options = <?php 
    echo is_array($tbl_lesson->lesson_subject->EditValue) ? ew_ArrayToJson($tbl_lesson->lesson_subject->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $tbl_lesson->lesson_subject->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($tbl_lesson->lesson_name->Visible) {
    // lesson_name
    ?>
	<tr id="r_lesson_name"<?php 
    echo $tbl_lesson->RowAttributes();
Example #22
0
 function GetAutoFill($id, $val)
 {
     $rsarr = array();
     $rowcnt = 0;
     if (preg_match('/^x(\\d)*_id_cliente$/', $id)) {
         $sSqlWrk = "SELECT `direccion` AS FIELD0, `direccion` AS FIELD1, `id_localidad` AS FIELD2, `id_localidad` AS FIELD3 FROM `clientes`";
         $sWhereWrk = "(`codigo` = " . ew_AdjustSql($val) . ")";
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_cliente, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `razon_social` ASC";
         if ($rs = ew_LoadRecordset($sSqlWrk)) {
             while ($rs && !$rs->EOF) {
                 $ar = array();
                 $this->Origen->setDbValue($rs->fields[0]);
                 $this->Destino->setDbValue($rs->fields[1]);
                 $this->id_localidad_origen->setDbValue($rs->fields[2]);
                 $this->id_localidad_destino->setDbValue($rs->fields[3]);
                 $this->RowType == EW_ROWTYPE_EDIT;
                 $this->RenderEditRow();
                 $ar[] = $this->Origen->AutoFillOriginalValue ? $this->Origen->CurrentValue : $this->Origen->EditValue;
                 $ar[] = $this->Destino->AutoFillOriginalValue ? $this->Destino->CurrentValue : $this->Destino->EditValue;
                 $ar[] = $this->id_localidad_origen->CurrentValue;
                 $ar[] = $this->id_localidad_destino->CurrentValue;
                 $rowcnt += 1;
                 $rsarr[] = $ar;
                 $rs->MoveNext();
             }
             $rs->Close();
         }
     }
     if (preg_match('/^x(\\d)*_id_tipo_carga$/', $id)) {
         $sSqlWrk = "SELECT `precio_base` AS FIELD0, `porcentaje_comision` AS FIELD1 FROM `tipo_cargas`";
         $sWhereWrk = "(`codigo` = " . ew_AdjustSql($val) . ")";
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_tipo_carga, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `Tipo_carga` ASC";
         if ($rs = ew_LoadRecordset($sSqlWrk)) {
             while ($rs && !$rs->EOF) {
                 $ar = array();
                 $this->tarifa->setDbValue($rs->fields[0]);
                 $this->porcentaje->setDbValue($rs->fields[1]);
                 $this->RowType == EW_ROWTYPE_EDIT;
                 $this->RenderEditRow();
                 $ar[] = $this->tarifa->AutoFillOriginalValue ? $this->tarifa->CurrentValue : $this->tarifa->EditValue;
                 $ar[] = $this->porcentaje->AutoFillOriginalValue ? $this->porcentaje->CurrentValue : $this->porcentaje->EditValue;
                 $rowcnt += 1;
                 $rsarr[] = $ar;
                 $rs->MoveNext();
             }
             $rs->Close();
         }
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         $fldcnt = count($rsarr[0]);
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n"), array("\\r", "\\n"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n"), array(" ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
         return ew_ArrayToJson($rsarr);
     } else {
         return FALSE;
     }
 }
Example #23
0
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
fTopicQuestionsadd.Lists["x_TopicID"].Options = <?php 
    echo is_array($TopicQuestions->TopicID->EditValue) ? ew_ArrayToJson($TopicQuestions->TopicID->EditValue, 1) : "[]";
    ?>
;
</script>
</span>
<?php 
    echo $TopicQuestions->TopicID->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
?>
</table>
</td></tr></table>
<button class="btn btn-primary ewButton" name="btnAction" id="btnAction" type="submit"><?php 
Example #24
0
 function GetLookupValues($sql, $dbid)
 {
     $rsarr = array();
     $rowcnt = 0;
     if ($rs = Conn($dbid)->Execute($sql)) {
         $rowcnt = $rs->RecordCount();
         $fldcnt = $rs->FieldCount();
         $rsarr = $rs->GetRows();
         $rs->Close();
     }
     // Clean output buffer
     if (ob_get_length()) {
         ob_clean();
     }
     // Format date
     $ardt = array();
     for ($j = 0; $j < $fldcnt; $j++) {
         $ardt[$j] = @$_POST["df" . $j];
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if ($ardt[$j] != "" && intval($ardt[$j]) > 0) {
                     // Format date
                     $str = ew_FormatDateTime($str, $ardt[$j]);
                 }
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n", "\t"), array("\\r", "\\n", "\\t"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n", "\t"), array(" ", " ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
     }
     echo ew_ArrayToJson($rsarr);
 }
Example #25
0
 function Page_Main()
 {
     global $objForm, $Language, $gsSearchError;
     global $gbSkipHeaderFooter;
     // Set up Breadcrumb
     $this->SetupBreadcrumb();
     // Check modal
     $this->IsModal = @$_GET["modal"] == "1" || @$_POST["modal"] == "1";
     if ($this->IsModal) {
         $gbSkipHeaderFooter = TRUE;
     }
     if ($this->IsPageRequest()) {
         // Validate request
         // Get action
         $this->CurrentAction = $objForm->GetValue("a_search");
         switch ($this->CurrentAction) {
             case "S":
                 // Get search criteria
                 // Build search string for advanced search, remove blank field
                 $this->LoadSearchValues();
                 // Get search values
                 if ($this->ValidateSearch()) {
                     $sSrchStr = $this->BuildAdvancedSearch();
                 } else {
                     $sSrchStr = "";
                     $this->setFailureMessage($gsSearchError);
                 }
                 if ($sSrchStr != "") {
                     $sSrchStr = $this->UrlParm($sSrchStr);
                     $sSrchStr = "cciag_montoslist.php" . "?" . $sSrchStr;
                     if ($this->IsModal) {
                         $row = array();
                         $row["url"] = $sSrchStr;
                         echo ew_ArrayToJson(array($row));
                         $this->Page_Terminate();
                         exit;
                     } else {
                         $this->Page_Terminate($sSrchStr);
                         // Go to list page
                     }
                 }
         }
     }
     // Restore search settings from Session
     if ($gsSearchError == "") {
         $this->LoadAdvancedSearch();
     }
     // Render row for search
     $this->RowType = EW_ROWTYPE_SEARCH;
     $this->ResetAttrs();
     $this->RenderRow();
 }
Example #26
0
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
ftbl_deptedit.Lists["x_dept_faculty"].Options = <?php 
    echo is_array($tbl_dept->dept_faculty->EditValue) ? ew_ArrayToJson($tbl_dept->dept_faculty->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $tbl_dept->dept_faculty->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($tbl_dept->dept_target->Visible) {
    // dept_target
    ?>
	<tr id="r_dept_target"<?php 
    echo $tbl_dept->RowAttributes();
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
ftbl_subject_facultyedit.Lists["x_faculty_id"].Options = <?php 
    echo is_array($tbl_subject_faculty->faculty_id->EditValue) ? ew_ArrayToJson($tbl_subject_faculty->faculty_id->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $tbl_subject_faculty->faculty_id->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($tbl_subject_faculty->is_active->Visible) {
    // is_active
    ?>
	<tr id="r_is_active"<?php 
    echo $tbl_subject_faculty->RowAttributes();
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
ftbl_subject_docadd.Lists["x_doc_id"].Options = <?php 
    echo is_array($tbl_subject_doc->doc_id->EditValue) ? ew_ArrayToJson($tbl_subject_doc->doc_id->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $tbl_subject_doc->doc_id->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($tbl_subject_doc->doc_type->Visible) {
    // doc_type
    ?>
	<tr id="r_doc_type"<?php 
    echo $tbl_subject_doc->RowAttributes();
 function GetAutoFill($id, $val)
 {
     $rsarr = array();
     $rowcnt = 0;
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         $fldcnt = count($rsarr[0]);
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n"), array("\\r", "\\n"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n"), array(" ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
         return ew_ArrayToJson($rsarr);
     } else {
         return FALSE;
     }
 }
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<script type="text/javascript">
ftbl_teacher_faculty_positionadd.Lists["x_faculty_id"].Options = <?php 
    echo is_array($tbl_teacher_faculty_position->faculty_id->EditValue) ? ew_ArrayToJson($tbl_teacher_faculty_position->faculty_id->EditValue, 1) : "[]";
    ?>
;
</script>
</span><?php 
    echo $tbl_teacher_faculty_position->faculty_id->CustomMsg;
    ?>
</td>
	</tr>
<?php 
}
if ($tbl_teacher_faculty_position->teacher_position->Visible) {
    // teacher_position
    ?>
	<tr id="r_teacher_position"<?php 
    echo $tbl_teacher_faculty_position->RowAttributes();