[Dev][Project 1] Shopping Cart :P

Status
Not open for further replies.

GarettM

Posting Freak
Aug 5, 2010
833
136
Shopping Cart
TIP: This Project Has No Name :p
also No Screenies Just Yet


o OR x
[o] = Started or finished​
[x] = Not Started or barley done​


Features:
Sexy Design​
Jquery dynamic effects​
session security​
user accounts​
password recovery​

Whats Done so Far
Design:
[x] Template Handler​
[x] Design​
[x] Custom Themes​

PHP:
[o] Session Control​
[o] Mysqli Engine​
[x] Template System​
[x] Administration Panel​
[o] error Handler​
 

GarettM

Posting Freak
Aug 5, 2010
833
136
Any code snippets, Garett my man?
Sure?
Here is the index.php [ so far ]
PHP:
<?php
/**
* Shopping Cart Version 1
* Project 1
**/
 
  # Define Access
  define('access', true);
  define('time', microtime(true));
  # Error Reporting
  error_reporting(E_ALL ^ E_NOTICE);
  # Compression
  ob_start();
  # Start Session
  session_start();
  # Assign new session id every 15 minutes
  if(!isset($_SESSION['stamp'])) {
    $_SESSION['stamp'] = time();
  } elseif (time() - $_SESSION['stamp'] > 900) {
    session_regenerate_id(true);
    $_SESSION['stamp'] = time();
  }
 
  # require configuration file
  if(file_exists('config.php')) {
    require('config.php');
    $manage = new installer();
  } else {
    echo('<b>Config.samlpe.php</b> Needs to be edited and renamed config.php');
    exit;
  }
 
  # require database handler
  require( dirname(__FILE__) . '/inc/db.manager.php');
  $manage->db  = new database($conf['sql']['host'], $conf['sql']['user'], $conf['sql']['pass'], $conf['sql']['database']);
  require( dirname(__FILE__) . '/inc/cart.manager.php');
  $manage->cart = new cart();
 
  # if Get Item ID or Action
 
  $_GET['item'] = strip_tags($_GET['item']); // Needs More Security ;)
  $_GET['action'] = strip_tags($_GET['action']); // Ditto ^_^
 
  # Time Completed
  $seconds = number_format(microtime(true) - time, 2);
 
  echo("Page Loaded in : $seconds seconds");
  ob_end_flush();
 

Baevus

the names ethan
Nov 4, 2012
565
47
Sure?
Here is the index.php [ so far ]
PHP:
<?php
/**
* Shopping Cart Version 1
* Project 1
**/
 
  # Define Access
  define('access', true);
  define('time', microtime(true));
  # Error Reporting
  error_reporting(E_ALL ^ E_NOTICE);
  # Compression
  ob_start();
  # Start Session
  session_start();
  # Assign new session id every 15 minutes
  if(!isset($_SESSION['stamp'])) {
    $_SESSION['stamp'] = time();
  } elseif (time() - $_SESSION['stamp'] > 900) {
    session_regenerate_id(true);
    $_SESSION['stamp'] = time();
  }
 
  # require configuration file
  if(file_exists('config.php')) {
    require('config.php');
    $manage = new installer();
  } else {
    echo('<b>Config.samlpe.php</b> Needs to be edited and renamed config.php');
    exit;
  }
 
  # require database handler
  require( dirname(__FILE__) . '/inc/db.manager.php');
  $manage->db  = new database($conf['sql']['host'], $conf['sql']['user'], $conf['sql']['pass'], $conf['sql']['database']);
  require( dirname(__FILE__) . '/inc/cart.manager.php');
  $manage->cart = new cart();
 
  # if Get Item ID or Action
 
  $_GET['item'] = strip_tags($_GET['item']); // Needs More Security ;)
  $_GET['action'] = strip_tags($_GET['action']); // Ditto ^_^
 
  # Time Completed
  $seconds = number_format(microtime(true) - time, 2);
 
  echo("Page Loaded in : $seconds seconds");
  ob_end_flush();
Wowow, Nice :)
Good luck man!
 

IntactDev

Member
Nov 22, 2012
399
71
Sure?
Here is the index.php [ so far ]
PHP:
<?php
/**
* Shopping Cart Version 1
* Project 1
**/
 
  # Define Access
  define('access', true);
  define('time', microtime(true));
  # Error Reporting
  error_reporting(E_ALL ^ E_NOTICE);
  # Compression
  ob_start();
  # Start Session
  session_start();
  # Assign new session id every 15 minutes
  if(!isset($_SESSION['stamp'])) {
    $_SESSION['stamp'] = time();
  } elseif (time() - $_SESSION['stamp'] > 900) {
    session_regenerate_id(true);
    $_SESSION['stamp'] = time();
  }
 
  # require configuration file
  if(file_exists('config.php')) {
    require('config.php');
    $manage = new installer();
  } else {
    echo('<b>Config.samlpe.php</b> Needs to be edited and renamed config.php');
    exit;
  }
 
  # require database handler
  require( dirname(__FILE__) . '/inc/db.manager.php');
  $manage->db  = new database($conf['sql']['host'], $conf['sql']['user'], $conf['sql']['pass'], $conf['sql']['database']);
  require( dirname(__FILE__) . '/inc/cart.manager.php');
  $manage->cart = new cart();
 
  # if Get Item ID or Action
 
  $_GET['item'] = strip_tags($_GET['item']); // Needs More Security ;)
  $_GET['action'] = strip_tags($_GET['action']); // Ditto ^_^
 
  # Time Completed
  $seconds = number_format(microtime(true) - time, 2);
 
  echo("Page Loaded in : $seconds seconds");
  ob_end_flush();
I noticed you included the configuration file, then went straight to the installation... what if the installation has already been completed? I have to re-install the site over and over? You should fix that :3
 

GarettM

Posting Freak
Aug 5, 2010
833
136
I noticed you included the configuration file, then went straight to the installation... what if the installation has already been completed? I have to re-install the site over and over? You should fix that :3
Haha no the installer is in the config file :p if the values in the config file are blank itll take over
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
Why are you loading everything in index.php, instead of using a global.php file which you need to include once?
 

Beast

Posting Freak
Sep 15, 2011
625
163
Just to make it more neat like Wess said I would call it all from a global.php file that way the index won't be as confusing.
 

GarettM

Posting Freak
Aug 5, 2010
833
136
Just to make it more neat like Wess said I would call it all from a global.php file that way the index won't be as confusing.
I Document Everything B4 releasing nothing will be confusing dont worrie
 

GarettM

Posting Freak
Aug 5, 2010
833
136
Shutdown thread i kinda got pissed when devbest played the habbo april first joke and destroyed my sever.....
Yea over reacted ....
 

GarettM

Posting Freak
Aug 5, 2010
833
136
It was a old PC running Linux :) got it free so it worked imma restart the project and use the MVC method ;3 keep it simple

Sent from my SGH-T999 using Tapatalk 2
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
Doesn't seem too bad. I'd be interested to see your 'sexy design', got any screenshots of it, or screenshots of the functionality?
 
Status
Not open for further replies.

Users who are viewing this thread

Top