%
iPageSize = 20
'MDBPATH = "c:\websites\malaysiabudgethotel234\malaysiabudgethotel.com\_private\malaysiabudgethotel.mdb" '// Development Notebook
'MDBPATH = "e:\inetpub\wwwroot\MalaysiaTravel\_Private\malaysiabudgethotel.mdb"
forumDB = "driver={MySQL ODBC 3.51 Driver};server=czehoul.easycgimysql.com;uid=jamietan;pwd=ych55190;database=budget_forum"
mbhDB = "driver={MySQL ODBC 3.51 Driver};server=czehoul.easycgimysql.com;uid=jamie;pwd=ych55190;database=malaysia_budget_hotel"
'Domainname = "localhost/MalaysiaTravel"
DirTour = Server.MapPath("../tours/") & "\"
DirHotel = Server.MapPath("../accommodation/") & "\"
DirHotelRsv = Server.MapPath("../hotel-rsv-req/") & "\"
DirInvoice = Server.MapPath("../invoice/") & "\"
DirVoucher = Server.MapPath("../hotel-voucher/") & "\"
DirReceipt = Server.MapPath("../hotel-receipt/") & "\"
DirTemplate = "c:\websites\malaysiabudgethotel234\malaysiabudgethotel.com\templates\"
DirImage = "c:\websites\malaysiabudgethotel234\malaysiabudgethotel.com\image\"
DirHotelDirectory = "c:\websites\malaysiabudgethotel234\malaysiabudgethotel.com\directory\hotel\"
DirMbhads = "c:\websites\malaysiabudgethotel234\malaysiabudgethotel.com\mbhads\"
DirHome = "c:\websites\malaysiabudgethotel234\malaysiabudgethotel.com\"
DirAdsInvoice = Server.MapPath("../adsInvoice/") & "\"
DirBanInvoice = Server.MapPath("../banInvoice/") & "\"
Domainname = "http://malaysiabudgethotel.com"
'Domainname = "http://localhost/MalaysiaTravel"
HotelFolder = "accommodation/"
UploadsHotelDirVar = "e:\inetpub\wwwroot\MalaysiaTravel\Malaysia_Budget_Hotel"
DefaultPhotoWidth = 110
DefaultPhotoHeight = 150
SendUsing = 2
SMTPServer = "mail.malaysiabudgethotel.com"
SMTPServerPort = 25
FromEmail = "info@malaysiabudgethotel.com"
TourEmail = "info@malaysiabudgethotel.com"
EmailUser = "info@malaysiabudgethotel.com"
EmailPassword = "tan1cheng"
SMTPAuthenticate = 1
uploadsDirVar = Server.MapPath("../mbhads/photos/") & "\"
BannerDirVar = Server.MapPath("../banner/") & "\"
DirTourRsv = Server.MapPath("../tour-rsv-req/") & "\"
DirTourInvoice = Server.MapPath("../tour-invoice/") & "\"
DirTourVoucher = Server.MapPath("../tour-voucher/") & "\"
USD = 3.4
%>
<%
Function GetHash(ByVal Source)
QString = "Source=" & Source
'URL = "http://219.93.203.212:90/DotNet/SHA1Hash.aspx"
URL = "https://www.mobile88.com/DotNet/SHA1Hash.aspx"
'URL = "http://www.mobile88.com/DotNet/SHA1Hash.aspx"
'Response.Write "
" & QString
Dim strReturn, TryNo
'Response.Write Source & "
"
strReturn = ""
TryNo = 1
'While InStr(strReturn,"Success") <= 0 and TryNo <= 3 'F
Set xobj = Server.CreateObject ("MSXML2.ServerXMLHTTP")
xobj.open "POST", URL, false
xobj.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xobj.send QString
strReturn = xobj.responseText
'Response.Write "
strReturn: " & strReturn & "
" Set xobj = nothing GetHash = Mid(strReturn,InStr(strReturn,"")+6,InStr(strReturn," ")-7) ' TryN End Function %> <% '-------------------------------------------------------------------- ' Microsoft ADO ' ' (c) 1996 Microsoft Corporation. All Rights Reserved. ' ' ' ' ADO constants include file for VBScript ' '-------------------------------------------------------------------- '---- CursorTypeEnum Values ---- Const adOpenForwardOnly = 0 Const adOpenKeyset = 1 Const adOpenDynamic = 2 Const adOpenStatic = 3 '---- CursorOptionEnum Values ---- Const adHoldRecords = &H00000100 Const adMovePrevious = &H00000200 Const adAddNew = &H01000400 Const adDelete = &H01000800 Const adUpdate = &H01008000 Const adBookmark = &H00002000 Const adApproxPosition = &H00004000 Const adUpdateBatch = &H00010000 Const adResync = &H00020000 Const adNotify = &H00040000 '---- LockTypeEnum Values ---- Const adLockReadOnly = 1 Const adLockPessimistic = 2 Const adLockOptimistic = 3 Const adLockBatchOptimistic = 4 '---- ExecuteOptionEnum Values ---- Const adRunAsync = &H00000010 '---- ObjectStateEnum Values ---- Const adStateClosed = &H00000000 Const adStateOpen = &H00000001 Const adStateConnecting = &H00000002 Const adStateExecuting = &H00000004 '---- CursorLocationEnum Values ---- Const adUseNone = 1 Const adUseServer = 2 Const adUseClient = 3 Const adUseClientBatch = 3 '---- DataTypeEnum Values ---- Const adEmpty = 0 Const adTinyInt = 16 Const adSmallInt = 2 Const adInteger = 3 Const adBigInt = 20 Const adUnsignedTinyInt = 17 Const adUnsignedSmallInt = 18 Const adUnsignedInt = 19 Const adUnsignedBigInt = 21 Const adSingle = 4 Const adDouble = 5 Const adCurrency = 6 Const adDecimal = 14 Const adNumeric = 131 Const adBoolean = 11 Const adError = 10 Const adUserDefined = 132 Const adVariant = 12 Const adIDispatch = 9 Const adIUnknown = 13 Const adGUID = 72 Const adDate = 7 Const adDBDate = 133 Const adDBTime = 134 Const adDBTimeStamp = 135 Const adBSTR = 8 Const adChar = 129 Const adVarChar = 200 Const adLongVarChar = 201 Const adWChar = 130 Const adVarWChar = 202 Const adLongVarWChar = 203 Const adBinary = 128 Const adVarBinary = 204 Const adLongVarBinary = 205 '---- FieldAttributeEnum Values ---- Const adFldMayDefer = &H00000002 Const adFldUpdatable = &H00000004 Const adFldUnknownUpdatable = &H00000008 Const adFldFixed = &H00000010 Const adFldIsNullable = &H00000020 Const adFldMayBeNull = &H00000040 Const adFldLong = &H00000080 Const adFldRowID = &H00000100 Const adFldRowVersion = &H00000200 Const adFldCacheDeferred = &H00001000 '---- EditModeEnum Values ---- Const adEditNone = &H0000 Const adEditInProgress = &H0001 Const adEditAdd = &H0002 '---- RecordStatusEnum Values ---- Const adRecOK = &H0000000 Const adRecNew = &H0000001 Const adRecModified = &H0000002 Const adRecDeleted = &H0000004 Const adRecUnmodified = &H0000008 Const adRecInvalid = &H0000010 Const adRecMultipleChanges = &H0000040 Const adRecPendingChanges = &H0000080 Const adRecCanceled = &H0000100 Const adRecCantRelease = &H0000400 Const adRecConcurrencyViolation = &H0000800 Const adRecIntegrityViolation = &H0001000 Const adRecMaxChangesExceeded = &H0002000 Const adRecObjectOpen = &H0004000 Const adRecOutOfMemory = &H0008000 Const adRecPermissionDenied = &H0010000 Const adRecSchemaViolation = &H0020000 Const adRecDBDeleted = &H0040000 '---- GetRowsOptionEnum Values ---- Const adGetRowsRest = -1 '---- PositionEnum Values ---- Const adPosUnknown = -1 Const adPosBOF = -2 Const adPosEOF = -3 '---- enum Values ---- Const adBookmarkCurrent = 0 Const adBookmarkFirst = 1 Const adBookmarkLast = 2 '---- MarshalOptionsEnum Values ---- Const adMarshalAll = 0 Const adMarshalModifiedOnly = 1 '---- AffectEnum Values ---- Const adAffectCurrent = 1 Const adAffectGroup = 2 Const adAffectAll = 3 '---- FilterGroupEnum Values ---- Const adFilterNone = 0 Const adFilterPendingRecords = 1 Const adFilterAffectedRecords = 2 Const adFilterFetchedRecords = 3 Const adFilterPredicate = 4 '---- SearchDirection Values ---- Const adSearchForward = 0 Const adSearchBackward = 1 '---- ConnectPromptEnum Values ---- Const adPromptAlways = 1 Const adPromptComplete = 2 Const adPromptCompleteRequired = 3 Const adPromptNever = 4 '---- ConnectModeEnum Values ---- Const adModeUnknown = 0 Const adModeRead = 1 Const adModeWrite = 2 Const adModeReadWrite = 3 Const adModeShareDenyRead = 4 Const adModeShareDenyWrite = 8 Const adModeShareExclusive = &Hc Const adModeShareDenyNone = &H10 '---- IsolationLevelEnum Values ---- Const adXactUnspecified = &Hffffffff Const adXactChaos = &H00000010 Const adXactReadUncommitted = &H00000100 Const adXactBrowse = &H00000100 Const adXactCursorStability = &H00001000 Const adXactReadCommitted = &H00001000 Const adXactRepeatableRead = &H00010000 Const adXactSerializable = &H00100000 Const adXactIsolated = &H00100000 '---- XactAttributeEnum Values ---- Const adXactCommitRetaining = &H00020000 Const adXactAbortRetaining = &H00040000 '---- PropertyAttributesEnum Values ---- Const adPropNotSupported = &H0000 Const adPropRequired = &H0001 Const adPropOptional = &H0002 Const adPropRead = &H0200 Const adPropWrite = &H0400 '---- ErrorValueEnum Values ---- Const adErrInvalidArgument = &Hbb9 Const adErrNoCurrentRecord = &Hbcd Const adErrIllegalOperation = &Hc93 Const adErrInTransaction = &Hcae Const adErrFeatureNotAvailable = &Hcb3 Const adErrItemNotFound = &Hcc1 Const adErrObjectInCollection = &Hd27 Const adErrObjectNotSet = &Hd5c Const adErrDataConversion = &Hd5d Const adErrObjectClosed = &He78 Const adErrObjectOpen = &He79 Const adErrProviderNotFound = &He7a Const adErrBoundToCommand = &He7b Const adErrInvalidParamInfo = &He7c Const adErrInvalidConnection = &He7d Const adErrStillExecuting = &He7f Const adErrStillConnecting = &He81 '---- ParameterAttributesEnum Values ---- Const adParamSigned = &H0010 Const adParamNullable = &H0040 Const adParamLong = &H0080 '---- ParameterDirectionEnum Values ---- Const adParamUnknown = &H0000 Const adParamInput = &H0001 Const adParamOutput = &H0002 Const adParamInputOutput = &H0003 Const adParamReturnValue = &H0004 '---- CommandTypeEnum Values ---- Const adCmdUnknown = &H0008 Const adCmdText = &H0001 Const adCmdTable = &H0002 Const adCmdStoredProc = &H0004 '---- SchemaEnum Values ---- Const adSchemaProviderSpecific = -1 Const adSchemaAsserts = 0 Const adSchemaCatalogs = 1 Const adSchemaCharacterSets = 2 Const adSchemaCollations = 3 Const adSchemaColumns = 4 Const adSchemaCheckConstraints = 5 Const adSchemaConstraintColumnUsage = 6 Const adSchemaConstraintTableUsage = 7 Const adSchemaKeyColumnUsage = 8 Const adSchemaReferentialContraints = 9 Const adSchemaTableConstraints = 10 Const adSchemaColumnsDomainUsage = 11 Const adSchemaIndexes = 12 Const adSchemaColumnPrivileges = 13 Const adSchemaTablePrivileges = 14 Const adSchemaUsagePrivileges = 15 Const adSchemaProcedures = 16 Const adSchemaSchemata = 17 Const adSchemaSQLLanguages = 18 Const adSchemaStatistics = 19 Const adSchemaTables = 20 Const adSchemaTranslations = 21 Const adSchemaProviderTypes = 22 Const adSchemaViews = 23 Const adSchemaViewColumnUsage = 24 Const adSchemaViewTableUsage = 25 Const adSchemaProcedureParameters = 26 Const adSchemaForeignKeys = 27 Const adSchemaPrimaryKeys = 28 Const adSchemaProcedureColumns = 29 %> <% Function DisplayByPage (page,order,strSQL,responsePage,cols,colID,colLink,link,del) Dim iPageCount 'The number of pages we get back Dim iPageCurrent 'The page we want to show Dim strOrderBy 'A fake parameter used to illustrate passing them Dim objPagingRs 'The ADODB recordset object Dim iRecordsShown 'Loop controller for displaying just iPageSize records Dim I 'Standard looping var Dim No Dim UID Dim colList Dim c Dim colNo colList = split(cols,",") ' Retrieve page to show or default to 1 If page = "" Then iPageCurrent = 1 Else 'iPageCurrent = CInt(Request.QueryString("page")) iPageCurrent = CInt(Request("page")) End If ' If you're doing this script with a search or something ' you'll need to pass the sql from page to page. I'm just ' paging through the entire table so I just hard coded it. ' What you show is irrelevant to the point of the sample. 'strSQL = "SELECT * FROM sample ORDER BY id;" ' Sept 30, 1999: Code Change ' Based on the non stop questions about how to pass parameters ' from page to page, I'm implementing it so I can stop answering ' the question of how to do it. I personally think this should ' be done based on the specific situation and is clearer if done ' in the same method on all pages, but it's really up to you. ' I'm going to be passing the ORDER BY parameter for illustration. ' This is where you read in parameters you'll need for your query. ' Read in order or default to id If order = "" Then strOrderBy = "id" Else strOrderBy = order End If if adoConn.ConnectionString = "" Then adoConn.open mbhDB end if ' Create recordset and set the page size Set objPagingRS = Server.CreateObject("ADODB.Recordset") objPagingRS.ActiveConnection = adoConn objPagingRS.CursorType = adOpenStatic objPagingRS.CursorLocation = adUseClient objPagingRS.LockType = adLockReadOnly objPagingRS.PageSize = iPageSize ' You can change other settings as with any RS 'objPagingRS.CursorLocation = adUseClient objPagingRS.CacheSize = iPageSize ' Open RS 'objPagingRS.Open strSQL, adoConn, adOpenStatic, adLockReadOnly, adCmdText 'set objPagingRS = adoConn.execute(strSQL) objPagingRS.open strSQL,adoConn,3,2 ' Get the count of the pages using the given page size iPageCount = objPagingRS.PageCount ' If the request page falls outside the acceptable range, ' give them the closest match (1 or max) If iPageCurrent > iPageCount Then iPageCurrent = iPageCount If iPageCurrent < 1 Then iPageCurrent = 1 ' Check page count to prevent bombing when zero results are returned! If iPageCount = 0 Then DisplayByPage = "No records found!" Else ' Move to the selected page objPagingRS.AbsolutePage = iPageCurrent ' Start output with a page x of n line DisplayByPage = DisplayByPage & "" No=(200*(iPageCurrent-1))+1 DisplayByPage = DisplayByPage & "
" DisplayByPage = DisplayByPage & "" DisplayByPage = DisplayByPage & "" ' All done - close table End If objPagingRS.Close Set objPagingRS = Nothing If iPageCurrent > 1 Then DisplayByPage = DisplayByPage & "[<<Prev] " End If ' You can also show page numbers: For I = 1 To iPageCount If I = iPageCurrent Then DisplayByPage = DisplayByPage & "" & I & " " Else DisplayByPage = DisplayByPage & "" & I & " " End If Next 'I If iPageCurrent < iPageCount Then DisplayByPage = DisplayByPage & " [Next>>]" End If End Function %> <% Const TotalCountry = 196 Dim CountryRec(197) CountryRec(0) = "-Please Choose One-" CountryRec(1) = "Albania" CountryRec(2) = "Algeria" CountryRec(3) = "American Samoa" CountryRec(4) = "Andorra" CountryRec(5) = "Angola" CountryRec(6) = "Antigua And Barbuda" CountryRec(7) = "Argentina" CountryRec(8) = "Aruba" CountryRec(9) = "Austria" CountryRec(10) = "Azerbaijan" CountryRec(11) = "Bahamas" CountryRec(12) = "Bahrain" CountryRec(13) = "Bangladesh" CountryRec(14) = "Barbados" CountryRec(15) = "Belgium" CountryRec(16) = "Belize" CountryRec(17) = "Benin" CountryRec(18) = "Bermuda" CountryRec(19) = "Bhutan" CountryRec(20) = "Bolivia" CountryRec(21) = "Botswana" CountryRec(22) = "Bouvet Island" CountryRec(23) = "Brazil" CountryRec(24) = "British Indian Ocean" CountryRec(25) = "Brunei" CountryRec(26) = "Bulgaria" CountryRec(27) = "Burkina Faso" CountryRec(28) = "Burundi" CountryRec(29) = "Byelorussian" CountryRec(30) = "Cameroon" CountryRec(31) = "Canada" CountryRec(32) = "Cape Verde" CountryRec(33) = "Cayman Islands" CountryRec(34) = "Central African Repu" CountryRec(35) = "Chad" CountryRec(36) = "Chile" CountryRec(37) = "China" CountryRec(38) = "Christmas Islands" CountryRec(39) = "Cocos(Keeling) Island" CountryRec(40) = "Colombia" CountryRec(41) = "Comoros" CountryRec(42) = "Congo" CountryRec(43) = "Cook Islands" CountryRec(44) = "Costa Rica" CountryRec(45) = "Cote D'ivoire" CountryRec(46) = "Croatia" CountryRec(47) = "Cuba" CountryRec(48) = "Cyprus" CountryRec(49) = "Czechoslovakia" CountryRec(50) = "Denmark" CountryRec(51) = "Djibouti" CountryRec(52) = "Dominica" CountryRec(53) = "Dominican Republic" CountryRec(54) = "East Timor" CountryRec(55) = "Ecuador" CountryRec(56) = "Egypt" CountryRec(57) = "El Salvador" CountryRec(58) = "Equatorian Guinea" CountryRec(59) = "Ethiopia" CountryRec(60) = "Faeroe Islands" CountryRec(61) = "Falkland Islands" CountryRec(62) = "Fiji" CountryRec(63) = "Finland" CountryRec(64) = "France" CountryRec(65) = "French Southern Terr" CountryRec(66) = "Gabon" CountryRec(67) = "Gambia" CountryRec(68) = "Germany,Federal Republic" CountryRec(69) = "Ghana" CountryRec(70) = "Gibraltar" CountryRec(71) = "Grenada" CountryRec(72) = "Guatemala" CountryRec(73) = "Guinea-Bissau" CountryRec(74) = "Guyana" CountryRec(75) = "Haiti" CountryRec(76) = "Heard And Mcdonald Island" CountryRec(77) = "Hong Kong" CountryRec(78) = "Hungary" CountryRec(79) = "Iceland" CountryRec(80) = "Indonesia" CountryRec(81) = "Iraq" CountryRec(82) = "Ireland" CountryRec(83) = "Isle Of Man" CountryRec(84) = "Israel" CountryRec(85) = "Italy" CountryRec(86) = "Jamaica" CountryRec(87) = "Japan" CountryRec(88) = "Jordan" CountryRec(89) = "Kampuchea,Democratic" CountryRec(90) = "Kazakstan" CountryRec(91) = "Kenya" CountryRec(92) = "Kirgystan" CountryRec(93) = "Kuwait" CountryRec(94) = "Lao People's Democratic" CountryRec(95) = "Lebanon" CountryRec(96) = "Lesotho" CountryRec(97) = "Libyan Arab Jamahiri" CountryRec(98) = "Liechtenstein" CountryRec(99) = "Luxemborg" CountryRec(100) = "Macau" CountryRec(101) = "Malawi" CountryRec(102) = "Malaysia" CountryRec(103) = "Maldives" CountryRec(104) = "Malta" CountryRec(105) = "Marshall Islands" CountryRec(106) = "Martinique" CountryRec(107) = "Mauritinia" CountryRec(108) = "Mauritius" CountryRec(109) = "Mexico" CountryRec(110) = "Micronesia" CountryRec(111) = "Mongolia" CountryRec(112) = "Morocco" CountryRec(113) = "Mozambique" CountryRec(114) = "Myanmar" CountryRec(115) = "Namibia" CountryRec(116) = "Nauru" CountryRec(117) = "Nepal" CountryRec(118) = "Netherlands" CountryRec(119) = "Neutral Zone" CountryRec(120) = "New Caledonia" CountryRec(121) = "New Zealand" CountryRec(122) = "Nicaragua" CountryRec(123) = "Nigeria" CountryRec(124) = "Niue" CountryRec(125) = "Norway" CountryRec(126) = "Oman" CountryRec(127) = "Others" CountryRec(128) = "Pakistan" CountryRec(129) = "Palau" CountryRec(130) = "Panama" CountryRec(131) = "Papua New Guinea" CountryRec(132) = "Paraguay" CountryRec(133) = "Peru" CountryRec(134) = "Philippines" CountryRec(135) = "Pitcairn" CountryRec(136) = "Poland" CountryRec(137) = "Portugal" CountryRec(138) = "Puerto Rico" CountryRec(139) = "Qatar" CountryRec(140) = "Reunion" CountryRec(141) = "Romania" CountryRec(142) = "Russia" CountryRec(143) = "Rwanda" CountryRec(144) = "Saint Vincent And Th" CountryRec(145) = "Samoa" CountryRec(146) = "San Marino" CountryRec(147) = "Sao Tome And Princip" CountryRec(148) = "Saudi Arabia" CountryRec(149) = "Scotland" CountryRec(150) = "Senegal" CountryRec(151) = "Seychelles" CountryRec(152) = "Sierra Leone" CountryRec(153) = "Singapore" CountryRec(154) = "Solomon Islands" CountryRec(155) = "Somalia" CountryRec(156) = "South Africa" CountryRec(157) = "South Korea" CountryRec(158) = "Spain" CountryRec(159) = "Sri Lanka" CountryRec(160) = "St.Pierre And Miquel" CountryRec(161) = "Sudan" CountryRec(162) = "Suriname" CountryRec(163) = "Svalbard And Jan May" CountryRec(164) = "Swaziland" CountryRec(165) = "Sweden" CountryRec(166) = "Switzerland" CountryRec(167) = "Syrian Arab Republic" CountryRec(168) = "Taiwan" CountryRec(169) = "Tajikestan" CountryRec(170) = "Tanzania,United Republic" CountryRec(171) = "Thailand" CountryRec(172) = "Togo" CountryRec(173) = "Tokelau" CountryRec(174) = "Tonga" CountryRec(175) = "Trinidad And Tobago" CountryRec(176) = "Tunisia" CountryRec(177) = "Turks And Caicos Island" CountryRec(178) = "Tuvalu" CountryRec(179) = "Uganda" CountryRec(180) = "Ukrainian Ssr" CountryRec(181) = "United Kingdom" CountryRec(182) = "United States" CountryRec(183) = "Uruguay" CountryRec(184) = "Uzbekistan" CountryRec(185) = "Vanuatu" CountryRec(186) = "Vatican City State" CountryRec(187) = "Venezuela" CountryRec(188) = "Vietnam" CountryRec(189) = "Virgin Islands (U.S.)" CountryRec(190) = "Wallis And Futuna Island" CountryRec(191) = "Western Samoe" CountryRec(192) = "Yemen,Democratic" CountryRec(193) = "Yugoslavia" CountryRec(194) = "Zaire" CountryRec(195) = "Zambia" CountryRec(196) = "Zimbabwe" %> <% Const TotalState = 18 Dim MalaysiaState(19) MalaysiaState(0) = "-Please Choose One-" MalaysiaState(1) = "Cameron Highlands" MalaysiaState(2) = "Genting Highlands" MalaysiaState(3) = "Johor" MalaysiaState(4) = "Kedah" MalaysiaState(5) = "Kelantan" MalaysiaState(6) = "Kuala Lumpur" MalaysiaState(7) = "Melaka" MalaysiaState(8) = "Negeri Sembilan" MalaysiaState(9) = "Perak" MalaysiaState(10) = "Perlis" MalaysiaState(11) = "Pulau Langkawi" MalaysiaState(12) = "Pulau Perhentian" MalaysiaState(13) = "Pulau Redang" MalaysiaState(14) = "Pulau Tioman" MalaysiaState(15) = "Selangor" MalaysiaState(16) = "Seremban" MalaysiaState(17) = "Terengganu" MalaysiaState(18) = "Sabah" MalaysiaState(19) = "Sarawak" %> <% Dim forumDB Dim mbhDB dim MDBPATH dim DirTour dim DirHotel dim DirHotelRsv dim DirAdsInvoice dim DirInvoice dim DirVoucher dim DirReceipt dim DirTourReceipt dim DirTemplate dim DirImage dim DirHotelDirectory dim DirMbhads dim DirHome dim HotelFolder Dim adoConn Dim memberConn Dim Country Dim iPageSize ' page size Dim Domainname Dim UploadsHotelDirVar Dim DefaultPhotoWidth Dim DefaultPhotoHeight Dim SendUsing Dim SMTPServer Dim SMTPServerPort Dim FromEmail Dim TourEmail Dim EmailUser Dim EmailPassword Dim SMTPAuthenticate Dim USD Dim UrgentAdminFee dim DirTourRsv dim DirTourInvoice dim DirTourVoucher Dim uploadsDirVar Dim BannerDirVar Dim DirBanInvoice Set adoConn = Server.CreateObject("ADODB.Connection") Set memberConn = Server.CreateObject("ADODB.Connection") 'memberConn.Open forumDB session.lcid=2057 Function CheckSelected(Choice1,Choice2) If Choice1 = Choice2 Then CheckSelected = "selected" End If End Function Function GetNextNo(ByVal PKey, ByVal TableName) Dim adoRs strSQL = "SELECT NextNo FROM tbNextPKey WHERE PKey = '" & PKey & "' AND TableName = '" & TableName & "'" if adoConn.ConnectionString = "" then adoConn.open mbhDB end if Set adoRs = adoConn.execute(strSQL) PKey = Replace(PKey, "'", "''") If Not adoRs.eof Then If Not IsNull(adoRs.Fields("NextNo")) Then GetNextNo = adoRs.Fields("NextNo") adoRs.Close adoRs.Open "UPDATE tbNextPKey SET NextNo = " & GetNextNo + 1 & " WHERE PKey = '" & PKey & "'AND TableName = '" & TableName & "'", adoConn Else GetNextNo = -1 End If Else GetNextNo = -1 End If End Function Function Val(strVal) If strVal = "" Or Not IsNumeric(strVal) Then Val = 0 Else Val = CSng(strVal) End If End Function Function IsLoggedIn() if Session("UserID") = "" Then response.redirect "Login.asp?ErrMsg=" else IsLoggedIn=true end if End Function Function IIf(Expression,TruePart,FalsePart) If Expression = True Then IIf=TruePart Else IIf=FalsePart End If End Function Function CurrentDir() Dim Destination, Dest, Pos Destination = split(Request.ServerVariables("URL"),"/") Dest = Destination(ubound(Destination)-1) 'Pos = InStr(Dest,".") 'CurrentDir = Left(Dest,Pos-1) CurrentDir=Dest End Function Function GetHotelNo(HotelCode) Dim adoRs, HotelNo Set adoRs = Server.CreateObject("ADODB.recordset") adoRs.open "SELECT * FROM tbHotel WHERE HotelCode = '" & HotelCode & "'", adoConn HotelNo = adoRs("HotelNo") adoRs.Close GetHotelNo = HotelNo End Function Function GetPhotoWidth(Orientation) If Orientation = "Portrait" Then GetPhotoWidth = DefaultPhotoWidth Else GetPhotoWidth = DefaultPhotoHeight End If End Function Function GetPhotoHeight(Orientation) If Orientation = "Portrait" Then GetPhotoHeight = DefaultPhotoHeight Else GetPhotoHeight = DefaultPhotoWidth End If End Function Function ISODate(dteDate) If IsDate(dteDate) = True Then DIM dteDay, dteMonth, dteYear dteDay = Day(dteDate) dteMonth = Month(dteDate) dteYear = Year(dteDate) ISODate = dteYear & _ "-" & Right(Cstr(dteMonth + 100),2) & _ "-" & Right(Cstr(dteDay + 100),2) Else ISODate = Null End If End Function Function GetHotel(HotelCode) Dim adoRs, Hotel Set adoRs = Server.CreateObject("ADODB.recordset") adoRs.open "SELECT * FROM tbHotel WHERE HotelCode = '" & HotelCode & "'", adoConn Hotel = adoRs("Hotel") adoRs.Close GetHotel = Hotel End Function Function SendEmail(FrmWho,ToWho,CcWho,BccWho,Sbj,Bdy,Atm) Dim sch, cdoConfig, cdoMessage, strHTML sch = "http://schemas.microsoft.com/cdo/configuration/" Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields .Item(sch & "sendusing") = SendUsing .Item(sch & "smtpserver") = SMTPServer .Item(sch & "smtpserverport") = SMTPServerPort .Item(sch & "sendusername") = EmailUser .Item(sch & "sendpassword") = EmailPassword .Item(sch & "smtpauthenticate") = SMTPAuthenticate .update End With Set cdoMessage = CreateObject("CDO.Message") ' build HTML for message body strHTML = "" strHTML = strHTML & "" strHTML = strHTML & "" strHTML = strHTML & Bdy strHTML = strHTML & "" strHTML = strHTML & "" Dim j Dim FilesToAttach FilesToAttach = Split(Atm, ";") For j = 0 To UBound(FilesToAttach) ' Create the mail attachment Dim oMailAttachment 'as MailAttachment = New 'MailAttachment(FilesToAttach(j)) ' Adding the attachment/s to the email message cdoMessage.AddAttachment FilesToAttach(j) Next With cdoMessage Set .Configuration = cdoConfig .From = FrmWho .To = ToWho .CC = CcWho .BCC = BccWho .Subject = Sbj .HTMLBody = strHTML 'if Atm <> "" Then ' .AddAttachment Atm 'End If On Error Resume Next .Send SendEmail=Err 'response.write Err End With 'On Error Resume Next '.send 'SendEmail=Err 'end with Set cdoMessage = Nothing Set cdoConfig = Nothing End Function Function GetNextUserID () Dim adoRs, UserID strSQL = "SELECT MAX(user_id) AS total FROM phpbb_users" set adoRs = memberConn.execute(strSQL) If not adoRs.eof Then UserID = adoRs("total") end if adoRs.Close GetNextUserID = UserID + 1 End Function Function GetDestByURL(Pos,URL) Dim urlStr, pgStr, dest urlStr=Split(URL,"/") If Pos = 0 Then pgStr = Split(urlStr(ubound(urlStr)),".") dest = pgStr(0) End If If Pos = 1 Then dest = urlStr(ubound(urlStr)-1) End If GetDestByURL = dest End Function Function MySQLDate(Dt) MySQLDate = Year(Dt) & "-" & Right("0" & Month(Dt),2) & "-" & Right("0" & Day(Dt),2) End Function Function ReadFileOnly(TemplatePath) Dim filesys, filetxt , StrLineTxt Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set filesys = CreateObject("Scripting.FileSystemObject") Set filetxt = filesys.OpenTextFile(TemplatePath, ForReading, False) Do While Not filetxt.AtEndOfStream StrLineTxt = StrLineTxt & filetxt.ReadLine Loop filetxt.Close ReadFileOnly = StrLineTxt End Function Sub WriteFileOnly(FilePath, StrLineTxt) Dim filesys, filetxt Dim getname, path Set filesys = CreateObject("Scripting.FileSystemObject") Set filetxt = filesys.CreateTextFile(FilePath, True) path = filesys.GetAbsolutePathName(FilePath) getname = filesys.GetFileName(path) filetxt.WriteLine(StrLineTxt) filetxt.Close If filesys.FileExists(path) Then Response.Write ("Your file, '" & getname & "', has been created.") End If End Sub function Rnd5(no) dim val, x no = FormatNumber(no,1) val = (no * 10) mod 10 if val <= 3 then x = no - (val/10) elseif val > 3 and val <= 7 then x = (no - (val/10)) + 0.5 elseif val >=8 then x = (no - (val/10)) + 1 end if 'response.write "round no=" & x Rnd5 = x End Function Function IsAllotment(hotel,room) Dim adoRs, strSQL, HotelAllotment, allotment, AllotmentFlag Set adoRs = Server.CreateObject("ADODB.recordset") strSQL = "SELECT IsAllotment FROM tbHotel WHERE HotelNo = " & hotel adoRs.Open strSQL, adoConn HotelAllotment = adoRs("IsAllotment") adoRs.Close strSQL = "SELECT Allotment FROM tbHotelRoom WHERE HotelNo = " & hotel & " AND RoomCode = '" & room & "'" adoRs.Open strSQL, adoConn If Not adoRs.EOF Then allotment = adoRs("Allotment") Else allotment = 0 End If AllotmentFlag = True If HotelAllotment = 0 Then AllotmentFlag = False Else If CInt(allotment) = 0 Then AllotmentFlag = False End If End If IsAllotment = AllotmentFlag End Function Function GetRefNo(BookingNo) GetRefNo = "MBH/" & Year(Date()) & "/H" & right(("0000" & BookingNo),5) End Function Function GetAdsRefNo(AdsNo) GetAdsRefNo = "MBH/" & Year(Date()) & "/A" & right(("0000" & AdsNo),5) End Function Function GetBanRefNo(AdsNo) GetBanRefNo = "MBH/" & Year(Date()) & "/B" & right(("0000" & AdsNo),5) End Function Function GetMerchantCode() Dim adoRs Set adoRs = Server.CreateObject("ADODB.recordset") adoRs.Open "SELECT * FROM tbOnlinePayment", adoConn GetMerchantCode = adoRs("MerchantCode") End Function Function GetSignature(PaymentId,RefNo,Amount,Status) Dim adoRs, MerchantKey, MerchantCode, Cur, Str Set adoRs = Server.CreateObject("ADODB.recordset") adoRs.Open "SELECT * FROM tbOnlinePayment", adoConn MerchantKey = adoRs("MerchantKey") MerchantCode = adoRs("MerchantCode") Cur = adoRs("Currency") Str = MerchantKey & MerchantCode & PaymentId & RefNo & Replace(Replace(Amount,".",""),",","") & Cur & Status GetSignature = GetHash(Str) End Function Function SecurePayment(HTTP_REFERER,PaymentId,RefNo,Amount,Signature,Status) Dim ErrMsg, ErrCnt, http, url, referrer ErrCnt = 0 http = split(HTTP_REFERER,"//") url = split(http(1),"/") referrer = http(0) & "//" & url(0) If lcase(referrer) <> "https://www.mobile88.com" Then ErrCnt = ErrCnt + 1 ErrMsg = "HTTP_REFERER is not from https://www.mobile88.com" & "" if del=true Then DisplayByPage = DisplayByPage & " " iRecordsShown = 0 Do While iRecordsShown < iPageSize And Not objPagingRS.EOF iRecordsShown = iRecordsShown + 1 DisplayByPage = DisplayByPage & "" End If If Not objPagingRS.EOF Then for c = 0 to ubound(colList) 'Dim colNo colNo = Val(colList(c)) DisplayByPage = DisplayByPage & " " & objPagingRs.Fields(colNo).Name & " " next End If DisplayByPage = DisplayByPage & "" if del = true then DisplayByPage = DisplayByPage & " " ' Can't forget to move to the next record! objPagingRS.MoveNext Loop DisplayByPage = DisplayByPage & "" DisplayByPage = DisplayByPage & "" DisplayByPage = DisplayByPage & " " end if for c = 0 to ubound(colList) 'Dim colNo colNo = Val(colList(c)) If colLink > -1 and colNo = colLink Then DisplayByPage = DisplayByPage & "" DisplayByPage = DisplayByPage & "" DisplayByPage = DisplayByPage & " " & objPagingRs(colNo) & "" DisplayByPage = DisplayByPage & " " Else DisplayByPage = DisplayByPage & "" DisplayByPage = DisplayByPage & " " End If next DisplayByPage = DisplayByPage & "" & objPagingRs(colNo) & "
" DisplayByPage = DisplayByPage & "
" End If If Session("Amount") <> Amount Then ErrCnt = ErrCnt + 1 ErrMsg = ErrMsg & "Payment amount from Mobile88 does not match ours" & "
" End If 'response.write "my sign is " & GetSignature(PaymentId,RefNo,Amount,Status) & "
" If GetSignature(PaymentId,RefNo,Amount,Status) <> Signature Then ErrCnt = ErrCnt + 1 ErrMsg = ErrMsg & "Signatrue from Mobile88 does not match ours" End If If ErrCnt = 0 Then SecurePayment = 1 Else Bdy = "There is an unsecured payment for booking " & Session("RefNo") & " with the following errors." & "
" Bdy = Bdy & ErrMsg SendEmail FromEmail,FromEmail,"","","Unsecure Payment - " & Session("RefNo"),Bdy,"" SecurePayment = 0 End If End Function Function SendToPaymexInq(byval MerchantCode, RefNo, Amount) QString="MerchantCode=" & MerchantCode & "&RefNo=" & RefNo & "&Amount=" & Amount URL = "https://www.mobile88.com/epayment/enquiry.asp" strReturn = "" Set xobj = Server.CreateObject ("MSXML2.ServerXMLHTTP") xobj.open "POST", URL, false xobj.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xobj.send QString strReturn = xobj.responseText Set xobj = nothing SendToPaymexInq = strReturn End Function Function CheckRoomRate(HotelNo, RoomCode, AccoDate) Dim adoRsRT, strSQL, Normal, Rate, IsNormal Set adoRsRT = Server.CreateObject("ADODB.recordset") strSQL = "SELECT * FROM tbHotelRateType WHERE HotelNo = " & HotelNo & " ORDER BY RateTypeNo DESC" adoRsRT.Open strSQL, adoConn IsNormal = true 'response.write "AccoDate=" & AccoDate & "
" Do While Not adoRsRT.EOF 'response.write adoRsRT("RateTypeNo") & "
" 'response.write "PublicHOliday=" & adoRsRT("PublicHoliday") & "
" 'response.write "SchoolHOliday=" & adoRsRT("SchoolHoliday") & "
" 'response.write "Other=" & adoRsRT("Other") & "
" If adoRsRT("PublicHoliday")=0 and adoRsRT("SchoolHoliday")=0 and adoRsRT("Other")=0 and adoRsRT("Friday")=0 and adoRsRT("Saturday")=0 and adoRsRT("Sunday")=0 Then Normal = adoRsRT("RateTypeNo") End If If adoRsRT("Other") = 1 Then ' if other holiday charge other holiday rate 'response.write "Other flag" If IsOtherHoliday(AccoDate,adoRsRT("RateTypeNo")) Then Rate = GetRate(HotelNo,RoomCode,adoRsRT("RateTypeNo")) 'response.write HotelNo & "
" 'response.write adoRsRT("RateTypeNo") & "
" IsNormal = false Exit Do End If End If ' if publicholiday charge publicholiday rate If adoRsRT("PublicHoliday") = 1 Then 'response.write "PublicHoliday flag" If IsHoliday(AccoDate) Then Rate = GetRate(HotelNo,RoomCode,adoRsRT("RateTypeNo")) IsNormal = false Exit Do End If End If If adoRsRT("SchoolHoliday") = 1 Then ' if schoolholiday charge schoolholiday rate 'response.write "SchoolHoliday flag" If IsSchoolHoliday(AccoDate) Then Rate = GetRate(HotelNo,RoomCode,adoRsRT("RateTypeNo")) IsNormal = false Exit Do End If End If If adoRsRT("Friday") = 1 and Weekday(DateValue(AccoDate)) = 6 Then ' if friday 'response.write "Friday
" Rate = GetRate(HotelNo,RoomCode,adoRsRT("RateTypeNo")) IsNormal = false Exit Do End If If adoRsRT("Saturday") = 1 and Weekday(DateValue(AccoDate)) = 7 Then ' if saturday 'response.write "Saturday
" Rate = GetRate(HotelNo,RoomCode,adoRsRT("RateTypeNo")) IsNormal = false Exit Do End If If adoRsRT("Sunday") = 1 and Weekday(DateValue(AccoDate)) = 1 Then ' if sunday 'response.write "Sunday
" Rate = GetRate(HotelNo,RoomCode,adoRsRT("RateTypeNo")) IsNormal = false Exit Do 'Else 'normal 'Rate = GetRate(HotelNo,RoomCode,Normal) 'Exit Do End If adoRsRT.MoveNext Loop adoRsRT.Close If IsNormal Then Rate = GetRate(HotelNo,RoomCode,Normal) End If CheckRoomRate = Rate End Function Function IsHoliday(AccoDate) Dim adoRsHol, strSQL, holiday Set adoRsHol = Server.CreateObject("ADODB.recordset") holiday = false strSQL = "SELECT * FROM tbHoliday WHERE (HolidayDate = '" & MySQLDate(DateValue(AccoDate)) & "' AND PublicHoliday = 1) OR (HolidayDate = '" & MySQLDate(DateValue(AccoDate)) & "' AND EvePublicHoliday=1)" adoRsHol.Open strSQL, adoConn If Not adoRsHol.EOF Then holiday = true End If adoRsHol.Close IsHoliday = holiday End Function Function IsSchoolHoliday(AccoDate) Dim adoRsHol, strSQL, holiday Set adoRsHol = Server.CreateObject("ADODB.recordset") holiday = false strSQL = "SELECT * FROM tbHoliday WHERE HolidayDate = '" & MySQLDate(DateValue(AccoDate)) & "' AND SchoolHoliday = 1" adoRsHol.Open strSQL, adoConn If Not adoRsHol.EOF Then holiday = true End If adoRsHol.Close IsSchoolHoliday = holiday End Function Function IsOtherHoliday(AccoDate, RateTypeNo) Dim adoRsHol, strSQL, holiday Set adoRsHol = Server.CreateObject("ADODB.recordset") holiday = false strSQL = "SELECT * FROM tbHotelRateTypeOther WHERE RateDate = '" & MySQLDate(DateValue(AccoDate)) & "' AND RateTypeNo = " & RateTypeNo adoRsHol.Open strSQL, adoConn 'response.write strSQL & "
" If Not adoRsHol.EOF Then holiday = true End If adoRsHol.Close IsOtherHoliday = holiday End Function Function GetRate(HotelNo,RoomCode,RateTypeNo) Dim adoRsRate, strSQL, rate Set adoRsRate = Server.CreateObject("ADODB.recordset") strSQL = "SELECT * FROM tbHotelRoomRate WHERE HotelNo = " & HotelNo & " AND RoomCode = '" & RoomCode & "' AND RateTypeNo = " & RateTypeNo adoRsRate.Open strSQL, adoConn rate = adoRsRate("Rate") adoRsRate.Close 'response.write strSQL & "
" 'rate = 0 GetRate = rate End Function Function GetRunningNo() Dim adoRs strSQL = "SELECT RunningNo FROM tbOnlinePayment" if adoConn.ConnectionString = "" then adoConn.open mbhDB end if Set adoRs = adoConn.execute(strSQL) PKey = Replace(PKey, "'", "''") If Not adoRs.eof Then If Not IsNull(adoRs.Fields("RunningNo")) Then GetRunningNo = adoRs.Fields("RunningNo") adoRs.Close adoRs.Open "UPDATE tbOnlinePayment SET RunningNo = " & GetRunningNo + 1 , adoConn Else GetRunningNo = -1 End If Else GetRunningNo = -1 End If End Function Function IsUrgentBooking(CheckInDate) 'booking 7 days in advance (incl. sat & sun) is consider as urgent booking If DateDiff("d",Date(),DateValue(CheckInDate)) <= 7 Then IsUrgentBooking = True Else IsUrgentBooking = False End If End Function Function CheckRoomAvailability(HotelNo,RoomCode,AccoDate,NoUnit) Dim adoRs, strSQL Dim Allotment, BookedUnit, HeldUnit, AvailableUnit, BlockedUnit Set adoRs = Server.CreateObject("ADODB.recordset") strSQL = "SELECT Allotment FROM tbHotelRoom WHERE HotelNo = " & HotelNo & " AND RoomCode = '" & RoomCode & "'" adoRs.Open strSQL, adoConn Allotment = CInt(adoRs("Allotment")) adoRs.Close strSQL = "SELECT NoRoom FROM tbHotelBooking WHERE HotelNo = " & HotelNo & " AND RoomCode = '" & RoomCode & "' AND CheckIn <= '" & MySQLDate(AccoDate) & "' AND CheckOut > '" & MySQLDate(AccoDate) & "'" adoRs.Open strSQL, adoConn If Not adoRs.EOF Then BookedUnit = CInt(adoRs("NoRoom")) Else BookedUnit = 0 End If adoRs.Close strSQL = "SELECT SessionId, NoRoom FROM tbHotelRoomHold WHERE HotelNo = " & HotelNo & " AND RoomCode = '" & RoomCode & "' AND AccoDate = '" & MySQLDate(AccoDate) & "'" adoRs.Open strSQL, adoConn If Not adoRs.EOF Then Do While Not adoRs.EOF If CStr(Session("SessionID")) <> CStr(adoRs("SessionId")) Then HeldUnit = HeldUnit + CInt(adoRs("NoRoom")) End If adoRs.MoveNext Loop Else HeldUnit = 0 End If adoRs.Close 'check blocked unit strSQL = "SELECT BlockedUnit FROM tbHotelRoomBlock WHERE HotelNo = " & HotelNo & " AND RoomCode = '" & RoomCode & "' AND FromDate <= '" & MySQLDate(AccoDate) & "' AND ToDate >= '" & MySQLDate(AccoDate) & "'" adoRs.Open strSQL, adoConn If Not adoRs.EOF Then BlockedUnit = adoRs("BlockedUnit") Else BlockedUnit = 0 End If adoRs.Close AvailableUnit = Allotment - BookedUnit - HeldUnit - BlockedUnit If CInt(AvailableUnit) >= CInt(NoUnit) Then CheckRoomAvailability = NoUnit HoldRoom AccoDate Else CheckRoomAvailability = 0 End If End Function Sub UnholdRoom() Dim adoRs, strSQL Set adoRs = Server.CreateObject("ADODB.recordset") strSQL = "DELETE FROM tbHotelRoomHold WHERE TIMEDIFF(NOW(),CreatedDate) > TIME('00:02:00')" adoRs.Open strSQL, adoConn End Sub Sub HoldRoom(AccoDate) Dim adoRs, strSQL, HoldId Set adoRs = Server.CreateObject("ADODB.recordset") HoldId = GetNextNo("HoldId", "tbHotelRoomHold") adoRs.Open "SELECT * FROM tbHotelRoomHold WHERE SessionId = " & Session("SessionId") & " AND HotelNo=" & Session("HotelNo") & " AND RoomCode='" & Session("RoomCode") & "' AND AccoDate='" & MySQLDate(AccoDate) & "'", adoConn If adoRs.EOF Then strSQL = "INSERT INTO tbHotelRoomHold (HoldId,HotelNo,RoomCode,SessionId,CreatedDate,NoRoom,AccoDate) VALUES (" & HoldId & "," & Session("HotelNo") & ",'" & Session("RoomCode") & "'," & Session("SessionID") & ",Now()," & Session("NoUnit") & ",'" & MySQLDate(AccoDate) & "')" Else strSQL = "UPDATE tbHotelRoomHold SET HotelNo=" & Session("HotelNo") & ", RoomCode='" & Session("RoomCode") & "',NoRoom=" & Session("NoUnit") & ",AccoDate='" & MySQLDate(AccoDate) & "' WHERE SessionId=" & Session("SessionId") End If adoRs.Close adoRs.Open strSQL, adoConn 'response.write "HoldId=" & Session("HoldId") 'adoRs.Open strSQL, adoConn End Sub Sub ReleaseHoldedRoom(AccoDate) Dim adoRs, strSQL Set adoRs = Server.CreateObject("ADODB.recordset") strSQL = "DELETE FROM tbHotelRoomHold WHERE SessionId = " & Session("SessionId") & " AND HotelNo=" & Session("HotelNo") & " AND RoomCode='" & Session("RoomCode") & "' AND AccoDate='" & MySQLDate(AccoDate) & "'" adoRs.Open strSQL, adoConn End Sub Function GetMenu() Dim CurPath, ArrCurPath, ArrFolder CurPath = LCase("http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("URL")) ArrCurPath = split(CurPath,LCase(Domainname)) ArrFolder = split(ArrCurPath(1), "/") GetMenu = ArrFolder(1) End Function Function AccessRights(role,hotelno) Dim adoRs, access Set adoRs = Server.CreateObject("ADODB.recordset") adoRs.Open "SELECT * FROM tbUserRole UR INNER JOIN tbRole R ON UR.RoleId=R.RoleId WHERE R." & role & "=1 AND UR.UserId=" & Session("UserId"), memberConn 'response.write "SELECT * FROM tblACUserRole UR INNER JOIN tblACRole R ON UR.RoleId=R.RoleId WHERE R." & role & "=1 AND UR.UserId=" & Session("UserId") If adoRs.EOF Then access = false Else access = true End If adoRs.Close 'if User is hotel and hotelno<>empty, check whether hotelno=user If hotelno<>"" Then adoRs.Open "SELECT * FROM tbUserHotel WHERE UserId=" & Session("UserId") & " AND HotelNo=" & hotelno, adoConn If adoRs.EOF Then access = false Else access = true End If End If 'adoRs.Close AccessRights = access End Function Function GetHotelNo(UserId) Dim adoRs, HotelNo, strSQL Set adoRs = Server.CreateObject("ADODB.recordset") strSQL = "SELECT HotelNo FROM tbUserHotel WHERE UserId=" & UserId 'response.write strSQL adoRs.Open strSQL, adoConn If adoRs.EOF Then HotelNo = 0 Else HotelNo = adoRs("HotelNo") End If 'adoRs.Close GetHotelNo = HotelNo End Function Function IsBlockAll(HotelNo, RoomCode, AccoDate) Dim BlockAll 'check blocked unit strSQL = "SELECT BlockedUnit FROM tbHotelRoomBlock WHERE HotelNo = " & HotelNo & " AND RoomCode = '" & RoomCode & "' AND FromDate <= '" & MySQLDate(AccoDate) & "' AND ToDate >= '" & MySQLDate(AccoDate) & "' AND BlockType='All'" adoRs.Open strSQL, adoConn If Not adoRs.EOF Then BlockAll = true Else BlockAll = false End If adoRs.Close 'response.write "blockall=" & BlockAll IsBlockAll = BlockAll End Function Function GetPaymentMethodId(PaymentMethod) Select Case PaymentMethod Case "ATM" GetPaymentMethodId= 0 Case "Credit Card" GetPaymentMethodId= 2 Case "Maybank" GetPaymentMethodId= 6 Case "Alliance" GetPaymentMethodId= 8 Case "RHB" GetPaymentMethodId= 14 Case "Hong Leong" GetPaymentMethodId= 15 Case "FPX" GetPaymentMethodId= 16 End Select End Function dim ss, ds, ts, qs ss = "one,two,three,four,five,six,seven,eight,nine" ds = "ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen," & _ "seventeen,eighteen,nineteen" ts = "twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety" qs = ",thousand,million,billion" Function nnn2words(iNum) a = split(ss,",") i = iNum mod 10 if i > 0 then s = a(i-1) ii = int(iNum mod 100)\10 if ii = 1 then s = split(ds,",")(i) elseif ((ii>1) and (ii<10)) then s = split(ts,",")(ii-2) & " " & s end if i = (iNum \ 100) mod 10 if i > 0 then s = a(i-1) & " hundred " & s nnn2words = s End Function Function num2words(iNum) i = iNum if i < 0 then b = true: i = i*-1 if i = 0 then s="zero" elseif i <= 2147483647 then a = split(qs,",") for j = 0 to 3 iii = i mod 1000 i = i \ 1000 if iii > 0 then s = nnn2words(iii) & _ " " & a(j) & " " & s next else s = "out of range value" end if if b then s = "negative " & s num2words = trim(s) End Function Function GetEncrypt(byval stringToBeEncrypted) QString="stringToBeEncrypted=" & stringToBeEncrypted & "&RefNo=" & RefNo & "&Amount=" & Amount URL = "http://malaysiabudgethotel.com/AddBook.asmx/HelloWorld" strReturn = "" Set xobj = Server.CreateObject ("MSXML2.ServerXMLHTTP") xobj.open "POST", URL, false xobj.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xobj.send QString strReturn = xobj.responseText Set xobj = nothing GetEncrypt = strReturn End Function Function GetAdsPacType(ByVal HotelNo) Dim AdsPacType AdsPacType = "" adoConn.Open mbhDB Set adoRs = Server.CreateObject("ADODB.recordset") strSQL = "SELECT AdsPacType FROM tbHotelAdsPac WHERE HotelNo = " & CInt(HotelNo) adoRs.Open strSQL, adoConn If Not adoRs.EOF Then AdsPacType = adoRs("AdsPacType") End If adoConn.Close() GetAdsPacType = AdsPacType End Function %><% if Request.ServerVariables("URL") = "/Login.asp" or Request.ServerVariables("URL") = "/logout.asp" then else session("URL")="http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") & "?" & Request.ServerVariables("QUERY_STRING") end if %>
<% dim url url = Request.ServerVariables("URL") url = split(url,"/") select case url(1) case "cheap-accommodation.html" response.write "Cheap Accommodation in Malaysia | Malaysia Budget Hotels" case "accommodation" select case url(2) case "kuala-lumpur-hostels.html" response.write "Budget Hotels Kuala Lumpur | Kuala Lumpur Cheap Accommodation, Malaysia" case "penang-hostels.html" response.write "Budget Hotels Penang | Penang Cheap Accommodation, Malaysia" case "melaka-hostels.html" response.write "Budget Hotels Melaka | Melaka Cheap Accommodation, Malaysia" case else response.write "Cheap Accommodation in Malaysia | Malaysia Budget Hotels" end select case "tour.html" response.write "Budget Malaysia Tours | Malaysia Travel Packages" case "tours" response.write "Budget Tour Packages in Malaysia" case "destinations.html" response.write "Places of Interest in Malaysia | Malaysia Destinations" case "destinations" response.write "Malaysia Destinations | Places of Interest in Malaysia" case "transportation.html" response.write "Malaysia Transportation" case "transportation" response.write "Malaysia Transportation" case "traveller-tips.html" response.write "Malaysia Backpacking Tips" case "tips" response.write "Malaysia Backpacking Tips" case else response.write "Malaysia Budget Hotel" end select %>
<% Dim urlSplit, loc, st, defaultImage, IsBanner defaultImage = Domainname & "/image/menu-bar-cut.jpg" IsBanner = 0 Set adoRsBanner = Server.CreateObject("ADODB.recordset") adoConn.Open mbhDB urlSplit = Split(Request.ServerVariables("URL"), "/") If Ubound(urlSplit) > 0 Then loc = urlSplit(1) End If 'response.write Trim(LCase(loc)) & "
" strSQL = "SELECT i.Image, i.URL, b.Width, b.Height, i.Location, i.StateCode, i.HotelNo, '' HotelCode FROM tbbannerorderitem i, tbbannertype b WHERE b.BannerID = i.BannerID AND i.BannerID = 'L' AND i.HotelNo = 0" strSQL = strSQL & " UNION " strSQL = strSQL & " SELECT i.Image, i.URL, b.Width, b.Height, i.Location, i.StateCode, i.HotelNo, h.HotelCode FROM tbbannerorderitem i, tbbannertype b, tbhotel h WHERE b.BannerID = i.BannerID AND i.HotelNo = h.HotelNo AND i.BannerID = 'L' AND i.HotelNo <> 0" adoRsBanner.Open strSQL, adoConn If Not adoRsBanner.EOF Then Do While Not adoRsBanner.EOF Select Case adoRsBanner("Location") Case "S" If Trim(LCase(loc)) = "accommodation" Then If Ubound(urlSplit) = 2 Then st = LCase(urlSplit(2)) 'response.write st & "
" If InStr(st, LCase(adoRsBanner("StateCode"))) > 0 Then IsBanner = 1 %><% End If End If End If Case "H" If Trim(LCase(loc)) = "accommodation" Then If Ubound(urlSplit) > 2 Then st = LCase(urlSplit(2)) 'response.write st & " " target="_blank"> " height="<%=adoRsBanner("Height")%>" width="<%=adoRsBanner("Width")%>" alt="<%=adoRsBanner("URL")%>">
" 'response.write LCase(adoRsBanner("StateCode")) & "
" If InStr(st, LCase(adoRsBanner("StateCode"))) > 0 Then ht = LCase(urlSplit(3)) 'response.write ht & "
" If InStr(ht, LCase(adoRsBanner("HotelCode"))) > 0 Then IsBanner = 1 %><% End If End If ElseIf Ubound(urlSplit) = 2 Then 'response.write Ubound(urlSplit) & " "> " height="<%=adoRsBanner("Height")%>" width="<%=adoRsBanner("Width")%>" alt="<%=adoRsBanner("URL")%>">
" ht = LCase(urlSplit(2)) 'response.write ht & "
" If LCase(ht) = "hotel.asp" Then htSplit = Split(Request.ServerVariables("QUERY_STRING"), "=") ht = EnDeCrypt(Request("h"),"hOtElpAsswOrd") 'response.write htSplit(1) & "
" 'response.write ht & "
" 'response.write adoRsBanner("HotelNo") & "
" If CInt(ht) = CInt(adoRsBanner("HotelNo")) Then IsBanner = 1 %><% End If End If End If End If End Select adoRsBanner.MoveNext Loop End If adoRsBanner.Close adoConn.Close If IsBanner = 0 Then %> "> " height="<%=adoRsBanner("Height")%>" width="<%=adoRsBanner("Width")%>" alt="<%=adoRsBanner("URL")%>">
<% End If %> World Budget Hotels and Accommodation
List of world low cost accommodation which includes budget hotels, youth hostels, cheap accommodation, homestay, farmstay, guesthouses, and more. To suggest a link or add your website link go to Submit Link
Istanbul Hotel Istanbul Hotels - Discount Hotels Istanbul
Your booking engine to the best Istanbul Hotels, city sightseeing tours, Anatolian tours. Find the vacation more than your expectations.
Bed and Breakfasts UK. Budget hotels in the UK.
A guide to bed and breakfast accommodation in the United Kingdom.
Budget Hotels - 1 & 2 Star Cheap Central London Hotels @ London Discount Hotel
We are one of London's premier hotel booking agencies. With more than 100 hotels and apartments online, our objective is to make it easy for you to find and book hotels and apartments in London, the most exciting city in Europe!
Etap Hotel: online budget hotel reservation for business or leisure
Etap Hotel online reservation: discount hotel rates in France, Germany and throughout Europe for leisure or business travel. Find a budget hotel for your accommodation near your location.
Fragrance Hotel- Singapore budget hotel with affordable rates and 15mins away from Singapore international airport
New budget hotel in Singapore located close to the international airport and Singapore EXPO. Cheap and affordable. Contact us at (65) 6345 6116 or contact@fragrancehotel.com
Hotel Claremont; Melbourne budget accommodation, hotels and cheap serviced apartments in South Yarra Melbourne Australia
Great value budget accommodation in South Yarra Melbourne Australia. Cheap accommodation, guest house style rooms. Bed and breakfast available from hotel. Suit back-packers, family, anyone looking for good cheap holiday accommodation.
London Budget Accommodation Guide
Budget. LondonNet's guide to the best budget accommodation in London. Featuring yha and private hostels, student halls and campsites, travel talkback
Staying on a budget in Britain. Travel lodges and Budget hotels in Britain
Staying on a budget in Britain ? We list all the Travel lodges and Budget hotels in Britain. Check Availablity instantly and book travelodges online throughout Britain.
Thailand Budget & Cheap hotels-A great collection of quality, inexpensive hotels in Bangkok.
A good starting point for budget & cheap conscious travelers seeking inexpensive, low cost Bangkok hotels. All rooms are from $12 to $80 US dollars.
Vancouver Budget Hotel - Patricia Inn Accommodations British Columbia, Canada
The Patricia Inn Hotel offers Vancouver budget hotel accommodations with all the amenities and easy access to downtown, tourist attractions, and entertainment.
Information on Paris: Paris Hotels, many monuments such as the Eiffel Tower, restaurants, hot spots
A Paris guide written and maintained by local dwellers. Hundreds of pages of information on Paris, including hotels, monuments, local spots, walk-on tours. Paris Eiffel Tower News offers valuable tourism information.
Budget Hotel Delhi, Budget hotels stay New Delhi Cheap Hotel Reservation Accommodation Paharganj, New Delhi India
Budget hotel accomodation, cheap hotel rooms in New Delhi, Cheap Accommodation, Discounted Hotel Rooms delhi, bed and breakfast India offers Budget Accommodation, luxury Stay, discount deluxe hotels paharganj with Bed and Breakfast Rooms
Budget London Hotels - Discount London Hotels
Budget London Hotels
Budget hotels Edinburgh City centre accommodation, Scotland
Parliament House Hotel Edinburgh, budget Edinburgh city centre hotels accommodation, located adjacent to Edinburgh's Princes Street. Great location, friendly service, restaurant, bar and special offers.
Cheap Central London Hotel-Hanover Hotel in Central London Victoria Bed and Breakfast Hotels UK
Cheap central London hotel offering superior quality budget accomodation. For excellent bed and breakfast facility in a prime location in central London, come to Hanover Hotel now
Contact Us - Otel.com | Cheap Hotels | Discount Hotels | Budget Hotels | Cheap Hotel | Discount Hotel | Budget Hotel | Hotel Finder
Otel.com | Cheap Hotels | Discount Hotels | Budget Hotels | Cheap Hotel | Discount Hotel | Budget Hotel | Hotel Finder
Imperial Hotels London Accommodation, Hotel, Hotels, Budget Accommodation, Budget Hotels, Wimbledon Tennis Accommodation, Conference Facilities, Banqueting Facilities, Tourist Attractions, Hotels London, Cheap Accommodation London, B & B London
Imperial London Hotels - a chain of family run hotels, with over 5,000 beds in Central London
London Budget Hotel - Discounted London Hotel - London Accommodation - British Hotel Reservation Centre
The British Hotel Reservation Centre offers availability in all London budget hotels. Discounted London hotels in central London locations can be booked online.
Small budget hotels in Edinburgh Scotland
A small, personally owned budget four star hotel Edinburgh hotels, offering a high standard of service and accommodation with a central Murrayfield location for budget prices. Try the Dunstane House Hotel.
cheaphotels: Cheap, budget hotels in Shanghai that offer good facility, service, cl...
Cheap, budget hotels in Shanghai that offer good facility, service, clean beds, and good locations....
youth hostel hotel apartment accommodation online booking england london vacation rental
Studios92.com is your specialist in accommodation for London, England and Europe - We offer Flatshare, Apartments, Youth Hostels and Hotels for everybody at a reasonable price range.
+ welcome to Hotel 81 +
Singapore largest top value tourist class budget hotel chain at various locations (including near city and in city centre). Enjoy your stay in Singapore with our friendly staff and affordable prices. Contact us at +65 6476 8181 or hotel81@hotel81.com.sg
Budget Hotels in Delhi,Budget Hotel in Delhi,Budget Hotels in New Delhi,Budget Hotel in New Delhi India,Delhi Budget Hotels,New Delhi Budget Hotels,New Delhi Hotels
Budget Hotels in Delhi - Offering reservation of budget hotels in new delhi, budget hotel in delhi, budget hotels in new delhi, budget hotel in new delhi india, hotels in new delhi, new delhi budget hotels, delhi budget hotel, delhi hotels, new delhi hotels, delhi budget hotels like Hotel Yuvraj Deluxe, Chand Palace Hotel, Hotel Pallavi Palace, Hotel Mohan International in Delhi.
Cheap Edinburgh hotels, Budget Hotel in Edinburgh - Allison House
Cheap Edinburgh Hotel - The 3 Star Allison House City Centre Hotel. A Traditional 3 Star budget edinburgh hotel offering a bar, relaxing rooms, special offers and weekend breaks in Edinburgh City Centre.
Cheap Hotels Glasgow, Airport Hotel and West End Accommodation - Lomond Group
The Lomond Glasgow Hotels are a group based in West Central Scotland. Our Glasgow Hotel offers the ideal location to take advantage of city's sensational nightlife.
Hotel specials, budget hotels, boutique hotels, last minute bookings, cheap hotel rates, Sydney Australia - sydney.com.au
Budget hotels and cheap accomodation in Sydney, Australia.
Hotels in Delhi,Budget Hotels,Guest House Delhi,Cheap Hotels,Accomodation in Delhi,Guest Houses New Delhi,3 Star Luxury Hotel,Economy Hotel New Delhi,Accommodation Karol Bagh,India
Classic Hotel is a 3 Star hotels in delhi,budget hotels,guest house delhi,cheap hotels,accomodation in delhi,guest houses new delhi,3 star luxury hotel,economy hotel new delhi,accommodation karol bagh,india,cheap and luxurious hotel delhi,cheap & best hotel new delhi,online hotel reservation delhi,online hotel booking new delhi, centrally located cheap hotel in new delhi,classic hotel,park view hotel,new delhi,karol bagh,india
Isaacs Group | Hostels, Budget Hotels and Holiday Apartments in Dublin & Cork Ireland
Isaacs Group of Hostels, Budget Hotels and Short-Term Apartments in Dublin & Cork Ireland. Book online now for Special offers.
Isaacs Hostel Dublin / Hostel Beds From 10 Euro a night in Dublin City Centre
Isaacs Hostel Dublin / Hostel Beds From 10 Euro a night in Dublin City Centre.
www.jacobsinn.com
Hotels and Hostels Ireland – Isaacs Group | City Centre Hotels, Cork and Dublin | Cheap hostels, budget accommodation.
Kent Accommodation near Airport Ramsgte Kent, Bed and Breakfast Hotels near Kent Airport
Kent airport hotels ramsgate with seaview offers accommodation in kent, bed and breakfast hotels near kent airport,airport parking,airport guide kent
Ramsgate hotels - Comfort Inn Ramsgate official website of the hotel | cheap hotel in Kent
Ramsgate hotels kent, cheap accommodation hotels booking, bed and breakfast near ramsgate, online hotel rooms booking around ramsgate, honeymoon hotels reservation within kent, discount bed and breakfast accommodation at comfort hotels in ramsgate kent
Superbreak > Hotel Bookings, Reservations & Short Break Holidays
Skip Navigation Superbreak Mini-Holidays No1 for Shortbreaks Location Hotel Name Postcode Quick Search Home London Hotels Offers Theatre Breaks Events
Tours & Travel in Vietnam, Laos, Cambodia, Vietnam Budget hotel, cheap tickets, backpack travel guide
Vietnam Budget Tour, Find Cheap Tours Vietnam, Search Vietnam Budget Hotels, Backpacker Tours In Vietnam, Group Tours Vietnam, Hostels Vietnam, Cheap hotels Hanoi, Cheap Hotels Saigon, Tours in Vietnam, Vacations Vietnam, Hanoi hotels, Hanoi Hotel
Winner Hotel Sabah
Cheap budget hotel, situated in the heart of Kota Kinabalu city, Sabah. Clean, comfortable and affordable.
Pages: 1 | 2 | 3| 4 Previous Next Back to the link directory home page
<% On Error Resume Next adoConn.Open mbhDB Set adoRs = Server.CreateObject("ADODB.recordset") adoRs.Open "SELECT * FROM tbDestination D INNER JOIN tbState S ON D.State=S.StateCode WHERE S.Country='Malaysia' ORDER BY Destination", adoConn %>
Search Hotels
Search website
<%Select Case LCase(GetMenu()) Case "accommodation" %>
<% Case "cheap-accommodation.html" %>
BUDGET HOTELS by State by Beach & Island by Hill & Highland
<% Case "tours" %>
BUDGET HOTELS by State by Beach & Island by Hill & Highland
<% Case "tour.html" %>
BUDGET TOURS by Islands by Hills & Highlands by National Park by City
<% Case "destinations" %>
BUDGET TOURS by Islands by Hills & Highlands by National Park by City
<% Case "destinations.html" %>
DESTINATIONS by Beach & Island by Hill & Highland by National Park by State
<% End Select %>
DESTINATIONS by Beach & Island by Hill & Highland by National Park by State
Home | About Us | FAQ | /tell-your-friends.html','Tell_your_friends');>Tell your friends | Forum | Sitemap | Contact Us | Travel Links | Link Exchange
Copyright © 2006 - 2008 Hot Travel Station - MalaysiaBudgetHotel. All Rights Reserved.