当前位置: 首页>>代码示例>>PHP>>正文


PHP ew_AdjustSql函数代码示例

本文整理汇总了PHP中ew_AdjustSql函数的典型用法代码示例。如果您正苦于以下问题:PHP ew_AdjustSql函数的具体用法?PHP ew_AdjustSql怎么用?PHP ew_AdjustSql使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ew_AdjustSql函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Page_Main

 function Page_Main()
 {
     $qs = new cQueryString();
     if ($qs->Count > 0) {
         $Sql = $qs->getValue("s");
         $Sql = TEAdecrypt($Sql, EW_RANDOM_KEY);
         if ($Sql != "") {
             // Get the filter values (for "IN")
             $Value = ew_AdjustSql($qs->getConvertedValue("f"));
             if ($Value != "") {
                 $arValue = explode(",", $Value);
                 $FldType = $qs->getValue("lft");
                 // Filter field data type
                 if (is_numeric($FldType)) {
                     $FldType = intval($FldType);
                 }
                 $cnt = count($arValue);
                 for ($i = 0; $i < $cnt; $i++) {
                     $arValue[$i] = ew_QuotedValue($arValue[$i], $FldType);
                 }
                 $Sql = str_replace("{filter_value}", implode(",", $arValue), $Sql);
             }
             // get the query value (for "LIKE" or "=")
             $Value = ew_AdjustSql($qs->getConvertedValue("q"));
             if ($Value != "") {
                 $Sql = str_replace("{query_value}", $Value, $Sql);
             }
             $this->GetLookupValues($Sql);
         }
     } else {
         die("Missing querystring.");
     }
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:33,代码来源:ewlookup6.php

示例2: Page_Main

 function Page_Main()
 {
     $post = ew_StripSlashes($_POST);
     if (count($post) == 0) {
         die("Missing post data.");
     }
     //$sql = $qs->getValue("s");
     $sql = $post["s"];
     $sql = TEAdecrypt($sql, EW_RANDOM_KEY);
     if ($sql == "") {
         die("Missing SQL.");
     }
     if (strpos($sql, "{filter}") > 0) {
         $filters = "";
         for ($i = 0; $i < 5; $i++) {
             // Get the filter values (for "IN")
             $filter = TEAdecrypt($post["f" . $i], EW_RANDOM_KEY);
             if ($filter != "") {
                 $value = $post["v" . $i];
                 if ($value == "") {
                     if ($i > 0) {
                         // Empty parent field
                         //continue; // Allow
                         ew_AddFilter($filters, "1=0");
                     }
                     // Disallow
                     continue;
                 }
                 $arValue = explode(",", $value);
                 $fldtype = intval($post["t" . $i]);
                 for ($j = 0, $cnt = count($arValue); $j < $cnt; $j++) {
                     $arValue[$j] = ew_QuotedValue($arValue[$j], ew_FieldDataType($fldtype));
                 }
                 $filter = str_replace("{filter_value}", implode(",", $arValue), $filter);
                 ew_AddFilter($filters, $filter);
             }
         }
         $sql = str_replace("{filter}", $filters != "" ? $filters : "1=1", $sql);
     }
     // Get the query value (for "LIKE" or "=")
     $value = ew_AdjustSql(@$post["q"]);
     if ($value != "") {
         $sql = preg_replace('/LIKE \'(%)?\\{query_value\\}%\'/', ew_Like('\'$1{query_value}%\''), $sql);
         $sql = str_replace("{query_value}", $value, $sql);
     }
     // Check custom function
     $fn = @$post["fn"];
     if ($fn != "" && function_exists($fn)) {
         // Custom function(&$sql)
         $sql = $fn($sql);
     }
     $this->GetLookupValues($sql);
 }
开发者ID:huynt57,项目名称:bluebee-uet.com,代码行数:53,代码来源:ewlookup9.php

示例3: RenderRow


//.........这里部分代码省略.........
                 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);
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:67,代码来源:Customersdelete.php

示例4: BasicSearchSQL

 function BasicSearchSQL($Keyword)
 {
     $sKeyword = ew_AdjustSql($Keyword);
     $sWhere = "";
     $this->BuildBasicSearchSQL($sWhere, $this->descripcion, $Keyword);
     $this->BuildBasicSearchSQL($sWhere, $this->activa, $Keyword);
     return $sWhere;
 }
开发者ID:scintes,项目名称:sistemas,代码行数:8,代码来源:montoslist.php

示例5: Page_Main

 function Page_Main()
 {
     global $conn, $Language, $gsFormError;
     global $Breadcrumb;
     $Breadcrumb = new cBreadcrumb();
     $Breadcrumb->Add("forgotpwd", "<span id=\"ewPageCaption\">" . $Language->Phrase("RequestPwdPage") . "</span>", ew_CurrentUrl());
     $bPostBack = ew_IsHttpPost();
     $bValidEmail = FALSE;
     if ($bPostBack) {
         // Setup variables
         $this->Email = $_POST["email"];
         $bValidEmail = $this->ValidateForm($this->Email);
         if ($bValidEmail) {
             $this->Action = "activate";
             $this->ActivateCode = ew_Encrypt($this->Email);
         } else {
             $this->setFailureMessage($gsFormError);
         }
         // Handle email activation
     } elseif (@$_GET["action"] != "") {
         $this->Action = $_GET["action"];
         $this->Email = @$_GET["email"];
         $this->ActivateCode = @$_GET["code"];
         if ($this->Email != ew_Decrypt($this->ActivateCode) || strtolower($this->Action) != "confirm") {
             // Email activation
             if ($this->getFailureMessage() == "") {
                 $this->setFailureMessage($Language->Phrase("ActivateFailed"));
             }
             // Set activate failed message
             $this->Page_Terminate("login.php");
             // Go to login page
         }
     }
     if ($this->Action != "") {
         $bEmailSent = FALSE;
         // Set up filter (SQL WHERE clause) and get Return SQL
         // SQL constructor in usuario class, usuarioinfo.php
         $sFilter = str_replace("%e", ew_AdjustSql($this->Email), EW_USER_EMAIL_FILTER);
         $this->CurrentFilter = $sFilter;
         $sSql = $this->SQL();
         if ($RsUser = $conn->Execute($sSql)) {
             if (!$RsUser->EOF) {
                 $rsold = $RsUser->fields;
                 $bValidEmail = TRUE;
                 // Call User Recover Password event
                 $bValidEmail = $this->User_RecoverPassword($rsold);
                 if ($bValidEmail) {
                     $sUserName = $rsold['usuario'];
                     $sPassword = $rsold['contrasenia'];
                     if (EW_ENCRYPTED_PASSWORD) {
                         if (strtolower($this->Action) == "confirm") {
                             $sPassword = substr($sPassword, 0, 16);
                             // Use first 16 characters only
                             $rsnew = array('contrasenia' => $sPassword);
                             // Reset the password
                             $this->Update($rsnew);
                         }
                     } else {
                         $this->Action = "confirm";
                         // Send password directly if not MD5
                     }
                 }
             } else {
                 $bValidEmail = FALSE;
                 $this->setFailureMessage($Language->Phrase("InvalidEmail"));
             }
             if ($bValidEmail) {
                 $Email = new cEmail();
                 if (strtolower($this->Action) == "confirm") {
                     $Email->Load("phptxt/forgotpwd.txt");
                     $Email->ReplaceContent('<!--$Password-->', $sPassword);
                 } else {
                     $Email->Load("phptxt/resetpwd.txt");
                     $sActivateLink = ew_FullUrl() . "?action=confirm";
                     $sActivateLink .= "&email=" . $this->Email;
                     $sActivateLink .= "&code=" . $this->ActivateCode;
                     $Email->ReplaceContent('<!--$ActivateLink-->', $sActivateLink);
                 }
                 $Email->ReplaceSender(EW_SENDER_EMAIL);
                 // Replace Sender
                 $Email->ReplaceRecipient($this->Email);
                 // Replace Recipient
                 $Email->ReplaceContent('<!--$UserName-->', $sUserName);
                 $Email->Charset = EW_EMAIL_CHARSET;
                 $Args = array();
                 if (EW_ENCRYPTED_PASSWORD && strtolower($this->Action) == "confirm") {
                     $Args["rs"] =& $rsnew;
                 }
                 if ($this->Email_Sending($Email, $Args)) {
                     $bEmailSent = $Email->Send();
                 }
             }
             $RsUser->Close();
         }
         if ($bEmailSent) {
             if ($this->getSuccessMessage() == "") {
                 if (strtolower($this->Action) == "confirm") {
                     $this->setSuccessMessage($Language->Phrase("PwdEmailSent"));
                 } else {
                     $this->setSuccessMessage($Language->Phrase("ResetPwdEmailSent"));
//.........这里部分代码省略.........
开发者ID:scintes,项目名称:sistemas,代码行数:101,代码来源:forgotpwd.php

示例6: EditRow

 function EditRow()
 {
     global $conn, $Security, $AdminInfo;
     $sFilter = $AdminInfo->KeyFilter();
     if ($AdminInfo->Name->CurrentValue != "") {
         // Check field with unique index
         $sFilterChk = "(Name = '" . ew_AdjustSql($AdminInfo->Name->CurrentValue) . "')";
         $sFilterChk .= " AND NOT (" . $sFilter . ")";
         $AdminInfo->CurrentFilter = $sFilterChk;
         $sSqlChk = $AdminInfo->SQL();
         $conn->raiseErrorFn = 'ew_ErrorFn';
         $rsChk = $conn->Execute($sSqlChk);
         $conn->raiseErrorFn = '';
         if ($rsChk === FALSE) {
             return FALSE;
         } elseif (!$rsChk->EOF) {
             $sIdxErrMsg = str_replace("%f", "Name", "Duplicate value '%v' for unique index '%f'");
             $sIdxErrMsg = str_replace("%v", $AdminInfo->Name->CurrentValue, $sIdxErrMsg);
             $this->setMessage($sIdxErrMsg);
             $rsChk->Close();
             return FALSE;
         }
         $rsChk->Close();
     }
     $AdminInfo->CurrentFilter = $sFilter;
     $sSql = $AdminInfo->SQL();
     $conn->raiseErrorFn = 'ew_ErrorFn';
     $rs = $conn->Execute($sSql);
     $conn->raiseErrorFn = '';
     if ($rs === FALSE) {
         return FALSE;
     }
     if ($rs->EOF) {
         $EditRow = FALSE;
         // Update Failed
     } else {
         // Save old values
         $rsold =& $rs->fields;
         $rsnew = array();
         // Field id
         // Field Name
         $AdminInfo->Name->SetDbValueDef($AdminInfo->Name->CurrentValue, "");
         $rsnew['Name'] =& $AdminInfo->Name->DbValue;
         // Field Password
         $AdminInfo->Password->SetDbValueDef($AdminInfo->Password->CurrentValue, "");
         $rsnew['Password'] =& $AdminInfo->Password->DbValue;
         // Call Row Updating event
         $bUpdateRow = $AdminInfo->Row_Updating($rsold, $rsnew);
         if ($bUpdateRow) {
             $conn->raiseErrorFn = 'ew_ErrorFn';
             $EditRow = $conn->Execute($AdminInfo->UpdateSQL($rsnew));
             $conn->raiseErrorFn = '';
         } else {
             if ($AdminInfo->CancelMessage != "") {
                 $this->setMessage($AdminInfo->CancelMessage);
                 $AdminInfo->CancelMessage = "";
             } else {
                 $this->setMessage("Update cancelled");
             }
             $EditRow = FALSE;
         }
     }
     // Call Row_Updated event
     if ($EditRow) {
         $AdminInfo->Row_Updated($rsold, $rsnew);
     }
     $rs->Close();
     return $EditRow;
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:69,代码来源:AdminInfoedit.php

示例7: KeyFilter

 function KeyFilter()
 {
     $sKeyFilter = $this->SqlKeyFilter();
     if (!is_numeric($this->subject_type_id->CurrentValue)) {
         $sKeyFilter = "0=1";
     }
     // Invalid key
     $sKeyFilter = str_replace("@subject_type_id@", ew_AdjustSql($this->subject_type_id->CurrentValue), $sKeyFilter);
     // Replace key value
     return $sKeyFilter;
 }
开发者ID:huynt57,项目名称:bluebee-uet.com,代码行数:11,代码来源:tbl_subject_group_typeinfo.php

示例8: Page_Main

 function Page_Main()
 {
     global $conn, $Language, $Security, $gsFormError;
     global $Breadcrumb;
     $Breadcrumb = new cBreadcrumb();
     $Breadcrumb->Add("changepwd", "ChangePwdPage", ew_CurrentUrl(), "", "", TRUE);
     $bPostBack = ew_IsHttpPost();
     $bValidate = TRUE;
     if ($bPostBack) {
         $this->OldPassword = ew_StripSlashes(@$_POST["opwd"]);
         $this->NewPassword = ew_StripSlashes(@$_POST["npwd"]);
         $this->ConfirmedPassword = ew_StripSlashes(@$_POST["cpwd"]);
         $bValidate = $this->ValidateForm($this->OldPassword, $this->NewPassword, $this->ConfirmedPassword);
         if (!$bValidate) {
             $this->setFailureMessage($gsFormError);
         }
     }
     $bPwdUpdated = FALSE;
     if ($bPostBack && $bValidate) {
         // Setup variables
         $sUsername = $Security->CurrentUserName();
         $sFilter = str_replace("%u", ew_AdjustSql($sUsername), EW_USER_NAME_FILTER);
         // Set up filter (Sql Where Clause) and get Return SQL
         // SQL constructor in usuarios class, usuariosinfo.php
         $this->CurrentFilter = $sFilter;
         $sSql = $this->SQL();
         if ($rs = $conn->Execute($sSql)) {
             if (!$rs->EOF) {
                 $rsold = $rs->fields;
                 if (ew_ComparePassword($rsold['contrasenia'], $this->OldPassword)) {
                     $bValidPwd = TRUE;
                     $bValidPwd = $this->User_ChangePassword($rsold, $sUsername, $this->OldPassword, $this->NewPassword);
                     if ($bValidPwd) {
                         $rsnew = array('contrasenia' => $this->NewPassword);
                         // Change Password
                         $sEmail = $rsold['email'];
                         $rs->Close();
                         $conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
                         $bValidPwd = $this->Update($rsnew);
                         $conn->raiseErrorFn = '';
                         if ($bValidPwd) {
                             $bPwdUpdated = TRUE;
                         }
                     } else {
                         $this->setFailureMessage($Language->Phrase("InvalidNewPassword"));
                         $rs->Close();
                     }
                 } else {
                     $this->setFailureMessage($Language->Phrase("InvalidPassword"));
                 }
             } else {
                 $rs->Close();
             }
         }
     }
     if ($bPwdUpdated) {
         if (@$sEmail != "") {
             // Load Email Content
             $Email = new cEmail();
             $Email->Load("phptxt/changepwd.txt");
             $Email->ReplaceSender(EW_SENDER_EMAIL);
             // Replace Sender
             $Email->ReplaceRecipient($sEmail);
             // Replace Recipient
             $Email->ReplaceContent('<!--$Password-->', $this->NewPassword);
             $Email->Charset = EW_EMAIL_CHARSET;
             $Args = array();
             $Args["rs"] =& $rsnew;
             $bEmailSent = FALSE;
             if ($this->Email_Sending($Email, $Args)) {
                 $bEmailSent = $Email->Send();
             }
             // Send email failed
             if (!$bEmailSent) {
                 $this->setFailureMessage($Email->SendErrDescription);
             }
         }
         if ($this->getSuccessMessage() == "") {
             $this->setSuccessMessage($Language->Phrase("PasswordChanged"));
         }
         // Set up success message
         $this->Page_Terminate("index.php");
         // Exit page and clean up
     }
 }
开发者ID:scintes,项目名称:sistemas,代码行数:85,代码来源:changepwd.php

示例9: RenderListRow

 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)) . "";
         }
//.........这里部分代码省略.........
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:101,代码来源:Subscriptions2info.php

示例10: RenderRow

 function RenderRow()
 {
     global $conn, $Security, $Language, $t_promotions_vins;
     // Initialize URLs
     $this->ViewUrl = $t_promotions_vins->ViewUrl();
     $this->EditUrl = $t_promotions_vins->EditUrl();
     $this->InlineEditUrl = $t_promotions_vins->InlineEditUrl();
     $this->CopyUrl = $t_promotions_vins->CopyUrl();
     $this->InlineCopyUrl = $t_promotions_vins->InlineCopyUrl();
     $this->DeleteUrl = $t_promotions_vins->DeleteUrl();
     // Call Row_Rendering event
     $t_promotions_vins->Row_Rendering();
     // Common render codes for all row types
     // promotion
     // produit_vin
     if ($t_promotions_vins->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // promotion
         if (strval($t_promotions_vins->promotion->CurrentValue) != "") {
             $sFilterWrk = "`id` = " . ew_AdjustSql($t_promotions_vins->promotion->CurrentValue) . "";
             $sSqlWrk = "SELECT `titre` FROM `t_promotions`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " AND ";
                 }
                 $sWhereWrk .= "(" . $sFilterWrk . ")";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `titre` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $t_promotions_vins->promotion->ViewValue = $rswrk->fields('titre');
                 $rswrk->Close();
             } else {
                 $t_promotions_vins->promotion->ViewValue = $t_promotions_vins->promotion->CurrentValue;
             }
         } else {
             $t_promotions_vins->promotion->ViewValue = NULL;
         }
         $t_promotions_vins->promotion->ViewCustomAttributes = "";
         // produit_vin
         $t_promotions_vins->produit_vin->ViewValue = $t_promotions_vins->produit_vin->CurrentValue;
         if (strval($t_promotions_vins->produit_vin->CurrentValue) != "") {
             $sFilterWrk = "`id_produit_vin` = " . ew_AdjustSql($t_promotions_vins->produit_vin->CurrentValue) . "";
             $sSqlWrk = "SELECT `label` FROM `v_all_produits_vins`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " AND ";
                 }
                 $sWhereWrk .= "(" . $sFilterWrk . ")";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `label` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $t_promotions_vins->produit_vin->ViewValue = $rswrk->fields('label');
                 $rswrk->Close();
             } else {
                 $t_promotions_vins->produit_vin->ViewValue = $t_promotions_vins->produit_vin->CurrentValue;
             }
         } else {
             $t_promotions_vins->produit_vin->ViewValue = NULL;
         }
         $t_promotions_vins->produit_vin->ViewCustomAttributes = "";
         // promotion
         $t_promotions_vins->promotion->LinkCustomAttributes = "";
         $t_promotions_vins->promotion->HrefValue = "";
         $t_promotions_vins->promotion->TooltipValue = "";
         // produit_vin
         $t_promotions_vins->produit_vin->LinkCustomAttributes = "";
         $t_promotions_vins->produit_vin->HrefValue = "";
         $t_promotions_vins->produit_vin->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($t_promotions_vins->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $t_promotions_vins->Row_Rendered();
     }
 }
开发者ID:Razinsky,项目名称:echaude-com,代码行数:86,代码来源:t_promotions_vinslist.php

示例11: SetUpMasterDetail

 function SetUpMasterDetail()
 {
     global $ItemIngredients;
     $bValidMaster = FALSE;
     // Get the keys for master table
     if (@$_GET[EW_TABLE_SHOW_MASTER] != "") {
         $sMasterTblVar = $_GET[EW_TABLE_SHOW_MASTER];
         if ($sMasterTblVar == "") {
             $bValidMaster = TRUE;
             $this->sDbMasterFilter = "";
             $this->sDbDetailFilter = "";
         }
         if ($sMasterTblVar == "Ingredients") {
             $bValidMaster = TRUE;
             $this->sDbMasterFilter = $ItemIngredients->SqlMasterFilter_Ingredients();
             $this->sDbDetailFilter = $ItemIngredients->SqlDetailFilter_Ingredients();
             if (@$_GET["IngredientID"] != "") {
                 $GLOBALS["Ingredients"]->IngredientID->setQueryStringValue($_GET["IngredientID"]);
                 $ItemIngredients->IngredientID->setQueryStringValue($GLOBALS["Ingredients"]->IngredientID->QueryStringValue);
                 $ItemIngredients->IngredientID->setSessionValue($ItemIngredients->IngredientID->QueryStringValue);
                 if (!is_numeric($GLOBALS["Ingredients"]->IngredientID->QueryStringValue)) {
                     $bValidMaster = FALSE;
                 }
                 $this->sDbMasterFilter = str_replace("@IngredientID@", ew_AdjustSql($GLOBALS["Ingredients"]->IngredientID->QueryStringValue), $this->sDbMasterFilter);
                 $this->sDbDetailFilter = str_replace("@IngredientID@", ew_AdjustSql($GLOBALS["Ingredients"]->IngredientID->QueryStringValue), $this->sDbDetailFilter);
             } else {
                 $bValidMaster = FALSE;
             }
         }
         if ($sMasterTblVar == "Items") {
             $bValidMaster = TRUE;
             $this->sDbMasterFilter = $ItemIngredients->SqlMasterFilter_Items();
             $this->sDbDetailFilter = $ItemIngredients->SqlDetailFilter_Items();
             if (@$_GET["ItemID"] != "") {
                 $GLOBALS["Items"]->ItemID->setQueryStringValue($_GET["ItemID"]);
                 $ItemIngredients->ItemID->setQueryStringValue($GLOBALS["Items"]->ItemID->QueryStringValue);
                 $ItemIngredients->ItemID->setSessionValue($ItemIngredients->ItemID->QueryStringValue);
                 if (!is_numeric($GLOBALS["Items"]->ItemID->QueryStringValue)) {
                     $bValidMaster = FALSE;
                 }
                 $this->sDbMasterFilter = str_replace("@ItemID@", ew_AdjustSql($GLOBALS["Items"]->ItemID->QueryStringValue), $this->sDbMasterFilter);
                 $this->sDbDetailFilter = str_replace("@ItemID@", ew_AdjustSql($GLOBALS["Items"]->ItemID->QueryStringValue), $this->sDbDetailFilter);
             } else {
                 $bValidMaster = FALSE;
             }
         }
     }
     if ($bValidMaster) {
         // Save current master table
         $ItemIngredients->setCurrentMasterTable($sMasterTblVar);
         // Reset start record counter (new master key)
         $this->lStartRec = 1;
         $ItemIngredients->setStartRecordNumber($this->lStartRec);
         $ItemIngredients->setMasterFilter($this->sDbMasterFilter);
         // Set up master filter
         $ItemIngredients->setDetailFilter($this->sDbDetailFilter);
         // Set up detail filter
         // Clear previous master session values
         if ($sMasterTblVar != "Ingredients") {
             if ($ItemIngredients->IngredientID->QueryStringValue == "") {
                 $ItemIngredients->IngredientID->setSessionValue("");
             }
         }
         if ($sMasterTblVar != "Items") {
             if ($ItemIngredients->ItemID->QueryStringValue == "") {
                 $ItemIngredients->ItemID->setSessionValue("");
             }
         }
     } else {
         $this->sDbMasterFilter = $ItemIngredients->getMasterFilter();
         //  Restore master filter
         $this->sDbDetailFilter = $ItemIngredients->getDetailFilter();
         // Restore detail filter
     }
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:75,代码来源:ItemIngredientslist.php

示例12: ew_AdjustSql

 }
 if ($Delivery_Report_1_report->sFilter != "") {
     $Delivery_Report_1_report->sFilter .= " AND ";
 }
 if (is_null(ew_UnFormatDateTime(ew_FormatDateTime($Delivery_Report_1->DeliveryDate->CurrentValue, 6), 6))) {
     $Delivery_Report_1_report->sFilter .= "(`DeliveryDate` IS NULL)";
 } else {
     $Delivery_Report_1_report->sFilter .= "(`DeliveryDate` = '" . ew_AdjustSql(ew_UnFormatDateTime(ew_FormatDateTime($Delivery_Report_1->DeliveryDate->CurrentValue, 6), 6)) . "')";
 }
 if ($Delivery_Report_1_report->sFilter != "") {
     $Delivery_Report_1_report->sFilter .= " AND ";
 }
 if (is_null($Delivery_Report_1->Delivery_Window->CurrentValue)) {
     $Delivery_Report_1_report->sFilter .= "(`Delivery_Window` IS NULL)";
 } else {
     $Delivery_Report_1_report->sFilter .= "(`Delivery_Window` = '" . ew_AdjustSql($Delivery_Report_1->Delivery_Window->CurrentValue) . "')";
 }
 if ($Delivery_Report_1_report->sDbDetailFilter != "") {
     if ($Delivery_Report_1_report->sFilter != "") {
         $Delivery_Report_1_report->sFilter .= " AND ";
     }
     $Delivery_Report_1_report->sFilter .= "(" . $Delivery_Report_1_report->sDbDetailFilter . ")";
 }
 // Set up detail SQL
 $Delivery_Report_1->CurrentFilter = $Delivery_Report_1_report->sFilter;
 $Delivery_Report_1_report->sSql = $Delivery_Report_1->DetailSQL();
 // Load detail records
 $rsdtl = $conn->Execute($Delivery_Report_1_report->sSql);
 $Delivery_Report_1_report->nDtlRecs = $rsdtl->RecordCount();
 // Initialize Aggregate
 if (!$rsdtl->EOF) {
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:31,代码来源:Delivery_Report_1report.php

示例13: RenderListRow

 function RenderListRow()
 {
     global $conn, $Security;
     // Call Row Rendering event
     $this->Row_Rendering();
     // Common render codes
     // id_profile
     $this->id_profile->CellCssStyle = "white-space: nowrap;";
     $this->id_profile->CellCssClass = "";
     $this->id_profile->CellAttrs = array();
     $this->id_profile->ViewAttrs = array();
     $this->id_profile->EditAttrs = array();
     // stat_date
     $this->stat_date->CellCssStyle = "";
     $this->stat_date->CellCssClass = "";
     $this->stat_date->CellAttrs = array();
     $this->stat_date->ViewAttrs = array();
     $this->stat_date->EditAttrs = array();
     // year
     $this->year->CellCssStyle = "";
     $this->year->CellCssClass = "";
     $this->year->CellAttrs = array();
     $this->year->ViewAttrs = array();
     $this->year->EditAttrs = array();
     // month
     $this->month->CellCssStyle = "";
     $this->month->CellCssClass = "";
     $this->month->CellAttrs = array();
     $this->month->ViewAttrs = array();
     $this->month->EditAttrs = array();
     // week
     $this->week->CellCssStyle = "";
     $this->week->CellCssClass = "";
     $this->week->CellAttrs = array();
     $this->week->ViewAttrs = array();
     $this->week->EditAttrs = array();
     // alexa_rank
     $this->alexa_rank->CellCssStyle = "";
     $this->alexa_rank->CellCssClass = "";
     $this->alexa_rank->CellAttrs = array();
     $this->alexa_rank->ViewAttrs = array();
     $this->alexa_rank->EditAttrs = array();
     // google_pagerank
     $this->google_pagerank->CellCssStyle = "";
     $this->google_pagerank->CellCssClass = "";
     $this->google_pagerank->CellAttrs = array();
     $this->google_pagerank->ViewAttrs = array();
     $this->google_pagerank->EditAttrs = array();
     // id_profile
     if (strval($this->id_profile->CurrentValue) != "") {
         $sFilterWrk = "`id` = " . ew_AdjustSql($this->id_profile->CurrentValue) . "";
         $sSqlWrk = "SELECT DISTINCT `name` FROM `tbl_profile`";
         $sWhereWrk = "";
         if ($sWhereWrk != "") {
             $sWhereWrk .= " AND ";
         }
         $sWhereWrk .= "(" . "is_active = '1'" . ")";
         if ($sFilterWrk != "") {
             if ($sWhereWrk != "") {
                 $sWhereWrk .= " AND ";
             }
             $sWhereWrk .= "(" . $sFilterWrk . ")";
         }
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `name` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup values found
             $this->id_profile->ViewValue = $rswrk->fields('name');
             $rswrk->Close();
         } else {
             $this->id_profile->ViewValue = $this->id_profile->CurrentValue;
         }
     } else {
         $this->id_profile->ViewValue = NULL;
     }
     $this->id_profile->CssStyle = "";
     $this->id_profile->CssClass = "";
     $this->id_profile->ViewCustomAttributes = "";
     // stat_date
     $this->stat_date->ViewValue = $this->stat_date->CurrentValue;
     $this->stat_date->ViewValue = ew_FormatDateTime($this->stat_date->ViewValue, 5);
     $this->stat_date->CssStyle = "";
     $this->stat_date->CssClass = "";
     $this->stat_date->ViewCustomAttributes = "";
     // year
     $this->year->ViewValue = $this->year->CurrentValue;
     $this->year->CssStyle = "";
     $this->year->CssClass = "";
     $this->year->ViewCustomAttributes = "";
     // month
     $this->month->ViewValue = $this->month->CurrentValue;
     $this->month->CssStyle = "";
     $this->month->CssClass = "";
     $this->month->ViewCustomAttributes = "";
     // week
     $this->week->ViewValue = $this->week->CurrentValue;
     $this->week->CssStyle = "";
//.........这里部分代码省略.........
开发者ID:jliman,项目名称:SEOStat,代码行数:101,代码来源:tbl_rank_statinfo.php

示例14: RenderRow

 function RenderRow()
 {
     global $conn, $Security, $Language, $tbl_ga_stat;
     // Initialize URLs
     // Call Row_Rendering event
     $tbl_ga_stat->Row_Rendering();
     // Common render codes for all row types
     // id_profile
     $tbl_ga_stat->id_profile->CellCssStyle = "white-space: nowrap;";
     $tbl_ga_stat->id_profile->CellCssClass = "";
     $tbl_ga_stat->id_profile->CellAttrs = array();
     $tbl_ga_stat->id_profile->ViewAttrs = array();
     $tbl_ga_stat->id_profile->EditAttrs = array();
     // stat_date
     $tbl_ga_stat->stat_date->CellCssStyle = "";
     $tbl_ga_stat->stat_date->CellCssClass = "";
     $tbl_ga_stat->stat_date->CellAttrs = array();
     $tbl_ga_stat->stat_date->ViewAttrs = array();
     $tbl_ga_stat->stat_date->EditAttrs = array();
     // year
     $tbl_ga_stat->year->CellCssStyle = "";
     $tbl_ga_stat->year->CellCssClass = "";
     $tbl_ga_stat->year->CellAttrs = array();
     $tbl_ga_stat->year->ViewAttrs = array();
     $tbl_ga_stat->year->EditAttrs = array();
     // month
     $tbl_ga_stat->month->CellCssStyle = "";
     $tbl_ga_stat->month->CellCssClass = "";
     $tbl_ga_stat->month->CellAttrs = array();
     $tbl_ga_stat->month->ViewAttrs = array();
     $tbl_ga_stat->month->EditAttrs = array();
     // week
     $tbl_ga_stat->week->CellCssStyle = "";
     $tbl_ga_stat->week->CellCssClass = "";
     $tbl_ga_stat->week->CellAttrs = array();
     $tbl_ga_stat->week->ViewAttrs = array();
     $tbl_ga_stat->week->EditAttrs = array();
     // day
     $tbl_ga_stat->day->CellCssStyle = "";
     $tbl_ga_stat->day->CellCssClass = "";
     $tbl_ga_stat->day->CellAttrs = array();
     $tbl_ga_stat->day->ViewAttrs = array();
     $tbl_ga_stat->day->EditAttrs = array();
     // hour
     $tbl_ga_stat->hour->CellCssStyle = "";
     $tbl_ga_stat->hour->CellCssClass = "";
     $tbl_ga_stat->hour->CellAttrs = array();
     $tbl_ga_stat->hour->ViewAttrs = array();
     $tbl_ga_stat->hour->EditAttrs = array();
     // pageview
     $tbl_ga_stat->pageview->CellCssStyle = "";
     $tbl_ga_stat->pageview->CellCssClass = "";
     $tbl_ga_stat->pageview->CellAttrs = array();
     $tbl_ga_stat->pageview->ViewAttrs = array();
     $tbl_ga_stat->pageview->EditAttrs = array();
     // visit
     $tbl_ga_stat->visit->CellCssStyle = "";
     $tbl_ga_stat->visit->CellCssClass = "";
     $tbl_ga_stat->visit->CellAttrs = array();
     $tbl_ga_stat->visit->ViewAttrs = array();
     $tbl_ga_stat->visit->EditAttrs = array();
     if ($tbl_ga_stat->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id_profile
         if (strval($tbl_ga_stat->id_profile->CurrentValue) != "") {
             $sFilterWrk = "`id` = " . ew_AdjustSql($tbl_ga_stat->id_profile->CurrentValue) . "";
             $sSqlWrk = "SELECT DISTINCT `name` FROM `tbl_profile`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " AND ";
                 }
                 $sWhereWrk .= "(" . $sFilterWrk . ")";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `name` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $tbl_ga_stat->id_profile->ViewValue = $rswrk->fields('name');
                 $rswrk->Close();
             } else {
                 $tbl_ga_stat->id_profile->ViewValue = $tbl_ga_stat->id_profile->CurrentValue;
             }
         } else {
             $tbl_ga_stat->id_profile->ViewValue = NULL;
         }
         $tbl_ga_stat->id_profile->CssStyle = "";
         $tbl_ga_stat->id_profile->CssClass = "";
         $tbl_ga_stat->id_profile->ViewCustomAttributes = "";
         // stat_date
         $tbl_ga_stat->stat_date->ViewValue = $tbl_ga_stat->stat_date->CurrentValue;
         $tbl_ga_stat->stat_date->ViewValue = ew_FormatDateTime($tbl_ga_stat->stat_date->ViewValue, 5);
         $tbl_ga_stat->stat_date->CssStyle = "";
         $tbl_ga_stat->stat_date->CssClass = "";
         $tbl_ga_stat->stat_date->ViewCustomAttributes = "";
         // year
         $tbl_ga_stat->year->ViewValue = $tbl_ga_stat->year->CurrentValue;
//.........这里部分代码省略.........
开发者ID:jliman,项目名称:SEOStat,代码行数:101,代码来源:tbl_ga_statdelete.php

示例15: EditRow

 function EditRow()
 {
     global $conn;
     for ($i = 0; $i < $this->TableNameCount; $i++) {
         $Sql = "SELECT * FROM " . EW_USER_LEVEL_PRIV_TABLE . " WHERE " . EW_USER_LEVEL_PRIV_TABLE_NAME_FIELD . " = '" . ew_AdjustSql($this->TableList[$i][4] . $this->TableList[$i][0]) . "' AND " . EW_USER_LEVEL_PRIV_USER_LEVEL_ID_FIELD . " = " . $this->codigo->CurrentValue;
         $rs = $conn->Execute($Sql);
         if ($rs && !$rs->EOF) {
             $Sql = "UPDATE " . EW_USER_LEVEL_PRIV_TABLE . " SET " . EW_USER_LEVEL_PRIV_PRIV_FIELD . " = " . $this->Privileges[$i] . " WHERE " . EW_USER_LEVEL_PRIV_TABLE_NAME_FIELD . " = '" . ew_AdjustSql($this->TableList[$i][4] . $this->TableList[$i][0]) . "' AND " . EW_USER_LEVEL_PRIV_USER_LEVEL_ID_FIELD . " = " . $this->codigo->CurrentValue;
             $conn->Execute($Sql);
         } else {
             $Sql = "INSERT INTO " . EW_USER_LEVEL_PRIV_TABLE . " (" . EW_USER_LEVEL_PRIV_TABLE_NAME_FIELD . ", " . EW_USER_LEVEL_PRIV_USER_LEVEL_ID_FIELD . ", " . EW_USER_LEVEL_PRIV_PRIV_FIELD . ") VALUES ('" . ew_AdjustSql($this->TableList[$i][4] . $this->TableList[$i][0]) . "', " . $this->codigo->CurrentValue . ", " . $this->Privileges[$i] . ")";
             $conn->Execute($Sql);
         }
         if ($rs) {
             $rs->Close();
         }
     }
     return TRUE;
 }
开发者ID:scintes,项目名称:sistemas,代码行数:19,代码来源:userpriv.php


注:本文中的ew_AdjustSql函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。