Skip to content

Commit

Permalink
General Update 6-2
Browse files Browse the repository at this point in the history
Comment lines cleared.
  • Loading branch information
jolyjokerz committed Mar 14, 2015
1 parent 6d5dd8c commit a0a2de0
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 58 deletions.
12 changes: 6 additions & 6 deletions application/controllers/admin/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public function Add(){


if($_POST){
$add = false;
//$add = $this->category_model->add($_POST);

$add = $this->category_model->add($_POST);
if($add){
$this->session->set_flashdata('action_message', 'New Category added!');
$this->session->set_flashdata('action_message_type', 'success');
Expand Down Expand Up @@ -98,8 +98,8 @@ public function update(){
$this->load->model('admin/category_model');

if($_POST){
$update = false;
//$update = $this->category_model->update($this->uri->segment(4), $_POST);
$update = $this->category_model->update($this->uri->segment(4), $_POST);
if($update){
$this->session->set_flashdata('action_message', 'Category updated!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -116,8 +116,8 @@ public function delete(){
$this->load->model('admin/category_model');

if(intval($this->uri->segment(4)) > 0){
$delete = false;
//$delete = $this->category_model->delete($this->uri->segment(4));
$delete = $this->category_model->delete($this->uri->segment(4));
if($delete){
$this->session->set_flashdata('action_message', 'Category deleted!');
$this->session->set_flashdata('action_message_type', 'success');
Expand Down
9 changes: 3 additions & 6 deletions application/controllers/admin/currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ public function Add(){
$this->load->model('admin/currency_model');

if($_POST){
$add = false;
//$add = $this->currency_model->add($_POST);
$add = $this->currency_model->add($_POST);
if($add){
$this->session->set_flashdata('action_message', 'New Currency added!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -69,8 +68,7 @@ public function update(){
$this->load->model('admin/currency_model');

if($_POST){
$update = false;
//$update = $this->currency_model->update($this->uri->segment(4), $_POST);
$update = $this->currency_model->update($this->uri->segment(4), $_POST);
if($update){
$this->session->set_flashdata('action_message', 'Currency updated!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -89,8 +87,7 @@ public function delete(){
$this->load->model('admin/currency_model');


$delete = false;
//$delete = $this->currency_model->delete($this->uri->segment(4));
$delete = $this->currency_model->delete($this->uri->segment(4));
if($delete){
$this->session->set_flashdata('action_message', 'Currency deleted!');
$this->session->set_flashdata('action_message_type', 'success');
Expand Down
11 changes: 5 additions & 6 deletions application/controllers/admin/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public function add(){
$this->load->model('admin/module_model');

if($_POST){
$add = false;
//$add = $this->module_model->add($_POST);

$add = $this->module_model->add($_POST);
if($add){
$this->session->set_flashdata('action_message', 'New Module added!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -61,8 +61,8 @@ public function detail(){
$this->load->model('admin/module_model');

if($_POST){
$update = false;
//$update = $this->module_model->update($_POST);

$update = $this->module_model->update($_POST);
if($update){
$this->session->set_flashdata('action_message', 'Module updated!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -84,8 +84,7 @@ public function detail(){
public function delete(){
$this->load->model('admin/module_model');

$delete = false;
//$delete = $this->module_model->delete($this->uri->segment(4));
$delete = $this->module_model->delete($this->uri->segment(4));
if($delete){
$this->session->set_flashdata('action_message', 'Module deleted!');
$this->session->set_flashdata('action_message_type', 'success');
Expand Down
23 changes: 9 additions & 14 deletions application/controllers/admin/option.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ public function add(){
$data["options"] = $this->option_model->get_option_list();

if($_POST){
$add = false;
//$add = $this->option_model->add_new_option($_POST);
$add = $this->option_model->add_new_option($_POST);
if($add){
$this->session->set_flashdata('action_message', 'New option added!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -74,8 +73,8 @@ public function add_new_value(){
$data["option_id"] = $this->uri->segment(4);

if($_POST){
$add_value = false;
//$add_value = $this->option_model->add_new_value($_POST);

$add_value = $this->option_model->add_new_value($_POST);
if($add_value){
$this->session->set_flashdata('action_message', 'New option value added!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -94,8 +93,7 @@ public function add_new_value(){
public function delete(){
$this->load->model('admin/option_model');

$delete_option = false;
//$delete_option = $this->option_model->delete_option($this->uri->segment(4));
$delete_option = $this->option_model->delete_option($this->uri->segment(4));
if($delete_option){
$this->session->set_flashdata('action_message', 'Option deleted!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -112,8 +110,8 @@ public function value_update(){
$this->load->model('admin/option_model');

if($_POST){
$update_value = false;
//$update_value = $this->option_model->value_update($_POST);

$update_value = $this->option_model->value_update($_POST);
if($update_value){
$this->session->set_flashdata('action_message', 'Option value updated!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -130,11 +128,10 @@ public function value_update(){

public function add_value(){
$this->load->model('admin/product_option_model');


if($_POST){
$add_value_next = false;
//$add_value_next = $this->product_option_model->add_new_value($_POST);

$add_value_next = $this->product_option_model->add_new_value($_POST);
if($add_value_next){
$this->session->set_flashdata('action_message', 'New option value added!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -152,9 +149,7 @@ public function add_value(){
public function delete_value(){
$this->load->model('admin/product_option_model');


$delete_value = false;
//$delete_value = $this->product_option_model->delete_value($this->uri->segment(4));
$delete_value = $this->product_option_model->delete_value($this->uri->segment(4));
if($delete_value){
$this->session->set_flashdata('action_message', 'Value deleted!');
$this->session->set_flashdata('action_message_type', 'success');
Expand Down
9 changes: 3 additions & 6 deletions application/controllers/admin/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public function detail(){
$this->load->model('admin/order_model');

if($_POST){
$update_comment = false;
//$update_comment = $update = $this->order_model->update_comment($_POST);
$update_comment = $update = $this->order_model->update_comment($_POST);
if($update_comment){
$this->session->set_flashdata('action_message', 'Order comment updated!');
$this->session->set_flashdata('action_message_type', 'success');
Expand Down Expand Up @@ -75,8 +74,7 @@ public function product_add(){
$this->load->model('admin/order_model');

if($_POST){
$add_product = false;
//$add_product = $this->order_model->productadd($_POST);
$add_product = $this->order_model->productadd($_POST);
if($add_product){
$this->session->set_flashdata('action_message', 'New product added in Order!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -93,8 +91,7 @@ public function product_add(){
public function product_delete(){
$this->load->model('admin/order_model');

$delete_product = false;
//$delete_product = $this->order_model->productdelete($this->uri->segment(4));
$delete_product = $this->order_model->productdelete($this->uri->segment(4));
if($delete_product){
$this->session->set_flashdata('action_message', 'Product deleted in Order!');
$this->session->set_flashdata('action_message_type', 'success');
Expand Down
11 changes: 3 additions & 8 deletions application/controllers/admin/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ public function Add(){


if($_POST){
$add = false;
//$add = $this->product_model->add($_POST);
$add = $this->product_model->add($_POST);
if($add){
$this->session->set_flashdata('action_message', 'New product added!');
$this->session->set_flashdata('action_message_type', 'success');
Expand Down Expand Up @@ -102,8 +101,7 @@ public function update(){
$this->load->model('admin/product_model');

if($_POST){
$update = false;
//$update = $this->product_model->update($this->uri->segment(4), $_POST);
$update = $this->product_model->update($this->uri->segment(4), $_POST);
if($update){
$this->session->set_flashdata('action_message', 'Product updated!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -122,10 +120,7 @@ public function update(){
public function delete(){
$this->load->model('admin/product_model');



$delete = false;
//$delete = $this->product_model->delete($this->uri->segment(4));
$delete = $this->product_model->delete($this->uri->segment(4));
if($delete){
$this->session->set_flashdata('action_message', 'Product deleted!');
$this->session->set_flashdata('action_message_type', 'success');
Expand Down
15 changes: 5 additions & 10 deletions application/controllers/admin/product_option.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ public function add(){
$data["options"] = $this->product_option_model->get_option_type_list();

if($_POST){
$add_new_option = false;
//$add_new_option = $this->product_option_model->add_new_option($_POST);
$add_new_option = $this->product_option_model->add_new_option($_POST);
if($add_new_option){
$this->session->set_flashdata('action_message', 'New Product Option added!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -63,8 +62,7 @@ public function add(){
public function delete(){
$this->load->model('admin/product_option_model');

$delete = false;
//$delete = $this->product_option_model->delete($this->uri->segment(4));
$delete = $this->product_option_model->delete($this->uri->segment(4));
if($delete){
$this->session->set_flashdata('action_message', 'Product Option deleted!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -81,8 +79,7 @@ public function value_update(){
$this->load->model('admin/product_option_model');

if($_POST){
$update_value = false;
//$update_value = $this->product_option_model->value_update($_POST);
$update_value = $this->product_option_model->value_update($_POST);
if($update_value){
$this->session->set_flashdata('action_message', 'Product Option value updated!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -101,8 +98,7 @@ public function add_value(){
$this->load->model('admin/product_option_model');

if($_POST){
$add_new_value = false;
//$add_new_value = $this->product_option_model->add_new_value($_POST);
$add_new_value = $this->product_option_model->add_new_value($_POST);
if($add_new_value){
$this->session->set_flashdata('action_message', 'Product Option new value added!');
$this->session->set_flashdata('action_message_type', 'success');
Expand All @@ -119,8 +115,7 @@ public function add_value(){
public function delete_value(){
$this->load->model('admin/product_option_model');

$delete_value = false;
//$delete_value = $this->product_option_model->delete_value($this->uri->segment(4));
$delete_value = $this->product_option_model->delete_value($this->uri->segment(4));
if($delete_value){
$this->session->set_flashdata('action_message', 'Product Option value deleted!');
$this->session->set_flashdata('action_message_type', 'success');
Expand Down
3 changes: 1 addition & 2 deletions application/controllers/admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public function detail(){
$this->load->model('admin/currency_model');

if($_POST){
$update = false;
//$update = $this->settings_model->update(1, $_POST);
$update = $this->settings_model->update(1, $_POST);
if($update){
$this->session->set_flashdata('action_message', 'Settings updated!');
$this->session->set_flashdata('action_message_type', 'success');
Expand Down

0 comments on commit a0a2de0

Please sign in to comment.