Lin Yao wei ENG499 H0605627 SIM UNIVERSITY SCHOOL OF SCIENCE AND TECHNOLOGY Development of carpark fee payment system using short message service (SMS) technology STUDENT : Lin Yaowei Wayne (H0605627) SUPERVISOR : Mr Nava Selvaratnam PROJECT CODE : JAN09/XXX/YYY A project report submitted to SIM University in partial fulfillment of the requirements for the degree of Bachelor of Engineering NOV 2009 I Lin Yao wei ENG499 H0605627 Abstract In this high-tech world, modern technology serves people in all possible manners. One of which is Global System Mobile (GSM) technology in communicating with one another. As GSM network is always available, we can utilize this technology into something useful. This project is to develop a carpark fee payment system using short message service (SMS) technology. Using this system the administrator is able to use an integrated database to operate and record the entire carpark payment system from car entering to exiting. When a vehicle entered the carpark, the data will be sent out to Short message services (SMS) and as well as the payment system. Using short message services makes the payment come with ease and comfort of excess as well as the attainment of concrete benefits through the use. As compare with credit/cash payment, it overcomes the problem of insufficient credits/cash and also avoids topping up of credits. As the system is able to operator with full automation the developing this system will be convenience for both administrator and user. The logarithm of the Development of carpark fee payment system using short message service (SMS) technology is being structure by 3 flows. There are consist of the Entrance, Exit and Shot message service flows. Every individual flow is being process independently but sharing the similar database. The Development of carpark fee payment system using short message service (SMS)technology is programmed using Visual Basic programming, which controlling the databases and interfaces or forms in Microsoft excel. The simulation software to communicate/send Short message services and with the use of Global System Mobile (GSM) network is known as Nokia PC Suite 7.1. Using this software we are able write messages on your PC and send them via your mobile device. Write normal text messages or create multimedia messages with pictures, videos or music clips. My report starts with the Project Objective in Chapter 1. It follows by Chapter 2 Literature Review of the categories of parking system, various types parking system available in the market. After the various researches and review in Literature Review, I had carried on in Chapter 3 in my selection of software design. After which, I would talk about my design strategic, structure of block diagram and breakdown of flow chart in Chapter 4 under block diagram and flow charts. In Chapter 5, the system development I have further elaborated on the structure of database and user interface using Visual Basic. In Chapter 6, is the review of my software results discussion of test cases, which is one of the important parts that contributes to the success of the project which it includes all the possibility of the results with references from the flow charts. I have also wrapped up the entire project in my conclusion under Chapter 7. With considering further phase of development I have feed in some limitation during the research of the project under critical review and reflections. Acknowledgement I would like to express my sincere gratitude to UniSIM and all the other lecturers who had taught and advised me throughout these 3 years in pursuing my Honors’. I would like to thank UniSIM for giving me this opportunity to gain knowledge from this Final Year Project as a Research Engineer apprentice. In the initial phase where I started off from scratch with doing various researches and till producing the end product, it is a valuable and fruitful experience that I would treasure in these 3 years of stay in UniSIM. I would also like to extend my gratitude to my project supervisor, MR NAVA for his valuable time in supervising and guiding me along the way in this Final Year Project. His constant time check and meet ups had certainly motivated me in the completion of the project. Thanks to him for his tolerance and patience for explaining the pointers which I have missed out. The completion of the Final Year Project would not be possible without his excellence supervision. Lastly, I would like to thank all the lectures and friends in for giving me suggestions and feedback throughout. I Lin Yao wei ENG499 H0605627 List of Abbreviations GSM SMS MP MC Global System Mobile Short Message Service Mobile Payment Mobile Commerce II Lin Yao wei ENG499 H0605627 TABLE OF CONTENTS Abstract Acknowledgements List of Abbreviation i ii iii Chapter 1 Introduction 1.1. Project Overview 1.2. Overall objective 1.3. Project background 1.4. Project scope 1.5. Skill review 1.6. Assessment of my personal strength and weakness 1 Chapter 2 Short message services Technology 3 2.1. Introduction of Short message services 2.2. Network Architecture 2.2.1. Aggregator 2.2.2. Content provider 2.3. Network Elements 2.3.1. Short Messages Entities 2.3.2. Short message service centre (SMS) 2.3.3. Short message services-Gateway 2.3.4. Home Location Register 2.3.5. Mobile Switching Centre 2.3.6. Visitor Location Register 2.3.7. Base Station System 2.3.8. Mobile Station Chapter 3 Literature Review 6 3.1. On-street parking system 3.2. Off-street parking system 3.3. RFID Ticketing Car Park System 3.4. Electronic parking system (EPS) 3.5. M-parking 3.6. Regisoft’s mobile parking 3.7. Literature review on mobile payment 3.7.1. Mobile payment parties 3.7.2. Categories of mobile payment 3.7.3. Identifying of Mobile payment categories for using Short message services Chapter 4 System Operation 4.1. Design strategic 4.1.1. Enter and Exit flow 4.1.2. Short message service flow 4.1.3. Enhanced Short message service flow 4.1.4. Parking fee calculation flow 4.2. Block diagram and flow Charts 4.2.1. Entrance Block 4.2.2. Short message service Block 4.2.3. Exit block 13 Chapter 5 System Development 16 5.1. Database Design structure 5.1.1. Microsoft excel sheet as database 5.1.2. Microsoft excel form as interfaces 5.2. Database of carpark administrator 5.2.1. Database of register lists 5.2.2. Database of entered vehicles III Lin Yao wei ENG499 H0605627 5.2.3. Database of short message services 5.2.4. Database of exit vehicles 5.2.5. Database of inbox messages 5.3. Interfaces of application 5.3.1. Interface Administrator 5.3.2. Interface of entering vehicles 5.3.3. Interface of exiting vehicles 5.3.4. Interface of short message service 5.3.5. Interface of message alert 5.3.6. Interface of inbox message 5.4. Data of Short message services flow 5.4.1. Register user’s sub Short Message Services flow 5.4.2. Non-register user’s sub Short Message Services flow 5.5. Data of exit flow 5.5.1. Database searching flow 5.6. Communication of Short message service 5.6.1. Nokia PC Suite 5.6.2. System Requirements 5.6.3. Procedures of Communicating Computer to Mobile Chapter 6 Discussion of Test cases and Limitations 24 6.1. Test cases of Entrance flow 6.2. Test cases of Short Message Services flow 6.3. Test cases of Exit flow 6.4. Test cases of parking fee 6.5. Review of Test cases Chapter 7 Conclusion 28 7.1. Recommendations Chapter 8 Critical Review and Reflections 29 References Appendix IV Lin Yao wei ENG499 H0605627 Chapter 1 Introduction 1.1 Project Overview: Mobile Phone has been widely used in the world and adopted in different application areas involved with Short message services (SMS) has been evolved for downloading logo, ring-tones, advertisement, security notes, and mobile payment (MP). Mobile payments will gain significant traction in the coming years as the mobile and payment technologies mature and become widely available. Various technologies are competing to become the established standards for physical and virtual mobile payments, yet it is ultimately the users who will determine the level of success of the technologies through their adoption. Only if it becomes easier and cheaper to transact business using mobile payment applications than by using conventional methods will they become popular, either with users or providers. 1.2 Overall objective: Our objective is to understand and explore existing parking system and identified or modified with using Short message services-based technology for carpark payment, which allows customers to perform electronic carpark payment using their mobile phones via Short message services. Current payment trend goes toward a cashless society instead of paper banknotes (paper/coin) cash that will become absolute in the next decades. The Financial Institutions focuses these days to move all payment forms (i.e. transfers, deals, purchases, and bill payments) to electronic form instead of paper form. In the point of view for end users, the most important for mobile payment (MP) system will be subsume to the categories: • Cost - For cost effectiveness, MP will stand a strong point as it includes direct transaction cost and fixed cost of usage as well as cost for technical infrastructure. Users do not need to purchase an additional system on their vehicles but just using their own mobiles phones for the payment. • Security - Through the Global System for Mobile communications (GSM) network, mobile communication has been well established with integrity, authorization, authentication, confidentiality and non-repudiation of transactions. • Convenience - Mobility make the payment come with ease and comfort of excess as well as the attainment of concrete benefits through the use. As compare with credit/cash payment, it overcomes the problem of insufficient credits/cash and also avoids topping up of credits. For the latter, it is important that a procedure is not limited on mobile commerce (MC) scenarios, but can be used in other settings, too. Briefly: It should be possible to use the procedure whenever, wherever and for whatever kind of payment the user wants to do this. 1.3 Project background Today’s technology is moving towards wireless web. Mobile devices such as palmtops, handhelds, and cellular phones are becoming rage. The wireless devices can do everything from access our email accounts, to utilize the internet and to access personal and corporate information. Mobile phones are a commodity today, and SMS (short message services) messages offer an intriguing solution. Messages are delivered in matter of seconds, and customers are far more likely to receive and read them, no matter their internet habits or locations. Short message services messages are definitely a powerful way to provide instant message delivery to a large audience. Short message services are a very inexpensive method of communication. 160 characters take up as much room as a one-second voice call. Messages are delivered immediately whenever the phone is on. Like emails which can be reviewed or stored in your phone for as long as you wish. SMS message can be also sent out to huge groups of people with a single press of button. 1.4 Project Scope: The scope of my project is to understand and reviewing the existing technologies involved in car parking payment solution, including mobile networks. I will be comparing between various methodologies for mobile payment. Follow by a detailed description of the purposes and specifications of the project can be obtained from evaluation of the existing mobile payment system. Further on after identifying the most feasible methodology, I will then discuss with my supervisor on finalizing the project with software/hardware or a simulation for the product. 1.5 Skill review 1 Lin Yao wei ENG499 H0605627 Finally, it would be good to perform a simple gap analysis to determine what skills are required to tackle the project and what is lacking to accomplish the project. Being equipped with knowledge from the courses taken prior to this Final Year Project, such as key subjects like Electronic Engineering Design & Innovation, which introduces concepts in engineering design related to market acceptability, economic viability, financial planning of product launch and design for testability. This course introduced us to Engineering Design, carried out problem definition and total quality management for projects. Let us understand the conceptualization of a design as well as embodiment of an engineering design. By going into the details in an engineering design, it really help me to build up my level of confidence. In addition, having worked as a Product Engineering department for the past 4 years, I have been exposure and involved in several projects offloads which has give me the additional motivation on project management. 1.6 Assessment of my personal strength and weakness Assessment of my personal strength and weakness with respect to accomplishing the project was carried out and determined as follows Some key strengths includes exposure to the semiconductor industry due to work nature and the relevant courses taken previously that enable me to grasp ideas faster and apply what I know to finish the project. It is also encouraging to know that my employer is fully supportive of me embarking on this project. Key weaknesses would be my inability to handle time spent for project as well as family. This would have to be overcome with strict discipline and understanding from my family. Not forgetting that having a schedule planned out in the Gantt chart will further help to provide better visibility, understanding and support from my family. 985 Words Count 2 Lin Yao wei ENG499 H0605627 Chapter 2 Short message services Technology 2.1. Introduction of Short message services SMS short message service was created during the late 1980s to work with a digital technology called GSM (global system for mobile communications), which is the basis for most modern cell phones. The Norwegian engineers who invented it wanted a very simple messaging system that worked when users' mobile phones were turned off or out of signal range. Most sources agree that the first Short message service was sent in the UK in 1992. As Short message services was born in Europe, it's not surprising that it took a little longer to make its way to the United States. Even today, texting enjoys much greater popularity in Europe, though its stateside use is on the rise. A July 2005 study found that 37 percent of U.S. mobile phone owners had sent or received at least one text message in the previous month Short message services technology evolved out of the Global System for Mobile Communications standard, an internationally accepted cell phone network specification the European Telecommunications Standards Institute created. Presently, the 3rd Generation Partnership Project maintains the short message services standard. Short message services messages are handled via a short message service center that the cellular provider maintains for the end devices. The Short message services can send Short message services messages to the end device using a maximum payload of 140 octets. This defines the upper bound of an Short message services message to be 160 characters using 7-bit encoding. It is possible to specify other schemes such as 8-bit or 16-bit encoding, which decreases the maximum message length to 140 and 70 characters, respectively. Short message services Centers operate in either a store and forward or a forward-and-forget paradigm. In the store-and-forward paradigm, the system resends the message for some period of time until it is successfully received. In a forward and forget paradigm, the system sends the message to the end device without assurance of receipt or an attempt to redeliver in the case of failure. The Short message services protocol stack comprises four layers: Shown on Table 1 the application layer, the transfer layer, the relay layer, and the link layer. Table 1 2.2. Network Architecture Rather than communicating directly with the various Short message services Centers, content providers go through a message aggregator. The message aggregator uses the SMPP to maintain connections with carrier networks. 3 Lin Yao wei ENG499 H0605627 Figure 1 2.2.1 Aggregator Typically, content providers do not communicate directly with the various Short message services Centers, but instead go through a broker, or message aggregator, as Figure 1 shows. An aggregator is a business entity that negotiates agreements with network providers to act as a middleman providing access to a cellular network for messaging services to third parties who have no direct relationship with the cellular network. The message aggregator uses the SMPP to maintain connections with carrier networks. Aggregators typically provide access to their servers either through SMPP or using custom APIs written in Java, PHP, Perl, and so on. Most aggregators will also manage the rental of the common short code for clients who do not want to deal directly with the CTIA. Another important function of the aggregator is to assist with provisioning of the short code on the various carriers. Before a carrier allows the use of a short code on its network, it requires a complete description of how the code will be used, including how subscribers will opt in and opt out of subscription services. The provisioning process can take eight weeks or more. 2.2.2. Content provider A mobile content provider is an entity that provides value-added content and applications for mobile devices. For example, when a mobile phone user sends an interactive text message to retrieve information, the content provider returns the information (in this case, a text message back to the user) through the aggregator. The aggregator is responsible for transmitting the message to the end user. This second transmission actually masks two transmissions: first a transmission from the aggregator to the cellular provider, and then a transmission from the cellular provider to the mobile handset. 2.3. Network Elements 2.3.1. Short Messages Entities Short messaging entity is an entity which may receive or send short messages. The short messaging entites may be located in the fixed networks, a mobile station, or another service centre. 2.3.2. Short message service centre (SMSC) When a user sends a text message to another user, the phone actually sends the message to the Short message services Center, which stores the message and then delivers it when the recipient is on the network. This is a store-and-forward operation. The Short message services center usually has a configurable time limit for how long it will store the message, and users can usually specify a shorter time limit if they want. Figure 1 depicts the general system architecture for sending and receiving Short message services messages. Each service provider operates one or more Short message services centers. Mobile users’ Short message services messages are sent through a wireless link via a cell tower to the Short message services center. The Short message services center access protocols enable interactions between two Short message services centers or interactions between external short message entities (SMEs) and an Short 4 Lin Yao wei ENG499 H0605627 message services center. SMEs are software applications on network elements (such as a mobile handset) or hardware devices that can send and receive short messages. The Short message services Forum has adopted the Short Message Peer-to-Peer (SMPP) protocol to enable interactions between external SMEs and service centers that the different manufacturers maintain and operate. 2.3.3. Short message services-Gateway The short message services – gateway mobile switching centre is a mobile switching centre capable of receiving a short message from Short message service centre, interrogating a home location register Home location register for routing information, and delivering the short message to the visited mobile switch centre of the recipient mobile station. The Short message service interworking mobile switching centre (Short message service – interworking mobile switching centre) is an mobile switching centre capable of receiving a short message from the mobile network and submitting it to the appropriate short message services centre. The message services – gateway mobile switching centre / interworking mobile switching centre are typically integrated with the Short message service centre. 2.3.4. Home Location register The Home Location register is a database used for permanent storage and management of subscriptions and service profiles. Upon interrogation by the Short message services center, the Home Location register provides the routing information for the indicated subscriber. The Home Location register also informs the Short Message service Centre, which has previously initiated unsuccessful short message delivery attempts to a specific mobile station, that the mobile station is now recognized by the mobile network to be accessible. 2.3.5. Mobile Switching Centre The Mobile Switching Centre performs the switching functions of the system and controls calls to and from other telephone and data systems. 2.3.6. Visitor Location Register The Visitor Location Register is a database that contains temporary information about subscribers. The information is needed by the Mobile Switching Centre to service visiting subscribers. 2.3.7. Base Station System All radio-related functions are performed in the based-station system. The Base Station System consists of base-station controllers and the base-transceiver stations, and its primary responsibility is to transmit voice and data traffic between the mobile stations. 2.3.8. Mobile station The mobile station is the wireless terminal capable of receiving and originating short messages as well as voice calls. The wireless networks signaling infrastructure is based on the signaling system 7. Short message service makes use of the mobile application part, which defines the methods and mechaniShort Message Services of communication in wireless networks, and uses the services of the signaling system transaction capabilities application part. As Short Message Services layer makes use of the Mobile application part signaling capabilities and enables the transfer of short messages between the peer enities. 2278 Words Count 5 Lin Yao wei ENG499 H0605627 Chapter 3 Literature Review Mobile parking solutions enable public and private corporations to offer parking services which are paid fro through the motorist’s mobile phone. Mobile parking is quickly becoming popular worldwide since, as will be discussed, it is the most convenient mode of paying for parking for all parties involved. Some of the mentioned solutions even have being attempting to incorporate aspects of mobile applications in order to overcome these disadvantages. Mobile parking solutions can be used – and have been successfully implemented – in both on-street and off-street parking, as well as for toll road use, by both local municipalities as well as private organizations. As the world’s population grows, the number of cars on the roads increases, and cities become more and more cramped, there is a larger need by drivers for the convenient, use-friendly and economical parking payment solutions. The challenge is to offer a parking payment solution to drivers which provide them with the peace of mind that they will not receive heavy fines, and that they do not need to search for small change or coins each time they park. 3.1. On-street parking solution Current on-street parking solutions such as parking meters, cash payment and display machines, vehicle meters and parking coupons have many disadvantages. As the parking system is operating in open/public carpark areas, they are involved with human handling like traffic police and parking inspectors to ensure the parking payment is being paid. 3.2. Off-street parking solution As for the current off-street parking solutions will be better off as compared with on-street parking solutions. This is because they are operating within a respective parking boundary. Current solution RFID Ticketing Car Park System has replaced human handling at the gantry but still it involves a cashier at the payment counter. Whereas the EPS (Electronic parking system) has achieved with full automated for the companies/vendors but yet it still has not resolve the problem for the users. As the users/driver will still have the possibility to be jammed at the exit if his/her cashcard’s credit is less then the credit charged. 3.3. RFID Ticketing Car Park System Using security features unavailable in other ticket dispensing and collecting technologies, RFID technology shortens queuing lines, eliminates counterfeiting and creates tickets that can be programmed for specific time periods and specific gates or other access points. Figure 4 The RFID Ticketing Car Park System consist of 3 main access controls (entrance/payment/exit control) Entrance control flow: When the detector at the entrance detects a vehicle, the ticket will be dispensed automatically once or pressing the button on the machine front panel. Information such as the station number, ticket number and start date/time will be read remotely and sent to the control station to the data base. Barrier will open after dispensing the ticket. Payment flow: When the driver is ready to leave, he/she has to go to the carpark cashier counter to make the payment by scanning the ticket to register the stop date/time. 6 Lin Yao wei ENG499 H0605627 Driver will do the parking payment calculated by the system. The same ticket and a receipt will be issue back to driver Driver will get back to his car. Exit control flow: When the driver has reached the exit he/she has to insert the ticket into the machine. The system will validate if payment has been clear and open the barrier. Table 3 Advantages of RFID Ticketing Car Park System Durable and recyclable Environmental friendly Minimize of equipment failure. Minimize ticket fraud Lower maintenance cost Lower initial investment cost Lower reading failure rate Disadvantages of RFID Ticketing Car Park System Possibility of lost/damage of ticket Possibility of queuing up for payment Involve in cash payment Involve in human handling (cashier) Driver has to drive near the ticket dispenser machine in order to retrieve/insert the ticket 3.4. EPS (Electronic parking system) EPS enables settlement of parking fees without parking tickets and cash. In order to keep the compatibilities of current car park system, antennas were made smaller and compact, processing systems were integrated and devices for calculating the fees were developed, the device for calculating the fee was called charging unit (CHU). In order to meet the various needs of the car park owners and to allow free setting of the parking fee, the devices are designed. The introduction of EPS in Singapore has brought about an unprecedented realization of the application using the same onboard equipment in both EPS and ERP systems (application fields). 7 Lin Yao wei ENG499 H0605627 Figure 5 Figure 6 The EPS consist of 2 main access controls (entrance/exit control) Entrance control flow: When the vehicle presence detector at the entrance detects a vehicle, the antenna radiates radio frequency. The antenna reads the IU label through communication with the IU installed in the vehicle, and transmits the IU label to CHU before opening the barrier. Exit control flow: The antenna reads the IU label through communication with the IU installed in the vehicle, and transmits the IU label to CHU before opening the barrier. The antenna reads the IU label through communication with the IU installed in the vehicle, and transmits the label to CHU. The CHU (host computer, depending on the system) calculates the parking fee of each vehicle from the parking time of the vehicle on the basis of the IU label transmitted by the antenna. According to the calculated fee, CHU issues charging command and transmitted to IU through the antenna. On receiving the charging command, the IU deducts the parking fee from the IC card (cashcard). The IU then informs CHU through the antenna that the parking fee has been deducted from the IC card. The barrier opens for the vehicle to exit Table 4 Advantages of EPS 8 Lin Yao wei ENG499 H0605627 Availability - The driver doesn't have to open the window to take a ticket or to pay the charge, and the vehicle can pass through the entrance/exit gates without having to stop. The driver doesn't need to prepare the cash (money) to pay. Flexibility of car park operation (management) the car park owner or manager can flexibly change the parking charges table depending on their demands. Reliability - The RF communication and security technologies of ERP system have been used in ensure high reliability of the system. Sensitivity - IU recognition sensor can go as fast as 0.125sec Service time - Since no need of handling tickets or cash at the entrance or exit gate allows nonstop operation, the processing capacity at exit can be drastically improved. Disadvantages of EPS: Possibility that driver is not able to exit if his/her credit is less then the credit charged. Drivers must always check and top up their cash card regularly. 3.5. M-parking M-Parking is one of the world’s longest established and most successful mobile phone parking payment systems introduced in 2001 in Vienna (Austria) and Melbourne (Australia). Since its start, M-Parking has been introduced to 45 cities in 4 countries taking over 75% market share and offering real cost savings for parking operators as well as real benefits for drivers. Under the m-parking technology, customers initially register their mobile number, the license plate number of the car and their credit card number with the car park authorities, to create what is called a “virtual parking ticket account”. This completes the initial, one-time registration process. Whenever the customer needs to park, they would send an Short message services text message to the number provided by the car park authorities. The Short message services message would consist of the license plate number of the car, the location code of the parking area where they want to park and the time duration (in minutes) for which the customer wants to park. In return, the customer would then receive a text message from the car park message centre, with the confirmation and the expiry time of their electronic parking ticket. The customer would be sent a reminder Short message services, 10 minutes before the parking time expires. The bill for the parking ticket would come up on the customer’s mobile bill. Advantages of M-parking: Reduction in time spent and fuel consumed while searching for available parking space. Reduction in congestion due to fewer cars driving around searching for spaces. Elimination of queues entering parking facilities because drivers will not go to a facility where there is no available space. Reduction in illegally parked vehicles. Better distribution of flow and parking demand through the area. Result in higher revenues and profitability for the parking facilities. Disadvantages of M-parking: Require pre-registration Short message services texting format requires quite a few numbers of information needed Tendency for user for missing the reminder feature for parking expire time No Short message services receipt to proof/indicate the amount of payment. 3.6. Regisoft’s mobile parking RegiSoft, a developer of innovative software solutions, brings to market value-added services (VAS) in the form of Mobile Marketing, Mobile Ticketing, interactive services, and Personal Mobile Content Distribution. Its flagship product, the World Trade Server™ (WTS™), addresses the various business needs of network operators, service providers, retailers, vendors and media, looking to deploy VAS to create alternative sources of revenue and to interact with their customers with personalized solutions to suit their needs and requirements. The motorist will register for the service in advance in order to use the mobile parking. This registration can be done via a web site, manually at delegated municipal offices or help desks, via Short message services through receiving a WAP or USSD menu, or through calling a number and 9 Lin Yao wei ENG499 H0605627 following a voice activated menu (IVR). Registration is done once only and is valid for this subscriber for as long as they have their driver’s license, drive the same car, and keep the same mobile telephone number. Upon registration, the driver will need to supply details such as name, age (there may be special tariffs for drivers of different ages), mobile phone number, drivers license permit number, car registration number, payment information (payment can be made in a number of ways, such as via credit card, debit card, from the cellular telephone bill [this option is currently illegal in Europe], etc. and the payment options is the choice of the local municipality). The driver will receive a sticker for their car with a barcode or unique code. A parking inspector can identify whether a parked car is registered for the mobile parking service through this sticker. The parking inspector will either scan the barcode or enter the unique numerical code into a PDA in order to check whether the driver has activated the mobile payment system. The car can also be checked according to the license plate number. The municipality will have signed a contract with a local mobile operator, as well as with a payment company or clearing house so that registered drivers can pay for the parking by credit and/or debit card. The WTS™ will be integrated with the mobile operator’s gateway as well as to the clearing house chosen by the municipality. The local municipality can also choose how drivers activate the mobile parking payment system. There are various options available. Once the motorist parks their car, they can send a predefined Short message services message to a toll-free/paid number e.g. “S” for start. Other options include calling a number and following a voice-activated menu, linking to a WAP or USSD menu, etc. The WTS™ software is the back office of the system (see section below), and it will identify the driver via their mobile phone number. Upon receiving the Short message services message, the WTS™ will identify the time and zone (if various zones are supported) of the driver and the virtual clock will be activated for the time the driver is parked. Upon leaving the parking, the driver will again text a message (e.g. “E” for end) to the same number and the WTS™ will automatically stop the session for this driver. Advantages of Regisoft are mobile parking: The system is easily implemented and easy to use for all parties involved Elimination Will result in increased revenues for the municipalities or parking authorities as well as increased savings on parking for drivers Reduces municipality costs for infrastructure Simplifies revenue collection Improves reporting, monitoring and control Reduces fraud Provides drivers with a simple, cost-effective, flexible parking payment solution Disadvantages of Regisoft mobile parking: Require pre-registration System can only be use with the registered car plate number and handphone number Require user to send Short Message Services at start and end of parking. High chances of inaccuracy for parking fee as duration of parking is control by user. No Short message services receipt to proof/indicate the amount of payment. 10 Lin Yao wei ENG499 H0605627 3.7. Literature review on mobile payment Mobile payment can be defined as a payment that is carried out with a handheld device such as a mobile phone or a PDA (personal digital assistant). Payment involves a direct or indirect exchange of monetary values between parties. Handheld devices can be used at real POS (point of sale), in ecommerce and in mcommerce The emergence of e-commerce has further digitized the payment process, where payment details are sent over open networks with no physical contact between the buyer and the seller. The recent development of high-speed mobile data networks has created a new channel for commerce, where more sophisticated mobile devices are enabling the virtual exchange of payment information. The advent of mobile payments has added another layer of complexity through the use of mobile devices with different network capabilities and limitations. 3.7.1. Mobile payment parties Consumer/mobile user – owner of the mobile device and is willing to use it to pay for a service or product. The product or service, maybe are physical content (products or services) or downloadable digital content. The mobile user’s roles may involve initializing the mobile purchase, registering with the PSP and authorizing the payment. Content provider/merchant -- depending on whether digital content or physical goods and services are being purchased. Their roles may involve forwarding purchase requests to the PSP, relaying authorization requests back to the consumer and delivery the content. Payment service provider -- the party responsible for the payment process. They control the flow of transaction between the mobile consumer, the content provider and the TTP. A consumer may be register with the PSP to avoid repetition of keying payment details into the mobile device, such as credit card details or a mobile phone post-paid account. A PSP could be a network operator, a bank, a credit card company or an independent payment vendor. Trusted third party -- a company used to perform the authentication and the authorization of transaction parties and the payment settlement. These could be network operators, banks and credit card companies. Therefore, their main role is authentication and authorization of payment requests. A network operator or bank could be positioned at the same time as the PSP, the TTP, and the content provider. In this report I do not refer to the TTP. Figure 2: Mobile payment System Figure 3: Mobile payment System with participation of TTP 11 Lin Yao wei ENG499 H0605627 3.7.2. Categories of mobile payment Mobile payment may be characterized into various categories, such as transaction type, transaction settlement method, content type, and content value. Transaction Type: Pay Per View – the mobile user pays for each view, or increment, of the desired content. For example downloadable MP3 files or video clips. Pay Per Unit – the mobile user pays for each unit of content provided by the content provider. Units can be based on volume or duration of content, such as per byte or per minute. The amount of units used for each session will be billed to the consumer. Such examples of this type could be used in downloadable games or streaming video content. Pay Per time – the mobile user pays according to the timeline of usage per seconds/minutes/hours. For examples outgoing calls is on charging per min basic. Flat Rate – the mobile user pays a recurring periodic amount to access the content on an unlimited basis during the period. For example unlimited access to online newspaper articles. Transaction Settlement Type: Pre-paid – mobile users pay in advance of obtaining the content with pre-paid accounts which are deducted after each payment session. Post-paid – mobile users receive and use the content before they paid for it. The consumer is billed after the access to the content is obtained, for example on a phone bill. Content Type: Digital goods – e.g. downloadable music or video content, value-added information Physical goods Services Voting - e.g. TV voting polls Ticketing – e.g. booking plane tickets Content Value: Micropayments – describes same purchases usually less the ~50 dollars, for example pay parking and ring tones. Marcopayments – usually large purchases over ~20 dollars, for example purchasing plane tickets. 3.7.3 Identifying of Mobile payment categories for using Short message services Table 2 5141 Words Count 12 Lin Yao wei ENG499 H0605627 Chapter 4 System Operation 4.1. Design strategic In order to explore and simulate the carpark fee payment system with using short message service (SMS) technology, we will be simulating in real-time simulation. Hence, we will be targeting on the offstreet parking system which consist of a scanner to log the entry and exit time of a vehicle. The application will be able to calculate the parking fee accordingly to the parking duration. The logarithm of the Development of carpark fee payment system using short message service (SMS) technology is being structure by 3 flows. There are consist of the Entrance, Exit and Shot message service flows. Every individual flow is being process independently but sharing the similar database. 4.1.1. Enter and Exit flow In order to calculate accuracy time in and time out of parking duration, both enter and exit flows need to sense and log by enter and exit sensors against the real time. 4.1.2. Short message service flow (non-register member) The short message service flow is introduce as another individual flow which process between the enter flow and Exit flow. The Short message services do not require certain time to send out the short messages as long as the short message service is being sent out between the enter flow and exit. The system is being designed in this structure in order to have flexibility for the user. Hence sending out the short message services with the vehicle’s information is activating the short message services payment system. 4.1.3. Enhanced Short message service flow (registered member) The enhanced short message service flow is catered for the registered members. By implementing the enhanced flow the system is able to send a short message service to the registered mobile number once the registered vehicle has entered the carpark. Hence the registered user received the short message services from the carpark administrator and the registered user will just need to reply as an acknowledgement to activate the short message services payment system. This enhanced flow will prevent the user from forgetting to activate the short message services payment. 13 Lin Yao wei ENG499 H0605627 4.1.4. Parking fee calculation flow 4.2. Block diagram and flow chart From the above design strategic, i have plot out the block diagram of the short message service carpark payment system. The block diagram will show the relationship of the all the 3 different flows working and checking against with the database. 14 Lin Yao wei ENG499 H0605627 4.2.1. Entrance Block A detector at the entrance will scan for the vehicle identity (unique identify) from the vehicle itself using the RFID technology. The vehicle identity and the entry time will be stored into the database. The barrier will be open allowing the vehicle to enter. 4.2.2. Short message service Block Registered user: As the user has already pre-registered with authority, user will receive a Short message services upon entering the carpark. And the user will only need to reply to acknowledge paying by Short Message Services paying system. The database will store the sender no., vehicle identity and received time. Non-registered user: User will send a Short message services to the carpark administrator with his/her vehicle identity and send to a respective number. The database will store the sender no., vehicle identity and received time. 4.2.3. Exit block Once the driver is ready to leave the carpark, the detector at the exit will scan the vehicle identity using the same method used at the entrance. Similarly, the vehicle identity and the exit time will be stored into the database. During the exit stage the “vehicle identity”, will be search through the database to confirm the entrance time and Short Message Services time. Upon confirmation, the database will send out a parking receipt to the Short Message Services sender. The parking receipt will consist of a transaction id, time in, Short Message Services time, time out, vehicle no. and amount of parking fee. The parking receipt also acts as another level or security for the user’s record. The payment can be made in a number of ways, such as via credit card, debit card, from the cellular telephone bill. Entrance Flow Short message services Flow Exit Flow 15 Lin Yao wei ENG499 H0605627 5833 Words Count 16 Lin Yao wei ENG499 H0605627 Chapter 5 System Development 5.1. Database Design structure The database structure of carpark fee payment system using short message service short message service technology consists of database portion and interface portion in visual basic environment. 5.1.1. Microsoft excel sheet as database At times, we need to keep track of information and a good place to this is in an Excel database file. Whether it is a personal list of phone numbers, a contact list for members of an organization or team, or a collection of coins, cards, or books, an Excel database file makes it easy to enter, store, and find specific information. Excel has built it tools to help you keep track of data and to find specific information when you want it. As well, with its hundreds of columns and thousands of rows, an Excel spreadsheet can hold an enormous amount of data. 5.1.2. Microsoft excel form as interfaces Excel forms to make some piece of what you do easier, faster, more flexible, or more convenient. In principle, Excel’s form controls are no different from standard elements of the Windows interface. Specifically, the majority of the form controls reviewed here return values to designated cells in your Excel spreadsheet, and some of them draw the options they present from it, as well. All kinds of applications spring to mind. I will be using forms to append and delete data of vehicles in real time. Computations and calculation are being implemented for parking fee through forms. Alert of acknowledgement and data entry errors will be also prompt to user in this simulation. 5.2. Database of carpark administrator 5.2.1. Database of register lists REGISTERED_LOG The database consists of the list of registered member who had signed up with the carpark administrator. High frequent parkers would be highly recommended to register as members with the carpark administrator which are using this fee payment system using short message service short message service technology. Particular of the register like name, vehicle number, mobile number, virtual account number and account balance will be registered in the list. 17 Lin Yao wei ENG499 H0605627 An automated short message service will be sent to driver who had been registered in the registered list database upon entering in the carpark. In order to avoid reading of short message service during parking a delay of ~5 to 10 minutes (depending on the vacancy of the parking slots) will be added before sending out the short message service to motorist as a safety feature. Another automated short message service will be sent out to the member with parking fee will account balance. 5.2.2. Database of entered vehicles ENTRANCE_LOG This database will log in the vehicle’s number, date and time of the entering of carpark in real time. This database will be the reference for checking duplication of vehicle number at the entrance barrier. Duplicated vehicle number will be rejected and disabled the open access of the barrier. 5.2.3. Database of short message services SMS_LOG This database will be logging in the driver vehicle number, date and time after the activation of short message service short message service technology. During the activation of short message service short message service technology the ENTRANCE_LOG will be counter checking for invalid vehicle number. SMS_LOG will log in the particulars upon confirmation from the authorized server which link to the credit card companies. A short message service will be sent to user to confirm whether the short message payment mode is being activated. 5.2.4. Database of exit vehicles 18 Lin Yao wei ENG499 H0605627 EXIT_LOG This database will be logging in the driver’s vehicle number, date, time and parking fee during the exit and together with the data of ENTRANCE_LOG and SMS_LOG. At the exit barrier the scanned vehicle’s number will be checked against the ENTRANCE_LOG for valid vehicle number. Upon confirmation, it will counter check on the SMS_LOG for activation of short message service payment. Hence if both ENTRANCE_LOG and SMS_LOG are being checked, the EXIT_LOG will be logged in with above mentioned particulars and enabling the exit barrier to be open for vehicle to exit. Lastly a short message service will be sent to the driver with parking fee and account balance from carpark administrator shown above. 5.2.5. Database of inbox messages HP_LOG This database will be logging in the driver’s communication of short message service via the simulated mobile phone. It will also act as the password authentication of an authorized server. 5.3. Interfaces of application 5.3.1. Interface Administrator ADMIN The is the main interface of all the major flows of the carpark fee payment system using short message service short message service technology. The major flows are consisting of entrance flow, Short Message Services flow and exit flow which were mentioned on earlier stage. The ADMIN interface is planted with command button which are linked to individual visual basic script which logged the real time into the database upon clicking them. 19 Lin Yao wei ENG499 H0605627 Below is the functionality of every command buttons: A. Entrance barrier (simulation) B. Clearing of all ENTRANCE_LOG data C. Counter of all ENTRANCE_LOG data D. List dropdown of ENTRANCE_LOG data E. User mobile phone (simulation) F. Clearing of all SMS_LOG data G. Counter of all SMS_LOG data H. List dropdown of SMS_LOG data I. Exit barrier (simulation) J. Clearing of all EXIT_LOG data K. Counter of all EXIT_LOG data L. List dropdown of EXIT_LOG data M. Exit of Carpark administrator interface 5.3.2. Interface of entering vehicles ENTER_FLOW (simulation) This interface is simulating the operation of entrance barrier with the database. Below is the functionality of every command buttons: A. Entrance barrier (simulation) A1. Back to ADMIN interface A2. Scanning of entering vehicle number A3. Cancel and exit of Entrance simulation A4. Log in vehicle number to ENTRANCE_LOG database 5.3.3. Interface of exiting vehicles EXIT_FLOW (simulation) This interface is simulating the operation of exit barrier with the database. Below is the functionality of every command buttons: C. Exit barrier (simulation) C1. Back to ADMIN interface C2. Scanning of exiting vehicle number C3. Cancel and exit of Exit simulation C4. Log in vehicle number to EXIT_LOG database 5.3.4. Interface of short message service SMS_FLOW (simulation) This interface is simulating the sending of short message service via a simulated mobile phone. 20 Lin Yao wei ENG499 H0605627 Below is the functionality of every command buttons: B. Mobile phone (simulation) B1. Keying of new messages B2. Input of number to be sent to B3. Cancel and exit of SMS_FLOW interface B4. Exit and back to ADMIN interface B5. Sending of new messages / calling HP_FLOW interface 5.3.5. Interface of message alert HP_FLOW (simulation) This interface is simulating the receiving of new short message service via a simulated mobile phone. Below is the functionality of every command buttons: B5. Mobile phone (simulation) B6. Calling HP_INBOX_FLOW interface B7. Cancel and exit of HP_FLOW interface B8. Exit and back to ADMIN interface B9. No applicable 5.3.6. Interface of inbox message HP_INBOX_FLOW (simulation) This interface is simulating the replying of new short message service via a simulated mobile phone. 21 Lin Yao wei ENG499 H0605627 Below is the functionality of every command buttons: B6. Mobile phone (simulation) B10. Reading the inbox messages from HP_LOG database B11. Keying in the reply messages B12. Cancel and exit of HP_INBOX_FLOW interface B13. Clearing of messages in HP_LOG database B14. Replying of messages to HP_LOG database 5.6. Communication of short message services 5.6.1. Nokia PC Suite 7.1 We can write messages on your PC and send them via your mobile device. Write normal text messages or create multimedia messages with pictures, videos or music clips via using Nokia PC Suite. And the latest version is Nokia PC Suite 7.1 5.6.2. System Requirements Supported operating systems: - Windows Vista 32-bit and 64-bit editions - Windows XP Professional x64 Edition (Service Pack 2) - Windows XP (Professional or Home Edition) Service Pack 2 or later Nokia PC Suite 7.1 system requirements Available hard disk space: At least 300 MB of free disk space Supported operating systems: Windows Vista 32-bit and 64-bit editions Windows XP Professional x64 Edition (Service Pack 2) Windows XP (Professional or Home Edition) (Service Pack 2 or later) Connection methods: USB cable, infrared (IrDA), or Bluetooth Supported Bluetooth stacks / software: Windows Vista 32-bit and 64-bit editions: Microsoft Windows Bluetooth stack WIDCOMM Bluetooth stack, driver version 6.x Toshiba Bluetooth stack, driver version 5.10.12, 6.10.10. and 6.30.01 IVT BlueSoleil Bluetooth stack, driver version 5.0.5, 6.2.227.11 and 6.4.245.0 Windows XP x64: Microsoft Windows Bluetooth stack Toshiba Bluetooth stack, driver version 5.10.12 and 6.10.10 IVT BlueSoleil Bluetooth stack, driver version 5.0.5 and 6.2.227.11 Windows XP: Microsoft Windows Bluetooth stack 22 Lin Yao wei ENG499 H0605627 Toshiba Bluetooth stack, driver version 4.0, 5.0, 5.10.12, 6.10.10 and 6.30.01 WIDCOMM Bluetooth stack, driver version 1.4.2.18, 3.x, 4.x, 5.0, 5.1 and 5.5 IVT BlueSoleil Bluetooth stack, driver version 3.x, 5.0.5, 6.2.227.11 and 6.4.245.0 Supported Personal Information Managers: To keep your information up to date on both the PC and the device, you can synchronize with the following Personal Information Manager applications: Microsoft Outlook 2000, 2002, 2003, and 2007 Microsoft Outlook Express / Windows Address Book Microsoft Windows Calendar and Contacts Lotus Notes 5.x, 6.x, 7.0, and 8.x Lotus Organizer 5.x and 6.x 5.6.3. Procedures of Communicating Computer to Mobile phone via short message service 1. Click the messages icon. 2. Click the Create a new message button. 3. Click the Select recipients’ button to select recipients for the message, or type the desired number in the text field next to it. Then write your message. 23 Lin Yao wei ENG499 H0605627 4. Select and choose recipient by double clicking on the content. 5. Lastly the short service message will be send to the respective recipient. You will also be shown a list of features supported by your device from Appendix. 7433 Words Count 24 Lin Yao wei ENG499 H0605627 Chapter 6 Discussion of Test cases and Limitations 6.1. Test cases of Entrance flow 25 Lin Yao wei ENG499 H0605627 6.2. Test cases of Short Message Services flow 26 Lin Yao wei ENG499 H0605627 6.3. Test cases of Exit flow 6.4. Test cases of parking fee 27 Lin Yao wei ENG499 H0605627 6.5. Review of Test cases After the test cases of individual sub module, I review the whole results of all the test cases and finalized with a 100% results by fulfilling the all possibility and condition which I had anticipated for the whole operating system of the application. 7533 Words Count 28 Lin Yao wei ENG499 H0605627 Chapter 7 Conclusion 7.1. Recommendations There are number of enhancement which can be considered to make the application more commercial viable. And they are: - Accessibility of vehicles: While a vehicle enters or exits the carpark, it would be more convenience to let the gentry to detect the user mobile itself via an in-build infrared identification in it. It will be feasible to let our mobile number to be the identification number as all our phone number is unique. Hence all the carparks will be able to detect the present of the respective vehicle. - Integrate for payment gateway: A system which allows a subscriber to top up his or her account online via short message services or web. The payment gateway can be NETS, VISA, GIRO, or etc. - Develop registration system using short messages services: It would be convenience if the registration for member for using the parking payment system can be done using short messages service as well, instead on filling up on applications forms. - Accessibility of the parking slot With the condition of integrity on using the solely parking system, besides on replying with acknowledgment of entering via short messages services the message can also indicate the location of available parking slots for the users. 7743 Words Count 29 Lin Yao wei ENG499 H0605627 Chapter 8 Critical Review and Reflections Reflecting back on the overall project management, I realized that working on a technology project individually was really tough, tiring. This project and my work commitments especially the ongoing company project that required heavy and immediate support that was required. Friends and tutor support were crucial to the progress and successful completion of this project. The reason of why I had chosen to do this project is because practically in the modern world, everyone of us seems to have a cellular phone on our hand. Hence, we can make the mobile phone more than just using it for calls, texting, and storing contacts. We can further explore on utilizing the use on mobile phone in our daily life just like payment for parking. My first meeting with my initially assigned project tutor, Mr. Nava offered a lot of valuable advices on how to carry out literature review that were required in this project and he had also briefed me on the project assessment criteria, tasks and skills required to acquired. Upon submitting the TMA, I realized that it is very important to focus on the software simulation. Hence I had put in a lot of effort on learning and developing on the visual basic. From designing the database, partition them and until designing of interfaces. Finally, analysis and examine the all possibility and condition under the test cases. My objective for the project is to understand and explore existing parking system and identified or modified with using Short message services-based technology for carpark payment, which allows customers to perform electronic carpark payment using their mobile phones via Short message services. From this project, I have learnt to pick up and also bush up my programming skill. And I have learnt to use visual basic operating in Microsoft Excel. Most importantly, characterizing and optimizing of programming for the application. And also further explore on using forms of visual basic as user interfaces of the application. From there, I have further explored to use form as simulated virtual mobile phone for transmitting and receiving of short messages services. Lastly, I have further explored and written the programming for the carpark fee payment logarithm reacting with real time. And upon completion of the whole programming, I have tried out the test cases on them. After conducting several times of fine tuning and troubleshooting on my logarithm, I have fixed a lot of detected loop holes along the way. And finally, I was able to fulfill all possibilities and conditions with counter checking on every individual flow chart. Throughout this year while racing with time to complete and meeting the project tasks on time based on a project schedule, I have acquired the knowledge of fairly good project management skill with the help of Gantt chart to outline the work activities with project deadline to accomplish with. There were definitely problems arise when various tests were conducted on the application, but this had strive me to find out the root caused of the problems encountered and perform further troubleshooting to resolve it. This project had taught me to be a more patience person when encountering any tedious problem to sit down and think for solutions. In conclusion, I had enjoyed myself and learnt a lot from this course of study. I would say it is a totally different course from the rest which I had taken. It is an eye opener to me as it is more of an ‘open ended’ type of study concept, in which a lot of freeway is being given. It will definitely set me going for more continual academic upgrading and self-achievement. 8352 Words Count 30 Lin Yao wei ENG499 H0605627 PART3: PROJECT PLAN 31 Lin Yao wei ENG499 H0605627 References: Short message service technology - http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2007.440 - http://communication.howstuffworks.com/Short Message Services.htm - http://news.bbc.co.uk/2/hi/uk_news/wales/4561461.stm - http://infotech.monash.edu.au/promotion/coolcampus/projects/carparkShort Message Services/index.html - http://www.textually.org/textually/archives/cat_Short Message Services_and_micro_payments.htm Mobile payment - http://mpra.ub.uni-muenchen.de/3786/1/MPRA_paper_3786.pdf - https://www.cs.tcd.ie/publications/tech-reports/reports.03/TCD-CS-2003-24.pdf Electronics Parking System (ERP) - https://www.mhi.co.jp/technology/review/pdf/e403/e403166.pdf Radio Frequency identification Ticketing Car Park System (RFID) - http://www.alphawave.com.sg/ticketing.html Communication of Short message service to Computer - http://www.developershome.com/Short Message Services/quickGuideNonDevelopers - http://gnokii.org/ - http://www.tucows.com/preview/MoreInfo - http://www.nokia-asia.com/get-support-and-software/download-software/nokia-pc-suites/how-to/calls-andmessages/create-and-send-message# Appendix 32 Lin Yao wei ENG499 H0605627 33 Lin Yao wei ENG499 H0605627 Private Sub ADMIN_cancel_Click() Unload ADMIN End Sub ___________________________________________________________________________________________________________ Private Sub Clear_Entrance_log_Click() Sheets("ENTRANCE_LOG").Select Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 Range("B3" & ":D" & lastrow).Select Selection.ClearContents Sheets("ENTRANCE_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Enter_count = lastrow - 2 ADMIN.Enter_count.Text = Enter_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Enter_list.Clear For Row = 3 To last_row ADMIN.Enter_list.AddItem Sheets("ENTRANCE_LOG").Cells(Row, 2) Next Row ADMIN.Enter_list.Value = Range("B" & lastrow).Value End Sub ___________________________________________________________________________________________________________ Private Sub Clear_exit_log_Click() Sheets("EXIT_LOG").Select Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 Rows("3" & ":" & lastrow).Select 34 Lin Yao wei ENG499 H0605627 Selection.Delete Shift:=xlUp Sheets("EXIT_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Exit_count = lastrow - 2 ADMIN.Exit_count.Text = Exit_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Exit_list.Clear For Row = 3 To last_row ADMIN.Exit_list.AddItem Sheets("EXIT_LOG").Cells(Row, 2) Next Row ADMIN.Exit_list.Value = Range("B" & lastrow).Value End Sub ___________________________________________________________________________________________________________ Private Sub Clear_Short Message Services_log_Click() Sheets("SMS_LOG").Select Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 Range("B3" & ":E" & lastrow).Select Selection.ClearContents Sheets("SMS_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Short Message Services_count = lastrow - 2 ADMIN.Short Message Services_count.Text = Short Message Services_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Short Message Services_list.Clear For Row = 3 To last_row ADMIN.Short Message Services_list.AddItem Sheets("SMS_LOG").Cells(Row, 2) Next Row ADMIN.Short Message Services_list.Value = Range("B" & lastrow).Value End Sub ___________________________________________________________________________________________________________ Private Sub TO_ENTER_FLOW_Click() Sheets("REGISTERED_LIST").Select Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 For Row = 3 To lastrow ENTER_FLOW.Vehicle_Id.AddItem Sheets("REGISTERED_LIST").Cells(Row, 2) Next Row Sheets("ENTRANCE_LOG").Select ENTER_FLOW.Show End Sub ___________________________________________________________________________________________________________ Private Sub TO_EXIT_FLOW_Click() Sheets("ENTRANCE_LOG").Select Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 For Row = 3 To lastrow Exit_Flow.Exit_Vehicle_No.AddItem Sheets("ENTRANCE_LOG").Cells(Row, 2) Next Row 35 Lin Yao wei ENG499 H0605627 Sheets("EXIT_LOG").Select Exit_Flow.Show End Sub ___________________________________________________________________________________________________________ Private Sub TO_SMS_FLOW_Click() Sheets("ENTRANCE_LOG").Select Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 For Row = 3 To lastrow SMS_FLOW.New_text.AddItem Sheets("ENTRANCE_LOG").Cells(Row, 2) Next Row Sheets("SMS_LOG").Select SMS_FLOW.Show End Sub ___________________________________________________________________________________________________________ Private Sub enter_cancel_Click() Sheets("EXIT_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Exit_count = lastrow - 2 ADMIN.Exit_count.Text = Exit_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Exit_list.Clear For Row = 3 To last_row ADMIN.Exit_list.AddItem Sheets("EXIT_LOG").Cells(Row, 2) Next Row ADMIN.Exit_list.Value = Range("B" & lastrow).Value Sheets("SMS_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Short Message Services_count = lastrow - 2 ADMIN.Short Message Services_count.Text = Short Message Services_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Short Message Services_list.Clear For Row = 3 To last_row ADMIN.Short Message Services_list.AddItem Sheets("SMS_LOG").Cells(Row, 2) Next Row ADMIN.Short Message Services_list.Value = Range("B" & lastrow).Value Sheets("ENTRANCE_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Enter_count = lastrow - 2 ADMIN.Enter_count.Text = Enter_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Enter_list.Clear For Row = 3 To last_row ADMIN.Enter_list.AddItem Sheets("ENTRANCE_LOG").Cells(Row, 2) Next Row ADMIN.Enter_list.Value = Range("B" & lastrow).Value Unload ENTER_FLOW End Sub ___________________________________________________________________________________________________________ 36 Lin Yao wei ENG499 H0605627 Private Sub enter_back_Click() Unload ENTER_FLOW Load ADMIN End Sub ___________________________________________________________________________________________________________ Private Sub enter_ok_Click() Dim Enter_Vehicle_id As String Dim Enter_Mobile_No As String If ENTER_FLOW.Vehicle_Id.Value = "" Then MsgBox "Please fill in the Vehicle ID." Exit Sub End If 'Check for empty Enter_Vehicle_id = ENTER_FLOW.Vehicle_Id.Value Sheets("ENTRANCE_LOG").Select Range("B2").Select Range(Selection, Selection.End(xlDown)).Select 'Go to Entrance log On Error Resume Next Cells.Find(What:=Enter_Vehicle_id, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ True, SearchFormat:=False).Activate If ActiveCell.Offset(0, 0).Value = Enter_Vehicle_id Then MsgBox "car entered" Exit Sub End If 'Check for entered If ActiveCell.Offset(0, 0).Value <> Enter_Vehicle_id Then Sheets("ENTRANCE_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 Range("B" & lastrow).Value = ENTER_FLOW.Vehicle_Id.Value 'Enter new vehicle id Range("A1").Value = "=NOW()" 'Inserting the enter date & time Enter_Date = "=TEXT(A1,""dd/mm/yy"")" Range("A2").Value = Enter_Date Enter_Time = "=TEXT(A1,""h:mm:ss"")" Range("A3").Value = Enter_Time Range("A2:A3").Select Selection.Copy Range("C" & lastrow).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=True Columns("A:A").Select Selection.ClearContents MsgBox "Vehicle id: " & Enter_Vehicle_id & " Log in Entrance database" Sheets("REGISTERED_LIST").Select Range("B2").Select Range(Selection, Selection.End(xlDown)).Select 'Go to registered list Cells.Find(What:=Enter_Vehicle_id, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate If ActiveCell.Offset(0, 0).Value = Enter_Vehicle_id Then 'If registered member Member_row = ActiveCell.Row Enter_Mobile_No = Range("D" & Member_row).Value Enter_Mobile_Name = Range("C" & Member_row).Value Short Message Services_msg = "Member found sending Short message services in 5 mins: " & Enter_Mobile_No Sheets("HP_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 Range("A1").Value = "=NOW()" 'Inserting the enter date & time 37 Lin Yao wei ENG499 H0605627 Enter_Date = "=TEXT(A1,""dd/mm/yy"")" Range("A2").Value = Enter_Date Enter_Date = Range("A2").Value Enter_Time = "=TEXT(A1,""h:mm:ss"")" Range("A3").Value = Enter_Time Enter_Time = Range("A3").Value Inbox_Vehicle_id = Enter_Vehicle_id Inbox_message = "<" & Enter_Time & "> :Welcome! " & Enter_Vehicle_id & " Please Reply to activate Short message services payment" Range("B" & lastrow).Value = Inbox_message Range("C" & lastrow).Value = Inbox_Vehicle_id Unload ENTER_FLOW 'Exit from Enter flow MsgBox Short Message Services_msg HP_FLOW.Show End If End If Sheets("EXIT_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Exit_count = lastrow - 2 ADMIN.Exit_count.Text = Exit_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Exit_list.Clear For Row = 3 To last_row ADMIN.Exit_list.AddItem Sheets("EXIT_LOG").Cells(Row, 2) Next Row ADMIN.Exit_list.Value = Range("B" & lastrow).Value Sheets("SMS_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Short Message Services_count = lastrow - 2 ADMIN.Short Message Services_count.Text = Short Message Services_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Short Message Services_list.Clear For Row = 3 To last_row ADMIN.Short Message Services_list.AddItem Sheets("SMS_LOG").Cells(Row, 2) Next Row ADMIN.Short Message Services_list.Value = Range("B" & lastrow).Value Sheets("ENTRANCE_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Enter_count = lastrow - 2 ADMIN.Enter_count.Text = Enter_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Enter_list.Clear For Row = 3 To last_row ADMIN.Enter_list.AddItem Sheets("ENTRANCE_LOG").Cells(Row, 2) Next Row ADMIN.Enter_list.Value = Range("B" & lastrow).Value Unload ENTER_FLOW End Sub ___________________________________________________________________________________________________________ Private Sub exit_back_Click() Unload Exit_Flow Load ADMIN End Sub ___________________________________________________________________________________________________________ 38 Lin Yao wei ENG499 H0605627 Private Sub exit_cancel_Click() Sheets("ENTRANCE_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Enter_count = lastrow - 2 ADMIN.Enter_count.Text = Enter_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Enter_list.Clear For Row = 3 To last_row ADMIN.Enter_list.AddItem Sheets("ENTRANCE_LOG").Cells(Row, 2) Next Row ADMIN.Enter_list.Value = Range("B" & lastrow).Value Sheets("SMS_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Short Message Services_count = lastrow - 2 ADMIN.Short Message Services_count.Text = Short Message Services_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Short Message Services_list.Clear For Row = 3 To last_row ADMIN.Short Message Services_list.AddItem Sheets("SMS_LOG").Cells(Row, 2) Next Row ADMIN.Short Message Services_list.Value = Range("B" & lastrow).Value Sheets("EXIT_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Exit_count = lastrow - 2 ADMIN.Exit_count.Text = Exit_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Exit_list.Clear For Row = 3 To last_row ADMIN.Exit_list.AddItem Sheets("EXIT_LOG").Cells(Row, 2) Next Row ADMIN.Exit_list.Value = Range("B" & lastrow).Value Unload Exit_Flow End Sub ___________________________________________________________________________________________________________ Private Sub exit_ok_Click() Dim exit_vehicle_id As String If Exit_Vehicle_No.Value = "" Then MsgBox "Invalid Vehicle ID" Exit Sub End If 'Check for empty entry enter_exit_vehicle_id = Exit_Vehicle_No.Value Sheets("ENTRANCE_LOG").Select Range("B2").Select Range(Selection, Selection.End(xlDown)).Select 'Go to entrance log On Error Resume Next 'Check on entered records Cells.Find(What:=enter_exit_vehicle_id, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate 39 Lin Yao wei ENG499 H0605627 Entrance_log_id = ActiveCell.Offset(0, 0).Value If Entrance_log_id <> enter_exit_vehicle_id Then MsgBox "No records of vehicle in carpark" End If If Entrance_log_id = enter_exit_vehicle_id Then Enter_Delete = ActiveCell.Row Enter_Date = ActiveCell.Offset(0, 1).Value Enter_Time = ActiveCell.Offset(0, 2).Value Rows(Enter_Delete & ":" & Enter_Delete).Select Selection.Delete Shift:=xlUp Sheets("SMS_LOG").Select Range("B2").Select Range(Selection, Selection.End(xlDown)).Select 'No records in entrance log 'Yes recorded in entrance log 'Log exiting row in entrance_log 'Delete exiting row in entrance_log 'Go to Short message services log On Error Resume Next 'Find for Short message services activation Cells.Find(What:=enter_exit_vehicle_id, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate Short Message Services_log_id = ActiveCell.Offset(0, 0).Value If Short Message Services_log_id <> enter_exit_vehicle_id Then 'No Short message services payment not activated MsgBox "Please kindly activate Short message services payment sytstem" End If If Short Message Services_log_id = enter_exit_vehicle_id Then 'Yes Short message services payment not activated Short Message Services_Delete = ActiveCell.Row 'Log exiting row in Short Message Services_log Short Message Services_Date = ActiveCell.Offset(0, 1).Value Short Message Services_Time = ActiveCell.Offset(0, 2).Value Rows(Short Message Services_Delete & ":" & Short Message Services_Delete).Select 'Delete exiting row in Short Message Services_log Selection.Delete Shift:=xlUp '############ Inserting the Short message services date & time ################## Sheets("EXIT_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 Range("A1").Value = "=NOW()" Exit_Date = "=TEXT(A1,""dd/mm/yy"")" Range("A2").Value = Exit_Date Exit_Time = "=TEXT(A1,""h:mm:ss"")" Range("A3").Value = Exit_Time Exit_Time = Range("A3").Value Range("A2:A3").Select Selection.Copy Range("G" & lastrow).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=True Range("B" & lastrow).Value = enter_exit_vehicle_id Range("C" & lastrow).Value = Enter_Date Range("D" & lastrow).Value = Enter_Time Range("E" & lastrow).Value = Short Message Services_Date Range("F" & lastrow).Value = Short Message Services_Time 'Range("H" & lastrow).Value = Exit_time Columns("A:A").Select Selection.ClearContents Range("H" & lastrow).Value = Exit_Time Enter_Time = Range("D" & lastrow).Value Exit_Time = Range("H" & lastrow).Value '#################################### Sheets("CHARGING_FEE").Select First_hr = Range("B3").Value Per_hr = Range("B4").Value Per_P_hr = Range("B5").Value P_hr = Range("C5").Value A_hr = Range("C6").Value '##################################### Sheets("EXIT_LOG").Select Range("I" & lastrow).Select ActiveCell.FormulaR1C1 = "=(RC[-1]-RC[-5])" Total_min = Range("I" & lastrow).Value Range("I" & lastrow).ClearContents Range("A" & lastrow).Value = P_hr 40 Lin Yao wei ENG499 H0605627 P_hr = Range("A" & lastrow).Value If Total_min < A_hr Then Sheets("HP_LOG").Select Range("A1").Value = "=NOW()" Date = "=TEXT(A1,""dd/mm/yy"")" Range("A2").Value = Date Date = Range("A2").Value Time = "=TEXT(A1,""h:mm:ss"")" 'Range("A3").Value = Time 'Exit_Time = Range("A3").Value 'within ample period 'Inserting the enter date & time Parking_Fee = 0 MsgBox "PARKING FEE: $0.00 HAVE A NICE DAY." Inbox_message = "<" & Time & "> Parking Fee: $" & Parking_Fee 'FOC Sheets("EXIT_LOG").Select End If If Total_min > A_hr Then 'over ample period If Enter_Time < P_hr And P_hr > Exit_Time Then 'Enter & Exit before peak hr Total_P_hrs = 0 Total_hrs = Exit_Time - Enter_Time Range("I" & lastrow).Value = Total_hrs Range("A" & lastrow).Select ActiveCell.FormulaR1C1 = "=ROUNDUP((RC[8])*24,0)" Total_hrs = Range("A" & lastrow).Value Total_hrs = Total_hrs - 1 Range("A" & lastrow).ClearContents Range("I" & lastrow).ClearContents 'MsgBox "1" End If If Enter_Time < P_hr And P_hr < Exit_Time Then 'Enter before pek hr exit after peak hr Total_hrs = P_hr - Enter_Time Range("I" & lastrow).Value = Total_hrs Range("A" & lastrow).Select ActiveCell.FormulaR1C1 = "=ROUNDUP((RC[8])*24,0)" Total_hrs = Range("A" & lastrow).Value Total_hrs = Total_hrs - 1 Range("A" & lastrow).ClearContents Range("I" & lastrow).ClearContents Total_P_hrs = Exit_Time - P_hr Range("I" & lastrow).Value = Total_P_hrs Range("A" & lastrow).Select ActiveCell.FormulaR1C1 = "=ROUNDUP((RC[8])*24,0)" Total_P_hrs = Range("A" & lastrow).Value Range("A" & lastrow).ClearContents Range("I" & lastrow).ClearContents End If If Enter_Time > P_hr And P_hr < Exit_Time Then 'Enter after peak hr Total_hrs = 0 Total_P_hrs = Exit_Time - Enter_Time Range("I" & lastrow).Value = Total_P_hrs Range("A" & lastrow).Select ActiveCell.FormulaR1C1 = "=ROUNDUP((RC[8])*24,0)" Total_P_hrs = Range("A" & lastrow).Value Total_P_hrs = Total_P_hrs - 1 Range("A" & lastrow).ClearContents Range("I" & lastrow).ClearContents End If Parking_Fee = First_hr + (Total_hrs * Per_hr) + (Total_P_hrs * Per_P_hr) Range("I" & lastrow).Value = Parking_Fee Sheets("HP_LOG").Select Range("A1").Value = "=NOW()" 'Inserting the enter date & time Date = "=TEXT(A1,""dd/mm/yy"")" Range("A2").Value = Date Date = Range("A2").Value Time = "=TEXT(A1,""h:mm:ss"")" 'Range("A3").Value = Time 'Exit_Time = Range("A3").Value Inbox_message = "<" & Time & "> Parking Fee: $" & Parking_Fee MsgBox "Parking Fee: $" & Parking_Fee 'Sheets("REGISTERED_LIST").Select 'Go to Short message services log 'Range("B2").Select 'Range(Selection, Selection.End(xlDown)).Select 'On Error Resume Next 41 Lin Yao wei ENG499 H0605627 'Find for Short message services activation 'Cells.Find(What:=enter_exit_vehicle_id, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ 'xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ 'False, SearchFormat:=False).Activate 'If ActiveCell.Offset(0, 0).Value = enter_exit_vehicle_id Then 'If registered member 'Member_row = ActiveCell.Row 'Member_Mobile_No = Range("D" & Member_row).Value 'Balance = Range("F" & Member_row).Value 'New_Balance = Balance - Parking_Fee 'Range("F" & Member_row).Value = New_Balance 'Inbox_message = "<" & Enter_Time & "> PARKING FEE: $" & Parking_Fee & " HAVE A NICE DAY" 'MsgBox "PARKING FEE: $" & Parking_Fee 'End If 'If ActiveCell.Offset(0, 0).Value <> enter_exit_vehicle_id Then 'No records in entrance log 'MsgBox "PARKING FEE: $" & Parking_Fee 'End If End If Unload Exit_Flow Sheets("HP_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Hp_log_lastrow = lastrow + 1 Range("A1").Value = "=NOW()" 'Inserting the enter date & time Enter_Date = "=TEXT(A1,""dd/mm/yy"")" Range("A2").Value = Enter_Date Enter_Date = Range("A2").Value Enter_Time = "=TEXT(A1,""h:mm:ss"")" Range("A3").Value = Enter_Time Enter_Time = Range("A3").Value Range("B" & Hp_log_lastrow).Value = Inbox_message Unload Exit_Flow Application.Wait Now + TimeSerial(0, 0, 2) HP_FLOW.Show Sheets("EXIT_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Exit_count = lastrow - 2 ADMIN.Exit_count.Text = Exit_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Exit_list.Clear For Row = 3 To last_row ADMIN.Exit_list.AddItem Sheets("EXIT_LOG").Cells(Row, 2) Next Row ADMIN.Exit_list.Value = Range("B" & lastrow).Value Sheets("SMS_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Short Message Services_count = lastrow - 2 ADMIN.Short Message Services_count.Text = Short Message Services_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Short Message Services_list.Clear For Row = 3 To last_row ADMIN.Short Message Services_list.AddItem Sheets("SMS_LOG").Cells(Row, 2) Next Row ADMIN.Short Message Services_list.Value = Range("B" & lastrow).Value Sheets("ENTRANCE_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Enter_count = lastrow - 2 ADMIN.Enter_count.Text = Enter_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty 42 Lin Yao wei ENG499 H0605627 lastrow = 3 End If ADMIN.Enter_list.Clear For Row = 3 To last_row ADMIN.Enter_list.AddItem Sheets("ENTRANCE_LOG").Cells(Row, 2) Next Row ADMIN.Enter_list.Value = Range("B" & lastrow).Value End If End If End Sub ___________________________________________________________________________________________________________ Private Sub New_Vehicle_Id_Change() End Sub Private Sub Inbox_button_Click() Sheets("HP_LOG").Select Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow lastrow = lastrow + 1 For Row = 3 To lastrow HP_INBOX_FLOW.HP_INBOX.AddItem Sheets("HP_LOG").Cells(Row, 2) Next Row HP_INBOX_FLOW.HP_INBOX.Value = Range("B" & last_row).Value Unload HP_FLOW HP_INBOX_FLOW.Show End Sub ___________________________________________________________________________________________________________ Private Sub Mail_image_Click() Sheets("HP_LOG").Select Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow lastrow = lastrow + 1 For Row = 3 To lastrow HP_INBOX_FLOW.HP_INBOX.AddItem Sheets("HP_LOG").Cells(Row, 2) Next Row HP_INBOX_FLOW.HP_INBOX.Value = Range("B" & last_row).Value Unload HP_FLOW HP_INBOX_FLOW.Show End Sub ___________________________________________________________________________________________________________ Private Sub Short Message Services_back_Click() Sheets("ENTRANCE_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Enter_count = lastrow - 2 ADMIN.Enter_count.Text = Enter_count Sheets("SMS_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Short Message Services_count = lastrow - 2 ADMIN.Short Message Services_count.Text = Short Message Services_count Sheets("EXIT_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Exit_count = lastrow - 2 ADMIN.Exit_count.Text = Exit_count Unload HP_FLOW Load ADMIN End Sub ___________________________________________________________________________________________________________ 43 Lin Yao wei ENG499 H0605627 Private Sub Short Message Services_cancel_Click() Sheets("EXIT_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Exit_count = lastrow - 2 ADMIN.Exit_count.Text = Exit_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Exit_list.Clear For Row = 3 To last_row ADMIN.Exit_list.AddItem Sheets("EXIT_LOG").Cells(Row, 2) Next Row ADMIN.Exit_list.Value = Range("B" & lastrow).Value Sheets("SMS_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Short Message Services_count = lastrow - 2 ADMIN.Short Message Services_count.Text = Short Message Services_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Short Message Services_list.Clear For Row = 3 To last_row ADMIN.Short Message Services_list.AddItem Sheets("SMS_LOG").Cells(Row, 2) Next Row ADMIN.Short Message Services_list.Value = Range("B" & lastrow).Value Sheets("ENTRANCE_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Enter_count = lastrow - 2 ADMIN.Enter_count.Text = Enter_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Enter_list.Clear For Row = 3 To last_row ADMIN.Enter_list.AddItem Sheets("ENTRANCE_LOG").Cells(Row, 2) Next Row ADMIN.Enter_list.Value = Range("B" & lastrow).Value Unload HP_FLOW End Sub ___________________________________________________________________________________________________________ Private Sub Send_reply_text_Click() If HP_INBOX_FLOW.Reply_text.Value = "" Then MsgBox "Your reply text is empty" Exit Sub End If 'Check for empty entry Reply_message = HP_INBOX_FLOW.Reply_text.Value Reply_inbox_message = HP_INBOX_FLOW.HP_INBOX.Value Sheets("HP_LOG").Select 'Go to Short message services log Range("B2").Select Range(Selection, Selection.End(xlDown)).Select On Error Resume Next 'Find for Short Message Services activation Cells.Find(What:=Reply_inbox_message, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate 44 Lin Yao wei ENG499 H0605627 If ActiveCell.Offset(0, 0).Value = Reply_inbox_message Then ID = ActiveCell.Offset(0, 1).Value Sheets("HP_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Hp_log_lastrow = lastrow + 1 Range("A1").Value = "=NOW()" Enter_Date = "=TEXT(A1,""dd/mm/yy"")" Range("A2").Value = Enter_Date Enter_Date = Range("A2").Value Enter_Time = "=TEXT(A1,""h:mm:ss"")" Range("A3").Value = Enter_Time Enter_Time = Range("A3").Value 'Inserting the enter date & time If Reply_message <> ID Then Inbox_message = "<" & Enter_Time & "> ID: " & Reply_message & " Invalid vehicle ID " End If If Reply_message = ID Then Inbox_message = "<" & Enter_Time & "> ID: " & Reply_message & " Short message services payment activated " Sheets("SMS_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 Range("B" & lastrow).Value = Reply_message 'Enter new vehicle id Range("A1").Value = "=NOW()" 'Inserting the enter date & time Enter_Date = "=TEXT(A1,""dd/mm/yy"")" Range("A2").Value = Enter_Date Enter_Time = "=TEXT(A1,""h:mm:ss"")" Range("A3").Value = Enter_Time Range("A2:A3").Select Selection.Copy Range("C" & lastrow).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=True Columns("A:A").Select Selection.ClearContents MsgBox "Vehicle id: " & Reply_message & " Log in Short message services database" End If Sheets("HP_LOG").Select Range("B" & Hp_log_lastrow).Value = Inbox_message Unload HP_INBOX_FLOW Application.Wait Now + TimeSerial(0, 0, 2) HP_FLOW.Show End If End Sub ___________________________________________________________________________________________________________ Private Sub Short Message Services_back_Click() Sheets("HP_LOG").Select Range("B4").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 Range("B4" & ":C" & lastrow).Select Selection.ClearContents Sheets("HP_LOG").Select Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow lastrow = lastrow + 1 For Row = 3 To lastrow HP_INBOX_FLOW.HP_INBOX.AddItem Sheets("HP_LOG").Cells(Row, 2) Next Row HP_INBOX_FLOW.HP_INBOX.Value = Range("B" & last_row).Value Unload HP_INBOX_FLOW HP_INBOX_FLOW.Show End Sub ___________________________________________________________________________________________________________ Private Sub Short Message Services_cancel_Click() 45 Lin Yao wei ENG499 H0605627 Sheets("EXIT_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Exit_count = lastrow - 2 ADMIN.Exit_count.Text = Exit_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Exit_list.Clear For Row = 3 To last_row ADMIN.Exit_list.AddItem Sheets("EXIT_LOG").Cells(Row, 2) Next Row ADMIN.Exit_list.Value = Range("B" & lastrow).Value Sheets("SMS_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Short Message Services_count = lastrow - 2 ADMIN.Short Message Services_count.Text = Short Message Services_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Short Message Services_list.Clear For Row = 3 To last_row ADMIN.Short Message Services_list.AddItem Sheets("SMS_LOG").Cells(Row, 2) Next Row ADMIN.Short Message Services_list.Value = Range("B" & lastrow).Value Sheets("ENTRANCE_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Enter_count = lastrow - 2 ADMIN.Enter_count.Text = Enter_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Enter_list.Clear For Row = 3 To last_row ADMIN.Enter_list.AddItem Sheets("ENTRANCE_LOG").Cells(Row, 2) Next Row ADMIN.Enter_list.Value = Range("B" & lastrow).Value Unload HP_INBOX_FLOW Load ADMIN End Sub ___________________________________________________________________________________________________________ Private Sub Short Message Services_send_Click() Dim Short Message Services_vehicle_id As String If SMS_FLOW.Entrance_Vehicle_No.Value = "" Then MsgBox "Please fill in the mobile number." Exit Sub End If 'Check for empty entry enter_Short Message Services_vehicle_id = SMS_FLOW.Entrance_Vehicle_No.Value Sheets("ENTRANCE_LOG").Select Range("B2").Select Range(Selection, Selection.End(xlDown)).Select 'Go to entrance log On Error Resume Next 'Check on entered records Cells.Find(What:=enter_Short Message Services_vehicle_id, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate If ActiveCell.Offset(0, 0).Value <> enter_Short Message Services_vehicle_id Then 'No entered records 46 Lin Yao wei ENG499 H0605627 MsgBox "No records of vehicle in carpark" Exit Sub End If Sheets("SMS_LOG").Select Range("B2").Select Range(Selection, Selection.End(xlDown)).Select 'Go to Short message services log On Error Resume Next 'Find for Short Message Services activation Cells.Find(What:=enter_Short Message Services_vehicle_id, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate If ActiveCell.Offset(0, 0).Value = enter_Short Message Services_vehicle_id Then MsgBox "Short message services payment has been activated" Exit Sub 'Short message services payment activated Else Sheets("SMS_LOG").Select 'Inserting the Short message services date & time Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 Range("B" & lastrow).Value = enter_Short Message Services_vehicle_id Range("A1").Value = "=NOW()" Short Message Services_Date = "=TEXT(A1,""dd/mm/yy"")" Range("A2").Value = Short Message Services_Date Short Message Services_Time = "=TEXT(A1,""h:mm:ss"")" Range("A3").Value = Short Message Services_Time Range("A2:A3").Select Selection.Copy Range("C" & lastrow).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=True Columns("A:A").Select Selection.ClearContents MsgBox "THANK YOU FOR USING Short message services PAYMENT" Unload SMS_FLOW 'Exit Short message services flow End If End Sub ___________________________________________________________________________________________________________ Private Sub New_Vehicle_Id_Change() End Sub ___________________________________________________________________________________________________________ Private Sub Send_new_Short Message Services_Click() If SMS_FLOW.New_text.Value = "" Then MsgBox "Your message text is empty" Exit Sub End If 'Check for empty entry New_text_vehicle = SMS_FLOW.New_text.Value Sheets("ENTRANCE_LOG").Select Range("B2").Select Range(Selection, Selection.End(xlDown)).Select 'Go to entrance log On Error Resume Next 'Check on entered records Cells.Find(What:=New_text_vehicle, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate Entrance_vehicle = ActiveCell.Offset(0, 0).Value Sheets("HP_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Hp_log_lastrow = lastrow + 1 Range("A1").Value = "=NOW()" 'Inserting the enter date & time 47 Lin Yao wei ENG499 H0605627 Enter_Date = "=TEXT(A1,""dd/mm/yy"")" Range("A2").Value = Enter_Date Enter_Date = Range("A2").Value Enter_Time = "=TEXT(A1,""h:mm:ss"")" Range("A3").Value = Enter_Time Enter_Time = Range("A3").Value If Entrance_vehicle <> New_text_vehicle Then Inbox_message = "<" & Enter_Time & "> ID:" & New_text_vehicle & " Invalid vehicle ID " End If If Entrance_vehicle = New_text_vehicle Then Inbox_message = "<" & Enter_Time & "> ID:" & New_text_vehicle & " Welcome! Please reply to activate Short Message Services payment " End If Sheets("HP_LOG").Select Range("B" & Hp_log_lastrow).Value = Inbox_message Range("C" & Hp_log_lastrow).Value = New_text_vehicle Unload SMS_FLOW Application.Wait Now + TimeSerial(0, 0, 2) HP_FLOW.Show End Sub ___________________________________________________________________________________________________________ Private Sub Short Message Services_back_Click() Sheets("ENTRANCE_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Enter_count = lastrow - 2 ADMIN.Enter_count.Text = Enter_count Sheets("SMS_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Short Message Services_count = lastrow - 2 ADMIN.Short Message Services_count.Text = Short Message Services_count Sheets("EXIT_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Exit_count = lastrow - 2 ADMIN.Exit_count.Text = Exit_count Unload SMS_FLOW Load ADMIN End Sub ___________________________________________________________________________________________________________ Private Sub Short Message Services_cancel_Click() Sheets("EXIT_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Exit_count = lastrow - 2 ADMIN.Exit_count.Text = Exit_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Exit_list.Clear For Row = 3 To last_row ADMIN.Exit_list.AddItem Sheets("EXIT_LOG").Cells(Row, 2) Next Row ADMIN.Exit_list.Value = Range("B" & lastrow).Value Sheets("ENTRANCE_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Enter_count = lastrow - 2 ADMIN.Enter_count.Text = Enter_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty 48 Lin Yao wei ENG499 H0605627 lastrow = 3 End If ADMIN.Enter_list.Clear For Row = 3 To last_row ADMIN.Enter_list.AddItem Sheets("ENTRANCE_LOG").Cells(Row, 2) Next Row ADMIN.Enter_list.Value = Range("B" & lastrow).Value Sheets("SMS_LOG").Select Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count Short Message Services_count = lastrow - 2 ADMIN.Short Message Services_count.Text = Short Message Services_count Range("B3").Select lastrow = ActiveSheet.UsedRange.Rows.Count last_row = lastrow + 1 If lastrow = 2 Then 'Check for empty lastrow = 3 End If ADMIN.Short Message Services_list.Clear For Row = 3 To last_row ADMIN.Short Message Services_list.AddItem Sheets("SMS_LOG").Cells(Row, 2) Next Row ADMIN.Short Message Services_list.Value = Range("B" & lastrow).Value Unload SMS_FLOW End Sub ___________________________________________________________________________________________________________ Private Sub Short Message Services_send_Click() Dim Short Message Services_vehicle_id As String If SMS_FLOW.Entrance_Vehicle_No.Value = "" Then MsgBox "Please fill in the mobile number." Exit Sub End If 'Check for empty entry enter_Short Message Services_vehicle_id = SMS_FLOW.Entrance_Vehicle_No.Value Sheets("ENTRANCE_LOG").Select Range("B2").Select Range(Selection, Selection.End(xlDown)).Select 'Go to entrance log On Error Resume Next 'Check on entered records Cells.Find(What:=enter_Short Message Services_vehicle_id, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate If ActiveCell.Offset(0, 0).Value <> enter_Short Message Services_vehicle_id Then 'No entered records Application.Wait Now + TimeSerial(0, 0, 2) Unload SMS_FLOW HP_FLOW.Rx_Short Message Services.Value = "Inbox: No records of vehicle in carpark" HP_FLOW.Show Exit Sub End If Sheets("SMS_LOG").Select Range("B2").Select Range(Selection, Selection.End(xlDown)).Select 'Go to Short message services log On Error Resume Next 'Find for Short Message Services activation Cells.Find(What:=enter_Short Message Services_vehicle_id, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate If ActiveCell.Offset(0, 0).Value = enter_Short Message Services_vehicle_id Then 'Short message services payment activated Application.Wait Now + TimeSerial(0, 0, 2) Unload SMS_FLOW HP_FLOW.Rx_Short Message Services.Value = "Inobx: Short message services payment has already activated" HP_FLOW.Show Exit Sub Else 49 Lin Yao wei ENG499 H0605627 Sheets("SMS_LOG").Select 'Inserting the Short message services date & time Range("B1").Select lastrow = ActiveSheet.UsedRange.Rows.Count lastrow = lastrow + 1 Range("B" & lastrow).Value = enter_Short Message Services_vehicle_id Range("A1").Value = "=NOW()" Short Message Services_Date = "=TEXT(A1,""dd/mm/yy"")" Range("A2").Value = Short Message Services_Date Short Message Services_Time = "=TEXT(A1,""h:mm:ss"")" Range("A3").Value = Short Message Services_Time Range("A2:A3").Select Selection.Copy Range("C" & lastrow).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=True Columns("A:A").Select Selection.ClearContents Application.Wait Now + TimeSerial(0, 0, 2) Unload SMS_FLOW HP_FLOW.Rx_Short Message Services.Value = "Inobx: Thank you for using Short Message Services payment" HP_FLOW.Show MsgBox "Data log into Short message services database" 'Unload HP_FLOW 'Exit Short message services flow End If End Sub ___________________________________________________________________________________________________________ Private Sub UserForm_Click() End Sub ___________________________________________________________________________________________________________ 50