PluginProbe ʕ •ᴥ•ʔ
Download Manager / 3.3.63
Download Manager v3.3.63
3.3.65 3.3.64 3.3.63 3.3.62 3.3.61 3.3.60 3.3.59 3.3.58 3.3.57 3.3.56 trunk 2.1.3 2.3.0 2.5.96 2.5.97 2.6.2 2.6.96 2.8.3 2.9.99 3.0.4 3.1.05 3.1.07 3.1.08 3.1.11 3.1.12 3.1.14 3.1.17 3.1.18 3.1.22 3.1.23 3.1.24 3.1.25 3.1.26 3.1.27 3.1.28 3.2.04 3.2.13 3.2.14 3.2.16 3.2.18 3.2.19 3.2.21 3.2.22 3.2.23 3.2.24 3.2.25 3.2.27 3.2.28 3.2.29 3.2.30 3.2.31 3.2.32 3.2.33 3.2.34 3.2.35 3.2.37 3.2.38 3.2.39 3.2.40 3.2.41 3.2.42 3.2.43 3.2.44 3.2.45 3.2.46 3.2.47 3.2.48 3.2.49 3.2.50 3.2.51 3.2.52 3.2.53 3.2.54 3.2.55 3.2.56 3.2.57 3.2.58 3.2.59 3.2.60 3.2.61 3.2.63 3.2.64 3.2.65 3.2.66 3.2.67 3.2.68 3.2.69 3.2.70 3.2.71 3.2.72 3.2.73 3.2.74 3.2.75 3.2.76 3.2.77 3.2.78 3.2.79 3.2.80 3.2.81 3.2.82 3.2.83 3.2.84 3.2.85 3.2.86 3.2.87 3.2.88 3.2.89 3.2.90 3.2.91 3.2.92 3.2.93 3.2.94 3.2.95 3.2.96 3.2.97 3.2.98 3.2.99 3.3.00 3.3.01 3.3.02 3.3.03 3.3.04 3.3.05 3.3.06 3.3.07 3.3.08 3.3.09 3.3.10 3.3.11 3.3.12 3.3.13 3.3.14 3.3.15 3.3.16 3.3.17 3.3.18 3.3.19 3.3.20 3.3.21 3.3.22 3.3.23 3.3.24 3.3.25 3.3.26 3.3.27 3.3.28 3.3.29 3.3.30 3.3.31 3.3.32 3.3.33 3.3.34 3.3.35 3.3.36 3.3.37 3.3.38 3.3.39 3.3.40 3.3.41 3.3.42 3.3.43 3.3.44 3.3.45 3.3.46 3.3.47 3.3.48 3.3.49 3.3.50 3.3.51 3.3.52 3.3.53 3.3.54 3.3.55
download-manager / src / Admin / views / templates / templates.php
download-manager / src / Admin / views / templates Last commit date
custom-tags.php 2 weeks ago email-template-editor.php 2 years ago email-template-settings.php 5 months ago emails-template.php 4 years ago header.php 3 years ago import-template.php 5 years ago list-templates.php 2 weeks ago templates.php 2 weeks ago
templates.php
253 lines
1 <?php
2
3 if(!defined("ABSPATH")) die();
4 ?>
5
6 <div class="wrap w3eden">
7
8
9 <?php
10
11 require_once __DIR__.'/header.php';
12
13
14
15 //List link, page and emaol templates
16 require_once __DIR__.'/list-templates.php';
17
18 require_once __DIR__.'/email-template-settings.php';
19
20 ?>
21
22
23 </div>
24
25
26
27 <style>
28 #tagstable td{ vertical-align: top; }
29 div.notice, .updated{ display: none; }
30 .xbubble
31 {
32 position: relative;
33 padding: 10px;
34 background: #eeeeee;
35 -webkit-border-radius: 3px;
36 -moz-border-radius: 3px;
37 border-radius: 3px;
38 }
39
40 .xbubble:after
41 {
42 content: '';
43 position: absolute;
44 border-style: solid;
45 border-width: 0 10px 10px;
46 border-color: #eeeeee transparent;
47 display: block;
48 width: 0;
49 z-index: 1;
50 top: -10px;
51 left: 17px;
52 }
53 .w3ebselect{
54 padding: 2px;
55 border-radius: 2px;
56 background: #ffffff;
57 cursor: pointer;
58 }
59
60 .w3econtainer {
61 border: 3px solid #333;
62 border-radius: 4px;
63 background: #333;
64 }
65
66 /* Container for columns and the top "toolbar" */
67 .w3erow {
68 padding: 7px 10px 10px;
69 background: #333;
70 color: #8db4b6;
71 letter-spacing: 0.5px;
72 font-size: 10px;
73 font-weight: 400;
74 }
75
76 /* Create three unequal columns that floats next to each other */
77 .w3ecolumn {
78 float: left;
79 }
80
81 .w3eleft {
82 width: 60px;
83 }
84
85 .w3eright {
86 width: 10%;
87 }
88
89 .w3emiddle {
90 width: calc(90% - 60px);
91 }
92
93 /* Clear floats after the columns */
94 .w3erow:after {
95 content: "";
96 display: table;
97 clear: both;
98 }
99
100 /* Three dots */
101 .w3edot {
102 margin-top: 4px;
103 height: 12px;
104 width: 12px;
105 background-color: #bbb;
106 border-radius: 50%;
107 display: inline-block;
108 }
109
110 /* Style the input field */
111 input[type=text].w3e {
112 width: 100%;
113 border-radius: 3px;
114 border: none;
115 background-color: white;
116 margin-top: -8px;
117 height: 25px;
118 color: #666;
119 padding: 5px;
120 }
121
122 /* Three bars (hamburger menu) */
123 .w3ebar {
124 width: 17px;
125 height: 3px;
126 background-color: #aaa;
127 margin: 3px 0;
128 display: block;
129 }
130
131 /* Page content */
132 .w3econtent {
133 padding: 0;
134 margin-bottom: -4px;
135 }
136 .btn-group .btn-status input{
137 display: none;
138 }
139
140 </style>
141 <script>
142
143 jQuery(function($){
144 $('.bselect').click(function(){
145 $('#banner-url').val(this.src);
146 });
147 <?php if(isset($ttype)) { ?>
148 $('body').on('click', '.template_preview', function(e){
149 e.preventDefault();
150 WPDM.dialog.ajax('<?php echo esc_js(__( "Template Preview" , "download-manager" )); ?>', $(this).attr('data-href'), { size: 'lg', icon: false });
151 });
152 $('#etmpl').on('change', function () {
153 $('#preview').attr('src', 'edit.php?action=email_template_preview&id=user-signup&etmpl='+$(this).val()+"&__empnonce=<?php echo wp_create_nonce(WPDM_PRI_NONCE); ?>");
154 $('#etplname').html($(this).val());
155 });
156 $('#etplname').html($('#etmpl').val());
157 $('#emlstform').submit(function (e) {
158 e.preventDefault();
159 $('#emsbtn').html('<i class="fa fa-sync fa-spin"></i> <?php _e( "Saving..." , "download-manager" ); ?>');
160 $(this).ajaxSubmit({
161 url: ajaxurl+"?action=wpdm_save_email_setting",
162 success: function (res) {
163 $('#emsbtn').html('<i class="fas fa-hdd"></i> <?php _e( "Save Changes" , "download-manager" ); ?>');
164 document.getElementById('preview').contentDocument.location.reload(true);
165 }
166 });
167 });
168
169 $('.btn-status').on('click', function () {
170 var v = $(this).data('value');
171 var c = '.'+$(this).data('id');
172 var $this = this;
173 $.post(ajaxurl, {action: 'update_template_status', template: $(this).data('id'), type: '<?php echo $ttype; ?>', status: v, tsnonce: '<?php echo wp_create_nonce(WPDM_PRI_NONCE) ?>'}, function (res) {
174 $(c).removeClass('btn-danger').removeClass('btn-success').addClass('btn-secondary');
175 if(v==1)
176 $($this).addClass('btn-success').removeClass('btn-secondary');
177 else
178 $($this).addClass('btn-danger').removeClass('btn-secondary');
179 });
180
181
182 });
183
184
185 <?php } ?>
186 // Open the New/Edit Tag form inside a WPDM dialog
187 function wpdmOpenTagDialog(){
188 var tpl = document.getElementById('newtagmodal-tpl');
189 WPDM.dialog.show({
190 title: '<?php echo esc_js(__( "New Tag" , "download-manager" )); ?>',
191 content: tpl.innerHTML,
192 size: 'md',
193 icon: false,
194 backdrop: 'static'
195 });
196 }
197
198 $('body').on('click', '.add-new-tag', function (e) {
199 e.preventDefault();
200 wpdmOpenTagDialog();
201 });
202
203 $('body').on('submit', '#newtagform', function (e) {
204 e.preventDefault();
205 var $form = $(this);
206 var obtnlbl = $('#newtagformsubmit').html();
207 $('#newtagformsubmit').html("<i class='fa fa-sun fa-spin'></i>").attr('disabled', 'disabled');
208 $form.ajaxSubmit({
209 url: ajaxurl,
210 resetForm: true,
211 success: function (response) {
212 $('#newtagformsubmit').html(obtnlbl).removeAttr('disabled');
213 $('#row_'+response.name).hide();
214 $('#tagstable tbody').append(
215 ' <tr id="row_'+response.name+'">\n' +
216 ' <td>['+response.name+']</td>\n' +
217 ' <td><pre style="background: #ffffff;border-radius: 3px;font-size: 10px">'+response.value+'</pre></td>\n' +
218 ' <td style="width: 220px">\n' +
219 ' <a href="#" class="btn btn-info tag-edit" data-tag="'+response.name+'"><?php _e("Edit", "download-manager"); ?></a>\n' +
220 ' <a href="#" class="btn btn-danger tag-delete" data-tag="'+response.name+'"><?php _e("Delete", "download-manager"); ?></a>\n' +
221 ' </td>\n' +
222 ' </tr>'
223 );
224 $form.closest('.wpdm-dialog-wrapper').find('.wpdm-dialog__close').trigger('click');
225 }
226 });
227 });
228 $('body').on('click', '.tag-edit', function () {
229 var tag = $(this).data('tag');
230 wpdmOpenTagDialog();
231 WPDM.blockUI('#newtagform');
232 $.get(ajaxurl, {tag: tag, action: 'wpdm_edit_custom_tag'}, function (response) {
233 $('#tag_name').val(response.name);
234 $('#tag_value').val(response.value);
235 WPDM.unblockUI('#newtagform');
236 })
237 });
238 $('body').on('click', '.tag-delete', function (e) {
239 e.preventDefault();
240 if(!confirm('<?php echo __( "Are you sure?", "download-manager" ); ?>')) return false;
241 var tag = $(this).data('tag');
242 $.get(ajaxurl, {tag: $(this).data('tag'), action: 'wpdm_delete_custom_tag'}, function (response) {
243 $('#row_'+tag).hide();
244 })
245 });
246 });
247
248 </script>
249 </div>
250
251
252
253