Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 4 commits
  • 1,075 files changed
  • 0 commit comments
  • 1 contributor
Commits on Feb 22, 2013
futura-creative iklan saya, edit profil ok, less ubah password 430d43c
Commits on Feb 23, 2013
futura-creative edit password OK 36bd053
Commits on Feb 26, 2013
futura-creative edit password OK 1adef59
futura-creative finish forget-password f76176a
Showing with 4,151 additions and 676 deletions.
  1. 0  .htaccess
  2. 0  README.md
  3. 0  app/.htaccess
  4. 0  app/Config/Schema/db_acl.php
  5. 0  app/Config/Schema/db_acl.sql
  6. 0  app/Config/Schema/i18n.php
  7. 0  app/Config/Schema/i18n.sql
  8. 0  app/Config/Schema/sessions.php
  9. 0  app/Config/Schema/sessions.sql
  10. 0  app/Config/acl.ini.php
  11. 0  app/Config/acl.php
  12. 0  app/Config/bootstrap.php
  13. +1 −1  app/Config/core.php
  14. 0  app/Config/database.php
  15. 0  app/Config/database.php.default
  16. +5 −5 app/Config/email.php
  17. 0  app/Config/email.php.default
  18. +4 −0 app/Config/routes.php
  19. 0  app/Console/Command/AppShell.php
  20. 0  app/Console/Command/Task/empty
  21. 0  app/Console/Templates/empty
  22. 0  app/Console/cake
  23. 0  app/Console/cake.bat
  24. 0  app/Console/cake.php
  25. +12 −0 app/Controller/AdsController.php
  26. 0  app/Controller/AppController.php
  27. 0  app/Controller/CitiesController.php
  28. 0  app/Controller/Component/empty
  29. 0  app/Controller/PagesController.php
  30. 0  app/Controller/StatesController.php
  31. +122 −3 app/Controller/UsersController.php
  32. 0  app/Lib/empty
  33. 0  app/Locale/eng/LC_MESSAGES/empty
  34. 0  app/Model/Ad.php
  35. 0  app/Model/AppModel.php
  36. 0  app/Model/Behavior/empty
  37. 0  app/Model/Category.php
  38. 0  app/Model/City.php
  39. 0  app/Model/Datasource/empty
  40. 0  app/Model/State.php
  41. +12 −7 app/Model/User.php
  42. 0  app/Plugin/empty
  43. 0  app/Test/Case/Controller/Component/empty
  44. 0  app/Test/Case/Model/Behavior/empty
  45. 0  app/Test/Case/View/Helper/empty
  46. 0  app/Test/Fixture/empty
  47. +191 −0 app/User.php
  48. 0  app/Vendor/empty
  49. +1 −1  app/View/Ads/edit.ctp
  50. +1 −0  app/View/Ads/index.ctp
  51. +15 −0 app/View/Ads/reload_ads.ctp
  52. +15 −0 app/View/Elements/1.ctp
  53. 0  app/View/Elements/empty
  54. 0  app/View/Emails/html/default.ctp
  55. 0  app/View/Emails/text/default.ctp
  56. 0  app/View/Errors/error400.ctp
  57. 0  app/View/Errors/error500.ctp
  58. 0  app/View/Helper/AppHelper.php
  59. 0  app/View/Layouts/Emails/html/default.ctp
  60. 0  app/View/Layouts/Emails/text/default.ctp
  61. 0  app/View/Layouts/ajax.ctp
  62. +2 −6 app/View/Layouts/default.ctp
  63. 0  app/View/Layouts/error.ctp
  64. 0  app/View/Layouts/flash.ctp
  65. 0  app/View/Layouts/js/default.ctp
  66. +152 −0 app/View/Layouts/profil.ctp
  67. 0  app/View/Layouts/rss/default.ctp
  68. +91 −0 app/View/Layouts/test.php
  69. 0  app/View/Layouts/xml/default.ctp
  70. 0  app/View/Pages/home.ctp
  71. 0  app/View/Scaffolds/empty
  72. +132 −0 app/View/Users/edit.ctp
  73. +50 −0 app/View/Users/forget_password.ctp
  74. +128 −0 app/View/Users/iklan.ctp
  75. 0  app/View/Users/login.ctp
  76. +56 −0 app/View/Users/password.ctp
  77. +1 −1  app/View/Users/register.ctp
  78. 0  app/index.php
  79. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_ads
  80. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_categories
  81. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_cities
  82. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_list
  83. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_states
  84. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_users
  85. +2 −0  app/tmp/cache/models/myapp_cake_model_default_b12_12364491_addins_ads
  86. +2 −0  app/tmp/cache/models/myapp_cake_model_default_b12_12364491_addins_categories
  87. +2 −0  app/tmp/cache/models/myapp_cake_model_default_b12_12364491_addins_cities
  88. +2 −0  app/tmp/cache/models/myapp_cake_model_default_b12_12364491_addins_list
  89. +2 −0  app/tmp/cache/models/myapp_cake_model_default_b12_12364491_addins_states
  90. +2 −0  app/tmp/cache/models/myapp_cake_model_default_b12_12364491_addins_users
  91. +2 −0  app/tmp/cache/models/myapp_cake_model_default_iaddscom_addins_ads
  92. +2 −0  app/tmp/cache/models/myapp_cake_model_default_iaddscom_addins_categories
  93. +2 −0  app/tmp/cache/models/myapp_cake_model_default_iaddscom_addins_cities
  94. +2 −0  app/tmp/cache/models/myapp_cake_model_default_iaddscom_addins_list
  95. +2 −0  app/tmp/cache/models/myapp_cake_model_default_iaddscom_addins_states
  96. +2 −0  app/tmp/cache/models/myapp_cake_model_default_iaddscom_addins_users
  97. +2 −0  app/tmp/cache/persistent/myapp_cake_core_cake_
  98. +1 −1  app/tmp/cache/persistent/myapp_cake_core_cake_dev_en-us
  99. +1 −1  app/tmp/cache/persistent/myapp_cake_core_cake_en-us
  100. +1 −1  app/tmp/cache/persistent/myapp_cake_core_default_en-us
  101. +2 −2 app/tmp/cache/persistent/myapp_cake_core_file_map
  102. +2 −2 app/tmp/cache/persistent/myapp_cake_core_method_cache
  103. +468 −0 app/tmp/logs/error.log
  104. 0  app/webroot/.htaccess
  105. +1,151 −0 app/webroot/addins.main.layout.style.css
  106. +133 −11 app/webroot/css/addins.main.layout.style.css
  107. +739 −0 app/webroot/css/cake.generic.css
  108. BIN  app/webroot/css/files/11.jpg
  109. BIN  app/webroot/css/files/2.jpg
  110. BIN  app/webroot/css/files/43.jpg
  111. BIN  app/webroot/css/files/44.jpg
  112. BIN  app/webroot/css/files/47.jpg
  113. BIN  app/webroot/css/files/61.jpg
  114. BIN  app/webroot/css/files/default.jpg
  115. 0  app/webroot/css/files/empty
  116. +112 −112 app/webroot/css/jquery.selectbox.css
  117. BIN  app/webroot/files/45.jpg
  118. BIN  app/webroot/files/46.jpg
  119. BIN  app/webroot/files/61.jpg
  120. 0  app/webroot/files/default.jpg
  121. 0  app/webroot/files/empty
  122. 0  app/webroot/img/addins.png
  123. 0  app/webroot/img/fb-icon.png
  124. 0  app/webroot/img/plus.jpg
  125. 0  app/webroot/img/select-icons.png
  126. 0  app/webroot/img/small-loading.gif
  127. 0  app/webroot/img/tw-icon.png
  128. 0  app/webroot/index.php
  129. 0  app/webroot/js/jquery-1.7.2.min.js
  130. +4 −2 app/webroot/js/jquery.ads-add.js
  131. 0  app/webroot/js/jquery.infinitescroll.min.js
  132. 0  app/webroot/js/jquery.login.js
  133. 0  app/webroot/js/jquery.masonry.min.js
  134. +512 −512 app/webroot/js/jquery.selectbox-0.2.js
  135. 0  app/webroot/js/jquery.user.menu.js
  136. +2 −2 app/webroot/js/jquery.validate.form.js
  137. 0  app/webroot/test.php
  138. 0  build.properties
  139. 0  build.xml
  140. 0  index.php
  141. 0  lib/Cake/Cache/Cache.php
  142. 0  lib/Cake/Cache/CacheEngine.php
  143. 0  lib/Cake/Cache/Engine/ApcEngine.php
  144. 0  lib/Cake/Cache/Engine/FileEngine.php
  145. 0  lib/Cake/Cache/Engine/MemcacheEngine.php
  146. 0  lib/Cake/Cache/Engine/RedisEngine.php
  147. 0  lib/Cake/Cache/Engine/WincacheEngine.php
  148. 0  lib/Cake/Cache/Engine/XcacheEngine.php
  149. 0  lib/Cake/Config/cacert.pem
  150. 0  lib/Cake/Config/config.php
  151. 0  lib/Cake/Config/routes.php
  152. 0  lib/Cake/Config/unicode/casefolding/0080_00ff.php
  153. 0  lib/Cake/Config/unicode/casefolding/0100_017f.php
  154. 0  lib/Cake/Config/unicode/casefolding/0180_024F.php
  155. 0  lib/Cake/Config/unicode/casefolding/0250_02af.php
  156. 0  lib/Cake/Config/unicode/casefolding/0370_03ff.php
  157. 0  lib/Cake/Config/unicode/casefolding/0400_04ff.php
  158. 0  lib/Cake/Config/unicode/casefolding/0500_052f.php
  159. 0  lib/Cake/Config/unicode/casefolding/0530_058f.php
  160. 0  lib/Cake/Config/unicode/casefolding/1e00_1eff.php
  161. 0  lib/Cake/Config/unicode/casefolding/1f00_1fff.php
  162. 0  lib/Cake/Config/unicode/casefolding/2100_214f.php
  163. 0  lib/Cake/Config/unicode/casefolding/2150_218f.php
  164. 0  lib/Cake/Config/unicode/casefolding/2460_24ff.php
  165. 0  lib/Cake/Config/unicode/casefolding/2c00_2c5f.php
  166. 0  lib/Cake/Config/unicode/casefolding/2c60_2c7f.php
  167. 0  lib/Cake/Config/unicode/casefolding/2c80_2cff.php
  168. 0  lib/Cake/Config/unicode/casefolding/ff00_ffef.php
  169. 0  lib/Cake/Configure/ConfigReaderInterface.php
  170. 0  lib/Cake/Configure/IniReader.php
  171. 0  lib/Cake/Configure/PhpReader.php
  172. 0  lib/Cake/Console/Command/AclShell.php
  173. 0  lib/Cake/Console/Command/ApiShell.php
  174. 0  lib/Cake/Console/Command/AppShell.php
  175. 0  lib/Cake/Console/Command/BakeShell.php
  176. 0  lib/Cake/Console/Command/CommandListShell.php
  177. 0  lib/Cake/Console/Command/ConsoleShell.php
  178. 0  lib/Cake/Console/Command/I18nShell.php
  179. 0  lib/Cake/Console/Command/SchemaShell.php
  180. 0  lib/Cake/Console/Command/ServerShell.php
  181. 0  lib/Cake/Console/Command/Task/BakeTask.php
  182. 0  lib/Cake/Console/Command/Task/ControllerTask.php
  183. 0  lib/Cake/Console/Command/Task/DbConfigTask.php
  184. 0  lib/Cake/Console/Command/Task/ExtractTask.php
  185. 0  lib/Cake/Console/Command/Task/FixtureTask.php
  186. 0  lib/Cake/Console/Command/Task/ModelTask.php
  187. 0  lib/Cake/Console/Command/Task/PluginTask.php
  188. 0  lib/Cake/Console/Command/Task/ProjectTask.php
  189. 0  lib/Cake/Console/Command/Task/TemplateTask.php
  190. 0  lib/Cake/Console/Command/Task/TestTask.php
  191. 0  lib/Cake/Console/Command/Task/ViewTask.php
  192. 0  lib/Cake/Console/Command/TestShell.php
  193. 0  lib/Cake/Console/Command/TestsuiteShell.php
  194. 0  lib/Cake/Console/Command/UpgradeShell.php
  195. 0  lib/Cake/Console/ConsoleErrorHandler.php
  196. 0  lib/Cake/Console/ConsoleInput.php
  197. 0  lib/Cake/Console/ConsoleInputArgument.php
  198. 0  lib/Cake/Console/ConsoleInputOption.php
  199. 0  lib/Cake/Console/ConsoleInputSubcommand.php
  200. 0  lib/Cake/Console/ConsoleOptionParser.php
  201. 0  lib/Cake/Console/ConsoleOutput.php
  202. 0  lib/Cake/Console/HelpFormatter.php
  203. 0  lib/Cake/Console/Shell.php
  204. 0  lib/Cake/Console/ShellDispatcher.php
  205. 0  lib/Cake/Console/TaskCollection.php
  206. 0  lib/Cake/Console/Templates/default/actions/controller_actions.ctp
  207. 0  lib/Cake/Console/Templates/default/classes/controller.ctp
  208. 0  lib/Cake/Console/Templates/default/classes/fixture.ctp
  209. 0  lib/Cake/Console/Templates/default/classes/model.ctp
  210. 0  lib/Cake/Console/Templates/default/classes/test.ctp
  211. 0  lib/Cake/Console/Templates/default/views/form.ctp
  212. 0  lib/Cake/Console/Templates/default/views/index.ctp
  213. 0  lib/Cake/Console/Templates/default/views/view.ctp
  214. 0  lib/Cake/Console/Templates/skel/.htaccess
  215. 0  lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php
  216. 0  lib/Cake/Console/Templates/skel/Config/Schema/db_acl.sql
  217. 0  lib/Cake/Console/Templates/skel/Config/Schema/i18n.php
  218. 0  lib/Cake/Console/Templates/skel/Config/Schema/i18n.sql
  219. 0  lib/Cake/Console/Templates/skel/Config/Schema/sessions.php
  220. 0  lib/Cake/Console/Templates/skel/Config/Schema/sessions.sql
  221. 0  lib/Cake/Console/Templates/skel/Config/acl.ini.php
  222. 0  lib/Cake/Console/Templates/skel/Config/bootstrap.php
  223. 0  lib/Cake/Console/Templates/skel/Config/core.php
  224. 0  lib/Cake/Console/Templates/skel/Config/database.php.default
  225. 0  lib/Cake/Console/Templates/skel/Config/email.php.default
  226. 0  lib/Cake/Console/Templates/skel/Config/routes.php
  227. 0  lib/Cake/Console/Templates/skel/Console/Command/AppShell.php
  228. 0  lib/Cake/Console/Templates/skel/Console/Command/Task/empty
  229. 0  lib/Cake/Console/Templates/skel/Console/Templates/empty
  230. 0  lib/Cake/Console/Templates/skel/Console/cake
  231. 0  lib/Cake/Console/Templates/skel/Console/cake.bat
  232. 0  lib/Cake/Console/Templates/skel/Console/cake.php
  233. 0  lib/Cake/Console/Templates/skel/Controller/AppController.php
  234. 0  lib/Cake/Console/Templates/skel/Controller/Component/empty
  235. 0  lib/Cake/Console/Templates/skel/Controller/PagesController.php
  236. 0  lib/Cake/Console/Templates/skel/Lib/empty
  237. 0  lib/Cake/Console/Templates/skel/Locale/eng/LC_MESSAGES/empty
  238. 0  lib/Cake/Console/Templates/skel/Model/AppModel.php
  239. 0  lib/Cake/Console/Templates/skel/Model/Behavior/empty
  240. 0  lib/Cake/Console/Templates/skel/Model/Datasource/empty
  241. 0  lib/Cake/Console/Templates/skel/Plugin/empty
  242. 0  lib/Cake/Console/Templates/skel/Test/Case/Controller/Component/empty
  243. 0  lib/Cake/Console/Templates/skel/Test/Case/Model/Behavior/empty
  244. 0  lib/Cake/Console/Templates/skel/Test/Case/View/Helper/empty
  245. 0  lib/Cake/Console/Templates/skel/Test/Fixture/empty
  246. 0  lib/Cake/Console/Templates/skel/Vendor/empty
  247. 0  lib/Cake/Console/Templates/skel/View/Elements/empty
  248. 0  lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp
  249. 0  lib/Cake/Console/Templates/skel/View/Emails/text/default.ctp
  250. 0  lib/Cake/Console/Templates/skel/View/Errors/error400.ctp
  251. 0  lib/Cake/Console/Templates/skel/View/Errors/error500.ctp
  252. 0  lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php
  253. 0  lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp
  254. 0  lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp
  255. 0  lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp
  256. 0  lib/Cake/Console/Templates/skel/View/Layouts/default.ctp
  257. 0  lib/Cake/Console/Templates/skel/View/Layouts/error.ctp
  258. 0  lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp
  259. 0  lib/Cake/Console/Templates/skel/View/Layouts/js/default.ctp
  260. 0  lib/Cake/Console/Templates/skel/View/Layouts/rss/default.ctp
  261. 0  lib/Cake/Console/Templates/skel/View/Layouts/xml/default.ctp
  262. 0  lib/Cake/Console/Templates/skel/View/Pages/home.ctp
  263. 0  lib/Cake/Console/Templates/skel/View/Scaffolds/empty
  264. 0  lib/Cake/Console/Templates/skel/index.php
  265. 0  lib/Cake/Console/Templates/skel/tmp/cache/models/empty
  266. 0  lib/Cake/Console/Templates/skel/tmp/cache/persistent/empty
  267. 0  lib/Cake/Console/Templates/skel/tmp/cache/views/empty
  268. 0  lib/Cake/Console/Templates/skel/tmp/logs/empty
  269. 0  lib/Cake/Console/Templates/skel/tmp/sessions/empty
  270. 0  lib/Cake/Console/Templates/skel/tmp/tests/empty
  271. 0  lib/Cake/Console/Templates/skel/webroot/.htaccess
  272. 0  lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css
  273. 0  lib/Cake/Console/Templates/skel/webroot/favicon.ico
  274. 0  lib/Cake/Console/Templates/skel/webroot/files/empty
  275. 0  lib/Cake/Console/Templates/skel/webroot/img/cake.icon.png
  276. 0  lib/Cake/Console/Templates/skel/webroot/img/cake.power.gif
  277. 0  lib/Cake/Console/Templates/skel/webroot/img/test-error-icon.png
  278. 0  lib/Cake/Console/Templates/skel/webroot/img/test-fail-icon.png
  279. 0  lib/Cake/Console/Templates/skel/webroot/img/test-pass-icon.png
  280. 0  lib/Cake/Console/Templates/skel/webroot/img/test-skip-icon.png
  281. 0  lib/Cake/Console/Templates/skel/webroot/index.php
  282. 0  lib/Cake/Console/Templates/skel/webroot/js/empty
  283. 0  lib/Cake/Console/Templates/skel/webroot/test.php
  284. 0  lib/Cake/Console/cake
  285. 0  lib/Cake/Console/cake.bat
  286. 0  lib/Cake/Console/cake.php
  287. 0  lib/Cake/Controller/CakeErrorController.php
  288. 0  lib/Cake/Controller/Component.php
  289. 0  lib/Cake/Controller/Component/Acl/AclInterface.php
  290. 0  lib/Cake/Controller/Component/Acl/DbAcl.php
  291. 0  lib/Cake/Controller/Component/Acl/IniAcl.php
  292. 0  lib/Cake/Controller/Component/Acl/PhpAcl.php
  293. 0  lib/Cake/Controller/Component/AclComponent.php
  294. 0  lib/Cake/Controller/Component/Auth/ActionsAuthorize.php
  295. 0  lib/Cake/Controller/Component/Auth/BaseAuthenticate.php
  296. 0  lib/Cake/Controller/Component/Auth/BaseAuthorize.php
  297. 0  lib/Cake/Controller/Component/Auth/BasicAuthenticate.php
  298. 0  lib/Cake/Controller/Component/Auth/BlowfishAuthenticate.php
  299. 0  lib/Cake/Controller/Component/Auth/ControllerAuthorize.php
  300. 0  lib/Cake/Controller/Component/Auth/CrudAuthorize.php
Sorry, we could not display the entire diff because too many files (1,075) changed.
View
0  .htaccess 100755 → 100644
File mode changed
View
0  README.md 100755 → 100644
File mode changed
View
0  app/.htaccess 100755 → 100644
File mode changed
View
0  app/Config/Schema/db_acl.php 100755 → 100644
File mode changed
View
0  app/Config/Schema/db_acl.sql 100755 → 100644
File mode changed
View
0  app/Config/Schema/i18n.php 100755 → 100644
File mode changed
View
0  app/Config/Schema/i18n.sql 100755 → 100644
File mode changed
View
0  app/Config/Schema/sessions.php 100755 → 100644
File mode changed
View
0  app/Config/Schema/sessions.sql 100755 → 100644
File mode changed
View
0  app/Config/acl.ini.php 100755 → 100644
File mode changed
View
0  app/Config/acl.php 100755 → 100644
File mode changed
View
0  app/Config/bootstrap.php 100755 → 100644
File mode changed
View
2  app/Config/core.php 100755 → 100644
@@ -94,7 +94,7 @@
*
* And uncomment the App.baseUrl below:
*/
- //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
+ Configure::write('App.baseUrl', env('SCRIPT_NAME'));
/**
* Uncomment the define below to use CakePHP prefix routes.
View
0  app/Config/database.php 100755 → 100644
File mode changed
View
0  app/Config/database.php.default 100755 → 100644
File mode changed
View
10 app/Config/email.php 100755 → 100644
@@ -51,12 +51,12 @@ class EmailConfig {
public $smtp = array(
'transport' => 'Smtp',
- 'from' => array('site@localhost' => 'My Site'),
- 'host' => 'smtp.sendgrid.net',
- 'port' => 587,
+ 'from' => array('noreplay@i-addins.com' => 'Konfirmasi Pendaftaran'),
+ 'host' => 'yuki.qwords.net ',
+ 'port' => 465,
'timeout' => 30,
- 'username' => 'andy.wie88',
- 'password' => 'rital0v3u',
+ 'username' => 'noreply@i-addins.com',
+ 'password' => 'noreplay',
'client' => null,
'log' => false,
//'charset' => 'utf-8',
View
0  app/Config/email.php.default 100755 → 100644
File mode changed
View
4 app/Config/routes.php 100755 → 100644
@@ -34,6 +34,10 @@
Router::connect("/masuk",array('controller'=>'Users','action'=>'login'));
+ Router::connect("/profil",array('controller'=>'Users','action'=>'profil'));
+
+ Router::connect("/profil/iklan",array("controller"=>"ads","action"=>'showByUser'));
+
/**
* Load all plugin routes. See the CakePlugin documentation on
* how to customize the loading of plugin routes.
View
0  app/Console/Command/AppShell.php 100755 → 100644
File mode changed
View
0  app/Console/Command/Task/empty 100755 → 100644
File mode changed
View
0  app/Console/Templates/empty 100755 → 100644
File mode changed
View
0  app/Console/cake 100755 → 100644
File mode changed
View
0  app/Console/cake.bat 100755 → 100644
File mode changed
View
0  app/Console/cake.php 100755 → 100644
File mode changed
View
12 app/Controller/AdsController.php 100755 → 100644
@@ -136,6 +136,18 @@ public function delete(){
}
}
+ public function showByUser(){
+ if($this->request->is("Ajax")){
+ $this->autoLayout = False;
+ $this->autoRender = False;
+ $id = $this->Auth->user('id');
+ $this->paginate = array('limit'=>5,'conditions'=>array('Ad.User_id'=>$id));
+ $result = $this->paginate('Ad');
+ $this->set('ads',$result);
+ $this->render("/Users/iklan");
+ }
+ }
+
public function edit(){
if($this->request->isAjax()){
$this->autoLayout = False;
View
0  app/Controller/AppController.php 100755 → 100644
File mode changed
View
0  app/Controller/CitiesController.php 100755 → 100644
File mode changed
View
0  app/Controller/Component/empty 100755 → 100644
File mode changed
View
0  app/Controller/PagesController.php 100755 → 100644
File mode changed
View
0  app/Controller/StatesController.php 100755 → 100644
File mode changed
View
125 app/Controller/UsersController.php 100755 → 100644
@@ -13,12 +13,131 @@
class UsersController extends AppController {
//put your code here
var $name = "Users";
+ var $components=array('Email');
+
public function beforeFilter() {
parent::beforeFilter();
- $this->Auth->allow(array('register','validate_form'));
+ $this->Auth->allow(array('register','validate_form','activateAccount','forgetPassword'));
+ }
+
+ public function forgetPassword(){
+ $this->autoRender = False;
+ $this->render('forget_password');
+ if($this->request->is("post")){
+ if(isset($this->request->data["User"]["username"])){
+ if($this->User->find('count',array('conditions'=>array('User.username'=>$this->request->data['User']['username'])))>=1){
+ $this->set('status',1);
+ $this->set('user',$this->User->find('all',array('conditions'=>array('User.username'=>$this->request->data['User']['username']))));
+ $user = $this->User->find('all',array('conditions'=>array('User.username'=>$this->request->data['User']['username'])));
+ $this->Session->write("user",$user[0]);
+ $this->render('forget_password');
+ }
+ }
+ elseif(isset($this->request->data["User"]["security_answer"])){
+ $user = $this->Session->read('user');
+ if($user['User']['security_answer'] == $this->request->data['User']['security_answer']){
+ $this->set('status',2);
+ $this->set('user',$user);
+ $this->render('forget_password');
+ }
+ }
+ elseif(isset($this->request->data["User"]["password"])){
+ $user = $this->Session->read('user');
+ $this->User->set($this->request->data);
+ if($this->User->validates()){
+ $data = array(
+ "User.password" => "'".$this->Auth->password($this->request->data["User"]["password"])."'",
+ "User.status" => 0
+ );
+ if($this->User->updateAll($data,array('User.id'=>$user['User']['id']))){
+
+ $this->Email->to = $user['User']['username'];
+ $this->Email->from = array('noreply@i-addins.com' => 'noreply@i-addins.com');
+ $this->Email->subject = "Re-Aktifasi Akun";
+ $isi = "http://www.i-addins.com/users/activateAccount?uid=".$this->User->encrypt($user['User']['id'],'1234');
+ if($this->Email->send($isi)){
+ $this->set('status',3);
+ $this->render('forget_password');
+ }
+ }
+ }
+ }
+ }
}
+ public function change(){
+ if($this->request->is("Ajax")){
+ $this->autoRender = False;
+ $this->autoLayout = False;
+ $this->User->set($this->request->data);
+ if($this->User->validates()){
+ $user = $this->User->findById($this->Auth->user('id'));
+ if($user['User']['password']==$this->Auth->password($this->request->data['User']['old_password'])){
+ if($this->User->updateAll(array('User.password'=>"'".$this->Auth->password($this->request->data['User']['password'])."'"),array("User.id"=>$this->Auth->user('id')))){
+ $message = array("status"=>1,"message"=>"Pengubahan password berhasil dilakukan");
+ }
+ }
+ else{
+ $message = array("status"=>0,"message"=>array("old_password"=>array("Password lama tidak sama dengan yang sudah ada.")));
+ }
+ }
+ else{
+ $message = array("status"=>0,"message"=>$this->User->validationErrors);
+ }
+ echo json_encode($message);
+ }
+ }
+
+ public function profil(){
+ $this->layout = "profil";
+ $this->autoRender = False;
+ if($this->request->is("Ajax")){
+ $this->autoLayout = False;
+ }
+ if(!isset($this->request->params['pass'][0]) || $this->request->params['pass'][0] == "edit"){
+ $this->set("title_for_layout","ADDins - Edit Profile");
+ $user = $this->User->findById($this->Auth->user('id'));
+ $this->set('user',$user);
+ $this->render("edit");
+ }
+ else if($this->request->params['pass'][0] == "password"){
+ $this->render("password");
+ }
+ else{
+
+ }
+ }
+
+ public function edit(){
+ if($this->request->is("Ajax")){
+ $this->autoLayout = False;
+ $this->autoRender = False;
+ $this->User->set($this->request->data);
+ if($this->User->validates()){
+ $data = array(
+ "User.first_name" => "'".$this->request->data['User']['first_name']."'",
+ "User.last_name" => "'".$this->request->data['User']['last_name']."'",
+ "User.jenis_kelamin" => "'".$this->request->data['User']['jenis_kelamin']."'",
+ "User.tgl_lahir" => "'".$this->request->data['User']['tgl_lahir']['year']."-".$this->request->data['User']['tgl_lahir']['month']."-".$this->request->data['User']['tgl_lahir']['day']."'",
+ "User.alamat" => "'".$this->request->data['User']['alamat']."'",
+ "User.state" => "'".$this->request->data['User']['state']."'",
+ "User.city" => "'".$this->request->data['User']['city']."'",
+ "User.handphone" => "'".$this->request->data['User']['handphone']."'"
+ );
+ if($this->User->updateAll($data,array("User.id"=>$this->request->data['User']['id']))){
+ $message = array("status"=>1);
+ $user_data = $this->User->findById($this->Auth->user('id'));
+ $this->Auth->login($user_data['User']);
+ echo json_encode($message);
+ }
+ }
+ else{
+ $message = array("status"=>0,"message"=>$this->User->validationErrors);
+ echo json_encode($message);
+ }
+ }
+ }
public function register(){
if(!$this->Auth->user()){
@@ -97,12 +216,12 @@ public function validate_form(){
}
}
- public function validate(){
+ public function activateAccount(){
/* Do The Validation */
$uid = $this->User->decrypt($this->request->query['uid'],'1234');
$this->User->updateAll(
array('User.status'=>1),
- array('User.id ='=>$uid)
+ array('User.id'=>$uid)
);
$this->redirect(array("controller"=>$this->name,"action"=>"login","?"=>array("active"=>True)));
}
View
0  app/Lib/empty 100755 → 100644
File mode changed
View
0  app/Locale/eng/LC_MESSAGES/empty 100755 → 100644
File mode changed
View
0  app/Model/Ad.php 100755 → 100644
File mode changed
View
0  app/Model/AppModel.php 100755 → 100644
File mode changed
View
0  app/Model/Behavior/empty 100755 → 100644
File mode changed
View
0  app/Model/Category.php 100755 → 100644
File mode changed
View
0  app/Model/City.php 100755 → 100644
File mode changed
View
0  app/Model/Datasource/empty 100755 → 100644
File mode changed
View
0  app/Model/State.php 100755 → 100644
File mode changed
View
19 app/Model/User.php 100755 → 100644
@@ -125,6 +125,12 @@ class User extends AppModel {
'rule' => 'notEmpty',
'message' => 'Jawaban Keamanan tidak boleh kosong'
)
+ ),
+ 'old_password' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'Password Lama tidak boleh kosong'
+ )
)
);
@@ -137,7 +143,7 @@ public function konfirmPassword($check){
return False;
}
- function encrypt($id, $key)
+ public function encrypt($id, $key)
{
$id = base_convert($id, 10, 36); // Save some space
$data = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $id, 'ecb');
@@ -146,7 +152,7 @@ function encrypt($id, $key)
return $data;
}
- function decrypt($encrypted_id, $key)
+ public function decrypt($encrypted_id, $key)
{
$data = pack('H*', $encrypted_id); // Translate back to binary
$data = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, $data, 'ecb');
@@ -163,23 +169,22 @@ public function beforeSave($options = array()) {
}
public function afterSave($created) {
- /*
App::uses('CakeEmail', 'Network/Email');
App::uses('Security','Utility');
parent::afterSave($created);
if($created){
$uid = $this->find('first',
array(
- 'conditions' => array('User.email' => $this->data[$this->name]['username']), //array of conditions
+ 'conditions' => array('User.username' => $this->data[$this->name]['username']), //array of conditions
'fields' => array('User.id'), //array of field names
));
$email = new CakeEmail();
- $email->from(array('no-reply@talefeast-zenotech.rhcloud.com' => 'ADDins'));
+ $email->from(array('noreply@i-addins.com' => 'noreply@i-addins.com'));
$email->to($this->data[$this->name]['username']);
$email->subject('Registration');
- $isi = "http://andywie88.byethost12.com/validate?uid=".$this->encrypt($uid['User']['id'],'1234');
+ $isi = "http://www.i-addins.com/users/activateAccount?uid=".$this->encrypt($uid['User']['id'],'1234');
$email->send($isi);
- }*/
+ }
}
}
View
0  app/Plugin/empty 100755 → 100644
File mode changed
View
0  app/Test/Case/Controller/Component/empty 100755 → 100644
File mode changed
View
0  app/Test/Case/Model/Behavior/empty 100755 → 100644
File mode changed
View
0  app/Test/Case/View/Helper/empty 100755 → 100644
File mode changed
View
0  app/Test/Fixture/empty 100755 → 100644
File mode changed
View
191 app/User.php
@@ -0,0 +1,191 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of User
+ *
+ * @author futura-creative
+ */
+class User extends AppModel {
+ var $name = "User";
+ var $useTable = "users";
+ //put your code here
+
+ var $belongsTo = array(
+ 'State' => array(
+ 'className' => 'State',
+ 'foreignKey' => 'state'
+ ),
+ 'City'=> array(
+ 'className' => 'City',
+ 'foreignKey' => 'city'
+ )
+ );
+
+ var $hasMany = array(
+ 'Ad' => array(
+ 'className' => 'Ad',
+ 'foreignKey' => 'user_id'
+ )
+ );
+
+ var $validate = array(
+ 'first_name' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'Nama depan tidak boleh kosong'
+ )
+ ),
+ 'last_name' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'Nama belakang tidak boleh kosong'
+ )
+ ),
+ 'username' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'Email tidak boleh kosong'
+ ),
+ 'must_unique' => array(
+ 'rule' => 'isUnique',
+ 'message' => 'Email yang sama sudah ada'
+ ),
+ 'must_email' => array(
+ 'rule' => 'email',
+ 'message' => 'Masukan Email yang valid'
+ )
+ ),
+ 'password' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'Password tidak boleh kosong'
+ ),
+ 'must-content-both' => array(
+ 'rule' => '/^([0-9]+[a-zA-Z]+|[a-zA-Z]+[0-9]+)[0-9a-zA-Z]*$/i',
+ 'message' => 'Password harus mengandung setidaknya 1 angka dan 1 huruf'
+ )
+ ),
+ 'konfirmasi_password' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'Konfirmasi Password tidak boleh kosong'
+ ),
+ 'same_password' => array(
+ 'rule' => 'konfirmPassword',
+ 'message' => 'Password dengan Konfirmasi Password harus sama'
+ )
+ ),
+ 'jenis_kelamin' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'Jenis kelamin tidak boleh kosong'
+ )
+ ),
+ 'alamat' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'Alamat tidak boleh kosong'
+ )
+ ),
+ 'state' => array(
+ 'notEmpty' => array(
+ 'rule' => array('comparison','!=',0),
+ 'message' => 'Pilih salah satu pronvisi'
+ )
+ ),
+ 'city' => array(
+ 'notEmpty' => array(
+ 'rule'=> array('comparison','!=',0),
+ 'message' => 'Pilih salah satu kota'
+ )
+ ),
+ 'handphone' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'No. Handphone tidak boleh kosong'
+ ),
+ 'numerik' => array(
+ 'rule' => 'numeric',
+ 'message' => 'No. Handphone hanya mengandung nomor'
+ )
+ ),
+ 'security_question' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'Pertanyaan Keamanan tidak boleh kosong'
+ )
+ ),
+ 'security_answer' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'Jawaban Keamanan tidak boleh kosong'
+ )
+ ),
+ 'old_password' => array(
+ 'notEmpty' => array(
+ 'rule' => 'notEmpty',
+ 'message' => 'Password Lama tidak boleh kosong'
+ )
+ )
+ );
+
+ public function konfirmPassword($check){
+ $password = $this->data[$this->name]['password'];
+ $konfirm_password = $this->data[$this->name]['konfirmasi_password'];
+ if($password == $konfirm_password){
+ return True;
+ }
+ return False;
+ }
+
+ public function encrypt($id, $key)
+ {
+ $id = base_convert($id, 10, 36); // Save some space
+ $data = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $id, 'ecb');
+ $data = bin2hex($data);
+
+ return $data;
+ }
+
+ public function decrypt($encrypted_id, $key)
+ {
+ $data = pack('H*', $encrypted_id); // Translate back to binary
+ $data = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, $data, 'ecb');
+ $data = base_convert($data, 36, 10);
+
+ return $data;
+ }
+
+ public function beforeSave($options = array()) {
+ parent::beforeSave($options);
+ App::uses('Security','Utility');
+ $this->data[$this->name]['password'] = AuthComponent::password($this->data[$this->name]['password']);
+ return true;
+ }
+
+ public function afterSave($created) {
+ App::uses('CakeEmail', 'Network/Email');
+ App::uses('Security','Utility');
+ parent::afterSave($created);
+ if($created){
+ $uid = $this->find('first',
+ array(
+ 'conditions' => array('User.username' => $this->data[$this->name]['username']), //array of conditions
+ 'fields' => array('User.id'), //array of field names
+ ));
+ $email = new CakeEmail();
+ $email->from(array('noreply@i-addins.com' => 'noreply@i-addins.com'));
+ $email->to($this->data[$this->name]['username']);
+ $email->subject('Registration');
+ $isi = "http://www.i-addins.com/users/activateAccount?uid=".$this->encrypt($uid['User']['id'],'1234');
+ $email->send($isi);
+ }
+ }
+}
+
+?>
View
0  app/Vendor/empty 100755 → 100644
File mode changed
View
2  app/View/Ads/edit.ctp
@@ -74,7 +74,7 @@
$(".edit-mark").removeClass("edit-mark");
}
else{
- alert("Penghapusan iklan gagal. silahkan refresh halaman ini");
+ alert("Pengeditan iklan gagal. silahkan refresh halaman ini");
}
}
View
1  app/View/Ads/index.ctp 100755 → 100644
@@ -10,6 +10,7 @@
<?= $this->Form->input('password',array('div'=>False,'label'=>False,'class'=>'small-input got-border','placeholder'=>'password','type'=>'password'))?>
<?= $this->Form->submit('Login',array('div'=>False,'label'=>False,'class'=>'center-element')); ?>
<?= $this->Form->end(); ?>
+ <?= $this->Html->link('forget password?',array('controller'=>'users','action'=>'forgetPassword'),array('class'=>'black-link center-element','style'=>'text-align:center')) ?>
<h3>atau</h3>
<?= $this->Html->link('Register',array('controller'=>'Users','action'=>'register'),array('class'=>'register-button')) ?>
</div>
View
15 app/View/Ads/reload_ads.ctp
@@ -0,0 +1,15 @@
+<?php foreach($ads as $ad):?>
+ <div class="Ads-box box-shadow">
+ <div class="new-label"></div>
+ <div class="Ads-image">
+ <?= $this->Html->image('../files/'.$ad['Ad']['image'],array('class'=>'Ads-image')) ?>
+ </div>
+ <div class="Ads-content">
+ <h2><?= $ad['Ad']['ads_title'] ?></h2>
+ <p><?= $ad['Ad']['ads_body'] ?></p>
+ </div>
+ <div class="Ads-contact">
+ <strong>C : <?= $ad['User']['first_name']." ".$ad['User']['last_name'] ?> <br/> +62<?= $ad['User']['handphone'] ?> </strong>
+ </div>
+ </div>
+<?php endforeach; ?>
View
15 app/View/Elements/1.ctp
@@ -0,0 +1,15 @@
+<?php foreach($ads as $ad):?>
+ <div class="Ads-box box-shadow">
+ <div class="new-label"></div>
+ <div class="Ads-image">
+ <?= $this->Html->image('../files/'.$ad['Ad']['image'],array('class'=>'Ads-image')) ?>
+ </div>
+ <div class="Ads-content">
+ <h2><?= $ad['Ad']['ads_title'] ?></h2>
+ <p><?= $ad['Ad']['ads_body'] ?></p>
+ </div>
+ <div class="Ads-contact">
+ <strong>C : <?= $ad['User']['first_name']." ".$ad['User']['last_name'] ?> <br/> +62<?= $ad['User']['handphone'] ?> </strong>
+ </div>
+ </div>
+<?php endforeach; ?>
View
0  app/View/Elements/empty 100755 → 100644
File mode changed
View
0  app/View/Emails/html/default.ctp 100755 → 100644
File mode changed
View
0  app/View/Emails/text/default.ctp 100755 → 100644
File mode changed
View
0  app/View/Errors/error400.ctp 100755 → 100644
File mode changed
View
0  app/View/Errors/error500.ctp 100755 → 100644
File mode changed
View
0  app/View/Helper/AppHelper.php 100755 → 100644
File mode changed
View
0  app/View/Layouts/Emails/html/default.ctp 100755 → 100644
File mode changed
View
0  app/View/Layouts/Emails/text/default.ctp 100755 → 100644
File mode changed
View
0  app/View/Layouts/ajax.ctp 100755 → 100644
File mode changed
View
8 app/View/Layouts/default.ctp 100755 → 100644
@@ -58,7 +58,7 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework
</div>
<a id="arrow" class='arrow' href='javascript:void(0)'></a>
<ul id="menu" class='menu'>
- <li><?= $this->Html->link("Edit Profil",array("controller"=>"users","action"=>"edit")); ?></li>
+ <li><?= $this->Html->link('Profil',array("controller"=>"users","action"=>"profil")); ?></li>
<li><?= $this->Html->link('Logout',array('controller'=>'users','action'=>'logout')); ?></li>
</ul>
</div>
@@ -111,11 +111,7 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework
<div id="footer-content">
<ul>
<li>Copyright &copy; 2013 Futura Creative Inc.</li>
- <li>Contact Us</li>
- </ul>
- <ul class="icons">
- <li><?= $this->Html->image('fb-icon.png') ?></li>
- <li><?= $this->Html->image('tw-icon.png') ?></li>
+ <li><a href="mailto:cs@i-addins.com">Contact Us</a></li>
</ul>
</div>
</div>
View
0  app/View/Layouts/error.ctp 100755 → 100644
File mode changed
View
0  app/View/Layouts/flash.ctp 100755 → 100644
File mode changed
View
0  app/View/Layouts/js/default.ctp 100755 → 100644
File mode changed
View
152 app/View/Layouts/profil.ctp
@@ -0,0 +1,152 @@
+<?php
+/**
+ *
+ * PHP 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @package Cake.View.Layouts
+ * @since CakePHP(tm) v 0.10.0.1076
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+
+$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
+?>
+<!DOCTYPE html>
+<html>
+<head>
+ <?php echo $this->Html->charset(); ?>
+ <title>
+ <?php echo $title_for_layout; ?>
+ </title>
+ <?php
+ echo $this->Html->meta('icon');
+
+ echo $this->Html->css('addins.main.layout.style');
+ echo $this->Html->css('jquery.selectbox');
+ echo $this->Html->css('jquery-ui-1.10.1.custom.min');
+
+ echo $this->Html->script('jquery-1.7.2.min');
+ echo $this->Html->script('jquery.ui.core');
+ echo $this->Html->script('jquery.ui.datepicker');
+ echo $this->Html->script('jquery.masonry.min');
+ echo $this->Html->script('jquery.infinitescroll.min');
+ echo $this->Html->script('jquery.selectbox-0.2');
+
+ echo $this->fetch('meta');
+ echo $this->fetch('css');
+ echo $this->fetch('script');
+ ?>
+</head>
+<body>
+ <div id="container" class="footer-minus">
+ <div id="header">
+ <div id="header-shell-1">
+ <div class="header-content">
+ <?= $this->Html->image('addins.png',array('url'=>array('controller'=>'Ads','action'=>'index')))?>
+ <!-- Login User Menu Block -->
+ <?php if($loggedInUser != null): ?>
+ <div class='nav-right' class="fixed-nav-right">
+ <div class='user-nav'>
+ <?= $loggedInUser['first_name']." ".$loggedInUser['last_name'] ?>
+ </div>
+ <a id="arrow" class='arrow' href='javascript:void(0)'></a>
+ <ul id="menu" class='menu'>
+ <li><?= $this->Html->link('Profil',array("controller"=>"users","action"=>"profil")); ?></li>
+ <li><?= $this->Html->link('Logout',array('controller'=>'users','action'=>'logout')); ?></li>
+ </ul>
+ </div>
+ <?php else: ?>
+ <div class='nav-right-non-fixed'>
+ <ul>
+ <li><?= $this->Html->link('Login',array('controller'=>'users','action'=>'login')); ?></li>
+ <li><?= $this->Html->link('Daftar ADDins',array('controller'=>'Users','action'=>'register')); ?></li>
+ </ul>
+ </div>
+ <?php endif; ?>
+ <!-- End of Block -->
+ </div>
+ </div>
+ <div id="header-shell-2">
+ <div class="header-content">
+ <!-- Search - Box -->
+ <?= $this->Form->Create('Ad',array('action'=>'search','type'=>'get')) ?>
+ <ul class="search-wrapper">
+ <li>
+ <?= $this->Form->input('dE41',array('type'=>'hidden','value'=> hash("sha256",rand(1000000,1000000000000000000000000000000000)))); ?>
+ <?= $this->Form->input('q',array('type'=>'text','class'=>'search-box','label'=>False,'div'=>False,'placeholder'=>'Cari...'));?>
+ </li>
+ <li>
+ <?= $this->Form->input('k',array('label'=>False,'div'=>False,'id'=>'kategori','type'=>'select','options'=>$kategori)); ?>
+ <?= $this->Form->input('dq',array('type'=>'hidden','value'=> hash("md5",rand(1000000,1000000000000000000000000000000000)))); ?>
+ </li>
+ <li>
+ <?= $this->Form->input('dE41',array('type'=>'hidden','value'=> hash("sha256",rand(1000000,1000000000000000000000000000000000)))); ?>
+ <?= $this->Form->input('p',array('label'=>False,'div'=>False,'id'=>'provinsi','type'=>'select','options'=>$state)); ?>
+ </li>
+ <li>
+ <?= $this->Form->input('dE41',array('type'=>'hidden','value'=> hash("sha256",rand(1000000,1000000000000000000000000000000000)))); ?>
+ <?= $this->Form->input('t',array('label'=>False,'div'=>False,'id'=>'date','type'=>'text','class'=>'date-box','placeholder'=>'Tanggal')); ?>
+ </li>
+ <li><?= $this->Form->submit('Cari',array('div'=>False)) ;?></li>
+ </ul>
+ <?= $this->Form->end(); ?>
+ <!-- End of Block -->
+ <?= $this->Html->image('home.png',array('class'=>'home-icon','url'=>array('controller'=>'Ads','action'=>'index'))) ?>
+ </div>
+ </div>
+ </div>
+ <div id="content">
+ <div id="left-nav">
+ <ul id="nav-main">
+ <li><a href="javascript:void(0)" class="nav-menu-item" hash="iklan" id="iklan" link="<?= Router::url(array("controller"=>"ads","action"=>"showByUser")) ?>">Iklan Saya</a></li>
+ <li>
+ <a href="javascript:void(0)" class="nav-menu-item active-menu-item" id="profil-button">Profil</a>
+ <ul>
+ <li><a href="javascript:void(0)" class="nav-menu-sub-item" hash="edit" link="<?= Router::url(array("controller"=>"users","action"=>"profil","edit")) ?>">Edit Profil</a></li>
+ <li><a href="javascript:void(0)" class="nav-menu-sub-item" hash="password" link="<?= Router::url(array("controller"=>"users","action"=>"profil","password")) ?>">Ubah Password</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <div id="main-content">
+ <?= $this->fetch('content'); ?>
+ </div>
+ </div>
+ <div class="clear-footer"></div>
+ </div>
+ <div id="footer">
+ <div id="footer-content">
+ <ul>
+ <li>Copyright &copy; 2013 Futura Creative Inc.</li>
+ <li>Contact Us</li>
+ </ul>
+ <ul class="icons">
+ <li><?= $this->Html->image('fb-icon.png') ?></li>
+ <li><?= $this->Html->image('tw-icon.png') ?></li>
+ </ul>
+ </div>
+ </div>
+ <?= $this->Html->script('jquery.user.menu'); ?>
+ <script>
+ $("#provinsi").selectbox();
+ $("#kategori").selectbox();
+ $("#date").datepicker();
+ $(".nav-menu-item:not(#profil-button),.nav-menu-sub-item").click(function(e){
+ location.hash = $(this).attr("hash");
+ $.post($(this).attr("link"),{},show,"HTML");
+ });
+ function show(response){
+ $("#content-inside").slideUp(1000).remove();
+ $("#main-content").empty();
+ $("#main-content").append($(response));
+ }
+ </script>
+</body>
+</html>
View
0  app/View/Layouts/rss/default.ctp 100755 → 100644
File mode changed
View
91 app/View/Layouts/test.php
@@ -0,0 +1,91 @@
+
+ <!-- End of Block -->
+
+ <!-- Generate Content Here -->
+ <div class="Ads-box box-shadow">
+ <div class="Ads-image"></div>
+ <div class="Ads-content">
+ <h2>Cari Guru Les</h2>
+ <p>Di cari Guru Les B.Inggris. untuk berkerja di xxx..
+ kirim kan lamaran anda di alamat berikut.</p>
+ </div>
+ <div class="Ads-contact">
+ <strong>C : Andy wijaya <br/> 085261118180 </strong>
+ </div>
+ </div>
+ <div class="Ads-box box-shadow">
+ <div class="Ads-image"></div>
+ <div class="Ads-content">
+ <h2>Cari Guru Les</h2>
+ <p>Di cari Guru Les B.Inggris. untuk berkerja di xxx..
+ kirim kan lamaran anda di alamat berikut.</p>
+ </div>
+ <div class="Ads-contact">
+ <strong>C : &Tab; Andy wijaya <br/> &Tab; 085261118180 </strong>
+ </div>
+ </div>
+ <!-- End of Block -->
+ </div>
+
+
+
+ <div class="Ads-box box-shadow">
+ <div class="Ads-image"></div>
+ <?= $this->Form->create('Ads-add'); ?>
+ <div id="file-row" class="ads-add">
+ <div class="browse">Cari Gambar</div>
+ <?= $this->Form->file('ads-file',array('class'=>'file-box')); ?>
+ </div>
+ <div id="ads-title" class="ads-add">
+ <?= $this->Form->input('ads-title',array('class'=>'small-input got-border no-margin','div'=>False,'label'=>False,'placeholder'=>'Judul Iklan')); ?>
+ </div>
+ <div id="kategori" class="ads-add">
+ <?= $this->Form->input('ads-category',array('class'=>'small-input got-border no-margin','div'=>False,'label'=>False,'placeholder'=>'Kategori')); ?>
+ </div>
+ <div id="dekripsi" class="ads-add">
+ <?= $this->Form->textarea('deskripsi',array('class'=>'small-input got-border no-margin','div'=>False,'label'=>False,'placeholder'=>'Deskripsi iklan dalam 300 huruf','maxlength'=>'300'));?>
+ </div>
+ <?= $this->Form->submit('Tambahkan', array('div'=>False,'label'=>False,'class'=>'center-element')); ?>
+ <?= $this->Form->end() ?>
+ </div>
+ <!-- End of Block -->
+ <!-- Login & Register Block -->
+ <div class="Ads-box box-shadow">
+ <h2 class="header">Untuk Menambahkan Iklan, Silakan</h2>
+ <h2>Login</h2>
+ <?= $this->Form->create('login');?>
+ <?= $this->Form->input('username',array('div'=>False,'label'=>False,'class'=>'small-input got-border','placeholder'=>'username')) ?>
+ <?= $this->Form->input('password',array('div'=>False,'label'=>False,'class'=>'small-input got-border','placeholder'=>'password','type'=>'password'))?>
+ <?= $this->Form->submit('Login',array('div'=>False,'label'=>False,'class'=>'center-element')); ?>
+ <?= $this->Form->end(); ?>
+ <h3>atau</h3>
+ <?= $this->Html->link('Register',array('controller'=>'Users','action'=>'register'),array('class'=>'register-button')) ?>
+ </div>
+ <!-- End of Block -->
+ <!-- Generate Content Here -->
+ <div class="Ads-box box-shadow">
+ <div class="Ads-image"></div>
+ <div class="Ads-content">
+ <h2>Cari Guru Les</h2>
+ <p>Di cari Guru Les B.Inggris. untuk berkerja di xxx..
+ kirim kan lamaran anda di alamat berikut.</p>
+ </div>
+ <div class="Ads-contact">
+ <strong>C : Andy wijaya <br/> 085261118180 </strong>
+ </div>
+ </div>
+ <div class="Ads-box box-shadow">
+ <div class="Ads-image"></div>
+ <div class="Ads-content">
+ <h2>Cari Guru Les</h2>
+ <p>Di cari Guru Les B.Inggris. untuk berkerja di xxx..
+ kirim kan lamaran anda di alamat berikut.</p>
+ </div>
+ <div class="Ads-contact">
+ <strong>C : &Tab; Andy wijaya <br/> &Tab; 085261118180 </strong>
+ </div>
+ </div>
+ <!-- End of Block -->
+ </div>
+
+
View
0  app/View/Layouts/xml/default.ctp 100755 → 100644
File mode changed
View
0  app/View/Pages/home.ctp 100755 → 100644
File mode changed
View
0  app/View/Scaffolds/empty 100755 → 100644
File mode changed
View
132 app/View/Users/edit.ctp
@@ -0,0 +1,132 @@
+<div id="content-inside" class="got-margin">
+ <div class="registration-header">
+ <h1>Update Profil</h1>
+ <h2>Update profil dengan data yang benar.</h2>
+ </div>
+ <?= $this->Form->create("User",array("action"=>"edit","id"=>'edit-form')) ?>
+ <?= $this->Form->input("id",array("type"=>"hidden","value"=>$user['User']['id'])); ?>
+ <div class="edit-content">
+ <div id="name-wrapper" class="field-wrapper">
+ <div id="first_name-wrapper" class="small-box">
+ <label class="edit-label">Nama depan :</label>
+ <?= $this->Form->input("first_name",array("div"=>False,"label"=>False,"class"=>"registration-input small-one got-border","value"=>$user['User']['first_name'])); ?>
+ </div>
+ <div id="last_name-wrapper" class="small-box">
+ <label>Nama Belakang :</label>
+ <?= $this->Form->input("last_name",array("div"=>False,"label"=>False,"class"=>"registration-input small-one got-border","value"=>$user['User']['last_name'])); ?>
+ </div>
+ </div>
+ <div id="jenis-kelamin-wrapper" class="field-wrapper">
+ <div class="big-box">
+ <label>Jenis Kelamin :</label>
+ <div class="radio-box">
+ <?= $this->Form->input('jenis_kelamin',array('type'=>'radio','options'=>array('Laki-Laki','Perempuan'),'class'=>'registration-radio','legend'=>False,'div'=>False,'id'=>'jenis_kelamin',"default"=>$user['User']['jenis_kelamin'])); ?>
+ </div>
+ </div>
+ </div>
+ <div id="tgl-lahir-wrapper" class="field-wrapper">
+ <div class="big-box">
+ <label>Tanggal Lahir :</label>
+ <div class="radio-box">
+ <?= $this->Form->input('tgl_lahir',array('type'=>'date','div'=>False,'label'=>False,'class'=>'registration-input date-one got-border','id'=>'tgl-lahir',"selected"=>$user['User']['tgl_lahir'])) ?>
+ </div>
+ </div>
+ </div>
+ <div id="alamat-wrapper" class="field-wrapper">
+ <div class="big-box">
+ <label>Alamat : </label>
+ <?= $this->Form->input('alamat',array('div'=>False,'label'=>False,'class'=>'registration-input big-one got-border','id'=>'alamat',"value"=>$user['User']['alamat'])); ?>
+ </div>
+ </div>
+ <div id="provinsi-kota-wrapper" class="field-wrapper">
+ <div class="small-box">
+ <label>Provinsi :</label>
+ <?= $this->Form->input('state',array('options'=>$state,'legend'=>False,'div'=>False,'label'=>False,'class'=>'registration-input select-one got-border','id'=>'state',"value"=>$user['User']['state'])); ?>
+ </div>
+ <div class="small-box">
+ <label>Kota : </label>
+ <?= $this->Form->input('city',array('options'=>array('0'=>'--- Pilih Provinsi ---'),'legend'=>False,'div'=>False,'label'=>False,'class'=>'registration-input select-one got-border','id'=>'city',"value"=>$user['User']['city'])); ?>
+ </div>
+ </div>
+ <div id="no.hp-wrapper" class="field-wrapper">
+ <div class="big-box">
+ <label>No. Handphone :</label>
+ <div><span class="margin-right">+62</span><?= $this->Form->input('handphone',array('class'=>'registration-input phone-one got-border','label'=>False,'div'=>False,'id'=>'handphone','value'=>$user['User']['handphone'])); ?></div>
+ </div>
+ </div>
+ <div id="submit-wrapper" class="field-wrapper">
+ <div class="big-box">
+ <?= $this->Form->submit('Update Data',array('class'=>'small-one center-element','div'=>False,'id'=>'signup-button','label'=>False)); ?>
+ </div>
+ </div>
+ </div>
+</div>
+<?= $this->Form->end(); ?>
+<?php $url = Router::url(array("controller"=>"states","action"=>"getTheCity")); ?>
+<?php $editUrl = Router::url(array("controller"=>"users","action"=>"edit")); ?>
+<script>
+ (function(){
+ $(document).ready(function(e){
+ if($("#state").val()!=0){
+ data = {state_id:$("#state").val()};
+ $.post('<?php echo $url ?>',data,showTheOption1,"JSON");
+ }
+ $(".active-menu-item").removeClass("active-menu-item");
+ $("#profil-button").addClass("active-menu-item");
+ });
+
+ function showTheOption1(response){
+ $("#city").empty().append("<option value='0'>--Pilih Kota--</option>");
+ for(res in response){
+
+ if("<?php echo $user['User']['city'] ?>" == response[res].id){
+ $("#city").append("<option value="+response[res].id+" selected>"+response[res].cname+"</option>");
+ }
+ else
+ $("#city").append("<option value="+response[res].id+">"+response[res].cname+"</option>");
+ }
+ }
+
+ $("#state").change(
+ function(e){
+ if($(this).val()!=0){
+ data = {state_id:$(this).val()};
+ $.post("<?= $url ?>",data,showTheOption,"JSON");
+ }
+ }
+ );
+
+ function showTheOption(response){
+ $("#city").empty().append("<option value='0'>--Pilih Kota--</option>");
+ for(res in response){
+ $("#city").append("<option value="+response[res].id+">"+response[res].cname+"</option>");
+ }
+ }
+
+ $("#edit-form").submit(
+ function(event){
+ event.preventDefault();
+ $("#signup-button").hide("fast").after("<div class='central-div' style='text-align:center'>Loading...</div>");
+ $.post('<?php echo $editUrl; ?>',$(this).serializeArray(),handleSignUp,"JSON");
+ }
+ );
+
+ function handleSignUp(response){
+ $("#signup-button").show("fast").parent().find("div").remove();
+ if(response.status == 1){
+ $("#submit-wrapper>.big-box").append("<div class='central-div' style='text-align:center'>\n\
+ Data berhasil di update.\n\
+ </div>");
+ }
+ else{
+ for(i in response.message){
+ if($("#"+i+"-error").length>=1)
+ $("#"+i+"-error").text(response.message[i]);
+ else
+ $("#"+i).after($("<div id='"+i+"-error' class='error-message'>"+response.message[i]+"</div>").fadeIn("slow"));
+ $("#"+i).removeClass("success-validation loading-validation").addClass("fail-validation");
+ }
+ }
+ }
+})();
+</script>
View
50 app/View/Users/forget_password.ctp
@@ -0,0 +1,50 @@
+<?php if(!isset($status)): ?>
+<div id="login-big-wrapper">
+ <h1>Forget Password ADDins</h1>
+ <?= $this->Session->flash(); ?>
+ <?= $this->Form->create('User',array('action'=>'forgetPassword')) ?>
+ <div id="username-wrapper" class="login-box">
+ <label>Masukan email Akun anda : </label>
+ <?= $this->Form->input('username',array('div'=>False,'label'=>False,'class'=>'registration-input big-one')); ?>
+ </div>
+ <?= $this->Form->submit('Submit',array('label'=>False,'div'=>False,'class'=>'center-element')); ?>
+ <?= $this->Form->end(); ?>
+</div>
+<?php elseif($status == 1):?>
+<div id="login-big-wrapper">
+ <?= $this->Form->create('User',array('action'=>'forgetPassword')) ?>
+ <?= $this->Form->input('id',array('type'=>'hidden','value',$user[0]['User']['id'])); ?>
+ <div id="answer-wrapper" class="login-box">
+ <label><?= $user[0]['User']['security_question'] ?></label>
+ <?= $this->Form->input('security_answer',array('div'=>False,'label'=>False,'class'=>'registration-input big-one')) ?>
+ </div>
+ <?= $this->Form->submit('Submit',array('label'=>False,'div'=>False,'class'=>'center-element')); ?>
+ <?= $this->Form->end(); ?>
+</div>
+<?php elseif($status == 2) : ?>
+<div id="login-big-wrapper">
+ <div id="password-header" class="registration-header">
+ <h1>Masukan Password Baru.</h1>
+ </div>
+ <?= $this->Form->create('User',array('action'=>'forgetPassword',"id"=>"forgetPassword")); ?>
+ <?= $this->Form->input('id',array('type'=>'hidden','value',$user['User']['id'])); ?>
+ <div class="edit-content">
+ <div class="box-box field-wrapper">
+ <label>Password Baru :</label>
+ <?= $this->Form->input('password',array('div'=>False,'label'=>False,'type'=>'password','class'=>'registration-input big-one got-border','placeholder'=>'password baru','id'=>'password')); ?>
+ </div>
+ <div class="box-box field-wrapper">
+ <label>Konfirmasi Password Baru :</label>
+ <?= $this->Form->input('konfirmasi_password',array('div'=>False,'label'=>False,'type'=>'password','class'=>'registration-input big-one got-border','placeholder'=>'komfirmasi password baru','id'=>'konfirmsi_password')); ?>
+ </div>
+ <div id="submit-wrapper" class="field-wrapper">
+ <div class="big-box">
+ <?= $this->Form->submit('Update Password',array('class'=>'small-one center-element','div'=>False,'id'=>'signup-button','label'=>False)); ?>
+ </div>
+ </div>
+ </div>
+ <?= $this->Form->end(); ?>
+</div>
+<?php else: ?>
+<div id='success-register' class='center-element'>Email Re-Akfifasi Akun Anda telah kirim. Silahkan aktifasi akun anda kembali.</div>
+<?php endif; ?>
View
128 app/View/Users/iklan.ctp
@@ -0,0 +1,128 @@
+<!-- Login & Register Block -->
+<div id="content-inside" class="margin-top-bottom">
+<?php if($this->paginator->current()<=1): ?>
+ <?php if($loggedInUser==null): ?>
+ <div class="Ads-box box-shadow" id="first-element" as="first-element">
+ <h2 class="header">Untuk Menambahkan Iklan, Silakan</h2>
+ <h2>Login</h2>
+ <?= $this->Form->create('User',array('action'=>'login','id'=>'login-form'));?>
+ <?= $this->Form->input('username',array('div'=>False,'label'=>False,'class'=>'small-input got-border','placeholder'=>'username')) ?>
+ <?= $this->Form->input('password',array('div'=>False,'label'=>False,'class'=>'small-input got-border','placeholder'=>'password','type'=>'password'))?>
+ <?= $this->Form->submit('Login',array('div'=>False,'label'=>False,'class'=>'center-element')); ?>
+ <?= $this->Form->end(); ?>
+ <h3>atau</h3>
+ <?= $this->Html->link('Register',array('controller'=>'Users','action'=>'register'),array('class'=>'register-button')) ?>
+ </div>
+ <?php else: ?>
+ <div class="Ads-box box-shadow" id="first-element" as="first-element">
+ <div id="Ads-image" class="Ads-image">
+ <?= $this->Html->image('plus.jpg',array('class'=>'Ads-image','default'=>"")) ?>
+ </div>
+ <?= $this->Form->create('Ad',array('action'=>'add','enctype'=>'multipart/form-data','id'=>'ads-add-form')); ?>
+ <div id="file-row" class="ads-add">
+ <div class="browse">Cari Gambar</div>
+ <?= $this->Form->file('image',array('class'=>'file-box','id'=>'image')); ?>
+ </div>
+ <div id="ads-title" class="ads-add">
+ <?= $this->Form->input('ads_title',array('class'=>'small-input got-border no-margin','div'=>False,'label'=>False,'placeholder'=>'Judul Iklan','id'=>'ads_title')); ?>
+ </div>
+ <div id="kategori" class="ads-add">
+ <?= $this->Form->input('category_id',array('class'=>'small-select got-border no-margin','div'=>False,'label'=>False,'placeholder'=>'Kategori','options'=>$kategori,'id'=>'category_id')); ?>
+ </div>
+ <div id="dekripsi" class="ads-add">
+ <?= $this->Form->input('ads_body',array('class'=>'small-input got-border no-margin small-text','div'=>False,'label'=>False,'placeholder'=>'Deskripsi iklan dalam 300 huruf','maxlength'=>'300','id'=>'ads_body'));?>
+ </div>
+ <?= $this->Form->submit('Tambahkan', array('div'=>False,'label'=>False,'class'=>'center-element')); ?>
+ <?= $this->Form->end() ?>
+ </div>
+ <?php endif; ?>
+<?php endif; ?>
+<?php foreach($ads as $ad):?>
+ <div class="Ads-box box-shadow">
+ <div class="Ads-image">
+ <?= $this->Html->image('../files/'.$ad['Ad']['image'],array('class'=>'Ads-image')) ?>
+ </div>
+ <div class="Ads-content">
+ <h2><?= $ad['Ad']['ads_title'] ?></h2>
+ <p><?= $ad['Ad']['ads_body'] ?></p>
+ </div>
+ <div class="Ads-contact">
+ <strong>C : <?= $ad['User']['first_name']." ".$ad['User']['last_name'] ?> <br/> +62<?= $ad['User']['handphone'] ?> </strong>
+ </div>
+ <?php if($loggedInUser['id'] == $ad['User']['id']): ?>
+ <div class="menu-ads">
+ <?= $this->Html->link('hapus',array("controller"=>"ads","action"=>"delete"),array('class'=>'delete-link','aid'=>hash("sha256",rand(1000000,1000000000000000000000000000000000)),'ad'=>$ad['Ad']['id'])); ?>
+ |
+ <?= $this->Html->link('edit',array("controller"=>"ads","action"=>"edit"),array('class'=>'edit-link','aid'=>hash("sha256",rand(1000000,1000000000000000000000000000000000)),'ad'=>$ad['Ad']['id'])); ?>
+ </div>
+ <?php endif; ?>
+ </div>
+<?php endforeach; ?>
+</div>
+<div id="page-nav" style="position: relative;display:none;">
+ <?php echo $this->paginator->numbers(); ?>
+</div>
+<?= $this->Html->script('jquery.ads-add'); ?>
+<?= $this->Html->script('jquery.edit.delete'); ?>
+<script>
+
+ $(document).ready(function(){$(".active-menu-item").removeClass("active-menu-item");$("#iklan").addClass("active-menu-item")});
+
+ $('#content-inside').masonry({
+ itemSelector: '.Ads-box'
+ });
+
+ $("#content-inside").infinitescroll({
+ navSelector : '#page-nav', // selector for the paged navigation
+ nextSelector : '#page-nav a', // selector for the NEXT link (to page 2)
+ itemSelector : '.Ads-box', // selector for all items you'll retrieve
+ loading: {
+ finishedMsg: 'No more pages to load.',
+ img: 'http://i.imgur.com/6RMhx.gif'
+ }
+ },
+ function( newElements ) {
+ $elem = $(newElements);
+ $elem.find('.delete-link').click(function(e){
+ e.preventDefault();
+ if(window.confirm("Apakah anda yakin ingin menghapus iklan ini?")){
+ $(this).parent().parent().addClass('delete-mark');
+ $.post($(this).attr("href"),{id:$(this).attr("ad")},handleDelete,"JSON");
+ }
+ });
+
+ function handleDelete(response){
+ if(response.status == 1){
+ $(".delete-mark").fadeOut("fast").remove();
+ $('#content-inside').masonry('reload');
+ }
+ else{
+ alert("Penghapusan Iklan gagal. Silahkan refresh halaman ini");
+ }
+ }
+ $elem.find(".edit-link").click(function(e){
+ e.preventDefault();
+ $(this).parent().parent().addClass('edit-mark');
+ $.post($(this).attr('href'),{id:$(this).attr('ad')},handleEdit,"HTML");
+ });
+
+ function handleEdit(response){
+ $("#container").after($(response));
+ }
+ $("#content-inside").masonry('appended',$elem,true);
+
+ }
+ );
+</script>
+<style>
+ #infscr-loading{
+ position:absolute;
+ bottom:10px;
+ left:50%;
+ margin-left:-100px;
+ width:200px;
+ text-align: center;
+ }
+</style>
+<!-- End of Block -->
+
View
0  app/View/Users/login.ctp 100755 → 100644
File mode changed
View
56 app/View/Users/password.ctp
@@ -0,0 +1,56 @@
+<div id="content-inside" class="got-margin">
+ <div id="password-header" class="registration-header">
+ <h1>Ubah Password</h1>
+ </div>
+ <?= $this->Form->create('User',array('action'=>'change',"id"=>"edit_password")); ?>
+ <div class="edit-content">
+ <div class="box-box field-wrapper">
+ <label>Password lama :</label>
+ <?= $this->Form->input('old_password',array('div'=>False,'label'=>False,'type'=>'password','class'=>'registration-input big-one got-border','placeholder'=>'password lama','id'=>'old_password')); ?>
+ </div>
+ <div class="box-box field-wrapper">
+ <label>Password Baru :</label>
+ <?= $this->Form->input('password',array('div'=>False,'label'=>False,'type'=>'password','class'=>'registration-input big-one got-border','placeholder'=>'password baru','id'=>'password')); ?>
+ </div>
+ <div class="box-box field-wrapper">
+ <label>Konfirmasi Password Baru :</label>
+ <?= $this->Form->input('konfirmasi_password',array('div'=>False,'label'=>False,'type'=>'password','class'=>'registration-input big-one got-border','placeholder'=>'komfirmasi password baru','id'=>'konfirmsi_password')); ?>
+ </div>
+ <div id="submit-wrapper" class="field-wrapper">
+ <div class="big-box">
+ <?= $this->Form->submit('Update Password',array('class'=>'small-one center-element','div'=>False,'id'=>'signup-button','label'=>False)); ?>
+ </div>
+ </div>
+ </div>
+</div>
+<?php $url = Router::url(array("controller"=>"users","action"=>"change")); ?>
+<script>
+ $(document).ready(function(e){
+ $(".active-menu-item").removeClass("active-menu-item");
+ $("#profil-button").addClass("active-menu-item");
+ });
+
+ $("#edit_password").submit(function(e){
+ e.preventDefault();
+ $.post('<?php echo $url; ?>',$(this).serializeArray(),handleChangePassword,"JSON");
+ });
+
+ function handleChangePassword(response){
+ if(response.status == 1){
+ $(".error-message").remove();
+ $("#submit-wrapper>.big-box").append("<div class='central-div' style='text-align:center'>\n\
+ Data berhasil di update.\n\
+ </div>");
+ }
+ else{
+ for(i in response.message){
+ if($("#"+i+"-error").length>=1)
+ $("#"+i+"-error").text(response.message[i]);
+ else{
+ $("#"+i).after($("<div id='"+i+"-error' class='error-message'>"+response.message[i]+"</div>").fadeIn("slow"));
+ $("#"+i).removeClass("success-validation loading-validation").addClass("fail-validation");
+ }
+ }
+ }
+ }
+</script>
View
2  app/View/Users/register.ctp 100755 → 100644
@@ -1,5 +1,5 @@
<div id="registration-wrapper">
- <div id="registration-header">
+ <div class="registration-header">
<h1>Mendaftar</h1>
<h2>Dapatkan kesempatan untuk beriklan di ADDins</h2>
</div>
View
0  app/index.php 100755 → 100644
File mode changed
View
2  app/tmp/cache/models/myapp_cake_model_default__addins_ads
@@ -1,2 +1,2 @@
-1361341905
+1361855897
a:10:{s:2:"id";a:5:{s:4:"type";s:7:"integer";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:10;s:3:"key";s:7:"primary";}s:9:"ads_title";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:40;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:8:"ads_body";a:6:{s:4:"type";s:4:"text";s:4:"null";b:0;s:7:"default";N;s:6:"length";N;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:11:"category_id";a:4:{s:4:"type";s:7:"integer";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:4;}s:7:"user_id";a:4:{s:4:"type";s:7:"integer";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:10;}s:7:"city_id";a:4:{s:4:"type";s:7:"integer";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:4;}s:8:"state_id";a:4:{s:4:"type";s:7:"integer";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:4;}s:10:"issue_date";a:4:{s:4:"type";s:4:"date";s:4:"null";b:0;s:7:"default";N;s:6:"length";N;}s:10:"issue_time";a:4:{s:4:"type";s:4:"time";s:4:"null";b:0;s:7:"default";N;s:6:"length";N;}s:5:"image";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:100;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}}
View
2  app/tmp/cache/models/myapp_cake_model_default__addins_categories
@@ -1,2 +1,2 @@
-1361341905
+1361855897
a:2:{s:2:"id";a:5:{s:4:"type";s:7:"integer";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:4;s:3:"key";s:7:"primary";}s:5:"cname";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:40;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}}
View
2  app/tmp/cache/models/myapp_cake_model_default__addins_cities
@@ -1,2 +1,2 @@
-1361341905
+1361855897
a:3:{s:2:"id";a:5:{s:4:"type";s:7:"integer";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:4;s:3:"key";s:7:"primary";}s:5:"cname";a:6:{s:4:"type";s:6:"string";s:4:"null";b:1;s:7:"default";N;s:6:"length";i:100;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:5:"state";a:4:{s:4:"type";s:7:"integer";s:4:"null";b:1;s:7:"default";N;s:6:"length";i:3;}}
View
2  app/tmp/cache/models/myapp_cake_model_default__addins_list
@@ -1,2 +1,2 @@
-1361341905
+1361855897
a:5:{i:0;s:3:"ads";i:1;s:10:"categories";i:2;s:6:"cities";i:3;s:6:"states";i:4;s:5:"users";}
View
2  app/tmp/cache/models/myapp_cake_model_default__addins_states
@@ -1,2 +1,2 @@
-1361341905
+1361855897
a:2:{s:2:"id";a:5:{s:4:"type";s:7:"integer";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:3;s:3:"key";s:7:"primary";}s:5:"sname";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:30;s:7:"collate";s:15:"utf8_general_ci";s:7:"charset";s:4:"utf8";}}
View
2  app/tmp/cache/models/myapp_cake_model_default__addins_users
@@ -1,2 +1,2 @@
-1361341905
+1361855897
a:14:{s:2:"id";a:5:{s:4:"type";s:7:"integer";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:10;s:3:"key";s:7:"primary";}s:10:"first_name";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:30;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:9:"last_name";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:30;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:8:"username";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:40;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:8:"password";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:40;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:13:"jenis_kelamin";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:1;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:9:"tgl_lahir";a:4:{s:4:"type";s:4:"date";s:4:"null";b:0;s:7:"default";N;s:6:"length";N;}s:6:"alamat";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:50;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:5:"state";a:4:{s:4:"type";s:7:"integer";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:4;}s:4:"city";a:4:{s:4:"type";s:7:"integer";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:4;}s:9:"handphone";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";N;s:6:"length";i:12;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:17:"security_question";a:6:{s:4:"type";s:4:"text";s:4:"null";b:0;s:7:"default";N;s:6:"length";N;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:15:"security_answer";a:6:{s:4:"type";s:4:"text";s:4:"null";b:0;s:7:"default";N;s:6:"length";N;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}s:6:"status";a:6:{s:4:"type";s:6:"string";s:4:"null";b:0;s:7:"default";s:1:"1&q