PluginProbe
Page Builder: Pagelayer – Drag and Drop website builder / 1.0.2
Page Builder: Pagelayer – Drag and Drop website builder v1.0.2
2.2.1 2.2.0 2.1.9 2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 trunk 0.9.0 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 1.0.0 1.0.2 1.0.3 1.0.4 1.0.5 All 129 releases
pagelayer / js / givejs.php

givejs.php in Page Builder: Pagelayer – Drag and Drop website builder 1.0.2, at js/givejs.php

120 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 //////////////////////////////////////////////////////////////
4 //===========================================================
5 // givejs.php
6 //===========================================================
7 // PAGELAYER
8 // Inspired by the DESIRE to be the BEST OF ALL
9 // ----------------------------------------------------------
10 // Started by: Pulkit Gupta
11 // Date: 23rd Jan 2017
12 // Time: 23:00 hrs
13 // Site: http://pagelayer.com/wordpress (PAGELAYER)
14 // ----------------------------------------------------------
15 // Please Read the Terms of use at http://pagelayer.com/tos
16 // ----------------------------------------------------------
17 //===========================================================
18 // (c)Pagelayer Team
19 //===========================================================
20 //////////////////////////////////////////////////////////////
21
22
23 // Read the file
24 $data = '';
25 $self_path = dirname(__FILE__);
26 $files = array(
27 // Admin JS
28 'pagelayer-editor.js',
29 'widgets.js',
30 'premium.js',
31 'properties.js',
32 'base-64.js',
33 'slimscroll.js',
34 'vanilla-picker.min.js',
35 'trumbowyg.min.js',
36 'trumbowyg.js',
37 'trumbowyg.fontfamily.js',
38 'trumbowyg.fontsize.min.js',
39 'trumbowyg-pagelayer.js',
40 'pen.js',
41 'tlite.min.js',
42 // Enduser JS
43 'imagesloaded.min.js',
44 'nivo-lightbox.min.js',
45 'owl.carousel.min.js',
46 'pagelayer-frontend.js',
47 'premium-frontend.js',
48 'wow.min.js',
49 'jquery-numerator.js',
50 'simpleParallax.min.js',
51 'chart.min.js'
52 );
53
54 // What files to give
55 $give = @$_REQUEST['give'];
56
57 if(!empty($give)){
58
59 $give = explode(',', $give);
60
61 // Check all files are in the supported list
62 foreach($give as $file){
63 if(in_array($file, $files)){
64 $final[md5($file)] = $file;
65 }
66 }
67
68 }
69
70
71 // Give all
72 if(empty($final)){
73 $final = $files;
74 }
75
76 foreach($final as $k => $v){
77 //echo $k.'<br>';
78 $data .= file_get_contents($self_path.'/'.$v)."\n\n";
79 }
80
81 // We are zipping if possible
82 if(function_exists('ob_gzhandler')){
83 ob_start('ob_gzhandler');
84 }
85
86 // Type javascript
87 header("Content-type: text/javascript; charset: UTF-8");
88
89 // Set a zero Mtime
90 $filetime = filemtime($self_path.'/pagelayer-editor.js');
91
92 // Are we to also serve Shortcodes ?
93 if(!empty($pagelayer->shortcodes)){
94 $data .= 'pagelayer_shortcodes = '.json_encode($pagelayer->shortcodes).';'."\n\n";
95 $data .= 'pagelayer_styles = '.json_encode($pagelayer->styles).';'."\n\n";
96 $data .= 'pagelayer_groups = '.json_encode($pagelayer->groups).';'."\n\n";
97 }
98
99 // Cache Control
100 header("Cache-Control: must-revalidate");
101
102 // Checking if the client is validating his cache and if it is current.
103 if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $filetime)) {
104
105 // Client's cache IS current, so we just respond '304 Not Modified'.
106 header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 304);
107
108 return;
109
110 }else{
111
112 // Image not cached or cache outdated, we respond '200 OK' and output the image.
113 header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 200);
114
115 }
116
117 echo $data;
118
119
120