promot tools
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -51,22 +51,13 @@ class Bko_Controller extends WRB_Controller {
|
||||
$data = array();
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
// $mysql = "SELECT '<b>ADDED:</b>'||added::date||'<br><b>EXPIRE:</b>'||expire::date||'<br>'||username||'<br><b>Name:</b>'||firstname||' '||lastname AS signup, country,"
|
||||
// . " (CASE WHEN status=1 THEN '<div id=\"btu'||id||'\"><button id=\"acc'||id||'\" class=\"btn btn-info btn-xs\" onclick=\"return resendLink('''||id||''');\" >Resend</button></div>' ELSE ' ' END) AS action ,"
|
||||
// . " (CASE WHEN status=1 THEN '<div id=\"dtu'||id||'\"><button id=\"del'||id||'\" class=\"btn btn-warning btn-xs\" onclick=\"return deleteLink('''||id||''');\" >Del</button></div>' 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||'<br>'||loc AS dates,email||'<br>'||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,
|
||||
'<div id=\"btu'||id||'\"><button id=\"acc'||uid||'\" class=\"btn btn-info btn-xs\" onclick=\"return resendLink('''||uid||''');\" >Resend</button></div>' 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');
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
Reference in New Issue
Block a user