Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    721
    Thanks
    20
    Thanked 84 Times in 84 Posts

    Question PHP/MYSQL Accounts Package

    Hi fellow coders!

    i'm going to develop an online accounts/company package.

    i want to be able to have licences for it etc. (need advice on this)

    also if anyone has any name suggestions, any and all ideas are welcome no matter what it is, im interested in ANY ideas you may have

    and of course SECURITY is going to be key

    any of you supreme coders got any tips on security/themes/templates/classes/functions or anything else before i start?

    i dont expect anyone to write code for me but advice before i start could save me 100's of man hours re-editing the code to include things i've missed.

    main features will include:

    • Easy to use
    • Very Secure
    • Licenced
    • Multi user
    • Stock Control (with images)
    • Personel (Wages/Holidays etc)
    • Invoices (email as PDF or print)
    • Delivery Notes
    • Job Cards
    • Purchase Orders
    • Production


    i would also like if time permits

    • Multi-Company
    • Project Management
    • Themes
    • Authorized Orders over a certain amount
    • CRM <- may upgrade to manditory


    Thanks in advance.

    Arctic.
    Last edited by Arcticwarrio; 02-28-2013 at 07:57 PM.
    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month

  • #2
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    721
    Thanks
    20
    Thanked 84 Times in 84 Posts
    this is what i propose to use for my DB

    PHP Code:
    function db($Action) {
    $db_host 'localhost';
    $db_name 'dbname';
    $db_user 'root';
    $db_pass 'password';
        if ( 
    $Action == 'open' ) {
            
    mysql_connect(DB_NAME$db_user$db_pass) or die ( 'Unable to connect to the server.<br>' );
            
    mysql_select_db($db_name) or die ( 'Unable to select the database.<br>' );
        } else if ( 
    $Action == 'close' ) {
            
    mysql_close() or die ( 'Unable to disconnect from the server.<br>' );
        } else {
            echo 
    'The handle that was sent is not valid. Please check and try again.<br>';
        }
    }

    function 
    query($query$line) {

        global 
    $queries$queries_time$queries_count;
        
    $time_overall round(microtime(), 15);
        
    $queries_count++;

        
    // Add the query to the queries list. Dont add a break at the end incase an error occured
        
    $queries .= 'Line <b>'$line '</b> of file <b>' $_SERVER['PHP_SELF'] . '</b> requested <b>' $query '</b>';

        
    // Do the query if it can
        
    if (!$result mysql_query($query))    {
            echo 
    'Error on line <b>'$line '</b> of file <b>' $_SERVER['PHP_SELF'] . '</b> requesting <b>' $query '</b><br>';
            
    $queries .= ' <b>ERROR OCCURED</b><br>';
        } else {
            
    $queries .= '<br>';
        }

        
    $time2_overall round(microtime(), 15);
        
    $gen_overall $time2_overall $time_overall;
        
    $queries_time $queries_time $gen_overall ;

        return 
    $result;

    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month

  • #3
    Regular Coder Arcticwarrio's Avatar
    Join Date
    May 2012
    Location
    UK
    Posts
    721
    Thanks
    20
    Thanked 84 Times in 84 Posts
    changed my db file already lol

    PHP Code:
    function Q($query) {
        
    $Username '****';
        
    $Password '****';
        
    $Database '****';
        
    $Host '****';
        global 
    $queries$queries_time$queries_count;
        
    $queries_count++;
        
    mysql_connect($Host$Username$Password) or die ( 'Unable to connect to the server.<br>' );
        
    mysql_select_db($Database) or die ( 'Unable to select the database.<br>' );
        
    $queries .= 'Line <b>'__LINE__ '</b> of file <b>' .__FILE__ '</b> requested <b>' $query '</b>';
        
    $time_overall round(microtime(),4);
        if (!
    $result mysql_query($query))    {
            echo 
    '<pre>Error on line <b>'__LINE__ '</b> of file <b>' __FILE__ '</b> requesting <b>' $query '</b></pre><br>';
            
    $queries .= ' <b>ERROR OCCURED</b><br>';
        } else {
            
    $queries .= '<br>';
        }
        
    $time2_overall round(microtime(), 4);
        
    $gen_overall $time2_overall $time_overall;
        
    $queries_time substr($queries_time $gen_overall,0,6) ;
        
    mysql_close() or die ( 'Unable to disconnect from the server.<br>' );
        return 
    $result;

    There are 10 types of people on CodingForums,
    Those who understand Binary and those who dont.
    Get Cloud Hosting now from only£59 / month

  • #4
    New Coder
    Join Date
    Jan 2012
    Location
    Latvia
    Posts
    65
    Thanks
    8
    Thanked 2 Times in 2 Posts
    Hi! I would recommend you to use MySQLi or PDO, the old way of MySQL will be removed from PHP in newer PHP versions. This was the first thing, which came to mind reading this. I'll let our Pro's to tip you up further.

    Ralph.
    "Be formless... shapeless, like water. Now you put water into a cup, it becomes the cup. You pour water into a bottle; it becomes the bottle. You put water into a teapot; it becomes the teapot. Now water can flow, or creep or drip or crash! Be water, my friend..." by Bruce Lee


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •