Exemplo n.º 1
0
 function change_publish_status()
 {
     $website_advertisments_model = new Website_advertisements_model();
     $website_advertisments_service = new Website_advertisements_service();
     $website_advertisments_model->set_id(trim($this->input->post('id', TRUE)));
     $website_advertisments_model->set_is_published(trim($this->input->post('value', TRUE)));
     echo $website_advertisments_service->publish_advertisement($website_advertisments_model);
 }
Exemplo n.º 2
0
 function add_commercial()
 {
     $website_advertisement_model = new Website_advertisements_model();
     $website_advertisement_service = new Website_advertisements_service();
     $website_advertisement_model->set_topic($this->input->post('topic', TRUE));
     $website_advertisement_model->set_image($this->input->post('logo', TRUE));
     $website_advertisement_model->set_url($this->input->post('url', TRUE));
     $website_advertisement_model->set_description($this->input->post('description', TRUE));
     $website_advertisement_model->set_price($this->input->post('price', TRUE));
     $website_advertisement_model->set_added_by($this->session->userdata('USER_ID'));
     $website_advertisement_model->set_added_date(date("Y-m-d H:i:s"));
     $website_advertisement_model->set_updated_by(1);
     $website_advertisement_model->set_is_published('0');
     $website_advertisement_model->set_is_deleted('0');
     echo $website_advertisement_service->add_website_advertisement($website_advertisement_model);
 }