1 | <?php
|
---|
2 | define('WP_ADMIN', TRUE);
|
---|
3 | require_once('../../../wp-load.php');
|
---|
4 | require_once(ABSPATH . 'wp-admin/includes/admin.php');
|
---|
5 | require_once('json.php');
|
---|
6 | require_once('lib.php');
|
---|
7 | $json = new Services_JSON();
|
---|
8 | $var = stripslashes(urldecode($_GET['v']));
|
---|
9 | //print_r($var);
|
---|
10 | $var_arr = $json->decode($var);
|
---|
11 | //print_r($var_arr);
|
---|
12 | $img = $var_arr->imgsrc;
|
---|
13 | $xs = $var_arr->xcoord;
|
---|
14 | $ys = $var_arr->ycoord;
|
---|
15 | $caption = $var_arr->caption;
|
---|
16 | $caption2 = implode(', ',$var_arr->caption);
|
---|
17 | $s = @getimagesize($img);
|
---|
18 | $id = $var_arr->id;
|
---|
19 | $wpfbg = new wpfbg();
|
---|
20 | ?>
|
---|
21 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
---|
22 | <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
|
---|
23 | <head profile="http://gmpg.org/xfn/11">
|
---|
24 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
---|
25 | <title><?=$caption2?></title>
|
---|
26 | <?php $wpfbg->print_blogjs(false); ?>
|
---|
27 | <style>
|
---|
28 | body{margin:0;padding:0;}
|
---|
29 | </style>
|
---|
30 | </head>
|
---|
31 | <body>
|
---|
32 |
|
---|
33 | <?php
|
---|
34 | $wpfbg->map_Start($img, $id);
|
---|
35 | if (is_array($xs)) {
|
---|
36 | foreach($xs as $key=>$x) {
|
---|
37 | $xn = round(($x / 100) * $s[0]);
|
---|
38 | $yn = round(($ys[$key] / 100) * $s[1]);
|
---|
39 | $wpfbg->map_Entry($caption[$key], $xn, $yn, 150, 150, $id);
|
---|
40 | }
|
---|
41 | } else {
|
---|
42 | $wpfbg->map_Entry($caption, $x, $y, 150, 150, $id);
|
---|
43 | }
|
---|
44 | $wpfbg->map_End();
|
---|
45 | ?>
|
---|
46 | </body>
|
---|
47 | </html>
|
---|