Clemson Classifieds –
       Real Time Online Classifieds for Web Portal



                Clemson University,
          ...
1.      SYSTEM	
  OVERVIEW	
  	
  
	
  
Clemson Classifieds is a web portal, which features online classifieds of the Clem...
 
       Fig: E-R Model
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
2.          PHP CODE SNIPPETS
	
  
Database	
  Connection:	
  	
  
The	
   following	
   code	
   is	
   used	
   to	
   c...
 
	
  
Posting	
  a	
  New	
  Deal:	
  	
  
	
  
The	
   following	
   code	
   inserts	
   the	
   details	
   of	
   a	
...
 
Display	
  Deals	
  on	
  Home	
  Page:	
  	
  
	
  
The	
  following	
  code	
  displays	
  the	
  product	
  deals	
  ...
 
	
  
Edit	
  Deals:	
  	
  
	
  
The	
   following	
   code	
   updates	
   the	
   details	
   of	
   an	
   existing	
...
 
	
  
	
  
Display	
  Product	
  Info:	
  	
  	
  
	
  
The	
   following	
   code	
   displays	
   the	
   complete	
   ...
 
Search	
  Deals	
  based	
  on	
  keywords:	
  	
  
	
  
The	
  following	
  code	
  is	
  used	
  to	
  search	
  for	
...
 
	
  
Calendar	
  based	
  search:	
  	
  
	
  
The	
  following	
  code	
  is	
  used	
  to	
  search	
  for	
  deals	
 ...
Category	
  based	
  Search:	
  	
  
	
  
	
  
The	
  following	
  code	
  is	
  used	
  to	
  search	
  for	
  deals	
  b...
 
Dynamic	
  Retrieval	
  of	
  Categories	
  list	
  	
  (AJAX):	
  	
  
	
  
The	
   following	
   is	
   an	
   Ajax	
 ...
 




       	
  
	
  
Upcoming SlideShare
Loading in …5
×

Code_snippets

527 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
527
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Code_snippets

  1. 1. Clemson Classifieds – Real Time Online Classifieds for Web Portal Clemson University, School of Computing Srikanth Vanama                        
  2. 2. 1. SYSTEM  OVERVIEW       Clemson Classifieds is a web portal, which features online classifieds of the Clemson community. This web application is used to bring the buyer and seller closer by providing a web based platform. The portal has been designed to be very user friendly. There are categories in the portal in which a user can post deals. This categorization provides easy navigation. A client can do a lot of things on the website like post new items, comment on existing items, subscribe for Email/SMS alerts etc. Subscribing for Email/SMS alerts means that the user gets latest updates on what is happening in that specific category. All the updates can be emailed to the interested user and thus he can check for updates right from his inbox. There is also an “Email this” link, using which the user can send a post as an email to anyone he wishes, including to himself! This is a very convenient and useful feature. There is also a search feature included in the website where a user can do an item based search or category based search. Advanced search is also provided and the user can search using appropriate filters. For example, in the motor vehicles category, the user can choose specific price range and type and make his search easier and more precise. Apart from the search, there is also a calendar that is provided on the website. If a client remembers the date a deal was posted, he can directly click on the date and reach the relevant post. All the latest and hottest deals are posted on the homepage so that the current trends can be observed. Given all the features, we feel that this would be of great help to the Clemson community.
  3. 3.   Fig: E-R Model                                  
  4. 4. 2. PHP CODE SNIPPETS   Database  Connection:     The   following   code   is   used   to   connect   to   the   database   “f09t14”   through   PHP   commands.  The  entire  project  was  hosted  in  the  database  ‘f09t14’.           New  User  Registration:       The   following   code   inserts   the   details   of   a   new   user   who   has   registered   on   the   clemson  classifieds  website.    The  below  code  inserts  all  the  details  into  the  “users”   table  which  includes  fields  like  username,  gender,  date  of  birth,  address,  email,  zip   code,  option  to  choose  for  email  alerts  or  SMS  alerts.         Edit  Profile:       The   following   code   updates   the   details   of   a   registered   user   on   the   website.   The   updated   fields   reflect   in   the   “Users”   table   pertaining   to   that   user.   Examples   of   the   the  fields  include  password,  title,  first  name,  last  name,  gender  and  other  personal   details  of  the  user.  
  5. 5.     Posting  a  New  Deal:       The   following   code   inserts   the   details   of   a   new   deal   posted   by   the   user   in   the   products   table.   All   the   product   details   are   inserted   in   the   various   fields   of   the   “Products”   table.   The   fields   include   date   of   posting,   product   deadline,   price   of   the   product,  product  description,  product  name,  keywords  associated  with  the  product   and  also  the  name  of  the  user  who  has  posted  a  new  deal.   Also,  the  details  of  the  category  under  which  the  product  was  posted  are  stored  in   “Category”  table.      
  6. 6.   Display  Deals  on  Home  Page:       The  following  code  displays  the  product  deals  on  the  home  page  sorted  by  various   criteria.  The  details  of  the  products  include  product  name,  price  of  the  product,  date   posted,   deadline   of   the   product.     The   product   details   are   retrieved   from   the   “Products”  table.  The  images  related  to  a  product  are  retrieved  from  “Profileimages”   table.   The   “Productinfo”   and   “Email   this”   buttons   are   also   displayed   on   the   homepage  along  with  the  product  details.      
  7. 7.     Edit  Deals:       The   following   code   updates   the   details   of   an   existing   deal   posted   by   a   registered   user  on  the  website.  The  updated  fields  reflect  in  the  “Products”  table  pertaining  to   that  product.  Examples  of  the  fields  include  product  name,  date  of  posting,  deadline,   price,  product  description  and  also  keywords  related  to  that  product.      
  8. 8.       Display  Product  Info:         The   following   code   displays   the   complete   details   of   a   product.   The   details   of   the   products   include   product   name,   price   of   the   product,   date   posted,   deadline   of   the   product,  product  description.  The  product  details  are  retrieved  from  the  “Products”   table.  The  images  related  to  a  product  are  retrieved  from  “Profileimages”  table.  The   “Productinfo”   and   “Email   this”   buttons   are   also   displayed   on   the   homepage   along   with  the  product  details.          
  9. 9.   Search  Deals  based  on  keywords:       The  following  code  is  used  to  search  for  deals  based  on  the  keywords  entered  by  the   user.  If  a  keyword  matches  with  the  keywords  associated  with  any  of  the  product,   the  product  gets  displayed  in  the  search  results.    
  10. 10.     Calendar  based  search:       The  following  code  is  used  to  search  for  deals  based  on  the  calendar  entries  entered   by   the   user.   If   a   keyword   matches   with   the   keywords   associated   with   any   of   the   product,  the  product  gets  displayed  in  the  search  results          
  11. 11. Category  based  Search:         The  following  code  is  used  to  search  for  deals  based  on  the  category  chosen  by  the   user.  If  a  keyword  matches  with  the  keywords  associated  with  any  of  the  product,   the   product   gets   displayed   in   the   search   results.   Example   categories   include   Cars,   Mobile  Phones,  and  Sporting  Goods  etc.            
  12. 12.   Dynamic  Retrieval  of  Categories  list    (AJAX):       The   following   is   an   Ajax   code   to   retrieve   category   and   sub   category   list   from   the   database  stored  in  the  table  “Category”.             E-­‐mail  Form:       The  following  code  is  used  to  send  an  email  to  a  referred  friend.  The  “To”  field  and   the   “Subject”   field   would   include   those   details   entered   by   the   user   when   filling   an   e-­‐ mail   form.   The   content   of   the   email   would   include   the   details   of   the   referred   product,  which  includes  Product  name,  Price,  Product  URL.    
  13. 13.      

×