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


PHP ew_CurrentDate函数代码示例

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


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

示例1: EditRow

 function EditRow()
 {
     global $conn, $Security, $Orders;
     $sFilter = $Orders->KeyFilter();
     $Orders->CurrentFilter = $sFilter;
     $sSql = $Orders->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 OrderID
         // Field CustomerID
         $Orders->CustomerID->SetDbValueDef($Orders->CustomerID->CurrentValue, 0);
         $rsnew['CustomerID'] =& $Orders->CustomerID->DbValue;
         // Field TransactionNumber
         $Orders->TransactionNumber->SetDbValueDef($Orders->TransactionNumber->CurrentValue, NULL);
         $rsnew['TransactionNumber'] =& $Orders->TransactionNumber->DbValue;
         // Field DateOrdered
         $Orders->DateOrdered->SetDbValueDef(ew_UnFormatDateTime($Orders->DateOrdered->CurrentValue, 6), ew_CurrentDate());
         $rsnew['DateOrdered'] =& $Orders->DateOrdered->DbValue;
         // Field Total
         $Orders->Total->SetDbValueDef($Orders->Total->CurrentValue, 0);
         $rsnew['Total'] =& $Orders->Total->DbValue;
         // Field DeliveryDate
         $Orders->DeliveryDate->SetDbValueDef(ew_UnFormatDateTime($Orders->DeliveryDate->CurrentValue, 6), ew_CurrentDate());
         $rsnew['DeliveryDate'] =& $Orders->DeliveryDate->DbValue;
         // Field PromoCodeID
         $Orders->PromoCodeID->SetDbValueDef($Orders->PromoCodeID->CurrentValue, NULL);
         $rsnew['PromoCodeID'] =& $Orders->PromoCodeID->DbValue;
         // Field Sequence
         $Orders->Sequence->SetDbValueDef($Orders->Sequence->CurrentValue, NULL);
         $rsnew['Sequence'] =& $Orders->Sequence->DbValue;
         // Call Row Updating event
         $bUpdateRow = $Orders->Row_Updating($rsold, $rsnew);
         if ($bUpdateRow) {
             $conn->raiseErrorFn = 'ew_ErrorFn';
             $EditRow = $conn->Execute($Orders->UpdateSQL($rsnew));
             $conn->raiseErrorFn = '';
         } else {
             if ($Orders->CancelMessage != "") {
                 $this->setMessage($Orders->CancelMessage);
                 $Orders->CancelMessage = "";
             } else {
                 $this->setMessage("Update cancelled");
             }
             $EditRow = FALSE;
         }
     }
     // Call Row_Updated event
     if ($EditRow) {
         $Orders->Row_Updated($rsold, $rsnew);
     }
     $rs->Close();
     return $EditRow;
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:64,代码来源:Ordersedit.php

示例2: AddRow

 function AddRow($rsold = NULL)
 {
     global $conn, $Language, $Security;
     // Load db values from rsold
     if ($rsold) {
         $this->LoadDbValues($rsold);
     }
     $rsnew = array();
     // Password
     $this->Password->SetDbValueDef($rsnew, $this->Password->CurrentValue, "", FALSE);
     // Email
     $this->_Email->SetDbValueDef($rsnew, $this->_Email->CurrentValue, "", FALSE);
     // Created
     $this->Created->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->Created->CurrentValue, 5), ew_CurrentDate(), strval($this->Created->CurrentValue) == "");
     // Type
     $this->Type->SetDbValueDef($rsnew, $this->Type->CurrentValue, NULL, FALSE);
     // Call Row Inserting event
     $rs = $rsold == NULL ? NULL : $rsold->fields;
     $bInsertRow = $this->Row_Inserting($rs, $rsnew);
     if ($bInsertRow) {
         $conn->raiseErrorFn = 'ew_ErrorFn';
         $AddRow = $this->Insert($rsnew);
         $conn->raiseErrorFn = '';
         if ($AddRow) {
         }
     } else {
         if ($this->getSuccessMessage() != "" || $this->getFailureMessage() != "") {
             // Use the message, do nothing
         } elseif ($this->CancelMessage != "") {
             $this->setFailureMessage($this->CancelMessage);
             $this->CancelMessage = "";
         } else {
             $this->setFailureMessage($Language->Phrase("InsertCancelled"));
         }
         $AddRow = FALSE;
     }
     // Get insert id if necessary
     if ($AddRow) {
         $this->ID->setDbValue($conn->Insert_ID());
         $rsnew['ID'] = $this->ID->DbValue;
     }
     if ($AddRow) {
         // Call Row Inserted event
         $rs = $rsold == NULL ? NULL : $rsold->fields;
         $this->Row_Inserted($rs, $rsnew);
     }
     return $AddRow;
 }
开发者ID:evinw,项目名称:project_yess,代码行数:48,代码来源:Usersadd.php

示例3: EditRow

 function EditRow()
 {
     global $conn, $Security, $PromoCodes;
     $sFilter = $PromoCodes->KeyFilter();
     $PromoCodes->CurrentFilter = $sFilter;
     $sSql = $PromoCodes->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 PromoCodeID
         // Field PromoCodeName
         $PromoCodes->PromoCodeName->SetDbValueDef($PromoCodes->PromoCodeName->CurrentValue, "");
         $rsnew['PromoCodeName'] =& $PromoCodes->PromoCodeName->DbValue;
         // Field PromoCodeType
         $PromoCodes->PromoCodeType->SetDbValueDef($PromoCodes->PromoCodeType->CurrentValue, "");
         $rsnew['PromoCodeType'] =& $PromoCodes->PromoCodeType->DbValue;
         // Field Amount
         $PromoCodes->Amount->SetDbValueDef($PromoCodes->Amount->CurrentValue, 0);
         $rsnew['Amount'] =& $PromoCodes->Amount->DbValue;
         // Field ValidFrom
         $PromoCodes->ValidFrom->SetDbValueDef(ew_UnFormatDateTime($PromoCodes->ValidFrom->CurrentValue, 6), ew_CurrentDate());
         $rsnew['ValidFrom'] =& $PromoCodes->ValidFrom->DbValue;
         // Field ValidTo
         $PromoCodes->ValidTo->SetDbValueDef(ew_UnFormatDateTime($PromoCodes->ValidTo->CurrentValue, 6), NULL);
         $rsnew['ValidTo'] =& $PromoCodes->ValidTo->DbValue;
         // Field Message
         $PromoCodes->Message->SetDbValueDef($PromoCodes->Message->CurrentValue, NULL);
         $rsnew['Message'] =& $PromoCodes->Message->DbValue;
         // Field One_Time_Only
         $PromoCodes->One_Time_Only->SetDbValueDef($PromoCodes->One_Time_Only->CurrentValue, "");
         $rsnew['One_Time_Only'] =& $PromoCodes->One_Time_Only->DbValue;
         // Field New_Customer_Only
         $PromoCodes->New_Customer_Only->SetDbValueDef($PromoCodes->New_Customer_Only->CurrentValue, "");
         $rsnew['New_Customer_Only'] =& $PromoCodes->New_Customer_Only->DbValue;
         // Field multiple_use
         $PromoCodes->multiple_use->SetDbValueDef($PromoCodes->multiple_use->CurrentValue, 0);
         $rsnew['multiple_use'] =& $PromoCodes->multiple_use->DbValue;
         // Call Row Updating event
         $bUpdateRow = $PromoCodes->Row_Updating($rsold, $rsnew);
         if ($bUpdateRow) {
             $conn->raiseErrorFn = 'ew_ErrorFn';
             $EditRow = $conn->Execute($PromoCodes->UpdateSQL($rsnew));
             $conn->raiseErrorFn = '';
         } else {
             if ($PromoCodes->CancelMessage != "") {
                 $this->setMessage($PromoCodes->CancelMessage);
                 $PromoCodes->CancelMessage = "";
             } else {
                 $this->setMessage("Update cancelled");
             }
             $EditRow = FALSE;
         }
     }
     // Call Row_Updated event
     if ($EditRow) {
         $PromoCodes->Row_Updated($rsold, $rsnew);
     }
     $rs->Close();
     return $EditRow;
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:70,代码来源:PromoCodesedit.php

示例4: EditRow

 function EditRow()
 {
     global $conn, $Security, $Notifications;
     $sFilter = $Notifications->KeyFilter();
     $Notifications->CurrentFilter = $sFilter;
     $sSql = $Notifications->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 ZipCode
         // Field Email
         // Field Location
         $Notifications->Location->SetDbValueDef($Notifications->Location->CurrentValue, NULL);
         $rsnew['Location'] =& $Notifications->Location->DbValue;
         // Field Timestamp
         $Notifications->Timestamp->SetDbValueDef(ew_UnFormatDateTime($Notifications->Timestamp->CurrentValue, 6), ew_CurrentDate());
         $rsnew['Timestamp'] =& $Notifications->Timestamp->DbValue;
         // Call Row Updating event
         $bUpdateRow = $Notifications->Row_Updating($rsold, $rsnew);
         if ($bUpdateRow) {
             $conn->raiseErrorFn = 'ew_ErrorFn';
             $EditRow = $conn->Execute($Notifications->UpdateSQL($rsnew));
             $conn->raiseErrorFn = '';
         } else {
             if ($Notifications->CancelMessage != "") {
                 $this->setMessage($Notifications->CancelMessage);
                 $Notifications->CancelMessage = "";
             } else {
                 $this->setMessage("Update cancelled");
             }
             $EditRow = FALSE;
         }
     }
     // Call Row_Updated event
     if ($EditRow) {
         $Notifications->Row_Updated($rsold, $rsnew);
     }
     $rs->Close();
     return $EditRow;
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:50,代码来源:Notificationsedit.php

示例5: AddRow

 function AddRow($rsold = NULL)
 {
     global $Language, $Security;
     $conn =& $this->Connection();
     // Load db values from rsold
     if ($rsold) {
         $this->LoadDbValues($rsold);
     }
     $rsnew = array();
     // m_id
     $this->m_id->SetDbValueDef($rsnew, $this->m_id->CurrentValue, NULL, FALSE);
     // package_id
     $this->package_id->SetDbValueDef($rsnew, $this->package_id->CurrentValue, NULL, FALSE);
     // customer_name
     $this->customer_name->SetDbValueDef($rsnew, $this->customer_name->CurrentValue, NULL, FALSE);
     // customer_cell
     $this->customer_cell->SetDbValueDef($rsnew, $this->customer_cell->CurrentValue, NULL, FALSE);
     // date
     $this->date->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->date->CurrentValue, 7), ew_CurrentDate(), FALSE);
     // month
     $this->month->SetDbValueDef($rsnew, $this->month->CurrentValue, "", FALSE);
     // category
     $this->category->SetDbValueDef($rsnew, $this->category->CurrentValue, "", FALSE);
     // amount
     $this->amount->SetDbValueDef($rsnew, $this->amount->CurrentValue, 0, FALSE);
     // Details
     $this->Details->SetDbValueDef($rsnew, $this->Details->CurrentValue, "", FALSE);
     // Call Row Inserting event
     $rs = $rsold == NULL ? NULL : $rsold->fields;
     $bInsertRow = $this->Row_Inserting($rs, $rsnew);
     if ($bInsertRow) {
         $conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
         $AddRow = $this->Insert($rsnew);
         $conn->raiseErrorFn = '';
         if ($AddRow) {
             // Get insert id if necessary
             $this->delivery_id->setDbValue($conn->Insert_ID());
             $rsnew['delivery_id'] = $this->delivery_id->DbValue;
         }
     } else {
         if ($this->getSuccessMessage() != "" || $this->getFailureMessage() != "") {
             // Use the message, do nothing
         } elseif ($this->CancelMessage != "") {
             $this->setFailureMessage($this->CancelMessage);
             $this->CancelMessage = "";
         } else {
             $this->setFailureMessage($Language->Phrase("InsertCancelled"));
         }
         $AddRow = FALSE;
     }
     if ($AddRow) {
         // Call Row Inserted event
         $rs = $rsold == NULL ? NULL : $rsold->fields;
         $this->Row_Inserted($rs, $rsnew);
     }
     return $AddRow;
 }
开发者ID:ahmarmahmood,项目名称:tabedaar,代码行数:57,代码来源:deliveryadd.php

示例6: EditRow

function EditRow()
{
    global $conn, $Security, $logs;
    $sFilter = $logs->SqlKeyFilter();
    if (!is_numeric($logs->id->CurrentValue)) {
        return FALSE;
    }
    $sFilter = str_replace("@id@", ew_AdjustSql($logs->id->CurrentValue), $sFilter);
    // Replace key value
    $logs->CurrentFilter = $sFilter;
    $sSql = $logs->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 time
        $logs->time->SetDbValueDef(ew_UnFormatDateTime($logs->time->CurrentValue, 5), ew_CurrentDate());
        $rsnew['time'] =& $logs->time->DbValue;
        // Field client
        $logs->client->SetDbValueDef($logs->client->CurrentValue, NULL);
        $rsnew['client'] =& $logs->client->DbValue;
        // Field group
        $logs->group->SetDbValueDef($logs->group->CurrentValue, NULL);
        $rsnew['group'] =& $logs->group->DbValue;
        // Field type
        $logs->type->SetDbValueDef($logs->type->CurrentValue, NULL);
        $rsnew['type'] =& $logs->type->DbValue;
        // Field message
        $logs->message->SetDbValueDef($logs->message->CurrentValue, NULL);
        $rsnew['message'] =& $logs->message->DbValue;
        // Call Row Updating event
        $bUpdateRow = $logs->Row_Updating($rsold, $rsnew);
        if ($bUpdateRow) {
            $conn->raiseErrorFn = 'ew_ErrorFn';
            $EditRow = $conn->Execute($logs->UpdateSQL($rsnew));
            $conn->raiseErrorFn = '';
        } else {
            if ($logs->CancelMessage != "") {
                $_SESSION[EW_SESSION_MESSAGE] = $logs->CancelMessage;
                $logs->CancelMessage = "";
            } else {
                $_SESSION[EW_SESSION_MESSAGE] = "Update cancelled";
            }
            $EditRow = FALSE;
        }
    }
    // Call Row Updated event
    if ($EditRow) {
        $logs->Row_Updated($rsold, $rsnew);
    }
    $rs->Close();
    return $EditRow;
}
开发者ID:BGCX261,项目名称:zhss-svn-to-git,代码行数:63,代码来源:logsedit.php

示例7: AddRow

 function AddRow()
 {
     global $conn, $Security, $Notifications;
     // Check if key value entered
     if ($Notifications->ZipCode->CurrentValue == "") {
         $this->setMessage("Invalid key value");
         return FALSE;
     }
     // Check if key value entered
     if ($Notifications->zEmail->CurrentValue == "") {
         $this->setMessage("Invalid key value");
         return FALSE;
     }
     // Check for duplicate key
     $bCheckKey = TRUE;
     $sFilter = $Notifications->KeyFilter();
     if ($bCheckKey) {
         $rsChk = $Notifications->LoadRs($sFilter);
         if ($rsChk && !$rsChk->EOF) {
             $sKeyErrMsg = str_replace("%f", $sFilter, "Duplicate primary key: '%f'");
             $this->setMessage($sKeyErrMsg);
             $rsChk->Close();
             return FALSE;
         }
     }
     $rsnew = array();
     // Field ZipCode
     $Notifications->ZipCode->SetDbValueDef($Notifications->ZipCode->CurrentValue, 0);
     $rsnew['ZipCode'] =& $Notifications->ZipCode->DbValue;
     // Field Email
     $Notifications->zEmail->SetDbValueDef($Notifications->zEmail->CurrentValue, "");
     $rsnew['Email'] =& $Notifications->zEmail->DbValue;
     // Field Location
     $Notifications->Location->SetDbValueDef($Notifications->Location->CurrentValue, NULL);
     $rsnew['Location'] =& $Notifications->Location->DbValue;
     // Field Timestamp
     $Notifications->Timestamp->SetDbValueDef(ew_UnFormatDateTime($Notifications->Timestamp->CurrentValue, 6), ew_CurrentDate());
     $rsnew['Timestamp'] =& $Notifications->Timestamp->DbValue;
     // Call Row Inserting event
     $bInsertRow = $Notifications->Row_Inserting($rsnew);
     if ($bInsertRow) {
         $conn->raiseErrorFn = 'ew_ErrorFn';
         $AddRow = $conn->Execute($Notifications->InsertSQL($rsnew));
         $conn->raiseErrorFn = '';
     } else {
         if ($Notifications->CancelMessage != "") {
             $this->setMessage($Notifications->CancelMessage);
             $Notifications->CancelMessage = "";
         } else {
             $this->setMessage("Insert cancelled");
         }
         $AddRow = FALSE;
     }
     if ($AddRow) {
         // Call Row Inserted event
         $Notifications->Row_Inserted($rsnew);
     }
     return $AddRow;
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:59,代码来源:Notificationsadd.php

示例8: EditRow

 function EditRow()
 {
     global $conn, $Security, $password_reset_requests;
     $sFilter = $password_reset_requests->KeyFilter();
     $password_reset_requests->CurrentFilter = $sFilter;
     $sSql = $password_reset_requests->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 CustomerID
         $password_reset_requests->CustomerID->SetDbValueDef($password_reset_requests->CustomerID->CurrentValue, 0);
         $rsnew['CustomerID'] =& $password_reset_requests->CustomerID->DbValue;
         // Field token_id
         $password_reset_requests->token_id->SetDbValueDef($password_reset_requests->token_id->CurrentValue, "");
         $rsnew['token_id'] =& $password_reset_requests->token_id->DbValue;
         // Field expires
         $password_reset_requests->expires->SetDbValueDef(ew_UnFormatDateTime($password_reset_requests->expires->CurrentValue, 6), ew_CurrentDate());
         $rsnew['expires'] =& $password_reset_requests->expires->DbValue;
         // Call Row Updating event
         $bUpdateRow = $password_reset_requests->Row_Updating($rsold, $rsnew);
         if ($bUpdateRow) {
             $conn->raiseErrorFn = 'ew_ErrorFn';
             $EditRow = $conn->Execute($password_reset_requests->UpdateSQL($rsnew));
             $conn->raiseErrorFn = '';
         } else {
             if ($password_reset_requests->CancelMessage != "") {
                 $this->setMessage($password_reset_requests->CancelMessage);
                 $password_reset_requests->CancelMessage = "";
             } else {
                 $this->setMessage("Update cancelled");
             }
             $EditRow = FALSE;
         }
     }
     // Call Row_Updated event
     if ($EditRow) {
         $password_reset_requests->Row_Updated($rsold, $rsnew);
     }
     $rs->Close();
     return $EditRow;
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:52,代码来源:password_reset_requestsedit.php

示例9: EditRow

 function EditRow()
 {
     global $Security, $Language;
     $sFilter = $this->KeyFilter();
     $sFilter = $this->ApplyUserIDFilters($sFilter);
     $conn =& $this->Connection();
     $this->CurrentFilter = $sFilter;
     $sSql = $this->SQL();
     $conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
     $rs = $conn->Execute($sSql);
     $conn->raiseErrorFn = '';
     if ($rs === FALSE) {
         return FALSE;
     }
     if ($rs->EOF) {
         $this->setFailureMessage($Language->Phrase("NoRecord"));
         // Set no record message
         $EditRow = FALSE;
         // Update Failed
     } else {
         // Save old values
         $rsold =& $rs->fields;
         $this->LoadDbValues($rsold);
         $rsnew = array();
         // PATH
         if ($this->PATH->Visible && !$this->PATH->ReadOnly && !$this->PATH->Upload->KeepFile) {
             $this->PATH->Upload->DbValue = $rsold['PATH'];
             // Get original value
             if ($this->PATH->Upload->FileName == "") {
                 $rsnew['PATH'] = NULL;
             } else {
                 $rsnew['PATH'] = $this->PATH->Upload->FileName;
             }
         }
         // PROCESS
         $this->PROCESS->SetDbValueDef($rsnew, $this->PROCESS->CurrentValue, 0, $this->PROCESS->ReadOnly);
         // BANK_ACCOUNT_ID
         $this->BANK_ACCOUNT_ID->SetDbValueDef($rsnew, $this->BANK_ACCOUNT_ID->CurrentValue, 0, $this->BANK_ACCOUNT_ID->ReadOnly);
         // UPLOAD_FILE_STATUS_ID
         $this->UPLOAD_FILE_STATUS_ID->SetDbValueDef($rsnew, $this->UPLOAD_FILE_STATUS_ID->CurrentValue, 0, $this->UPLOAD_FILE_STATUS_ID->ReadOnly);
         // DATETIME
         $this->DATETIME->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->DATETIME->CurrentValue, 7), ew_CurrentDate(), $this->DATETIME->ReadOnly);
         if ($this->PATH->Visible && !$this->PATH->Upload->KeepFile) {
             if (!ew_Empty($this->PATH->Upload->Value)) {
                 $rsnew['PATH'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $this->PATH->UploadPath), $rsnew['PATH']);
                 // Get new file name
             }
         }
         // Call Row Updating event
         $bUpdateRow = $this->Row_Updating($rsold, $rsnew);
         if ($bUpdateRow) {
             $conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
             if (count($rsnew) > 0) {
                 $EditRow = $this->Update($rsnew, "", $rsold);
             } else {
                 $EditRow = TRUE;
             }
             // No field to update
             $conn->raiseErrorFn = '';
             if ($EditRow) {
                 if ($this->PATH->Visible && !$this->PATH->Upload->KeepFile) {
                     if (!ew_Empty($this->PATH->Upload->Value)) {
                         $this->PATH->Upload->SaveToFile($this->PATH->UploadPath, $rsnew['PATH'], TRUE);
                     }
                 }
             }
         } else {
             if ($this->getSuccessMessage() != "" || $this->getFailureMessage() != "") {
                 // Use the message, do nothing
             } elseif ($this->CancelMessage != "") {
                 $this->setFailureMessage($this->CancelMessage);
                 $this->CancelMessage = "";
             } else {
                 $this->setFailureMessage($Language->Phrase("UpdateCancelled"));
             }
             $EditRow = FALSE;
         }
     }
     // Call Row_Updated event
     if ($EditRow) {
         $this->Row_Updated($rsold, $rsnew);
     }
     $rs->Close();
     // PATH
     ew_CleanUploadTempPath($this->PATH, $this->PATH->Upload->Index);
     return $EditRow;
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:87,代码来源:upload_fileedit.php

示例10: EditRow

 function EditRow()
 {
     global $conn, $Security, $HolidayDate;
     $sFilter = $HolidayDate->KeyFilter();
     $HolidayDate->CurrentFilter = $sFilter;
     $sSql = $HolidayDate->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 HolidayDateID
         // Field HolidayOrderBy
         $HolidayDate->HolidayOrderBy->SetDbValueDef(ew_UnFormatDateTime($HolidayDate->HolidayOrderBy->CurrentValue, 6), ew_CurrentDate());
         $rsnew['HolidayOrderBy'] =& $HolidayDate->HolidayOrderBy->DbValue;
         // Field HolidayDeliverOn
         $HolidayDate->HolidayDeliverOn->SetDbValueDef(ew_UnFormatDateTime($HolidayDate->HolidayDeliverOn->CurrentValue, 6), ew_CurrentDate());
         $rsnew['HolidayDeliverOn'] =& $HolidayDate->HolidayDeliverOn->DbValue;
         // Field HolidayComment
         $HolidayDate->HolidayComment->SetDbValueDef($HolidayDate->HolidayComment->CurrentValue, NULL);
         $rsnew['HolidayComment'] =& $HolidayDate->HolidayComment->DbValue;
         // Call Row Updating event
         $bUpdateRow = $HolidayDate->Row_Updating($rsold, $rsnew);
         if ($bUpdateRow) {
             $conn->raiseErrorFn = 'ew_ErrorFn';
             $EditRow = $conn->Execute($HolidayDate->UpdateSQL($rsnew));
             $conn->raiseErrorFn = '';
         } else {
             if ($HolidayDate->CancelMessage != "") {
                 $this->setMessage($HolidayDate->CancelMessage);
                 $HolidayDate->CancelMessage = "";
             } else {
                 $this->setMessage("Update cancelled");
             }
             $EditRow = FALSE;
         }
     }
     // Call Row_Updated event
     if ($EditRow) {
         $HolidayDate->Row_Updated($rsold, $rsnew);
     }
     $rs->Close();
     return $EditRow;
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:52,代码来源:HolidayDateedit.php

示例11: AddRow

 function AddRow($rsold = NULL)
 {
     global $conn, $Language, $Security;
     // Load db values from rsold
     if ($rsold) {
         $this->LoadDbValues($rsold);
     }
     $rsnew = array();
     // Titulo
     $this->Titulo->SetDbValueDef($rsnew, $this->Titulo->CurrentValue, NULL, FALSE);
     // fecha
     $this->fecha->SetDbValueDef($rsnew, ew_CurrentDate(), NULL);
     $rsnew['fecha'] =& $this->fecha->DbValue;
     // archivo
     if (!$this->archivo->Upload->KeepFile) {
         $this->archivo->Upload->DbValue = "";
         // No need to delete old file
         if ($this->archivo->Upload->FileName == "") {
             $rsnew['archivo'] = NULL;
         } else {
             $rsnew['archivo'] = $this->archivo->Upload->FileName;
         }
     }
     // estado
     $this->estado->SetDbValueDef($rsnew, $this->estado->CurrentValue, NULL, FALSE);
     if (!$this->archivo->Upload->KeepFile) {
         $OldFiles = explode(EW_MULTIPLE_UPLOAD_SEPARATOR, $this->archivo->Upload->DbValue);
         if (!ew_Empty($this->archivo->Upload->FileName)) {
             $NewFiles = explode(EW_MULTIPLE_UPLOAD_SEPARATOR, $this->archivo->Upload->FileName);
             $FileCount = count($NewFiles);
             for ($i = 0; $i < $FileCount; $i++) {
                 $fldvar = $this->archivo->Upload->Index < 0 ? $this->archivo->FldVar : substr($this->archivo->FldVar, 0, 1) . $this->archivo->Upload->Index . substr($this->archivo->FldVar, 1);
                 if ($NewFiles[$i] != "") {
                     $file = $NewFiles[$i];
                     if (file_exists(ew_UploadTempPath($fldvar) . EW_PATH_DELIMITER . $file)) {
                         if (!in_array($file, $OldFiles)) {
                             $file1 = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $this->archivo->UploadPath), $file);
                             // Get new file name
                             if ($file1 != $file) {
                                 // Rename temp file
                                 while (file_exists(ew_UploadTempPath($fldvar) . EW_PATH_DELIMITER . $file1)) {
                                     // Make sure did not clash with existing upload file
                                     $file1 = ew_UniqueFilename(ew_UploadPathEx(TRUE, $this->archivo->UploadPath), $file1, TRUE);
                                 }
                                 // Use indexed name
                                 rename(ew_UploadTempPath($fldvar) . EW_PATH_DELIMITER . $file, ew_UploadTempPath($fldvar) . EW_PATH_DELIMITER . $file1);
                                 $NewFiles[$i] = $file1;
                             }
                         }
                     }
                 }
             }
             $this->archivo->Upload->FileName = implode(EW_MULTIPLE_UPLOAD_SEPARATOR, $NewFiles);
             $rsnew['archivo'] = $this->archivo->Upload->FileName;
         } else {
             $NewFiles = array();
         }
     }
     // Call Row Inserting event
     $rs = $rsold == NULL ? NULL : $rsold->fields;
     $bInsertRow = $this->Row_Inserting($rs, $rsnew);
     if ($bInsertRow) {
         $conn->raiseErrorFn = 'ew_ErrorFn';
         $AddRow = $this->Insert($rsnew);
         $conn->raiseErrorFn = '';
         if ($AddRow) {
             if (!$this->archivo->Upload->KeepFile) {
                 $OldFiles = explode(EW_MULTIPLE_UPLOAD_SEPARATOR, $this->archivo->Upload->DbValue);
                 if (!ew_Empty($this->archivo->Upload->FileName)) {
                     $NewFiles = explode(EW_MULTIPLE_UPLOAD_SEPARATOR, $this->archivo->Upload->FileName);
                     $NewFiles2 = explode(EW_MULTIPLE_UPLOAD_SEPARATOR, $rsnew['archivo']);
                     $FileCount = count($NewFiles);
                     for ($i = 0; $i < $FileCount; $i++) {
                         $fldvar = $this->archivo->Upload->Index < 0 ? $this->archivo->FldVar : substr($this->archivo->FldVar, 0, 1) . $this->archivo->Upload->Index . substr($this->archivo->FldVar, 1);
                         if ($NewFiles[$i] != "") {
                             $file = ew_UploadTempPath($fldvar) . EW_PATH_DELIMITER . $NewFiles[$i];
                             if (file_exists($file)) {
                                 $this->archivo->Upload->SaveToFile($this->archivo->UploadPath, @$NewFiles2[$i] != "" ? $NewFiles2[$i] : $NewFiles[$i], TRUE, $i);
                                 // Just replace
                             }
                         }
                     }
                 } else {
                     $NewFiles = array();
                 }
                 $FileCount = count($OldFiles);
                 for ($i = 0; $i < $FileCount; $i++) {
                     if ($OldFiles[$i] != "" && !in_array($OldFiles[$i], $NewFiles)) {
                         @unlink(ew_UploadPathEx(TRUE, $this->archivo->OldUploadPath) . $OldFiles[$i]);
                     }
                 }
             }
         }
     } else {
         if ($this->getSuccessMessage() != "" || $this->getFailureMessage() != "") {
             // Use the message, do nothing
         } elseif ($this->CancelMessage != "") {
             $this->setFailureMessage($this->CancelMessage);
             $this->CancelMessage = "";
         } else {
//.........这里部分代码省略.........
开发者ID:scintes,项目名称:sistemas,代码行数:101,代码来源:cciag_tramiteslist.php

示例12: AddRow

 function AddRow($rsold = NULL)
 {
     global $conn, $Language, $Security;
     // Load db values from rsold
     if ($rsold) {
         $this->LoadDbValues($rsold);
     }
     $rsnew = array();
     // nis
     $this->nis->SetDbValueDef($rsnew, $this->nis->CurrentValue, "", FALSE);
     // nama
     $this->nama->SetDbValueDef($rsnew, $this->nama->CurrentValue, "", FALSE);
     // tempat_lahir
     $this->tempat_lahir->SetDbValueDef($rsnew, $this->tempat_lahir->CurrentValue, "", FALSE);
     // tanggal_lahir
     $this->tanggal_lahir->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->tanggal_lahir->CurrentValue, 5), ew_CurrentDate(), FALSE);
     // alamat
     $this->alamat->SetDbValueDef($rsnew, $this->alamat->CurrentValue, "", FALSE);
     // agama
     $this->agama->SetDbValueDef($rsnew, $this->agama->CurrentValue, "", FALSE);
     // no_hp
     $this->no_hp->SetDbValueDef($rsnew, $this->no_hp->CurrentValue, "", FALSE);
     // email
     $this->_email->SetDbValueDef($rsnew, $this->_email->CurrentValue, "", FALSE);
     // Call Row Inserting event
     $rs = $rsold == NULL ? NULL : $rsold->fields;
     $bInsertRow = $this->Row_Inserting($rs, $rsnew);
     if ($bInsertRow) {
         $conn->raiseErrorFn = 'ew_ErrorFn';
         $AddRow = $this->Insert($rsnew);
         $conn->raiseErrorFn = '';
         if ($AddRow) {
         }
     } else {
         if ($this->getSuccessMessage() != "" || $this->getFailureMessage() != "") {
             // Use the message, do nothing
         } elseif ($this->CancelMessage != "") {
             $this->setFailureMessage($this->CancelMessage);
             $this->CancelMessage = "";
         } else {
             $this->setFailureMessage($Language->Phrase("InsertCancelled"));
         }
         $AddRow = FALSE;
     }
     // Get insert id if necessary
     if ($AddRow) {
         $this->id_siswa->setDbValue($conn->Insert_ID());
         $rsnew['id_siswa'] = $this->id_siswa->DbValue;
     }
     if ($AddRow) {
         // Call Row Inserted event
         $rs = $rsold == NULL ? NULL : $rsold->fields;
         $this->Row_Inserted($rs, $rsnew);
     }
     return $AddRow;
 }
开发者ID:agnium-academy,项目名称:abyor-3-web,代码行数:56,代码来源:siswaadd.php

示例13: EditRow

 function EditRow()
 {
     global $Security, $Language;
     $sFilter = $this->KeyFilter();
     $sFilter = $this->ApplyUserIDFilters($sFilter);
     $conn =& $this->Connection();
     $this->CurrentFilter = $sFilter;
     $sSql = $this->SQL();
     $conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
     $rs = $conn->Execute($sSql);
     $conn->raiseErrorFn = '';
     if ($rs === FALSE) {
         return FALSE;
     }
     if ($rs->EOF) {
         $this->setFailureMessage($Language->Phrase("NoRecord"));
         // Set no record message
         $EditRow = FALSE;
         // Update Failed
     } else {
         // Save old values
         $rsold =& $rs->fields;
         $this->LoadDbValues($rsold);
         $rsnew = array();
         // m_id
         $this->m_id->SetDbValueDef($rsnew, $this->m_id->CurrentValue, NULL, $this->m_id->ReadOnly);
         // package_id
         $this->package_id->SetDbValueDef($rsnew, $this->package_id->CurrentValue, NULL, $this->package_id->ReadOnly);
         // customer_name
         $this->customer_name->SetDbValueDef($rsnew, $this->customer_name->CurrentValue, NULL, $this->customer_name->ReadOnly);
         // customer_cell
         $this->customer_cell->SetDbValueDef($rsnew, $this->customer_cell->CurrentValue, NULL, $this->customer_cell->ReadOnly);
         // date
         $this->date->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->date->CurrentValue, 7), ew_CurrentDate(), $this->date->ReadOnly);
         // month
         $this->month->SetDbValueDef($rsnew, $this->month->CurrentValue, "", $this->month->ReadOnly);
         // category
         $this->category->SetDbValueDef($rsnew, $this->category->CurrentValue, "", $this->category->ReadOnly);
         // amount
         $this->amount->SetDbValueDef($rsnew, $this->amount->CurrentValue, 0, $this->amount->ReadOnly);
         // Details
         $this->Details->SetDbValueDef($rsnew, $this->Details->CurrentValue, "", $this->Details->ReadOnly);
         // Call Row Updating event
         $bUpdateRow = $this->Row_Updating($rsold, $rsnew);
         if ($bUpdateRow) {
             $conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
             if (count($rsnew) > 0) {
                 $EditRow = $this->Update($rsnew, "", $rsold);
             } else {
                 $EditRow = TRUE;
             }
             // No field to update
             $conn->raiseErrorFn = '';
             if ($EditRow) {
             }
         } else {
             if ($this->getSuccessMessage() != "" || $this->getFailureMessage() != "") {
                 // Use the message, do nothing
             } elseif ($this->CancelMessage != "") {
                 $this->setFailureMessage($this->CancelMessage);
                 $this->CancelMessage = "";
             } else {
                 $this->setFailureMessage($Language->Phrase("UpdateCancelled"));
             }
             $EditRow = FALSE;
         }
     }
     // Call Row_Updated event
     if ($EditRow) {
         $this->Row_Updated($rsold, $rsnew);
     }
     $rs->Close();
     return $EditRow;
 }
开发者ID:ahmarmahmood,项目名称:tabedaar,代码行数:74,代码来源:deliveryedit.php

示例14: EditRow

 function EditRow()
 {
     global $Security, $Language;
     $sFilter = $this->KeyFilter();
     $conn =& $this->Connection();
     $this->CurrentFilter = $sFilter;
     $sSql = $this->SQL();
     $conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
     $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;
         $this->LoadDbValues($rsold);
         $rsnew = array();
         // news_date
         $this->news_date->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->news_date->CurrentValue, 5), ew_CurrentDate(), $this->news_date->ReadOnly);
         // news_title
         $this->news_title->SetDbValueDef($rsnew, $this->news_title->CurrentValue, "", $this->news_title->ReadOnly);
         // news_description
         $this->news_description->SetDbValueDef($rsnew, $this->news_description->CurrentValue, "", $this->news_description->ReadOnly);
         // Call Row Updating event
         $bUpdateRow = $this->Row_Updating($rsold, $rsnew);
         if ($bUpdateRow) {
             $conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
             if (count($rsnew) > 0) {
                 $EditRow = $this->Update($rsnew, "", $rsold);
             } else {
                 $EditRow = TRUE;
             }
             // No field to update
             $conn->raiseErrorFn = '';
             if ($EditRow) {
             }
         } else {
             if ($this->getSuccessMessage() != "" || $this->getFailureMessage() != "") {
                 // Use the message, do nothing
             } elseif ($this->CancelMessage != "") {
                 $this->setFailureMessage($this->CancelMessage);
                 $this->CancelMessage = "";
             } else {
                 $this->setFailureMessage($Language->Phrase("UpdateCancelled"));
             }
             $EditRow = FALSE;
         }
     }
     // Call Row_Updated event
     if ($EditRow) {
         $this->Row_Updated($rsold, $rsnew);
     }
     $rs->Close();
     return $EditRow;
 }
开发者ID:NaurozAhmad,项目名称:G-Axis,代码行数:59,代码来源:newsedit.php

示例15: EditRow

 function EditRow()
 {
     global $conn, $Security, $Language;
     $sFilter = $this->KeyFilter();
     $this->CurrentFilter = $sFilter;
     $sSql = $this->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;
         $this->LoadDbValues($rsold);
         $rsnew = array();
         // nis
         $this->nis->SetDbValueDef($rsnew, $this->nis->CurrentValue, "", $this->nis->ReadOnly);
         // nama
         $this->nama->SetDbValueDef($rsnew, $this->nama->CurrentValue, "", $this->nama->ReadOnly);
         // tempat_lahir
         $this->tempat_lahir->SetDbValueDef($rsnew, $this->tempat_lahir->CurrentValue, "", $this->tempat_lahir->ReadOnly);
         // tanggal_lahir
         $this->tanggal_lahir->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->tanggal_lahir->CurrentValue, 5), ew_CurrentDate(), $this->tanggal_lahir->ReadOnly);
         // alamat
         $this->alamat->SetDbValueDef($rsnew, $this->alamat->CurrentValue, "", $this->alamat->ReadOnly);
         // agama
         $this->agama->SetDbValueDef($rsnew, $this->agama->CurrentValue, "", $this->agama->ReadOnly);
         // no_hp
         $this->no_hp->SetDbValueDef($rsnew, $this->no_hp->CurrentValue, "", $this->no_hp->ReadOnly);
         // email
         $this->_email->SetDbValueDef($rsnew, $this->_email->CurrentValue, "", $this->_email->ReadOnly);
         // Call Row Updating event
         $bUpdateRow = $this->Row_Updating($rsold, $rsnew);
         if ($bUpdateRow) {
             $conn->raiseErrorFn = 'ew_ErrorFn';
             if (count($rsnew) > 0) {
                 $EditRow = $this->Update($rsnew, "", $rsold);
             } else {
                 $EditRow = TRUE;
             }
             // No field to update
             $conn->raiseErrorFn = '';
             if ($EditRow) {
             }
         } else {
             if ($this->getSuccessMessage() != "" || $this->getFailureMessage() != "") {
                 // Use the message, do nothing
             } elseif ($this->CancelMessage != "") {
                 $this->setFailureMessage($this->CancelMessage);
                 $this->CancelMessage = "";
             } else {
                 $this->setFailureMessage($Language->Phrase("UpdateCancelled"));
             }
             $EditRow = FALSE;
         }
     }
     // Call Row_Updated event
     if ($EditRow) {
         $this->Row_Updated($rsold, $rsnew);
     }
     $rs->Close();
     return $EditRow;
 }
开发者ID:agnium-academy,项目名称:abyor-3-web,代码行数:68,代码来源:siswaedit.php


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