PHP changes

  1. Combine DB calls as much as possible
  2. Remove absolute server links and make relational.
  3. Add a namespace and remove all global vars, unless specifically needed.
  4. Separate presentation from functionality. Controller page and then include the html needed for that view. View functionality like repeating table rows can go in the view page, any logic needs to stay in the php page. All formatting and layout of the view should be in the html/css.
  5. Organize the php and move vars to the top of the section
  6. Securely screen all incoming form data, and then sql screen before sending to db.
  7.  

 

Files to change

  1. request_form.php
  2. confirmation.php
  3. admin/index.php
  4. admin/actions.php
  5. admin/feed/index.php
  6. dashboard\includes\approve\cur_fis_year.php
  7. dashboard\includes\approve\cur_month.php
  8. dashboard\includes\approve\cur_year.php
  9. dashboard\includes\approve\past_30days.php
  10. dashboard\includes\approve\past_week.php
  11. dashboard\includes\length\cur_fis_year.php
  12. dashboard\includes\length\cur_month.php
  13. dashboard\includes\length\cur_year.php
  14. dashboard\includes\length\past_30days.php
  15. dashboard\includes\length\past_week.php
  16. dashboard\list_results.php
  17. dashboard\results.php

 

 

  • No labels