function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs $this->ViewUrl = $this->GetViewUrl(); $this->EditUrl = $this->GetEditUrl(); $this->InlineEditUrl = $this->GetInlineEditUrl(); $this->CopyUrl = $this->GetCopyUrl(); $this->InlineCopyUrl = $this->GetInlineCopyUrl(); $this->DeleteUrl = $this->GetDeleteUrl(); // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // id_tramite // fecha // hora // titulo // descripcion // id_usuario $this->id_usuario->CellCssStyle = "white-space: nowrap;"; // archivo if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // id_tramite if ($this->id_tramite->VirtualValue != "") { $this->id_tramite->ViewValue = $this->id_tramite->VirtualValue; } else { if (strval($this->id_tramite->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tramites`"; $sWhereWrk = ""; $lookuptblfilter = "`estado`<>'F'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tramite, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `fecha` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_tramite->ViewValue = $rswrk->fields('DispFld'); $this->id_tramite->ViewValue .= ew_ValueSeparator(1, $this->id_tramite) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7); $this->id_tramite->ViewValue .= ew_ValueSeparator(2, $this->id_tramite) . $rswrk->fields('Disp3Fld'); $rswrk->Close(); } else { $this->id_tramite->ViewValue = $this->id_tramite->CurrentValue; } } else { $this->id_tramite->ViewValue = NULL; } } $this->id_tramite->ViewCustomAttributes = ""; // fecha $this->fecha->ViewValue = $this->fecha->CurrentValue; $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7); $this->fecha->ViewCustomAttributes = ""; // hora $this->hora->ViewValue = $this->hora->CurrentValue; $this->hora->ViewCustomAttributes = ""; // titulo $this->titulo->ViewValue = $this->titulo->CurrentValue; $this->titulo->ViewCustomAttributes = ""; // archivo if (!ew_Empty($this->archivo->Upload->DbValue)) { $this->archivo->ViewValue = $this->archivo->Upload->DbValue; } else { $this->archivo->ViewValue = ""; } $this->archivo->ViewCustomAttributes = ""; // id_tramite $this->id_tramite->LinkCustomAttributes = ""; $this->id_tramite->HrefValue = ""; $this->id_tramite->TooltipValue = ""; // fecha $this->fecha->LinkCustomAttributes = ""; $this->fecha->HrefValue = ""; $this->fecha->TooltipValue = ""; // hora $this->hora->LinkCustomAttributes = ""; $this->hora->HrefValue = ""; $this->hora->TooltipValue = ""; // titulo $this->titulo->LinkCustomAttributes = ""; $this->titulo->HrefValue = ""; $this->titulo->TooltipValue = ""; // archivo $this->archivo->LinkCustomAttributes = ""; $this->archivo->HrefValue = ""; $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue; $this->archivo->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row // id_tramite $this->id_tramite->EditAttrs["class"] = "form-control"; $this->id_tramite->EditCustomAttributes = ""; if ($this->id_tramite->getSessionValue() != "") { $this->id_tramite->CurrentValue = $this->id_tramite->getSessionValue(); $this->id_tramite->OldValue = $this->id_tramite->CurrentValue; if ($this->id_tramite->VirtualValue != "") { $this->id_tramite->ViewValue = $this->id_tramite->VirtualValue; } else { if (strval($this->id_tramite->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tramites`"; $sWhereWrk = ""; $lookuptblfilter = "`estado`<>'F'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tramite, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `fecha` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_tramite->ViewValue = $rswrk->fields('DispFld'); $this->id_tramite->ViewValue .= ew_ValueSeparator(1, $this->id_tramite) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7); $this->id_tramite->ViewValue .= ew_ValueSeparator(2, $this->id_tramite) . $rswrk->fields('Disp3Fld'); $rswrk->Close(); } else { $this->id_tramite->ViewValue = $this->id_tramite->CurrentValue; } } else { $this->id_tramite->ViewValue = NULL; } } $this->id_tramite->ViewCustomAttributes = ""; } else { if (trim(strval($this->id_tramite->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER); } $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tramites`"; $sWhereWrk = ""; $lookuptblfilter = "`estado`<>'F'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tramite, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `fecha` ASC"; $rswrk = $conn->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } $rowswrk = count($arwrk); for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) { $arwrk[$rowcntwrk][2] = ew_FormatDateTime($arwrk[$rowcntwrk][2], 7); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->id_tramite->EditValue = $arwrk; } // fecha // hora // titulo $this->titulo->EditAttrs["class"] = "form-control"; $this->titulo->EditCustomAttributes = ""; $this->titulo->EditValue = ew_HtmlEncode($this->titulo->CurrentValue); $this->titulo->PlaceHolder = ew_RemoveHtml($this->titulo->FldCaption()); // archivo $this->archivo->EditAttrs["class"] = "form-control"; $this->archivo->EditCustomAttributes = ""; if (!ew_Empty($this->archivo->Upload->DbValue)) { $this->archivo->EditValue = $this->archivo->Upload->DbValue; } else { $this->archivo->EditValue = ""; } if (!ew_Empty($this->archivo->CurrentValue)) { $this->archivo->Upload->FileName = $this->archivo->CurrentValue; } if (is_numeric($this->RowIndex) && !$this->EventCancelled) { ew_RenderUploadField($this->archivo, $this->RowIndex); } // Edit refer script // id_tramite $this->id_tramite->HrefValue = ""; // fecha $this->fecha->HrefValue = ""; // hora $this->hora->HrefValue = ""; // titulo $this->titulo->HrefValue = ""; // archivo $this->archivo->HrefValue = ""; $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // id_tramite $this->id_tramite->EditAttrs["class"] = "form-control"; $this->id_tramite->EditCustomAttributes = ""; if ($this->id_tramite->VirtualValue != "") { $this->id_tramite->ViewValue = $this->id_tramite->VirtualValue; } else { if (strval($this->id_tramite->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tramites`"; $sWhereWrk = ""; $lookuptblfilter = "`estado`<>'F'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tramite, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `fecha` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_tramite->EditValue = $rswrk->fields('DispFld'); $this->id_tramite->EditValue .= ew_ValueSeparator(1, $this->id_tramite) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7); $this->id_tramite->EditValue .= ew_ValueSeparator(2, $this->id_tramite) . $rswrk->fields('Disp3Fld'); $rswrk->Close(); } else { $this->id_tramite->EditValue = $this->id_tramite->CurrentValue; } } else { $this->id_tramite->EditValue = NULL; } } $this->id_tramite->ViewCustomAttributes = ""; // fecha // hora // titulo $this->titulo->EditAttrs["class"] = "form-control"; $this->titulo->EditCustomAttributes = ""; $this->titulo->EditValue = $this->titulo->CurrentValue; $this->titulo->ViewCustomAttributes = ""; // archivo $this->archivo->EditAttrs["class"] = "form-control"; $this->archivo->EditCustomAttributes = ""; if (!ew_Empty($this->archivo->Upload->DbValue)) { $this->archivo->EditValue = $this->archivo->Upload->DbValue; } else { $this->archivo->EditValue = ""; } $this->archivo->ViewCustomAttributes = ""; // Edit refer script // id_tramite $this->id_tramite->HrefValue = ""; // fecha $this->fecha->HrefValue = ""; // hora $this->hora->HrefValue = ""; // titulo $this->titulo->HrefValue = ""; // archivo $this->archivo->HrefValue = ""; $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $Security, $Language, $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // UPLOAD_FILE_ID // PATH // PROCESS // BANK_ACCOUNT_ID // UPLOAD_FILE_STATUS_ID // DATETIME if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // UPLOAD_FILE_ID $this->UPLOAD_FILE_ID->ViewValue = $this->UPLOAD_FILE_ID->CurrentValue; $this->UPLOAD_FILE_ID->ViewCustomAttributes = ""; // PATH if (!ew_Empty($this->PATH->Upload->DbValue)) { $this->PATH->ViewValue = $this->PATH->Upload->DbValue; } else { $this->PATH->ViewValue = ""; } $this->PATH->ViewCustomAttributes = ""; // PROCESS $this->PROCESS->ViewValue = $this->PROCESS->CurrentValue; $this->PROCESS->ViewCustomAttributes = ""; // BANK_ACCOUNT_ID $this->BANK_ACCOUNT_ID->ViewValue = $this->BANK_ACCOUNT_ID->CurrentValue; $this->BANK_ACCOUNT_ID->ViewCustomAttributes = ""; // UPLOAD_FILE_STATUS_ID $this->UPLOAD_FILE_STATUS_ID->ViewValue = $this->UPLOAD_FILE_STATUS_ID->CurrentValue; $this->UPLOAD_FILE_STATUS_ID->ViewCustomAttributes = ""; // DATETIME $this->DATETIME->ViewValue = $this->DATETIME->CurrentValue; $this->DATETIME->ViewValue = ew_FormatDateTime($this->DATETIME->ViewValue, 7); $this->DATETIME->ViewCustomAttributes = ""; // PATH $this->PATH->LinkCustomAttributes = ""; $this->PATH->HrefValue = ""; $this->PATH->HrefValue2 = $this->PATH->UploadPath . $this->PATH->Upload->DbValue; $this->PATH->TooltipValue = ""; // PROCESS $this->PROCESS->LinkCustomAttributes = ""; $this->PROCESS->HrefValue = ""; $this->PROCESS->TooltipValue = ""; // BANK_ACCOUNT_ID $this->BANK_ACCOUNT_ID->LinkCustomAttributes = ""; $this->BANK_ACCOUNT_ID->HrefValue = ""; $this->BANK_ACCOUNT_ID->TooltipValue = ""; // UPLOAD_FILE_STATUS_ID $this->UPLOAD_FILE_STATUS_ID->LinkCustomAttributes = ""; $this->UPLOAD_FILE_STATUS_ID->HrefValue = ""; $this->UPLOAD_FILE_STATUS_ID->TooltipValue = ""; // DATETIME $this->DATETIME->LinkCustomAttributes = ""; $this->DATETIME->HrefValue = ""; $this->DATETIME->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row // PATH $this->PATH->EditAttrs["class"] = "form-control"; $this->PATH->EditCustomAttributes = ""; if (!ew_Empty($this->PATH->Upload->DbValue)) { $this->PATH->EditValue = $this->PATH->Upload->DbValue; } else { $this->PATH->EditValue = ""; } if (!ew_Empty($this->PATH->CurrentValue)) { $this->PATH->Upload->FileName = $this->PATH->CurrentValue; } if (($this->CurrentAction == "I" || $this->CurrentAction == "C") && !$this->EventCancelled) { ew_RenderUploadField($this->PATH); } // PROCESS $this->PROCESS->EditAttrs["class"] = "form-control"; $this->PROCESS->EditCustomAttributes = ""; $this->PROCESS->EditValue = ew_HtmlEncode($this->PROCESS->CurrentValue); $this->PROCESS->PlaceHolder = ew_RemoveHtml($this->PROCESS->FldCaption()); // BANK_ACCOUNT_ID $this->BANK_ACCOUNT_ID->EditAttrs["class"] = "form-control"; $this->BANK_ACCOUNT_ID->EditCustomAttributes = ""; $this->BANK_ACCOUNT_ID->EditValue = ew_HtmlEncode($this->BANK_ACCOUNT_ID->CurrentValue); $this->BANK_ACCOUNT_ID->PlaceHolder = ew_RemoveHtml($this->BANK_ACCOUNT_ID->FldCaption()); // UPLOAD_FILE_STATUS_ID $this->UPLOAD_FILE_STATUS_ID->EditAttrs["class"] = "form-control"; $this->UPLOAD_FILE_STATUS_ID->EditCustomAttributes = ""; $this->UPLOAD_FILE_STATUS_ID->EditValue = ew_HtmlEncode($this->UPLOAD_FILE_STATUS_ID->CurrentValue); $this->UPLOAD_FILE_STATUS_ID->PlaceHolder = ew_RemoveHtml($this->UPLOAD_FILE_STATUS_ID->FldCaption()); // DATETIME $this->DATETIME->EditAttrs["class"] = "form-control"; $this->DATETIME->EditCustomAttributes = ""; $this->DATETIME->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->DATETIME->CurrentValue, 7)); $this->DATETIME->PlaceHolder = ew_RemoveHtml($this->DATETIME->FldCaption()); // Add refer script // PATH $this->PATH->LinkCustomAttributes = ""; $this->PATH->HrefValue = ""; $this->PATH->HrefValue2 = $this->PATH->UploadPath . $this->PATH->Upload->DbValue; // PROCESS $this->PROCESS->LinkCustomAttributes = ""; $this->PROCESS->HrefValue = ""; // BANK_ACCOUNT_ID $this->BANK_ACCOUNT_ID->LinkCustomAttributes = ""; $this->BANK_ACCOUNT_ID->HrefValue = ""; // UPLOAD_FILE_STATUS_ID $this->UPLOAD_FILE_STATUS_ID->LinkCustomAttributes = ""; $this->UPLOAD_FILE_STATUS_ID->HrefValue = ""; // DATETIME $this->DATETIME->LinkCustomAttributes = ""; $this->DATETIME->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // codigo // Titulo // Descripcion // fecha // id_usuario // archivo // estado if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // codigo $this->codigo->ViewValue = $this->codigo->CurrentValue; $this->codigo->ViewCustomAttributes = ""; // Titulo $this->Titulo->ViewValue = $this->Titulo->CurrentValue; $this->Titulo->ViewCustomAttributes = ""; // Descripcion $this->Descripcion->ViewValue = $this->Descripcion->CurrentValue; $this->Descripcion->ViewCustomAttributes = ""; // fecha $this->fecha->ViewValue = $this->fecha->CurrentValue; $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7); $this->fecha->ViewCustomAttributes = ""; // archivo if (!ew_Empty($this->archivo->Upload->DbValue)) { $this->archivo->ViewValue = $this->archivo->Upload->DbValue; } else { $this->archivo->ViewValue = ""; } $this->archivo->ViewCustomAttributes = ""; // estado if (strval($this->estado->CurrentValue) != "") { switch ($this->estado->CurrentValue) { case $this->estado->FldTagValue(1): $this->estado->ViewValue = $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue; break; case $this->estado->FldTagValue(2): $this->estado->ViewValue = $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue; break; case $this->estado->FldTagValue(3): $this->estado->ViewValue = $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->CurrentValue; break; default: $this->estado->ViewValue = $this->estado->CurrentValue; } } else { $this->estado->ViewValue = NULL; } $this->estado->ViewCustomAttributes = ""; // codigo $this->codigo->LinkCustomAttributes = ""; $this->codigo->HrefValue = ""; $this->codigo->TooltipValue = ""; // Titulo $this->Titulo->LinkCustomAttributes = ""; $this->Titulo->HrefValue = ""; $this->Titulo->TooltipValue = ""; // Descripcion $this->Descripcion->LinkCustomAttributes = ""; $this->Descripcion->HrefValue = ""; $this->Descripcion->TooltipValue = ""; // archivo $this->archivo->LinkCustomAttributes = ""; if (!ew_Empty($this->archivo->Upload->DbValue)) { $this->archivo->HrefValue = "%u"; // Add prefix/suffix $this->archivo->LinkAttrs["target"] = ""; // Add target if ($this->Export != "") { $this->archivo->HrefValue = ew_ConvertFullUrl($this->archivo->HrefValue); } } else { $this->archivo->HrefValue = ""; } $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue; $this->archivo->TooltipValue = ""; // estado $this->estado->LinkCustomAttributes = ""; $this->estado->HrefValue = ""; $this->estado->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // codigo $this->codigo->EditAttrs["class"] = "form-control"; $this->codigo->EditCustomAttributes = ""; $this->codigo->EditValue = $this->codigo->CurrentValue; $this->codigo->ViewCustomAttributes = ""; // Titulo $this->Titulo->EditAttrs["class"] = "form-control"; $this->Titulo->EditCustomAttributes = ""; $this->Titulo->EditValue = ew_HtmlEncode($this->Titulo->CurrentValue); $this->Titulo->PlaceHolder = ew_RemoveHtml($this->Titulo->FldCaption()); // Descripcion $this->Descripcion->EditAttrs["class"] = "form-control"; $this->Descripcion->EditCustomAttributes = ""; $this->Descripcion->EditValue = ew_HtmlEncode($this->Descripcion->CurrentValue); $this->Descripcion->PlaceHolder = ew_RemoveHtml($this->Descripcion->FldCaption()); // archivo $this->archivo->EditAttrs["class"] = "form-control"; $this->archivo->EditCustomAttributes = ""; if (!ew_Empty($this->archivo->Upload->DbValue)) { $this->archivo->EditValue = $this->archivo->Upload->DbValue; } else { $this->archivo->EditValue = ""; } if (!ew_Empty($this->archivo->CurrentValue)) { $this->archivo->Upload->FileName = $this->archivo->CurrentValue; } if ($this->CurrentAction == "I" && !$this->EventCancelled) { ew_RenderUploadField($this->archivo); } // estado $this->estado->EditCustomAttributes = ""; $arwrk = array(); $arwrk[] = array($this->estado->FldTagValue(1), $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->FldTagValue(1)); $arwrk[] = array($this->estado->FldTagValue(2), $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->FldTagValue(2)); $arwrk[] = array($this->estado->FldTagValue(3), $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->FldTagValue(3)); $this->estado->EditValue = $arwrk; // Edit refer script // codigo $this->codigo->HrefValue = ""; // Titulo $this->Titulo->HrefValue = ""; // Descripcion $this->Descripcion->HrefValue = ""; // archivo if (!ew_Empty($this->archivo->Upload->DbValue)) { $this->archivo->HrefValue = "%u"; // Add prefix/suffix $this->archivo->LinkAttrs["target"] = ""; // Add target if ($this->Export != "") { $this->archivo->HrefValue = ew_ConvertFullUrl($this->archivo->HrefValue); } } else { $this->archivo->HrefValue = ""; } $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue; // estado $this->estado->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $Security, $Language, $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // rider_id // rider_name // rider_contact // rider_pic // rider_cnic // rider_address if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // rider_name $this->rider_name->ViewValue = $this->rider_name->CurrentValue; $this->rider_name->ViewCustomAttributes = ""; // rider_contact $this->rider_contact->ViewValue = $this->rider_contact->CurrentValue; $this->rider_contact->ViewCustomAttributes = ""; // rider_pic if (!ew_Empty($this->rider_pic->Upload->DbValue)) { $this->rider_pic->ViewValue = $this->rider_pic->Upload->DbValue; } else { $this->rider_pic->ViewValue = ""; } $this->rider_pic->ViewCustomAttributes = ""; // rider_cnic $this->rider_cnic->ViewValue = $this->rider_cnic->CurrentValue; $this->rider_cnic->ViewCustomAttributes = ""; // rider_address $this->rider_address->ViewValue = $this->rider_address->CurrentValue; $this->rider_address->ViewCustomAttributes = ""; // rider_name $this->rider_name->LinkCustomAttributes = ""; $this->rider_name->HrefValue = ""; $this->rider_name->TooltipValue = ""; // rider_contact $this->rider_contact->LinkCustomAttributes = ""; $this->rider_contact->HrefValue = ""; $this->rider_contact->TooltipValue = ""; // rider_pic $this->rider_pic->LinkCustomAttributes = ""; $this->rider_pic->HrefValue = ""; $this->rider_pic->HrefValue2 = $this->rider_pic->UploadPath . $this->rider_pic->Upload->DbValue; $this->rider_pic->TooltipValue = ""; // rider_cnic $this->rider_cnic->LinkCustomAttributes = ""; $this->rider_cnic->HrefValue = ""; $this->rider_cnic->TooltipValue = ""; // rider_address $this->rider_address->LinkCustomAttributes = ""; $this->rider_address->HrefValue = ""; $this->rider_address->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row // rider_name $this->rider_name->EditAttrs["class"] = "form-control"; $this->rider_name->EditCustomAttributes = ""; $this->rider_name->EditValue = ew_HtmlEncode($this->rider_name->CurrentValue); $this->rider_name->PlaceHolder = ew_RemoveHtml($this->rider_name->FldCaption()); // rider_contact $this->rider_contact->EditAttrs["class"] = "form-control"; $this->rider_contact->EditCustomAttributes = ""; $this->rider_contact->EditValue = ew_HtmlEncode($this->rider_contact->CurrentValue); $this->rider_contact->PlaceHolder = ew_RemoveHtml($this->rider_contact->FldCaption()); // rider_pic $this->rider_pic->EditAttrs["class"] = "form-control"; $this->rider_pic->EditCustomAttributes = ""; if (!ew_Empty($this->rider_pic->Upload->DbValue)) { $this->rider_pic->EditValue = $this->rider_pic->Upload->DbValue; } else { $this->rider_pic->EditValue = ""; } if (!ew_Empty($this->rider_pic->CurrentValue)) { $this->rider_pic->Upload->FileName = $this->rider_pic->CurrentValue; } if (($this->CurrentAction == "I" || $this->CurrentAction == "C") && !$this->EventCancelled) { ew_RenderUploadField($this->rider_pic); } // rider_cnic $this->rider_cnic->EditAttrs["class"] = "form-control"; $this->rider_cnic->EditCustomAttributes = ""; $this->rider_cnic->EditValue = ew_HtmlEncode($this->rider_cnic->CurrentValue); $this->rider_cnic->PlaceHolder = ew_RemoveHtml($this->rider_cnic->FldCaption()); // rider_address $this->rider_address->EditAttrs["class"] = "form-control"; $this->rider_address->EditCustomAttributes = ""; $this->rider_address->EditValue = ew_HtmlEncode($this->rider_address->CurrentValue); $this->rider_address->PlaceHolder = ew_RemoveHtml($this->rider_address->FldCaption()); // Edit refer script // rider_name $this->rider_name->HrefValue = ""; // rider_contact $this->rider_contact->HrefValue = ""; // rider_pic $this->rider_pic->HrefValue = ""; $this->rider_pic->HrefValue2 = $this->rider_pic->UploadPath . $this->rider_pic->Upload->DbValue; // rider_cnic $this->rider_cnic->HrefValue = ""; // rider_address $this->rider_address->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $Security, $Language, $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // image_id // p_id // image_name // image_detail if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // image_id $this->image_id->ViewValue = $this->image_id->CurrentValue; $this->image_id->ViewCustomAttributes = ""; // p_id if (strval($this->p_id->CurrentValue) != "") { $sFilterWrk = "`id`" . ew_SearchString("=", $this->p_id->CurrentValue, EW_DATATYPE_NUMBER, ""); $sSqlWrk = "SELECT `id`, `title` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `projects`"; $sWhereWrk = ""; ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->p_id, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->p_id->ViewValue = $this->p_id->DisplayValue($arwrk); $rswrk->Close(); } else { $this->p_id->ViewValue = $this->p_id->CurrentValue; } } else { $this->p_id->ViewValue = NULL; } $this->p_id->ViewCustomAttributes = ""; // image_name $this->image_name->UploadPath = "/projectimages"; if (!ew_Empty($this->image_name->Upload->DbValue)) { $this->image_name->ViewValue = $this->image_name->Upload->DbValue; } else { $this->image_name->ViewValue = ""; } $this->image_name->ViewCustomAttributes = ""; // image_detail $this->image_detail->ViewValue = $this->image_detail->CurrentValue; $this->image_detail->ViewCustomAttributes = ""; // p_id $this->p_id->LinkCustomAttributes = ""; $this->p_id->HrefValue = ""; $this->p_id->TooltipValue = ""; // image_name $this->image_name->LinkCustomAttributes = ""; $this->image_name->HrefValue = ""; $this->image_name->HrefValue2 = $this->image_name->UploadPath . $this->image_name->Upload->DbValue; $this->image_name->TooltipValue = ""; // image_detail $this->image_detail->LinkCustomAttributes = ""; $this->image_detail->HrefValue = ""; $this->image_detail->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row // p_id $this->p_id->EditAttrs["class"] = "form-control"; $this->p_id->EditCustomAttributes = ""; if ($this->p_id->getSessionValue() != "") { $this->p_id->CurrentValue = $this->p_id->getSessionValue(); if (strval($this->p_id->CurrentValue) != "") { $sFilterWrk = "`id`" . ew_SearchString("=", $this->p_id->CurrentValue, EW_DATATYPE_NUMBER, ""); $sSqlWrk = "SELECT `id`, `title` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `projects`"; $sWhereWrk = ""; ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->p_id, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->p_id->ViewValue = $this->p_id->DisplayValue($arwrk); $rswrk->Close(); } else { $this->p_id->ViewValue = $this->p_id->CurrentValue; } } else { $this->p_id->ViewValue = NULL; } $this->p_id->ViewCustomAttributes = ""; } else { if (trim(strval($this->p_id->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`id`" . ew_SearchString("=", $this->p_id->CurrentValue, EW_DATATYPE_NUMBER, ""); } $sSqlWrk = "SELECT `id`, `title` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `projects`"; $sWhereWrk = ""; ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->p_id, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->p_id->EditValue = $arwrk; } // image_name $this->image_name->EditAttrs["class"] = "form-control"; $this->image_name->EditCustomAttributes = ""; $this->image_name->UploadPath = "/projectimages"; if (!ew_Empty($this->image_name->Upload->DbValue)) { $this->image_name->EditValue = $this->image_name->Upload->DbValue; } else { $this->image_name->EditValue = ""; } if (!ew_Empty($this->image_name->CurrentValue)) { $this->image_name->Upload->FileName = $this->image_name->CurrentValue; } if (($this->CurrentAction == "I" || $this->CurrentAction == "C") && !$this->EventCancelled) { ew_RenderUploadField($this->image_name); } // image_detail $this->image_detail->EditAttrs["class"] = "form-control"; $this->image_detail->EditCustomAttributes = ""; $this->image_detail->EditValue = ew_HtmlEncode($this->image_detail->CurrentValue); $this->image_detail->PlaceHolder = ew_RemoveHtml($this->image_detail->FldCaption()); // Edit refer script // p_id $this->p_id->HrefValue = ""; // image_name $this->image_name->HrefValue = ""; $this->image_name->HrefValue2 = $this->image_name->UploadPath . $this->image_name->Upload->DbValue; // image_detail $this->image_detail->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs // Convert decimal values if posted back if ($this->precio->FormValue == $this->precio->CurrentValue && is_numeric(ew_StrToFloat($this->precio->CurrentValue))) { $this->precio->CurrentValue = ew_StrToFloat($this->precio->CurrentValue); } // Convert decimal values if posted back if ($this->entrega->FormValue == $this->entrega->CurrentValue && is_numeric(ew_StrToFloat($this->entrega->CurrentValue))) { $this->entrega->CurrentValue = ew_StrToFloat($this->entrega->CurrentValue); } // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // nro_orden // fecha_recepcion // cliente // id_tipo_cliente // tel // cel // objetos // detalle_a_realizar // fecha_entrega // observaciones // id_estado // precio // entrega // saldo // foto1 // foto2 // usuario if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // nro_orden $this->nro_orden->ViewValue = $this->nro_orden->CurrentValue; $this->nro_orden->ViewCustomAttributes = ""; // fecha_recepcion $this->fecha_recepcion->ViewValue = $this->fecha_recepcion->CurrentValue; $this->fecha_recepcion->ViewValue = ew_FormatDateTime($this->fecha_recepcion->ViewValue, 7); $this->fecha_recepcion->ViewCustomAttributes = ""; // cliente $this->cliente->ViewValue = $this->cliente->CurrentValue; $this->cliente->ViewCustomAttributes = ""; // id_tipo_cliente if (strval($this->id_tipo_cliente->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_cliente->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT DISTINCT `codigo`, `tipo_cliente` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_clientes`"; $sWhereWrk = ""; $lookuptblfilter = "`activo`='S'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tipo_cliente, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `tipo_cliente` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_tipo_cliente->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->id_tipo_cliente->ViewValue = $this->id_tipo_cliente->CurrentValue; } } else { $this->id_tipo_cliente->ViewValue = NULL; } $this->id_tipo_cliente->ViewCustomAttributes = ""; // tel $this->tel->ViewValue = $this->tel->CurrentValue; $this->tel->ViewCustomAttributes = ""; // cel $this->cel->ViewValue = $this->cel->CurrentValue; $this->cel->ViewCustomAttributes = ""; // objetos $this->objetos->ViewValue = $this->objetos->CurrentValue; $this->objetos->ViewCustomAttributes = ""; // detalle_a_realizar $this->detalle_a_realizar->ViewValue = $this->detalle_a_realizar->CurrentValue; $this->detalle_a_realizar->ViewCustomAttributes = ""; // fecha_entrega $this->fecha_entrega->ViewValue = $this->fecha_entrega->CurrentValue; $this->fecha_entrega->ViewValue = ew_FormatDateTime($this->fecha_entrega->ViewValue, 7); $this->fecha_entrega->ViewCustomAttributes = ""; // observaciones $this->observaciones->ViewValue = $this->observaciones->CurrentValue; $this->observaciones->ViewCustomAttributes = ""; // id_estado if (strval($this->id_estado->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_estado->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT DISTINCT `codigo`, `estado` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estados`"; $sWhereWrk = ""; $lookuptblfilter = "`activo`='S'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_estado, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `codigo` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_estado->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->id_estado->ViewValue = $this->id_estado->CurrentValue; } } else { $this->id_estado->ViewValue = NULL; } $this->id_estado->ViewCustomAttributes = ""; // precio $this->precio->ViewValue = $this->precio->CurrentValue; $this->precio->ViewValue = ew_FormatCurrency($this->precio->ViewValue, 2, -2, -2, -2); $this->precio->ViewCustomAttributes = ""; // entrega $this->entrega->ViewValue = $this->entrega->CurrentValue; $this->entrega->ViewValue = ew_FormatCurrency($this->entrega->ViewValue, 2, -2, -2, -2); $this->entrega->ViewCustomAttributes = ""; // saldo $this->saldo->ViewValue = $this->saldo->CurrentValue; $this->saldo->ViewValue = ew_FormatCurrency($this->saldo->ViewValue, 2, -2, -2, -2); $this->saldo->ViewCustomAttributes = ""; // foto1 if (!ew_Empty($this->foto1->Upload->DbValue)) { $this->foto1->ImageAlt = $this->foto1->FldAlt(); $this->foto1->ViewValue = ew_UploadPathEx(FALSE, $this->foto1->UploadPath) . $this->foto1->Upload->DbValue; } else { $this->foto1->ViewValue = ""; } $this->foto1->ViewCustomAttributes = ""; // foto2 if (!ew_Empty($this->foto2->Upload->DbValue)) { $this->foto2->ImageAlt = $this->foto2->FldAlt(); $this->foto2->ViewValue = ew_UploadPathEx(FALSE, $this->foto2->UploadPath) . $this->foto2->Upload->DbValue; } else { $this->foto2->ViewValue = ""; } $this->foto2->ViewCustomAttributes = ""; // nro_orden $this->nro_orden->LinkCustomAttributes = ""; $this->nro_orden->HrefValue = ""; $this->nro_orden->TooltipValue = ""; // fecha_recepcion $this->fecha_recepcion->LinkCustomAttributes = ""; $this->fecha_recepcion->HrefValue = ""; $this->fecha_recepcion->TooltipValue = ""; // cliente $this->cliente->LinkCustomAttributes = ""; $this->cliente->HrefValue = ""; $this->cliente->TooltipValue = ""; // id_tipo_cliente $this->id_tipo_cliente->LinkCustomAttributes = ""; $this->id_tipo_cliente->HrefValue = ""; $this->id_tipo_cliente->TooltipValue = ""; // tel $this->tel->LinkCustomAttributes = ""; $this->tel->HrefValue = ""; $this->tel->TooltipValue = ""; // cel $this->cel->LinkCustomAttributes = ""; $this->cel->HrefValue = ""; $this->cel->TooltipValue = ""; // objetos $this->objetos->LinkCustomAttributes = ""; $this->objetos->HrefValue = ""; $this->objetos->TooltipValue = ""; // detalle_a_realizar $this->detalle_a_realizar->LinkCustomAttributes = ""; $this->detalle_a_realizar->HrefValue = ""; $this->detalle_a_realizar->TooltipValue = ""; // fecha_entrega $this->fecha_entrega->LinkCustomAttributes = ""; $this->fecha_entrega->HrefValue = ""; $this->fecha_entrega->TooltipValue = ""; // observaciones $this->observaciones->LinkCustomAttributes = ""; $this->observaciones->HrefValue = ""; $this->observaciones->TooltipValue = ""; // id_estado $this->id_estado->LinkCustomAttributes = ""; $this->id_estado->HrefValue = ""; $this->id_estado->TooltipValue = ""; // precio $this->precio->LinkCustomAttributes = ""; $this->precio->HrefValue = ""; $this->precio->TooltipValue = ""; // entrega $this->entrega->LinkCustomAttributes = ""; $this->entrega->HrefValue = ""; $this->entrega->TooltipValue = ""; // foto1 $this->foto1->LinkCustomAttributes = ""; $this->foto1->HrefValue = ""; $this->foto1->HrefValue2 = $this->foto1->UploadPath . $this->foto1->Upload->DbValue; $this->foto1->TooltipValue = ""; // foto2 $this->foto2->LinkCustomAttributes = ""; $this->foto2->HrefValue = ""; $this->foto2->HrefValue2 = $this->foto2->UploadPath . $this->foto2->Upload->DbValue; $this->foto2->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // nro_orden $this->nro_orden->EditCustomAttributes = ""; $this->nro_orden->EditValue = $this->nro_orden->CurrentValue; $this->nro_orden->ViewCustomAttributes = ""; // fecha_recepcion $this->fecha_recepcion->EditCustomAttributes = ""; $this->fecha_recepcion->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_recepcion->CurrentValue, 7)); $this->fecha_recepcion->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->fecha_recepcion->FldCaption())); // cliente $this->cliente->EditCustomAttributes = ""; $this->cliente->EditValue = ew_HtmlEncode($this->cliente->CurrentValue); $this->cliente->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cliente->FldCaption())); // id_tipo_cliente $this->id_tipo_cliente->EditCustomAttributes = ""; if (trim(strval($this->id_tipo_cliente->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_cliente->CurrentValue, EW_DATATYPE_NUMBER); } $sSqlWrk = "SELECT DISTINCT `codigo`, `tipo_cliente` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_clientes`"; $sWhereWrk = ""; $lookuptblfilter = "`activo`='S'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tipo_cliente, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `tipo_cliente` ASC"; $rswrk = $conn->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->id_tipo_cliente->EditValue = $arwrk; // tel $this->tel->EditCustomAttributes = ""; $this->tel->EditValue = ew_HtmlEncode($this->tel->CurrentValue); $this->tel->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->tel->FldCaption())); // cel $this->cel->EditCustomAttributes = ""; $this->cel->EditValue = ew_HtmlEncode($this->cel->CurrentValue); $this->cel->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cel->FldCaption())); // objetos $this->objetos->EditCustomAttributes = ""; $this->objetos->EditValue = ew_HtmlEncode($this->objetos->CurrentValue); $this->objetos->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->objetos->FldCaption())); // detalle_a_realizar $this->detalle_a_realizar->EditCustomAttributes = ""; $this->detalle_a_realizar->EditValue = $this->detalle_a_realizar->CurrentValue; $this->detalle_a_realizar->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->detalle_a_realizar->FldCaption())); // fecha_entrega $this->fecha_entrega->EditCustomAttributes = ""; $this->fecha_entrega->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_entrega->CurrentValue, 7)); $this->fecha_entrega->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->fecha_entrega->FldCaption())); // observaciones $this->observaciones->EditCustomAttributes = ""; $this->observaciones->EditValue = $this->observaciones->CurrentValue; $this->observaciones->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->observaciones->FldCaption())); // id_estado $this->id_estado->EditCustomAttributes = ""; if (trim(strval($this->id_estado->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_estado->CurrentValue, EW_DATATYPE_NUMBER); } $sSqlWrk = "SELECT DISTINCT `codigo`, `estado` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `estados`"; $sWhereWrk = ""; $lookuptblfilter = "`activo`='S'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_estado, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `codigo` ASC"; $rswrk = $conn->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->id_estado->EditValue = $arwrk; // precio $this->precio->EditCustomAttributes = ""; $this->precio->EditValue = ew_HtmlEncode($this->precio->CurrentValue); $this->precio->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->precio->FldCaption())); if (strval($this->precio->EditValue) != "" && is_numeric($this->precio->EditValue)) { $this->precio->EditValue = ew_FormatNumber($this->precio->EditValue, -2, -2, -2, -2); } // entrega $this->entrega->EditCustomAttributes = ""; $this->entrega->EditValue = ew_HtmlEncode($this->entrega->CurrentValue); $this->entrega->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->entrega->FldCaption())); if (strval($this->entrega->EditValue) != "" && is_numeric($this->entrega->EditValue)) { $this->entrega->EditValue = ew_FormatNumber($this->entrega->EditValue, -2, -2, -2, -2); } // foto1 $this->foto1->EditCustomAttributes = ""; if (!ew_Empty($this->foto1->Upload->DbValue)) { $this->foto1->ImageAlt = $this->foto1->FldAlt(); $this->foto1->EditValue = ew_UploadPathEx(FALSE, $this->foto1->UploadPath) . $this->foto1->Upload->DbValue; } else { $this->foto1->EditValue = ""; } if ($this->CurrentAction == "I" && !$this->EventCancelled) { ew_RenderUploadField($this->foto1); } // foto2 $this->foto2->EditCustomAttributes = ""; if (!ew_Empty($this->foto2->Upload->DbValue)) { $this->foto2->ImageAlt = $this->foto2->FldAlt(); $this->foto2->EditValue = ew_UploadPathEx(FALSE, $this->foto2->UploadPath) . $this->foto2->Upload->DbValue; } else { $this->foto2->EditValue = ""; } if ($this->CurrentAction == "I" && !$this->EventCancelled) { ew_RenderUploadField($this->foto2); } // Edit refer script // nro_orden $this->nro_orden->HrefValue = ""; // fecha_recepcion $this->fecha_recepcion->HrefValue = ""; // cliente $this->cliente->HrefValue = ""; // id_tipo_cliente $this->id_tipo_cliente->HrefValue = ""; // tel $this->tel->HrefValue = ""; // cel $this->cel->HrefValue = ""; // objetos $this->objetos->HrefValue = ""; // detalle_a_realizar $this->detalle_a_realizar->HrefValue = ""; // fecha_entrega $this->fecha_entrega->HrefValue = ""; // observaciones $this->observaciones->HrefValue = ""; // id_estado $this->id_estado->HrefValue = ""; // precio $this->precio->HrefValue = ""; // entrega $this->entrega->HrefValue = ""; // foto1 $this->foto1->HrefValue = ""; $this->foto1->HrefValue2 = $this->foto1->UploadPath . $this->foto1->Upload->DbValue; // foto2 $this->foto2->HrefValue = ""; $this->foto2->HrefValue2 = $this->foto2->UploadPath . $this->foto2->Upload->DbValue; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs $this->ViewUrl = $this->GetViewUrl(); $this->EditUrl = $this->GetEditUrl(); $this->InlineEditUrl = $this->GetInlineEditUrl(); $this->CopyUrl = $this->GetCopyUrl(); $this->InlineCopyUrl = $this->GetInlineCopyUrl(); $this->DeleteUrl = $this->GetDeleteUrl(); // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // gd_id $this->gd_id->CellCssStyle = "white-space: nowrap;"; // g_name // g_image // gd_images if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // gd_id $this->gd_id->ViewValue = $this->gd_id->CurrentValue; $this->gd_id->ViewCustomAttributes = ""; // g_name $this->g_name->ViewValue = $this->g_name->CurrentValue; $this->g_name->ViewCustomAttributes = ""; // g_image $this->g_image->UploadPath = "/gallery"; if (!ew_Empty($this->g_image->Upload->DbValue)) { $this->g_image->ViewValue = $this->g_image->Upload->DbValue; } else { $this->g_image->ViewValue = ""; } $this->g_image->ViewCustomAttributes = ""; // gd_id $this->gd_id->LinkCustomAttributes = ""; $this->gd_id->HrefValue = ""; $this->gd_id->TooltipValue = ""; // g_name $this->g_name->LinkCustomAttributes = ""; $this->g_name->HrefValue = ""; $this->g_name->TooltipValue = ""; // g_image $this->g_image->LinkCustomAttributes = ""; $this->g_image->HrefValue = ""; $this->g_image->HrefValue2 = $this->g_image->UploadPath . $this->g_image->Upload->DbValue; $this->g_image->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row // gd_id // g_name $this->g_name->EditCustomAttributes = ""; $this->g_name->EditValue = ew_HtmlEncode($this->g_name->CurrentValue); $this->g_name->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->g_name->FldCaption())); // g_image $this->g_image->EditCustomAttributes = ""; $this->g_image->UploadPath = "/gallery"; if (!ew_Empty($this->g_image->Upload->DbValue)) { $this->g_image->EditValue = $this->g_image->Upload->DbValue; } else { $this->g_image->EditValue = ""; } if (!ew_Empty($this->g_image->CurrentValue)) { $this->g_image->Upload->FileName = $this->g_image->CurrentValue; } if (is_numeric($this->RowIndex) && !$this->EventCancelled) { ew_RenderUploadField($this->g_image, $this->RowIndex); } // Edit refer script // gd_id $this->gd_id->HrefValue = ""; // g_name $this->g_name->HrefValue = ""; // g_image $this->g_image->HrefValue = ""; $this->g_image->HrefValue2 = $this->g_image->UploadPath . $this->g_image->Upload->DbValue; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // gd_id $this->gd_id->EditCustomAttributes = ""; $this->gd_id->EditValue = $this->gd_id->CurrentValue; $this->gd_id->ViewCustomAttributes = ""; // g_name $this->g_name->EditCustomAttributes = ""; $this->g_name->EditValue = ew_HtmlEncode($this->g_name->CurrentValue); $this->g_name->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->g_name->FldCaption())); // g_image $this->g_image->EditCustomAttributes = ""; $this->g_image->UploadPath = "/gallery"; if (!ew_Empty($this->g_image->Upload->DbValue)) { $this->g_image->EditValue = $this->g_image->Upload->DbValue; } else { $this->g_image->EditValue = ""; } if (!ew_Empty($this->g_image->CurrentValue)) { $this->g_image->Upload->FileName = $this->g_image->CurrentValue; } if (is_numeric($this->RowIndex) && !$this->EventCancelled) { ew_RenderUploadField($this->g_image, $this->RowIndex); } // Edit refer script // gd_id $this->gd_id->HrefValue = ""; // g_name $this->g_name->HrefValue = ""; // g_image $this->g_image->HrefValue = ""; $this->g_image->HrefValue2 = $this->g_image->UploadPath . $this->g_image->Upload->DbValue; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $Security, $Language, $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // vl_media_id // vl_media_type // vl_media_name // vl_media_file // vl_media_file_custom if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // vl_media_id $this->vl_media_id->ViewValue = $this->vl_media_id->CurrentValue; $this->vl_media_id->ViewCustomAttributes = ""; // vl_media_type if (strval($this->vl_media_type->CurrentValue) != "") { $sFilterWrk = "`vl_media_type_id`" . ew_SearchString("=", $this->vl_media_type->CurrentValue, EW_DATATYPE_NUMBER, ""); $sSqlWrk = "SELECT `vl_media_type_id`, `vl_media_type_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `vl_media_type_list`"; $sWhereWrk = ""; ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->vl_media_type, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `vl_media_type_name` ASC"; $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->vl_media_type->ViewValue = $this->vl_media_type->DisplayValue($arwrk); $rswrk->Close(); } else { $this->vl_media_type->ViewValue = $this->vl_media_type->CurrentValue; } } else { $this->vl_media_type->ViewValue = NULL; } $this->vl_media_type->ViewCustomAttributes = ""; // vl_media_name $this->vl_media_name->ViewValue = $this->vl_media_name->CurrentValue; $this->vl_media_name->ViewCustomAttributes = ""; // vl_media_file if (!ew_Empty($this->vl_media_file->Upload->DbValue)) { $this->vl_media_file->ImageWidth = 200; $this->vl_media_file->ImageHeight = 200; $this->vl_media_file->ImageAlt = $this->vl_media_file->FldAlt(); $this->vl_media_file->ViewValue = $this->vl_media_file->Upload->DbValue; } else { $this->vl_media_file->ViewValue = ""; } $this->vl_media_file->ViewCustomAttributes = ""; // vl_media_file_custom $this->vl_media_file_custom->UploadPath = "uploads_custom/"; if (!ew_Empty($this->vl_media_file_custom->Upload->DbValue)) { $this->vl_media_file_custom->ImageWidth = 200; $this->vl_media_file_custom->ImageHeight = 200; $this->vl_media_file_custom->ImageAlt = $this->vl_media_file_custom->FldAlt(); $this->vl_media_file_custom->ViewValue = $this->vl_media_file_custom->Upload->DbValue; } else { $this->vl_media_file_custom->ViewValue = ""; } $this->vl_media_file_custom->ViewCustomAttributes = ""; // vl_media_id $this->vl_media_id->LinkCustomAttributes = ""; $this->vl_media_id->HrefValue = ""; $this->vl_media_id->TooltipValue = ""; // vl_media_type $this->vl_media_type->LinkCustomAttributes = ""; $this->vl_media_type->HrefValue = ""; $this->vl_media_type->TooltipValue = ""; // vl_media_name $this->vl_media_name->LinkCustomAttributes = ""; $this->vl_media_name->HrefValue = ""; $this->vl_media_name->TooltipValue = ""; // vl_media_file $this->vl_media_file->LinkCustomAttributes = ""; if (!ew_Empty($this->vl_media_file->Upload->DbValue)) { $this->vl_media_file->HrefValue = ew_GetFileUploadUrl($this->vl_media_file, $this->vl_media_file->Upload->DbValue); // Add prefix/suffix $this->vl_media_file->LinkAttrs["target"] = "_blank"; // Add target if ($this->Export != "") { $this->vl_media_file->HrefValue = ew_ConvertFullUrl($this->vl_media_file->HrefValue); } } else { $this->vl_media_file->HrefValue = ""; } $this->vl_media_file->HrefValue2 = $this->vl_media_file->UploadPath . $this->vl_media_file->Upload->DbValue; $this->vl_media_file->TooltipValue = ""; if ($this->vl_media_file->UseColorbox) { if (ew_Empty($this->vl_media_file->TooltipValue)) { $this->vl_media_file->LinkAttrs["title"] = $Language->Phrase("ViewImageGallery"); } $this->vl_media_file->LinkAttrs["data-rel"] = "vl_media_list_x_vl_media_file"; ew_AppendClass($this->vl_media_file->LinkAttrs["class"], "ewLightbox"); } // vl_media_file_custom $this->vl_media_file_custom->LinkCustomAttributes = ""; $this->vl_media_file_custom->UploadPath = "uploads_custom/"; if (!ew_Empty($this->vl_media_file_custom->Upload->DbValue)) { $this->vl_media_file_custom->HrefValue = ew_GetFileUploadUrl($this->vl_media_file_custom, $this->vl_media_file_custom->Upload->DbValue); // Add prefix/suffix $this->vl_media_file_custom->LinkAttrs["target"] = "_blank"; // Add target if ($this->Export != "") { $this->vl_media_file_custom->HrefValue = ew_ConvertFullUrl($this->vl_media_file_custom->HrefValue); } } else { $this->vl_media_file_custom->HrefValue = ""; } $this->vl_media_file_custom->HrefValue2 = $this->vl_media_file_custom->UploadPath . $this->vl_media_file_custom->Upload->DbValue; $this->vl_media_file_custom->TooltipValue = ""; if ($this->vl_media_file_custom->UseColorbox) { if (ew_Empty($this->vl_media_file_custom->TooltipValue)) { $this->vl_media_file_custom->LinkAttrs["title"] = $Language->Phrase("ViewImageGallery"); } $this->vl_media_file_custom->LinkAttrs["data-rel"] = "vl_media_list_x_vl_media_file_custom"; ew_AppendClass($this->vl_media_file_custom->LinkAttrs["class"], "ewLightbox"); } } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // vl_media_id $this->vl_media_id->EditAttrs["class"] = "form-control"; $this->vl_media_id->EditCustomAttributes = ""; $this->vl_media_id->EditValue = $this->vl_media_id->CurrentValue; $this->vl_media_id->ViewCustomAttributes = ""; // vl_media_type $this->vl_media_type->EditAttrs["class"] = "form-control"; $this->vl_media_type->EditCustomAttributes = ""; if (trim(strval($this->vl_media_type->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`vl_media_type_id`" . ew_SearchString("=", $this->vl_media_type->CurrentValue, EW_DATATYPE_NUMBER, ""); } $sSqlWrk = "SELECT `vl_media_type_id`, `vl_media_type_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `vl_media_type_list`"; $sWhereWrk = ""; ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->vl_media_type, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `vl_media_type_name` ASC"; $rswrk = Conn()->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->vl_media_type->EditValue = $arwrk; // vl_media_name $this->vl_media_name->EditAttrs["class"] = "form-control"; $this->vl_media_name->EditCustomAttributes = ""; $this->vl_media_name->EditValue = ew_HtmlEncode($this->vl_media_name->CurrentValue); // vl_media_file $this->vl_media_file->EditAttrs["class"] = "form-control"; $this->vl_media_file->EditCustomAttributes = ""; if (!ew_Empty($this->vl_media_file->Upload->DbValue)) { $this->vl_media_file->ImageWidth = 200; $this->vl_media_file->ImageHeight = 200; $this->vl_media_file->ImageAlt = $this->vl_media_file->FldAlt(); $this->vl_media_file->EditValue = $this->vl_media_file->Upload->DbValue; } else { $this->vl_media_file->EditValue = ""; } if (!ew_Empty($this->vl_media_file->CurrentValue)) { $this->vl_media_file->Upload->FileName = $this->vl_media_file->CurrentValue; } if ($this->CurrentAction == "I" && !$this->EventCancelled) { ew_RenderUploadField($this->vl_media_file); } // vl_media_file_custom $this->vl_media_file_custom->EditAttrs["class"] = "form-control"; $this->vl_media_file_custom->EditCustomAttributes = ""; $this->vl_media_file_custom->UploadPath = "uploads_custom/"; if (!ew_Empty($this->vl_media_file_custom->Upload->DbValue)) { $this->vl_media_file_custom->ImageWidth = 200; $this->vl_media_file_custom->ImageHeight = 200; $this->vl_media_file_custom->ImageAlt = $this->vl_media_file_custom->FldAlt(); $this->vl_media_file_custom->EditValue = $this->vl_media_file_custom->Upload->DbValue; } else { $this->vl_media_file_custom->EditValue = ""; } if (!ew_Empty($this->vl_media_file_custom->CurrentValue)) { $this->vl_media_file_custom->Upload->FileName = $this->vl_media_file_custom->CurrentValue; } if ($this->CurrentAction == "I" && !$this->EventCancelled) { ew_RenderUploadField($this->vl_media_file_custom); } // Edit refer script // vl_media_id $this->vl_media_id->LinkCustomAttributes = ""; $this->vl_media_id->HrefValue = ""; // vl_media_type $this->vl_media_type->LinkCustomAttributes = ""; $this->vl_media_type->HrefValue = ""; // vl_media_name $this->vl_media_name->LinkCustomAttributes = ""; $this->vl_media_name->HrefValue = ""; // vl_media_file $this->vl_media_file->LinkCustomAttributes = ""; if (!ew_Empty($this->vl_media_file->Upload->DbValue)) { $this->vl_media_file->HrefValue = ew_GetFileUploadUrl($this->vl_media_file, $this->vl_media_file->Upload->DbValue); // Add prefix/suffix $this->vl_media_file->LinkAttrs["target"] = "_blank"; // Add target if ($this->Export != "") { $this->vl_media_file->HrefValue = ew_ConvertFullUrl($this->vl_media_file->HrefValue); } } else { $this->vl_media_file->HrefValue = ""; } $this->vl_media_file->HrefValue2 = $this->vl_media_file->UploadPath . $this->vl_media_file->Upload->DbValue; // vl_media_file_custom $this->vl_media_file_custom->LinkCustomAttributes = ""; $this->vl_media_file_custom->UploadPath = "uploads_custom/"; if (!ew_Empty($this->vl_media_file_custom->Upload->DbValue)) { $this->vl_media_file_custom->HrefValue = ew_GetFileUploadUrl($this->vl_media_file_custom, $this->vl_media_file_custom->Upload->DbValue); // Add prefix/suffix $this->vl_media_file_custom->LinkAttrs["target"] = "_blank"; // Add target if ($this->Export != "") { $this->vl_media_file_custom->HrefValue = ew_ConvertFullUrl($this->vl_media_file_custom->HrefValue); } } else { $this->vl_media_file_custom->HrefValue = ""; } $this->vl_media_file_custom->HrefValue2 = $this->vl_media_file_custom->UploadPath . $this->vl_media_file_custom->Upload->DbValue; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $Security, $Language, $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // id // title // images // intro // full_intro // details // livelink if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // id $this->id->ViewValue = $this->id->CurrentValue; $this->id->ViewCustomAttributes = ""; // title $this->title->ViewValue = $this->title->CurrentValue; $this->title->ViewCustomAttributes = ""; // images $this->images->UploadPath = "/uploads"; if (!ew_Empty($this->images->Upload->DbValue)) { $this->images->ViewValue = $this->images->Upload->DbValue; } else { $this->images->ViewValue = ""; } $this->images->ViewCustomAttributes = ""; // intro $this->intro->ViewValue = $this->intro->CurrentValue; $this->intro->ViewCustomAttributes = ""; // full_intro $this->full_intro->ViewValue = $this->full_intro->CurrentValue; $this->full_intro->ViewCustomAttributes = ""; // details $this->details->ViewValue = $this->details->CurrentValue; $this->details->ViewCustomAttributes = ""; // livelink $this->livelink->ViewValue = $this->livelink->CurrentValue; $this->livelink->ViewCustomAttributes = ""; // id $this->id->LinkCustomAttributes = ""; $this->id->HrefValue = ""; $this->id->TooltipValue = ""; // title $this->title->LinkCustomAttributes = ""; $this->title->HrefValue = ""; $this->title->TooltipValue = ""; // images $this->images->LinkCustomAttributes = ""; $this->images->HrefValue = ""; $this->images->HrefValue2 = $this->images->UploadPath . $this->images->Upload->DbValue; $this->images->TooltipValue = ""; // intro $this->intro->LinkCustomAttributes = ""; $this->intro->HrefValue = ""; $this->intro->TooltipValue = ""; // full_intro $this->full_intro->LinkCustomAttributes = ""; $this->full_intro->HrefValue = ""; $this->full_intro->TooltipValue = ""; // details $this->details->LinkCustomAttributes = ""; $this->details->HrefValue = ""; $this->details->TooltipValue = ""; // livelink $this->livelink->LinkCustomAttributes = ""; $this->livelink->HrefValue = ""; $this->livelink->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // id $this->id->EditAttrs["class"] = "form-control"; $this->id->EditCustomAttributes = ""; $this->id->EditValue = $this->id->CurrentValue; $this->id->ViewCustomAttributes = ""; // title $this->title->EditAttrs["class"] = "form-control"; $this->title->EditCustomAttributes = ""; $this->title->EditValue = ew_HtmlEncode($this->title->CurrentValue); $this->title->PlaceHolder = ew_RemoveHtml($this->title->FldCaption()); // images $this->images->EditAttrs["class"] = "form-control"; $this->images->EditCustomAttributes = ""; $this->images->UploadPath = "/uploads"; if (!ew_Empty($this->images->Upload->DbValue)) { $this->images->EditValue = $this->images->Upload->DbValue; } else { $this->images->EditValue = ""; } if (!ew_Empty($this->images->CurrentValue)) { $this->images->Upload->FileName = $this->images->CurrentValue; } if ($this->CurrentAction == "I" && !$this->EventCancelled) { ew_RenderUploadField($this->images); } // intro $this->intro->EditAttrs["class"] = "form-control"; $this->intro->EditCustomAttributes = ""; $this->intro->EditValue = ew_HtmlEncode($this->intro->CurrentValue); $this->intro->PlaceHolder = ew_RemoveHtml($this->intro->FldCaption()); // full_intro $this->full_intro->EditAttrs["class"] = "form-control"; $this->full_intro->EditCustomAttributes = ""; $this->full_intro->EditValue = ew_HtmlEncode($this->full_intro->CurrentValue); $this->full_intro->PlaceHolder = ew_RemoveHtml($this->full_intro->FldCaption()); // details $this->details->EditAttrs["class"] = "form-control"; $this->details->EditCustomAttributes = ""; $this->details->EditValue = ew_HtmlEncode($this->details->CurrentValue); $this->details->PlaceHolder = ew_RemoveHtml($this->details->FldCaption()); // livelink $this->livelink->EditAttrs["class"] = "form-control"; $this->livelink->EditCustomAttributes = ""; $this->livelink->EditValue = ew_HtmlEncode($this->livelink->CurrentValue); $this->livelink->PlaceHolder = ew_RemoveHtml($this->livelink->FldCaption()); // Edit refer script // id $this->id->HrefValue = ""; // title $this->title->HrefValue = ""; // images $this->images->HrefValue = ""; $this->images->HrefValue2 = $this->images->UploadPath . $this->images->Upload->DbValue; // intro $this->intro->HrefValue = ""; // full_intro $this->full_intro->HrefValue = ""; // details $this->details->HrefValue = ""; // livelink $this->livelink->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // cat_id // cat_name // cat_file // cat_date if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // cat_name $this->cat_name->ViewValue = $this->cat_name->CurrentValue; $this->cat_name->ViewCustomAttributes = ""; // cat_file $this->cat_file->UploadPath = "/catalogues/"; if (!ew_Empty($this->cat_file->Upload->DbValue)) { $this->cat_file->ViewValue = $this->cat_file->Upload->DbValue; } else { $this->cat_file->ViewValue = ""; } $this->cat_file->ViewCustomAttributes = ""; // cat_date $this->cat_date->ViewValue = $this->cat_date->CurrentValue; $this->cat_date->ViewValue = ew_FormatDateTime($this->cat_date->ViewValue, 5); $this->cat_date->ViewCustomAttributes = ""; // cat_name $this->cat_name->LinkCustomAttributes = ""; $this->cat_name->HrefValue = ""; $this->cat_name->TooltipValue = ""; // cat_file $this->cat_file->LinkCustomAttributes = ""; $this->cat_file->UploadPath = "/catalogues/"; if (!ew_Empty($this->cat_file->Upload->DbValue)) { $this->cat_file->HrefValue = ew_UploadPathEx(FALSE, $this->cat_file->UploadPath) . $this->cat_file->Upload->DbValue; // Add prefix/suffix $this->cat_file->LinkAttrs["target"] = ""; // Add target if ($this->Export != "") { $this->cat_file->HrefValue = ew_ConvertFullUrl($this->cat_file->HrefValue); } } else { $this->cat_file->HrefValue = ""; } $this->cat_file->HrefValue2 = $this->cat_file->UploadPath . $this->cat_file->Upload->DbValue; $this->cat_file->TooltipValue = ""; // cat_date $this->cat_date->LinkCustomAttributes = ""; $this->cat_date->HrefValue = ""; $this->cat_date->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row // cat_name $this->cat_name->EditCustomAttributes = ""; $this->cat_name->EditValue = ew_HtmlEncode($this->cat_name->CurrentValue); $this->cat_name->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cat_name->FldCaption())); // cat_file $this->cat_file->EditCustomAttributes = ""; $this->cat_file->UploadPath = "/catalogues/"; if (!ew_Empty($this->cat_file->Upload->DbValue)) { $this->cat_file->EditValue = $this->cat_file->Upload->DbValue; } else { $this->cat_file->EditValue = ""; } if (!ew_Empty($this->cat_file->CurrentValue)) { $this->cat_file->Upload->FileName = $this->cat_file->CurrentValue; } if (($this->CurrentAction == "I" || $this->CurrentAction == "C") && !$this->EventCancelled) { ew_RenderUploadField($this->cat_file); } // cat_date $this->cat_date->EditCustomAttributes = ""; $this->cat_date->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->cat_date->CurrentValue, 5)); $this->cat_date->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cat_date->FldCaption())); // Edit refer script // cat_name $this->cat_name->HrefValue = ""; // cat_file $this->cat_file->UploadPath = "/catalogues/"; if (!ew_Empty($this->cat_file->Upload->DbValue)) { $this->cat_file->HrefValue = ew_UploadPathEx(FALSE, $this->cat_file->UploadPath) . $this->cat_file->Upload->DbValue; // Add prefix/suffix $this->cat_file->LinkAttrs["target"] = ""; // Add target if ($this->Export != "") { $this->cat_file->HrefValue = ew_ConvertFullUrl($this->cat_file->HrefValue); } } else { $this->cat_file->HrefValue = ""; } $this->cat_file->HrefValue2 = $this->cat_file->UploadPath . $this->cat_file->Upload->DbValue; // cat_date $this->cat_date->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $Security, $Language, $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // product_id // category_id // scat_id // product_name // product_image // product_secimage // product_description // feature_ledtype // feature_power // feature_lumen // feature_viewangle // feature_cri // feature_iprating // feature_colortemp // feature_body // feature_cutoutsize // feature_colors // feature_dimmable // feature_warranty // feature_application if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // product_id $this->product_id->ViewValue = $this->product_id->CurrentValue; $this->product_id->ViewCustomAttributes = ""; // category_id if (strval($this->category_id->CurrentValue) != "") { $sFilterWrk = "`category_id`" . ew_SearchString("=", $this->category_id->CurrentValue, EW_DATATYPE_NUMBER, ""); $sSqlWrk = "SELECT `category_id`, `category_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `category`"; $sWhereWrk = ""; ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->category_id, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->category_id->ViewValue = $this->category_id->DisplayValue($arwrk); $rswrk->Close(); } else { $this->category_id->ViewValue = $this->category_id->CurrentValue; } } else { $this->category_id->ViewValue = NULL; } $this->category_id->ViewCustomAttributes = ""; // scat_id if (strval($this->scat_id->CurrentValue) != "") { $sFilterWrk = "`scat_id`" . ew_SearchString("=", $this->scat_id->CurrentValue, EW_DATATYPE_NUMBER, ""); $sSqlWrk = "SELECT `scat_id`, `scat_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sub_category`"; $sWhereWrk = ""; ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->scat_id, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->scat_id->ViewValue = $this->scat_id->DisplayValue($arwrk); $rswrk->Close(); } else { $this->scat_id->ViewValue = $this->scat_id->CurrentValue; } } else { $this->scat_id->ViewValue = NULL; } $this->scat_id->ViewCustomAttributes = ""; // product_name $this->product_name->ViewValue = $this->product_name->CurrentValue; $this->product_name->ViewCustomAttributes = ""; // product_image if (!ew_Empty($this->product_image->Upload->DbValue)) { $this->product_image->ViewValue = $this->product_image->Upload->DbValue; } else { $this->product_image->ViewValue = ""; } $this->product_image->ViewCustomAttributes = ""; // product_secimage if (!ew_Empty($this->product_secimage->Upload->DbValue)) { $this->product_secimage->ViewValue = $this->product_secimage->Upload->DbValue; } else { $this->product_secimage->ViewValue = ""; } $this->product_secimage->ViewCustomAttributes = ""; // product_description $this->product_description->ViewValue = $this->product_description->CurrentValue; $this->product_description->ViewCustomAttributes = ""; // feature_ledtype $this->feature_ledtype->ViewValue = $this->feature_ledtype->CurrentValue; $this->feature_ledtype->ViewCustomAttributes = ""; // feature_power $this->feature_power->ViewValue = $this->feature_power->CurrentValue; $this->feature_power->ViewCustomAttributes = ""; // feature_lumen $this->feature_lumen->ViewValue = $this->feature_lumen->CurrentValue; $this->feature_lumen->ViewCustomAttributes = ""; // feature_viewangle $this->feature_viewangle->ViewValue = $this->feature_viewangle->CurrentValue; $this->feature_viewangle->ViewCustomAttributes = ""; // feature_cri $this->feature_cri->ViewValue = $this->feature_cri->CurrentValue; $this->feature_cri->ViewCustomAttributes = ""; // feature_iprating $this->feature_iprating->ViewValue = $this->feature_iprating->CurrentValue; $this->feature_iprating->ViewCustomAttributes = ""; // feature_colortemp $this->feature_colortemp->ViewValue = $this->feature_colortemp->CurrentValue; $this->feature_colortemp->ViewCustomAttributes = ""; // feature_body $this->feature_body->ViewValue = $this->feature_body->CurrentValue; $this->feature_body->ViewCustomAttributes = ""; // feature_cutoutsize $this->feature_cutoutsize->ViewValue = $this->feature_cutoutsize->CurrentValue; $this->feature_cutoutsize->ViewCustomAttributes = ""; // feature_colors $this->feature_colors->ViewValue = $this->feature_colors->CurrentValue; $this->feature_colors->ViewCustomAttributes = ""; // feature_dimmable $this->feature_dimmable->ViewValue = $this->feature_dimmable->CurrentValue; $this->feature_dimmable->ViewCustomAttributes = ""; // feature_warranty $this->feature_warranty->ViewValue = $this->feature_warranty->CurrentValue; $this->feature_warranty->ViewCustomAttributes = ""; // feature_application $this->feature_application->ViewValue = $this->feature_application->CurrentValue; $this->feature_application->ViewCustomAttributes = ""; // product_id $this->product_id->LinkCustomAttributes = ""; $this->product_id->HrefValue = ""; $this->product_id->TooltipValue = ""; // category_id $this->category_id->LinkCustomAttributes = ""; $this->category_id->HrefValue = ""; $this->category_id->TooltipValue = ""; // scat_id $this->scat_id->LinkCustomAttributes = ""; $this->scat_id->HrefValue = ""; $this->scat_id->TooltipValue = ""; // product_name $this->product_name->LinkCustomAttributes = ""; $this->product_name->HrefValue = ""; $this->product_name->TooltipValue = ""; // product_image $this->product_image->LinkCustomAttributes = ""; $this->product_image->HrefValue = ""; $this->product_image->HrefValue2 = $this->product_image->UploadPath . $this->product_image->Upload->DbValue; $this->product_image->TooltipValue = ""; // product_secimage $this->product_secimage->LinkCustomAttributes = ""; $this->product_secimage->HrefValue = ""; $this->product_secimage->HrefValue2 = $this->product_secimage->UploadPath . $this->product_secimage->Upload->DbValue; $this->product_secimage->TooltipValue = ""; // product_description $this->product_description->LinkCustomAttributes = ""; $this->product_description->HrefValue = ""; $this->product_description->TooltipValue = ""; // feature_ledtype $this->feature_ledtype->LinkCustomAttributes = ""; $this->feature_ledtype->HrefValue = ""; $this->feature_ledtype->TooltipValue = ""; // feature_power $this->feature_power->LinkCustomAttributes = ""; $this->feature_power->HrefValue = ""; $this->feature_power->TooltipValue = ""; // feature_lumen $this->feature_lumen->LinkCustomAttributes = ""; $this->feature_lumen->HrefValue = ""; $this->feature_lumen->TooltipValue = ""; // feature_viewangle $this->feature_viewangle->LinkCustomAttributes = ""; $this->feature_viewangle->HrefValue = ""; $this->feature_viewangle->TooltipValue = ""; // feature_cri $this->feature_cri->LinkCustomAttributes = ""; $this->feature_cri->HrefValue = ""; $this->feature_cri->TooltipValue = ""; // feature_iprating $this->feature_iprating->LinkCustomAttributes = ""; $this->feature_iprating->HrefValue = ""; $this->feature_iprating->TooltipValue = ""; // feature_colortemp $this->feature_colortemp->LinkCustomAttributes = ""; $this->feature_colortemp->HrefValue = ""; $this->feature_colortemp->TooltipValue = ""; // feature_body $this->feature_body->LinkCustomAttributes = ""; $this->feature_body->HrefValue = ""; $this->feature_body->TooltipValue = ""; // feature_cutoutsize $this->feature_cutoutsize->LinkCustomAttributes = ""; $this->feature_cutoutsize->HrefValue = ""; $this->feature_cutoutsize->TooltipValue = ""; // feature_colors $this->feature_colors->LinkCustomAttributes = ""; $this->feature_colors->HrefValue = ""; $this->feature_colors->TooltipValue = ""; // feature_dimmable $this->feature_dimmable->LinkCustomAttributes = ""; $this->feature_dimmable->HrefValue = ""; $this->feature_dimmable->TooltipValue = ""; // feature_warranty $this->feature_warranty->LinkCustomAttributes = ""; $this->feature_warranty->HrefValue = ""; $this->feature_warranty->TooltipValue = ""; // feature_application $this->feature_application->LinkCustomAttributes = ""; $this->feature_application->HrefValue = ""; $this->feature_application->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // product_id $this->product_id->EditAttrs["class"] = "form-control"; $this->product_id->EditCustomAttributes = ""; $this->product_id->EditValue = $this->product_id->CurrentValue; $this->product_id->ViewCustomAttributes = ""; // category_id $this->category_id->EditAttrs["class"] = "form-control"; $this->category_id->EditCustomAttributes = ""; if (trim(strval($this->category_id->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`category_id`" . ew_SearchString("=", $this->category_id->CurrentValue, EW_DATATYPE_NUMBER, ""); } $sSqlWrk = "SELECT `category_id`, `category_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, `category_name` AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `category`"; $sWhereWrk = ""; ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->category_id, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->category_id->EditValue = $arwrk; // scat_id $this->scat_id->EditAttrs["class"] = "form-control"; $this->scat_id->EditCustomAttributes = ""; if ($this->scat_id->getSessionValue() != "") { $this->scat_id->CurrentValue = $this->scat_id->getSessionValue(); if (strval($this->scat_id->CurrentValue) != "") { $sFilterWrk = "`scat_id`" . ew_SearchString("=", $this->scat_id->CurrentValue, EW_DATATYPE_NUMBER, ""); $sSqlWrk = "SELECT `scat_id`, `scat_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sub_category`"; $sWhereWrk = ""; ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->scat_id, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->scat_id->ViewValue = $this->scat_id->DisplayValue($arwrk); $rswrk->Close(); } else { $this->scat_id->ViewValue = $this->scat_id->CurrentValue; } } else { $this->scat_id->ViewValue = NULL; } $this->scat_id->ViewCustomAttributes = ""; } else { if (trim(strval($this->scat_id->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`scat_id`" . ew_SearchString("=", $this->scat_id->CurrentValue, EW_DATATYPE_NUMBER, ""); } $sSqlWrk = "SELECT `scat_id`, `scat_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, `category_id` AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `sub_category`"; $sWhereWrk = ""; ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->scat_id, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->scat_id->EditValue = $arwrk; } // product_name $this->product_name->EditAttrs["class"] = "form-control"; $this->product_name->EditCustomAttributes = ""; $this->product_name->EditValue = ew_HtmlEncode($this->product_name->CurrentValue); $this->product_name->PlaceHolder = ew_RemoveHtml($this->product_name->FldCaption()); // product_image $this->product_image->EditAttrs["class"] = "form-control"; $this->product_image->EditCustomAttributes = ""; if (!ew_Empty($this->product_image->Upload->DbValue)) { $this->product_image->EditValue = $this->product_image->Upload->DbValue; } else { $this->product_image->EditValue = ""; } if (!ew_Empty($this->product_image->CurrentValue)) { $this->product_image->Upload->FileName = $this->product_image->CurrentValue; } if ($this->CurrentAction == "I" && !$this->EventCancelled) { ew_RenderUploadField($this->product_image); } // product_secimage $this->product_secimage->EditAttrs["class"] = "form-control"; $this->product_secimage->EditCustomAttributes = ""; if (!ew_Empty($this->product_secimage->Upload->DbValue)) { $this->product_secimage->EditValue = $this->product_secimage->Upload->DbValue; } else { $this->product_secimage->EditValue = ""; } if (!ew_Empty($this->product_secimage->CurrentValue)) { $this->product_secimage->Upload->FileName = $this->product_secimage->CurrentValue; } if ($this->CurrentAction == "I" && !$this->EventCancelled) { ew_RenderUploadField($this->product_secimage); } // product_description $this->product_description->EditAttrs["class"] = "form-control"; $this->product_description->EditCustomAttributes = ""; $this->product_description->EditValue = ew_HtmlEncode($this->product_description->CurrentValue); $this->product_description->PlaceHolder = ew_RemoveHtml($this->product_description->FldCaption()); // feature_ledtype $this->feature_ledtype->EditAttrs["class"] = "form-control"; $this->feature_ledtype->EditCustomAttributes = ""; $this->feature_ledtype->EditValue = ew_HtmlEncode($this->feature_ledtype->CurrentValue); $this->feature_ledtype->PlaceHolder = ew_RemoveHtml($this->feature_ledtype->FldCaption()); // feature_power $this->feature_power->EditAttrs["class"] = "form-control"; $this->feature_power->EditCustomAttributes = ""; $this->feature_power->EditValue = ew_HtmlEncode($this->feature_power->CurrentValue); $this->feature_power->PlaceHolder = ew_RemoveHtml($this->feature_power->FldCaption()); // feature_lumen $this->feature_lumen->EditAttrs["class"] = "form-control"; $this->feature_lumen->EditCustomAttributes = ""; $this->feature_lumen->EditValue = ew_HtmlEncode($this->feature_lumen->CurrentValue); $this->feature_lumen->PlaceHolder = ew_RemoveHtml($this->feature_lumen->FldCaption()); // feature_viewangle $this->feature_viewangle->EditAttrs["class"] = "form-control"; $this->feature_viewangle->EditCustomAttributes = ""; $this->feature_viewangle->EditValue = ew_HtmlEncode($this->feature_viewangle->CurrentValue); $this->feature_viewangle->PlaceHolder = ew_RemoveHtml($this->feature_viewangle->FldCaption()); // feature_cri $this->feature_cri->EditAttrs["class"] = "form-control"; $this->feature_cri->EditCustomAttributes = ""; $this->feature_cri->EditValue = ew_HtmlEncode($this->feature_cri->CurrentValue); $this->feature_cri->PlaceHolder = ew_RemoveHtml($this->feature_cri->FldCaption()); // feature_iprating $this->feature_iprating->EditAttrs["class"] = "form-control"; $this->feature_iprating->EditCustomAttributes = ""; $this->feature_iprating->EditValue = ew_HtmlEncode($this->feature_iprating->CurrentValue); $this->feature_iprating->PlaceHolder = ew_RemoveHtml($this->feature_iprating->FldCaption()); // feature_colortemp $this->feature_colortemp->EditAttrs["class"] = "form-control"; $this->feature_colortemp->EditCustomAttributes = ""; $this->feature_colortemp->EditValue = ew_HtmlEncode($this->feature_colortemp->CurrentValue); $this->feature_colortemp->PlaceHolder = ew_RemoveHtml($this->feature_colortemp->FldCaption()); // feature_body $this->feature_body->EditAttrs["class"] = "form-control"; $this->feature_body->EditCustomAttributes = ""; $this->feature_body->EditValue = ew_HtmlEncode($this->feature_body->CurrentValue); $this->feature_body->PlaceHolder = ew_RemoveHtml($this->feature_body->FldCaption()); // feature_cutoutsize $this->feature_cutoutsize->EditAttrs["class"] = "form-control"; $this->feature_cutoutsize->EditCustomAttributes = ""; $this->feature_cutoutsize->EditValue = ew_HtmlEncode($this->feature_cutoutsize->CurrentValue); $this->feature_cutoutsize->PlaceHolder = ew_RemoveHtml($this->feature_cutoutsize->FldCaption()); // feature_colors $this->feature_colors->EditAttrs["class"] = "form-control"; $this->feature_colors->EditCustomAttributes = ""; $this->feature_colors->EditValue = ew_HtmlEncode($this->feature_colors->CurrentValue); $this->feature_colors->PlaceHolder = ew_RemoveHtml($this->feature_colors->FldCaption()); // feature_dimmable $this->feature_dimmable->EditAttrs["class"] = "form-control"; $this->feature_dimmable->EditCustomAttributes = ""; $this->feature_dimmable->EditValue = ew_HtmlEncode($this->feature_dimmable->CurrentValue); $this->feature_dimmable->PlaceHolder = ew_RemoveHtml($this->feature_dimmable->FldCaption()); // feature_warranty $this->feature_warranty->EditAttrs["class"] = "form-control"; $this->feature_warranty->EditCustomAttributes = ""; $this->feature_warranty->EditValue = ew_HtmlEncode($this->feature_warranty->CurrentValue); $this->feature_warranty->PlaceHolder = ew_RemoveHtml($this->feature_warranty->FldCaption()); // feature_application $this->feature_application->EditAttrs["class"] = "form-control"; $this->feature_application->EditCustomAttributes = ""; $this->feature_application->EditValue = ew_HtmlEncode($this->feature_application->CurrentValue); $this->feature_application->PlaceHolder = ew_RemoveHtml($this->feature_application->FldCaption()); // Edit refer script // product_id $this->product_id->HrefValue = ""; // category_id $this->category_id->HrefValue = ""; // scat_id $this->scat_id->HrefValue = ""; // product_name $this->product_name->HrefValue = ""; // product_image $this->product_image->HrefValue = ""; $this->product_image->HrefValue2 = $this->product_image->UploadPath . $this->product_image->Upload->DbValue; // product_secimage $this->product_secimage->HrefValue = ""; $this->product_secimage->HrefValue2 = $this->product_secimage->UploadPath . $this->product_secimage->Upload->DbValue; // product_description $this->product_description->HrefValue = ""; // feature_ledtype $this->feature_ledtype->HrefValue = ""; // feature_power $this->feature_power->HrefValue = ""; // feature_lumen $this->feature_lumen->HrefValue = ""; // feature_viewangle $this->feature_viewangle->HrefValue = ""; // feature_cri $this->feature_cri->HrefValue = ""; // feature_iprating $this->feature_iprating->HrefValue = ""; // feature_colortemp $this->feature_colortemp->HrefValue = ""; // feature_body $this->feature_body->HrefValue = ""; // feature_cutoutsize $this->feature_cutoutsize->HrefValue = ""; // feature_colors $this->feature_colors->HrefValue = ""; // feature_dimmable $this->feature_dimmable->HrefValue = ""; // feature_warranty $this->feature_warranty->HrefValue = ""; // feature_application $this->feature_application->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // g_id // g_name // g_image if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // g_name $this->g_name->ViewValue = $this->g_name->CurrentValue; $this->g_name->ViewCustomAttributes = ""; // g_image $this->g_image->UploadPath = "gallery/"; if (!ew_Empty($this->g_image->Upload->DbValue)) { $this->g_image->ViewValue = $this->g_image->Upload->DbValue; } else { $this->g_image->ViewValue = ""; } $this->g_image->ViewCustomAttributes = ""; // g_name $this->g_name->LinkCustomAttributes = ""; $this->g_name->HrefValue = ""; $this->g_name->TooltipValue = ""; // g_image $this->g_image->LinkCustomAttributes = ""; $this->g_image->HrefValue = ""; $this->g_image->HrefValue2 = $this->g_image->UploadPath . $this->g_image->Upload->DbValue; $this->g_image->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // g_name $this->g_name->EditCustomAttributes = ""; $this->g_name->EditValue = ew_HtmlEncode($this->g_name->CurrentValue); $this->g_name->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->g_name->FldCaption())); // g_image $this->g_image->EditCustomAttributes = ""; $this->g_image->UploadPath = "gallery/"; if (!ew_Empty($this->g_image->Upload->DbValue)) { $this->g_image->EditValue = $this->g_image->Upload->DbValue; } else { $this->g_image->EditValue = ""; } if (!ew_Empty($this->g_image->CurrentValue)) { $this->g_image->Upload->FileName = $this->g_image->CurrentValue; } if ($this->CurrentAction == "I" && !$this->EventCancelled) { ew_RenderUploadField($this->g_image); } // Edit refer script // g_name $this->g_name->HrefValue = ""; // g_image $this->g_image->HrefValue = ""; $this->g_image->HrefValue2 = $this->g_image->UploadPath . $this->g_image->Upload->DbValue; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }