Changeset 1194

Show
Ignore:
Timestamp:
02/17/10 16:17:29 (5 months ago)
Author:
Hugo
Message:

ispClient: save commit

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/unxsISP/interfaces/customer/purchase.c

    r1192 r1194  
    4242void ShowConfirmPurchasePage(void); 
    4343void htmlPurchasePage(char *cTitle,char *cTemplateName); 
     44void UpdateCustomerInfo(void); 
    4445unsigned ValidPurchaseInput(void); 
    4546unsigned SubmitRequest(unsigned uInvoice); //payment.c 
     
    102103                        if(!ValidPurchaseInput()) 
    103104                                ShowConfirmPurchasePage(); 
     105                        UpdateCustomerInfo(); 
    104106 
    105107                        //Generate invoice 
     
    277279 
    278280}//void funcPurchaseExpMonth(FILE *fp) 
     281 
     282 
     283void UpdateCustomerInfo(void) 
     284{ 
     285        sprintf(gcQuery,"UPDATE tClient SET cAddr1='%s',cAddr2='%s',cCity='%s',cState='%s'," 
     286                        "cZip='%s',cCountry='CA',cCardNumber='%s',uExpMonth=%u,uExpYear=%u," 
     287                        "cCardName='%s',uModBy=1,uModDate=UNIX_TIMESTAMP(NOW()) WHERE uClient=%u" 
     288                        ,TextAreaSave(cAddr1) 
     289                        ,TextAreaSave(cAddr2) 
     290                        ,TextAreaSave(cCity) 
     291                        ,TextAreaSave(cState) 
     292                        ,TextAreaSave(cZip) 
     293                        ,TextAreaSave(cCardNumber) 
     294                        ,uExpMonth 
     295                        ,uExpYear 
     296                        ,TextAreaSave(cCardName) 
     297                        ,guLoginClient); 
     298        mysql_query(&gMysql,gcQuery); 
     299        if(mysql_errno(&gMysql)) 
     300                htmlPlainTextError(mysql_error(&gMysql)); 
     301 
     302}//void UpdateCustomerInfo(void) 
    279303 
    280304