We will write the plain PHP version of one of our executable PC software. The database is MSSQL. This is a big software, so we will go step by step. In this very first step we need only 3 pages;
1. The login page.
2. The CHECKS control page.
The database structure is below. We need a detailed search/list option (we need to add criteria for at least 14-15 fields)
User will be able to add and edit data.
3. The CASH_PAYMENTS control page
Completely same designed as CHECKS control page, and the db structure is below.
Both tables are linked to another tables but you dont need to edit any other table for this moment.
All the database and hosting information will be delivered to you. The database is ready, you dont need to create or add data to start. The graphical design will be also delivered as JPG files. (graphical design is very very simple, while to functionnality is more important)
While this will be a modular software (some part will be written by ourselves), some more details needed;
1. There will be a “user_info” table and all the table fields order and column widths will be read from there. It means that you will read the columns orders and widths from the database.
2. You need to use some already defined functions for
OpenConn() : Open Connection
CloseConn() : Close Connection
ms_exec(): mssql_query for executing SQL statements.
3. The most important thing is that, in the list panel, you need to read data with ajax.load, so we can cancel the search criteria and update/change it. It means that we will always have 2 divs; one to search, second to list. The edit/update/addnew windows would be popup windows, as usual.
4. The page should run correctly on different PC browsers as IE, Firefox and Chrome.
5. This is the start of the project, so the code need to be clean, and “readable”, because we will add more modules using the same CSS and functions.
CREATE TABLE [dbo].[CHECKS](
[CHECK_ID] [int] NOT NULL,
[BOOK_NO_YEAR] [int] NULL,
[BOOK_NO_MONTH] [int] NULL,
[BOOK_NO_ID] [int] NULL,
[CHECK_TYPE_NO] [int] NULL,
[DATE_OF_GET] [smalldatetime] NULL,
[CUSTOMER_NO] [int] NULL,
[KESIDE] [nvarchar](50) NULL,
[CHECK_NO] [nvarchar](50) NULL,
[BANK] [nvarchar](50) NULL,
[BRANCH] [nvarchar](50) NULL,
[ACCOUNT] [nvarchar](50) NULL,
[DATE_INFO] [smalldatetime] NULL,
[DATE_OF_COLLECT] [smalldatetime] NULL,
[AMOUNT] [float] NULL,
[PRICE_UNIT_NO] [int] NULL,
[MAIN_AMOUNT] [float] NULL,
[SPECIAL_RATE] [float] NULL,
[ENDORSEMENT] [nvarchar](50) NULL,
[CHECK_STATUS_NO] [int] NULL,
[CLEARED] [int] NULL,
[TRANSFERRED_CUSTOMER_NO] [int] NULL,
[TRANSFERRED_LOC] [nvarchar](100) NULL,
[PROTESTED_CHECK] [int] NULL,
[TRANSFERRED_DATE] [smalldatetime] NULL,
[NOTES] [nvarchar](4000) NULL,
[VERGI_NO] [nvarchar](50) NULL
CREATE TABLE [dbo].[CASH_PAYMENTS](
[CASH_PAYMENT_ID] [int] NULL,
[DATE_INFO] [smalldatetime] NULL,
[CUSTOMER_NO] [int] NULL,
[AMOUNT] [float] NULL,
[MAIN_AMOUNT] [float] NULL,
[SPECIAL_RATE] [float] NULL,
[PRICE_UNIT_NO] [int] NULL,
[CLEARED] [int] NULL,
[PROTESTED_CHECK] [int] NULL,
[NOTES] [nvarchar](4000) NULL
) ON [PRIMARY]
GO