forked from AamAadmiParty/mass-emailer-sendy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
delete-from-list.php
108 lines (96 loc) · 3.84 KB
/
delete-from-list.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php include('includes/header.php');?>
<?php include('includes/login/auth.php');?>
<?php include('includes/subscribers/main.php');?>
<!-- Validation -->
<script type="text/javascript" src="<?php echo get_app_info('path');?>/js/validate.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#import-delete-form").validate({
rules: {
csv_file: {
required: true
}
},
messages: {
csv_file: "<?php echo addslashes(_('Please upload a CSV file'));?>"
}
});
$("#line-import-form").validate({
rules: {
line: {
required: true
}
},
messages: {
line: "<?php echo addslashes(_('Please enter at least one combination of name & email'));?>"
}
});
});
</script>
<div class="row-fluid">
<div class="span2">
<?php include('includes/sidebar.php');?>
</div>
<div class="span10">
<div>
<p class="lead"><?php echo get_app_data('app_name');?></p>
<p><?php echo _('List');?>: <span class="label"><?php echo get_list_data('name');?></span></p>
<br/>
</div>
<h2><?php echo _('Mass delete via CSV file');?></h2><br/>
<form action="<?php echo get_app_info('path')?>/includes/subscribers/import-delete.php" method="POST" accept-charset="utf-8" class="form-vertical" enctype="multipart/form-data" id="import-delete-form">
<?php if($_GET['e']==1):?>
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong><?php echo _('There should only be 1 column in your CSV containing emails.');?></strong>
</div>
<?php elseif($_GET['e']==3):?>
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong><?php echo _('Please upload a CSV file.');?></strong>
</div>
<?php endif;?>
<label class="control-label" for="csv_file"><em><?php echo _('CSV format example');?>:</em></label>
<table class="table table-bordered table-condensed" style="width: 300px;">
<tbody>
<tr>
<td>[email protected]</td>
</tr>
<tr>
<td>[email protected]</td>
</tr>
</tbody>
</table>
<div class="control-group">
<div class="controls">
<input type="file" class="input-xlarge" id="csv_file" name="csv_file">
</div>
</div>
<input type="hidden" name="list_id" value="<?php echo $_GET['l'];?>">
<input type="hidden" name="app" value="<?php echo $_GET['i'];?>">
<br/>
<button type="submit" class="btn btn-inverse"><?php echo _('Import');?></button>
</form>
<br/>
<h2><?php echo _('Delete email per line');?></h2><br/>
<form action="<?php echo get_app_info('path')?>/includes/subscribers/line-delete.php" method="POST" accept-charset="utf-8" class="form-vertical" enctype="multipart/form-data" id="line-import-form">
<?php if($_GET['e']==2):?>
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong><?php echo _('Sorry, we didn\'t receive any input.');?></strong>
</div>
<?php endif;?>
<label class="control-label" for="line"><?php echo _('Email to delete');?></label>
<div class="control-group">
<div class="controls">
<textarea class="input-xlarge" id="line" name="line" rows="10" placeholder="Eg. [email protected]"></textarea>
</div>
</div>
<input type="hidden" name="list_id" value="<?php echo $_GET['l'];?>">
<input type="hidden" name="app" value="<?php echo $_GET['i'];?>">
<br/>
<button type="submit" class="btn btn-inverse"><?php echo _('Delete');?></button>
</form>
</div>
</div>
<?php include('includes/footer.php');?>