diff --git a/application/config/constants.php b/application/config/constants.php index 5498782..b9f373a 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -139,6 +139,7 @@ define('WRENCHBOARD_BKO_CREATEUSER', 10015); define('WRENCHBOARD_BKO_UPDATEUSER', 10020); define('WRENCHBOARD_BKO_RESEND_OFFER', 10025); +define('WRENCHBOARD_BKO_MARKETING_MSG', 10026); define('WRENCHBOARD_BKO_SEND_PUSH', 10035); diff --git a/application/controllers/Marketing.php b/application/controllers/Marketing.php index 5f81144..6a57b5d 100644 --- a/application/controllers/Marketing.php +++ b/application/controllers/Marketing.php @@ -14,5 +14,16 @@ class Marketing extends Bko_Controller { $this->load->view('bko/view_bko_footer', $data); } + public function resend_marketing() { + $this->load->model('backend_model'); + $link_id = $this->input->get('link_id'); + $in = array(); + $in['uid'] = $link_id; + $in['action'] = WRENCHBOARD_BKO_MARKETING_MSG; + $out = array(); + $res = $this->backend_model->wrenchboard_api($in, $out); + + echo 'Sent'; + } //C:\WORKS\PROJECTS\WRB\WrenchBoard\WrenchBackOffice\application\views\bko_pages\blog_items.php } diff --git a/application/libraries/Bko_Controller.php b/application/libraries/Bko_Controller.php index 6ee1e2c..8d28a9e 100644 --- a/application/libraries/Bko_Controller.php +++ b/application/libraries/Bko_Controller.php @@ -51,22 +51,13 @@ class Bko_Controller extends WRB_Controller { $data = array(); $this->load->library('table'); $this->table->set_template($this->template); -// $mysql = "SELECT 'ADDED:'||added::date||'
EXPIRE:'||expire::date||'
'||username||'
Name:'||firstname||' '||lastname AS signup, country," -// . " (CASE WHEN status=1 THEN '
' ELSE ' ' END) AS action ," -// . " (CASE WHEN status=1 THEN '
' ELSE ' ' END) AS Del " -// . " FROM members_pending WHERE expire> now() AND status = 1" -// . " ORDER BY id desc limit 5"; -// $query = $this->db->query($mysql); -// // $this->table->set_heading('Dates', 'Username', 'Name', 'Action'); -// $this->table->set_heading(array('data' => 'Date/Email/Name', 'style' => 'width:180px'), array('data' => 'Country', 'style' => 'width:20px; cellpadding:0px;'), -// array('data' => 'RES', 'style' => 'width:20px; cellpadding:0px;'), array('data' => 'Del', 'style' => 'width:20px; cellpadding:0px;')); -// -// $data['pending_dash_table'] = $this->table->generate($query); $this->table->set_template($this->template); //$mysql = "SElECT added::date||'
'||loc AS dates,email||'
'||firstname||' '||lastname AS Name FROM members ORDER BY id DESC LIMIT 7"; - $mysql = "SELECT email, lastname, firstname, status, added::date, updated FROM marketing_list"; + $mysql = "SELECT email, lastname, firstname, status, added::date, updated, + '
' AS SendInfo + FROM marketing_list"; $query = $this->db->query($mysql); // $this->table->set_heading('Account', 'Created', 'Action'); // $this->table->set_heading(array('data' => 'Date/LOC', 'style' => 'width:140px'), 'Email/Name'); diff --git a/application/views/bko/view_marketing.php b/application/views/bko/view_marketing.php index 0c62613..c6116be 100644 --- a/application/views/bko/view_marketing.php +++ b/application/views/bko/view_marketing.php @@ -73,36 +73,16 @@ } else { return false; } - $('#btu' + link_id).html('Processing...'); + // alert(link_id); $('#acc' + link_id).prop('disabled', true); $.ajax({ - url: "/bkouser/resend_pending?link_id=" + link_id + url: "/marketing/resend_marketing?link_id=" + link_id }).done(function (data) { - $('#btu' + link_id).html(data); - document.offer_individual.rec_email.value = ''; + $('#acc' + link_id).html(data); + // document.offer_individual.rec_email.value = ''; $('#acc' + link_id).prop('disabled', false); }); return false; } - - - - function deleteLink(link_id) { - if (confirm("Are you sure you want to delete this link?")) { -// do something - } else { - return false; - } - $('#dtu' + link_id).html('Processing...'); - $('#del' + link_id).prop('disabled', true); - $.ajax({ - url: "/bkouser/delete_pending?link_id=" + link_id - }).done(function (data) { - $('#dtu' + link_id).html(data); - document.offer_individual.rec_email.value = ''; - $('#del' + link_id).prop('disabled', false); - }); - return false; - } // --> \ No newline at end of file