mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 04:09:55 +09:00
변수형 설정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5222 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
935d26cf8d
commit
d2a7cbc43b
1 changed files with 10 additions and 2 deletions
|
|
@ -99,7 +99,7 @@
|
|||
function transHTML($xml_obj) {
|
||||
$x = $xml_obj->attrs->x;
|
||||
$y = $xml_obj->attrs->y;
|
||||
$marker = $xml_obj->attrs->marker;
|
||||
$marker = urlencode($xml_obj->attrs->marker);
|
||||
$style = $xml_obj->attrs->style;
|
||||
|
||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$style,$matches);
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
if(!$width) $width = 400;
|
||||
if(!$height) $height = 400;
|
||||
|
||||
$body_code = sprintf('<div style="width:%dpx;height:%dpx;margin-bottom:5px;"><iframe src="%s?module=editor&act=procEditorCall&method=displayMap&component=naver_map&width=%s&height=%s&x=%s&y=%s&marker=%s" frameBorder="0" style="padding:1px; border:1px solid #AAAAAA;width:%dpx;height:%dpx;margin:0px;"></iframe></div>', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $marker, $width, $height);
|
||||
$body_code = sprintf('<div style="width:%dpx;height:%dpx;margin-bottom:5px;"><iframe src="%s?module=editor&act=procEditorCall&method=displayMap&component=naver_map&width=%d&height=%d&x=%f&y=%f&marker=%s" frameBorder="0" style="padding:1px; border:1px solid #AAAAAA;width:%dpx;height:%dpx;margin:0px;"></iframe></div>', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $marker, $width, $height);
|
||||
return $body_code;
|
||||
}
|
||||
|
||||
|
|
@ -117,15 +117,19 @@
|
|||
|
||||
$width = Context::get('width');
|
||||
if(!$width) $width = 640;
|
||||
settype($width,"float");
|
||||
|
||||
$height = Context::get('height');
|
||||
if(!$height) $height = 480;
|
||||
settype($height,"float");
|
||||
|
||||
$x = Context::get('x');
|
||||
if(!$x) $x = 321198;
|
||||
settype($x,"int");
|
||||
|
||||
$y = Context::get('y');
|
||||
if(!$y) $y = 529730;
|
||||
settype($y,"int");
|
||||
|
||||
$marker = Context::get('marker');
|
||||
|
||||
|
|
@ -160,6 +164,10 @@
|
|||
$marker_list = explode('|@|', $marker);
|
||||
$icon_no = 0;
|
||||
for($i=0;$i<count($marker_list);$i++) {
|
||||
$marker_list[$i] = explode(',', $marker_list[$i]);
|
||||
settype($marker_list[$i][0],"int");
|
||||
settype($marker_list[$i][1],"int");
|
||||
$marker_list[$i] = $marker_list[$i][0].','.$marker_list[$i][1];
|
||||
$pos = trim($marker_list[$i]);
|
||||
if(!$pos) continue;
|
||||
$icon_url = 'http://static.naver.com/local/map_img/set/icos_free_'.chr(ord('a')+$icon_no).'.gif';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue