Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 30 files changed
  • 0 commit comments
  • 1 contributor
Commits on Feb 19, 2013
futura-creative finish edit-ads for now 059cdd7
Commits on Feb 20, 2013
futura-creative edit image and delete image f02ff83
Showing with 509 additions and 36 deletions.
  1. +55 −7 app/Controller/AdsController.php
  2. +4 −2 app/View/Ads/add.ctp
  3. +82 −0 app/View/Ads/edit.ctp
  4. +9 −0 app/View/Ads/index.ctp
  5. +4 −2 app/View/Ads/refresh.ctp
  6. +13 −2 app/View/Ads/search.ctp
  7. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_ads
  8. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_categories
  9. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_cities
  10. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_list
  11. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_states
  12. +1 −1  app/tmp/cache/models/myapp_cake_model_default__addins_users
  13. +1 −1  app/tmp/cache/persistent/myapp_cake_core_cake_dev_en-us
  14. +1 −1  app/tmp/cache/persistent/myapp_cake_core_cake_en-us
  15. +1 −1  app/tmp/cache/persistent/myapp_cake_core_default_en-us
  16. +1 −1  app/tmp/cache/persistent/myapp_cake_core_file_map
  17. +1 −1  app/tmp/cache/persistent/myapp_cake_core_method_cache
  18. +266 −0 app/tmp/logs/error.log
  19. +46 −12 app/webroot/css/addins.main.layout.style.css
  20. BIN  app/webroot/files/11.jpg
  21. BIN  app/webroot/files/2.jpg
  22. BIN  app/webroot/files/4.jpg
  23. BIN  app/webroot/files/43.jpg
  24. BIN  app/webroot/files/44.jpg
  25. BIN  app/webroot/files/47.jpg
  26. BIN  app/webroot/files/57.jpg
  27. BIN  app/webroot/img/black-bg.png
  28. BIN  app/webroot/img/close.png
  29. +9 −0 app/webroot/js/jquery.ads-add.js
  30. +10 −0 app/webroot/js/jquery.edit.delete.js
View
62 app/Controller/AdsController.php
@@ -48,16 +48,18 @@ public function add(){
$this->request->data['Ad']['issue_date'] = date('y-m-d');
$server_current_time = time();
$this->request->data['Ad']['issue_time'] = date("H:i:s",$server_current_time);
- if($this->request->data['Ad']['image']['tmp_name']!=""){
- $this->request->data['Ad']['image'] = ($this->Ad->find('count')+1).".jpg";
- }
- else{
- $this->request->data['Ad']['image'] = 'default.jpg';
- }
+ $this->request->data['Ad']['image'] = "";
$this->Ad->set($this->request->data);
- $filePath = WWW_ROOT.DS."files".DS.$this->request->data['Ad']['image'];
if($this->Ad->validates()){
if($this->Ad->save()){
+ if($image['tmp_name']!=""){
+ $this->request->data['Ad']['image'] = $this->Ad->id.".jpg";
+ }
+ else{
+ $this->request->data['Ad']['image'] = 'default.jpg';
+ }
+ $filePath = WWW_ROOT.DS."files".DS.$this->request->data['Ad']['image'];
+ $this->Ad->updateAll(array('Ad.image'=>"'".$this->request->data['Ad']['image']."'"),array('Ad.id'=>$this->Ad->id));
if($image!=null)move_uploaded_file($image['tmp_name'],$filePath);
$this->set('ads',$this->Ad->findById($this->Ad->id));
$this->set('user',$this->Auth->user());
@@ -118,6 +120,11 @@ public function delete(){
$id = $this->request->data['id'];
$this->autoRender = False;
$this->autoLayout = False;
+ $ads = $this->Ad->findById($id);
+ if($ads['Ad']['image']!="default.jpg"){
+ $filePath = WWW_ROOT.DS."files".DS.$id.".jpg";
+ unlink($filePath);
+ }
if($this->Ad->delete($id)){
$message = array("status"=>1);
echo json_encode($message);
@@ -128,6 +135,47 @@ public function delete(){
}
}
}
+
+ public function edit(){
+ if($this->request->isAjax()){
+ $this->autoLayout = False;
+ $this->autoRender = False;
+ if(isset($this->request->data['Ad'])){
+ $data = array(
+ "Ad.ads_title"=>"'".$this->request->data['Ad']['ads_title']."'",
+ "Ad.category_id"=>$this->request->data['Ad']['category_id'],
+ "Ad.ads_body"=>"'".$this->request->data['Ad']['ads_body']."'"
+ );
+ $filePath = WWW_ROOT.DS."files".DS.$this->request->data['Ad']['id'].".jpg";
+ if($this->request->data['Ad']['image']['tmp_name']!=""){
+ if(file_exists($filePath)){
+ unlink($filePath);
+ }
+ move_uploaded_file($this->request->data['Ad']['image']['tmp_name'], $filePath);
+ $data["Ad.image"]="'".$this->request->data['Ad']['id'].".jpg'";
+ }
+ if($this->Ad->updateAll(
+ $data
+ ,
+ array("Ad.id"=>$this->request->data['Ad']['id'])
+ )){
+ $message = array("status"=>1);
+ $ads = $this->Ad->findById($this->request->data['Ad']['id']);
+ $message['Ad'] = $ads['Ad'];
+ echo json_encode($message);
+ }
+ else{
+ $message =array("status"=>0);
+ echo json_encode($message);
+ }
+ }
+ else{
+ $ads = $this->Ad->findById($this->request->data['id']);
+ $this->set('ads',$ads);
+ $this->render('edit');
+ }
+ }
+ }
}
?>
View
6 app/View/Ads/add.ctp
@@ -10,8 +10,10 @@
<strong>C : <?= $ads['User']['first_name']." ".$ads['User']['last_name'] ?> <br/> +62<?= $ads['User']['handphone'] ?> </strong>
</div>
<?php if($loggedInUser['id'] == $ads['User']['id']): ?>
- <div>
- <?= $this->Html->link('delete',array("controller"=>"ads","action"=>"delete"),array('class'=>'delete-link','aid'=>hash("sha256",rand(1000000,1000000000000000000000000000000000)),'ad'=>$ads['Ad']['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'=>$ads['Ad']['id'])); ?>
+ |
+ <?= $this->Html->link('edit',array("controller"=>"ads","action"=>"edit"),array('class'=>'edit-link','aid'=>hash("sha256",rand(1000000,1000000000000000000000000000000000)),'ad'=>$ads['Ad']['id'])); ?>
</div>
<?php endif; ?>
</div>
View
82 app/View/Ads/edit.ctp
@@ -0,0 +1,82 @@
+<div id="black-layer">
+ <div id="close-btn"></div>
+ <div class="Ads-box box-shadow" id="edit-box" as="first-element">
+ <div id="Ads-image-edit" class="Ads-image">
+ <?= $this->Html->image("../files/".$ads['Ad']['image'],array('class'=>'Ads-image')) ?>
+ </div>
+ <?= $this->Form->create('Ad',array('action'=>'edit','enctype'=>'multipart/form-data','id'=>'ads-edit-form')); ?>
+ <?= $this->Form->input('id',array('type'=>'hidden','value'=>$ads['Ad']['id'])); ?>
+ <div id="file-row" class="ads-add">
+ <div class="browse">Cari Gambar</div>
+ <?= $this->Form->file('image',array('class'=>'file-box','id'=>'image-edit')); ?>
+ </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','value'=>$ads['Ad']['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','default'=>$ads['Ad']['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','value'=>$ads['Ad']['ads_body']));?>
+ </div>
+ <?= $this->Form->submit('Update', array('div'=>False,'label'=>False,'class'=>'center-element')); ?>
+ <?= $this->Form->end() ?>
+ </div>
+</div>
+<script>
+ $("#image-edit").change(function(e){
+ var file = $("#image-edit")[0].files[0];
+ if(file.size <= 200000 && file.type == "image/jpeg"){
+ if (!!file.type.match(/image.*/)) {
+ if(window.FileReader){
+ reader = new FileReader();
+ reader.onloadend = function(e){
+ $("#Ads-image-edit>img")[0].src = e.target.result;
+ }
+ reader.readAsDataURL(file);
+ }
+ }
+ }
+ else{
+ alert("Tipe File atau ukuran file tidak mendukung. Max 200 kb dan Jenis File Jpeg");
+ }
+ });
+
+ $("#ads-edit-form").submit(function(e){
+ e.preventDefault();
+ var formData = new FormData($(this)[0]);
+ if (formData){
+ $.ajax({
+ url: $(this).attr("action"),
+ type: "POST",
+ data: formData,
+ processData: false,
+ contentType: false,
+ success: handleEditAds,
+ dataType : "JSON"
+ });
+ }
+ });
+
+ function handleEditAds(response){
+ if(response.status == 1){
+ $("#black-layer").remove();
+ image = $(".edit-mark>.Ads-image>img").attr("src");
+ image = image.split("/");
+ newImage = "";
+ for(var i=1;i<(image.length)-1;i++){
+ newImage +="/"+image[i];
+ }
+ newImage +="/"+response['Ad']['image'] + "?"+new Date().getTime();
+ $(".edit-mark>.Ads-image>img").attr("src",newImage);
+ $(".edit-mark>.Ads-content>h2").text(response['Ad']['ads_title']);
+ $(".edit-mark>.Ads-content>p").text(response['Ad']['ads_body']);
+ $(".edit-mark").removeClass("edit-mark");
+ }
+ else{
+ alert("Penghapusan iklan gagal. silahkan refresh halaman ini");
+ }
+ }
+
+ $("#close-btn").click(function(e){$("#black-layer").remove()});
+</script>
View
9 app/View/Ads/index.ctp
@@ -100,6 +100,15 @@
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);
}
View
6 app/View/Ads/refresh.ctp
@@ -12,8 +12,10 @@
<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>
- <?= $this->Html->link('delete',array("controller"=>"ads","action"=>"delete"),array('class'=>'delete-link','aid'=>hash("sha256",rand(1000000,1000000000000000000000000000000000)),'ad'=>$ad['Ad']['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>
View
15 app/View/Ads/search.ctp
@@ -13,8 +13,10 @@
<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>
- <?= $this->Html->link('delete',array("controller"=>"ads","action"=>"delete"),array('class'=>'delete-link','aid'=>hash("sha256",rand(1000000,1000000000000000000000000000000000)),'ad'=>$ad['Ad']['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>
@@ -60,6 +62,15 @@
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);
}
View
2  app/tmp/cache/models/myapp_cake_model_default__addins_ads
@@ -1,2 +1,2 @@
-1361254200
+1361341905
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 @@
-1361254200
+1361341905
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 @@
-1361254200
+1361341905
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 @@
-1361254200
+1361341905
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 @@
-1361254200
+1361341905
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 @@
-1361254200
+1361341905
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";s:6:"length";i:1;s:7:"collate";s:17:"latin1_swedish_ci";s:7:"charset";s:6:"latin1";}}
View
2  app/tmp/cache/persistent/myapp_cake_core_cake_dev_en-us
@@ -1,2 +1,2 @@
-1361254200
+1361341905
a:1:{s:11:"LC_MESSAGES";a:0:{}}
View
2  app/tmp/cache/persistent/myapp_cake_core_cake_en-us
@@ -1,2 +1,2 @@
-1361254200
+1361341905
a:1:{s:11:"LC_MESSAGES";a:0:{}}
View
2  app/tmp/cache/persistent/myapp_cake_core_default_en-us
@@ -1,2 +1,2 @@
-1361254124
+1361341866
a:1:{s:11:"LC_MESSAGES";a:0:{}}
View
2  app/tmp/cache/persistent/myapp_cake_core_file_map
@@ -1,2 +1,2 @@
-1361254200
+1361341905
a:60:{s:9:"Configure";s:52:"/opt/lampp/htdocs/Addins/lib/Cake/Core/Configure.php";s:4:"Hash";s:50:"/opt/lampp/htdocs/Addins/lib/Cake/Utility/Hash.php";s:5:"Cache";s:49:"/opt/lampp/htdocs/Addins/lib/Cake/Cache/Cache.php";s:10:"FileEngine";s:61:"/opt/lampp/htdocs/Addins/lib/Cake/Cache/Engine/FileEngine.php";s:11:"CacheEngine";s:55:"/opt/lampp/htdocs/Addins/lib/Cake/Cache/CacheEngine.php";s:9:"Inflector";s:55:"/opt/lampp/htdocs/Addins/lib/Cake/Utility/Inflector.php";s:12:"ErrorHandler";s:56:"/opt/lampp/htdocs/Addins/lib/Cake/Error/ErrorHandler.php";s:7:"CakeLog";s:49:"/opt/lampp/htdocs/Addins/lib/Cake/Log/CakeLog.php";s:19:"LogEngineCollection";s:61:"/opt/lampp/htdocs/Addins/lib/Cake/Log/LogEngineCollection.php";s:16:"ObjectCollection";s:62:"/opt/lampp/htdocs/Addins/lib/Cake/Utility/ObjectCollection.php";s:7:"FileLog";s:56:"/opt/lampp/htdocs/Addins/lib/Cake/Log/Engine/FileLog.php";s:7:"BaseLog";s:56:"/opt/lampp/htdocs/Addins/lib/Cake/Log/Engine/BaseLog.php";s:16:"CakeLogInterface";s:58:"/opt/lampp/htdocs/Addins/lib/Cake/Log/CakeLogInterface.php";s:8:"Debugger";s:54:"/opt/lampp/htdocs/Addins/lib/Cake/Utility/Debugger.php";s:6:"String";s:52:"/opt/lampp/htdocs/Addins/lib/Cake/Utility/String.php";s:10:"Dispatcher";s:56:"/opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php";s:17:"CakeEventListener";s:61:"/opt/lampp/htdocs/Addins/lib/Cake/Event/CakeEventListener.php";s:11:"CakeRequest";s:57:"/opt/lampp/htdocs/Addins/lib/Cake/Network/CakeRequest.php";s:12:"CakeResponse";s:58:"/opt/lampp/htdocs/Addins/lib/Cake/Network/CakeResponse.php";s:9:"CakeEvent";s:53:"/opt/lampp/htdocs/Addins/lib/Cake/Event/CakeEvent.php";s:16:"CakeEventManager";s:60:"/opt/lampp/htdocs/Addins/lib/Cake/Event/CakeEventManager.php";s:15:"AssetDispatcher";s:68:"/opt/lampp/htdocs/Addins/lib/Cake/Routing/Filter/AssetDispatcher.php";s:16:"DispatcherFilter";s:62:"/opt/lampp/htdocs/Addins/lib/Cake/Routing/DispatcherFilter.php";s:15:"CacheDispatcher";s:68:"/opt/lampp/htdocs/Addins/lib/Cake/Routing/Filter/CacheDispatcher.php";s:6:"Router";s:52:"/opt/lampp/htdocs/Addins/lib/Cake/Routing/Router.php";s:9:"CakeRoute";s:61:"/opt/lampp/htdocs/Addins/lib/Cake/Routing/Route/CakeRoute.php";s:10:"CakePlugin";s:53:"/opt/lampp/htdocs/Addins/lib/Cake/Core/CakePlugin.php";s:13:"AdsController";s:57:"/opt/lampp/htdocs/Addins/app/Controller/AdsController.php";s:13:"AppController";s:57:"/opt/lampp/htdocs/Addins/app/Controller/AppController.php";s:10:"Controller";s:59:"/opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php";s:6:"Object";s:49:"/opt/lampp/htdocs/Addins/lib/Cake/Core/Object.php";s:19:"ComponentCollection";s:68:"/opt/lampp/htdocs/Addins/lib/Cake/Controller/ComponentCollection.php";s:16:"SessionComponent";s:75:"/opt/lampp/htdocs/Addins/lib/Cake/Controller/Component/SessionComponent.php";s:9:"Component";s:58:"/opt/lampp/htdocs/Addins/lib/Cake/Controller/Component.php";s:13:"AuthComponent";s:72:"/opt/lampp/htdocs/Addins/lib/Cake/Controller/Component/AuthComponent.php";s:13:"ClassRegistry";s:59:"/opt/lampp/htdocs/Addins/lib/Cake/Utility/ClassRegistry.php";s:17:"ConnectionManager";s:61:"/opt/lampp/htdocs/Addins/lib/Cake/Model/ConnectionManager.php";s:8:"Category";s:47:"/opt/lampp/htdocs/Addins/app/Model/Category.php";s:8:"AppModel";s:47:"/opt/lampp/htdocs/Addins/app/Model/AppModel.php";s:5:"Model";s:49:"/opt/lampp/htdocs/Addins/lib/Cake/Model/Model.php";s:18:"BehaviorCollection";s:62:"/opt/lampp/htdocs/Addins/lib/Cake/Model/BehaviorCollection.php";s:5:"Mysql";s:69:"/opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/Database/Mysql.php";s:9:"DboSource";s:64:"/opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php";s:10:"DataSource";s:65:"/opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DataSource.php";s:2:"Ad";s:41:"/opt/lampp/htdocs/Addins/app/Model/Ad.php";s:5:"State";s:44:"/opt/lampp/htdocs/Addins/app/Model/State.php";s:4:"City";s:43:"/opt/lampp/htdocs/Addins/app/Model/City.php";s:4:"User";s:43:"/opt/lampp/htdocs/Addins/app/Model/User.php";s:11:"CakeSession";s:66:"/opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/CakeSession.php";s:4:"I18n";s:47:"/opt/lampp/htdocs/Addins/lib/Cake/I18n/I18n.php";s:4:"L10n";s:47:"/opt/lampp/htdocs/Addins/lib/Cake/I18n/L10n.php";s:4:"View";s:47:"/opt/lampp/htdocs/Addins/lib/Cake/View/View.php";s:16:"HelperCollection";s:59:"/opt/lampp/htdocs/Addins/lib/Cake/View/HelperCollection.php";s:9:"ViewBlock";s:52:"/opt/lampp/htdocs/Addins/lib/Cake/View/ViewBlock.php";s:10:"HtmlHelper";s:60:"/opt/lampp/htdocs/Addins/lib/Cake/View/Helper/HtmlHelper.php";s:9:"AppHelper";s:54:"/opt/lampp/htdocs/Addins/app/View/Helper/AppHelper.php";s:6:"Helper";s:49:"/opt/lampp/htdocs/Addins/lib/Cake/View/Helper.php";s:13:"SessionHelper";s:63:"/opt/lampp/htdocs/Addins/lib/Cake/View/Helper/SessionHelper.php";s:15:"PaginatorHelper";s:65:"/opt/lampp/htdocs/Addins/lib/Cake/View/Helper/PaginatorHelper.php";s:8:"JsHelper";s:58:"/opt/lampp/htdocs/Addins/lib/Cake/View/Helper/JsHelper.php";}
View
2  app/tmp/cache/persistent/myapp_cake_core_method_cache
@@ -1,2 +1,2 @@
-1361254200
+1361341905
a:2:{s:4:"name";a:48:{s:32:"24ca8045b3634ee3f146e188204d6aa7";s:8:"`Addins`";s:32:"469f0eca4934529a8ebe3db2dddf24e6";s:12:"`categories`";s:32:"eb70110d19c376647f122ba6a9a6296b";s:15:"`Category`.`id`";s:32:"f658287ff27e1a2e891a6249cfd0122d";s:18:"`Category`.`cname`";s:32:"a2c424ed9810bde62ffe8680a64a112b";s:5:"`ads`";s:32:"cc552b21b120235ea9917faf7be982c4";s:9:"`Ad`.`id`";s:32:"af339843df59e0cb3503f0b47d75592b";s:16:"`Ad`.`ads_title`";s:32:"074af4818993ebc5886213f43d06c99c";s:15:"`Ad`.`ads_body`";s:32:"0c802b0dbb31bbad6b3e93d0a72ec487";s:18:"`Ad`.`category_id`";s:32:"bb714c2473c56a92a9ec88b44cf22701";s:14:"`Ad`.`user_id`";s:32:"4aa22290cd48cd59ea0d81d83642cb9f";s:14:"`Ad`.`city_id`";s:32:"1edd68810706479cf27708f242679db4";s:15:"`Ad`.`state_id`";s:32:"6dcc480d811a42a336f1c1dccb5f1446";s:17:"`Ad`.`issue_date`";s:32:"6df51a3442928c9cd4ce1c3eb422702b";s:17:"`Ad`.`issue_time`";s:32:"13acc48ef1c50eb9025b7f8caadf1e23";s:12:"`Ad`.`image`";s:32:"c3fc0249547957de0b5fccf90ce24cc5";s:4:"`Ad`";s:32:"895ec6f91cf00656056af226532e8e27";s:10:"`Category`";s:32:"f898dee5e0ba525ecbaffaa21fd45ca6";s:8:"`states`";s:32:"a8dcdd107176e0bff6b2c0cf3a9ee017";s:12:"`State`.`id`";s:32:"edfe10b4e934001ccebfc8ff7c4fbc1e";s:15:"`State`.`sname`";s:32:"cb8e9149a3ea2470e6c83205a54301c2";s:8:"`cities`";s:32:"e87e3f6bf6da6e7a7603c45c226873d9";s:11:"`city`.`id`";s:32:"0cdfd9cffc57889f6654b1daeb160e79";s:14:"`city`.`cname`";s:32:"ad1fd3c698e6fad291f569f23276ceee";s:14:"`city`.`state`";s:32:"8875b7176dae20f4d36795197b12bfdb";s:6:"`city`";s:32:"f94a437fb7858e092079378f93ef2c71";s:7:"`users`";s:32:"84aed5ca7734df237971a8964bd0217a";s:11:"`User`.`id`";s:32:"f31b09fae7200dfc89ccc15231d19899";s:19:"`User`.`first_name`";s:32:"1f06cca51d67259108baa9a6977b3df6";s:18:"`User`.`last_name`";s:32:"441e6eaad1b5f34da125c63e3ecd7702";s:17:"`User`.`username`";s:32:"46bea0d8cb0ffa1c5c7f63ad1e39035b";s:17:"`User`.`password`";s:32:"26dc1b09b65762ed89eb69f61536ce1e";s:22:"`User`.`jenis_kelamin`";s:32:"be7a1da3dcd8ec616f213f01d24854e0";s:18:"`User`.`tgl_lahir`";s:32:"88b5b7848abcb6e9d5990a3860c92a83";s:15:"`User`.`alamat`";s:32:"c3500963b805f6d38a3f1127ff2b79f8";s:14:"`User`.`state`";s:32:"920a58a8c9ecb399dff4f23749d1735d";s:13:"`User`.`city`";s:32:"887cd713fae18e7cf393c54de93e5404";s:18:"`User`.`handphone`";s:32:"1d5d7b39e0ffcdb668a858bee280ebe2";s:26:"`User`.`security_question`";s:32:"b906cc5e5c81eecf1d1a2eb19433eec6";s:24:"`User`.`security_answer`";s:32:"c3166f52a27d4d42189834333694a26c";s:15:"`User`.`status`";s:32:"eb9b37fa6fe3e5c49f921ddcd721b306";s:6:"`User`";s:32:"1516ecedeaf5e9ac02379dd2c54554a3";s:7:"`State`";s:32:"e65dfdabcb8ecb35fa83c08d5e95cb12";s:11:"`City`.`id`";s:32:"196ac1e3908e8c254ca52c68215dd705";s:14:"`City`.`cname`";s:32:"3a781d1f730b40e4b9bd0334f383ac65";s:14:"`City`.`state`";s:32:"8bab32467ac128f081d25c8d46f77f0b";s:6:"`City`";s:32:"9d5961de28a8b513b5a58b5df99955eb";s:12:"`issue_time`";s:32:"e32dccd995f682482d27a16bf18e7db1";s:12:"`issue_date`";}s:6:"fields";a:15:{s:32:"6e36b031383131ff745f9393007215ac";a:2:{i:0;s:15:"`Category`.`id`";i:1;s:18:"`Category`.`cname`";}s:32:"bb4681ba7fdc0468c2a4d01937b47910";a:1:{i:0;s:15:"`Category`.`id`";}s:32:"705d4ebd99197ff68cbfcd10b4eccab7";a:10:{i:0;s:9:"`Ad`.`id`";i:1;s:16:"`Ad`.`ads_title`";i:2;s:15:"`Ad`.`ads_body`";i:3;s:18:"`Ad`.`category_id`";i:4;s:14:"`Ad`.`user_id`";i:5;s:14:"`Ad`.`city_id`";i:6;s:15:"`Ad`.`state_id`";i:7;s:17:"`Ad`.`issue_date`";i:8;s:17:"`Ad`.`issue_time`";i:9;s:12:"`Ad`.`image`";}s:32:"d63a0bfb40f45cabb81828f901128c78";a:1:{i:0;s:18:"`Ad`.`category_id`";}s:32:"088bc8730b81d3fdc61eba3b20009485";a:2:{i:0;s:12:"`State`.`id`";i:1;s:15:"`State`.`sname`";}s:32:"3e8be79dd5e776051426982c78a773ba";a:1:{i:0;s:12:"`State`.`id`";}s:32:"3fb45186ddfa481b9eb5a8f3a3c6bdd9";a:3:{i:0;s:11:"`city`.`id`";i:1;s:14:"`city`.`cname`";i:2;s:14:"`city`.`state`";}s:32:"d85687292eed9d268d3b71da098e46d5";a:1:{i:0;s:14:"`city`.`state`";}s:32:"bb4606589a5e1b0548a0f21126eeb909";a:14:{i:0;s:11:"`User`.`id`";i:1;s:19:"`User`.`first_name`";i:2;s:18:"`User`.`last_name`";i:3;s:17:"`User`.`username`";i:4;s:17:"`User`.`password`";i:5;s:22:"`User`.`jenis_kelamin`";i:6;s:18:"`User`.`tgl_lahir`";i:7;s:15:"`User`.`alamat`";i:8;s:14:"`User`.`state`";i:9;s:13:"`User`.`city`";i:10;s:18:"`User`.`handphone`";i:11;s:26:"`User`.`security_question`";i:12;s:24:"`User`.`security_answer`";i:13;s:15:"`User`.`status`";}s:32:"70d1b21fe59c8aba7df3652586afd110";a:1:{i:0;s:14:"`User`.`state`";}s:32:"b10ac7348899262afb2f7f409d7394a6";a:1:{i:0;s:15:"`Ad`.`state_id`";}s:32:"c77b74729ada102d300de66dc91d94ea";a:10:{i:0;s:9:"`Ad`.`id`";i:1;s:16:"`Ad`.`ads_title`";i:2;s:15:"`Ad`.`ads_body`";i:3;s:18:"`Ad`.`category_id`";i:4;s:14:"`Ad`.`user_id`";i:5;s:14:"`Ad`.`city_id`";i:6;s:15:"`Ad`.`state_id`";i:7;s:17:"`Ad`.`issue_date`";i:8;s:17:"`Ad`.`issue_time`";i:9;s:12:"`Ad`.`image`";}s:32:"ef5ccf2374f2c92366666eff569949d4";a:2:{i:0;s:12:"`State`.`id`";i:1;s:15:"`State`.`sname`";}s:32:"c2650fd5459426f23409f26f5b6df901";a:3:{i:0;s:11:"`City`.`id`";i:1;s:14:"`City`.`cname`";i:2;s:14:"`City`.`state`";}s:32:"0cf03b0ebbe8742a4ef680027b4001cd";a:2:{i:0;s:15:"`Category`.`id`";i:1;s:18:"`Category`.`cname`";}}}
View
266 app/tmp/logs/error.log 100644 → 100755
@@ -669,3 +669,269 @@ Stack Trace:
#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#7 {main}
+2013-02-19 07:11:33 Error: [NotFoundException] Not Found
+Request URL: /Addins/ads/index/page:5
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(36): Controller->paginate('Ad')
+#2 [internal function]: AdsController->index()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 07:13:58 Error: [NotFoundException] Not Found
+Request URL: /Addins/ads/index/page:5
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(36): Controller->paginate('Ad')
+#2 [internal function]: AdsController->index()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 13:25:13 Error: [NotFoundException] Not Found
+Request URL: /Addins/ads/index/page:5
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(36): Controller->paginate('Ad')
+#2 [internal function]: AdsController->index()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 13:55:39 Error: [MissingActionException] Action AdsController::edit() could not be found.
+Exception Attributes: array (
+ 'controller' => 'AdsController',
+ 'action' => 'edit',
+)
+Request URL: /Addins/ads/edit
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#1 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#2 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#3 {main}
+2013-02-19 14:23:03 Error: [NotFoundException] Not Found
+Request URL: /Addins/Ads/index/page:4
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(36): Controller->paginate('Ad')
+#2 [internal function]: AdsController->index()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 14:28:39 Error: [NotFoundException] Not Found
+Request URL: /Addins/Ads/index/page:4
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(36): Controller->paginate('Ad')
+#2 [internal function]: AdsController->index()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 14:29:23 Error: [NotFoundException] Not Found
+Request URL: /Addins/Ads/index/page:4
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(36): Controller->paginate('Ad')
+#2 [internal function]: AdsController->index()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 14:31:50 Error: [NotFoundException] Not Found
+Request URL: /Addins/Ads/index/page:4
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(36): Controller->paginate('Ad')
+#2 [internal function]: AdsController->index()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 14:34:12 Error: [NotFoundException] Not Found
+Request URL: /Addins/Ads/index/page:4
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(36): Controller->paginate('Ad')
+#2 [internal function]: AdsController->index()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 14:53:50 Error: [MissingControllerException] Controller class ImgController could not be found.
+Exception Attributes: array (
+ 'class' => 'ImgController',
+ 'plugin' => NULL,
+)
+Request URL: /Addins/img/default.jpg
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#1 {main}
+2013-02-19 14:54:08 Error: [MissingControllerException] Controller class ImgController could not be found.
+Exception Attributes: array (
+ 'class' => 'ImgController',
+ 'plugin' => NULL,
+)
+Request URL: /Addins/img/default.jpg
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#1 {main}
+2013-02-19 15:19:38 Error: [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Array' in 'where clause'
+Request URL: /Addins/ads/edit
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(459): PDOStatement->execute(Array)
+#1 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(425): DboSource->_execute('SELECT `Ad`.`id...', Array)
+#2 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(669): DboSource->execute('SELECT `Ad`.`id...', Array, Array)
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(1080): DboSource->fetchAll('SELECT `Ad`.`id...', false)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Model/Model.php(2674): DboSource->read(Object(Ad), Array)
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(598): Model->find('first', Array)
+#6 /opt/lampp/htdocs/Addins/lib/Cake/Model/Model.php(799): DboSource->query('findById', Array, Object(Ad))
+#7 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(147): Model->__call('findById', Array)
+#8 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(147): Ad->findById(Array)
+#9 [internal function]: AdsController->edit()
+#10 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#11 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#12 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#13 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#14 {main}
+2013-02-19 15:21:39 Error: [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Array' in 'where clause'
+Request URL: /Addins/ads/edit
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(459): PDOStatement->execute(Array)
+#1 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(425): DboSource->_execute('SELECT `Ad`.`id...', Array)
+#2 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(669): DboSource->execute('SELECT `Ad`.`id...', Array, Array)
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(1080): DboSource->fetchAll('SELECT `Ad`.`id...', false)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Model/Model.php(2674): DboSource->read(Object(Ad), Array)
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(598): Model->find('first', Array)
+#6 /opt/lampp/htdocs/Addins/lib/Cake/Model/Model.php(799): DboSource->query('findById', Array, Object(Ad))
+#7 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(147): Model->__call('findById', Array)
+#8 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(147): Ad->findById(Array)
+#9 [internal function]: AdsController->edit()
+#10 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#11 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#12 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#13 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#14 {main}
+2013-02-19 15:23:42 Error: [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'dfadf df sadfsa WHERE `Ad`.`id` = 47' at line 1
+Request URL: /Addins/ads/edit
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(459): PDOStatement->execute(Array)
+#1 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/DboSource.php(425): DboSource->_execute('UPDATE `Addins`...', Array)
+#2 /opt/lampp/htdocs/Addins/lib/Cake/Model/Datasource/Database/Mysql.php(378): DboSource->execute('UPDATE `Addins`...')
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Model/Model.php(2370): Mysql->update(Object(Ad), Array, NULL, Array)
+#4 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(144): Model->updateAll(Array, Array)
+#5 [internal function]: AdsController->edit()
+#6 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#7 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#8 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#9 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#10 {main}
+2013-02-19 15:48:24 Error: [NotFoundException] Not Found
+Request URL: /Addins/Ads/index/page:4
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(36): Controller->paginate('Ad')
+#2 [internal function]: AdsController->index()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 15:50:38 Error: [NotFoundException] Not Found
+Request URL: /Addins/Ads/index/page:4
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(36): Controller->paginate('Ad')
+#2 [internal function]: AdsController->index()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 15:51:18 Error: [NotFoundException] Not Found
+Request URL: /Addins/ads/search/page:4
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(108): Controller->paginate('Ad')
+#2 [internal function]: AdsController->search()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 15:54:45 Error: [MissingActionException] Action AdsController::ads() could not be found.
+Exception Attributes: array (
+ 'controller' => 'AdsController',
+ 'action' => 'ads',
+)
+Request URL: /Addins/ads/ads/edit
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#1 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#2 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#3 {main}
+2013-02-19 15:54:47 Error: [MissingActionException] Action AdsController::ads() could not be found.
+Exception Attributes: array (
+ 'controller' => 'AdsController',
+ 'action' => 'ads',
+)
+Request URL: /Addins/ads/ads/edit
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#1 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#2 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#3 {main}
+2013-02-19 15:54:57 Error: [MissingActionException] Action AdsController::ads() could not be found.
+Exception Attributes: array (
+ 'controller' => 'AdsController',
+ 'action' => 'ads',
+)
+Request URL: /Addins/ads/ads/edit
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#1 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#2 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#3 {main}
+2013-02-19 15:55:37 Error: [MissingActionException] Action AdsController::ads() could not be found.
+Exception Attributes: array (
+ 'controller' => 'AdsController',
+ 'action' => 'ads',
+)
+Request URL: /Addins/ads/ads/edit
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#1 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#2 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#3 {main}
+2013-02-19 16:00:25 Error: [NotFoundException] Not Found
+Request URL: /Addins/ads/search/page:4
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(108): Controller->paginate('Ad')
+#2 [internal function]: AdsController->search()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
+2013-02-19 16:02:57 Error: [NotFoundException] Not Found
+Request URL: /Addins/ads/search/page:4
+Stack Trace:
+#0 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(1073): PaginatorComponent->paginate('Ad', Array, Array)
+#1 /opt/lampp/htdocs/Addins/app/Controller/AdsController.php(108): Controller->paginate('Ad')
+#2 [internal function]: AdsController->search()
+#3 /opt/lampp/htdocs/Addins/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(AdsController), Array)
+#4 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(186): Controller->invokeAction(Object(CakeRequest))
+#5 /opt/lampp/htdocs/Addins/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(AdsController), Object(CakeRequest), Object(CakeResponse))
+#6 /opt/lampp/htdocs/Addins/app/webroot/index.php(97): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
+#7 {main}
View
58 app/webroot/css/addins.main.layout.style.css
@@ -323,16 +323,7 @@ select option{
width: 172px;
}
- .register-button{
- background:#555;
- display:block;
- padding:5px;
- border:solid thin #454546;
- color: #ffffff;
- text-align: center;
- margin:5px auto;
- text-decoration: none;
- }
+
.ads-add{
@@ -376,10 +367,21 @@ select option{
text-align:center;
}
- .Ads-box a{
- color:#555;
+ .Ads-box div a{
+ color:#555 !important;
text-transform: capitalize;
}
+
+ .register-button{
+ background:#555;
+ display:block;
+ padding:5px;
+ border:solid thin #454546;
+ color: #ffffff;
+ text-align: center;
+ margin:5px auto;
+ text-decoration: none;
+ }
/** --- End of Block --- **/
/** --- Registration & Login --- **/
#registration-wrapper{
@@ -527,6 +529,38 @@ select option{
/** --- End of Block --- **/
/** -- End of Block -- **/
+/** -- Edit Block -- **/
+
+#black-layer{
+ position: fixed;
+ background:url("../img/black-bg.png");
+ top:0px;
+ left:0px;
+ width: 100%;
+ height: 100%;
+ z-index:1001;
+}
+
+#close-btn{
+ position:fixed;
+ top:5px;
+ right:5px;
+ background:url("../img/close.png");
+ background-size: 30px;
+ width: 30px;
+ height: 30px;
+ cursor: pointer;
+}
+
+#edit-box{
+ position:fixed;
+ top:10%;
+ left:50%;
+ margin-left:-90px;
+}
+
+/** -- End of Block -- **/
+
/** -- Footer Block -- **/
#footer{
position:relative;
View
BIN  app/webroot/files/11.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/webroot/files/2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/webroot/files/4.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/webroot/files/43.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/webroot/files/44.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/webroot/files/47.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/webroot/files/57.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/webroot/img/black-bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  app/webroot/img/close.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
9 app/webroot/js/jquery.ads-add.js
@@ -63,6 +63,15 @@
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));
+ }
$("div[as='first-element']").after(elem);
$('#content-inside').masonry('reload');
$("#ads-add-form input[type='text'], #ads-add-form textarea, #ads-add-form input[type='file']").val("");
View
10 app/webroot/js/jquery.edit.delete.js
@@ -16,4 +16,14 @@
alert("Penghapusan Iklan gagal. Silahkan refresh halaman ini");
}
}
+
+ $(".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));
+ }
})();

No commit comments for this range

Something went wrong with that request. Please try again.