示例#1
0
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // memberID
     // name
     // email
     // joined
     // facebook
     // twitter
     // twitch
     // skype
     // birthday
     // profession
     // game_type
     // division
     // has_expansion
     // notes
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // memberID
         $this->memberID->ViewValue = $this->memberID->CurrentValue;
         $this->memberID->ViewCustomAttributes = "";
         // name
         $this->name->ViewValue = $this->name->CurrentValue;
         $this->name->ViewCustomAttributes = "";
         // email
         $this->_email->ViewValue = $this->_email->CurrentValue;
         $this->_email->ViewCustomAttributes = "";
         // joined
         $this->joined->ViewValue = $this->joined->CurrentValue;
         $this->joined->ViewValue = ew_FormatDateTime($this->joined->ViewValue, undefined);
         $this->joined->ViewCustomAttributes = "";
         // facebook
         $this->facebook->ViewValue = $this->facebook->CurrentValue;
         $this->facebook->ViewCustomAttributes = "";
         // twitter
         $this->twitter->ViewValue = $this->twitter->CurrentValue;
         $this->twitter->ViewCustomAttributes = "";
         // twitch
         $this->twitch->ViewValue = $this->twitch->CurrentValue;
         $this->twitch->ViewCustomAttributes = "";
         // skype
         $this->skype->ViewValue = $this->skype->CurrentValue;
         $this->skype->ViewCustomAttributes = "";
         // birthday
         $this->birthday->ViewValue = $this->birthday->CurrentValue;
         $this->birthday->ViewValue = ew_FormatDateTime($this->birthday->ViewValue, 5);
         $this->birthday->ViewCustomAttributes = "";
         // profession
         if (strval($this->profession->CurrentValue) != "") {
             $this->profession->ViewValue = "";
             $arwrk = explode(",", strval($this->profession->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->profession->ViewValue .= $this->profession->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->profession->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->profession->ViewValue = NULL;
         }
         $this->profession->ViewCustomAttributes = "";
         // game_type
         if (strval($this->game_type->CurrentValue) != "") {
             $this->game_type->ViewValue = "";
             $arwrk = explode(",", strval($this->game_type->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->game_type->ViewValue .= $this->game_type->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->game_type->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->game_type->ViewValue = NULL;
         }
         $this->game_type->ViewCustomAttributes = "";
         // division
         if (strval($this->division->CurrentValue) != "") {
             $this->division->ViewValue = "";
             $arwrk = explode(",", strval($this->division->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->division->ViewValue .= $this->division->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->division->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->division->ViewValue = NULL;
         }
         $this->division->ViewCustomAttributes = "";
         // has_expansion
         if (strval($this->has_expansion->CurrentValue) != "") {
             $this->has_expansion->ViewValue = $this->has_expansion->OptionCaption($this->has_expansion->CurrentValue);
         } else {
             $this->has_expansion->ViewValue = NULL;
         }
         $this->has_expansion->ViewCustomAttributes = "";
         // notes
         $this->notes->ViewValue = $this->notes->CurrentValue;
         $this->notes->ViewCustomAttributes = "";
         // name
         $this->name->LinkCustomAttributes = "";
         $this->name->HrefValue = "";
         $this->name->TooltipValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         $this->_email->TooltipValue = "";
         // joined
         $this->joined->LinkCustomAttributes = "";
         $this->joined->HrefValue = "";
         $this->joined->TooltipValue = "";
         // facebook
         $this->facebook->LinkCustomAttributes = "";
         if (!ew_Empty($this->facebook->CurrentValue)) {
             $this->facebook->HrefValue = !empty($this->facebook->ViewValue) ? ew_RemoveHtml($this->facebook->ViewValue) : $this->facebook->CurrentValue;
             // Add prefix/suffix
             $this->facebook->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->facebook->HrefValue = ew_ConvertFullUrl($this->facebook->HrefValue);
             }
         } else {
             $this->facebook->HrefValue = "";
         }
         $this->facebook->TooltipValue = "";
         // twitter
         $this->twitter->LinkCustomAttributes = "";
         if (!ew_Empty($this->twitter->CurrentValue)) {
             $this->twitter->HrefValue = !empty($this->twitter->ViewValue) ? ew_RemoveHtml($this->twitter->ViewValue) : $this->twitter->CurrentValue;
             // Add prefix/suffix
             $this->twitter->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->twitter->HrefValue = ew_ConvertFullUrl($this->twitter->HrefValue);
             }
         } else {
             $this->twitter->HrefValue = "";
         }
         $this->twitter->TooltipValue = "";
         // twitch
         $this->twitch->LinkCustomAttributes = "";
         if (!ew_Empty($this->twitch->CurrentValue)) {
             $this->twitch->HrefValue = !empty($this->twitch->ViewValue) ? ew_RemoveHtml($this->twitch->ViewValue) : $this->twitch->CurrentValue;
             // Add prefix/suffix
             $this->twitch->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->twitch->HrefValue = ew_ConvertFullUrl($this->twitch->HrefValue);
             }
         } else {
             $this->twitch->HrefValue = "";
         }
         $this->twitch->TooltipValue = "";
         // skype
         $this->skype->LinkCustomAttributes = "";
         $this->skype->HrefValue = "";
         $this->skype->TooltipValue = "";
         // birthday
         $this->birthday->LinkCustomAttributes = "";
         $this->birthday->HrefValue = "";
         $this->birthday->TooltipValue = "";
         // profession
         $this->profession->LinkCustomAttributes = "";
         $this->profession->HrefValue = "";
         $this->profession->TooltipValue = "";
         // game_type
         $this->game_type->LinkCustomAttributes = "";
         $this->game_type->HrefValue = "";
         $this->game_type->TooltipValue = "";
         // division
         $this->division->LinkCustomAttributes = "";
         $this->division->HrefValue = "";
         $this->division->TooltipValue = "";
         // has_expansion
         $this->has_expansion->LinkCustomAttributes = "";
         $this->has_expansion->HrefValue = "";
         $this->has_expansion->TooltipValue = "";
         // notes
         $this->notes->LinkCustomAttributes = "";
         if (!ew_Empty($this->notes->CurrentValue)) {
             $this->notes->HrefValue = !empty($this->notes->ViewValue) ? ew_RemoveHtml($this->notes->ViewValue) : $this->notes->CurrentValue;
             // Add prefix/suffix
             $this->notes->LinkAttrs["target"] = "";
             // Add target
             if ($this->Export != "") {
                 $this->notes->HrefValue = ew_ConvertFullUrl($this->notes->HrefValue);
             }
         } else {
             $this->notes->HrefValue = "";
         }
         $this->notes->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // name
         $this->name->EditAttrs["class"] = "form-control";
         $this->name->EditCustomAttributes = "";
         $this->name->EditValue = ew_HtmlEncode($this->name->CurrentValue);
         $this->name->PlaceHolder = ew_RemoveHtml($this->name->FldCaption());
         // email
         $this->_email->EditAttrs["class"] = "form-control";
         $this->_email->EditCustomAttributes = "";
         $this->_email->EditValue = ew_HtmlEncode($this->_email->CurrentValue);
         $this->_email->PlaceHolder = ew_RemoveHtml($this->_email->FldCaption());
         // joined
         // facebook
         $this->facebook->EditAttrs["class"] = "form-control";
         $this->facebook->EditCustomAttributes = "";
         $this->facebook->EditValue = ew_HtmlEncode($this->facebook->CurrentValue);
         $this->facebook->PlaceHolder = ew_RemoveHtml($this->facebook->FldCaption());
         // twitter
         $this->twitter->EditAttrs["class"] = "form-control";
         $this->twitter->EditCustomAttributes = "";
         $this->twitter->EditValue = ew_HtmlEncode($this->twitter->CurrentValue);
         $this->twitter->PlaceHolder = ew_RemoveHtml($this->twitter->FldCaption());
         // twitch
         $this->twitch->EditAttrs["class"] = "form-control";
         $this->twitch->EditCustomAttributes = "";
         $this->twitch->EditValue = ew_HtmlEncode($this->twitch->CurrentValue);
         $this->twitch->PlaceHolder = ew_RemoveHtml($this->twitch->FldCaption());
         // skype
         $this->skype->EditAttrs["class"] = "form-control";
         $this->skype->EditCustomAttributes = "";
         $this->skype->EditValue = ew_HtmlEncode($this->skype->CurrentValue);
         $this->skype->PlaceHolder = ew_RemoveHtml($this->skype->FldCaption());
         // birthday
         $this->birthday->EditAttrs["class"] = "form-control";
         $this->birthday->EditCustomAttributes = "";
         $this->birthday->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->birthday->CurrentValue, 5));
         $this->birthday->PlaceHolder = ew_RemoveHtml($this->birthday->FldCaption());
         // profession
         $this->profession->EditAttrs["class"] = "form-control";
         $this->profession->EditCustomAttributes = "";
         $this->profession->EditValue = $this->profession->Options(FALSE);
         // game_type
         $this->game_type->EditCustomAttributes = "";
         $this->game_type->EditValue = $this->game_type->Options(FALSE);
         // division
         $this->division->EditCustomAttributes = "";
         $this->division->EditValue = $this->division->Options(FALSE);
         // has_expansion
         $this->has_expansion->EditCustomAttributes = "";
         $this->has_expansion->EditValue = $this->has_expansion->Options(TRUE);
         // notes
         $this->notes->EditAttrs["class"] = "form-control";
         $this->notes->EditCustomAttributes = "";
         $this->notes->EditValue = ew_HtmlEncode($this->notes->CurrentValue);
         $this->notes->PlaceHolder = ew_RemoveHtml($this->notes->FldCaption());
         // Edit refer script
         // name
         $this->name->LinkCustomAttributes = "";
         $this->name->HrefValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         // joined
         $this->joined->LinkCustomAttributes = "";
         $this->joined->HrefValue = "";
         // facebook
         $this->facebook->LinkCustomAttributes = "";
         if (!ew_Empty($this->facebook->CurrentValue)) {
             $this->facebook->HrefValue = !empty($this->facebook->EditValue) ? ew_RemoveHtml($this->facebook->EditValue) : $this->facebook->CurrentValue;
             // Add prefix/suffix
             $this->facebook->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->facebook->HrefValue = ew_ConvertFullUrl($this->facebook->HrefValue);
             }
         } else {
             $this->facebook->HrefValue = "";
         }
         // twitter
         $this->twitter->LinkCustomAttributes = "";
         if (!ew_Empty($this->twitter->CurrentValue)) {
             $this->twitter->HrefValue = !empty($this->twitter->EditValue) ? ew_RemoveHtml($this->twitter->EditValue) : $this->twitter->CurrentValue;
             // Add prefix/suffix
             $this->twitter->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->twitter->HrefValue = ew_ConvertFullUrl($this->twitter->HrefValue);
             }
         } else {
             $this->twitter->HrefValue = "";
         }
         // twitch
         $this->twitch->LinkCustomAttributes = "";
         if (!ew_Empty($this->twitch->CurrentValue)) {
             $this->twitch->HrefValue = !empty($this->twitch->EditValue) ? ew_RemoveHtml($this->twitch->EditValue) : $this->twitch->CurrentValue;
             // Add prefix/suffix
             $this->twitch->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->twitch->HrefValue = ew_ConvertFullUrl($this->twitch->HrefValue);
             }
         } else {
             $this->twitch->HrefValue = "";
         }
         // skype
         $this->skype->LinkCustomAttributes = "";
         $this->skype->HrefValue = "";
         // birthday
         $this->birthday->LinkCustomAttributes = "";
         $this->birthday->HrefValue = "";
         // profession
         $this->profession->LinkCustomAttributes = "";
         $this->profession->HrefValue = "";
         // game_type
         $this->game_type->LinkCustomAttributes = "";
         $this->game_type->HrefValue = "";
         // division
         $this->division->LinkCustomAttributes = "";
         $this->division->HrefValue = "";
         // has_expansion
         $this->has_expansion->LinkCustomAttributes = "";
         $this->has_expansion->HrefValue = "";
         // notes
         $this->notes->LinkCustomAttributes = "";
         if (!ew_Empty($this->notes->CurrentValue)) {
             $this->notes->HrefValue = !empty($this->notes->EditValue) ? ew_RemoveHtml($this->notes->EditValue) : $this->notes->CurrentValue;
             // Add prefix/suffix
             $this->notes->LinkAttrs["target"] = "";
             // Add target
             if ($this->Export != "") {
                 $this->notes->HrefValue = ew_ConvertFullUrl($this->notes->HrefValue);
             }
         } else {
             $this->notes->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, $Customers;
     // Call Row_Rendering event
     $Customers->Row_Rendering();
     // Common render codes for all row types
     // CustomerID
     $Customers->CustomerID->CellCssStyle = "";
     $Customers->CustomerID->CellCssClass = "";
     // Email
     $Customers->zEmail->CellCssStyle = "";
     $Customers->zEmail->CellCssClass = "";
     // FirstName
     $Customers->FirstName->CellCssStyle = "";
     $Customers->FirstName->CellCssClass = "";
     // LastName
     $Customers->LastName->CellCssStyle = "";
     $Customers->LastName->CellCssClass = "";
     // ContactPhone
     $Customers->ContactPhone->CellCssStyle = "";
     $Customers->ContactPhone->CellCssClass = "";
     // Customer_Type
     $Customers->Customer_Type->CellCssStyle = "";
     $Customers->Customer_Type->CellCssClass = "";
     // First_Order_Date
     $Customers->First_Order_Date->CellCssStyle = "";
     $Customers->First_Order_Date->CellCssClass = "";
     // Last_Order_Date
     $Customers->Last_Order_Date->CellCssStyle = "";
     $Customers->Last_Order_Date->CellCssClass = "";
     // Total_Orders
     $Customers->Total_Orders->CellCssStyle = "";
     $Customers->Total_Orders->CellCssClass = "";
     // Delivery_Window
     $Customers->Delivery_Window->CellCssStyle = "";
     $Customers->Delivery_Window->CellCssClass = "";
     // WeeklyMeals
     $Customers->WeeklyMeals->CellCssStyle = "";
     $Customers->WeeklyMeals->CellCssClass = "";
     // WeeklyReg
     $Customers->WeeklyReg->CellCssStyle = "";
     $Customers->WeeklyReg->CellCssClass = "";
     // WeeklyVeg
     $Customers->WeeklyVeg->CellCssStyle = "";
     $Customers->WeeklyVeg->CellCssClass = "";
     // kitchen_note
     $Customers->kitchen_note->CellCssStyle = "";
     $Customers->kitchen_note->CellCssClass = "";
     if ($Customers->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // CustomerID
         $Customers->CustomerID->ViewValue = $Customers->CustomerID->CurrentValue;
         $Customers->CustomerID->CssStyle = "";
         $Customers->CustomerID->CssClass = "";
         $Customers->CustomerID->ViewCustomAttributes = "";
         // Email
         $Customers->zEmail->ViewValue = $Customers->zEmail->CurrentValue;
         $Customers->zEmail->CssStyle = "";
         $Customers->zEmail->CssClass = "";
         $Customers->zEmail->ViewCustomAttributes = "";
         // Password
         $Customers->Password->ViewValue = "********";
         $Customers->Password->CssStyle = "";
         $Customers->Password->CssClass = "";
         $Customers->Password->ViewCustomAttributes = "";
         // FirstName
         $Customers->FirstName->ViewValue = $Customers->FirstName->CurrentValue;
         $Customers->FirstName->CssStyle = "";
         $Customers->FirstName->CssClass = "";
         $Customers->FirstName->ViewCustomAttributes = "";
         // LastName
         $Customers->LastName->ViewValue = $Customers->LastName->CurrentValue;
         $Customers->LastName->CssStyle = "";
         $Customers->LastName->CssClass = "";
         $Customers->LastName->ViewCustomAttributes = "";
         // ContactPhone
         $Customers->ContactPhone->ViewValue = $Customers->ContactPhone->CurrentValue;
         $Customers->ContactPhone->CssStyle = "";
         $Customers->ContactPhone->CssClass = "";
         $Customers->ContactPhone->ViewCustomAttributes = "";
         // Allergies
         $Customers->Allergies->ViewValue = $Customers->Allergies->CurrentValue;
         if (!is_null($Customers->Allergies->ViewValue)) {
             $Customers->Allergies->ViewValue = str_replace("\n", "<br>", $Customers->Allergies->ViewValue);
         }
         $Customers->Allergies->CssStyle = "";
         $Customers->Allergies->CssClass = "";
         $Customers->Allergies->ViewCustomAttributes = "";
         // DeliveryAddress1
         $Customers->DeliveryAddress1->ViewValue = $Customers->DeliveryAddress1->CurrentValue;
         $Customers->DeliveryAddress1->CssStyle = "";
         $Customers->DeliveryAddress1->CssClass = "";
         $Customers->DeliveryAddress1->ViewCustomAttributes = "";
         // DeliveryAddress2
         $Customers->DeliveryAddress2->ViewValue = $Customers->DeliveryAddress2->CurrentValue;
         $Customers->DeliveryAddress2->CssStyle = "";
         $Customers->DeliveryAddress2->CssClass = "";
         $Customers->DeliveryAddress2->ViewCustomAttributes = "";
         // DeliveryCity
         $Customers->DeliveryCity->ViewValue = $Customers->DeliveryCity->CurrentValue;
         $Customers->DeliveryCity->CssStyle = "";
         $Customers->DeliveryCity->CssClass = "";
         $Customers->DeliveryCity->ViewCustomAttributes = "";
         // DeliveryState
         $Customers->DeliveryState->ViewValue = $Customers->DeliveryState->CurrentValue;
         $Customers->DeliveryState->CssStyle = "";
         $Customers->DeliveryState->CssClass = "";
         $Customers->DeliveryState->ViewCustomAttributes = "";
         // DeliveryZip
         $Customers->DeliveryZip->ViewValue = $Customers->DeliveryZip->CurrentValue;
         $Customers->DeliveryZip->CssStyle = "";
         $Customers->DeliveryZip->CssClass = "";
         $Customers->DeliveryZip->ViewCustomAttributes = "";
         // DeliveryComments
         $Customers->DeliveryComments->ViewValue = $Customers->DeliveryComments->CurrentValue;
         $Customers->DeliveryComments->CssStyle = "";
         $Customers->DeliveryComments->CssClass = "";
         $Customers->DeliveryComments->ViewCustomAttributes = "";
         // BillingFirstName
         $Customers->BillingFirstName->ViewValue = $Customers->BillingFirstName->CurrentValue;
         $Customers->BillingFirstName->CssStyle = "";
         $Customers->BillingFirstName->CssClass = "";
         $Customers->BillingFirstName->ViewCustomAttributes = "";
         // BillingLastName
         $Customers->BillingLastName->ViewValue = $Customers->BillingLastName->CurrentValue;
         $Customers->BillingLastName->CssStyle = "";
         $Customers->BillingLastName->CssClass = "";
         $Customers->BillingLastName->ViewCustomAttributes = "";
         // BillingAddress1
         $Customers->BillingAddress1->ViewValue = $Customers->BillingAddress1->CurrentValue;
         $Customers->BillingAddress1->CssStyle = "";
         $Customers->BillingAddress1->CssClass = "";
         $Customers->BillingAddress1->ViewCustomAttributes = "";
         // BillingAddress2
         $Customers->BillingAddress2->ViewValue = $Customers->BillingAddress2->CurrentValue;
         $Customers->BillingAddress2->CssStyle = "";
         $Customers->BillingAddress2->CssClass = "";
         $Customers->BillingAddress2->ViewCustomAttributes = "";
         // BillingCity
         $Customers->BillingCity->ViewValue = $Customers->BillingCity->CurrentValue;
         $Customers->BillingCity->CssStyle = "";
         $Customers->BillingCity->CssClass = "";
         $Customers->BillingCity->ViewCustomAttributes = "";
         // BillingState
         $Customers->BillingState->ViewValue = $Customers->BillingState->CurrentValue;
         $Customers->BillingState->CssStyle = "";
         $Customers->BillingState->CssClass = "";
         $Customers->BillingState->ViewCustomAttributes = "";
         // BillingZip
         $Customers->BillingZip->ViewValue = $Customers->BillingZip->CurrentValue;
         $Customers->BillingZip->CssStyle = "";
         $Customers->BillingZip->CssClass = "";
         $Customers->BillingZip->ViewCustomAttributes = "";
         // BillingPhone
         $Customers->BillingPhone->ViewValue = $Customers->BillingPhone->CurrentValue;
         $Customers->BillingPhone->CssStyle = "";
         $Customers->BillingPhone->CssClass = "";
         $Customers->BillingPhone->ViewCustomAttributes = "";
         // BillingCardType
         $Customers->BillingCardType->ViewValue = $Customers->BillingCardType->CurrentValue;
         $Customers->BillingCardType->CssStyle = "";
         $Customers->BillingCardType->CssClass = "";
         $Customers->BillingCardType->ViewCustomAttributes = "";
         // BillingCardNumber
         $Customers->BillingCardNumber->ViewValue = $Customers->BillingCardNumber->CurrentValue;
         $Customers->BillingCardNumber->CssStyle = "";
         $Customers->BillingCardNumber->CssClass = "";
         $Customers->BillingCardNumber->ViewCustomAttributes = "";
         // CIMCustID
         $Customers->CIMCustID->ViewValue = $Customers->CIMCustID->CurrentValue;
         $Customers->CIMCustID->CssStyle = "";
         $Customers->CIMCustID->CssClass = "";
         $Customers->CIMCustID->ViewCustomAttributes = "";
         // CIMPymtProfID
         $Customers->CIMPymtProfID->ViewValue = $Customers->CIMPymtProfID->CurrentValue;
         $Customers->CIMPymtProfID->CssStyle = "";
         $Customers->CIMPymtProfID->CssClass = "";
         $Customers->CIMPymtProfID->ViewCustomAttributes = "";
         // Customer_Type
         $Customers->Customer_Type->ViewValue = $Customers->Customer_Type->CurrentValue;
         $Customers->Customer_Type->CssStyle = "";
         $Customers->Customer_Type->CssClass = "";
         $Customers->Customer_Type->ViewCustomAttributes = "";
         // First_Order_Date
         $Customers->First_Order_Date->ViewValue = $Customers->First_Order_Date->CurrentValue;
         $Customers->First_Order_Date->ViewValue = ew_FormatDateTime($Customers->First_Order_Date->ViewValue, 6);
         $Customers->First_Order_Date->CssStyle = "";
         $Customers->First_Order_Date->CssClass = "";
         $Customers->First_Order_Date->ViewCustomAttributes = "";
         // Last_Order_Date
         $Customers->Last_Order_Date->ViewValue = $Customers->Last_Order_Date->CurrentValue;
         $Customers->Last_Order_Date->ViewValue = ew_FormatDateTime($Customers->Last_Order_Date->ViewValue, 6);
         $Customers->Last_Order_Date->CssStyle = "";
         $Customers->Last_Order_Date->CssClass = "";
         $Customers->Last_Order_Date->ViewCustomAttributes = "";
         // Total_Orders
         $Customers->Total_Orders->ViewValue = $Customers->Total_Orders->CurrentValue;
         $Customers->Total_Orders->CssStyle = "";
         $Customers->Total_Orders->CssClass = "";
         $Customers->Total_Orders->ViewCustomAttributes = "";
         // Delivery_Window
         if (strval($Customers->Delivery_Window->CurrentValue) != "") {
             switch ($Customers->Delivery_Window->CurrentValue) {
                 case "1-4":
                     $Customers->Delivery_Window->ViewValue = "1-4";
                     break;
                 case "5-8":
                     $Customers->Delivery_Window->ViewValue = "5-8";
                     break;
                 default:
                     $Customers->Delivery_Window->ViewValue = $Customers->Delivery_Window->CurrentValue;
             }
         } else {
             $Customers->Delivery_Window->ViewValue = NULL;
         }
         $Customers->Delivery_Window->CssStyle = "";
         $Customers->Delivery_Window->CssClass = "";
         $Customers->Delivery_Window->ViewCustomAttributes = "";
         // WeeklyMeals
         $Customers->WeeklyMeals->ViewValue = $Customers->WeeklyMeals->CurrentValue;
         $Customers->WeeklyMeals->CssStyle = "";
         $Customers->WeeklyMeals->CssClass = "";
         $Customers->WeeklyMeals->ViewCustomAttributes = "";
         // WeeklyReg
         $Customers->WeeklyReg->ViewValue = $Customers->WeeklyReg->CurrentValue;
         $Customers->WeeklyReg->CssStyle = "";
         $Customers->WeeklyReg->CssClass = "";
         $Customers->WeeklyReg->ViewCustomAttributes = "";
         // WeeklyVeg
         $Customers->WeeklyVeg->ViewValue = $Customers->WeeklyVeg->CurrentValue;
         $Customers->WeeklyVeg->CssStyle = "";
         $Customers->WeeklyVeg->CssClass = "";
         $Customers->WeeklyVeg->ViewCustomAttributes = "";
         // Want
         if (strval($Customers->Want->CurrentValue) != "") {
             $arwrk = explode(",", $Customers->Want->CurrentValue);
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
             $sWhereWrk = "";
             foreach ($arwrk as $wrk) {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " OR ";
                 }
                 $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= "(" . $sWhereWrk . ")";
             }
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Customers->Want->ViewValue = "";
                 $ari = 0;
                 while (!$rswrk->EOF) {
                     $Customers->Want->ViewValue .= $rswrk->fields('ItemName');
                     $rswrk->MoveNext();
                     if (!$rswrk->EOF) {
                         $Customers->Want->ViewValue .= ew_ViewOptionSeparator($ari);
                     }
                     // Separate Options
                     $ari++;
                 }
                 $rswrk->Close();
             } else {
                 $Customers->Want->ViewValue = $Customers->Want->CurrentValue;
             }
         } else {
             $Customers->Want->ViewValue = NULL;
         }
         $Customers->Want->CssStyle = "";
         $Customers->Want->CssClass = "";
         $Customers->Want->ViewCustomAttributes = "";
         // DontWant
         if (strval($Customers->DontWant->CurrentValue) != "") {
             $arwrk = explode(",", $Customers->DontWant->CurrentValue);
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
             $sWhereWrk = "";
             foreach ($arwrk as $wrk) {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " OR ";
                 }
                 $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= "(" . $sWhereWrk . ")";
             }
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Customers->DontWant->ViewValue = "";
                 $ari = 0;
                 while (!$rswrk->EOF) {
                     $Customers->DontWant->ViewValue .= $rswrk->fields('ItemName');
                     $rswrk->MoveNext();
                     if (!$rswrk->EOF) {
                         $Customers->DontWant->ViewValue .= ew_ViewOptionSeparator($ari);
                     }
                     // Separate Options
                     $ari++;
                 }
                 $rswrk->Close();
             } else {
                 $Customers->DontWant->ViewValue = $Customers->DontWant->CurrentValue;
             }
         } else {
             $Customers->DontWant->ViewValue = NULL;
         }
         $Customers->DontWant->CssStyle = "";
         $Customers->DontWant->CssClass = "";
         $Customers->DontWant->ViewCustomAttributes = "";
         // Comments
         $Customers->Comments->ViewValue = $Customers->Comments->CurrentValue;
         if (!is_null($Customers->Comments->ViewValue)) {
             $Customers->Comments->ViewValue = str_replace("\n", "<br>", $Customers->Comments->ViewValue);
         }
         $Customers->Comments->CssStyle = "";
         $Customers->Comments->CssClass = "";
         $Customers->Comments->ViewCustomAttributes = "";
         // kitchen_note
         $Customers->kitchen_note->ViewValue = $Customers->kitchen_note->CurrentValue;
         $Customers->kitchen_note->CssStyle = "";
         $Customers->kitchen_note->CssClass = "";
         $Customers->kitchen_note->ViewCustomAttributes = "";
         // CustomerID
         $Customers->CustomerID->HrefValue = "";
         // Email
         $Customers->zEmail->HrefValue = "";
         // FirstName
         $Customers->FirstName->HrefValue = "";
         // LastName
         $Customers->LastName->HrefValue = "";
         // ContactPhone
         $Customers->ContactPhone->HrefValue = "";
         // Customer_Type
         $Customers->Customer_Type->HrefValue = "";
         // First_Order_Date
         $Customers->First_Order_Date->HrefValue = "";
         // Last_Order_Date
         $Customers->Last_Order_Date->HrefValue = "";
         // Total_Orders
         $Customers->Total_Orders->HrefValue = "";
         // Delivery_Window
         $Customers->Delivery_Window->HrefValue = "";
         // WeeklyMeals
         $Customers->WeeklyMeals->HrefValue = "";
         // WeeklyReg
         $Customers->WeeklyReg->HrefValue = "";
         // WeeklyVeg
         $Customers->WeeklyVeg->HrefValue = "";
         // kitchen_note
         $Customers->kitchen_note->HrefValue = "";
     }
     // Call Row Rendered event
     $Customers->Row_Rendered();
 }
 function RenderRow()
 {
     global $Security, $Language, $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
     // AIR_PORT_ID
     // CODE
     // DESCRIPTION
     // ACTIVE
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // AIR_PORT_ID
         $this->AIR_PORT_ID->ViewValue = $this->AIR_PORT_ID->CurrentValue;
         $this->AIR_PORT_ID->ViewCustomAttributes = "";
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // ACTIVE
         if (strval($this->ACTIVE->CurrentValue) != "") {
             $this->ACTIVE->ViewValue = "";
             $arwrk = explode(",", strval($this->ACTIVE->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->ACTIVE->ViewValue .= $this->ACTIVE->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->ACTIVE->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->ACTIVE->ViewValue = NULL;
         }
         $this->ACTIVE->ViewCustomAttributes = "";
         // AIR_PORT_ID
         $this->AIR_PORT_ID->LinkCustomAttributes = "";
         $this->AIR_PORT_ID->HrefValue = "";
         $this->AIR_PORT_ID->TooltipValue = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         $this->CODE->TooltipValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         $this->DESCRIPTION->TooltipValue = "";
         // ACTIVE
         $this->ACTIVE->LinkCustomAttributes = "";
         $this->ACTIVE->HrefValue = "";
         $this->ACTIVE->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderListRow()
 {
     global $conn, $Security;
     // Call Row Rendering event
     $this->Row_Rendering();
     // DeliveryDate
     $this->DeliveryDate->ViewValue = $this->DeliveryDate->CurrentValue;
     $this->DeliveryDate->ViewValue = ew_FormatDateTime($this->DeliveryDate->ViewValue, 6);
     $this->DeliveryDate->CssStyle = "";
     $this->DeliveryDate->CssClass = "";
     $this->DeliveryDate->ViewCustomAttributes = "";
     // CustomerID
     if (strval($this->CustomerID->CurrentValue) != "") {
         $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($this->CustomerID->CurrentValue) . "";
         $sSqlWrk .= " ORDER BY `LastName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup value(s) found
             $this->CustomerID->ViewValue = $rswrk->fields('LastName');
             $this->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
             $rswrk->Close();
         } else {
             $this->CustomerID->ViewValue = $this->CustomerID->CurrentValue;
         }
     } else {
         $this->CustomerID->ViewValue = NULL;
     }
     $this->CustomerID->CssStyle = "";
     $this->CustomerID->CssClass = "";
     $this->CustomerID->ViewCustomAttributes = "";
     // WeeklyMeals
     $this->WeeklyMeals->ViewValue = $this->WeeklyMeals->CurrentValue;
     $this->WeeklyMeals->CssStyle = "";
     $this->WeeklyMeals->CssClass = "";
     $this->WeeklyMeals->ViewCustomAttributes = "";
     // WeeklyReg
     $this->WeeklyReg->ViewValue = $this->WeeklyReg->CurrentValue;
     $this->WeeklyReg->CssStyle = "";
     $this->WeeklyReg->CssClass = "";
     $this->WeeklyReg->ViewCustomAttributes = "";
     // WeeklyVeg
     $this->WeeklyVeg->ViewValue = $this->WeeklyVeg->CurrentValue;
     $this->WeeklyVeg->CssStyle = "";
     $this->WeeklyVeg->CssClass = "";
     $this->WeeklyVeg->ViewCustomAttributes = "";
     // TransactionNumber
     $this->TransactionNumber->ViewValue = $this->TransactionNumber->CurrentValue;
     $this->TransactionNumber->CssStyle = "";
     $this->TransactionNumber->CssClass = "";
     $this->TransactionNumber->ViewCustomAttributes = "";
     // Want
     if (strval($this->Want->CurrentValue) != "") {
         $arwrk = explode(",", $this->Want->CurrentValue);
         $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
         $sWhereWrk = "";
         foreach ($arwrk as $wrk) {
             if ($sWhereWrk != "") {
                 $sWhereWrk .= " OR ";
             }
             $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
         }
         if ($sWhereWrk != "") {
             $sSqlWrk .= "(" . $sWhereWrk . ")";
         }
         $sSqlWrk .= " ORDER BY `ItemName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup value(s) found
             $this->Want->ViewValue = "";
             $ari = 0;
             while (!$rswrk->EOF) {
                 $this->Want->ViewValue .= $rswrk->fields('ItemName');
                 $rswrk->MoveNext();
                 if (!$rswrk->EOF) {
                     $this->Want->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
                 // Separate Options
                 $ari++;
             }
             $rswrk->Close();
         } else {
             $this->Want->ViewValue = $this->Want->CurrentValue;
         }
     } else {
         $this->Want->ViewValue = NULL;
     }
     $this->Want->CssStyle = "";
     $this->Want->CssClass = "";
     $this->Want->ViewCustomAttributes = "";
     // DontWant
     if (strval($this->DontWant->CurrentValue) != "") {
         $arwrk = explode(",", $this->DontWant->CurrentValue);
         $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
         $sWhereWrk = "";
         foreach ($arwrk as $wrk) {
             if ($sWhereWrk != "") {
                 $sWhereWrk .= " OR ";
             }
             $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
         }
         if ($sWhereWrk != "") {
             $sSqlWrk .= "(" . $sWhereWrk . ")";
         }
         $sSqlWrk .= " ORDER BY `ItemName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup value(s) found
             $this->DontWant->ViewValue = "";
             $ari = 0;
             while (!$rswrk->EOF) {
                 $this->DontWant->ViewValue .= $rswrk->fields('ItemName');
                 $rswrk->MoveNext();
                 if (!$rswrk->EOF) {
                     $this->DontWant->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
                 // Separate Options
                 $ari++;
             }
             $rswrk->Close();
         } else {
             $this->DontWant->ViewValue = $this->DontWant->CurrentValue;
         }
     } else {
         $this->DontWant->ViewValue = NULL;
     }
     $this->DontWant->CssStyle = "";
     $this->DontWant->CssClass = "";
     $this->DontWant->ViewCustomAttributes = "";
     // Comments
     $this->Comments->ViewValue = $this->Comments->CurrentValue;
     $this->Comments->CssStyle = "";
     $this->Comments->CssClass = "";
     $this->Comments->ViewCustomAttributes = "";
     // DeliveryDate
     $this->DeliveryDate->HrefValue = "";
     // CustomerID
     $this->CustomerID->HrefValue = "";
     // WeeklyMeals
     $this->WeeklyMeals->HrefValue = "";
     // WeeklyReg
     $this->WeeklyReg->HrefValue = "";
     // WeeklyVeg
     $this->WeeklyVeg->HrefValue = "";
     // TransactionNumber
     $this->TransactionNumber->HrefValue = "";
     // Want
     $this->Want->HrefValue = "";
     // DontWant
     $this->DontWant->HrefValue = "";
     // Comments
     $this->Comments->HrefValue = "";
     // Call Row Rendered event
     $this->Row_Rendered();
 }
示例#5
0
 function RenderRow()
 {
     global $Security, $Language, $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
     // memberID
     $this->memberID->CellCssStyle = "white-space: nowrap;";
     // name
     // email
     // profession
     // game_type
     // division
     // has_expansion
     // notes
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // memberID
         $this->memberID->ViewValue = $this->memberID->CurrentValue;
         $this->memberID->ViewCustomAttributes = "";
         // name
         $this->name->ViewValue = $this->name->CurrentValue;
         $this->name->ViewCustomAttributes = "";
         // email
         $this->_email->ViewValue = $this->_email->CurrentValue;
         $this->_email->ViewCustomAttributes = "";
         // profession
         if (strval($this->profession->CurrentValue) != "") {
             $this->profession->ViewValue = "";
             $arwrk = explode(",", strval($this->profession->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->profession->ViewValue .= $this->profession->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->profession->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->profession->ViewValue = NULL;
         }
         $this->profession->ViewCustomAttributes = "";
         // game_type
         if (strval($this->game_type->CurrentValue) != "") {
             $this->game_type->ViewValue = "";
             $arwrk = explode(",", strval($this->game_type->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->game_type->ViewValue .= $this->game_type->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->game_type->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->game_type->ViewValue = NULL;
         }
         $this->game_type->ViewCustomAttributes = "";
         // division
         if (strval($this->division->CurrentValue) != "") {
             $this->division->ViewValue = "";
             $arwrk = explode(",", strval($this->division->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->division->ViewValue .= $this->division->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->division->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->division->ViewValue = NULL;
         }
         $this->division->ViewCustomAttributes = "";
         // has_expansion
         if (strval($this->has_expansion->CurrentValue) != "") {
             $this->has_expansion->ViewValue = $this->has_expansion->OptionCaption($this->has_expansion->CurrentValue);
         } else {
             $this->has_expansion->ViewValue = NULL;
         }
         $this->has_expansion->ViewCustomAttributes = "";
         // name
         $this->name->LinkCustomAttributes = "";
         $this->name->HrefValue = "";
         $this->name->TooltipValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         $this->_email->TooltipValue = "";
         // profession
         $this->profession->LinkCustomAttributes = "";
         $this->profession->HrefValue = "";
         $this->profession->TooltipValue = "";
         // game_type
         $this->game_type->LinkCustomAttributes = "";
         $this->game_type->HrefValue = "";
         $this->game_type->TooltipValue = "";
         // division
         $this->division->LinkCustomAttributes = "";
         $this->division->HrefValue = "";
         $this->division->TooltipValue = "";
         // has_expansion
         $this->has_expansion->LinkCustomAttributes = "";
         $this->has_expansion->HrefValue = "";
         $this->has_expansion->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // name
         $this->name->EditAttrs["class"] = "form-control";
         $this->name->EditCustomAttributes = "";
         $this->name->EditValue = ew_HtmlEncode($this->name->CurrentValue);
         $this->name->PlaceHolder = ew_RemoveHtml($this->name->FldCaption());
         // email
         $this->_email->EditAttrs["class"] = "form-control";
         $this->_email->EditCustomAttributes = "";
         $this->_email->EditValue = ew_HtmlEncode($this->_email->CurrentValue);
         $this->_email->PlaceHolder = ew_RemoveHtml($this->_email->FldCaption());
         // profession
         $this->profession->EditAttrs["class"] = "form-control";
         $this->profession->EditCustomAttributes = "";
         $this->profession->EditValue = $this->profession->Options(FALSE);
         // game_type
         $this->game_type->EditCustomAttributes = "";
         $this->game_type->EditValue = $this->game_type->Options(FALSE);
         // division
         $this->division->EditCustomAttributes = "";
         $this->division->EditValue = $this->division->Options(FALSE);
         // has_expansion
         $this->has_expansion->EditAttrs["class"] = "form-control";
         $this->has_expansion->EditCustomAttributes = "";
         $this->has_expansion->EditValue = $this->has_expansion->Options(TRUE);
         // Add refer script
         // name
         $this->name->LinkCustomAttributes = "";
         $this->name->HrefValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         // profession
         $this->profession->LinkCustomAttributes = "";
         $this->profession->HrefValue = "";
         // game_type
         $this->game_type->LinkCustomAttributes = "";
         $this->game_type->HrefValue = "";
         // division
         $this->division->LinkCustomAttributes = "";
         $this->division->HrefValue = "";
         // has_expansion
         $this->has_expansion->LinkCustomAttributes = "";
         $this->has_expansion->HrefValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // name
         $this->name->EditAttrs["class"] = "form-control";
         $this->name->EditCustomAttributes = "";
         $this->name->EditValue = ew_HtmlEncode($this->name->CurrentValue);
         $this->name->PlaceHolder = ew_RemoveHtml($this->name->FldCaption());
         // email
         $this->_email->EditAttrs["class"] = "form-control";
         $this->_email->EditCustomAttributes = "";
         $this->_email->EditValue = ew_HtmlEncode($this->_email->CurrentValue);
         $this->_email->PlaceHolder = ew_RemoveHtml($this->_email->FldCaption());
         // profession
         $this->profession->EditAttrs["class"] = "form-control";
         $this->profession->EditCustomAttributes = "";
         $this->profession->EditValue = $this->profession->Options(FALSE);
         // game_type
         $this->game_type->EditCustomAttributes = "";
         $this->game_type->EditValue = $this->game_type->Options(FALSE);
         // division
         $this->division->EditCustomAttributes = "";
         $this->division->EditValue = $this->division->Options(FALSE);
         // has_expansion
         $this->has_expansion->EditAttrs["class"] = "form-control";
         $this->has_expansion->EditCustomAttributes = "";
         $this->has_expansion->EditValue = $this->has_expansion->Options(TRUE);
         // Edit refer script
         // name
         $this->name->LinkCustomAttributes = "";
         $this->name->HrefValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         // profession
         $this->profession->LinkCustomAttributes = "";
         $this->profession->HrefValue = "";
         // game_type
         $this->game_type->LinkCustomAttributes = "";
         $this->game_type->HrefValue = "";
         // division
         $this->division->LinkCustomAttributes = "";
         $this->division->HrefValue = "";
         // has_expansion
         $this->has_expansion->LinkCustomAttributes = "";
         $this->has_expansion->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, $Subscriptions2;
     // Call Row_Rendering event
     $Subscriptions2->Row_Rendering();
     // Common render codes for all row types
     // OrderID
     $Subscriptions2->OrderID->CellCssStyle = "";
     $Subscriptions2->OrderID->CellCssClass = "";
     // DeliveryDate
     $Subscriptions2->DeliveryDate->CellCssStyle = "";
     $Subscriptions2->DeliveryDate->CellCssClass = "";
     // CustomerID
     $Subscriptions2->CustomerID->CellCssStyle = "";
     $Subscriptions2->CustomerID->CellCssClass = "";
     // WeeklyMeals
     $Subscriptions2->WeeklyMeals->CellCssStyle = "";
     $Subscriptions2->WeeklyMeals->CellCssClass = "";
     // WeeklyReg
     $Subscriptions2->WeeklyReg->CellCssStyle = "";
     $Subscriptions2->WeeklyReg->CellCssClass = "";
     // WeeklyVeg
     $Subscriptions2->WeeklyVeg->CellCssStyle = "";
     $Subscriptions2->WeeklyVeg->CellCssClass = "";
     // PromoCodeID
     $Subscriptions2->PromoCodeID->CellCssStyle = "";
     $Subscriptions2->PromoCodeID->CellCssClass = "";
     // TransactionNumber
     $Subscriptions2->TransactionNumber->CellCssStyle = "";
     $Subscriptions2->TransactionNumber->CellCssClass = "";
     // Want
     $Subscriptions2->Want->CellCssStyle = "";
     $Subscriptions2->Want->CellCssClass = "";
     // DontWant
     $Subscriptions2->DontWant->CellCssStyle = "";
     $Subscriptions2->DontWant->CellCssClass = "";
     // Comments
     $Subscriptions2->Comments->CellCssStyle = "";
     $Subscriptions2->Comments->CellCssClass = "";
     // SubscriptionID
     $Subscriptions2->SubscriptionID->CellCssStyle = "";
     $Subscriptions2->SubscriptionID->CellCssClass = "";
     if ($Subscriptions2->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // OrderID
         $Subscriptions2->OrderID->ViewValue = $Subscriptions2->OrderID->CurrentValue;
         $Subscriptions2->OrderID->CssStyle = "";
         $Subscriptions2->OrderID->CssClass = "";
         $Subscriptions2->OrderID->ViewCustomAttributes = "";
         // DeliveryDate
         $Subscriptions2->DeliveryDate->ViewValue = $Subscriptions2->DeliveryDate->CurrentValue;
         $Subscriptions2->DeliveryDate->ViewValue = ew_FormatDateTime($Subscriptions2->DeliveryDate->ViewValue, 6);
         $Subscriptions2->DeliveryDate->CssStyle = "";
         $Subscriptions2->DeliveryDate->CssClass = "";
         $Subscriptions2->DeliveryDate->ViewCustomAttributes = "";
         // CustomerID
         if (strval($Subscriptions2->CustomerID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($Subscriptions2->CustomerID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->CustomerID->ViewValue = $rswrk->fields('LastName');
                 $Subscriptions2->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                 $rswrk->Close();
             } else {
                 $Subscriptions2->CustomerID->ViewValue = $Subscriptions2->CustomerID->CurrentValue;
             }
         } else {
             $Subscriptions2->CustomerID->ViewValue = NULL;
         }
         $Subscriptions2->CustomerID->CssStyle = "";
         $Subscriptions2->CustomerID->CssClass = "";
         $Subscriptions2->CustomerID->ViewCustomAttributes = "";
         // WeeklyMeals
         $Subscriptions2->WeeklyMeals->ViewValue = $Subscriptions2->WeeklyMeals->CurrentValue;
         $Subscriptions2->WeeklyMeals->CssStyle = "";
         $Subscriptions2->WeeklyMeals->CssClass = "";
         $Subscriptions2->WeeklyMeals->ViewCustomAttributes = "";
         // WeeklyReg
         $Subscriptions2->WeeklyReg->ViewValue = $Subscriptions2->WeeklyReg->CurrentValue;
         $Subscriptions2->WeeklyReg->CssStyle = "";
         $Subscriptions2->WeeklyReg->CssClass = "";
         $Subscriptions2->WeeklyReg->ViewCustomAttributes = "";
         // WeeklyVeg
         $Subscriptions2->WeeklyVeg->ViewValue = $Subscriptions2->WeeklyVeg->CurrentValue;
         $Subscriptions2->WeeklyVeg->CssStyle = "";
         $Subscriptions2->WeeklyVeg->CssClass = "";
         $Subscriptions2->WeeklyVeg->ViewCustomAttributes = "";
         // PromoCodeID
         if (strval($Subscriptions2->PromoCodeID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `PromoCodeName` FROM `PromoCodes` WHERE `PromoCodeID` = " . ew_AdjustSql($Subscriptions2->PromoCodeID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->PromoCodeID->ViewValue = $rswrk->fields('PromoCodeName');
                 $rswrk->Close();
             } else {
                 $Subscriptions2->PromoCodeID->ViewValue = $Subscriptions2->PromoCodeID->CurrentValue;
             }
         } else {
             $Subscriptions2->PromoCodeID->ViewValue = NULL;
         }
         $Subscriptions2->PromoCodeID->CssStyle = "";
         $Subscriptions2->PromoCodeID->CssClass = "";
         $Subscriptions2->PromoCodeID->ViewCustomAttributes = "";
         // TransactionNumber
         $Subscriptions2->TransactionNumber->ViewValue = $Subscriptions2->TransactionNumber->CurrentValue;
         $Subscriptions2->TransactionNumber->CssStyle = "";
         $Subscriptions2->TransactionNumber->CssClass = "";
         $Subscriptions2->TransactionNumber->ViewCustomAttributes = "";
         // Want
         if (strval($Subscriptions2->Want->CurrentValue) != "") {
             $arwrk = explode(",", $Subscriptions2->Want->CurrentValue);
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
             $sWhereWrk = "";
             foreach ($arwrk as $wrk) {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " OR ";
                 }
                 $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= "(" . $sWhereWrk . ")";
             }
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->Want->ViewValue = "";
                 $ari = 0;
                 while (!$rswrk->EOF) {
                     $Subscriptions2->Want->ViewValue .= $rswrk->fields('ItemName');
                     $rswrk->MoveNext();
                     if (!$rswrk->EOF) {
                         $Subscriptions2->Want->ViewValue .= ew_ViewOptionSeparator($ari);
                     }
                     // Separate Options
                     $ari++;
                 }
                 $rswrk->Close();
             } else {
                 $Subscriptions2->Want->ViewValue = $Subscriptions2->Want->CurrentValue;
             }
         } else {
             $Subscriptions2->Want->ViewValue = NULL;
         }
         $Subscriptions2->Want->CssStyle = "";
         $Subscriptions2->Want->CssClass = "";
         $Subscriptions2->Want->ViewCustomAttributes = "";
         // DontWant
         if (strval($Subscriptions2->DontWant->CurrentValue) != "") {
             $arwrk = explode(",", $Subscriptions2->DontWant->CurrentValue);
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
             $sWhereWrk = "";
             foreach ($arwrk as $wrk) {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " OR ";
                 }
                 $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= "(" . $sWhereWrk . ")";
             }
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->DontWant->ViewValue = "";
                 $ari = 0;
                 while (!$rswrk->EOF) {
                     $Subscriptions2->DontWant->ViewValue .= $rswrk->fields('ItemName');
                     $rswrk->MoveNext();
                     if (!$rswrk->EOF) {
                         $Subscriptions2->DontWant->ViewValue .= ew_ViewOptionSeparator($ari);
                     }
                     // Separate Options
                     $ari++;
                 }
                 $rswrk->Close();
             } else {
                 $Subscriptions2->DontWant->ViewValue = $Subscriptions2->DontWant->CurrentValue;
             }
         } else {
             $Subscriptions2->DontWant->ViewValue = NULL;
         }
         $Subscriptions2->DontWant->CssStyle = "";
         $Subscriptions2->DontWant->CssClass = "";
         $Subscriptions2->DontWant->ViewCustomAttributes = "";
         // Comments
         $Subscriptions2->Comments->ViewValue = $Subscriptions2->Comments->CurrentValue;
         $Subscriptions2->Comments->CssStyle = "";
         $Subscriptions2->Comments->CssClass = "";
         $Subscriptions2->Comments->ViewCustomAttributes = "";
         // SubscriptionID
         $Subscriptions2->SubscriptionID->ViewValue = $Subscriptions2->SubscriptionID->CurrentValue;
         $Subscriptions2->SubscriptionID->CssStyle = "";
         $Subscriptions2->SubscriptionID->CssClass = "";
         $Subscriptions2->SubscriptionID->ViewCustomAttributes = "";
         // OrderID
         $Subscriptions2->OrderID->HrefValue = "";
         // DeliveryDate
         $Subscriptions2->DeliveryDate->HrefValue = "";
         // CustomerID
         $Subscriptions2->CustomerID->HrefValue = "";
         // WeeklyMeals
         $Subscriptions2->WeeklyMeals->HrefValue = "";
         // WeeklyReg
         $Subscriptions2->WeeklyReg->HrefValue = "";
         // WeeklyVeg
         $Subscriptions2->WeeklyVeg->HrefValue = "";
         // PromoCodeID
         $Subscriptions2->PromoCodeID->HrefValue = "";
         // TransactionNumber
         $Subscriptions2->TransactionNumber->HrefValue = "";
         // Want
         $Subscriptions2->Want->HrefValue = "";
         // DontWant
         $Subscriptions2->DontWant->HrefValue = "";
         // Comments
         $Subscriptions2->Comments->HrefValue = "";
         // SubscriptionID
         $Subscriptions2->SubscriptionID->HrefValue = "";
     } elseif ($Subscriptions2->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // OrderID
         $Subscriptions2->OrderID->EditCustomAttributes = "";
         $Subscriptions2->OrderID->EditValue = $Subscriptions2->OrderID->CurrentValue;
         $Subscriptions2->OrderID->CssStyle = "";
         $Subscriptions2->OrderID->CssClass = "";
         $Subscriptions2->OrderID->ViewCustomAttributes = "";
         // DeliveryDate
         $Subscriptions2->DeliveryDate->EditCustomAttributes = "";
         $Subscriptions2->DeliveryDate->EditValue = $Subscriptions2->DeliveryDate->CurrentValue;
         $Subscriptions2->DeliveryDate->EditValue = ew_FormatDateTime($Subscriptions2->DeliveryDate->EditValue, 6);
         $Subscriptions2->DeliveryDate->CssStyle = "";
         $Subscriptions2->DeliveryDate->CssClass = "";
         $Subscriptions2->DeliveryDate->ViewCustomAttributes = "";
         // CustomerID
         $Subscriptions2->CustomerID->EditCustomAttributes = "";
         if (strval($Subscriptions2->CustomerID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($Subscriptions2->CustomerID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->CustomerID->EditValue = $rswrk->fields('LastName');
                 $Subscriptions2->CustomerID->EditValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                 $rswrk->Close();
             } else {
                 $Subscriptions2->CustomerID->EditValue = $Subscriptions2->CustomerID->CurrentValue;
             }
         } else {
             $Subscriptions2->CustomerID->EditValue = NULL;
         }
         $Subscriptions2->CustomerID->CssStyle = "";
         $Subscriptions2->CustomerID->CssClass = "";
         $Subscriptions2->CustomerID->ViewCustomAttributes = "";
         // WeeklyMeals
         $Subscriptions2->WeeklyMeals->EditCustomAttributes = "";
         $Subscriptions2->WeeklyMeals->EditValue = ew_HtmlEncode($Subscriptions2->WeeklyMeals->CurrentValue);
         // WeeklyReg
         $Subscriptions2->WeeklyReg->EditCustomAttributes = "";
         $Subscriptions2->WeeklyReg->EditValue = ew_HtmlEncode($Subscriptions2->WeeklyReg->CurrentValue);
         // WeeklyVeg
         $Subscriptions2->WeeklyVeg->EditCustomAttributes = "";
         $Subscriptions2->WeeklyVeg->EditValue = ew_HtmlEncode($Subscriptions2->WeeklyVeg->CurrentValue);
         // PromoCodeID
         $Subscriptions2->PromoCodeID->EditCustomAttributes = "";
         $sSqlWrk = "SELECT `PromoCodeID`, `PromoCodeName`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `PromoCodes`";
         $sWhereWrk = "";
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE {$sWhereWrk}";
         }
         $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", "Please Select"));
         $Subscriptions2->PromoCodeID->EditValue = $arwrk;
         // TransactionNumber
         $Subscriptions2->TransactionNumber->EditCustomAttributes = "";
         $Subscriptions2->TransactionNumber->EditValue = ew_HtmlEncode($Subscriptions2->TransactionNumber->CurrentValue);
         // Want
         $Subscriptions2->Want->EditCustomAttributes = "";
         if (strval($Subscriptions2->Want->CurrentValue) != "") {
             $arwrk = explode(",", $Subscriptions2->Want->CurrentValue);
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
             $sWhereWrk = "";
             foreach ($arwrk as $wrk) {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " OR ";
                 }
                 $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= "(" . $sWhereWrk . ")";
             }
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->Want->EditValue = "";
                 $ari = 0;
                 while (!$rswrk->EOF) {
                     $Subscriptions2->Want->EditValue .= $rswrk->fields('ItemName');
                     $rswrk->MoveNext();
                     if (!$rswrk->EOF) {
                         $Subscriptions2->Want->EditValue .= ew_ViewOptionSeparator($ari);
                     }
                     // Separate Options
                     $ari++;
                 }
                 $rswrk->Close();
             } else {
                 $Subscriptions2->Want->EditValue = $Subscriptions2->Want->CurrentValue;
             }
         } else {
             $Subscriptions2->Want->EditValue = NULL;
         }
         $Subscriptions2->Want->CssStyle = "";
         $Subscriptions2->Want->CssClass = "";
         $Subscriptions2->Want->ViewCustomAttributes = "";
         // DontWant
         $Subscriptions2->DontWant->EditCustomAttributes = "";
         if (strval($Subscriptions2->DontWant->CurrentValue) != "") {
             $arwrk = explode(",", $Subscriptions2->DontWant->CurrentValue);
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
             $sWhereWrk = "";
             foreach ($arwrk as $wrk) {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " OR ";
                 }
                 $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= "(" . $sWhereWrk . ")";
             }
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->DontWant->EditValue = "";
                 $ari = 0;
                 while (!$rswrk->EOF) {
                     $Subscriptions2->DontWant->EditValue .= $rswrk->fields('ItemName');
                     $rswrk->MoveNext();
                     if (!$rswrk->EOF) {
                         $Subscriptions2->DontWant->EditValue .= ew_ViewOptionSeparator($ari);
                     }
                     // Separate Options
                     $ari++;
                 }
                 $rswrk->Close();
             } else {
                 $Subscriptions2->DontWant->EditValue = $Subscriptions2->DontWant->CurrentValue;
             }
         } else {
             $Subscriptions2->DontWant->EditValue = NULL;
         }
         $Subscriptions2->DontWant->CssStyle = "";
         $Subscriptions2->DontWant->CssClass = "";
         $Subscriptions2->DontWant->ViewCustomAttributes = "";
         // Comments
         $Subscriptions2->Comments->EditCustomAttributes = "";
         $Subscriptions2->Comments->EditValue = $Subscriptions2->Comments->CurrentValue;
         $Subscriptions2->Comments->CssStyle = "";
         $Subscriptions2->Comments->CssClass = "";
         $Subscriptions2->Comments->ViewCustomAttributes = "";
         // SubscriptionID
         $Subscriptions2->SubscriptionID->EditCustomAttributes = "";
         $Subscriptions2->SubscriptionID->EditValue = $Subscriptions2->SubscriptionID->CurrentValue;
         $Subscriptions2->SubscriptionID->CssStyle = "";
         $Subscriptions2->SubscriptionID->CssClass = "";
         $Subscriptions2->SubscriptionID->ViewCustomAttributes = "";
         // Edit refer script
         // OrderID
         $Subscriptions2->OrderID->HrefValue = "";
         // DeliveryDate
         $Subscriptions2->DeliveryDate->HrefValue = "";
         // CustomerID
         $Subscriptions2->CustomerID->HrefValue = "";
         // WeeklyMeals
         $Subscriptions2->WeeklyMeals->HrefValue = "";
         // WeeklyReg
         $Subscriptions2->WeeklyReg->HrefValue = "";
         // WeeklyVeg
         $Subscriptions2->WeeklyVeg->HrefValue = "";
         // PromoCodeID
         $Subscriptions2->PromoCodeID->HrefValue = "";
         // TransactionNumber
         $Subscriptions2->TransactionNumber->HrefValue = "";
         // Want
         $Subscriptions2->Want->HrefValue = "";
         // DontWant
         $Subscriptions2->DontWant->HrefValue = "";
         // Comments
         $Subscriptions2->Comments->HrefValue = "";
         // SubscriptionID
         $Subscriptions2->SubscriptionID->HrefValue = "";
     }
     // Call Row Rendered event
     $Subscriptions2->Row_Rendered();
 }
 function RenderRow()
 {
     global $conn, $Security, $Language, $t_produits_vins;
     // Initialize URLs
     // Call Row_Rendering event
     $t_produits_vins->Row_Rendering();
     // Common render codes for all row types
     // id
     // super_category
     // vin
     // millesime
     // code
     // id_fournisseur
     // id_produit
     // demi_bouteille
     // import_privee
     // bio
     // format
     // prix_vente
     // prix_achat
     if ($t_produits_vins->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $t_produits_vins->id->ViewValue = $t_produits_vins->id->CurrentValue;
         $t_produits_vins->id->ViewCustomAttributes = "";
         // super_category
         $t_produits_vins->super_category->ViewValue = $t_produits_vins->super_category->CurrentValue;
         $t_produits_vins->super_category->ViewCustomAttributes = "";
         // vin
         $t_produits_vins->vin->ViewValue = $t_produits_vins->vin->CurrentValue;
         if (strval($t_produits_vins->vin->CurrentValue) != "") {
             $sFilterWrk = "`id` = " . ew_AdjustSql($t_produits_vins->vin->CurrentValue) . "";
             $sSqlWrk = "SELECT `label` FROM `v_all_vins`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " AND ";
                 }
                 $sWhereWrk .= "(" . $sFilterWrk . ")";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $t_produits_vins->vin->ViewValue = $rswrk->fields('label');
                 $rswrk->Close();
             } else {
                 $t_produits_vins->vin->ViewValue = $t_produits_vins->vin->CurrentValue;
             }
         } else {
             $t_produits_vins->vin->ViewValue = NULL;
         }
         $t_produits_vins->vin->ViewCustomAttributes = "";
         // millesime
         $t_produits_vins->millesime->ViewValue = $t_produits_vins->millesime->CurrentValue;
         $t_produits_vins->millesime->ViewCustomAttributes = "";
         // code
         $t_produits_vins->code->ViewValue = $t_produits_vins->code->CurrentValue;
         $t_produits_vins->code->ViewCustomAttributes = "";
         // id_fournisseur
         if (strval($t_produits_vins->id_fournisseur->CurrentValue) != "") {
             $sFilterWrk = "`id` = " . ew_AdjustSql($t_produits_vins->id_fournisseur->CurrentValue) . "";
             $sSqlWrk = "SELECT `compagnie` FROM `t_fournisseurs`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " AND ";
                 }
                 $sWhereWrk .= "(" . $sFilterWrk . ")";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `compagnie` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $t_produits_vins->id_fournisseur->ViewValue = $rswrk->fields('compagnie');
                 $rswrk->Close();
             } else {
                 $t_produits_vins->id_fournisseur->ViewValue = $t_produits_vins->id_fournisseur->CurrentValue;
             }
         } else {
             $t_produits_vins->id_fournisseur->ViewValue = NULL;
         }
         $t_produits_vins->id_fournisseur->ViewCustomAttributes = "";
         // id_produit
         $t_produits_vins->id_produit->ViewValue = $t_produits_vins->id_produit->CurrentValue;
         $t_produits_vins->id_produit->ViewCustomAttributes = "";
         // demi_bouteille
         if (strval($t_produits_vins->demi_bouteille->CurrentValue) != "") {
             $t_produits_vins->demi_bouteille->ViewValue = "";
             $arwrk = explode(",", strval($t_produits_vins->demi_bouteille->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 switch (trim($arwrk[$ari])) {
                     case "1":
                         $t_produits_vins->demi_bouteille->ViewValue .= $t_produits_vins->demi_bouteille->FldTagCaption(1) != "" ? $t_produits_vins->demi_bouteille->FldTagCaption(1) : trim($arwrk[$ari]);
                         break;
                     default:
                         $t_produits_vins->demi_bouteille->ViewValue .= trim($arwrk[$ari]);
                 }
                 if ($ari < $cnt - 1) {
                     $t_produits_vins->demi_bouteille->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $t_produits_vins->demi_bouteille->ViewValue = NULL;
         }
         $t_produits_vins->demi_bouteille->ViewCustomAttributes = "";
         // import_privee
         if (strval($t_produits_vins->import_privee->CurrentValue) != "") {
             $t_produits_vins->import_privee->ViewValue = "";
             $arwrk = explode(",", strval($t_produits_vins->import_privee->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 switch (trim($arwrk[$ari])) {
                     case "1":
                         $t_produits_vins->import_privee->ViewValue .= $t_produits_vins->import_privee->FldTagCaption(1) != "" ? $t_produits_vins->import_privee->FldTagCaption(1) : trim($arwrk[$ari]);
                         break;
                     default:
                         $t_produits_vins->import_privee->ViewValue .= trim($arwrk[$ari]);
                 }
                 if ($ari < $cnt - 1) {
                     $t_produits_vins->import_privee->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $t_produits_vins->import_privee->ViewValue = NULL;
         }
         $t_produits_vins->import_privee->ViewCustomAttributes = "";
         // bio
         if (strval($t_produits_vins->bio->CurrentValue) != "") {
             $t_produits_vins->bio->ViewValue = "";
             $arwrk = explode(",", strval($t_produits_vins->bio->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 switch (trim($arwrk[$ari])) {
                     case "1":
                         $t_produits_vins->bio->ViewValue .= $t_produits_vins->bio->FldTagCaption(1) != "" ? $t_produits_vins->bio->FldTagCaption(1) : trim($arwrk[$ari]);
                         break;
                     default:
                         $t_produits_vins->bio->ViewValue .= trim($arwrk[$ari]);
                 }
                 if ($ari < $cnt - 1) {
                     $t_produits_vins->bio->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $t_produits_vins->bio->ViewValue = NULL;
         }
         $t_produits_vins->bio->ViewCustomAttributes = "";
         // format
         $t_produits_vins->format->ViewValue = $t_produits_vins->format->CurrentValue;
         $t_produits_vins->format->ViewCustomAttributes = "";
         // prix_vente
         $t_produits_vins->prix_vente->ViewValue = $t_produits_vins->prix_vente->CurrentValue;
         $t_produits_vins->prix_vente->ViewCustomAttributes = "";
         // prix_achat
         $t_produits_vins->prix_achat->ViewValue = $t_produits_vins->prix_achat->CurrentValue;
         $t_produits_vins->prix_achat->ViewCustomAttributes = "";
         // super_category
         $t_produits_vins->super_category->LinkCustomAttributes = "";
         $t_produits_vins->super_category->HrefValue = "";
         $t_produits_vins->super_category->TooltipValue = "";
         // vin
         $t_produits_vins->vin->LinkCustomAttributes = "";
         $t_produits_vins->vin->HrefValue = "";
         $t_produits_vins->vin->TooltipValue = "";
         // millesime
         $t_produits_vins->millesime->LinkCustomAttributes = "";
         $t_produits_vins->millesime->HrefValue = "";
         $t_produits_vins->millesime->TooltipValue = "";
         // code
         $t_produits_vins->code->LinkCustomAttributes = "";
         $t_produits_vins->code->HrefValue = "";
         $t_produits_vins->code->TooltipValue = "";
         // id_fournisseur
         $t_produits_vins->id_fournisseur->LinkCustomAttributes = "";
         $t_produits_vins->id_fournisseur->HrefValue = "";
         $t_produits_vins->id_fournisseur->TooltipValue = "";
         // demi_bouteille
         $t_produits_vins->demi_bouteille->LinkCustomAttributes = "";
         $t_produits_vins->demi_bouteille->HrefValue = "";
         $t_produits_vins->demi_bouteille->TooltipValue = "";
         // import_privee
         $t_produits_vins->import_privee->LinkCustomAttributes = "";
         $t_produits_vins->import_privee->HrefValue = "";
         $t_produits_vins->import_privee->TooltipValue = "";
         // bio
         $t_produits_vins->bio->LinkCustomAttributes = "";
         $t_produits_vins->bio->HrefValue = "";
         $t_produits_vins->bio->TooltipValue = "";
         // format
         $t_produits_vins->format->LinkCustomAttributes = "";
         $t_produits_vins->format->HrefValue = "";
         $t_produits_vins->format->TooltipValue = "";
         // prix_vente
         $t_produits_vins->prix_vente->LinkCustomAttributes = "";
         $t_produits_vins->prix_vente->HrefValue = "";
         $t_produits_vins->prix_vente->TooltipValue = "";
         // prix_achat
         $t_produits_vins->prix_achat->LinkCustomAttributes = "";
         $t_produits_vins->prix_achat->HrefValue = "";
         $t_produits_vins->prix_achat->TooltipValue = "";
     } elseif ($t_produits_vins->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // super_category
         $t_produits_vins->super_category->EditCustomAttributes = "";
         // vin
         $t_produits_vins->vin->EditCustomAttributes = "";
         $t_produits_vins->vin->EditValue = ew_HtmlEncode($t_produits_vins->vin->CurrentValue);
         if (strval($t_produits_vins->vin->CurrentValue) != "") {
             $sFilterWrk = "`id` = " . ew_AdjustSql($t_produits_vins->vin->CurrentValue) . "";
             $sSqlWrk = "SELECT `label` FROM `v_all_vins`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " AND ";
                 }
                 $sWhereWrk .= "(" . $sFilterWrk . ")";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $t_produits_vins->vin->EditValue = $rswrk->fields('label');
                 $rswrk->Close();
             } else {
                 $t_produits_vins->vin->EditValue = $t_produits_vins->vin->CurrentValue;
             }
         } else {
             $t_produits_vins->vin->EditValue = NULL;
         }
         // millesime
         $t_produits_vins->millesime->EditCustomAttributes = "";
         $t_produits_vins->millesime->EditValue = ew_HtmlEncode($t_produits_vins->millesime->CurrentValue);
         // code
         $t_produits_vins->code->EditCustomAttributes = "";
         $t_produits_vins->code->EditValue = ew_HtmlEncode($t_produits_vins->code->CurrentValue);
         // id_fournisseur
         $t_produits_vins->id_fournisseur->EditCustomAttributes = "";
         $sFilterWrk = "";
         $sSqlWrk = "SELECT `id`, `compagnie` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld` FROM `t_fournisseurs`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             if ($sWhereWrk != "") {
                 $sWhereWrk .= " AND ";
             }
             $sWhereWrk .= "(" . $sFilterWrk . ")";
         }
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `compagnie` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect")));
         $t_produits_vins->id_fournisseur->EditValue = $arwrk;
         // demi_bouteille
         $t_produits_vins->demi_bouteille->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array("1", $t_produits_vins->demi_bouteille->FldTagCaption(1) != "" ? $t_produits_vins->demi_bouteille->FldTagCaption(1) : "1");
         $t_produits_vins->demi_bouteille->EditValue = $arwrk;
         // import_privee
         $t_produits_vins->import_privee->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array("1", $t_produits_vins->import_privee->FldTagCaption(1) != "" ? $t_produits_vins->import_privee->FldTagCaption(1) : "1");
         $t_produits_vins->import_privee->EditValue = $arwrk;
         // bio
         $t_produits_vins->bio->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array("1", $t_produits_vins->bio->FldTagCaption(1) != "" ? $t_produits_vins->bio->FldTagCaption(1) : "1");
         $t_produits_vins->bio->EditValue = $arwrk;
         // format
         $t_produits_vins->format->EditCustomAttributes = "";
         $t_produits_vins->format->EditValue = ew_HtmlEncode($t_produits_vins->format->CurrentValue);
         // prix_vente
         $t_produits_vins->prix_vente->EditCustomAttributes = "";
         $t_produits_vins->prix_vente->EditValue = ew_HtmlEncode($t_produits_vins->prix_vente->CurrentValue);
         // prix_achat
         $t_produits_vins->prix_achat->EditCustomAttributes = "";
         $t_produits_vins->prix_achat->EditValue = ew_HtmlEncode($t_produits_vins->prix_achat->CurrentValue);
         // Edit refer script
         // super_category
         $t_produits_vins->super_category->HrefValue = "";
         // vin
         $t_produits_vins->vin->HrefValue = "";
         // millesime
         $t_produits_vins->millesime->HrefValue = "";
         // code
         $t_produits_vins->code->HrefValue = "";
         // id_fournisseur
         $t_produits_vins->id_fournisseur->HrefValue = "";
         // demi_bouteille
         $t_produits_vins->demi_bouteille->HrefValue = "";
         // import_privee
         $t_produits_vins->import_privee->HrefValue = "";
         // bio
         $t_produits_vins->bio->HrefValue = "";
         // format
         $t_produits_vins->format->HrefValue = "";
         // prix_vente
         $t_produits_vins->prix_vente->HrefValue = "";
         // prix_achat
         $t_produits_vins->prix_achat->HrefValue = "";
     }
     if ($t_produits_vins->RowType == EW_ROWTYPE_ADD || $t_produits_vins->RowType == EW_ROWTYPE_EDIT || $t_produits_vins->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $t_produits_vins->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($t_produits_vins->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $t_produits_vins->Row_Rendered();
     }
 }
示例#8
0
 function RenderListRow()
 {
     global $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // Common render codes
     // memberID
     $this->memberID->CellCssStyle = "white-space: nowrap;";
     // name
     // email
     // profession
     // game_type
     // division
     // has_expansion
     // notes
     // memberID
     $this->memberID->ViewValue = $this->memberID->CurrentValue;
     $this->memberID->ViewCustomAttributes = "";
     // name
     $this->name->ViewValue = $this->name->CurrentValue;
     $this->name->ViewCustomAttributes = "";
     // email
     $this->_email->ViewValue = $this->_email->CurrentValue;
     $this->_email->ViewCustomAttributes = "";
     // profession
     if (strval($this->profession->CurrentValue) != "") {
         $this->profession->ViewValue = "";
         $arwrk = explode(",", strval($this->profession->CurrentValue));
         $cnt = count($arwrk);
         for ($ari = 0; $ari < $cnt; $ari++) {
             $this->profession->ViewValue .= $this->profession->OptionCaption(trim($arwrk[$ari]));
             if ($ari < $cnt - 1) {
                 $this->profession->ViewValue .= ew_ViewOptionSeparator($ari);
             }
         }
     } else {
         $this->profession->ViewValue = NULL;
     }
     $this->profession->ViewCustomAttributes = "";
     // game_type
     if (strval($this->game_type->CurrentValue) != "") {
         $this->game_type->ViewValue = "";
         $arwrk = explode(",", strval($this->game_type->CurrentValue));
         $cnt = count($arwrk);
         for ($ari = 0; $ari < $cnt; $ari++) {
             $this->game_type->ViewValue .= $this->game_type->OptionCaption(trim($arwrk[$ari]));
             if ($ari < $cnt - 1) {
                 $this->game_type->ViewValue .= ew_ViewOptionSeparator($ari);
             }
         }
     } else {
         $this->game_type->ViewValue = NULL;
     }
     $this->game_type->ViewCustomAttributes = "";
     // division
     if (strval($this->division->CurrentValue) != "") {
         $this->division->ViewValue = "";
         $arwrk = explode(",", strval($this->division->CurrentValue));
         $cnt = count($arwrk);
         for ($ari = 0; $ari < $cnt; $ari++) {
             $this->division->ViewValue .= $this->division->OptionCaption(trim($arwrk[$ari]));
             if ($ari < $cnt - 1) {
                 $this->division->ViewValue .= ew_ViewOptionSeparator($ari);
             }
         }
     } else {
         $this->division->ViewValue = NULL;
     }
     $this->division->ViewCustomAttributes = "";
     // has_expansion
     if (strval($this->has_expansion->CurrentValue) != "") {
         $this->has_expansion->ViewValue = $this->has_expansion->OptionCaption($this->has_expansion->CurrentValue);
     } else {
         $this->has_expansion->ViewValue = NULL;
     }
     $this->has_expansion->ViewCustomAttributes = "";
     // notes
     $this->notes->ViewValue = $this->notes->CurrentValue;
     if (!is_null($this->notes->ViewValue)) {
         $this->notes->ViewValue = str_replace("\n", "<br>", $this->notes->ViewValue);
     }
     $this->notes->ViewCustomAttributes = "";
     // memberID
     $this->memberID->LinkCustomAttributes = "";
     $this->memberID->HrefValue = "";
     $this->memberID->TooltipValue = "";
     // name
     $this->name->LinkCustomAttributes = "";
     $this->name->HrefValue = "";
     $this->name->TooltipValue = "";
     // email
     $this->_email->LinkCustomAttributes = "";
     $this->_email->HrefValue = "";
     $this->_email->TooltipValue = "";
     // profession
     $this->profession->LinkCustomAttributes = "";
     $this->profession->HrefValue = "";
     $this->profession->TooltipValue = "";
     // game_type
     $this->game_type->LinkCustomAttributes = "";
     $this->game_type->HrefValue = "";
     $this->game_type->TooltipValue = "";
     // division
     $this->division->LinkCustomAttributes = "";
     $this->division->HrefValue = "";
     $this->division->TooltipValue = "";
     // has_expansion
     $this->has_expansion->LinkCustomAttributes = "";
     $this->has_expansion->HrefValue = "";
     $this->has_expansion->TooltipValue = "";
     // notes
     $this->notes->LinkCustomAttributes = "";
     $this->notes->HrefValue = "";
     $this->notes->TooltipValue = "";
     // Call Row Rendered event
     $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
     // memberID
     $this->memberID->CellCssStyle = "white-space: nowrap;";
     // name
     // email
     // skype
     // birthday
     // profession
     // game_type
     // division
     // has_expansion
     // notes
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // memberID
         $this->memberID->ViewValue = $this->memberID->CurrentValue;
         $this->memberID->ViewCustomAttributes = "";
         // name
         $this->name->ViewValue = $this->name->CurrentValue;
         $this->name->ViewCustomAttributes = "";
         // email
         $this->_email->ViewValue = $this->_email->CurrentValue;
         $this->_email->ViewCustomAttributes = "";
         // skype
         $this->skype->ViewValue = $this->skype->CurrentValue;
         $this->skype->ViewCustomAttributes = "";
         // birthday
         $this->birthday->ViewValue = $this->birthday->CurrentValue;
         $this->birthday->ViewValue = ew_FormatDateTime($this->birthday->ViewValue, 5);
         $this->birthday->ViewCustomAttributes = "";
         // profession
         if (strval($this->profession->CurrentValue) != "") {
             $this->profession->ViewValue = "";
             $arwrk = explode(",", strval($this->profession->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->profession->ViewValue .= $this->profession->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->profession->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->profession->ViewValue = NULL;
         }
         $this->profession->ViewCustomAttributes = "";
         // game_type
         if (strval($this->game_type->CurrentValue) != "") {
             $this->game_type->ViewValue = "";
             $arwrk = explode(",", strval($this->game_type->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->game_type->ViewValue .= $this->game_type->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->game_type->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->game_type->ViewValue = NULL;
         }
         $this->game_type->ViewCustomAttributes = "";
         // division
         if (strval($this->division->CurrentValue) != "") {
             $this->division->ViewValue = "";
             $arwrk = explode(",", strval($this->division->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->division->ViewValue .= $this->division->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->division->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->division->ViewValue = NULL;
         }
         $this->division->ViewCustomAttributes = "";
         // has_expansion
         if (strval($this->has_expansion->CurrentValue) != "") {
             $this->has_expansion->ViewValue = $this->has_expansion->OptionCaption($this->has_expansion->CurrentValue);
         } else {
             $this->has_expansion->ViewValue = NULL;
         }
         $this->has_expansion->ViewCustomAttributes = "";
         // name
         $this->name->LinkCustomAttributes = "";
         $this->name->HrefValue = "";
         $this->name->TooltipValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         $this->_email->TooltipValue = "";
         // skype
         $this->skype->LinkCustomAttributes = "";
         $this->skype->HrefValue = "";
         $this->skype->TooltipValue = "";
         // birthday
         $this->birthday->LinkCustomAttributes = "";
         $this->birthday->HrefValue = "";
         $this->birthday->TooltipValue = "";
         // profession
         $this->profession->LinkCustomAttributes = "";
         $this->profession->HrefValue = "";
         $this->profession->TooltipValue = "";
         // game_type
         $this->game_type->LinkCustomAttributes = "";
         $this->game_type->HrefValue = "";
         $this->game_type->TooltipValue = "";
         // division
         $this->division->LinkCustomAttributes = "";
         $this->division->HrefValue = "";
         $this->division->TooltipValue = "";
         // has_expansion
         $this->has_expansion->LinkCustomAttributes = "";
         $this->has_expansion->HrefValue = "";
         $this->has_expansion->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Language, $t_produits_vins;
     // Initialize URLs
     // Call Row_Rendering event
     $t_produits_vins->Row_Rendering();
     // Common render codes for all row types
     // id
     // super_category
     $t_produits_vins->super_category->CellCssStyle = "white-space: nowrap;";
     // vin
     // millesime
     // code
     // id_fournisseur
     // id_produit
     // demi_bouteille
     // import_privee
     // bio
     // format
     // prix_vente
     // prix_achat
     if ($t_produits_vins->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $t_produits_vins->id->ViewValue = $t_produits_vins->id->CurrentValue;
         $t_produits_vins->id->ViewCustomAttributes = "";
         // super_category
         $t_produits_vins->super_category->ViewValue = $t_produits_vins->super_category->CurrentValue;
         $t_produits_vins->super_category->ViewCustomAttributes = "";
         // vin
         $t_produits_vins->vin->ViewValue = $t_produits_vins->vin->CurrentValue;
         if (strval($t_produits_vins->vin->CurrentValue) != "") {
             $sFilterWrk = "`id` = " . ew_AdjustSql($t_produits_vins->vin->CurrentValue) . "";
             $sSqlWrk = "SELECT `label` FROM `v_all_vins`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " AND ";
                 }
                 $sWhereWrk .= "(" . $sFilterWrk . ")";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $t_produits_vins->vin->ViewValue = $rswrk->fields('label');
                 $rswrk->Close();
             } else {
                 $t_produits_vins->vin->ViewValue = $t_produits_vins->vin->CurrentValue;
             }
         } else {
             $t_produits_vins->vin->ViewValue = NULL;
         }
         $t_produits_vins->vin->ViewCustomAttributes = "";
         // millesime
         $t_produits_vins->millesime->ViewValue = $t_produits_vins->millesime->CurrentValue;
         $t_produits_vins->millesime->ViewCustomAttributes = "";
         // code
         $t_produits_vins->code->ViewValue = $t_produits_vins->code->CurrentValue;
         $t_produits_vins->code->ViewCustomAttributes = "";
         // id_fournisseur
         if (strval($t_produits_vins->id_fournisseur->CurrentValue) != "") {
             $sFilterWrk = "`id` = " . ew_AdjustSql($t_produits_vins->id_fournisseur->CurrentValue) . "";
             $sSqlWrk = "SELECT `compagnie` FROM `t_fournisseurs`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " AND ";
                 }
                 $sWhereWrk .= "(" . $sFilterWrk . ")";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `compagnie` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $t_produits_vins->id_fournisseur->ViewValue = $rswrk->fields('compagnie');
                 $rswrk->Close();
             } else {
                 $t_produits_vins->id_fournisseur->ViewValue = $t_produits_vins->id_fournisseur->CurrentValue;
             }
         } else {
             $t_produits_vins->id_fournisseur->ViewValue = NULL;
         }
         $t_produits_vins->id_fournisseur->ViewCustomAttributes = "";
         // id_produit
         $t_produits_vins->id_produit->ViewValue = $t_produits_vins->id_produit->CurrentValue;
         $t_produits_vins->id_produit->ViewCustomAttributes = "";
         // demi_bouteille
         if (strval($t_produits_vins->demi_bouteille->CurrentValue) != "") {
             $t_produits_vins->demi_bouteille->ViewValue = "";
             $arwrk = explode(",", strval($t_produits_vins->demi_bouteille->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 switch (trim($arwrk[$ari])) {
                     case "1":
                         $t_produits_vins->demi_bouteille->ViewValue .= $t_produits_vins->demi_bouteille->FldTagCaption(1) != "" ? $t_produits_vins->demi_bouteille->FldTagCaption(1) : trim($arwrk[$ari]);
                         break;
                     default:
                         $t_produits_vins->demi_bouteille->ViewValue .= trim($arwrk[$ari]);
                 }
                 if ($ari < $cnt - 1) {
                     $t_produits_vins->demi_bouteille->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $t_produits_vins->demi_bouteille->ViewValue = NULL;
         }
         $t_produits_vins->demi_bouteille->ViewCustomAttributes = "";
         // import_privee
         if (strval($t_produits_vins->import_privee->CurrentValue) != "") {
             $t_produits_vins->import_privee->ViewValue = "";
             $arwrk = explode(",", strval($t_produits_vins->import_privee->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 switch (trim($arwrk[$ari])) {
                     case "1":
                         $t_produits_vins->import_privee->ViewValue .= $t_produits_vins->import_privee->FldTagCaption(1) != "" ? $t_produits_vins->import_privee->FldTagCaption(1) : trim($arwrk[$ari]);
                         break;
                     default:
                         $t_produits_vins->import_privee->ViewValue .= trim($arwrk[$ari]);
                 }
                 if ($ari < $cnt - 1) {
                     $t_produits_vins->import_privee->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $t_produits_vins->import_privee->ViewValue = NULL;
         }
         $t_produits_vins->import_privee->ViewCustomAttributes = "";
         // bio
         if (strval($t_produits_vins->bio->CurrentValue) != "") {
             $t_produits_vins->bio->ViewValue = "";
             $arwrk = explode(",", strval($t_produits_vins->bio->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 switch (trim($arwrk[$ari])) {
                     case "1":
                         $t_produits_vins->bio->ViewValue .= $t_produits_vins->bio->FldTagCaption(1) != "" ? $t_produits_vins->bio->FldTagCaption(1) : trim($arwrk[$ari]);
                         break;
                     default:
                         $t_produits_vins->bio->ViewValue .= trim($arwrk[$ari]);
                 }
                 if ($ari < $cnt - 1) {
                     $t_produits_vins->bio->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $t_produits_vins->bio->ViewValue = NULL;
         }
         $t_produits_vins->bio->ViewCustomAttributes = "";
         // format
         $t_produits_vins->format->ViewValue = $t_produits_vins->format->CurrentValue;
         $t_produits_vins->format->ViewCustomAttributes = "";
         // prix_vente
         $t_produits_vins->prix_vente->ViewValue = $t_produits_vins->prix_vente->CurrentValue;
         $t_produits_vins->prix_vente->ViewCustomAttributes = "";
         // prix_achat
         $t_produits_vins->prix_achat->ViewValue = $t_produits_vins->prix_achat->CurrentValue;
         $t_produits_vins->prix_achat->ViewCustomAttributes = "";
         // vin
         $t_produits_vins->vin->LinkCustomAttributes = "";
         $t_produits_vins->vin->HrefValue = "";
         $t_produits_vins->vin->TooltipValue = "";
         // millesime
         $t_produits_vins->millesime->LinkCustomAttributes = "";
         $t_produits_vins->millesime->HrefValue = "";
         $t_produits_vins->millesime->TooltipValue = "";
         // format
         $t_produits_vins->format->LinkCustomAttributes = "";
         $t_produits_vins->format->HrefValue = "";
         $t_produits_vins->format->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($t_produits_vins->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $t_produits_vins->Row_Rendered();
     }
 }
示例#11
0
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // AIR_PORT_ID
     // CODE
     // DESCRIPTION
     // ACTIVE
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // AIR_PORT_ID
         $this->AIR_PORT_ID->ViewValue = $this->AIR_PORT_ID->CurrentValue;
         $this->AIR_PORT_ID->ViewCustomAttributes = "";
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // ACTIVE
         if (strval($this->ACTIVE->CurrentValue) != "") {
             $this->ACTIVE->ViewValue = "";
             $arwrk = explode(",", strval($this->ACTIVE->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->ACTIVE->ViewValue .= $this->ACTIVE->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->ACTIVE->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->ACTIVE->ViewValue = NULL;
         }
         $this->ACTIVE->ViewCustomAttributes = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         $this->CODE->TooltipValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         $this->DESCRIPTION->TooltipValue = "";
         // ACTIVE
         $this->ACTIVE->LinkCustomAttributes = "";
         $this->ACTIVE->HrefValue = "";
         $this->ACTIVE->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // CODE
         $this->CODE->EditAttrs["class"] = "form-control";
         $this->CODE->EditCustomAttributes = "";
         $this->CODE->EditValue = ew_HtmlEncode($this->CODE->CurrentValue);
         $this->CODE->PlaceHolder = ew_RemoveHtml($this->CODE->FldCaption());
         // DESCRIPTION
         $this->DESCRIPTION->EditAttrs["class"] = "form-control";
         $this->DESCRIPTION->EditCustomAttributes = "";
         $this->DESCRIPTION->EditValue = ew_HtmlEncode($this->DESCRIPTION->CurrentValue);
         $this->DESCRIPTION->PlaceHolder = ew_RemoveHtml($this->DESCRIPTION->FldCaption());
         // ACTIVE
         $this->ACTIVE->EditCustomAttributes = "";
         $this->ACTIVE->EditValue = $this->ACTIVE->Options(FALSE);
         // Add refer script
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         // ACTIVE
         $this->ACTIVE->LinkCustomAttributes = "";
         $this->ACTIVE->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();
     }
 }
示例#12
0
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     $this->AddUrl = $this->GetAddUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     $this->ListUrl = $this->GetListUrl();
     $this->SetupOtherOptions();
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // memberID
     // name
     // email
     // profession
     // game_type
     // division
     // has_expansion
     // notes
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // memberID
         $this->memberID->ViewValue = $this->memberID->CurrentValue;
         $this->memberID->ViewCustomAttributes = "";
         // name
         $this->name->ViewValue = $this->name->CurrentValue;
         $this->name->ViewCustomAttributes = "";
         // email
         $this->_email->ViewValue = $this->_email->CurrentValue;
         $this->_email->ViewCustomAttributes = "";
         // profession
         if (strval($this->profession->CurrentValue) != "") {
             $this->profession->ViewValue = "";
             $arwrk = explode(",", strval($this->profession->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->profession->ViewValue .= $this->profession->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->profession->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->profession->ViewValue = NULL;
         }
         $this->profession->ViewCustomAttributes = "";
         // game_type
         if (strval($this->game_type->CurrentValue) != "") {
             $this->game_type->ViewValue = "";
             $arwrk = explode(",", strval($this->game_type->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->game_type->ViewValue .= $this->game_type->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->game_type->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->game_type->ViewValue = NULL;
         }
         $this->game_type->ViewCustomAttributes = "";
         // division
         if (strval($this->division->CurrentValue) != "") {
             $this->division->ViewValue = "";
             $arwrk = explode(",", strval($this->division->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->division->ViewValue .= $this->division->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->division->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->division->ViewValue = NULL;
         }
         $this->division->ViewCustomAttributes = "";
         // has_expansion
         if (strval($this->has_expansion->CurrentValue) != "") {
             $this->has_expansion->ViewValue = $this->has_expansion->OptionCaption($this->has_expansion->CurrentValue);
         } else {
             $this->has_expansion->ViewValue = NULL;
         }
         $this->has_expansion->ViewCustomAttributes = "";
         // notes
         $this->notes->ViewValue = $this->notes->CurrentValue;
         if (!is_null($this->notes->ViewValue)) {
             $this->notes->ViewValue = str_replace("\n", "<br>", $this->notes->ViewValue);
         }
         $this->notes->ViewCustomAttributes = "";
         // name
         $this->name->LinkCustomAttributes = "";
         $this->name->HrefValue = "";
         $this->name->TooltipValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         $this->_email->TooltipValue = "";
         // profession
         $this->profession->LinkCustomAttributes = "";
         $this->profession->HrefValue = "";
         $this->profession->TooltipValue = "";
         // game_type
         $this->game_type->LinkCustomAttributes = "";
         $this->game_type->HrefValue = "";
         $this->game_type->TooltipValue = "";
         // division
         $this->division->LinkCustomAttributes = "";
         $this->division->HrefValue = "";
         $this->division->TooltipValue = "";
         // has_expansion
         $this->has_expansion->LinkCustomAttributes = "";
         $this->has_expansion->HrefValue = "";
         $this->has_expansion->TooltipValue = "";
         // notes
         $this->notes->LinkCustomAttributes = "";
         $this->notes->HrefValue = "";
         $this->notes->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
示例#13
0
 function RenderListRow()
 {
     global $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // Common render codes
     // AIR_PORT_ID
     // CODE
     // DESCRIPTION
     // ACTIVE
     // AIR_PORT_ID
     $this->AIR_PORT_ID->ViewValue = $this->AIR_PORT_ID->CurrentValue;
     $this->AIR_PORT_ID->ViewCustomAttributes = "";
     // CODE
     $this->CODE->ViewValue = $this->CODE->CurrentValue;
     $this->CODE->ViewCustomAttributes = "";
     // DESCRIPTION
     $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
     $this->DESCRIPTION->ViewCustomAttributes = "";
     // ACTIVE
     if (strval($this->ACTIVE->CurrentValue) != "") {
         $this->ACTIVE->ViewValue = "";
         $arwrk = explode(",", strval($this->ACTIVE->CurrentValue));
         $cnt = count($arwrk);
         for ($ari = 0; $ari < $cnt; $ari++) {
             $this->ACTIVE->ViewValue .= $this->ACTIVE->OptionCaption(trim($arwrk[$ari]));
             if ($ari < $cnt - 1) {
                 $this->ACTIVE->ViewValue .= ew_ViewOptionSeparator($ari);
             }
         }
     } else {
         $this->ACTIVE->ViewValue = NULL;
     }
     $this->ACTIVE->ViewCustomAttributes = "";
     // AIR_PORT_ID
     $this->AIR_PORT_ID->LinkCustomAttributes = "";
     $this->AIR_PORT_ID->HrefValue = "";
     $this->AIR_PORT_ID->TooltipValue = "";
     // CODE
     $this->CODE->LinkCustomAttributes = "";
     $this->CODE->HrefValue = "";
     $this->CODE->TooltipValue = "";
     // DESCRIPTION
     $this->DESCRIPTION->LinkCustomAttributes = "";
     $this->DESCRIPTION->HrefValue = "";
     $this->DESCRIPTION->TooltipValue = "";
     // ACTIVE
     $this->ACTIVE->LinkCustomAttributes = "";
     $this->ACTIVE->HrefValue = "";
     $this->ACTIVE->TooltipValue = "";
     // Call Row Rendered event
     $this->Row_Rendered();
 }