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 / list-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
list-templates.php
128 lines
1 <?php
2 /**
3 * Base: wpdmpro
4 * Developer: shahjada
5 * Team: W3 Eden
6 * Date: 22/5/20 08:21
7 */
8
9
10 if(!defined("ABSPATH")) die();
11
12 if(!isset($_GET['_type']) || $_GET['_type'] !== 'email'){ ?>
13
14 <blockquote class="alert alert-info" style="margin-bottom: 10px">
15 <?php echo __( "Pre-designed templates can't be deleted or edited from this section. But you can clone any of them and edit as your own. If you seriously want to edit any pre-designed template you have to edit those directly edting php files at /download-manager/templates/ dir" , "download-manager" ); ?>
16 </blockquote>
17
18 <?php } ?>
19 <div class="panel panel-default">
20 <table cellspacing="0" class="table table-hover">
21 <thead>
22 <tr>
23 <th style="min-width: 400px"><?php echo __( "Template Name" , "download-manager" ); ?></th>
24 <?php if(wpdm_query_var('_type') === 'email'){ ?>
25 <th style="width: 150px"><?php echo __( "Mail Receiver" , "download-manager" ); ?></th>
26 <?php } ?>
27 <th style="width: 250px;"><?php echo __( "Template ID" , "download-manager" ); ?></th>
28 <?php if(!isset($_GET['_type']) || $_GET['_type'] != 'email'){ ?>
29 <th style="width: 150px"><?php echo __( "Status" , "download-manager" ); ?></th>
30 <?php } else { ?>
31 <th style="width: 150px"><?php echo __( "Email Status" , "download-manager" ); ?></th>
32 <?php } ?>
33 <th style="width: 160px;text-align: right"><?php echo __( "Actions" , "download-manager" ); ?></th>
34 </tr>
35 </thead>
36
37
38 <tbody>
39
40 <?php
41 $ttype = isset($_GET['_type'])?wpdm_query_var('_type'):'link';
42 if($ttype != 'email'){
43 //$ctpls = WPDM\Admin\Menu\Templates::dropdown(array('data_type' => 'ARRAY', 'type' => $ttype));
44 $ctpls = WPDM()->packageTemplate->getTemplates($ttype);
45
46 $tplstatus = maybe_unserialize(get_option("_fm_{$ttype}_template_status"));
47 $ctemplates = [];
48 foreach($ctpls as $ctpl => $template){
49 $name = "";
50 $path = "";
51
52 if(!is_array($template)){
53 $tmpdata = file_get_contents($template);
54 $path = $template;
55 $regx = "/WPDM.*Template[\s]*:([^\-\->]+)/";
56 if (preg_match($regx, $tmpdata, $matches)) {
57 $name = $matches[1];
58 } else continue;
59 } else {
60 $name = $template['name'];
61 $ctemplates[] = $ctpl;
62 }
63
64 $tplid = str_replace(".php","",$ctpl);
65 $status = isset($tplstatus[$tplid])?(int)$tplstatus[$tplid]:1;
66 ?>
67
68 <tr valign="top" class="author-self status-inherit" id="template-<?php echo $ttype; ?>-<?php echo $ctpl; ?>">
69 <td class="column-icon media-icon" style="text-align: left;">
70 <a href="#" class="pull-right ttip" title="<?= __('Show file path', WPDM_TEXT_DOMAIN) ?>" onclick="jQuery('#lnk-<?= $tplid ?>').slideToggle();return false;"><i class="fa fa-globe"></i></a>
71 <nobr><?php echo $name; ?></nobr><br/>
72 <code style="display: none;" id="lnk-<?= $tplid ?>"><?php echo str_replace(ABSPATH, '', $path); ?></code>
73 </td>
74 <td>
75 <input class="form-control input-sm input-tplid" type="text" readonly="readonly" onclick="this.select()" value="<?php echo $tplid; ?>" />
76 </td>
77 <td>
78 <div class="btn-group" data-toggle="buttons">
79 <label class="btn btn-<?php echo $status === 1?'success active':'secondary'; ?> btn-sm btn-status <?php echo str_replace(".php","",$ctpl); ?>" data-value="1" data-id="<?php echo str_replace(".php","",$ctpl); ?>"><input type="radio" <?php checked($status,1); ?> name="<?php echo $ctpl; ?>-status" value="1"/><i class="fa fa-check"></i></label>
80 <label class="btn btn-<?php echo $status === 0?'danger active':'secondary'; ?> btn-sm btn-status <?php echo str_replace(".php","",$ctpl); ?>" data-value="0" data-id="<?php echo str_replace(".php","",$ctpl); ?>"><input type="radio" name="<?php echo $ctpl; ?>-status" <?php checked($status,0); ?> value="0"/><i class="fa fa-times"></i></label>
81 </div>
82 </td>
83 <td style="text-align: right">
84 <a href="#" data-href="admin-ajax.php?action=template_preview&_type=<?php echo $ttype; ?>&template=<?php echo $ctpl; ?>&_tplnonce=<?php echo wp_create_nonce(WPDM_PUB_NONCE) ?>" rel="<?php echo $ctpl; ?>" class="template_preview btn btn-sm btn-success"><i class="fa fa-desktop"></i> Preview</a>
85
86 </td>
87
88
89 </tr>
90 <?php
91 }} else {
92 $status_all = WPDM()->email->getStatus();
93 $templates = \WPDM\__\Email::templates();
94 foreach($templates as $ctpl => $template){
95 $status = isset($status_all[$ctpl]) ? (int) $status_all[$ctpl] : 1;
96 ?>
97 <tr valign="top" class="author-self status-inherit" id="post-8">
98 <td class="column-icon media-icon" style="text-align: left;">
99 <?php echo esc_attr($template['label']); ?>
100
101 </td>
102
103 <td style="width: 150px"><?php echo ucfirst($template['for']); ?></td>
104
105 <td>
106 <?php echo $ctpl; ?>
107 </td>
108 <td>
109 <div class="btn-group" data-toggle="buttons">
110 <label class="btn btn-<?php echo $status === 1?'success active':'light'; ?> btn-sm btn-status <?php echo $ctpl; ?>" data-value="1" data-id="<?php echo $ctpl; ?>"><input type="radio" <?php checked($status,1); ?> name="<?php echo $ctpl; ?>-status" value="1"/><i class="fa fa-check"></i></label>
111 <label class="btn btn-<?php echo $status === 0?'danger active':'light'; ?> btn-sm btn-status <?php echo $ctpl; ?>" data-value="0" data-id="<?php echo $ctpl; ?>"><input type="radio" name="<?php echo $ctpl; ?>-status" <?php checked($status,0); ?> value="0"/><i class="fa fa-times"></i></label>
112 </div>
113 </td>
114 <td style="text-align: right">
115
116 <a href="edit.php?post_type=wpdmpro&page=templates&_type=email&task=EditEmailTemplate&id=<?php echo $ctpl; ?>" class="btn btn-sm btn-primary"><i class="fas fa-pencil-alt"></i> <?php echo __( "Edit" , "download-manager" ); ?></a>
117
118 </td>
119
120
121 </tr>
122 <?php
123 }}
124 ?>
125 </tbody>
126 </table>
127 </div>
128