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


PHP Conn函数代码示例

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


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

示例1: pegaItens

function pegaItens($id)
{
    $Conexao = Conn();
    $sql = "Select m.* from menu m, acessousu a \n             where m.codpaimenu = {$id} and\n                   m.codmenu = a.codmenu and a.codusuario = " . $_SESSION['codusuarioadm'] . " order by m.desmenu asc";
    $rs = mysql_query($sql, $Conexao) or die(mysql_error());
    $menu = "";
    while ($a = mysql_fetch_array($rs)) {
        if ($a['desmenu'] != "") {
            $menu .= 'menu_' . $id . '.addMenuItem("' . $a['desmenu'] . '","location=\'' . $a['desurl'] . '\'");' . chr(10);
        }
    }
    return array($menu);
    //return $menu.chr(10);
}
开发者ID:tvieira,项目名称:homebank,代码行数:14,代码来源:menupopup.php

示例2: RenderRow

 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
     // cat_id
     // rid
     // cat_name
     // cat_desc
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // cat_id
         $this->cat_id->ViewValue = $this->cat_id->CurrentValue;
         $this->cat_id->ViewCustomAttributes = "";
         // rid
         if (strval($this->rid->CurrentValue) != "") {
             $sFilterWrk = "`rid`" . ew_SearchString("=", $this->rid->CurrentValue, EW_DATATYPE_NUMBER, "");
             $sSqlWrk = "SELECT `rid`, `r_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `restaurants`";
             $sWhereWrk = "";
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->rid, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->rid->ViewValue = $this->rid->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->rid->ViewValue = $this->rid->CurrentValue;
             }
         } else {
             $this->rid->ViewValue = NULL;
         }
         $this->rid->ViewCustomAttributes = "";
         // cat_name
         $this->cat_name->ViewValue = $this->cat_name->CurrentValue;
         $this->cat_name->ViewCustomAttributes = "";
         // rid
         $this->rid->LinkCustomAttributes = "";
         $this->rid->HrefValue = "";
         $this->rid->TooltipValue = "";
         // cat_name
         $this->cat_name->LinkCustomAttributes = "";
         $this->cat_name->HrefValue = "";
         $this->cat_name->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // rid
         $this->rid->EditAttrs["class"] = "form-control";
         $this->rid->EditCustomAttributes = "";
         if ($this->rid->getSessionValue() != "") {
             $this->rid->CurrentValue = $this->rid->getSessionValue();
             $this->rid->OldValue = $this->rid->CurrentValue;
             if (strval($this->rid->CurrentValue) != "") {
                 $sFilterWrk = "`rid`" . ew_SearchString("=", $this->rid->CurrentValue, EW_DATATYPE_NUMBER, "");
                 $sSqlWrk = "SELECT `rid`, `r_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `restaurants`";
                 $sWhereWrk = "";
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
                 $this->Lookup_Selecting($this->rid, $sWhereWrk);
                 // Call Lookup selecting
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = Conn()->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $arwrk = array();
                     $arwrk[1] = $rswrk->fields('DispFld');
                     $this->rid->ViewValue = $this->rid->DisplayValue($arwrk);
                     $rswrk->Close();
                 } else {
                     $this->rid->ViewValue = $this->rid->CurrentValue;
                 }
             } else {
                 $this->rid->ViewValue = NULL;
             }
             $this->rid->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->rid->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`rid`" . ew_SearchString("=", $this->rid->CurrentValue, EW_DATATYPE_NUMBER, "");
             }
             $sSqlWrk = "SELECT `rid`, `r_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `restaurants`";
             $sWhereWrk = "";
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->rid, $sWhereWrk);
//.........这里部分代码省略.........
开发者ID:ahmarmahmood,项目名称:tabedaar,代码行数:101,代码来源:categorieslist.php

示例3: RenderRow

 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
     // scat_id
     // category_id
     // scat_name
     // scat_description
     // scat_picture
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // scat_id
         $this->scat_id->ViewValue = $this->scat_id->CurrentValue;
         $this->scat_id->ViewCustomAttributes = "";
         // category_id
         if (strval($this->category_id->CurrentValue) != "") {
             $sFilterWrk = "`category_id`" . ew_SearchString("=", $this->category_id->CurrentValue, EW_DATATYPE_NUMBER, "");
             $sSqlWrk = "SELECT `category_id`, `category_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `category`";
             $sWhereWrk = "";
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->category_id, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->category_id->ViewValue = $this->category_id->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->category_id->ViewValue = $this->category_id->CurrentValue;
             }
         } else {
             $this->category_id->ViewValue = NULL;
         }
         $this->category_id->ViewCustomAttributes = "";
         // scat_name
         $this->scat_name->ViewValue = $this->scat_name->CurrentValue;
         $this->scat_name->ViewCustomAttributes = "";
         // scat_description
         $this->scat_description->ViewValue = $this->scat_description->CurrentValue;
         $this->scat_description->ViewCustomAttributes = "";
         // scat_picture
         if (!ew_Empty($this->scat_picture->Upload->DbValue)) {
             $this->scat_picture->ViewValue = $this->scat_picture->Upload->DbValue;
         } else {
             $this->scat_picture->ViewValue = "";
         }
         $this->scat_picture->ViewCustomAttributes = "";
         // scat_id
         $this->scat_id->LinkCustomAttributes = "";
         $this->scat_id->HrefValue = "";
         $this->scat_id->TooltipValue = "";
         // category_id
         $this->category_id->LinkCustomAttributes = "";
         $this->category_id->HrefValue = "";
         $this->category_id->TooltipValue = "";
         // scat_name
         $this->scat_name->LinkCustomAttributes = "";
         $this->scat_name->HrefValue = "";
         $this->scat_name->TooltipValue = "";
         // scat_description
         $this->scat_description->LinkCustomAttributes = "";
         $this->scat_description->HrefValue = "";
         $this->scat_description->TooltipValue = "";
         // scat_picture
         $this->scat_picture->LinkCustomAttributes = "";
         $this->scat_picture->HrefValue = "";
         $this->scat_picture->HrefValue2 = $this->scat_picture->UploadPath . $this->scat_picture->Upload->DbValue;
         $this->scat_picture->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
开发者ID:NaurozAhmad,项目名称:G-Axis,代码行数:88,代码来源:sub_categoryview.php

示例4: RenderRow

 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->ACCOUNT_NUMBER->FormValue == $this->ACCOUNT_NUMBER->CurrentValue && is_numeric(ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue))) {
         $this->ACCOUNT_NUMBER->CurrentValue = ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // BANK_ACCOUNT_ID
     // CODE
     // DESCRIPTION
     // ACCOUNT_NUMBER
     // BANK_ID
     // ACTIVE
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->ViewValue = $this->ACCOUNT_NUMBER->CurrentValue;
         $this->ACCOUNT_NUMBER->ViewCustomAttributes = "";
         // BANK_ID
         if (strval($this->BANK_ID->CurrentValue) != "") {
             $sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
             switch (@$gsLanguage) {
                 case "es":
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
                 default:
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
             }
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->BANK_ID, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->BANK_ID->ViewValue = $this->BANK_ID->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->BANK_ID->ViewValue = $this->BANK_ID->CurrentValue;
             }
         } else {
             $this->BANK_ID->ViewValue = NULL;
         }
         $this->BANK_ID->ViewCustomAttributes = "";
         // ACTIVE
         if (strval($this->ACTIVE->CurrentValue) != "") {
             $this->ACTIVE->ViewValue = $this->ACTIVE->OptionCaption($this->ACTIVE->CurrentValue);
         } 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 = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->LinkCustomAttributes = "";
         $this->ACCOUNT_NUMBER->HrefValue = "";
         $this->ACCOUNT_NUMBER->TooltipValue = "";
         // BANK_ID
         $this->BANK_ID->LinkCustomAttributes = "";
         $this->BANK_ID->HrefValue = "";
         $this->BANK_ID->TooltipValue = "";
         // ACTIVE
         $this->ACTIVE->LinkCustomAttributes = "";
         $this->ACTIVE->HrefValue = "";
         $this->ACTIVE->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit 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());
//.........这里部分代码省略.........
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:101,代码来源:bank_accountedit.php

示例5: __construct

 function __construct()
 {
     global $conn, $Language;
     global $UserTable, $UserTableConn;
     $GLOBALS["Page"] =& $this;
     $this->TokenTimeout = ew_SessionTimeoutTime();
     // Language object
     if (!isset($Language)) {
         $Language = new cLanguage();
     }
     // Parent constuctor
     parent::__construct();
     // Table object (airplane)
     if (!isset($GLOBALS["airplane"]) || get_class($GLOBALS["airplane"]) == "cairplane") {
         $GLOBALS["airplane"] =& $this;
         $GLOBALS["Table"] =& $GLOBALS["airplane"];
     }
     $KeyUrl = "";
     if (@$_GET["AIRPLANE_ID"] != "") {
         $this->RecKey["AIRPLANE_ID"] = $_GET["AIRPLANE_ID"];
         $KeyUrl .= "&AIRPLANE_ID=" . urlencode($this->RecKey["AIRPLANE_ID"]);
     }
     $this->ExportPrintUrl = $this->PageUrl() . "export=print" . $KeyUrl;
     $this->ExportHtmlUrl = $this->PageUrl() . "export=html" . $KeyUrl;
     $this->ExportExcelUrl = $this->PageUrl() . "export=excel" . $KeyUrl;
     $this->ExportWordUrl = $this->PageUrl() . "export=word" . $KeyUrl;
     $this->ExportXmlUrl = $this->PageUrl() . "export=xml" . $KeyUrl;
     $this->ExportCsvUrl = $this->PageUrl() . "export=csv" . $KeyUrl;
     $this->ExportPdfUrl = $this->PageUrl() . "export=pdf" . $KeyUrl;
     // Table object (user)
     if (!isset($GLOBALS['user'])) {
         $GLOBALS['user'] = new cuser();
     }
     // Page ID
     if (!defined("EW_PAGE_ID")) {
         define("EW_PAGE_ID", 'view', TRUE);
     }
     // Table name (for backward compatibility)
     if (!defined("EW_TABLE_NAME")) {
         define("EW_TABLE_NAME", 'airplane', TRUE);
     }
     // Start timer
     if (!isset($GLOBALS["gTimer"])) {
         $GLOBALS["gTimer"] = new cTimer();
     }
     // Open connection
     if (!isset($conn)) {
         $conn = ew_Connect($this->DBID);
     }
     // User table object (user)
     if (!isset($UserTable)) {
         $UserTable = new cuser();
         $UserTableConn = Conn($UserTable->DBID);
     }
     // Export options
     $this->ExportOptions = new cListOptions();
     $this->ExportOptions->Tag = "div";
     $this->ExportOptions->TagClassName = "ewExportOption";
     // Other options
     $this->OtherOptions['action'] = new cListOptions();
     $this->OtherOptions['action']->Tag = "div";
     $this->OtherOptions['action']->TagClassName = "ewActionOption";
     $this->OtherOptions['detail'] = new cListOptions();
     $this->OtherOptions['detail']->Tag = "div";
     $this->OtherOptions['detail']->TagClassName = "ewDetailOption";
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:66,代码来源:airplaneview.php

示例6: RenderRow

 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();
     // Convert decimal values if posted back
     if ($this->ACCOUNT_NUMBER->FormValue == $this->ACCOUNT_NUMBER->CurrentValue && is_numeric(ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue))) {
         $this->ACCOUNT_NUMBER->CurrentValue = ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // BANK_ACCOUNT_ID
     // CODE
     // DESCRIPTION
     // ACCOUNT_NUMBER
     // BANK_ID
     // ACTIVE
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->ViewValue = $this->ACCOUNT_NUMBER->CurrentValue;
         $this->ACCOUNT_NUMBER->ViewCustomAttributes = "";
         // BANK_ID
         if (strval($this->BANK_ID->CurrentValue) != "") {
             $sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
             switch (@$gsLanguage) {
                 case "es":
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
                 default:
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
             }
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->BANK_ID, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->BANK_ID->ViewValue = $this->BANK_ID->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->BANK_ID->ViewValue = $this->BANK_ID->CurrentValue;
             }
         } else {
             $this->BANK_ID->ViewValue = NULL;
         }
         $this->BANK_ID->ViewCustomAttributes = "";
         // ACTIVE
         if (strval($this->ACTIVE->CurrentValue) != "") {
             $this->ACTIVE->ViewValue = $this->ACTIVE->OptionCaption($this->ACTIVE->CurrentValue);
         } 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 = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->LinkCustomAttributes = "";
         $this->ACCOUNT_NUMBER->HrefValue = "";
         $this->ACCOUNT_NUMBER->TooltipValue = "";
         // BANK_ID
         $this->BANK_ID->LinkCustomAttributes = "";
         $this->BANK_ID->HrefValue = "";
         $this->BANK_ID->TooltipValue = "";
         // ACTIVE
         $this->ACTIVE->LinkCustomAttributes = "";
         $this->ACTIVE->HrefValue = "";
         $this->ACTIVE->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:100,代码来源:bank_accountview.php

示例7: __construct

 function __construct()
 {
     global $conn, $Language;
     global $UserTable, $UserTableConn;
     $GLOBALS["Page"] =& $this;
     $this->TokenTimeout = ew_SessionTimeoutTime();
     // Language object
     if (!isset($Language)) {
         $Language = new cLanguage();
     }
     // Page ID
     if (!defined("EW_PAGE_ID")) {
         define("EW_PAGE_ID", 'custom', TRUE);
     }
     // Table name (for backward compatibility)
     if (!defined("EW_TABLE_NAME")) {
         define("EW_TABLE_NAME", 'PrincipalDestinations.php', TRUE);
     }
     // Start timer
     if (!isset($GLOBALS["gTimer"])) {
         $GLOBALS["gTimer"] = new cTimer();
     }
     // Open connection
     if (!isset($conn)) {
         $conn = ew_Connect();
     }
     // User table object (user)
     if (!isset($UserTable)) {
         $UserTable = new cuser();
         $UserTableConn = Conn($UserTable->DBID);
     }
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:32,代码来源:PrincipalDestinations.php

示例8: RenderListRow

 function RenderListRow()
 {
     global $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // Common render codes
     // USER_ID
     $this->USER_ID->CellCssStyle = "white-space: nowrap;";
     // CODE
     $this->CODE->CellCssStyle = "white-space: nowrap;";
     // PASS
     $this->PASS->CellCssStyle = "white-space: nowrap;";
     // FIRSTNAME
     // SECONDNAME
     // LASTNAME
     // SURNAME
     // MAIL
     // USER_ACT
     $this->USER_ACT->CellCssStyle = "white-space: nowrap;";
     // USER_LEVEL_ID
     $this->USER_LEVEL_ID->CellCssStyle = "white-space: nowrap;";
     // USER_ID
     $this->USER_ID->ViewValue = $this->USER_ID->CurrentValue;
     $this->USER_ID->ViewCustomAttributes = "";
     // CODE
     $this->CODE->ViewValue = $this->CODE->CurrentValue;
     $this->CODE->ViewCustomAttributes = "";
     // PASS
     $this->PASS->ViewValue = $this->PASS->CurrentValue;
     $this->PASS->ViewCustomAttributes = "";
     // FIRSTNAME
     $this->FIRSTNAME->ViewValue = $this->FIRSTNAME->CurrentValue;
     $this->FIRSTNAME->ViewCustomAttributes = "";
     // SECONDNAME
     $this->SECONDNAME->ViewValue = $this->SECONDNAME->CurrentValue;
     $this->SECONDNAME->ViewCustomAttributes = "";
     // LASTNAME
     $this->LASTNAME->ViewValue = $this->LASTNAME->CurrentValue;
     $this->LASTNAME->ViewCustomAttributes = "";
     // SURNAME
     $this->SURNAME->ViewValue = $this->SURNAME->CurrentValue;
     $this->SURNAME->ViewCustomAttributes = "";
     // MAIL
     $this->MAIL->ViewValue = $this->MAIL->CurrentValue;
     $this->MAIL->ViewCustomAttributes = "";
     // USER_ACT
     $this->USER_ACT->ViewValue = $this->USER_ACT->CurrentValue;
     $this->USER_ACT->ViewCustomAttributes = "";
     // USER_LEVEL_ID
     if ($Security->CanAdmin()) {
         // System admin
         if (strval($this->USER_LEVEL_ID->CurrentValue) != "") {
             $sFilterWrk = "`USER_LEVEL_ID`" . ew_SearchString("=", $this->USER_LEVEL_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
             switch (@$gsLanguage) {
                 case "es":
                     $sSqlWrk = "SELECT `USER_LEVEL_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `user_levels`";
                     $sWhereWrk = "";
                     break;
                 default:
                     $sSqlWrk = "SELECT `USER_LEVEL_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `user_levels`";
                     $sWhereWrk = "";
                     break;
             }
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->USER_LEVEL_ID, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->USER_LEVEL_ID->ViewValue = $this->USER_LEVEL_ID->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->USER_LEVEL_ID->ViewValue = $this->USER_LEVEL_ID->CurrentValue;
             }
         } else {
             $this->USER_LEVEL_ID->ViewValue = NULL;
         }
     } else {
         $this->USER_LEVEL_ID->ViewValue = $Language->Phrase("PasswordMask");
     }
     $this->USER_LEVEL_ID->ViewCustomAttributes = "";
     // USER_ID
     $this->USER_ID->LinkCustomAttributes = "";
     $this->USER_ID->HrefValue = "";
     $this->USER_ID->TooltipValue = "";
     // CODE
     $this->CODE->LinkCustomAttributes = "";
     $this->CODE->HrefValue = "";
     $this->CODE->TooltipValue = "";
     // PASS
     $this->PASS->LinkCustomAttributes = "";
     $this->PASS->HrefValue = "";
     $this->PASS->TooltipValue = "";
     // FIRSTNAME
     $this->FIRSTNAME->LinkCustomAttributes = "";
//.........这里部分代码省略.........
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:101,代码来源:userinfo.php

示例9: RenderRow

 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // vl_media_id
     // vl_media_type
     // vl_media_name
     // vl_media_file
     // vl_media_file_custom
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // vl_media_id
         $this->vl_media_id->ViewValue = $this->vl_media_id->CurrentValue;
         $this->vl_media_id->ViewCustomAttributes = "";
         // vl_media_type
         if (strval($this->vl_media_type->CurrentValue) != "") {
             $sFilterWrk = "`vl_media_type_id`" . ew_SearchString("=", $this->vl_media_type->CurrentValue, EW_DATATYPE_NUMBER, "");
             $sSqlWrk = "SELECT `vl_media_type_id`, `vl_media_type_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `vl_media_type_list`";
             $sWhereWrk = "";
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->vl_media_type, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `vl_media_type_name` ASC";
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->vl_media_type->ViewValue = $this->vl_media_type->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->vl_media_type->ViewValue = $this->vl_media_type->CurrentValue;
             }
         } else {
             $this->vl_media_type->ViewValue = NULL;
         }
         $this->vl_media_type->ViewCustomAttributes = "";
         // vl_media_name
         $this->vl_media_name->ViewValue = $this->vl_media_name->CurrentValue;
         $this->vl_media_name->ViewCustomAttributes = "";
         // vl_media_file
         if (!ew_Empty($this->vl_media_file->Upload->DbValue)) {
             $this->vl_media_file->ImageWidth = 200;
             $this->vl_media_file->ImageHeight = 200;
             $this->vl_media_file->ImageAlt = $this->vl_media_file->FldAlt();
             $this->vl_media_file->ViewValue = $this->vl_media_file->Upload->DbValue;
         } else {
             $this->vl_media_file->ViewValue = "";
         }
         $this->vl_media_file->ViewCustomAttributes = "";
         // vl_media_file_custom
         $this->vl_media_file_custom->UploadPath = "uploads_custom/";
         if (!ew_Empty($this->vl_media_file_custom->Upload->DbValue)) {
             $this->vl_media_file_custom->ImageWidth = 200;
             $this->vl_media_file_custom->ImageHeight = 200;
             $this->vl_media_file_custom->ImageAlt = $this->vl_media_file_custom->FldAlt();
             $this->vl_media_file_custom->ViewValue = $this->vl_media_file_custom->Upload->DbValue;
         } else {
             $this->vl_media_file_custom->ViewValue = "";
         }
         $this->vl_media_file_custom->ViewCustomAttributes = "";
         // vl_media_id
         $this->vl_media_id->LinkCustomAttributes = "";
         $this->vl_media_id->HrefValue = "";
         $this->vl_media_id->TooltipValue = "";
         // vl_media_type
         $this->vl_media_type->LinkCustomAttributes = "";
         $this->vl_media_type->HrefValue = "";
         $this->vl_media_type->TooltipValue = "";
         // vl_media_name
         $this->vl_media_name->LinkCustomAttributes = "";
         $this->vl_media_name->HrefValue = "";
         $this->vl_media_name->TooltipValue = "";
         // vl_media_file
         $this->vl_media_file->LinkCustomAttributes = "";
         if (!ew_Empty($this->vl_media_file->Upload->DbValue)) {
             $this->vl_media_file->HrefValue = ew_GetFileUploadUrl($this->vl_media_file, $this->vl_media_file->Upload->DbValue);
             // Add prefix/suffix
             $this->vl_media_file->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->vl_media_file->HrefValue = ew_ConvertFullUrl($this->vl_media_file->HrefValue);
             }
         } else {
             $this->vl_media_file->HrefValue = "";
         }
         $this->vl_media_file->HrefValue2 = $this->vl_media_file->UploadPath . $this->vl_media_file->Upload->DbValue;
         $this->vl_media_file->TooltipValue = "";
         if ($this->vl_media_file->UseColorbox) {
             if (ew_Empty($this->vl_media_file->TooltipValue)) {
                 $this->vl_media_file->LinkAttrs["title"] = $Language->Phrase("ViewImageGallery");
             }
             $this->vl_media_file->LinkAttrs["data-rel"] = "vl_media_list_x_vl_media_file";
             ew_AppendClass($this->vl_media_file->LinkAttrs["class"], "ewLightbox");
//.........这里部分代码省略.........
开发者ID:cahilbey,项目名称:VL-AWS-Test,代码行数:101,代码来源:vl_media_listdelete.php

示例10: GetLookupValues

 function GetLookupValues($sql, $dbid)
 {
     $rsarr = array();
     $rowcnt = 0;
     if ($rs = Conn($dbid)->Execute($sql)) {
         $rowcnt = $rs->RecordCount();
         $fldcnt = $rs->FieldCount();
         $rsarr = $rs->GetRows();
         $rs->Close();
     }
     // Clean output buffer
     if (ob_get_length()) {
         ob_clean();
     }
     // Format date
     $ardt = array();
     for ($j = 0; $j < $fldcnt; $j++) {
         $ardt[$j] = @$_POST["df" . $j];
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if ($ardt[$j] != "" && intval($ardt[$j]) > 0) {
                     // Format date
                     $str = ew_FormatDateTime($str, $ardt[$j]);
                 }
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n", "\t"), array("\\r", "\\n", "\\t"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n", "\t"), array(" ", " ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
     }
     echo ew_ArrayToJson($rsarr);
 }
开发者ID:NoSympathy,项目名称:Dashboard,代码行数:40,代码来源:ewlookup12.php

示例11: RenderEditRow

 function RenderEditRow()
 {
     global $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // cat_id
     $this->cat_id->EditAttrs["class"] = "form-control";
     $this->cat_id->EditCustomAttributes = "";
     $this->cat_id->EditValue = $this->cat_id->CurrentValue;
     $this->cat_id->ViewCustomAttributes = "";
     // rid
     $this->rid->EditAttrs["class"] = "form-control";
     $this->rid->EditCustomAttributes = "";
     if ($this->rid->getSessionValue() != "") {
         $this->rid->CurrentValue = $this->rid->getSessionValue();
         if (strval($this->rid->CurrentValue) != "") {
             $sFilterWrk = "`rid`" . ew_SearchString("=", $this->rid->CurrentValue, EW_DATATYPE_NUMBER, "");
             $sSqlWrk = "SELECT `rid`, `r_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `restaurants`";
             $sWhereWrk = "";
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->rid, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->rid->ViewValue = $this->rid->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->rid->ViewValue = $this->rid->CurrentValue;
             }
         } else {
             $this->rid->ViewValue = NULL;
         }
         $this->rid->ViewCustomAttributes = "";
     } else {
     }
     // cat_name
     $this->cat_name->EditAttrs["class"] = "form-control";
     $this->cat_name->EditCustomAttributes = "";
     $this->cat_name->EditValue = $this->cat_name->CurrentValue;
     $this->cat_name->PlaceHolder = ew_RemoveHtml($this->cat_name->FldCaption());
     // cat_desc
     $this->cat_desc->EditAttrs["class"] = "form-control";
     $this->cat_desc->EditCustomAttributes = "";
     $this->cat_desc->EditValue = $this->cat_desc->CurrentValue;
     $this->cat_desc->PlaceHolder = ew_RemoveHtml($this->cat_desc->FldCaption());
     // Call Row Rendered event
     $this->Row_Rendered();
 }
开发者ID:ahmarmahmood,项目名称:tabedaar,代码行数:54,代码来源:categoriesinfo.php

示例12: RenderRow

 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // product_id
     // category_id
     // scat_id
     // product_name
     // product_image
     // product_secimage
     // product_description
     // feature_ledtype
     // feature_power
     // feature_lumen
     // feature_viewangle
     // feature_cri
     // feature_iprating
     // feature_colortemp
     // feature_body
     // feature_cutoutsize
     // feature_colors
     // feature_dimmable
     // feature_warranty
     // feature_application
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // product_id
         $this->product_id->ViewValue = $this->product_id->CurrentValue;
         $this->product_id->ViewCustomAttributes = "";
         // category_id
         if (strval($this->category_id->CurrentValue) != "") {
             $sFilterWrk = "`category_id`" . ew_SearchString("=", $this->category_id->CurrentValue, EW_DATATYPE_NUMBER, "");
             $sSqlWrk = "SELECT `category_id`, `category_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `category`";
             $sWhereWrk = "";
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->category_id, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->category_id->ViewValue = $this->category_id->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->category_id->ViewValue = $this->category_id->CurrentValue;
             }
         } else {
             $this->category_id->ViewValue = NULL;
         }
         $this->category_id->ViewCustomAttributes = "";
         // scat_id
         if (strval($this->scat_id->CurrentValue) != "") {
             $sFilterWrk = "`scat_id`" . ew_SearchString("=", $this->scat_id->CurrentValue, EW_DATATYPE_NUMBER, "");
             $sSqlWrk = "SELECT `scat_id`, `scat_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sub_category`";
             $sWhereWrk = "";
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->scat_id, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->scat_id->ViewValue = $this->scat_id->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->scat_id->ViewValue = $this->scat_id->CurrentValue;
             }
         } else {
             $this->scat_id->ViewValue = NULL;
         }
         $this->scat_id->ViewCustomAttributes = "";
         // product_name
         $this->product_name->ViewValue = $this->product_name->CurrentValue;
         $this->product_name->ViewCustomAttributes = "";
         // product_image
         if (!ew_Empty($this->product_image->Upload->DbValue)) {
             $this->product_image->ViewValue = $this->product_image->Upload->DbValue;
         } else {
             $this->product_image->ViewValue = "";
         }
         $this->product_image->ViewCustomAttributes = "";
         // product_secimage
         if (!ew_Empty($this->product_secimage->Upload->DbValue)) {
             $this->product_secimage->ViewValue = $this->product_secimage->Upload->DbValue;
         } else {
             $this->product_secimage->ViewValue = "";
         }
         $this->product_secimage->ViewCustomAttributes = "";
         // product_description
//.........这里部分代码省略.........
开发者ID:NaurozAhmad,项目名称:G-Axis,代码行数:101,代码来源:productsedit.php

示例13: session_start

<?php

include "migrate/mysql_connect.php";
session_start();
$ip = 'heroeverything.com';
if (!empty($_POST['email']) and !empty($_POST['pw'])) {
    $dbh = Conn();
    $sth = $dbh->prepare('select userid, passwd from User where email = ?');
    $sth->execute(array($_POST['email']));
    $result = $sth->fetch(PDO::FETCH_ASSOC);
    $count = $sth->rowCount();
    if ($count > 0) {
        if (!empty($result['passwd']) and md5($_POST['pw']) == $result['passwd']) {
            $_SESSION['userid'] = $result['userid'];
            header("Location: http://{$ip}/user.php");
        } else {
            echo "<script>alert(\"輸入密碼錯誤,請重新輸入\");location.href = 'http://heroeverything.com/index.php';</script>";
            //header("Location: http://$ip/index.php");
            //header('Location: http://10.0.0.79/index.php');
        }
    } else {
        $sql = "insert into User (`email`, `nickname`, `passwd`, `desc`, `orgname`, `bar_list`, `lastlog`, `ip`) values (?, 'test', ?, 'test', 'test', null, null, '127.0.0.1')";
        $sth = $dbh->prepare($sql);
        $sth->execute(array($_POST['email'], md5($_POST['pw'])));
        $userid = $dbh->lastInsertId();
        $_SESSION['userid'] = $userid;
        header("Location: http://{$ip}/user.php");
        //header('Location: http://10.0.0.188/user.php');
    }
    $dbh = null;
}
开发者ID:RenZero,项目名称:HeroEverything,代码行数:31,代码来源:index.php

示例14: RenderRow

 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
     // expense_id
     // user_id
     // rider_id
     // expense_date
     // expense_month
     // expense_cat
     // expense_amount
     // expense_detail
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // expense_id
         $this->expense_id->ViewValue = $this->expense_id->CurrentValue;
         $this->expense_id->ViewCustomAttributes = "";
         // user_id
         if (strval($this->user_id->CurrentValue) != "") {
             $sFilterWrk = "`user_id`" . ew_SearchString("=", $this->user_id->CurrentValue, EW_DATATYPE_NUMBER, "");
             $sSqlWrk = "SELECT `user_id`, `username` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `user`";
             $sWhereWrk = "";
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->user_id, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->user_id->ViewValue = $this->user_id->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->user_id->ViewValue = $this->user_id->CurrentValue;
             }
         } else {
             $this->user_id->ViewValue = NULL;
         }
         $this->user_id->ViewCustomAttributes = "";
         // rider_id
         if (strval($this->rider_id->CurrentValue) != "") {
             $sFilterWrk = "`rider_id`" . ew_SearchString("=", $this->rider_id->CurrentValue, EW_DATATYPE_NUMBER, "");
             $sSqlWrk = "SELECT `rider_id`, `rider_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `rider`";
             $sWhereWrk = "";
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->rider_id, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->rider_id->ViewValue = $this->rider_id->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->rider_id->ViewValue = $this->rider_id->CurrentValue;
             }
         } else {
             $this->rider_id->ViewValue = NULL;
         }
         $this->rider_id->ViewCustomAttributes = "";
         // expense_date
         $this->expense_date->ViewValue = $this->expense_date->CurrentValue;
         $this->expense_date->ViewValue = ew_FormatDateTime($this->expense_date->ViewValue, 5);
         $this->expense_date->ViewCustomAttributes = "";
         // expense_month
         if (strval($this->expense_month->CurrentValue) != "") {
             $this->expense_month->ViewValue = $this->expense_month->OptionCaption($this->expense_month->CurrentValue);
         } else {
             $this->expense_month->ViewValue = NULL;
         }
         $this->expense_month->ViewCustomAttributes = "";
         // expense_cat
         if (strval($this->expense_cat->CurrentValue) != "") {
             $this->expense_cat->ViewValue = $this->expense_cat->OptionCaption($this->expense_cat->CurrentValue);
         } else {
             $this->expense_cat->ViewValue = NULL;
         }
         $this->expense_cat->ViewCustomAttributes = "";
         // expense_amount
         $this->expense_amount->ViewValue = $this->expense_amount->CurrentValue;
         $this->expense_amount->ViewCustomAttributes = "";
         // expense_detail
         $this->expense_detail->ViewValue = $this->expense_detail->CurrentValue;
         $this->expense_detail->ViewCustomAttributes = "";
//.........这里部分代码省略.........
开发者ID:ahmarmahmood,项目名称:tabedaar,代码行数:101,代码来源:expenseview.php

示例15: EditRow

 function EditRow()
 {
     $c =& Conn(EW_USER_LEVEL_PRIV_DBID);
     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], EW_USER_LEVEL_PRIV_DBID) . "' AND " . EW_USER_LEVEL_PRIV_USER_LEVEL_ID_FIELD . " = " . $this->USER_LEVEL_ID->CurrentValue;
         $rs = $c->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], EW_USER_LEVEL_PRIV_DBID) . "' AND " . EW_USER_LEVEL_PRIV_USER_LEVEL_ID_FIELD . " = " . $this->USER_LEVEL_ID->CurrentValue;
             $c->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], EW_USER_LEVEL_PRIV_DBID) . "', " . $this->USER_LEVEL_ID->CurrentValue . ", " . $this->Privileges[$i] . ")";
             $c->Execute($Sql);
         }
         if ($rs) {
             $rs->Close();
         }
     }
     return TRUE;
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:19,代码来源:userpriv.php


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