Advertisement
sufehmi

YUDISTIRA : Simple Report Generator

Jan 30th, 2020
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1.  
  2.  
  3. SUMMARY
  4.  
  5. We need a way to easily create reports from Yudistira's database.
  6.  
  7. The report must be in CSV format, and can be opened in Microsoft Excel.
  8.  
  9. The project is consisted of a single web page.
  10. It asked the parameters for the report. Then it'll query the database, and then the report will be automatically downloaded to user's browser.
  11.  
  12. The whole Yudistira application & portion of its database will be provided as sample.
  13.  
  14. =================
  15. INPUT
  16.  
  17. Add a menu named "Report"
  18.  
  19. Clicking on that menu will show a form with following fields :
  20.  
  21. Status : dropdown
  22. Classification : dropdown
  23. Date Range : From - To
  24. Source : textbox
  25. Tags : textbox, comma separated
  26.  
  27. EXPLANATION
  28.  
  29. Empty fields are ignored / not searched.
  30.  
  31. Status : 2 choices, True or False. Stored in database as 1 when True, and 2 when False
  32.  
  33. Classification : 9 choices, defined in application/controller/Main_Data.php :
  34.  
  35. 'False Connection' => 'False Connection',
  36. 'False Context' => 'False Context',
  37. 'Satire' => 'Satire',
  38. 'Manipulated Content' => 'Manipulated Content',
  39. 'Misleading Content' => 'Misleading Content',
  40. 'Impostor Content' => 'Impostor Content',
  41. 'Fabricated Content' => 'Fabricated Content',
  42. 'TRUE' => 'TRUE',
  43. 'Clarification' => 'Clarification'
  44.  
  45. Date range : searches the antihoax.created_at field
  46.  
  47. Source : searches the antihoax.source_issue field with " WHERE source_issue LIKE '%$source%' "
  48.  
  49. Tags : search all tags on antihoax.tags field with " WHERE tags LIKE '%$tag1%' AND tags LIKE '%$tag2%' " etc
  50.  
  51.  
  52.  
  53.  
  54. =================
  55. PROCESS
  56.  
  57. DATABASE LINKS
  58.  
  59. antihoax_content.antihoax_id links to antihoax.id
  60.  
  61. =================
  62. OUTPUT
  63.  
  64. All found records are send to user as CSV file, with the following fields included :
  65.  
  66. tablename.fieldname
  67. Title : antihoax_content.title
  68. Content : antihoax_content.content
  69. Fact : antihoax_content.fact
  70. Status : antihoax.status (1 = "True", 2 = "False")
  71. Classification : antihoax.classification
  72. Source : antihoax.source_issue
  73. Tags : antihoax.tags
  74. Date : antihoax.tanggal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement