forked from nodesman/wp-autoresponder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proxy.php
31 lines (27 loc) · 883 Bytes
/
proxy.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
<?php
$parameters_to_files = array(
"jqui.js"=>"jqueryui.js",
"tabber.css"=>"tabber.css",
"tabber.js"=>"tabber.js",
"jqui.css"=>"jqueryui.css",
"widget-help.png" => "images/widget-help.png"
);
if (isset($_GET['wpr-file']))
{
$name = $_GET['wpr-file'];
if (isset($parameters_to_files[$name]))
{
$plugindir = str_replace(basename(__FILE__),"",__FILE__);
$plugindir = rtrim($plugindir,"/");
if (ereg(".*\.js",$parameters_to_files[$name]))
header("Content-Type: text/javascript");
else if (ereg(".*\.css",$parameters_to_files[$name]))
header("Content-Type: text/css");
else if (ereg(".*\.png",$parameters_to_files[$name]))
header("Content-Type: image/png");
$file_path = $plugindir."/".$parameters_to_files[$name];
readfile($file_path);
exit;
}
}
?>