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


PHP ew_UnFormatDateTime函数代码示例

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


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

示例1: AddRow

 function AddRow($rsold = NULL)
 {
     global $conn, $Language, $Security;
     // Begin transaction
     if ($this->getCurrentDetailTable() != "") {
         $conn->BeginTrans();
     }
     // Load db values from rsold
     if ($rsold) {
         $this->LoadDbValues($rsold);
     }
     $rsnew = array();
     // fecha
     $this->fecha->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->fecha->CurrentValue, 7), NULL, FALSE);
     // idhabitacion
     $this->idhabitacion->SetDbValueDef($rsnew, $this->idhabitacion->CurrentValue, 0, strval($this->idhabitacion->CurrentValue) == "");
     // idpaciente
     $this->idpaciente->SetDbValueDef($rsnew, $this->idpaciente->CurrentValue, 0, strval($this->idpaciente->CurrentValue) == "");
     // es_operacion
     $this->es_operacion->SetDbValueDef($rsnew, $this->es_operacion->CurrentValue, "", strval($this->es_operacion->CurrentValue) == "");
     // 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->idinternado->setDbValue($conn->Insert_ID());
         $rsnew['idinternado'] = $this->idinternado->DbValue;
     }
     // Add detail records
     if ($AddRow) {
         $DetailTblVar = explode(",", $this->getCurrentDetailTable());
         if (in_array("internado_diario", $DetailTblVar) && $GLOBALS["internado_diario"]->DetailAdd) {
             $GLOBALS["internado_diario"]->idinternado->setSessionValue($this->idinternado->CurrentValue);
             // Set master key
             if (!isset($GLOBALS["internado_diario_grid"])) {
                 $GLOBALS["internado_diario_grid"] = new cinternado_diario_grid();
             }
             // Get detail page object
             $AddRow = $GLOBALS["internado_diario_grid"]->GridInsert();
             if (!$AddRow) {
                 $GLOBALS["internado_diario"]->idinternado->setSessionValue("");
             }
             // Clear master key if insert failed
         }
     }
     // Commit/Rollback transaction
     if ($this->getCurrentDetailTable() != "") {
         if ($AddRow) {
             $conn->CommitTrans();
             // Commit transaction
         } else {
             $conn->RollbackTrans();
             // Rollback transaction
         }
     }
     if ($AddRow) {
         // Call Row Inserted event
         $rs = $rsold == NULL ? NULL : $rsold->fields;
         $this->Row_Inserted($rs, $rsnew);
     }
     return $AddRow;
 }
开发者ID:AngeloGalindo,项目名称:PracticasGrupo9DesarrolloWeb,代码行数:79,代码来源:internadoadd.php

示例2: AddRow

 function AddRow($rsold = NULL)
 {
     global $conn, $Language, $Security;
     // Begin transaction
     if ($this->getCurrentDetailTable() != "") {
         $conn->BeginTrans();
     }
     // Load db values from rsold
     if ($rsold) {
         $this->LoadDbValues($rsold);
     }
     $rsnew = array();
     // descripcion
     $this->descripcion->SetDbValueDef($rsnew, $this->descripcion->CurrentValue, NULL, FALSE);
     // importe
     $this->importe->SetDbValueDef($rsnew, $this->importe->CurrentValue, NULL, FALSE);
     // fecha_creacion
     $this->fecha_creacion->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->fecha_creacion->CurrentValue, 7), NULL, FALSE);
     // activa
     $this->activa->SetDbValueDef($rsnew, $this->activa->CurrentValue, NULL, strval($this->activa->CurrentValue) == "");
     // id_usuario
     if (!$Security->IsAdmin() && $Security->IsLoggedIn()) {
         // Non system admin
         $rsnew['id_usuario'] = CurrentUserID();
     }
     // 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;
     }
     // Add detail records
     if ($AddRow) {
         $DetailTblVar = explode(",", $this->getCurrentDetailTable());
         if (in_array("socios_cuotas", $DetailTblVar) && $GLOBALS["socios_cuotas"]->DetailAdd) {
             $GLOBALS["socios_cuotas"]->id_montos->setSessionValue($this->id->CurrentValue);
             // Set master key
             if (!isset($GLOBALS["socios_cuotas_grid"])) {
                 $GLOBALS["socios_cuotas_grid"] = new csocios_cuotas_grid();
             }
             // Get detail page object
             $AddRow = $GLOBALS["socios_cuotas_grid"]->GridInsert();
             if (!$AddRow) {
                 $GLOBALS["socios_cuotas"]->id_montos->setSessionValue("");
             }
             // Clear master key if insert failed
         }
     }
     // Commit/Rollback transaction
     if ($this->getCurrentDetailTable() != "") {
         if ($AddRow) {
             $conn->CommitTrans();
             // Commit transaction
         } else {
             $conn->RollbackTrans();
             // Rollback transaction
         }
     }
     if ($AddRow) {
         // Call Row Inserted event
         $rs = $rsold == NULL ? NULL : $rsold->fields;
         $this->Row_Inserted($rs, $rsnew);
         $this->WriteAuditTrailOnAdd($rsnew);
     }
     return $AddRow;
 }
开发者ID:scintes,项目名称:sistemas,代码行数:85,代码来源:cciag_montosadd.php

示例3: 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();
         // name
         $this->name->SetDbValueDef($rsnew, $this->name->CurrentValue, "", $this->name->ReadOnly);
         // email
         $this->_email->SetDbValueDef($rsnew, $this->_email->CurrentValue, "", $this->_email->ReadOnly);
         // joined
         $this->joined->SetDbValueDef($rsnew, ew_CurrentUserIP(), 0);
         $rsnew['joined'] =& $this->joined->DbValue;
         // facebook
         $this->facebook->SetDbValueDef($rsnew, $this->facebook->CurrentValue, NULL, $this->facebook->ReadOnly);
         // twitter
         $this->twitter->SetDbValueDef($rsnew, $this->twitter->CurrentValue, NULL, $this->twitter->ReadOnly);
         // twitch
         $this->twitch->SetDbValueDef($rsnew, $this->twitch->CurrentValue, NULL, $this->twitch->ReadOnly);
         // skype
         $this->skype->SetDbValueDef($rsnew, $this->skype->CurrentValue, NULL, $this->skype->ReadOnly);
         // birthday
         $this->birthday->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->birthday->CurrentValue, 5), NULL, $this->birthday->ReadOnly);
         // profession
         $this->profession->SetDbValueDef($rsnew, $this->profession->CurrentValue, NULL, $this->profession->ReadOnly);
         // game_type
         $this->game_type->SetDbValueDef($rsnew, $this->game_type->CurrentValue, NULL, $this->game_type->ReadOnly);
         // division
         $this->division->SetDbValueDef($rsnew, $this->division->CurrentValue, NULL, $this->division->ReadOnly);
         // has_expansion
         $this->has_expansion->SetDbValueDef($rsnew, $this->has_expansion->CurrentValue, "", $this->has_expansion->ReadOnly);
         // notes
         $this->notes->SetDbValueDef($rsnew, $this->notes->CurrentValue, NULL, $this->notes->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:NoSympathy,项目名称:Dashboard,代码行数:83,代码来源:nos_membersedit.php

示例4: AddRow

 function AddRow($rsold = NULL)
 {
     global $conn, $Language, $Security;
     // Set up foreign key field value from Session
     if ($this->getCurrentMasterTable() == "hoja_mantenimientos") {
         $this->id_hoja_mantenimiento->CurrentValue = $this->id_hoja_mantenimiento->getSessionValue();
     }
     // Load db values from rsold
     if ($rsold) {
         $this->LoadDbValues($rsold);
     }
     $rsnew = array();
     // fecha
     $this->fecha->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->fecha->CurrentValue, 7), NULL, FALSE);
     // detalles
     $this->detalles->SetDbValueDef($rsnew, $this->detalles->CurrentValue, NULL, FALSE);
     // iva
     $this->iva->SetDbValueDef($rsnew, $this->iva->CurrentValue, NULL, FALSE);
     // Importe
     $this->Importe->SetDbValueDef($rsnew, $this->Importe->CurrentValue, NULL, FALSE);
     // id_tipo_gasto
     $this->id_tipo_gasto->SetDbValueDef($rsnew, $this->id_tipo_gasto->CurrentValue, NULL, FALSE);
     // id_hoja_mantenimiento
     $this->id_hoja_mantenimiento->SetDbValueDef($rsnew, $this->id_hoja_mantenimiento->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->codigo->setDbValue($conn->Insert_ID());
         $rsnew['codigo'] = $this->codigo->DbValue;
     }
     if ($AddRow) {
         // Call Row Inserted event
         $rs = $rsold == NULL ? NULL : $rsold->fields;
         $this->Row_Inserted($rs, $rsnew);
     }
     return $AddRow;
 }
开发者ID:scintes,项目名称:sistemas,代码行数:56,代码来源:v_gastos_mgridcls.php

示例5: AddRow

 function AddRow($rsold = NULL)
 {
     global $conn, $Language, $Security;
     // Check if valid key values for master user
     if ($Security->CurrentUserID() != "" && !$Security->IsAdmin()) {
         // Non system admin
         $sMasterFilter = $this->SqlMasterFilter_socios();
         if (strval($this->id_socio->CurrentValue) != "" && $this->getCurrentMasterTable() == "socios") {
             $sMasterFilter = str_replace("@socio_nro@", ew_AdjustSql($this->id_socio->CurrentValue), $sMasterFilter);
         } else {
             $sMasterFilter = "";
         }
         if ($sMasterFilter != "") {
             $rsmaster = $GLOBALS["socios"]->LoadRs($sMasterFilter);
             $this->MasterRecordExists = $rsmaster && !$rsmaster->EOF;
             if (!$this->MasterRecordExists) {
                 $sMasterUserIdMsg = str_replace("%c", CurrentUserID(), $Language->Phrase("UnAuthorizedMasterUserID"));
                 $sMasterUserIdMsg = str_replace("%f", $sMasterFilter, $sMasterUserIdMsg);
                 $this->setFailureMessage($sMasterUserIdMsg);
                 return FALSE;
             } else {
                 $rsmaster->Close();
             }
         }
     }
     // Check referential integrity for master table 'socios'
     $bValidMasterRecord = TRUE;
     $sMasterFilter = $this->SqlMasterFilter_socios();
     if (strval($this->id_socio->CurrentValue) != "") {
         $sMasterFilter = str_replace("@socio_nro@", ew_AdjustSql($this->id_socio->CurrentValue), $sMasterFilter);
     } else {
         $bValidMasterRecord = FALSE;
     }
     if ($bValidMasterRecord) {
         $rsmaster = $GLOBALS["socios"]->LoadRs($sMasterFilter);
         $bValidMasterRecord = $rsmaster && !$rsmaster->EOF;
         $rsmaster->Close();
     }
     if (!$bValidMasterRecord) {
         $sRelatedRecordMsg = str_replace("%t", "socios", $Language->Phrase("RelatedRecordRequired"));
         $this->setFailureMessage($sRelatedRecordMsg);
         return FALSE;
     }
     // Begin transaction
     if ($this->getCurrentDetailTable() != "") {
         $conn->BeginTrans();
     }
     // Load db values from rsold
     if ($rsold) {
         $this->LoadDbValues($rsold);
     }
     $rsnew = array();
     // mes
     $this->mes->SetDbValueDef($rsnew, $this->mes->CurrentValue, NULL, FALSE);
     // anio
     $this->anio->SetDbValueDef($rsnew, $this->anio->CurrentValue, NULL, FALSE);
     // fecha
     $this->fecha->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->fecha->CurrentValue, 7), NULL, FALSE);
     // monto
     $this->monto->SetDbValueDef($rsnew, $this->monto->CurrentValue, NULL, FALSE);
     // id_socio
     $this->id_socio->SetDbValueDef($rsnew, $this->id_socio->CurrentValue, NULL, FALSE);
     // id_usuario
     if (!$Security->IsAdmin() && $Security->IsLoggedIn()) {
         // Non system admin
         $rsnew['id_usuario'] = CurrentUserID();
     }
     // 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;
     }
     // Add detail records
     if ($AddRow) {
         $DetailTblVar = explode(",", $this->getCurrentDetailTable());
         if (in_array("detalle_deudas", $DetailTblVar) && $GLOBALS["detalle_deudas"]->DetailAdd) {
             $GLOBALS["detalle_deudas"]->id_deuda->setSessionValue($this->id->CurrentValue);
             // Set master key
             if (!isset($GLOBALS["detalle_deudas_grid"])) {
                 $GLOBALS["detalle_deudas_grid"] = new cdetalle_deudas_grid();
//.........这里部分代码省略.........
开发者ID:scintes,项目名称:sistemas,代码行数:101,代码来源:cciag_deudasadd.php

示例6: EditRow

 function EditRow()
 {
     global $conn, $Security, $patient_main;
     $sFilter = $patient_main->KeyFilter();
     $patient_main->CurrentFilter = $sFilter;
     $sSql = $patient_main->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 PatientMainNo
         // Field PatientID
         $patient_main->PatientID->SetDbValueDef($patient_main->PatientID->CurrentValue, "");
         $rsnew['PatientID'] =& $patient_main->PatientID->DbValue;
         // Field PatientName
         $patient_main->PatientName->SetDbValueDef($patient_main->PatientName->CurrentValue, "");
         $rsnew['PatientName'] =& $patient_main->PatientName->DbValue;
         // Field PatientBirthDate
         $patient_main->PatientBirthDate->SetDbValueDef(ew_UnFormatDateTime($patient_main->PatientBirthDate->CurrentValue, 5), NULL);
         $rsnew['PatientBirthDate'] =& $patient_main->PatientBirthDate->DbValue;
         // Field PatientSex
         $patient_main->PatientSex->SetDbValueDef($patient_main->PatientSex->CurrentValue, "");
         $rsnew['PatientSex'] =& $patient_main->PatientSex->DbValue;
         // Field OtherPatientID
         $patient_main->OtherPatientID->SetDbValueDef($patient_main->OtherPatientID->CurrentValue, NULL);
         $rsnew['OtherPatientID'] =& $patient_main->OtherPatientID->DbValue;
         // Call Row Updating event
         $bUpdateRow = $patient_main->Row_Updating($rsold, $rsnew);
         if ($bUpdateRow) {
             $conn->raiseErrorFn = 'ew_ErrorFn';
             $EditRow = $conn->Execute($patient_main->UpdateSQL($rsnew));
             $conn->raiseErrorFn = '';
         } else {
             if ($patient_main->CancelMessage != "") {
                 $this->setMessage($patient_main->CancelMessage);
                 $patient_main->CancelMessage = "";
             } else {
                 $this->setMessage("Update cancelled");
             }
             $EditRow = FALSE;
         }
     }
     // Call Row_Updated event
     if ($EditRow) {
         $patient_main->Row_Updated($rsold, $rsnew);
     }
     $rs->Close();
     return $EditRow;
 }
开发者ID:airfox7412,项目名称:ps01,代码行数:58,代码来源:patient_main_edit.php

示例7: ew_AdjustSql

 $Delivery_Report_1_report->sFilter = "";
 if ($Delivery_Report_1_report->sFilter != "") {
     $Delivery_Report_1_report->sFilter .= " AND ";
 }
 if (is_null(ew_UnFormatDateTime(ew_FormatDateTime($Delivery_Report_1->PublishedDate->CurrentValue, 6), 6))) {
     $Delivery_Report_1_report->sFilter .= "(`PublishedDate` IS NULL)";
 } else {
     $Delivery_Report_1_report->sFilter .= "(`PublishedDate` = '" . ew_AdjustSql(ew_UnFormatDateTime(ew_FormatDateTime($Delivery_Report_1->PublishedDate->CurrentValue, 6), 6)) . "')";
 }
 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 . ")";
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:31,代码来源:Delivery_Report_1report.php

示例8: AddRow

function AddRow()
{
    global $conn, $Security, $archives;
    // Check for duplicate key
    $bCheckKey = TRUE;
    $sFilter = $archives->SqlKeyFilter();
    if (trim(strval($archives->id->CurrentValue)) == "") {
        $bCheckKey = FALSE;
    } else {
        $sFilter = str_replace("@id@", ew_AdjustSql($archives->id->CurrentValue), $sFilter);
        // Replace key value
    }
    if (!is_numeric($archives->id->CurrentValue)) {
        $bCheckKey = FALSE;
    }
    if ($bCheckKey) {
        $rsChk = $archives->LoadRs($sFilter);
        if ($rsChk && !$rsChk->EOF) {
            $_SESSION[EW_SESSION_MESSAGE] = "Duplicate value for primary key";
            $rsChk->Close();
            return FALSE;
        }
    }
    $rsnew = array();
    // Field url
    $archives->url->SetDbValueDef($archives->url->CurrentValue, "");
    $rsnew['url'] =& $archives->url->DbValue;
    // Field projectname
    $archives->projectname->SetDbValueDef($archives->projectname->CurrentValue, NULL);
    $rsnew['projectname'] =& $archives->projectname->DbValue;
    // Field title
    $archives->title->SetDbValueDef($archives->title->CurrentValue, "");
    $rsnew['title'] =& $archives->title->DbValue;
    // Field datetime
    $archives->datetime->SetDbValueDef(ew_UnFormatDateTime($archives->datetime->CurrentValue, 5), ew_CurrentDate());
    $rsnew['datetime'] =& $archives->datetime->DbValue;
    // Field content
    $archives->content->SetDbValueDef($archives->content->CurrentValue, NULL);
    $rsnew['content'] =& $archives->content->DbValue;
    // Call Row Inserting event
    $bInsertRow = $archives->Row_Inserting($rsnew);
    if ($bInsertRow) {
        $conn->raiseErrorFn = 'ew_ErrorFn';
        $AddRow = $conn->Execute($archives->InsertSQL($rsnew));
        $conn->raiseErrorFn = '';
    } else {
        if ($archives->CancelMessage != "") {
            $_SESSION[EW_SESSION_MESSAGE] = $archives->CancelMessage;
            $archives->CancelMessage = "";
        } else {
            $_SESSION[EW_SESSION_MESSAGE] = "Insert cancelled";
        }
        $AddRow = FALSE;
    }
    if ($AddRow) {
        $archives->id->setDbValue($conn->Insert_ID());
        $rsnew['id'] =& $archives->id->DbValue;
        // Call Row Inserted event
        $archives->Row_Inserted($rsnew);
    }
    return $AddRow;
}
开发者ID:BGCX261,项目名称:zhss-svn-to-git,代码行数:62,代码来源:archivesadd.php

示例9: 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

示例10: RenderRow


//.........这里部分代码省略.........
             $Orders->CustomerID->ViewValue = NULL;
         }
         $Orders->CustomerID->CssStyle = "";
         $Orders->CustomerID->CssClass = "";
         $Orders->CustomerID->ViewCustomAttributes = "";
         // TransactionNumber
         $Orders->TransactionNumber->ViewValue = $Orders->TransactionNumber->CurrentValue;
         $Orders->TransactionNumber->CssStyle = "";
         $Orders->TransactionNumber->CssClass = "";
         $Orders->TransactionNumber->ViewCustomAttributes = "";
         // DateOrdered
         $Orders->DateOrdered->ViewValue = $Orders->DateOrdered->CurrentValue;
         $Orders->DateOrdered->ViewValue = ew_FormatDateTime($Orders->DateOrdered->ViewValue, 6);
         $Orders->DateOrdered->CssStyle = "";
         $Orders->DateOrdered->CssClass = "";
         $Orders->DateOrdered->ViewCustomAttributes = "";
         // Total
         $Orders->Total->ViewValue = $Orders->Total->CurrentValue;
         $Orders->Total->ViewValue = ew_FormatCurrency($Orders->Total->ViewValue, 2, -2, 0, -2);
         $Orders->Total->CssStyle = "";
         $Orders->Total->CssClass = "";
         $Orders->Total->ViewCustomAttributes = "";
         // DeliveryDate
         $Orders->DeliveryDate->ViewValue = $Orders->DeliveryDate->CurrentValue;
         $Orders->DeliveryDate->ViewValue = ew_FormatDateTime($Orders->DeliveryDate->ViewValue, 6);
         $Orders->DeliveryDate->CssStyle = "";
         $Orders->DeliveryDate->CssClass = "";
         $Orders->DeliveryDate->ViewCustomAttributes = "";
         // PromoCodeID
         if (strval($Orders->PromoCodeID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `PromoCodeName` FROM `PromoCodes` WHERE `PromoCodeID` = " . ew_AdjustSql($Orders->PromoCodeID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Orders->PromoCodeID->ViewValue = $rswrk->fields('PromoCodeName');
                 $rswrk->Close();
             } else {
                 $Orders->PromoCodeID->ViewValue = $Orders->PromoCodeID->CurrentValue;
             }
         } else {
             $Orders->PromoCodeID->ViewValue = NULL;
         }
         $Orders->PromoCodeID->CssStyle = "";
         $Orders->PromoCodeID->CssClass = "";
         $Orders->PromoCodeID->ViewCustomAttributes = "";
         // Sequence
         $Orders->Sequence->ViewValue = $Orders->Sequence->CurrentValue;
         $Orders->Sequence->CssStyle = "";
         $Orders->Sequence->CssClass = "";
         $Orders->Sequence->ViewCustomAttributes = "";
         // OrderID
         $Orders->OrderID->HrefValue = "";
         // CustomerID
         $Orders->CustomerID->HrefValue = "";
         // TransactionNumber
         $Orders->TransactionNumber->HrefValue = "";
         // DateOrdered
         $Orders->DateOrdered->HrefValue = "";
         // Total
         $Orders->Total->HrefValue = "";
         // DeliveryDate
         $Orders->DeliveryDate->HrefValue = "";
         // PromoCodeID
         $Orders->PromoCodeID->HrefValue = "";
         // Sequence
         $Orders->Sequence->HrefValue = "";
     } elseif ($Orders->RowType == EW_ROWTYPE_SEARCH) {
         // Search row
         // OrderID
         $Orders->OrderID->EditCustomAttributes = "";
         $Orders->OrderID->EditValue = ew_HtmlEncode($Orders->OrderID->AdvancedSearch->SearchValue);
         // CustomerID
         $Orders->CustomerID->EditCustomAttributes = "";
         $Orders->CustomerID->EditCustomAttributes = "";
         // TransactionNumber
         $Orders->TransactionNumber->EditCustomAttributes = "";
         $Orders->TransactionNumber->EditValue = ew_HtmlEncode($Orders->TransactionNumber->AdvancedSearch->SearchValue);
         $Orders->TransactionNumber->EditCustomAttributes = "";
         $Orders->TransactionNumber->EditValue2 = ew_HtmlEncode($Orders->TransactionNumber->AdvancedSearch->SearchValue2);
         // DateOrdered
         $Orders->DateOrdered->EditCustomAttributes = "";
         $Orders->DateOrdered->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($Orders->DateOrdered->AdvancedSearch->SearchValue, 6), 6));
         $Orders->DateOrdered->EditCustomAttributes = "";
         $Orders->DateOrdered->EditValue2 = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($Orders->DateOrdered->AdvancedSearch->SearchValue2, 6), 6));
         // Total
         $Orders->Total->EditCustomAttributes = "";
         $Orders->Total->EditValue = ew_HtmlEncode($Orders->Total->AdvancedSearch->SearchValue);
         // DeliveryDate
         $Orders->DeliveryDate->EditCustomAttributes = "";
         $Orders->DeliveryDate->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($Orders->DeliveryDate->AdvancedSearch->SearchValue, 6), 6));
         // PromoCodeID
         $Orders->PromoCodeID->EditCustomAttributes = "";
         // Sequence
         $Orders->Sequence->EditCustomAttributes = "";
         $Orders->Sequence->EditValue = ew_HtmlEncode($Orders->Sequence->AdvancedSearch->SearchValue);
     }
     // Call Row Rendered event
     $Orders->Row_Rendered();
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:101,代码来源:Orderslist.php

示例11: ConvertSearchValue

 function ConvertSearchValue(&$Fld, $FldVal)
 {
     $Value = $FldVal;
     if ($Fld->FldDataType == EW_DATATYPE_DATE && $FldVal != "") {
         $Value = ew_UnFormatDateTime($FldVal, $Fld->FldDateTimeFormat);
     }
     return $Value;
 }
开发者ID:Razinsky,项目名称:echaude-com,代码行数:8,代码来源:t_produits_stockagesrch.php

示例12: RestoreFormValues

 function RestoreFormValues()
 {
     global $objForm, $tbl_twitter_stat;
     $this->LoadRow();
     $tbl_twitter_stat->id_profile->CurrentValue = $tbl_twitter_stat->id_profile->FormValue;
     $tbl_twitter_stat->stat_date->CurrentValue = $tbl_twitter_stat->stat_date->FormValue;
     $tbl_twitter_stat->stat_date->CurrentValue = ew_UnFormatDateTime($tbl_twitter_stat->stat_date->CurrentValue, 5);
     $tbl_twitter_stat->year->CurrentValue = $tbl_twitter_stat->year->FormValue;
     $tbl_twitter_stat->month->CurrentValue = $tbl_twitter_stat->month->FormValue;
     $tbl_twitter_stat->week->CurrentValue = $tbl_twitter_stat->week->FormValue;
     $tbl_twitter_stat->following->CurrentValue = $tbl_twitter_stat->following->FormValue;
     $tbl_twitter_stat->followers->CurrentValue = $tbl_twitter_stat->followers->FormValue;
     $tbl_twitter_stat->listed->CurrentValue = $tbl_twitter_stat->listed->FormValue;
     $tbl_twitter_stat->tweets->CurrentValue = $tbl_twitter_stat->tweets->FormValue;
 }
开发者ID:jliman,项目名称:SEOStat,代码行数:15,代码来源:tbl_twitter_statedit.php

示例13: 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

示例14: RestoreFormValues

 function RestoreFormValues()
 {
     global $objForm, $bookpost;
     $bookpost->bookid->CurrentValue = $bookpost->bookid->FormValue;
     $bookpost->name->CurrentValue = $bookpost->name->FormValue;
     $bookpost->cata->CurrentValue = $bookpost->cata->FormValue;
     $bookpost->author->CurrentValue = $bookpost->author->FormValue;
     $bookpost->publisher->CurrentValue = $bookpost->publisher->FormValue;
     $bookpost->info->CurrentValue = $bookpost->info->FormValue;
     $bookpost->code->CurrentValue = $bookpost->code->FormValue;
     $bookpost->pic->CurrentValue = $bookpost->pic->FormValue;
     $bookpost->useremail->CurrentValue = $bookpost->useremail->FormValue;
     $bookpost->price->CurrentValue = $bookpost->price->FormValue;
     $bookpost->datatime->CurrentValue = $bookpost->datatime->FormValue;
     $bookpost->datatime->CurrentValue = ew_UnFormatDateTime($bookpost->datatime->CurrentValue, 5);
     $bookpost->hidden->CurrentValue = $bookpost->hidden->FormValue;
 }
开发者ID:priscillatellezcl,项目名称:inet-computing,代码行数:17,代码来源:bookpostadd.php

示例15: AddRow

 function AddRow()
 {
     global $conn, $Security, $Orders;
     $rsnew = array();
     // 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 Timestamp
     $Orders->Timestamp->SetDbValueDef(ew_UnFormatDateTime($Orders->Timestamp->CurrentValue, 6), ew_CurrentDate());
     $rsnew['Timestamp'] =& $Orders->Timestamp->DbValue;
     // Field Sequence
     $Orders->Sequence->SetDbValueDef($Orders->Sequence->CurrentValue, NULL);
     $rsnew['Sequence'] =& $Orders->Sequence->DbValue;
     // Call Row Inserting event
     $bInsertRow = $Orders->Row_Inserting($rsnew);
     if ($bInsertRow) {
         $conn->raiseErrorFn = 'ew_ErrorFn';
         $AddRow = $conn->Execute($Orders->InsertSQL($rsnew));
         $conn->raiseErrorFn = '';
     } else {
         if ($Orders->CancelMessage != "") {
             $this->setMessage($Orders->CancelMessage);
             $Orders->CancelMessage = "";
         } else {
             $this->setMessage("Insert cancelled");
         }
         $AddRow = FALSE;
     }
     if ($AddRow) {
         $Orders->OrderID->setDbValue($conn->Insert_ID());
         $rsnew['OrderID'] =& $Orders->OrderID->DbValue;
         // Call Row Inserted event
         $Orders->Row_Inserted($rsnew);
     }
     return $AddRow;
 }
开发者ID:elliecm,项目名称:MadisonandRayne,代码行数:51,代码来源:Ordersadd.php


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