PluginProbe
Page Builder: Pagelayer – Drag and Drop website builder / 1.0.5
Page Builder: Pagelayer – Drag and Drop website builder v1.0.5
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 / css / givecss.php

givecss.php in Page Builder: Pagelayer – Drag and Drop website builder 1.0.5, at css/givecss.php

104 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 //////////////////////////////////////////////////////////////
4 //===========================================================
5 // givecss.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 CSS
28 'pagelayer-editor.css',
29 'pagelayer-icons.css',
30 'pagelayer-editor-frontend.css',
31 'trumbowyg.min.css',
32 'pen.css',
33 // Enduser CSS
34 'font-awesome5.min.css',
35 'font-awesome5-v4shims.css',
36 'nivo-lightbox.css',
37 'owl.carousel.min.css',
38 'owl.theme.default.min.css',
39 'pagelayer-frontend.css',
40 'premium-frontend.css',
41 'animate.min.css',
42 'chartist.min.css',
43 );
44
45 // What files to give
46 $give = @$_REQUEST['give'];
47
48 if(!empty($give)){
49
50 $give = explode(',', $give);
51
52 // Check all files are in the supported list
53 foreach($give as $file){
54 if(in_array($file, $files)){
55 $final[md5($file)] = $file;
56 }
57 }
58
59 }
60
61
62 // Give all
63 if(empty($final)){
64 $final = $files;
65 }
66
67 foreach($final as $k => $v){
68 //echo $k.'<br>';
69 $data .= file_get_contents($self_path.'/'.$v)."\n\n";
70 }
71
72 // We are zipping if possible
73 if(function_exists('ob_gzhandler')){
74 ob_start('ob_gzhandler');
75 }
76
77 // Type CSS
78 header("Content-type: text/css; charset: UTF-8");
79
80 // Set a zero Mtime
81 $filetime = filemtime($self_path.'/pagelayer-editor.css');
82
83 // Cache Control
84 header("Cache-Control: must-revalidate");
85
86 // Checking if the client is validating his cache and if it is current.
87 if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $filetime)) {
88
89 // Client's cache IS current, so we just respond '304 Not Modified'.
90 header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 304);
91
92 return;
93
94 }else{
95
96 // Image not cached or cache outdated, we respond '200 OK' and output the image.
97 header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 200);
98
99 }
100
101 echo $data;
102
103
104