| Server IP : 14.225.204.176 / Your IP : 216.73.216.252 Web Server : nginx/1.24.0 System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64 User : root ( 0) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/php/wit-crm/modules/ma/controllers/ |
Upload File : |
<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Ma_public extends ClientsController
{
public function index()
{
show_404();
}
public function download_file($folder_indicator, $attachmentid = '')
{
$this->load->helper('download');
$this->load->model('ma_model');
$path = '';
if ($folder_indicator == 'ma_asset') {
$this->db->where('rel_id', $attachmentid);
$this->db->where('rel_type', 'ma_asset');
$file = $this->db->get(db_prefix() . 'files')->row();
$path = MA_MODULE_UPLOAD_FOLDER . '/assets/' . $file->rel_id . '/' . $file->file_name;
$this->ma_model->download_asset($attachmentid);
}else {
die('folder not specified');
}
force_download($path, null);
}
public function tracking_click(){
$email = $this->input->get('email');
$campaign = $this->input->get('campaign');
$lead = $this->input->get('lead');
$url = $this->input->get('href');
$this->db->where('email_id', $email);
$this->db->where('campaign_id', $campaign);
$this->db->where('lead_id', $lead);
$this->db->update(db_prefix() . 'ma_email_logs', ['click' => 1]);
$this->db->insert(db_prefix() . 'ma_email_click_logs', [
'lead_id' => $lead,
'campaign_id' => $campaign,
'email_id' => $email,
'url' => $url,
'time' => date('Y-m-d H:i:s'),
]);
header("Location: ".$url, TRUE, 301);
exit();
}
}