OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
sendy
/
includes
/
subscribers
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/18/2021 10:11:21 AM
rwxr-xr-x
📄
custom-fields.php
2.13 KB
11/18/2021 09:43:10 AM
rw-r--r--
📄
delete-blocked-domain.php
500 bytes
11/18/2021 09:43:09 AM
rw-r--r--
📄
delete-inactive.php
1.53 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
delete-suppressed-email.php
496 bytes
11/18/2021 09:43:09 AM
rw-r--r--
📄
delete-unconfirmed.php
2.17 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
delete.php
1.38 KB
11/18/2021 09:43:10 AM
rw-r--r--
📄
edit.php
4.93 KB
11/18/2021 09:43:10 AM
rw-r--r--
📄
export-blocked-domains.php
1.75 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
export-csv.php
7.22 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
export-suppression-list.php
1.75 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
housekeeping-no-clicks.php
407 bytes
11/18/2021 09:43:09 AM
rw-r--r--
📄
housekeeping-no-opens.php
406 bytes
11/18/2021 09:43:09 AM
rw-r--r--
📄
housekeeping.php
12.14 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
import-add.php
1.06 KB
11/18/2021 09:43:10 AM
rw-r--r--
📄
import-blocked-domain-list.php
2.91 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
import-blocked-domain-list2.php
1.91 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
import-delete.php
1.98 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
import-suppression-list.php
2.88 KB
11/18/2021 09:43:10 AM
rw-r--r--
📄
import-suppression-list2.php
1.89 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
import-unsubscribe.php
2.01 KB
11/18/2021 09:43:10 AM
rw-r--r--
📄
import-update.php
13.07 KB
11/18/2021 09:43:10 AM
rw-r--r--
📄
line-delete.php
1.02 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
line-unsubscribe.php
1.04 KB
11/18/2021 09:43:10 AM
rw-r--r--
📄
line-update.php
5.34 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
main.php
8.13 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
sample-csv.php
1.2 KB
11/18/2021 09:43:10 AM
rw-r--r--
📄
save-gdpr.php
1.15 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
subscribe-form.php
4.09 KB
11/18/2021 09:43:09 AM
rw-r--r--
📄
subscriber-info.php
17.55 KB
11/18/2021 09:43:10 AM
rw-r--r--
📄
unsubscribe.php
881 bytes
11/18/2021 09:43:10 AM
rw-r--r--
Editing: import-suppression-list.php
Close
<?php include('../functions.php');?> <?php include('../login/auth.php');?> <?php require_once('../helpers/EmailAddressValidator.php');?> <?php require_once('../helpers/parsecsv.php');?> <?php /********************************/ //Validate imported CSV file $csvfile = $_FILES['csv_file']['tmp_name']; $csvfilename = $_FILES['csv_file']['name']; $csvfilename_array = explode('.', $csvfilename); $csvfile_ext1 = $csvfilename_array[count($csvfilename_array)-2]; $csvfile_ext2 = $csvfilename_array[count($csvfilename_array)-1]; if($csvfile_ext1=='php' || $csvfile_ext2!='csv' || $csvfilename=='.htaccess') exit; $csv = new parseCSV(); $csv->heading = false; $csv->auto($csvfile); $databasetable = "suppression_list"; $fieldseparator = ","; $lineseparator = "\n"; $app = isset($_POST['app']) && is_numeric($_POST['app']) ? mysqli_real_escape_string($mysqli, (int)$_POST['app']) : exit; $time = time(); /********************************/ //get comma separated lists belonging to this app $q2 = 'SELECT id FROM lists WHERE app = '.$app; $r2 = mysqli_query($mysqli, $q2); if ($r2) { $all_lists = ''; while($row = mysqli_fetch_array($r2)) $all_lists .= $row['id'].','; $all_lists = substr($all_lists, 0, -1); } if(!file_exists($csvfile)) { header("Location: ".get_app_info('path').'/blacklist-suppression?i='.$app.'&e=2'); exit; } $file = fopen($csvfile,"r"); if(!$file) { echo _('Error opening data file.'); echo ".\n"; exit; } $size = filesize($csvfile); if(!$size) { echo _('File is empty.'); echo "\n"; exit; } $csvcontent = fread($file,$size); fclose($file); $linearray = array(); foreach(explode($lineseparator,$csvcontent) as $line) { //cleanup line $line = trim($line," \t"); $line = str_replace("\r","",$line); $line = str_replace('"','',$line); $line = str_replace("'",'',$line); //get the columns $linearray = explode($fieldseparator,$line); $columns = count($linearray); //check if there's more than 1 column if($columns>1) { header("Location: ".get_app_info('path').'/blacklist-suppression?i='.$app.'&e=1'); exit; } //Check if email is valid $validator = new EmailAddressValidator; if ($validator->check_email_address(trim($line))) { //Import immediately. Start by checking for duplicates $q = 'SELECT id FROM '.$databasetable.' WHERE app = '.$app.' AND email = "'.$line.'"'; $r = mysqli_query($mysqli, $q); if (mysqli_num_rows($r) == 0) { //insert email into database $q = 'INSERT INTO '.$databasetable.' (app, email, timestamp) values('.$app.', "'.trim($line).'", '.$time.')'; mysqli_query($mysqli, $q); } //delete email from any existing lists within the brand $q2 = 'DELETE FROM subscribers WHERE list IN ('.$all_lists.') AND email = "'.trim($line).'"'; mysqli_query($mysqli, $q2); } } //Once everything is imported, remove CSV //delete CSV file unlink($csvfile); //return header("Location: ".get_app_info('path').'/blacklist-suppression?i='.$app); ?>