Skip to content
Browse files

Updated to latest CI code, version updated to PB&J

- official A3M version changed to PB&J
- update of full CI 2.X install to 2.1.2
- cleanup of CSS
- cleanup of issues (file deletion)
- update of database schema
- deleted silk icons (not needed in package)
... and various other small fixes
  • Loading branch information...
1 parent 73995a2 commit 0f49b7a0af33137fcd38e8dde4dabd3ae192067f Jakub committed Jul 24, 2012
Showing with 102,609 additions and 102,304 deletions.
  1. +4 −4 .htaccess
  2. +72 −0 README.rst
  3. +101,253 −101,312 a3m_mushmellow.sql → a3m_database.sql
  4. +359 −359 application/config/config.php
  5. +61 −61 application/config/database.php
  6. +246 −177 application/config/user_agents.php
  7. +21 −21 application/language/english/general_lang.php
  8. +143 −142 application/modules/account/controllers/account_profile.php
  9. +18 −14 application/modules/account/views/account_menu.php
  10. +107 −105 application/modules/account/views/sign_up.php
  11. +12 −12 application/views/footer.php
  12. +38 −22 application/views/home.php
  13. +51 −12 index.php
  14. +224 −63 resource/css/style.css
  15. BIN resource/img/silk_icons/accept.png
  16. BIN resource/img/silk_icons/accept_faded.png
  17. BIN resource/img/silk_icons/add.png
  18. BIN resource/img/silk_icons/add_faded.png
  19. BIN resource/img/silk_icons/anchor.png
  20. BIN resource/img/silk_icons/anchor_faded.png
  21. BIN resource/img/silk_icons/application.png
  22. BIN resource/img/silk_icons/application_add.png
  23. BIN resource/img/silk_icons/application_add_faded.png
  24. BIN resource/img/silk_icons/application_cascade.png
  25. BIN resource/img/silk_icons/application_cascade_add.png
  26. BIN resource/img/silk_icons/application_cascade_add_faded.png
  27. BIN resource/img/silk_icons/application_cascade_delete.png
  28. BIN resource/img/silk_icons/application_cascade_delete_faded.png
  29. BIN resource/img/silk_icons/application_cascade_faded.png
  30. BIN resource/img/silk_icons/application_cascade_go.png
  31. BIN resource/img/silk_icons/application_cascade_go_faded.png
  32. BIN resource/img/silk_icons/application_delete.png
  33. BIN resource/img/silk_icons/application_delete_faded.png
  34. BIN resource/img/silk_icons/application_double.png
  35. BIN resource/img/silk_icons/application_double_faded.png
  36. BIN resource/img/silk_icons/application_edit.png
  37. BIN resource/img/silk_icons/application_edit_faded.png
  38. BIN resource/img/silk_icons/application_error.png
  39. BIN resource/img/silk_icons/application_error_faded.png
  40. BIN resource/img/silk_icons/application_faded.png
  41. BIN resource/img/silk_icons/application_form.png
  42. BIN resource/img/silk_icons/application_form_add.png
  43. BIN resource/img/silk_icons/application_form_add_faded.png
  44. BIN resource/img/silk_icons/application_form_delete.png
  45. BIN resource/img/silk_icons/application_form_delete_faded.png
  46. BIN resource/img/silk_icons/application_form_edit.png
  47. BIN resource/img/silk_icons/application_form_edit_faded.png
  48. BIN resource/img/silk_icons/application_form_faded.png
  49. BIN resource/img/silk_icons/application_form_magnify.png
  50. BIN resource/img/silk_icons/application_form_magnify_faded.png
  51. BIN resource/img/silk_icons/application_get.png
  52. BIN resource/img/silk_icons/application_get_faded.png
  53. BIN resource/img/silk_icons/application_go.png
  54. BIN resource/img/silk_icons/application_go_faded.png
  55. BIN resource/img/silk_icons/application_home.png
  56. BIN resource/img/silk_icons/application_home_faded.png
  57. BIN resource/img/silk_icons/application_key.png
  58. BIN resource/img/silk_icons/application_key_faded.png
  59. BIN resource/img/silk_icons/application_lightning.png
  60. BIN resource/img/silk_icons/application_lightning_faded.png
  61. BIN resource/img/silk_icons/application_link.png
  62. BIN resource/img/silk_icons/application_link_faded.png
  63. BIN resource/img/silk_icons/application_osx.png
  64. BIN resource/img/silk_icons/application_osx_faded.png
  65. BIN resource/img/silk_icons/application_osx_terminal.png
  66. BIN resource/img/silk_icons/application_osx_terminal_faded.png
  67. BIN resource/img/silk_icons/application_put.png
  68. BIN resource/img/silk_icons/application_put_faded.png
  69. BIN resource/img/silk_icons/application_side_boxes.png
  70. BIN resource/img/silk_icons/application_side_boxes_faded.png
  71. BIN resource/img/silk_icons/application_side_contract.png
  72. BIN resource/img/silk_icons/application_side_contract_faded.png
  73. BIN resource/img/silk_icons/application_side_expand.png
  74. BIN resource/img/silk_icons/application_side_expand_faded.png
  75. BIN resource/img/silk_icons/application_side_list.png
  76. BIN resource/img/silk_icons/application_side_list_faded.png
  77. BIN resource/img/silk_icons/application_side_tree.png
  78. BIN resource/img/silk_icons/application_side_tree_faded.png
  79. BIN resource/img/silk_icons/application_split.png
  80. BIN resource/img/silk_icons/application_split_faded.png
  81. BIN resource/img/silk_icons/application_tile_horizontal.png
  82. BIN resource/img/silk_icons/application_tile_horizontal_faded.png
  83. BIN resource/img/silk_icons/application_tile_vertical.png
  84. BIN resource/img/silk_icons/application_tile_vertical_faded.png
  85. BIN resource/img/silk_icons/application_view_columns.png
  86. BIN resource/img/silk_icons/application_view_columns_faded.png
  87. BIN resource/img/silk_icons/application_view_detail.png
  88. BIN resource/img/silk_icons/application_view_detail_faded.png
  89. BIN resource/img/silk_icons/application_view_gallery.png
  90. BIN resource/img/silk_icons/application_view_gallery_faded.png
  91. BIN resource/img/silk_icons/application_view_icons.png
  92. BIN resource/img/silk_icons/application_view_icons_faded.png
  93. BIN resource/img/silk_icons/application_view_list.png
  94. BIN resource/img/silk_icons/application_view_list_faded.png
  95. BIN resource/img/silk_icons/application_view_tile.png
  96. BIN resource/img/silk_icons/application_view_tile_faded.png
  97. BIN resource/img/silk_icons/application_xp.png
  98. BIN resource/img/silk_icons/application_xp_faded.png
  99. BIN resource/img/silk_icons/application_xp_terminal.png
  100. BIN resource/img/silk_icons/application_xp_terminal_faded.png
  101. BIN resource/img/silk_icons/arrow_branch.png
  102. BIN resource/img/silk_icons/arrow_branch_faded.png
  103. BIN resource/img/silk_icons/arrow_branch_red.png
  104. BIN resource/img/silk_icons/arrow_branch_red_faded.png
  105. BIN resource/img/silk_icons/arrow_divide.png
  106. BIN resource/img/silk_icons/arrow_divide_down.png
  107. BIN resource/img/silk_icons/arrow_divide_down_faded.png
  108. BIN resource/img/silk_icons/arrow_divide_down_red.png
  109. BIN resource/img/silk_icons/arrow_divide_down_red_faded.png
  110. BIN resource/img/silk_icons/arrow_divide_faded.png
  111. BIN resource/img/silk_icons/arrow_divide_red.png
  112. BIN resource/img/silk_icons/arrow_divide_red_faded.png
  113. BIN resource/img/silk_icons/arrow_down.png
  114. BIN resource/img/silk_icons/arrow_down_faded.png
  115. BIN resource/img/silk_icons/arrow_down_red.png
  116. BIN resource/img/silk_icons/arrow_down_red_faded.png
  117. BIN resource/img/silk_icons/arrow_in.png
  118. BIN resource/img/silk_icons/arrow_in_faded.png
  119. BIN resource/img/silk_icons/arrow_in_red.png
  120. BIN resource/img/silk_icons/arrow_in_red_faded.png
  121. BIN resource/img/silk_icons/arrow_inout.png
  122. BIN resource/img/silk_icons/arrow_inout_faded.png
  123. BIN resource/img/silk_icons/arrow_inout_red.png
  124. BIN resource/img/silk_icons/arrow_inout_red_faded.png
  125. BIN resource/img/silk_icons/arrow_join.png
  126. BIN resource/img/silk_icons/arrow_join_faded.png
  127. BIN resource/img/silk_icons/arrow_join_red.png
  128. BIN resource/img/silk_icons/arrow_join_red_faded.png
  129. BIN resource/img/silk_icons/arrow_left.png
  130. BIN resource/img/silk_icons/arrow_left_faded.png
  131. BIN resource/img/silk_icons/arrow_left_red.png
  132. BIN resource/img/silk_icons/arrow_left_red_faded.png
  133. BIN resource/img/silk_icons/arrow_merge.png
  134. BIN resource/img/silk_icons/arrow_merge_faded.png
  135. BIN resource/img/silk_icons/arrow_merge_red.png
  136. BIN resource/img/silk_icons/arrow_merge_red_faded.png
  137. BIN resource/img/silk_icons/arrow_out.png
  138. BIN resource/img/silk_icons/arrow_out_faded.png
  139. BIN resource/img/silk_icons/arrow_out_red.png
  140. BIN resource/img/silk_icons/arrow_out_red_faded.png
  141. BIN resource/img/silk_icons/arrow_redo.png
  142. BIN resource/img/silk_icons/arrow_redo_faded.png
  143. BIN resource/img/silk_icons/arrow_redo_red.png
  144. BIN resource/img/silk_icons/arrow_redo_red_faded.png
  145. BIN resource/img/silk_icons/arrow_refresh.png
  146. BIN resource/img/silk_icons/arrow_refresh_faded.png
  147. BIN resource/img/silk_icons/arrow_refresh_red.png
  148. BIN resource/img/silk_icons/arrow_refresh_red_faded.png
  149. BIN resource/img/silk_icons/arrow_refresh_small.png
  150. BIN resource/img/silk_icons/arrow_refresh_small_faded.png
  151. BIN resource/img/silk_icons/arrow_refresh_small_red.png
  152. BIN resource/img/silk_icons/arrow_refresh_small_red_faded.png
  153. BIN resource/img/silk_icons/arrow_right.png
  154. BIN resource/img/silk_icons/arrow_right_faded.png
  155. BIN resource/img/silk_icons/arrow_right_red.png
  156. BIN resource/img/silk_icons/arrow_right_red_faded.png
  157. BIN resource/img/silk_icons/arrow_rotate_anticlockwise.png
  158. BIN resource/img/silk_icons/arrow_rotate_anticlockwise_faded.png
  159. BIN resource/img/silk_icons/arrow_rotate_anticlockwise_red.png
  160. BIN resource/img/silk_icons/arrow_rotate_anticlockwise_red_faded.png
  161. BIN resource/img/silk_icons/arrow_rotate_clockwise.png
  162. BIN resource/img/silk_icons/arrow_rotate_clockwise_faded.png
  163. BIN resource/img/silk_icons/arrow_rotate_clockwise_red.png
  164. BIN resource/img/silk_icons/arrow_rotate_clockwise_red_faded.png
  165. BIN resource/img/silk_icons/arrow_switch.png
  166. BIN resource/img/silk_icons/arrow_switch_faded.png
  167. BIN resource/img/silk_icons/arrow_switch_red.png
  168. BIN resource/img/silk_icons/arrow_switch_red_faded.png
  169. BIN resource/img/silk_icons/arrow_turn_left.png
  170. BIN resource/img/silk_icons/arrow_turn_left_faded.png
  171. BIN resource/img/silk_icons/arrow_turn_left_red.png
  172. BIN resource/img/silk_icons/arrow_turn_left_red_faded.png
  173. BIN resource/img/silk_icons/arrow_turn_right.png
  174. BIN resource/img/silk_icons/arrow_turn_right_faded.png
  175. BIN resource/img/silk_icons/arrow_turn_right_red.png
  176. BIN resource/img/silk_icons/arrow_turn_right_red_faded.png
  177. BIN resource/img/silk_icons/arrow_undo.png
  178. BIN resource/img/silk_icons/arrow_undo_faded.png
  179. BIN resource/img/silk_icons/arrow_undo_red.png
  180. BIN resource/img/silk_icons/arrow_undo_red_faded.png
  181. BIN resource/img/silk_icons/arrow_up.png
  182. BIN resource/img/silk_icons/arrow_up_faded.png
  183. BIN resource/img/silk_icons/arrow_up_red.png
  184. BIN resource/img/silk_icons/arrow_up_red_faded.png
  185. BIN resource/img/silk_icons/asterisk_orange.png
  186. BIN resource/img/silk_icons/asterisk_orange_faded.png
  187. BIN resource/img/silk_icons/asterisk_yellow.png
  188. BIN resource/img/silk_icons/asterisk_yellow_faded.png
  189. BIN resource/img/silk_icons/attach.png
  190. BIN resource/img/silk_icons/attach_faded.png
  191. BIN resource/img/silk_icons/award_star_add.png
  192. BIN resource/img/silk_icons/award_star_add_faded.png
  193. BIN resource/img/silk_icons/award_star_bronze_1.png
  194. BIN resource/img/silk_icons/award_star_bronze_1_faded.png
  195. BIN resource/img/silk_icons/award_star_bronze_2.png
  196. BIN resource/img/silk_icons/award_star_bronze_2_faded.png
  197. BIN resource/img/silk_icons/award_star_bronze_3.png
  198. BIN resource/img/silk_icons/award_star_bronze_3_faded.png
  199. BIN resource/img/silk_icons/award_star_delete.png
  200. BIN resource/img/silk_icons/award_star_delete_faded.png
  201. BIN resource/img/silk_icons/award_star_gold_1.png
  202. BIN resource/img/silk_icons/award_star_gold_1_faded.png
  203. BIN resource/img/silk_icons/award_star_gold_2.png
  204. BIN resource/img/silk_icons/award_star_gold_2_faded.png
  205. BIN resource/img/silk_icons/award_star_gold_3.png
  206. BIN resource/img/silk_icons/award_star_gold_3_faded.png
  207. BIN resource/img/silk_icons/award_star_silver_1.png
  208. BIN resource/img/silk_icons/award_star_silver_1_faded.png
  209. BIN resource/img/silk_icons/award_star_silver_2.png
  210. BIN resource/img/silk_icons/award_star_silver_2_faded.png
  211. BIN resource/img/silk_icons/award_star_silver_3.png
  212. BIN resource/img/silk_icons/award_star_silver_3_faded.png
  213. BIN resource/img/silk_icons/basket.png
  214. BIN resource/img/silk_icons/basket_add.png
  215. BIN resource/img/silk_icons/basket_add_faded.png
  216. BIN resource/img/silk_icons/basket_delete.png
  217. BIN resource/img/silk_icons/basket_delete_faded.png
  218. BIN resource/img/silk_icons/basket_edit.png
  219. BIN resource/img/silk_icons/basket_edit_faded.png
  220. BIN resource/img/silk_icons/basket_error.png
  221. BIN resource/img/silk_icons/basket_error_faded.png
  222. BIN resource/img/silk_icons/basket_faded.png
  223. BIN resource/img/silk_icons/basket_go.png
  224. BIN resource/img/silk_icons/basket_go_faded.png
  225. BIN resource/img/silk_icons/basket_put.png
  226. BIN resource/img/silk_icons/basket_put_faded.png
  227. BIN resource/img/silk_icons/basket_remove.png
  228. BIN resource/img/silk_icons/basket_remove_faded.png
  229. BIN resource/img/silk_icons/bell.png
  230. BIN resource/img/silk_icons/bell_add.png
  231. BIN resource/img/silk_icons/bell_add_faded.png
  232. BIN resource/img/silk_icons/bell_delete.png
  233. BIN resource/img/silk_icons/bell_delete_faded.png
  234. BIN resource/img/silk_icons/bell_error.png
  235. BIN resource/img/silk_icons/bell_error_faded.png
  236. BIN resource/img/silk_icons/bell_faded.png
  237. BIN resource/img/silk_icons/bell_go.png
  238. BIN resource/img/silk_icons/bell_go_faded.png
  239. BIN resource/img/silk_icons/bell_link.png
  240. BIN resource/img/silk_icons/bell_link_faded.png
  241. BIN resource/img/silk_icons/bin.png
  242. BIN resource/img/silk_icons/bin_closed.png
  243. BIN resource/img/silk_icons/bin_closed_faded.png
  244. BIN resource/img/silk_icons/bin_empty.png
  245. BIN resource/img/silk_icons/bin_empty_faded.png
  246. BIN resource/img/silk_icons/bin_faded.png
  247. BIN resource/img/silk_icons/blank.png
  248. BIN resource/img/silk_icons/blank_faded.png
  249. BIN resource/img/silk_icons/bomb.png
  250. BIN resource/img/silk_icons/bomb_faded.png
  251. BIN resource/img/silk_icons/book.png
  252. BIN resource/img/silk_icons/book_add.png
  253. BIN resource/img/silk_icons/book_add_faded.png
  254. BIN resource/img/silk_icons/book_addresses.png
  255. BIN resource/img/silk_icons/book_addresses_faded.png
  256. BIN resource/img/silk_icons/book_delete.png
  257. BIN resource/img/silk_icons/book_delete_faded.png
  258. BIN resource/img/silk_icons/book_edit.png
  259. BIN resource/img/silk_icons/book_edit_faded.png
  260. BIN resource/img/silk_icons/book_error.png
  261. BIN resource/img/silk_icons/book_error_faded.png
  262. BIN resource/img/silk_icons/book_faded.png
  263. BIN resource/img/silk_icons/book_go.png
  264. BIN resource/img/silk_icons/book_go_faded.png
  265. BIN resource/img/silk_icons/book_key.png
  266. BIN resource/img/silk_icons/book_key_faded.png
  267. BIN resource/img/silk_icons/book_link.png
  268. BIN resource/img/silk_icons/book_link_faded.png
  269. BIN resource/img/silk_icons/book_next.png
  270. BIN resource/img/silk_icons/book_next_faded.png
  271. BIN resource/img/silk_icons/book_open.png
  272. BIN resource/img/silk_icons/book_open_faded.png
  273. BIN resource/img/silk_icons/book_previous.png
  274. BIN resource/img/silk_icons/book_previous_faded.png
  275. BIN resource/img/silk_icons/box.png
  276. BIN resource/img/silk_icons/box_faded.png
  277. BIN resource/img/silk_icons/brick.png
  278. BIN resource/img/silk_icons/brick_add.png
  279. BIN resource/img/silk_icons/brick_add_faded.png
  280. BIN resource/img/silk_icons/brick_delete.png
  281. BIN resource/img/silk_icons/brick_delete_faded.png
  282. BIN resource/img/silk_icons/brick_edit.png
  283. BIN resource/img/silk_icons/brick_edit_faded.png
  284. BIN resource/img/silk_icons/brick_error.png
  285. BIN resource/img/silk_icons/brick_error_faded.png
  286. BIN resource/img/silk_icons/brick_faded.png
  287. BIN resource/img/silk_icons/brick_go.png
  288. BIN resource/img/silk_icons/brick_go_faded.png
  289. BIN resource/img/silk_icons/brick_link.png
  290. BIN resource/img/silk_icons/brick_link_faded.png
  291. BIN resource/img/silk_icons/bricks.png
  292. BIN resource/img/silk_icons/bricks_faded.png
  293. BIN resource/img/silk_icons/briefcase.png
  294. BIN resource/img/silk_icons/briefcase_faded.png
  295. BIN resource/img/silk_icons/browser_aol.png
  296. BIN resource/img/silk_icons/browser_aol_faded.png
  297. BIN resource/img/silk_icons/browser_camino.png
  298. BIN resource/img/silk_icons/browser_camino_faded.png
  299. BIN resource/img/silk_icons/browser_chrome.png
  300. BIN resource/img/silk_icons/browser_firefox.png
Sorry, we could not display the entire diff because too many files (2,442) changed.
View
8 .htaccess
@@ -1,4 +1,4 @@
-RewriteEngine on
-RewriteRule ^$ /a3m_peanutbutter/index.php [L]
-RewriteCond $1 !^(index\.php|resource|system|user_guide|robots\.txt|favicon\.ico)
-RewriteRule ^(.*)$ /a3m_peanutbutter/index.php/$1 [L]
+RewriteEngine on
+RewriteRule ^$ /a3m/index.php [L]
+RewriteCond $1 !^(index\.php|resource|system|user_guide|robots\.txt|favicon\.ico)
+RewriteRule ^(.*)$ /a3m/index.php/$1 [L]
View
72 README.rst
@@ -0,0 +1,72 @@
+A3M is a CodeIgniter 2.X package that leverages on bleeding edge web technologies like OpenID and OAuth to create user-friendly user experiences for the account authentication & authorization process.
+
+Latest - A3M -PB&J on CI 2.1.2
+=====================================
+
+Download:
+ https://github.com/pengkong/A3M-for-CodeIgniter-2.0
+
+Key Features
+============
+
+1. Native Sign Up, Sign In with 'Remember me' and Sign Out
+2. Native account Forgot Password and Reset Password
+3. Facebook/Twitter/Google/Yahoo/OpenID Sign Up, Sign In and Sign Out
+4. Manage Account Details, Profile Details and Linked Accounts
+5. reCAPTCHA Support, SSL Support, Language Files Support
+
+Design Goals
+============
+
+1. Create a painless user experience for sign up and sign in
+2. Create code that is easily understood and re-purposed
+3. Semantic XHTML views
+4. Graceful degradation of JavaScript and CSS
+5. Adhere to CodeIgniter's PHP Style Guide
+6. Adhere to security best practices
+7. Proper (H)MVC separation (Modular extensions by wiredesignz)
+8. Proper usage of CodeIgniter's libraries, helpers and plugins
+9. Optimal performance by minimizing autoloading
+10. Configurable via config file
+
+Folders
+=======
+
+1. /resource/ - keeps external resources like css / images / javascript
+2. /application/ - what you should be editing in
+3. /system/ - default CodeIgniter system folder
+4. /user_guide/ - latest 2.1.2 guide for CI
+
+Libraries
+=========
+
+1. https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home
+ * /system/application/libraries/Controller.php
+ * /system/application/libraries/Modules.php
+ * /system/application/libraries/MY_Router.php
+2. /system/application/libraries/MY_Session.php - Added functionality to CI_Session
+
+Plugins
+=======
+
+* recaptcha_pi.php - http://code.google.com/p/recaptcha/ recaptcha-php-1.11
+* facebook_pi.php - https://github.com/facebook/php-sdk/
+* twitter_pi.php - https://github.com/jmathai/twitter-async
+* phpass_pi.php - http://www.openwall.com/phpass/ phpass-0.2
+* openid_pi.php - http://sourcecookbook.com/en/recipes/60/janrain-s-php-openid-library-fixed-for-php-5-3-and-how-i-did-it php-openid-php5.3
+
+Installation
+============
+
+1. Download the latest version of A3M (https://github.com/pengkong/A3M-for-CodeIgniter-2.0)
+2. Extract to a folder (default is /a3m/ )
+3. Create a database using the 'a3m_database.sql' script found it root folder of package
+4. Modify /applicaion/config/config.php & database.php to match your setup (folder path + database credentials)
+5. Modify your .htaccess file IF your detfault folder is different from /a3m/ (example: domain.com/a3m/)
+6. Note that twitter doesn't work if your base url is 'localhost' and facebook doesn't work if your base url is '127.0.0.1'. Therefore ensure that your base url is something like 'yoursite.com'. One way to do that is to simply map the hostname your want to 127.0.0.1 on your development machine. http://en.wikipedia.org/wiki/Hosts_%28file%29
+7. Configure your external OpenID providers in /application/modules/account/config/*
+
+
+ Your twitter callback URL should take into account whether or not you have enabled SSL in your a3m config https://a3m.mushmellow.com/a3m_mushmellow/account/connect_twitter (SSL Enabled) http://a3m.mushmellow.com/a3m_mushmellow/account/connect_twitter (SSL Disabled) Configuring this wrongly will result in an 'EpiOAuthUnauthorizedException' exception being thrown.
+
+Note that A3M is a full package meant for building websites from scratch. If you are integrating A3M to you existing CI package you should only copy the "account" module. The required dependencies are the MY_Session and HVMC libraries and the /resource folder for css, images and javascripts.
View
202,565 a3m_mushmellow.sql → a3m_database.sql
101,253 additions, 101,312 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
718 application/config/config.php
@@ -1,360 +1,360 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
-
-/*
-|--------------------------------------------------------------------------
-| Base Site URL
-|--------------------------------------------------------------------------
-|
-| URL to your CodeIgniter root. Typically this will be your base URL,
-| WITH a trailing slash:
-|
-| http://example.com/
-|
-| If this is not set then CodeIgniter will guess the protocol, domain and
-| path to your installation.
-|
-*/
-$config['base_url'] = 'http://localhost/a3m_peanutbutter/';
-
-/*
-|--------------------------------------------------------------------------
-| Index File
-|--------------------------------------------------------------------------
-|
-| Typically this will be your index.php file, unless you've renamed it to
-| something else. If you are using mod_rewrite to remove the page set this
-| variable so that it is blank.
-|
-*/
-$config['index_page'] = '';
-
-/*
-|--------------------------------------------------------------------------
-| URI PROTOCOL
-|--------------------------------------------------------------------------
-|
-| This item determines which server global should be used to retrieve the
-| URI string. The default setting of 'AUTO' works for most servers.
-| If your links do not seem to work, try one of the other delicious flavors:
-|
-| 'AUTO' Default - auto detects
-| 'PATH_INFO' Uses the PATH_INFO
-| 'QUERY_STRING' Uses the QUERY_STRING
-| 'REQUEST_URI' Uses the REQUEST_URI
-| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
-|
-*/
-$config['uri_protocol'] = 'AUTO';
-
-/*
-|--------------------------------------------------------------------------
-| URL suffix
-|--------------------------------------------------------------------------
-|
-| This option allows you to add a suffix to all URLs generated by CodeIgniter.
-| For more information please see the user guide:
-|
-| http://codeigniter.com/user_guide/general/urls.html
-*/
-
-$config['url_suffix'] = '';
-
-/*
-|--------------------------------------------------------------------------
-| Default Language
-|--------------------------------------------------------------------------
-|
-| This determines which set of language files should be used. Make sure
-| there is an available translation if you intend to use something other
-| than english.
-|
-*/
-$config['language'] = 'english';
-
-/*
-|--------------------------------------------------------------------------
-| Default Character Set
-|--------------------------------------------------------------------------
-|
-| This determines which character set is used by default in various methods
-| that require a character set to be provided.
-|
-*/
-$config['charset'] = 'UTF-8';
-
-/*
-|--------------------------------------------------------------------------
-| Enable/Disable System Hooks
-|--------------------------------------------------------------------------
-|
-| If you would like to use the 'hooks' feature you must enable it by
-| setting this variable to TRUE (boolean). See the user guide for details.
-|
-*/
-$config['enable_hooks'] = FALSE;
-
-
-/*
-|--------------------------------------------------------------------------
-| Class Extension Prefix
-|--------------------------------------------------------------------------
-|
-| This item allows you to set the filename/classname prefix when extending
-| native libraries. For more information please see the user guide:
-|
-| http://codeigniter.com/user_guide/general/core_classes.html
-| http://codeigniter.com/user_guide/general/creating_libraries.html
-|
-*/
-$config['subclass_prefix'] = 'MY_';
-
-
-/*
-|--------------------------------------------------------------------------
-| Allowed URL Characters
-|--------------------------------------------------------------------------
-|
-| This lets you specify with a regular expression which characters are permitted
-| within your URLs. When someone tries to submit a URL with disallowed
-| characters they will get a warning message.
-|
-| As a security measure you are STRONGLY encouraged to restrict URLs to
-| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
-|
-| Leave blank to allow all characters -- but only if you are insane.
-|
-| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
-|
-*/
-$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
-
-
-/*
-|--------------------------------------------------------------------------
-| Enable Query Strings
-|--------------------------------------------------------------------------
-|
-| By default CodeIgniter uses search-engine friendly segment based URLs:
-| example.com/who/what/where/
-|
-| By default CodeIgniter enables access to the $_GET array. If for some
-| reason you would like to disable it, set 'allow_get_array' to FALSE.
-|
-| You can optionally enable standard query string based URLs:
-| example.com?who=me&what=something&where=here
-|
-| Options are: TRUE or FALSE (boolean)
-|
-| The other items let you set the query string 'words' that will
-| invoke your controllers and its functions:
-| example.com/index.php?c=controller&m=function
-|
-| Please note that some of the helpers won't work as expected when
-| this feature is enabled, since CodeIgniter is designed primarily to
-| use segment based URLs.
-|
-*/
-$config['allow_get_array'] = TRUE;
-$config['enable_query_strings'] = FALSE;
-$config['controller_trigger'] = 'c';
-$config['function_trigger'] = 'm';
-$config['directory_trigger'] = 'd'; // experimental not currently in use
-
-/*
-|--------------------------------------------------------------------------
-| Error Logging Threshold
-|--------------------------------------------------------------------------
-|
-| If you have enabled error logging, you can set an error threshold to
-| determine what gets logged. Threshold options are:
-| You can enable error logging by setting a threshold over zero. The
-| threshold determines what gets logged. Threshold options are:
-|
-| 0 = Disables logging, Error logging TURNED OFF
-| 1 = Error Messages (including PHP errors)
-| 2 = Debug Messages
-| 3 = Informational Messages
-| 4 = All Messages
-|
-| For a live site you'll usually only enable Errors (1) to be logged otherwise
-| your log files will fill up very fast.
-|
-*/
-$config['log_threshold'] = 1;
-
-/*
-|--------------------------------------------------------------------------
-| Error Logging Directory Path
-|--------------------------------------------------------------------------
-|
-| Leave this BLANK unless you would like to set something other than the default
-| application/logs/ folder. Use a full server path with trailing slash.
-|
-*/
-$config['log_path'] = '';
-
-/*
-|--------------------------------------------------------------------------
-| Date Format for Logs
-|--------------------------------------------------------------------------
-|
-| Each item that is logged has an associated date. You can use PHP date
-| codes to set your own date formatting
-|
-*/
-$config['log_date_format'] = 'Y-m-d H:i:s';
-
-/*
-|--------------------------------------------------------------------------
-| Cache Directory Path
-|--------------------------------------------------------------------------
-|
-| Leave this BLANK unless you would like to set something other than the default
-| system/cache/ folder. Use a full server path with trailing slash.
-|
-*/
-$config['cache_path'] = '';
-
-/*
-|--------------------------------------------------------------------------
-| Encryption Key
-|--------------------------------------------------------------------------
-|
-| If you use the Encryption class or the Session class you
-| MUST set an encryption key. See the user guide for info.
-|
-*/
-$config['encryption_key'] = '7Q1Vasdeo8k6T51rQn9w5DQrcGG06VMF';
-
-/*
-|--------------------------------------------------------------------------
-| Session Variables
-|--------------------------------------------------------------------------
-|
-| 'sess_cookie_name' = the name you want for the cookie
-| 'sess_expiration' = the number of SECONDS you want the session to last.
-| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
-| 'sess_expire_on_close' = Whether to cause the session to expire automatically
-| when the browser window is closed
-| 'sess_encrypt_cookie' = Whether to encrypt the cookie
-| 'sess_use_database' = Whether to save the session data to a database
-| 'sess_table_name' = The name of the session database table
-| 'sess_match_ip' = Whether to match the user's IP address when reading the session data
-| 'sess_match_useragent' = Whether to match the User Agent when reading the session data
-| 'sess_time_to_update' = how many seconds between CI refreshing Session Information
-|
-*/
-$config['sess_cookie_name'] = 'ci_session';
-$config['sess_expiration'] = 7200;
-$config['sess_expire_on_close'] = FALSE;
-$config['sess_encrypt_cookie'] = FALSE;
-$config['sess_use_database'] = TRUE;
-$config['sess_table_name'] = 'ci_session';
-$config['sess_match_ip'] = FALSE;
-$config['sess_match_useragent'] = FALSE;
-$config['sess_time_to_update'] = 300;
-
-/*
-|--------------------------------------------------------------------------
-| Cookie Related Variables
-|--------------------------------------------------------------------------
-|
-| 'cookie_prefix' = Set a prefix if you need to avoid collisions
-| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
-| 'cookie_path' = Typically will be a forward slash
-|
-*/
-$config['cookie_prefix'] = '';
-$config['cookie_domain'] = '';
-$config['cookie_path'] = '/';
-
-/*
-|--------------------------------------------------------------------------
-| Global XSS Filtering
-|--------------------------------------------------------------------------
-|
-| Determines whether the XSS filter is always active when GET, POST or
-| COOKIE data is encountered
-|
-*/
-$config['global_xss_filtering'] = FALSE;
-
-/*
-|--------------------------------------------------------------------------
-| Cross Site Request Forgery
-|--------------------------------------------------------------------------
-| Enables a CSRF cookie token to be set. When set to TRUE, token will be
-| checked on a submitted form. If you are accepting user data, it is strongly
-| recommended CSRF protection be enabled.
-|
-| 'csrf_token_name' = The token name
-| 'csrf_cookie_name' = The cookie name
-| 'csrf_expire' = The number in seconds the token should expire.
-*/
-$config['csrf_protection'] = FALSE;
-$config['csrf_token_name'] = 'csrf_test_name';
-$config['csrf_cookie_name'] = 'csrf_cookie_name';
-$config['csrf_expire'] = 7200;
-
-/*
-|--------------------------------------------------------------------------
-| Output Compression
-|--------------------------------------------------------------------------
-|
-| Enables Gzip output compression for faster page loads. When enabled,
-| the output class will test whether your server supports Gzip.
-| Even if it does, however, not all browsers support compression
-| so enable only if you are reasonably sure your visitors can handle it.
-|
-| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
-| means you are prematurely outputting something to your browser. It could
-| even be a line of whitespace at the end of one of your scripts. For
-| compression to work, nothing can be sent before the output buffer is called
-| by the output class. Do not 'echo' any values with compression enabled.
-|
-*/
-$config['compress_output'] = FALSE;
-
-/*
-|--------------------------------------------------------------------------
-| Master Time Reference
-|--------------------------------------------------------------------------
-|
-| Options are 'local' or 'gmt'. This pref tells the system whether to use
-| your server's local time as the master 'now' reference, or convert it to
-| GMT. See the 'date helper' page of the user guide for information
-| regarding date handling.
-|
-*/
-$config['time_reference'] = 'gmt';
-
-
-/*
-|--------------------------------------------------------------------------
-| Rewrite PHP Short Tags
-|--------------------------------------------------------------------------
-|
-| If your PHP installation does not have short tag support enabled CI
-| can rewrite the tags on-the-fly, enabling you to utilize that syntax
-| in your view files. Options are TRUE or FALSE (boolean)
-|
-*/
-$config['rewrite_short_tags'] = FALSE;
-
-
-/*
-|--------------------------------------------------------------------------
-| Reverse Proxy IPs
-|--------------------------------------------------------------------------
-|
-| If your server is behind a reverse proxy, you must whitelist the proxy IP
-| addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
-| header in order to properly identify the visitor's IP address.
-| Comma-delimited, e.g. '10.0.1.200,10.0.1.201'
-|
-*/
-$config['proxy_ips'] = '';
-
-
-/* End of file config.php */
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+/*
+|--------------------------------------------------------------------------
+| Base Site URL
+|--------------------------------------------------------------------------
+|
+| URL to your CodeIgniter root. Typically this will be your base URL,
+| WITH a trailing slash:
+|
+| http://example.com/
+|
+| If this is not set then CodeIgniter will guess the protocol, domain and
+| path to your installation.
+|
+*/
+$config['base_url'] = '/a3m/';
+
+/*
+|--------------------------------------------------------------------------
+| Index File
+|--------------------------------------------------------------------------
+|
+| Typically this will be your index.php file, unless you've renamed it to
+| something else. If you are using mod_rewrite to remove the page set this
+| variable so that it is blank.
+|
+*/
+$config['index_page'] = '';
+
+/*
+|--------------------------------------------------------------------------
+| URI PROTOCOL
+|--------------------------------------------------------------------------
+|
+| This item determines which server global should be used to retrieve the
+| URI string. The default setting of 'AUTO' works for most servers.
+| If your links do not seem to work, try one of the other delicious flavors:
+|
+| 'AUTO' Default - auto detects
+| 'PATH_INFO' Uses the PATH_INFO
+| 'QUERY_STRING' Uses the QUERY_STRING
+| 'REQUEST_URI' Uses the REQUEST_URI
+| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
+|
+*/
+$config['uri_protocol'] = 'AUTO';
+
+/*
+|--------------------------------------------------------------------------
+| URL suffix
+|--------------------------------------------------------------------------
+|
+| This option allows you to add a suffix to all URLs generated by CodeIgniter.
+| For more information please see the user guide:
+|
+| http://codeigniter.com/user_guide/general/urls.html
+*/
+
+$config['url_suffix'] = '';
+
+/*
+|--------------------------------------------------------------------------
+| Default Language
+|--------------------------------------------------------------------------
+|
+| This determines which set of language files should be used. Make sure
+| there is an available translation if you intend to use something other
+| than english.
+|
+*/
+$config['language'] = 'english';
+
+/*
+|--------------------------------------------------------------------------
+| Default Character Set
+|--------------------------------------------------------------------------
+|
+| This determines which character set is used by default in various methods
+| that require a character set to be provided.
+|
+*/
+$config['charset'] = 'UTF-8';
+
+/*
+|--------------------------------------------------------------------------
+| Enable/Disable System Hooks
+|--------------------------------------------------------------------------
+|
+| If you would like to use the 'hooks' feature you must enable it by
+| setting this variable to TRUE (boolean). See the user guide for details.
+|
+*/
+$config['enable_hooks'] = FALSE;
+
+
+/*
+|--------------------------------------------------------------------------
+| Class Extension Prefix
+|--------------------------------------------------------------------------
+|
+| This item allows you to set the filename/classname prefix when extending
+| native libraries. For more information please see the user guide:
+|
+| http://codeigniter.com/user_guide/general/core_classes.html
+| http://codeigniter.com/user_guide/general/creating_libraries.html
+|
+*/
+$config['subclass_prefix'] = 'MY_';
+
+
+/*
+|--------------------------------------------------------------------------
+| Allowed URL Characters
+|--------------------------------------------------------------------------
+|
+| This lets you specify with a regular expression which characters are permitted
+| within your URLs. When someone tries to submit a URL with disallowed
+| characters they will get a warning message.
+|
+| As a security measure you are STRONGLY encouraged to restrict URLs to
+| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
+|
+| Leave blank to allow all characters -- but only if you are insane.
+|
+| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
+|
+*/
+$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
+
+
+/*
+|--------------------------------------------------------------------------
+| Enable Query Strings
+|--------------------------------------------------------------------------
+|
+| By default CodeIgniter uses search-engine friendly segment based URLs:
+| example.com/who/what/where/
+|
+| By default CodeIgniter enables access to the $_GET array. If for some
+| reason you would like to disable it, set 'allow_get_array' to FALSE.
+|
+| You can optionally enable standard query string based URLs:
+| example.com?who=me&what=something&where=here
+|
+| Options are: TRUE or FALSE (boolean)
+|
+| The other items let you set the query string 'words' that will
+| invoke your controllers and its functions:
+| example.com/index.php?c=controller&m=function
+|
+| Please note that some of the helpers won't work as expected when
+| this feature is enabled, since CodeIgniter is designed primarily to
+| use segment based URLs.
+|
+*/
+$config['allow_get_array'] = TRUE;
+$config['enable_query_strings'] = FALSE;
+$config['controller_trigger'] = 'c';
+$config['function_trigger'] = 'm';
+$config['directory_trigger'] = 'd'; // experimental not currently in use
+
+/*
+|--------------------------------------------------------------------------
+| Error Logging Threshold
+|--------------------------------------------------------------------------
+|
+| If you have enabled error logging, you can set an error threshold to
+| determine what gets logged. Threshold options are:
+| You can enable error logging by setting a threshold over zero. The
+| threshold determines what gets logged. Threshold options are:
+|
+| 0 = Disables logging, Error logging TURNED OFF
+| 1 = Error Messages (including PHP errors)
+| 2 = Debug Messages
+| 3 = Informational Messages
+| 4 = All Messages
+|
+| For a live site you'll usually only enable Errors (1) to be logged otherwise
+| your log files will fill up very fast.
+|
+*/
+$config['log_threshold'] = 1;
+
+/*
+|--------------------------------------------------------------------------
+| Error Logging Directory Path
+|--------------------------------------------------------------------------
+|
+| Leave this BLANK unless you would like to set something other than the default
+| application/logs/ folder. Use a full server path with trailing slash.
+|
+*/
+$config['log_path'] = '';
+
+/*
+|--------------------------------------------------------------------------
+| Date Format for Logs
+|--------------------------------------------------------------------------
+|
+| Each item that is logged has an associated date. You can use PHP date
+| codes to set your own date formatting
+|
+*/
+$config['log_date_format'] = 'Y-m-d H:i:s';
+
+/*
+|--------------------------------------------------------------------------
+| Cache Directory Path
+|--------------------------------------------------------------------------
+|
+| Leave this BLANK unless you would like to set something other than the default
+| system/cache/ folder. Use a full server path with trailing slash.
+|
+*/
+$config['cache_path'] = '';
+
+/*
+|--------------------------------------------------------------------------
+| Encryption Key
+|--------------------------------------------------------------------------
+|
+| If you use the Encryption class or the Session class you
+| MUST set an encryption key. See the user guide for info.
+|
+*/
+$config['encryption_key'] = '7Q1Vasdeo8k6T51rQn9w5DQrcGG06VMF';
+
+/*
+|--------------------------------------------------------------------------
+| Session Variables
+|--------------------------------------------------------------------------
+|
+| 'sess_cookie_name' = the name you want for the cookie
+| 'sess_expiration' = the number of SECONDS you want the session to last.
+| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
+| 'sess_expire_on_close' = Whether to cause the session to expire automatically
+| when the browser window is closed
+| 'sess_encrypt_cookie' = Whether to encrypt the cookie
+| 'sess_use_database' = Whether to save the session data to a database
+| 'sess_table_name' = The name of the session database table
+| 'sess_match_ip' = Whether to match the user's IP address when reading the session data
+| 'sess_match_useragent' = Whether to match the User Agent when reading the session data
+| 'sess_time_to_update' = how many seconds between CI refreshing Session Information
+|
+*/
+$config['sess_cookie_name'] = 'ci_session';
+$config['sess_expiration'] = 7200;
+$config['sess_expire_on_close'] = FALSE;
+$config['sess_encrypt_cookie'] = FALSE;
+$config['sess_use_database'] = TRUE;
+$config['sess_table_name'] = 'ci_session';
+$config['sess_match_ip'] = FALSE;
+$config['sess_match_useragent'] = FALSE;
+$config['sess_time_to_update'] = 300;
+
+/*
+|--------------------------------------------------------------------------
+| Cookie Related Variables
+|--------------------------------------------------------------------------
+|
+| 'cookie_prefix' = Set a prefix if you need to avoid collisions
+| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
+| 'cookie_path' = Typically will be a forward slash
+|
+*/
+$config['cookie_prefix'] = '';
+$config['cookie_domain'] = '';
+$config['cookie_path'] = '/';
+
+/*
+|--------------------------------------------------------------------------
+| Global XSS Filtering
+|--------------------------------------------------------------------------
+|
+| Determines whether the XSS filter is always active when GET, POST or
+| COOKIE data is encountered
+|
+*/
+$config['global_xss_filtering'] = FALSE;
+
+/*
+|--------------------------------------------------------------------------
+| Cross Site Request Forgery
+|--------------------------------------------------------------------------
+| Enables a CSRF cookie token to be set. When set to TRUE, token will be
+| checked on a submitted form. If you are accepting user data, it is strongly
+| recommended CSRF protection be enabled.
+|
+| 'csrf_token_name' = The token name
+| 'csrf_cookie_name' = The cookie name
+| 'csrf_expire' = The number in seconds the token should expire.
+*/
+$config['csrf_protection'] = FALSE;
+$config['csrf_token_name'] = 'csrf_test_name';
+$config['csrf_cookie_name'] = 'csrf_cookie_name';
+$config['csrf_expire'] = 7200;
+
+/*
+|--------------------------------------------------------------------------
+| Output Compression
+|--------------------------------------------------------------------------
+|
+| Enables Gzip output compression for faster page loads. When enabled,
+| the output class will test whether your server supports Gzip.
+| Even if it does, however, not all browsers support compression
+| so enable only if you are reasonably sure your visitors can handle it.
+|
+| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
+| means you are prematurely outputting something to your browser. It could
+| even be a line of whitespace at the end of one of your scripts. For
+| compression to work, nothing can be sent before the output buffer is called
+| by the output class. Do not 'echo' any values with compression enabled.
+|
+*/
+$config['compress_output'] = FALSE;
+
+/*
+|--------------------------------------------------------------------------
+| Master Time Reference
+|--------------------------------------------------------------------------
+|
+| Options are 'local' or 'gmt'. This pref tells the system whether to use
+| your server's local time as the master 'now' reference, or convert it to
+| GMT. See the 'date helper' page of the user guide for information
+| regarding date handling.
+|
+*/
+$config['time_reference'] = 'gmt';
+
+
+/*
+|--------------------------------------------------------------------------
+| Rewrite PHP Short Tags
+|--------------------------------------------------------------------------
+|
+| If your PHP installation does not have short tag support enabled CI
+| can rewrite the tags on-the-fly, enabling you to utilize that syntax
+| in your view files. Options are TRUE or FALSE (boolean)
+|
+*/
+$config['rewrite_short_tags'] = FALSE;
+
+
+/*
+|--------------------------------------------------------------------------
+| Reverse Proxy IPs
+|--------------------------------------------------------------------------
+|
+| If your server is behind a reverse proxy, you must whitelist the proxy IP
+| addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
+| header in order to properly identify the visitor's IP address.
+| Comma-delimited, e.g. '10.0.1.200,10.0.1.201'
+|
+*/
+$config['proxy_ips'] = '';
+
+
+/* End of file config.php */
/* Location: ./application/config/config.php */
View
122 application/config/database.php
@@ -1,62 +1,62 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
-/*
-| -------------------------------------------------------------------
-| DATABASE CONNECTIVITY SETTINGS
-| -------------------------------------------------------------------
-| This file will contain the settings needed to access your database.
-|
-| For complete instructions please consult the 'Database Connection'
-| page of the User Guide.
-|
-| -------------------------------------------------------------------
-| EXPLANATION OF VARIABLES
-| -------------------------------------------------------------------
-|
-| ['hostname'] The hostname of your database server.
-| ['username'] The username used to connect to the database
-| ['password'] The password used to connect to the database
-| ['database'] The name of the database you want to connect to
-| ['dbdriver'] The database type. ie: mysql. Currently supported:
- mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
-| ['dbprefix'] You can add an optional prefix, which will be added
-| to the table name when using the Active Record class
-| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
-| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
-| ['cache_on'] TRUE/FALSE - Enables/disables query caching
-| ['cachedir'] The path to the folder where cache files should be stored
-| ['char_set'] The character set used in communicating with the database
-| ['dbcollat'] The character collation used in communicating with the database
-| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
-| ['autoinit'] Whether or not to automatically initialize the database.
-| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
-| - good for ensuring strict SQL while developing
-|
-| The $active_group variable lets you choose which connection group to
-| make active. By default there is only one group (the 'default' group).
-|
-| The $active_record variables lets you determine whether or not to load
-| the active record class
-*/
-
-$active_group = 'default';
-$active_record = TRUE;
-
-$db['default']['hostname'] = 'localhost';
-$db['default']['username'] = 'root';
-$db['default']['password'] = '';
-$db['default']['database'] = 'a3m_mushmellow';
-$db['default']['dbdriver'] = 'mysql';
-$db['default']['dbprefix'] = '';
-$db['default']['pconnect'] = FALSE;
-$db['default']['db_debug'] = TRUE;
-$db['default']['cache_on'] = FALSE;
-$db['default']['cachedir'] = '';
-$db['default']['char_set'] = 'utf8';
-$db['default']['dbcollat'] = 'utf8_general_ci';
-$db['default']['swap_pre'] = '';
-$db['default']['autoinit'] = TRUE;
-$db['default']['stricton'] = FALSE;
-
-
-/* End of file database.php */
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------
+| DATABASE CONNECTIVITY SETTINGS
+| -------------------------------------------------------------------
+| This file will contain the settings needed to access your database.
+|
+| For complete instructions please consult the 'Database Connection'
+| page of the User Guide.
+|
+| -------------------------------------------------------------------
+| EXPLANATION OF VARIABLES
+| -------------------------------------------------------------------
+|
+| ['hostname'] The hostname of your database server.
+| ['username'] The username used to connect to the database
+| ['password'] The password used to connect to the database
+| ['database'] The name of the database you want to connect to
+| ['dbdriver'] The database type. ie: mysql. Currently supported:
+ mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
+| ['dbprefix'] You can add an optional prefix, which will be added
+| to the table name when using the Active Record class
+| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
+| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
+| ['cache_on'] TRUE/FALSE - Enables/disables query caching
+| ['cachedir'] The path to the folder where cache files should be stored
+| ['char_set'] The character set used in communicating with the database
+| ['dbcollat'] The character collation used in communicating with the database
+| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
+| ['autoinit'] Whether or not to automatically initialize the database.
+| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
+| - good for ensuring strict SQL while developing
+|
+| The $active_group variable lets you choose which connection group to
+| make active. By default there is only one group (the 'default' group).
+|
+| The $active_record variables lets you determine whether or not to load
+| the active record class
+*/
+
+$active_group = 'default';
+$active_record = TRUE;
+
+$db['default']['hostname'] = 'localhost';
+$db['default']['username'] = 'root';
+$db['default']['password'] = '';
+$db['default']['database'] = 'a3m';
+$db['default']['dbdriver'] = 'mysql';
+$db['default']['dbprefix'] = '';
+$db['default']['pconnect'] = FALSE;
+$db['default']['db_debug'] = TRUE;
+$db['default']['cache_on'] = FALSE;
+$db['default']['cachedir'] = '';
+$db['default']['char_set'] = 'utf8';
+$db['default']['dbcollat'] = 'utf8_general_ci';
+$db['default']['swap_pre'] = '';
+$db['default']['autoinit'] = TRUE;
+$db['default']['stricton'] = FALSE;
+
+
+/* End of file database.php */
/* Location: ./application/config/database.php */
View
423 application/config/user_agents.php
@@ -1,178 +1,247 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
-/*
-| -------------------------------------------------------------------
-| USER AGENT TYPES
-| -------------------------------------------------------------------
-| This file contains four arrays of user agent data. It is used by the
-| User Agent Class to help identify browser, platform, robot, and
-| mobile device data. The array keys are used to identify the device
-| and the array values are used to set the actual name of the item.
-|
-*/
-
-$platforms = array (
- 'windows nt 6.0' => 'Windows Longhorn',
- 'windows nt 5.2' => 'Windows 2003',
- 'windows nt 5.0' => 'Windows 2000',
- 'windows nt 5.1' => 'Windows XP',
- 'windows nt 4.0' => 'Windows NT 4.0',
- 'winnt4.0' => 'Windows NT 4.0',
- 'winnt 4.0' => 'Windows NT',
- 'winnt' => 'Windows NT',
- 'windows 98' => 'Windows 98',
- 'win98' => 'Windows 98',
- 'windows 95' => 'Windows 95',
- 'win95' => 'Windows 95',
- 'windows' => 'Unknown Windows OS',
- 'os x' => 'Mac OS X',
- 'ppc mac' => 'Power PC Mac',
- 'freebsd' => 'FreeBSD',
- 'ppc' => 'Macintosh',
- 'linux' => 'Linux',
- 'debian' => 'Debian',
- 'sunos' => 'Sun Solaris',
- 'beos' => 'BeOS',
- 'apachebench' => 'ApacheBench',
- 'aix' => 'AIX',
- 'irix' => 'Irix',
- 'osf' => 'DEC OSF',
- 'hp-ux' => 'HP-UX',
- 'netbsd' => 'NetBSD',
- 'bsdi' => 'BSDi',
- 'openbsd' => 'OpenBSD',
- 'gnu' => 'GNU/Linux',
- 'unix' => 'Unknown Unix OS'
- );
-
-
-// The order of this array should NOT be changed. Many browsers return
-// multiple browser types so we want to identify the sub-type first.
-$browsers = array(
- 'Flock' => 'Flock',
- 'Chrome' => 'Chrome',
- 'Opera' => 'Opera',
- 'MSIE' => 'Internet Explorer',
- 'Internet Explorer' => 'Internet Explorer',
- 'Shiira' => 'Shiira',
- 'Firefox' => 'Firefox',
- 'Chimera' => 'Chimera',
- 'Phoenix' => 'Phoenix',
- 'Firebird' => 'Firebird',
- 'Camino' => 'Camino',
- 'Netscape' => 'Netscape',
- 'OmniWeb' => 'OmniWeb',
- 'Safari' => 'Safari',
- 'Mozilla' => 'Mozilla',
- 'Konqueror' => 'Konqueror',
- 'icab' => 'iCab',
- 'Lynx' => 'Lynx',
- 'Links' => 'Links',
- 'hotjava' => 'HotJava',
- 'amaya' => 'Amaya',
- 'IBrowse' => 'IBrowse'
- );
-
-$mobiles = array(
- // legacy array, old values commented out
- 'mobileexplorer' => 'Mobile Explorer',
-// 'openwave' => 'Open Wave',
-// 'opera mini' => 'Opera Mini',
-// 'operamini' => 'Opera Mini',
-// 'elaine' => 'Palm',
- 'palmsource' => 'Palm',
-// 'digital paths' => 'Palm',
-// 'avantgo' => 'Avantgo',
-// 'xiino' => 'Xiino',
- 'palmscape' => 'Palmscape',
-// 'nokia' => 'Nokia',
-// 'ericsson' => 'Ericsson',
-// 'blackberry' => 'BlackBerry',
-// 'motorola' => 'Motorola'
-
- // Phones and Manufacturers
- 'motorola' => "Motorola",
- 'nokia' => "Nokia",
- 'palm' => "Palm",
- 'iphone' => "Apple iPhone",
- 'ipad' => "iPad",
- 'ipod' => "Apple iPod Touch",
- 'sony' => "Sony Ericsson",
- 'ericsson' => "Sony Ericsson",
- 'blackberry' => "BlackBerry",
- 'cocoon' => "O2 Cocoon",
- 'blazer' => "Treo",
- 'lg' => "LG",
- 'amoi' => "Amoi",
- 'xda' => "XDA",
- 'mda' => "MDA",
- 'vario' => "Vario",
- 'htc' => "HTC",
- 'samsung' => "Samsung",
- 'sharp' => "Sharp",
- 'sie-' => "Siemens",
- 'alcatel' => "Alcatel",
- 'benq' => "BenQ",
- 'ipaq' => "HP iPaq",
- 'mot-' => "Motorola",
- 'playstation portable' => "PlayStation Portable",
- 'hiptop' => "Danger Hiptop",
- 'nec-' => "NEC",
- 'panasonic' => "Panasonic",
- 'philips' => "Philips",
- 'sagem' => "Sagem",
- 'sanyo' => "Sanyo",
- 'spv' => "SPV",
- 'zte' => "ZTE",
- 'sendo' => "Sendo",
-
- // Operating Systems
- 'symbian' => "Symbian",
- 'SymbianOS' => "SymbianOS",
- 'elaine' => "Palm",
- 'palm' => "Palm",
- 'series60' => "Symbian S60",
- 'windows ce' => "Windows CE",
-
- // Browsers
- 'obigo' => "Obigo",
- 'netfront' => "Netfront Browser",
- 'openwave' => "Openwave Browser",
- 'mobilexplorer' => "Mobile Explorer",
- 'operamini' => "Opera Mini",
- 'opera mini' => "Opera Mini",
-
- // Other
- 'digital paths' => "Digital Paths",
- 'avantgo' => "AvantGo",
- 'xiino' => "Xiino",
- 'novarra' => "Novarra Transcoder",
- 'vodafone' => "Vodafone",
- 'docomo' => "NTT DoCoMo",
- 'o2' => "O2",
-
- // Fallback
- 'mobile' => "Generic Mobile",
- 'wireless' => "Generic Mobile",
- 'j2me' => "Generic Mobile",
- 'midp' => "Generic Mobile",
- 'cldc' => "Generic Mobile",
- 'up.link' => "Generic Mobile",
- 'up.browser' => "Generic Mobile",
- 'smartphone' => "Generic Mobile",
- 'cellphone' => "Generic Mobile"
- );
-
-// There are hundreds of bots but these are the most common.
-$robots = array(
- 'googlebot' => 'Googlebot',
- 'msnbot' => 'MSNBot',
- 'slurp' => 'Inktomi Slurp',
- 'yahoo' => 'Yahoo',
- 'askjeeves' => 'AskJeeves',
- 'fastcrawler' => 'FastCrawler',
- 'infoseek' => 'InfoSeek Robot 1.0',
- 'lycos' => 'Lycos'
- );
-
-/* End of file user_agents.php */
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * CodeIgniter
+ *
+ * An open source application development framework for PHP 5.2.4 or newer
+ *
+ * NOTICE OF LICENSE
+ *
+ * Licensed under the Academic Free License version 3.0
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0) that is
+ * bundled with this package in the files license_afl.txt / license_afl.rst.
+ * It is also available through the world wide web at this URL:
+ * http://opensource.org/licenses/AFL-3.0
+ * If you did not receive a copy of the license and are unable to obtain it
+ * through the world wide web, please send an email to
+ * licensing@ellislab.com so we can send you a copy immediately.
+ *
+ * @package CodeIgniter
+ * @author EllisLab Dev Team
+ * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/)
+ * @license http://opensource.org/licenses/AFL-3.0 Academic Free License (AFL 3.0)
+ * @link http://codeigniter.com
+ * @since Version 1.0
+ * @filesource
+ */
+
+/*
+| -------------------------------------------------------------------
+| USER AGENT TYPES
+| -------------------------------------------------------------------
+| This file contains four arrays of user agent data. It is used by the
+| User Agent Class to help identify browser, platform, robot, and
+| mobile device data. The array keys are used to identify the device
+| and the array values are used to set the actual name of the item.
+*/
+
+$platforms = array(
+ 'windows nt 6.1' => 'Windows 7',
+ 'windows nt 6.0' => 'Windows Vista',
+ 'windows nt 5.2' => 'Windows 2003',
+ 'windows nt 5.1' => 'Windows XP',
+ 'windows nt 5.0' => 'Windows 2000',
+ 'windows nt 4.0' => 'Windows NT 4.0',
+ 'winnt4.0' => 'Windows NT 4.0',
+ 'winnt 4.0' => 'Windows NT',
+ 'winnt' => 'Windows NT',
+ 'windows 98' => 'Windows 98',
+ 'win98' => 'Windows 98',
+ 'windows 95' => 'Windows 95',
+ 'win95' => 'Windows 95',
+ 'windows' => 'Unknown Windows OS',
+ 'android' => 'Android',
+ 'blackberry' => 'BlackBerry',
+ 'iphone' => 'iOS',
+ 'ipad' => 'iOS',
+ 'ipod' => 'iOS',
+ 'os x' => 'Mac OS X',
+ 'ppc mac' => 'Power PC Mac',
+ 'freebsd' => 'FreeBSD',
+ 'ppc' => 'Macintosh',
+ 'linux' => 'Linux',
+ 'debian' => 'Debian',
+ 'sunos' => 'Sun Solaris',
+ 'beos' => 'BeOS',
+ 'apachebench' => 'ApacheBench',
+ 'aix' => 'AIX',
+ 'irix' => 'Irix',
+ 'osf' => 'DEC OSF',
+ 'hp-ux' => 'HP-UX',
+ 'netbsd' => 'NetBSD',
+ 'bsdi' => 'BSDi',
+ 'openbsd' => 'OpenBSD',
+ 'gnu' => 'GNU/Linux',
+ 'unix' => 'Unknown Unix OS'
+);
+
+
+// The order of this array should NOT be changed. Many browsers return
+// multiple browser types so we want to identify the sub-type first.
+$browsers = array(
+ 'Flock' => 'Flock',
+ 'Chrome' => 'Chrome',
+ 'Opera' => 'Opera',
+ 'MSIE' => 'Internet Explorer',
+ 'Internet Explorer' => 'Internet Explorer',
+ 'Shiira' => 'Shiira',
+ 'Firefox' => 'Firefox',
+ 'Chimera' => 'Chimera',
+ 'Phoenix' => 'Phoenix',
+ 'Firebird' => 'Firebird',
+ 'Camino' => 'Camino',
+ 'Netscape' => 'Netscape',
+ 'OmniWeb' => 'OmniWeb',
+ 'Safari' => 'Safari',
+ 'Mozilla' => 'Mozilla',
+ 'Konqueror' => 'Konqueror',
+ 'icab' => 'iCab',
+ 'Lynx' => 'Lynx',
+ 'Links' => 'Links',
+ 'hotjava' => 'HotJava',
+ 'amaya' => 'Amaya',
+ 'IBrowse' => 'IBrowse'
+);
+
+$mobiles = array(
+ // legacy array, old values commented out
+ 'mobileexplorer' => 'Mobile Explorer',
+// 'openwave' => 'Open Wave',
+// 'opera mini' => 'Opera Mini',
+// 'operamini' => 'Opera Mini',
+// 'elaine' => 'Palm',
+ 'palmsource' => 'Palm',
+// 'digital paths' => 'Palm',
+// 'avantgo' => 'Avantgo',
+// 'xiino' => 'Xiino',
+ 'palmscape' => 'Palmscape',
+// 'nokia' => 'Nokia',
+// 'ericsson' => 'Ericsson',
+// 'blackberry' => 'BlackBerry',
+// 'motorola' => 'Motorola'
+
+ // Phones and Manufacturers
+ 'motorola' => 'Motorola',
+ 'nokia' => 'Nokia',
+ 'palm' => 'Palm',
+ 'iphone' => 'Apple iPhone',
+ 'ipad' => 'iPad',
+ 'ipod' => 'Apple iPod Touch',
+ 'sony' => 'Sony Ericsson',
+ 'ericsson' => 'Sony Ericsson',
+ 'blackberry' => 'BlackBerry',
+ 'cocoon' => 'O2 Cocoon',
+ 'blazer' => 'Treo',
+ 'lg' => 'LG',
+ 'amoi' => 'Amoi',
+ 'xda' => 'XDA',
+ 'mda' => 'MDA',
+ 'vario' => 'Vario',
+ 'htc' => 'HTC',
+ 'samsung' => 'Samsung',
+ 'sharp' => 'Sharp',
+ 'sie-' => 'Siemens',
+ 'alcatel' => 'Alcatel',
+ 'benq' => 'BenQ',
+ 'ipaq' => 'HP iPaq',
+ 'mot-' => 'Motorola',
+ 'playstation portable' => 'PlayStation Portable',
+ 'hiptop' => 'Danger Hiptop',
+ 'nec-' => 'NEC',
+ 'panasonic' => 'Panasonic',
+ 'philips' => 'Philips',
+ 'sagem' => 'Sagem',
+ 'sanyo' => 'Sanyo',
+ 'spv' => 'SPV',
+ 'zte' => 'ZTE',
+ 'sendo' => 'Sendo',
+ 'dsi' => 'Nintendo DSi',
+ 'ds' => 'Nintendo DS',
+ 'wii' => 'Nintendo Wii',
+ '3ds' => 'Nintendo 3DS',
+ 'open web' => 'Open Web',
+ 'openweb' => 'OpenWeb',
+
+ // Operating Systems
+ 'android' => 'Android',
+ 'symbian' => 'Symbian',
+ 'SymbianOS' => 'SymbianOS',
+ 'elaine' => 'Palm',
+ 'series60' => 'Symbian S60',
+ 'windows ce' => 'Windows CE',
+
+ // Browsers
+ 'obigo' => 'Obigo',
+ 'netfront' => 'Netfront Browser',
+ 'openwave' => 'Openwave Browser',
+ 'mobilexplorer' => 'Mobile Explorer',
+ 'operamini' => 'Opera Mini',
+ 'opera mini' => 'Opera Mini',
+ 'opera mobi' => 'Opera Mobile',
+ 'fennec' => 'Firefox Mobile',
+
+ // Other
+ 'digital paths' => 'Digital Paths',
+ 'avantgo' => 'AvantGo',
+ 'xiino' => 'Xiino',
+ 'novarra' => 'Novarra Transcoder',
+ 'vodafone' => 'Vodafone',
+ 'docomo' => 'NTT DoCoMo',
+ 'o2' => 'O2',
+
+ // Fallback
+ 'mobile' => 'Generic Mobile',
+ 'wireless' => 'Generic Mobile',
+ 'j2me' => 'Generic Mobile',
+ 'midp' => 'Generic Mobile',
+ 'cldc' => 'Generic Mobile',
+ 'up.link' => 'Generic Mobile',
+ 'up.browser' => 'Generic Mobile',
+ 'smartphone' => 'Generic Mobile',
+ 'cellphone' => 'Generic Mobile'
+);
+
+// There are hundreds of bots but these are the most common.
+$robots = array(
+ 'googlebot' => 'Googlebot',
+ 'msnbot' => 'MSNBot',
+ 'bingbot' => 'Bing',
+ 'slurp' => 'Inktomi Slurp',
+ 'yahoo' => 'Yahoo',
+ 'askjeeves' => 'AskJeeves',
+ 'fastcrawler' => 'FastCrawler',
+ 'infoseek' => 'InfoSeek Robot 1.0',
+ 'lycos' => 'Lycos',
+
+ // Custom added
+ 'Twitterbot' => 'Twitterbot',
+ 'LinkedInBot' => 'LinkedInBot',
+ 'MJ12bot' => 'Majestic Bot',
+ 'TweetmemeBot' => 'TweetmemeBot',
+ 'YandexBot' => 'YandexBot',
+ 'ShowyouBot' => 'ShowyouBot',
+ 'DCPbot' => 'DCPbot',
+ 'SeznamBot' => 'SeznamBot',
+ 'SemrushBot' => 'SemrushBot',
+ 'NextGenSearchBot' => 'NextGenSearchBot',
+ 'MLBot' => 'MLBot',
+ 'EventGuruBot' => 'EventGuruBot',
+ 'aiHitBot' => 'aiHitBot',
+ 'SWEBot' => 'SWEBot',
+ 'bitlybot' => 'bitlybot',
+ 'PaperLiBot' => 'PaperLiBot',
+ 'TweetedTimes' => 'TweetedTimes',
+ 'Exabot' => 'Exabot',
+ 'RADaR-Bot' => 'RADaR-Bot',
+ 'AhrefsBot' => 'AhrefsBot',
+ 'AcoonBot' => 'AcoonBot',
+ 'percbotspider' => 'percbotspider',
+ 'unwindfetchor' => 'UnwindFetchor',
+ 'butterfly' => 'ButterFly',
+ 'Baiduspider' => 'Baiduspider',
+ 'facebookexternalhit' => 'facebookexternalhit'
+
+);
+
+/* End of file user_agents.php */
/* Location: ./application/config/user_agents.php */
View
42 application/language/english/general_lang.php
@@ -1,22 +1,22 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
-
-/*
-|--------------------------------------------------------------------------
-| General
-|--------------------------------------------------------------------------
-*/
-$lang['website_title'] = 'A3M Peanutbutter';
-$lang['website_welcome_username'] = 'Welcome, %s.';
-$lang['website_account'] = 'Account';
-$lang['website_profile'] = 'Profile';
-$lang['website_linked'] = 'Linked Accounts';
-$lang['website_password'] = 'Password';
-$lang['website_sign_out'] = 'Sign out';
-$lang['website_sign_in'] = 'Sign in';
-$lang['website_sign_up'] = 'Sign up';
-$lang['website_connect_with_facebook'] = 'Connect with Facebook';
-$lang['website_page_rendered_in_x_seconds'] = 'Page rendered in %s seconds';
-
-
-/* End of file general_lang.php */
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+/*
+|--------------------------------------------------------------------------
+| General
+|--------------------------------------------------------------------------
+*/
+$lang['website_title'] = 'A3M - PB&amp;J';
+$lang['website_welcome_username'] = 'Welcome, %s.';
+$lang['website_account'] = 'Account';
+$lang['website_profile'] = 'Profile';
+$lang['website_linked'] = 'Linked Accounts';
+$lang['website_password'] = 'Password';
+$lang['website_sign_out'] = 'Sign out';
+$lang['website_sign_in'] = 'Sign in';
+$lang['website_sign_up'] = 'Sign up';
+$lang['website_connect_with_facebook'] = 'Connect with Facebook';
+$lang['website_page_rendered_in_x_seconds'] = 'Page rendered in %s seconds';
+
+
+/* End of file general_lang.php */
/* Location: ./application/language/english/general_lang.php */
View
285 application/modules/account/controllers/account_profile.php
@@ -1,143 +1,144 @@
-<?php
-/*
- * Account_profile Controller
- */
-class Account_profile extends CI_Controller {
-
- /**
- * Constructor
- */
- function __construct()
- {
- parent::__construct();
-
- // Load the necessary stuff...
- $this->load->config('account/account');
- $this->load->helper(array('language', 'account/ssl', 'url'));
- $this->load->library(array('account/authentication', 'form_validation'));
- $this->load->model(array('account/account_model', 'account/account_details_model'));
- $this->load->language(array('general', 'account/account_profile'));
- }
-
- /**
- * Account profile
- */
- function index($action = NULL)
- {
- // Enable SSL?
- maintain_ssl($this->config->item("ssl_enabled"));
-
- // Redirect unauthenticated users to signin page
- if ( ! $this->authentication->is_signed_in())
- {
- redirect('account/sign_in/?continue='.urlencode(base_url().'account/account_profile'));
- }
-
- // Retrieve sign in user
- $data['account'] = $this->account_model->get_by_id($this->session->userdata('account_id'));
- $data['account_details'] = $this->account_details_model->get_by_account_id($this->session->userdata('account_id'));
-
- // Delete profile picture
- if ($action == 'delete')
- {
- $this->account_details_model->update($data['account']->id, array('picture' => NULL));
- redirect('account/account_profile');
- }
-
- // Setup form validation
- $this->form_validation->set_error_delimiters('<div class="field_error">', '</div>');
- $this->form_validation->set_rules(array(
- array('field'=>'profile_username', 'label'=>'lang:profile_username', 'rules'=>'trim|required|alpha_dash|min_length[2]|max_length[24]')
- ));
-
- // Run form validation
- if ($this->form_validation->run())
- {
- // If user is changing username and new username is already taken
- if (strtolower($this->input->post('profile_username')) != strtolower($data['account']->username) && $this->username_check($this->input->post('profile_username')) === TRUE)
- {
- $data['profile_username_error'] = lang('profile_username_taken');
- $error = TRUE;
- }
- else
- {
- $data['account']->username = $this->input->post('profile_username');
- $this->account_model->update_username($data['account']->id, $this->input->post('profile_username'));
- }
-
- // If user has uploaded a file
- if ($_FILES['account_picture_upload']['error'] != 4)
- {
- // Load file uploading library - http://codeigniter.com/user_guide/libraries/file_uploading.html
- $this->load->library('upload', array(
- 'file_name' => md5($data['account']->id).'.jpg',
- 'overwrite' => true,
- 'upload_path' => FCPATH.'resource/user/profile',
- 'allowed_types' => 'jpg|png|gif',
- 'max_size' => '800' // kilobytes
- ));
-
- /// Try to upload the file
- if ( ! $this->upload->do_upload('account_picture_upload'))
- {
- $data['profile_picture_error'] = $this->upload->display_errors('', '');
- $error = TRUE;
- }
- else
- {
- // Get uploaded picture data
- $picture = $this->upload->data();
-
- // Create picture thumbnail - http://codeigniter.com/user_guide/libraries/image_lib.html
- $this->load->library('image_lib');
- $this->image_lib->clear();
- $this->image_lib->initialize(array(
- 'image_library' => 'gd2',
- 'source_image' => FCPATH.'resource/user/profile/'.$picture['file_name'],
- 'new_image' => FCPATH.'resource/user/profile/pic_'.$picture['raw_name'].'.jpg',
- 'maintain_ratio' => FALSE,
- 'quality' => '100%',
- 'width' => 100,
- 'height' => 100
- ));
-
- // Try resizing the picture
- if ( ! $this->image_lib->resize())
- {
- $data['profile_picture_error'] = $this->image_lib->display_errors();
- $error = TRUE;
- }
- else
- {
- $data['account_details']->picture = 'pic_'.$picture['raw_name'].'.jpg';
- $this->account_details_model->update($data['account']->id, array('picture' => $data['account_details']->picture));
- }
-
- // Delete original uploaded file
- unlink(FCPATH.'resource/user/profile/'.$picture['file_name']);
- }
- }
-
- if ( ! isset($error)) $data['profile_info'] = lang('profile_updated');
- }
-
- $this->load->view('account/account_profile', $data);
- }
-
- /**
- * Check if a username exist
- *
- * @access public
- * @param string
- * @return bool
- */
- function username_check($username)
- {
- return $this->account_model->get_by_username($username) ? TRUE : FALSE;
- }
-
-}
-
-
-/* End of file account_profile.php */
+<?php
+/*
+ * Account_profile Controller
+ */
+class Account_profile extends CI_Controller {
+
+ /**
+ * Constructor
+ */
+ function __construct()
+ {
+ parent::__construct();
+
+ // Load the necessary stuff...
+ $this->load->config('account/account');
+ $this->load->helper(array('language', 'account/ssl', 'url'));
+ $this->load->library(array('account/authentication', 'form_validation'));
+ $this->load->model(array('account/account_model', 'account/account_details_model'));
+ $this->load->language(array('general', 'account/account_profile'));
+ }
+
+ /**
+ * Account profile
+ */
+ function index($action = NULL)