FWAssignment

download FWAssignment

of 8

Transcript of FWAssignment

  • 8/6/2019 FWAssignment

    1/8

    1

    Freshersworld Assignment

    Assignment is all about a secure Product Management System.

    Technology to be used1. Programming Language PHP and Javascript2. Database Mysql

    Instruction and supporting data

    1. All operations should be password protected2. Fields in forms are mandatory and validation to be done3. Database table schema provided at the end of document4. Sample Data also provided5. Use provided table and data to build this application6. Sample design for each page is being provided in the pictures below,

    please use the same design layout for all the pages7. The coding standards like naming convention, query optimization,

    database design should be maintained.8. For all these pages design of html should be clean.

    This application has three pages1. Login page2. Product Store listing page3. Add/Edit product page

  • 8/6/2019 FWAssignment

    2/8

    2

    Login page

    First user has to enter his username and password to access product add andproduct display page.

    Create a login form and use the table and data provided at the end of thisdocument.

    Add Validation for Username and Password.

    After successful login user should be automatically redirected to ProductsListing Page (Screen 2).

    Design for the login page on Screen1

    Screen 1:

  • 8/6/2019 FWAssignment

    3/8

    3

    Product Store listing page This page will list all the products from all product categories and all sub-

    categories.

    On click of any product name the product image should open as a popup.

    Operation column has two things Edit and Delete actions, which a usercan take for any product in the listing page by clicking on the icon Edit

    and Delete

    Edit action should take to Edit Page (Screen 4)

    Delete action prompt confirmation message asking Do you want todelete: Yes or No

    To delete multiple products in one action use Check All/Uncheck All thenselect from drop down menu Delete like any mailbox.

    Pagination required like . Each page would displaymaximum of 8 products.

    Screen : 2

  • 8/6/2019 FWAssignment

    4/8

    4

    From the menu user can go to add products page.

    Add/Edit product page Add page should be like on screen 3.

    All fields are mandatory so add validation for all fields. Data for the drop down menu will come from database table Product

    category and Product Sub-Category. The data is also provided in the endof this document. Their category and sub category is coming from thedatabase and both are relative. For example If user select a category ofelectronics goods then all the sub categories of electronic good should befetched from database and populated in the subcategory field.

    While a user uploads a product picture (For this the file extension shouldbe checked and file name should be same as the product id when savingin the server).

    Screen :3

  • 8/6/2019 FWAssignment

    5/8

    5

    Edit product will be like screen 4.

    By default all the data should be filled in the form fields for the selectedproduct.

    Screen:4

    After logout the user should to be taken to login page.

    He should not be able to view product pages without login in.

  • 8/6/2019 FWAssignment

    6/8

    6

    Database for this Application:

    ---- Database: `products`--

    -- --------------------------------------------------------

    ---- Table structure for table `admin`--

    CREATE TABLE IF NOT EXISTS `admin` (

    `id` int(11) NOT NULL auto_increment,`username` varchar(20) NOT NULL,`password` varchar(20) NOT NULL,PRIMARY KEY (`id`),UNIQUE KEY `username` (`username`)

    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

    ---- Dumping data for table `admin`--

    INSERT INTO `admin` (`id`, `username`, `password`) VALUES(1, 'admin', 'admin');

    -- --------------------------------------------------------

    ---- Table structure for table `category`--

    CREATE TABLE IF NOT EXISTS `category` (`cat_id` int(11) NOT NULL auto_increment,`cat_name` varchar(80) NOT NULL,PRIMARY KEY (`cat_id`)

    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

    ---- Dumping data for table `category`

  • 8/6/2019 FWAssignment

    7/8

    7

    --

    INSERT INTO `category` (`cat_id`, `cat_name`) VALUES(1, 'Electronics Goods'),(2, 'Household Items'),

    (3, 'Books'),(4, 'Furnitures');

    -- --------------------------------------------------------

    ---- Table structure for table `products`--

    CREATE TABLE IF NOT EXISTS `products` (`product_id` int(11) NOT NULL auto_increment,

    `product_name` varchar(150) NOT NULL,`subcat_id` int(11) NOT NULL,`price` varchar(20) NOT NULL,`description` text NOT NULL,`product_image` varchar(200) NOT NULL,`uploaded_date` varchar(50) NOT NULL,PRIMARY KEY (`product_id`)

    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

    -- --------------------------------------------------------

    ---- Table structure for table `subcategory`--

    CREATE TABLE IF NOT EXISTS `subcategory` (`subcat_id` int(11) NOT NULL auto_increment,`cat_id` int(11) NOT NULL,`subcat_name` varchar(80) NOT NULL,PRIMARY KEY (`subcat_id`)

    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;

    ---- Dumping data for table `subcategory`--

  • 8/6/2019 FWAssignment

    8/8

    8

    INSERT INTO `subcategory` (`subcat_id`, `cat_id`, `subcat_name`) VALUES(1, 1, 'Laptops'),(2, 1, 'Computers'),(3, 1, 'Television'),(4, 2, 'Interior Decoration items'),

    (5, 2, 'Gas Oven'),(6, 3, 'Story Books'),(7, 3, 'Cartoons'),(8, 3, 'Technology'),(9, 4, 'Tables'),(10, 4, 'Chairs');