-
Notifications
You must be signed in to change notification settings - Fork 3
/
sam-pro-ads-list.php
60 lines (57 loc) · 2.14 KB
/
sam-pro-ads-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
<?php
/**
* Created by PhpStorm.
* Author: minimus
* Date: 25.12.2014
* Time: 14:39
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if( ! class_exists( 'SamProAdsList' ) ) {
class SamProAdsList {
private $settings;
public function __construct( $settings ) {
$this->settings = $settings;
}
public function show() {
$newLink = admin_url('admin.php') . '?page=sam-pro-ad-editor';
$newA = "<script id='NewAd' type='text/x-jsrender'><a class='e-toolbaricons e-icon new-ad' href='{$newLink}'/></script>";
$ddList = '<script id="viewMode" type="text/x-jsrender"><select id="view-mode">
<option value="10">'. __('All', SAM_PRO_DOMAIN) .'</option>
<option value="0">' . __('Active', SAM_PRO_DOMAIN) . '</option>
<option value="1">' . __('In Trash', SAM_PRO_DOMAIN) . '</option>
</select></script>';
?>
<?php echo $ddList; ?>
<script id="TrashPlace" type="text/x-jsrender">
<a class="e-toolbaricons e-icon place-to-trash"/>
</script>
<script id="UnTrashPlace" type="text/x-jsrender">
<a class="e-toolbaricons e-icon place-from-trash"/>
</script>
<script id="ModerateAd" type="text/x-jsrender">
<a class="e-toolbaricons e-icon ad-moderate"/>
</script>
<script id="UnModerateAd" type="text/x-jsrender">
<a class="e-toolbaricons e-icon ad-unmoderate"/>
</script>
<?php echo $newA ?>
<div class="wrap">
<h2><?php _e('Manage Ads', SAM_PRO_DOMAIN); ?></h2>
<div id="grid"></div>
<h4><?php _e('Legend', SAM_PRO_DOMAIN); ?></h4>
<ul>
<li><i class="icon-ok"></i>/<i class="icon-traffic-cone"></i> - <?php _e('Approved / Awaiting approval.', SAM_PRO_DOMAIN); ?></li>
<li><i class="icon-leaf"></i>/<i class="icon-trash"></i> - <?php _e('Is active / Is in trash.', SAM_PRO_DOMAIN); ?></li>
<li><i class="icon-eye"></i>/<i class="icon-eye-off"></i> - <?php _e('Potentially visible / Always invisible.', SAM_PRO_DOMAIN); ?></li>
</ul>
</div>
<?php
/*include_once('sam-pro-updater.php');
$upd = new SamProUpdater(SAM_PRO_DB_VERSION, $this->settings);
$struct = $upd->getTableStruct('wp_sampro_zones_rules', true);
echo $struct;*/
}
}
}