Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84009dc16c | ||
|
|
82c12f6d98 | ||
|
|
6beff3a333 | ||
|
|
d49200c99e | ||
|
|
faed6ac09a | ||
|
|
9256a5618b | ||
|
|
a52858fc6d | ||
|
|
2ccc407397 | ||
|
|
d5bd57cdfa | ||
|
|
3bbbe96319 | ||
|
|
78169b372c | ||
|
|
a79a926221 | ||
|
|
f72ea8774e | ||
|
|
3c9b72d17a | ||
|
|
4b9369599c |
No files matched your search
+173
-15
@@ -12,11 +12,30 @@ if (!get_session('ss_admin')) {
|
|||||||
// 스킨디렉토리를 SELECT 형식으로 얻음
|
// 스킨디렉토리를 SELECT 형식으로 얻음
|
||||||
function get_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
function get_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||||
{
|
{
|
||||||
$skins = get_skin_dir($skin_gubun);
|
global $config;
|
||||||
|
|
||||||
|
$skins = array();
|
||||||
|
|
||||||
|
if(defined('G5_THEME_PATH') && $config['cf_theme']) {
|
||||||
|
$dirs = get_skin_dir($skin_gubun, G5_THEME_PATH.'/'.G5_SKIN_DIR);
|
||||||
|
if(!empty($dirs)) {
|
||||||
|
foreach($dirs as $dir) {
|
||||||
|
$skins[] = 'theme/'.$dir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$skins = array_merge($skins, get_skin_dir($skin_gubun));
|
||||||
|
|
||||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||||
for ($i=0; $i<count($skins); $i++) {
|
for ($i=0; $i<count($skins); $i++) {
|
||||||
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
||||||
$str .= option_selected($skins[$i], $selected);
|
if(preg_match('#^theme/(.+)$#', $skins[$i], $match))
|
||||||
|
$text = '(테마) '.$match[1];
|
||||||
|
else
|
||||||
|
$text = $skins[$i];
|
||||||
|
|
||||||
|
$str .= option_selected($skins[$i], $selected, $text);
|
||||||
}
|
}
|
||||||
$str .= "</select>";
|
$str .= "</select>";
|
||||||
return $str;
|
return $str;
|
||||||
@@ -25,11 +44,30 @@ function get_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
|||||||
// 모바일 스킨디렉토리를 SELECT 형식으로 얻음
|
// 모바일 스킨디렉토리를 SELECT 형식으로 얻음
|
||||||
function get_mobile_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
function get_mobile_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||||
{
|
{
|
||||||
$skins = get_skin_dir($skin_gubun, G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
global $config;
|
||||||
|
|
||||||
|
$skins = array();
|
||||||
|
|
||||||
|
if(defined('G5_THEME_PATH') && $config['cf_theme']) {
|
||||||
|
$dirs = get_skin_dir($skin_gubun, G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||||
|
if(!empty($dirs)) {
|
||||||
|
foreach($dirs as $dir) {
|
||||||
|
$skins[] = 'theme/'.$dir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$skins = array_merge($skins, get_skin_dir($skin_gubun, G5_MOBILE_PATH.'/'.G5_SKIN_DIR));
|
||||||
|
|
||||||
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||||
for ($i=0; $i<count($skins); $i++) {
|
for ($i=0; $i<count($skins); $i++) {
|
||||||
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
||||||
$str .= option_selected($skins[$i], $selected);
|
if(preg_match('#^theme/(.+)$#', $skins[$i], $match))
|
||||||
|
$text = '(테마) '.$match[1];
|
||||||
|
else
|
||||||
|
$text = $skins[$i];
|
||||||
|
|
||||||
|
$str .= option_selected($skins[$i], $selected, $text);
|
||||||
}
|
}
|
||||||
$str .= "</select>";
|
$str .= "</select>";
|
||||||
return $str;
|
return $str;
|
||||||
@@ -44,6 +82,9 @@ function get_skin_dir($skin, $skin_path=G5_SKIN_PATH)
|
|||||||
$result_array = array();
|
$result_array = array();
|
||||||
|
|
||||||
$dirname = $skin_path.'/'.$skin.'/';
|
$dirname = $skin_path.'/'.$skin.'/';
|
||||||
|
if(!is_dir($dirname))
|
||||||
|
return;
|
||||||
|
|
||||||
$handle = opendir($dirname);
|
$handle = opendir($dirname);
|
||||||
while ($file = readdir($handle)) {
|
while ($file = readdir($handle)) {
|
||||||
if($file == '.'||$file == '..') continue;
|
if($file == '.'||$file == '..') continue;
|
||||||
@@ -57,6 +98,101 @@ function get_skin_dir($skin, $skin_path=G5_SKIN_PATH)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 테마
|
||||||
|
function get_theme_dir()
|
||||||
|
{
|
||||||
|
$result_array = array();
|
||||||
|
|
||||||
|
$dirname = G5_PATH.'/'.G5_THEME_DIR.'/';
|
||||||
|
$handle = opendir($dirname);
|
||||||
|
while ($file = readdir($handle)) {
|
||||||
|
if($file == '.'||$file == '..') continue;
|
||||||
|
|
||||||
|
if (is_dir($dirname.$file)) {
|
||||||
|
$theme_path = $dirname.$file;
|
||||||
|
if(is_file($theme_path.'/index.php') && is_file($theme_path.'/head.php') && is_file($theme_path.'/tail.php'))
|
||||||
|
$result_array[] = $file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
natsort($result_array);
|
||||||
|
|
||||||
|
return $result_array;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 테마정보
|
||||||
|
function get_theme_info($dir)
|
||||||
|
{
|
||||||
|
$info = array();
|
||||||
|
$path = G5_PATH.'/'.G5_THEME_DIR.'/'.$dir;
|
||||||
|
|
||||||
|
if(is_dir($path)) {
|
||||||
|
$screenshot = $path.'/screenshot.png';
|
||||||
|
if(is_file($screenshot)) {
|
||||||
|
$size = @getimagesize($screenshot);
|
||||||
|
|
||||||
|
if($size[2] == 3)
|
||||||
|
$screenshot_url = str_replace(G5_PATH, G5_URL, $screenshot);
|
||||||
|
}
|
||||||
|
|
||||||
|
$info['screenshot'] = $screenshot_url;
|
||||||
|
|
||||||
|
$text = $path.'/readme.txt';
|
||||||
|
if(is_file($text)) {
|
||||||
|
$content = file($text, false);
|
||||||
|
$content = array_map('trim', $content);
|
||||||
|
|
||||||
|
preg_match('#^Theme Name:(.+)$#i', $content[0], $m0);
|
||||||
|
preg_match('#^Theme URI:(.+)$#i', $content[1], $m1);
|
||||||
|
preg_match('#^Maker:(.+)$#i', $content[2], $m2);
|
||||||
|
preg_match('#^Maker URI:(.+)$#i', $content[3], $m3);
|
||||||
|
preg_match('#^Version:(.+)$#i', $content[4], $m4);
|
||||||
|
preg_match('#^Detail:(.+)$#i', $content[5], $m5);
|
||||||
|
preg_match('#^License:(.+)$#i', $content[6], $m6);
|
||||||
|
preg_match('#^License URI:(.+)$#i', $content[7], $m7);
|
||||||
|
|
||||||
|
$info['theme_name'] = trim($m0[1]);
|
||||||
|
$info['theme_uri'] = trim($m1[1]);
|
||||||
|
$info['maker'] = trim($m2[1]);
|
||||||
|
$info['maker_uri'] = trim($m3[1]);
|
||||||
|
$info['version'] = trim($m4[1]);
|
||||||
|
$info['detail'] = trim($m5[1]);
|
||||||
|
$info['license'] = trim($m6[1]);
|
||||||
|
$info['license_uri'] = trim($m7[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$info['theme_name'])
|
||||||
|
$info['theme_name'] = $dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $info;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 테마설정 정보
|
||||||
|
function get_theme_config_value($dir, $key='*')
|
||||||
|
{
|
||||||
|
$tconfig = array();
|
||||||
|
|
||||||
|
$theme_config_file = G5_PATH.'/'.G5_THEME_DIR.'/'.$dir.'/theme.config.php';
|
||||||
|
if(is_file) {
|
||||||
|
include($theme_config_file);
|
||||||
|
|
||||||
|
if($key == '*') {
|
||||||
|
$tconfig = $theme_config;
|
||||||
|
} else {
|
||||||
|
$keys = array_map('trim', explode(',', $key));
|
||||||
|
foreach($keys as $v) {
|
||||||
|
$tconfig[$v] = trim($theme_config[$v]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $tconfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 회원권한을 SELECT 형식으로 얻음
|
// 회원권한을 SELECT 형식으로 얻음
|
||||||
function get_member_level_select($name, $start_id=0, $end_id=10, $selected="", $event="")
|
function get_member_level_select($name, $start_id=0, $end_id=10, $selected="", $event="")
|
||||||
{
|
{
|
||||||
@@ -95,26 +231,48 @@ function get_member_id_select($name, $level, $selected="", $event="")
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 권한 검사
|
// 권한 검사
|
||||||
function auth_check($auth, $attr)
|
function auth_check($auth, $attr, $return=false)
|
||||||
{
|
{
|
||||||
global $is_admin;
|
global $is_admin;
|
||||||
|
|
||||||
if ($is_admin == 'super') return;
|
if ($is_admin == 'super') return;
|
||||||
|
|
||||||
if (!trim($auth))
|
if (!trim($auth)) {
|
||||||
alert('이 메뉴에는 접근 권한이 없습니다.\\n\\n접근 권한은 최고관리자만 부여할 수 있습니다.');
|
$msg = '이 메뉴에는 접근 권한이 없습니다.\\n\\n접근 권한은 최고관리자만 부여할 수 있습니다.';
|
||||||
|
if($return)
|
||||||
|
return $msg;
|
||||||
|
else
|
||||||
|
alert($msg);
|
||||||
|
}
|
||||||
|
|
||||||
$attr = strtolower($attr);
|
$attr = strtolower($attr);
|
||||||
|
|
||||||
if (!strstr($auth, $attr)) {
|
if (!strstr($auth, $attr)) {
|
||||||
if ($attr == 'r')
|
if ($attr == 'r') {
|
||||||
alert('읽을 권한이 없습니다.');
|
$msg = '읽을 권한이 없습니다.';
|
||||||
else if ($attr == 'w')
|
if($return)
|
||||||
alert('입력, 추가, 생성, 수정 권한이 없습니다.');
|
return $msg;
|
||||||
else if ($attr == 'd')
|
else
|
||||||
alert('삭제 권한이 없습니다.');
|
alert($msg);
|
||||||
else
|
} else if ($attr == 'w') {
|
||||||
alert('속성이 잘못 되었습니다.');
|
$msg = '입력, 추가, 생성, 수정 권한이 없습니다.';
|
||||||
|
if($return)
|
||||||
|
return $msg;
|
||||||
|
else
|
||||||
|
alert($msg);
|
||||||
|
} else if ($attr == 'd') {
|
||||||
|
$msg = '삭제 권한이 없습니다.';
|
||||||
|
if($return)
|
||||||
|
return $msg;
|
||||||
|
else
|
||||||
|
alert($msg);
|
||||||
|
} else {
|
||||||
|
$msg = '속성이 잘못 되었습니다.';
|
||||||
|
if($return)
|
||||||
|
return $msg;
|
||||||
|
else
|
||||||
|
alert($msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ $menu['menu100'] = array (
|
|||||||
array('100000', '환경설정', G5_ADMIN_URL.'/config_form.php', 'config'),
|
array('100000', '환경설정', G5_ADMIN_URL.'/config_form.php', 'config'),
|
||||||
array('', '기본환경설정', G5_ADMIN_URL.'/config_form.php', 'cf_basic'),
|
array('', '기본환경설정', G5_ADMIN_URL.'/config_form.php', 'cf_basic'),
|
||||||
array('', '관리권한설정', G5_ADMIN_URL.'/auth_list.php', 'cf_auth'),
|
array('', '관리권한설정', G5_ADMIN_URL.'/auth_list.php', 'cf_auth'),
|
||||||
|
array('', '테마설정', G5_ADMIN_URL.'/theme.php', 'cf_theme', 1),
|
||||||
array('', '메뉴설정', G5_ADMIN_URL.'/menu_list.php', 'cf_menu', 1),
|
array('', '메뉴설정', G5_ADMIN_URL.'/menu_list.php', 'cf_menu', 1),
|
||||||
array('100300', '메일 테스트', G5_ADMIN_URL.'/sendmail_test.php', 'cf_mailtest'),
|
array('100300', '메일 테스트', G5_ADMIN_URL.'/sendmail_test.php', 'cf_mailtest'),
|
||||||
array('100310', '팝업레이어관리', G5_ADMIN_URL.'/newwinlist.php', 'scf_poplayer'),
|
array('100310', '팝업레이어관리', G5_ADMIN_URL.'/newwinlist.php', 'scf_poplayer'),
|
||||||
|
|||||||
@@ -8,5 +8,6 @@ $menu['menu300'] = array (
|
|||||||
array('300500', '1:1문의설정', ''.G5_ADMIN_URL.'/qa_config.php', 'qa'),
|
array('300500', '1:1문의설정', ''.G5_ADMIN_URL.'/qa_config.php', 'qa'),
|
||||||
array('300600', '내용관리', G5_ADMIN_URL.'/contentlist.php', 'scf_contents', 1),
|
array('300600', '내용관리', G5_ADMIN_URL.'/contentlist.php', 'scf_contents', 1),
|
||||||
array('300700', 'FAQ관리', G5_ADMIN_URL.'/faqmasterlist.php', 'scf_faq', 1),
|
array('300700', 'FAQ관리', G5_ADMIN_URL.'/faqmasterlist.php', 'scf_faq', 1),
|
||||||
|
array('300820', '글,댓글 현황', G5_ADMIN_URL.'/write_count.php', 'scf_write_count'),
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
+34
-4
@@ -153,10 +153,9 @@ $pg_anchor = '<ul class="anchor">
|
|||||||
$frm_submit = '<div class="btn_confirm01 btn_confirm">
|
$frm_submit = '<div class="btn_confirm01 btn_confirm">
|
||||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||||
<a href="./board_list.php?'.$qstr.'">목록</a>'.PHP_EOL;
|
<a href="./board_list.php?'.$qstr.'">목록</a>'.PHP_EOL;
|
||||||
if ($w == 'u') $frm_submit .= ' <a href="./board_copy.php?bo_table='.$bo_table.'" id="board_copy" target="win_board_copy">게시판복사</a>
|
if ($w == 'u') $frm_submit .= '<a href="./board_copy.php?bo_table='.$bo_table.'" id="board_copy" target="win_board_copy">게시판복사</a>
|
||||||
<a href="'.G5_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'" class="btn_frmline">게시판 바로가기</a>
|
<a href="'.G5_BBS_URL.'/board.php?bo_table='.$board['bo_table'].'" class="btn_frmline">게시판 바로가기</a>
|
||||||
<a href="./board_thumbnail_delete.php?bo_table='.$board['bo_table'].'&'.$qstr.'" onclick="return delete_confirm2(\'게시판 썸네일 파일을 삭제하시겠습니까?\');">게시판 썸네일 삭제</a>
|
<a href="./board_thumbnail_delete.php?bo_table='.$board['bo_table'].'&'.$qstr.'" onclick="return delete_confirm2(\'게시판 썸네일 파일을 삭제하시겠습니까?\');">게시판 썸네일 삭제</a>'.PHP_EOL;
|
||||||
'.PHP_EOL;
|
|
||||||
$frm_submit .= '</div>';
|
$frm_submit .= '</div>';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@@ -1118,7 +1117,7 @@ $frm_submit .= '</div>';
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<?php echo $frm_submit; ?>
|
<?php echo preg_replace('#</div>$#i', '<button type="button" class="get_theme_galc">테마 이미지설정 가져오기</button></div>', $frm_submit); ?>
|
||||||
|
|
||||||
<section id="anc_bo_point">
|
<section id="anc_bo_point">
|
||||||
<h2 class="h2_frm">게시판 포인트 설정</h2>
|
<h2 class="h2_frm">게시판 포인트 설정</h2>
|
||||||
@@ -1240,6 +1239,37 @@ $(function(){
|
|||||||
window.open(this.href, "win_board_copy", "left=10,top=10,width=500,height=400");
|
window.open(this.href, "win_board_copy", "left=10,top=10,width=500,height=400");
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".get_theme_galc").on("click", function() {
|
||||||
|
if(!confirm("현재 테마의 게시판 이미지 설정을 적용하시겠습니까?"))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "./theme_config_load.php",
|
||||||
|
cache: false,
|
||||||
|
async: false,
|
||||||
|
data: { type: "board" },
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data) {
|
||||||
|
if(data.error) {
|
||||||
|
alert(data.error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var field = Array('bo_gallery_cols', 'bo_gallery_width', 'bo_gallery_height', 'bo_mobile_gallery_width', 'bo_mobile_gallery_height', 'bo_image_width');
|
||||||
|
var count = field.length;
|
||||||
|
var key;
|
||||||
|
|
||||||
|
for(i=0; i<count; i++) {
|
||||||
|
key = field[i];
|
||||||
|
|
||||||
|
if(data[key] != undefined && data[key] != "")
|
||||||
|
$("input[name="+key+"]").val(data[key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function board_copy(bo_table) {
|
function board_copy(bo_table) {
|
||||||
|
|||||||
+51
-119
@@ -9,12 +9,9 @@ $token = get_token();
|
|||||||
if ($is_admin != 'super')
|
if ($is_admin != 'super')
|
||||||
alert('최고관리자만 접근 가능합니다.');
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
|
|
||||||
if (!isset($config['cf_include_index'])) {
|
if (!isset($config['cf_add_script'])) {
|
||||||
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
ADD `cf_include_index` VARCHAR(255) NOT NULL AFTER `cf_admin`,
|
ADD `cf_add_script` TEXT NOT NULL AFTER `cf_admin_email_name` ", true);
|
||||||
ADD `cf_include_head` VARCHAR(255) NOT NULL AFTER `cf_include_index`,
|
|
||||||
ADD `cf_include_tail` VARCHAR(255) NOT NULL AFTER `cf_include_head`,
|
|
||||||
ADD `cf_add_script` TEXT NOT NULL AFTER `cf_include_tail` ", true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($config['cf_mobile_new_skin'])) {
|
if (!isset($config['cf_mobile_new_skin'])) {
|
||||||
@@ -212,7 +209,7 @@ $frm_submit = '<div class="btn_confirm01 btn_confirm">
|
|||||||
if (!$config['cf_icode_server_ip']) $config['cf_icode_server_ip'] = '211.172.232.124';
|
if (!$config['cf_icode_server_ip']) $config['cf_icode_server_ip'] = '211.172.232.124';
|
||||||
if (!$config['cf_icode_server_port']) $config['cf_icode_server_port'] = '7295';
|
if (!$config['cf_icode_server_port']) $config['cf_icode_server_port'] = '7295';
|
||||||
|
|
||||||
if ($config['cf_icode_id'] && $config['cf_icode_pw']) {
|
if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||||
$userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']);
|
$userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -341,105 +338,41 @@ if ($config['cf_icode_id'] && $config['cf_icode_pw']) {
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="cf_new_skin">최근게시물 스킨<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="cf_new_skin">최근게시물 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="cf_new_skin" id="cf_new_skin" required class="required">
|
<?php echo get_skin_select('new', 'cf_new_skin', 'cf_new_skin', $config['cf_new_skin'], 'required'); ?>
|
||||||
<?php
|
|
||||||
$arr = get_skin_dir('new');
|
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
|
||||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
|
||||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_new_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
<th scope="row"><label for="cf_mobile_new_skin">모바일<br>최근게시물 스킨<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="cf_mobile_new_skin">모바일<br>최근게시물 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="cf_mobile_new_skin" id="cf_mobile_new_skin" required class="required">
|
<?php echo get_mobile_skin_select('new', 'cf_mobile_new_skin', 'cf_mobile_new_skin', $config['cf_mobile_new_skin'], 'required'); ?>
|
||||||
<?php
|
|
||||||
$arr = get_skin_dir('new', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
|
||||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
|
||||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_new_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="cf_search_skin">검색 스킨<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="cf_search_skin">검색 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="cf_search_skin" id="cf_search_skin" required class="required">
|
<?php echo get_skin_select('search', 'cf_search_skin', 'cf_search_skin', $config['cf_search_skin'], 'required'); ?>
|
||||||
<?php
|
|
||||||
$arr = get_skin_dir('search');
|
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
|
||||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
|
||||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_search_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
<th scope="row"><label for="cf_mobile_search_skin">모바일 검색 스킨<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="cf_mobile_search_skin">모바일 검색 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="cf_mobile_search_skin" id="cf_mobile_search_skin" required class="required">
|
<?php echo get_mobile_skin_select('search', 'cf_mobile_search_skin', 'cf_mobile_search_skin', $config['cf_mobile_search_skin'], 'required'); ?>
|
||||||
<?php
|
|
||||||
$arr = get_skin_dir('search', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
|
||||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
|
||||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_search_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="cf_connect_skin">접속자 스킨<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="cf_connect_skin">접속자 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="cf_connect_skin" id="cf_connect_skin" required class="required">
|
<?php echo get_skin_select('connect', 'cf_connect_skin', 'cf_connect_skin', $config['cf_connect_skin'], 'required'); ?>
|
||||||
<?php
|
|
||||||
$arr = get_skin_dir('connect');
|
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
|
||||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
|
||||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_connect_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
<th scope="row"><label for="cf_mobile_connect_skin">모바일 접속자 스킨<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="cf_mobile_connect_skin">모바일 접속자 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="cf_mobile_connect_skin" id="cf_mobile_connect_skin" required class="required">
|
<?php echo get_mobile_skin_select('connect', 'cf_mobile_connect_skin', 'cf_mobile_connect_skin', $config['cf_mobile_connect_skin'], 'required'); ?>
|
||||||
<?php
|
|
||||||
$arr = get_skin_dir('connect', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
|
||||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
|
||||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_connect_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="cf_faq_skin">FAQ 스킨<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="cf_faq_skin">FAQ 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="cf_faq_skin" id="cf_faq_skin" required class="required">
|
<?php echo get_skin_select('faq', 'cf_faq_skin', 'cf_faq_skin', $config['cf_faq_skin'], 'required'); ?>
|
||||||
<?php
|
|
||||||
$arr = get_skin_dir('faq');
|
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
|
||||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
|
||||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_faq_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
<th scope="row"><label for="cf_mobile_faq_skin">모바일 FAQ 스킨<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="cf_mobile_faq_skin">모바일 FAQ 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="cf_mobile_faq_skin" id="cf_mobile_faq_skin" required class="required">
|
<?php echo get_mobile_skin_select('faq', 'cf_mobile_faq_skin', 'cf_mobile_faq_skin', $config['cf_mobile_faq_skin'], 'required'); ?>
|
||||||
<?php
|
|
||||||
$arr = get_skin_dir('faq', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
|
||||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
|
||||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_faq_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -532,7 +465,7 @@ if ($config['cf_icode_id'] && $config['cf_icode_pw']) {
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<?php echo $frm_submit; ?>
|
<?php echo preg_replace('#</div>$#i', '<button type="button" class="get_theme_confc" data-type="conf_skin">테마 스킨설정 가져오기</button></div>', $frm_submit); ?>
|
||||||
|
|
||||||
<section id="anc_cf_board">
|
<section id="anc_cf_board">
|
||||||
<h2 class="h2_frm">게시판 기본 설정</h2>
|
<h2 class="h2_frm">게시판 기본 설정</h2>
|
||||||
@@ -636,27 +569,11 @@ if ($config['cf_icode_id'] && $config['cf_icode_pw']) {
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="cf_member_skin">회원 스킨<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="cf_member_skin">회원 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="cf_member_skin" id="cf_member_skin" required class="required">
|
<?php echo get_skin_select('member', 'cf_member_skin', 'cf_member_skin', $config['cf_member_skin'], 'required'); ?>
|
||||||
<?php
|
|
||||||
$arr = get_skin_dir('member');
|
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
|
||||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
|
||||||
echo '<option value="'.$arr[$i].'"'.get_selected($config['cf_member_skin'], $arr[$i]).'>'.$arr[$i].'</option>'."\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
<th scope="row"><label for="cf_mobile_member_skin">모바일<br>회원 스킨<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="cf_mobile_member_skin">모바일<br>회원 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="cf_mobile_member_skin" id="cf_mobile_member_skin" required class="required">
|
<?php echo get_mobile_skin_select('member', 'cf_mobile_member_skin', 'cf_mobile_member_skin', $config['cf_mobile_member_skin'], 'required'); ?>
|
||||||
<?php
|
|
||||||
$arr = get_skin_dir('member', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
|
||||||
for ($i=0; $i<count($arr); $i++) {
|
|
||||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
|
||||||
echo '<option value="'.$arr[$i].'"'.get_selected($config['cf_mobile_member_skin'], $arr[$i]).'>'.$arr[$i].'</option>'."\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -761,7 +678,7 @@ if ($config['cf_icode_id'] && $config['cf_icode_pw']) {
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<?php echo $frm_submit; ?>
|
<?php echo preg_replace('#</div>$#i', '<button type="button" class="get_theme_confc" data-type="conf_member">테마 회원스킨설정 가져오기</button></div>', $frm_submit); ?>
|
||||||
|
|
||||||
<section id="anc_cf_cert">
|
<section id="anc_cf_cert">
|
||||||
<h2 class="h2_frm">본인확인 설정</h2>
|
<h2 class="h2_frm">본인확인 설정</h2>
|
||||||
@@ -1082,27 +999,6 @@ if ($config['cf_icode_id'] && $config['cf_icode_pw']) {
|
|||||||
<col>
|
<col>
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
|
||||||
<th scope="row"><label for="cf_include_index">초기화면 파일 경로</label></th>
|
|
||||||
<td>
|
|
||||||
<?php echo help('입력이 없으면 index.php가 초기화면 파일로 설정됩니다.<br>초기화면 파일은 index.php 파일과 동일한 위치에 존재해야 합니다.') ?>
|
|
||||||
<input type="text" name="cf_include_index" value="<?php echo $config['cf_include_index'] ?>" id="cf_include_index" class="frm_input" size="50">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row"><label for="cf_include_head">상단 파일 경로</label></th>
|
|
||||||
<td>
|
|
||||||
<?php echo help('입력이 없으면 head.php가 상단 파일로 설정됩니다.<br>상단 파일은 head.php 파일과 동일한 위치에 존재해야 합니다.') ?>
|
|
||||||
<input type="text" name="cf_include_head" value="<?php echo $config['cf_include_head'] ?>" id="cf_include_head" class="frm_input" size="50">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row"><label for="cf_include_tail">하단 파일 경로</label></th>
|
|
||||||
<td>
|
|
||||||
<?php echo help('입력이 없으면 tail.php가 하단 파일로 설정됩니다.<br>초기화면 파일은 tail.php 파일과 동일한 위치에 존재해야 합니다.') ?>
|
|
||||||
<input type="text" name="cf_include_tail" value="<?php echo $config['cf_include_tail'] ?>" id="cf_include_tail" class="frm_input" size="50">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="cf_add_script">추가 script, css</label></th>
|
<th scope="row"><label for="cf_add_script">추가 script, css</label></th>
|
||||||
<td>
|
<td>
|
||||||
@@ -1250,6 +1146,42 @@ $(function(){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".get_theme_confc").on("click", function() {
|
||||||
|
var type = $(this).data("type");
|
||||||
|
var msg = "기본환경 스킨 설정";
|
||||||
|
if(type == "conf_member")
|
||||||
|
msg = "기본환경 회원스킨 설정";
|
||||||
|
|
||||||
|
if(!confirm("현재 테마의 "+msg+"을 적용하시겠습니까?"))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "./theme_config_load.php",
|
||||||
|
cache: false,
|
||||||
|
async: false,
|
||||||
|
data: { type: type },
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data) {
|
||||||
|
if(data.error) {
|
||||||
|
alert(data.error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var field = Array('cf_member_skin', 'cf_mobile_member_skin', 'cf_new_skin', 'cf_mobile_new_skin', 'cf_search_skin', 'cf_mobile_search_skin', 'cf_connect_skin', 'cf_mobile_connect_skin', 'cf_faq_skin', 'cf_mobile_faq_skin');
|
||||||
|
var count = field.length;
|
||||||
|
var key;
|
||||||
|
|
||||||
|
for(i=0; i<count; i++) {
|
||||||
|
key = field[i];
|
||||||
|
|
||||||
|
if(data[key] != undefined && data[key] != "")
|
||||||
|
$("select[name="+key+"]").val(data[key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function fconfigform_submit(f)
|
function fconfigform_submit(f)
|
||||||
|
|||||||
@@ -29,9 +29,6 @@ $sql = " update {$g5['config_table']}
|
|||||||
cf_admin = '{$_POST['cf_admin']}',
|
cf_admin = '{$_POST['cf_admin']}',
|
||||||
cf_admin_email = '{$_POST['cf_admin_email']}',
|
cf_admin_email = '{$_POST['cf_admin_email']}',
|
||||||
cf_admin_email_name = '{$_POST['cf_admin_email_name']}',
|
cf_admin_email_name = '{$_POST['cf_admin_email_name']}',
|
||||||
cf_include_index = '{$_POST['cf_include_index']}',
|
|
||||||
cf_include_head = '{$_POST['cf_include_head']}',
|
|
||||||
cf_include_tail = '{$_POST['cf_include_tail']}',
|
|
||||||
cf_add_script = '{$_POST['cf_add_script']}',
|
cf_add_script = '{$_POST['cf_add_script']}',
|
||||||
cf_use_point = '{$_POST['cf_use_point']}',
|
cf_use_point = '{$_POST['cf_use_point']}',
|
||||||
cf_point_term = '{$_POST['cf_point_term']}',
|
cf_point_term = '{$_POST['cf_point_term']}',
|
||||||
|
|||||||
@@ -714,3 +714,48 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
|||||||
.sevice_2 .svc_sms .svc_btn a{display:inline-block; background:#f8f8f8;width:100%;text-align:center;margin:0;padding:10px 0 0 }
|
.sevice_2 .svc_sms .svc_btn a{display:inline-block; background:#f8f8f8;width:100%;text-align:center;margin:0;padding:10px 0 0 }
|
||||||
.sevice_2 .svc_design{overflow:hidden;height:210px;position:relative}
|
.sevice_2 .svc_design{overflow:hidden;height:210px;position:relative}
|
||||||
.sevice_2 .svc_design .svc_btn a{margin:0 0 20px}
|
.sevice_2 .svc_design .svc_btn a{margin:0 0 20px}
|
||||||
|
|
||||||
|
/*테마*/
|
||||||
|
.theme_p{padding:0 20px}
|
||||||
|
#theme_list{padding:0;margin:0 10px;list-style:none; width: 1000px;position:relative}
|
||||||
|
#theme_list:after{display:block;visibility:hidden;clear:both;content:""}
|
||||||
|
#theme_list li{padding:10px;margin:0;float:left;width:302px}
|
||||||
|
#theme_list li:after{display:block;visibility:hidden;clear:both;content:""}
|
||||||
|
#theme_list li .tmli_if{border: 1px solid #d1dee2;width:300px;}
|
||||||
|
#theme_list li .tmli_if>img{width:300px;height:225px;}
|
||||||
|
#theme_list li .tmli_if:hover>img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";filter: alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5;opacity: 0.5;}
|
||||||
|
#theme_list li .tmli_tit{position:relative; border-top: 1px solid #d1dee2; background: #e5ecef;}
|
||||||
|
#theme_list li .tmli_tit p{height:40px;line-height:40px;padding:0 10px 0;font-weight:bold;text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
|
||||||
|
#theme_list li .tmli_tit button.tmli_dt{position:absolute;top:8px;right:10px;padding:5px;background:#111;color:#fff;display:none;border:none}
|
||||||
|
#theme_list li .tmli_if:hover button.tmli_dt{display:block}
|
||||||
|
#theme_list li .theme_sl{float:left;border:none;margin-top:5px;padding:0 5px;height:26px;background:#999;color:#fff}
|
||||||
|
#theme_list li .theme_sl:hover{background:#ff3061}
|
||||||
|
#theme_list li .theme_deactive{margin-left:4px}
|
||||||
|
#theme_list li .theme_sl_use{background:#ff3061;line-height:26px}
|
||||||
|
#theme_list li .theme_pr{float:right;margin-top:5px;padding:0 5px;height:24px;line-height:24px; border: 1px solid #ccc; background: #fafafa; }
|
||||||
|
#theme_list li .theme_preview{ float: right; margin-top: 5px; padding:0 5px;height:26px; border: 1px solid #ccc; background: #fafafa; margin-right:3px}
|
||||||
|
|
||||||
|
#theme_detail{position:fixed;_position:absolute;top:50%;left:20px;_top:300px;width:950px;height:490px;margin-top:-245px;background:#fff;border:1px solid #000;z-index:99999;}
|
||||||
|
#theme_detail .thdt_img{padding:20px 0 20px 20px;float:left;}
|
||||||
|
#theme_detail .thdt_img img{width:600px;height:450px;}
|
||||||
|
#theme_detail .thdt_if{float:right;width:290px;padding:40px 20px 0 0;position:relative}
|
||||||
|
#theme_detail .thdt_if h2{padding:0 ;margin:0}
|
||||||
|
#theme_detail .thdt_if p{font-weight:normal;padding:10px;background:#f5f5f5;height:250px;overflow-y:auto;}
|
||||||
|
#theme_detail .thdt_if a{vertical-align:middle;}
|
||||||
|
#theme_detail .thdt_if .thdt_home{background:url(../img/link_icon.gif) no-repeat bottom right;padding-right:13px;}
|
||||||
|
#theme_detail .close_btn{position:absolute;top:10px;right:10px;background:url(../img/close.gif) no-repeat 50% 50%;border:none;width:30px;height:30px;overflow:hidden;text-indent:-9999px;}
|
||||||
|
#theme_detail table{border-collapse:collapse;margin:5px 0 10px}
|
||||||
|
#theme_detail table th{padding: 5px 0; border: 1px solid #d1dee2; background: #e5ecef;width:50px;padding:10px;text-align:left}
|
||||||
|
#theme_detail table td{ border: 1px solid #ececec;padding:10px}
|
||||||
|
.no_theme{text-align:center;padding:100px 0;color:#555}
|
||||||
|
|
||||||
|
/*글,댓글현황*/
|
||||||
|
#wr_cont{position:relative;margin:10px 20px}
|
||||||
|
#wr_cont input[type="submit"]{background:#ff3061;border:none;color:#fff;padding: 0 5px;height: 24px;}
|
||||||
|
#wr_cont select{height: 24px;}
|
||||||
|
#grp_color{border:2px solid #ddd;position:absolute;top:0;right:0;list-style:none;padding: 5px 5px; margin:0;}
|
||||||
|
#grp_color li{padding:5px 10px;}
|
||||||
|
#grp_color li span{width:10px;height:10px; display:inline-block;background:rgb(75, 178, 197);margin-right:5px;}
|
||||||
|
#grp_color li.color2 span{background:rgb(234, 162, 40);}
|
||||||
|
#chart_wr h5{text-align:center;border:1px solid #eee;padding:30px 0}
|
||||||
|
#chart_wr{margin:20px }
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
@charset "utf-8";
|
||||||
|
#preview_item{height:50px}
|
||||||
|
#preview_item ul{margin:0;padding:0;top:0;width:100%;border-bottom:1px solid #eee; margin:0 auto;text-align:center;background:#333;position:fixed;top:0;z-index:999999;width:100%;}
|
||||||
|
#preview_item ul li{list-style:none;display:inline-block;height:50px;line-height:50px;padding:0 3px;*display:inline; zoom:1;}
|
||||||
|
#preview_item ul li a{color:#555;padding:0 8px;height:24px;line-height:24px;background:#f2f2f2;border-radius:3px;display:inline-block;vertical-align:middle;border:1px solid #dcdcdc;}
|
||||||
|
#preview_item ul li a:hover{background:#ccc;text-decoration:none;border:1px solid #ccc;}
|
||||||
|
#preview_item ul li button{color:#fff;padding:0 8px;background:#FF5191;border-radius:3px;height:26px;line-height:24px;vertical-align:middle;border:none}
|
||||||
|
#preview_item ul li button:hover{background:#e40d5c;color:#fff;text-decoration:none;}
|
||||||
+1
-1
@@ -8,7 +8,7 @@ auth_check($auth[$sub_menu], "w");
|
|||||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||||
$fm = sql_fetch($sql);
|
$fm = sql_fetch($sql);
|
||||||
|
|
||||||
$html_title = 'FAQ '.$fm['fm_subject'];;
|
$html_title = 'FAQ '.$fm['fm_subject'];
|
||||||
|
|
||||||
if ($w == "u")
|
if ($w == "u")
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 200 B |
Binary file not shown.
|
After Width: | Height: | Size: 53 B |
Binary file not shown.
|
After Width: | Height: | Size: 7.8 KiB |
+3
-5
@@ -214,11 +214,9 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="mb_zip1">주소</label></th>
|
<th scope="row"><label for="mb_zip1">주소</label></th>
|
||||||
<td colspan="3" class="td_addr_line">
|
<td colspan="3" class="td_addr_line">
|
||||||
<label for="mb_zip1" class="sound_only">우편번호 앞자리</label>
|
<label for="mb_zip" class="sound_only">우편번호</label>
|
||||||
<input type="text" name="mb_zip1" value="<?php echo $mb['mb_zip1'] ?>" id="mb_zip1" class="frm_input readonly" size="3" maxlength="3"> -
|
<input type="text" name="mb_zip" value="<?php echo $mb['mb_zip1'].$mb['mb_zip2']; ?>" id="mb_zip" class="frm_input readonly" size="5" maxlength="6">
|
||||||
<label for="mb_zip2" class="sound_only">우편번호 뒷자리</label>
|
<button type="button" class="btn_frmline" onclick="win_zip('fmember', 'mb_zip', 'mb_addr1', 'mb_addr2', 'mb_addr3', 'mb_addr_jibeon');">주소 검색</button><br>
|
||||||
<input type="text" name="mb_zip2" value="<?php echo $mb['mb_zip2'] ?>" id="mb_zip2" class="frm_input readonly" size="3" maxlength="3">
|
|
||||||
<button type="button" class="btn_frmline" onclick="win_zip('fmember', 'mb_zip1', 'mb_zip2', 'mb_addr1', 'mb_addr2', 'mb_addr3', 'mb_addr_jibeon');">주소 검색</button><br>
|
|
||||||
<input type="text" name="mb_addr1" value="<?php echo $mb['mb_addr1'] ?>" id="mb_addr1" class="frm_input readonly" size="60">
|
<input type="text" name="mb_addr1" value="<?php echo $mb['mb_addr1'] ?>" id="mb_addr1" class="frm_input readonly" size="60">
|
||||||
<label for="mb_addr1">기본주소</label><br>
|
<label for="mb_addr1">기본주소</label><br>
|
||||||
<input type="text" name="mb_addr2" value="<?php echo $mb['mb_addr2'] ?>" id="mb_addr2" class="frm_input" size="60">
|
<input type="text" name="mb_addr2" value="<?php echo $mb['mb_addr2'] ?>" id="mb_addr2" class="frm_input" size="60">
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ if($_POST['mb_certify_case'] && $_POST['mb_certify']) {
|
|||||||
$mb_adult = 0;
|
$mb_adult = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$mb_zip1 = substr($_POST['mb_zip'], 0, 3);
|
||||||
|
$mb_zip2 = substr($_POST['mb_zip'], 3);
|
||||||
|
|
||||||
$sql_common = " mb_name = '{$_POST['mb_name']}',
|
$sql_common = " mb_name = '{$_POST['mb_name']}',
|
||||||
mb_nick = '{$_POST['mb_nick']}',
|
mb_nick = '{$_POST['mb_nick']}',
|
||||||
mb_email = '{$_POST['mb_email']}',
|
mb_email = '{$_POST['mb_email']}',
|
||||||
@@ -37,8 +40,8 @@ $sql_common = " mb_name = '{$_POST['mb_name']}',
|
|||||||
mb_hp = '{$mb_hp}',
|
mb_hp = '{$mb_hp}',
|
||||||
mb_certify = '{$mb_certify}',
|
mb_certify = '{$mb_certify}',
|
||||||
mb_adult = '{$mb_adult}',
|
mb_adult = '{$mb_adult}',
|
||||||
mb_zip1 = '{$_POST['mb_zip1']}',
|
mb_zip1 = '$mb_zip1',
|
||||||
mb_zip2 = '{$_POST['mb_zip2']}',
|
mb_zip2 = '$mb_zip2',
|
||||||
mb_addr1 = '{$_POST['mb_addr1']}',
|
mb_addr1 = '{$_POST['mb_addr1']}',
|
||||||
mb_addr2 = '{$_POST['mb_addr2']}',
|
mb_addr2 = '{$_POST['mb_addr2']}',
|
||||||
mb_addr3 = '{$_POST['mb_addr3']}',
|
mb_addr3 = '{$_POST['mb_addr3']}',
|
||||||
|
|||||||
+2
-2
@@ -52,14 +52,14 @@ $(function() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#add_manual").live("click", function() {
|
$(document).on("click", "#add_manual", function() {
|
||||||
var me_name = $.trim($("#me_name").val());
|
var me_name = $.trim($("#me_name").val());
|
||||||
var me_link = $.trim($("#me_link").val());
|
var me_link = $.trim($("#me_link").val());
|
||||||
|
|
||||||
add_menu_list(me_name, me_link, "<?php echo $code; ?>");
|
add_menu_list(me_name, me_link, "<?php echo $code; ?>");
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".add_select").live("click", function() {
|
$(document).on("click", ".add_select", function() {
|
||||||
var me_name = $.trim($(this).siblings("input[name='subject[]']").val());
|
var me_name = $.trim($(this).siblings("input[name='subject[]']").val());
|
||||||
var me_link = $.trim($(this).siblings("input[name='link[]']").val());
|
var me_link = $.trim($(this).siblings("input[name='link[]']").val());
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -136,12 +136,12 @@ $colspan = 7;
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$(".btn_add_submenu").live("click", function() {
|
$(document).on("click", ".btn_add_submenu", function() {
|
||||||
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
||||||
add_submenu(code);
|
add_submenu(code);
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".btn_del_menu").live("click", function() {
|
$(document).on("click", ".btn_del_menu", function() {
|
||||||
if(!confirm("메뉴를 삭제하시겠습니까?"))
|
if(!confirm("메뉴를 삭제하시겠습니까?"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ $g5['title'] = "SMS 기본설정";
|
|||||||
if (!$config['cf_icode_server_ip']) $config['cf_icode_server_ip'] = '211.172.232.124';
|
if (!$config['cf_icode_server_ip']) $config['cf_icode_server_ip'] = '211.172.232.124';
|
||||||
if (!$config['cf_icode_server_port']) $config['cf_icode_server_port'] = '7295';
|
if (!$config['cf_icode_server_port']) $config['cf_icode_server_port'] = '7295';
|
||||||
|
|
||||||
if ($config['cf_icode_id'] && $config['cf_icode_pw'])
|
if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw'])
|
||||||
{
|
{
|
||||||
$userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']);
|
$userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ if ($result)
|
|||||||
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
||||||
|
|
||||||
$log = array_shift($SMS->Log);
|
$log = array_shift($SMS->Log);
|
||||||
$log = @iconv('UTF-8', 'UTF-8//IGNORE', $log);
|
$log = @iconv('euc-kr', 'utf-8', $log);
|
||||||
|
|
||||||
sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='{$row['hs_name']}', hs_hp='{$row['hs_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'", false);
|
sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='{$row['hs_name']}', hs_hp='{$row['hs_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'", false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ if ($result)
|
|||||||
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
||||||
|
|
||||||
$log = array_shift($SMS->Log);
|
$log = array_shift($SMS->Log);
|
||||||
$log = @iconv('UTF-8', 'UTF-8//IGNORE', $log);
|
$log = @iconv('euc-kr', 'utf-8', $log);
|
||||||
|
|
||||||
sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum=0, bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='".addslashes($row['bk_name'])."', hs_hp='{$row['bk_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'", false);
|
sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum=0, bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='".addslashes($row['bk_name'])."', hs_hp='{$row['bk_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'", false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
$(function() {
|
||||||
|
$(".theme_active").on("click", function() {
|
||||||
|
var theme = $(this).data("theme");
|
||||||
|
var name = $(this).data("name");
|
||||||
|
|
||||||
|
if(!confirm(name+" 테마를 적용하시겠습니까?"))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
var set_default_skin = 0;
|
||||||
|
if($(this).data("set_default_skin") == true) {
|
||||||
|
if(confirm("기본환경설정, 1:1문의 스킨을 테마에서 설정된 스킨으로 변경하시겠습니까?\n\n변경을 선택하시면 테마에서 지정된 스킨으로 회원스킨 등이 변경됩니다."))
|
||||||
|
set_default_skin = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "./theme_update.php",
|
||||||
|
data: {
|
||||||
|
"theme": theme,
|
||||||
|
"set_default_skin": set_default_skin
|
||||||
|
},
|
||||||
|
cache: false,
|
||||||
|
async: false,
|
||||||
|
success: function(data) {
|
||||||
|
if(data) {
|
||||||
|
alert(data);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.location.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".theme_deactive").on("click", function() {
|
||||||
|
var theme = $(this).data("theme");
|
||||||
|
var name = $(this).data("name");
|
||||||
|
|
||||||
|
if(!confirm(name+" 테마 사용설정을 해제하시겠습니까?\n\n테마 설정을 해제하셔도 게시판 등의 스킨은 변경되지 않으므로 개별 변경작업이 필요합니다."))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "./theme_update.php",
|
||||||
|
data: {
|
||||||
|
"theme": theme,
|
||||||
|
"type": "reset"
|
||||||
|
},
|
||||||
|
cache: false,
|
||||||
|
async: false,
|
||||||
|
success: function(data) {
|
||||||
|
if(data) {
|
||||||
|
alert(data);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.location.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".theme_preview").on("click", function() {
|
||||||
|
var theme = $(this).data("theme");
|
||||||
|
|
||||||
|
$("#theme_detail").remove();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: "./theme_detail.php",
|
||||||
|
data: {
|
||||||
|
"theme": theme
|
||||||
|
},
|
||||||
|
cache: false,
|
||||||
|
async: false,
|
||||||
|
success: function(data) {
|
||||||
|
$("#theme_list").after(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "100280";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
|
|
||||||
|
// 테마 필드 추가
|
||||||
|
if(!isset($config['cf_theme'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_theme` varchar(255) NOT NULL DEFAULT '' AFTER `cf_title` ", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$theme = get_theme_dir();
|
||||||
|
if($config['cf_theme'] && in_array($config['cf_theme'], $theme))
|
||||||
|
array_unshift($theme, $config['cf_theme']);
|
||||||
|
$theme = array_values(array_unique($theme));
|
||||||
|
$total_count = count($theme);
|
||||||
|
|
||||||
|
// 설정된 테마가 존재하지 않는다면 cf_theme 초기화
|
||||||
|
if($config['cf_theme'] && !in_array($config['cf_theme'], $theme))
|
||||||
|
sql_query(" update {$g5['config_table']} set cf_theme = '' ");
|
||||||
|
|
||||||
|
$g5['title'] = "테마설정";
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script src="<?php echo G5_ADMIN_URL; ?>/theme.js"></script>
|
||||||
|
|
||||||
|
<p class="theme_p">설치된 테마 : <?php echo number_format($total_count); ?></p>
|
||||||
|
|
||||||
|
<?php if($total_count > 0) { ?>
|
||||||
|
<ul id="theme_list">
|
||||||
|
<?php
|
||||||
|
for($i=0; $i<$total_count; $i++) {
|
||||||
|
$info = get_theme_info($theme[$i]);
|
||||||
|
|
||||||
|
$name = get_text($info['theme_name']);
|
||||||
|
if($info['screenshot'])
|
||||||
|
$screenshot = '<img src="'.$info['screenshot'].'" alt="'.$name.'">';
|
||||||
|
else
|
||||||
|
$screenshot = '<img src="'.G5_ADMIN_URL.'/img/theme_img.jpg" alt="">';
|
||||||
|
|
||||||
|
if($config['cf_theme'] == $theme[$i]) {
|
||||||
|
$btn_active = '<span class="theme_sl theme_sl_use">사용중</span><button type="button" class="theme_sl theme_deactive" data-theme="'.$theme[$i].'" '.'data-name="'.$name.'">사용안함</button>';
|
||||||
|
} else {
|
||||||
|
$tconfig = get_theme_config_value($theme[$i], 'set_default_skin');
|
||||||
|
if($tconfig['set_default_skin'])
|
||||||
|
$set_default_skin = 'true';
|
||||||
|
else
|
||||||
|
$set_default_skin = 'false';
|
||||||
|
|
||||||
|
$btn_active = '<button type="button" class="theme_sl theme_active" data-theme="'.$theme[$i].'" '.'data-name="'.$name.'" data-set_default_skin="'.$set_default_skin.'">테마적용</button>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<li>
|
||||||
|
<div class="tmli_if">
|
||||||
|
<?php echo $screenshot; ?>
|
||||||
|
<div class="tmli_tit">
|
||||||
|
<p><?php echo get_text($info['theme_name']); ?></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php echo $btn_active; ?>
|
||||||
|
<a href="./theme_preview.php?theme=<?php echo $theme[$i]; ?>" class="theme_pr" target="theme_preview">미리보기</a>
|
||||||
|
<button type="button" class="tmli_dt theme_preview" data-theme="<?php echo $theme[$i]; ?>">상세보기</button>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
<?php } else { ?>
|
||||||
|
<p class="no_theme">설치된 테마가 없습니다.</p>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300100";
|
||||||
|
include_once('./_common.php');
|
||||||
|
include_once(G5_LIB_PATH.'/json.lib.php');
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$data['error'] = '';
|
||||||
|
|
||||||
|
$data['error'] = auth_check($auth[$sub_menu], 'w', true);
|
||||||
|
if($data['error'])
|
||||||
|
die(json_encode($data));
|
||||||
|
|
||||||
|
if(!$config['cf_theme']) {
|
||||||
|
$data['error'] = '사용 중인 테마가 없습니다.';
|
||||||
|
die(json_encode($data));
|
||||||
|
}
|
||||||
|
|
||||||
|
$theme_dir = get_theme_dir();
|
||||||
|
if(!in_array($config['cf_theme'], $theme_dir)) {
|
||||||
|
$data['error'] = $config['cf_theme'].' 테마는 설치된 테마가 아닙니다.';
|
||||||
|
die(json_encode($data));
|
||||||
|
}
|
||||||
|
|
||||||
|
$type = $_POST['type'];
|
||||||
|
$arr_type = array('board', 'conf_skin', 'conf_member');
|
||||||
|
if(!in_array($type, $arr_type)) {
|
||||||
|
$data['error'] = '올바른 방법으로 이용해 주십시오.';
|
||||||
|
die(json_encode($data));
|
||||||
|
}
|
||||||
|
|
||||||
|
if($type == 'board') {
|
||||||
|
$keys = array('bo_gallery_cols', 'bo_gallery_width', 'bo_gallery_height', 'bo_mobile_gallery_width', 'bo_mobile_gallery_height', 'bo_image_width');
|
||||||
|
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
foreach($keys as $val) {
|
||||||
|
if($tconfig[$val]) {
|
||||||
|
$data[$val] = (int)preg_replace('#[^0-9]#', '', $tconfig[$val]);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($i == 0)
|
||||||
|
$data['error'] = '적용할 게시판 이미지 설정이 없습니다.';
|
||||||
|
} else if($type == 'conf_skin') {
|
||||||
|
$keys = array('cf_new_skin', 'cf_mobile_new_skin', 'cf_search_skin', 'cf_mobile_search_skin', 'cf_connect_skin', 'cf_mobile_connect_skin', 'cf_faq_skin', 'cf_mobile_faq_skin');
|
||||||
|
|
||||||
|
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
foreach($keys as $val) {
|
||||||
|
if($tconfig[$val]) {
|
||||||
|
$data[$val] = preg_match('#^theme/.+$#', $tconfig[$val]) ? $tconfig[$val] : 'theme/'.$tconfig[$val];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($i == 0)
|
||||||
|
$data['error'] = '적용할 기본환경 스킨 설정이 없습니다.';
|
||||||
|
} else if($type == 'conf_member') {
|
||||||
|
$keys = array('cf_member_skin', 'cf_mobile_member_skin');
|
||||||
|
|
||||||
|
$tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
foreach($keys as $val) {
|
||||||
|
if($tconfig[$val]) {
|
||||||
|
$data[$val] = preg_match('#^theme/.+$#', $tconfig[$val]) ? $tconfig[$val] : 'theme/'.$tconfig[$val];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($i == 0)
|
||||||
|
$data['error'] = '적용할 기본환경 회원스킨 설정이 없습니다.';
|
||||||
|
}
|
||||||
|
|
||||||
|
die(json_encode($data));
|
||||||
|
?>
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "100280";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
die('최고관리자만 접근 가능합니다.');
|
||||||
|
|
||||||
|
$theme = trim($_POST['theme']);
|
||||||
|
$theme_dir = get_theme_dir();
|
||||||
|
|
||||||
|
if(!in_array($theme, $theme_dir))
|
||||||
|
die('선택하신 테마가 설치되어 있지 않습니다.');
|
||||||
|
|
||||||
|
$info = get_theme_info($theme);
|
||||||
|
|
||||||
|
if($info['screenshot'])
|
||||||
|
$screenshot = '<img src="'.$info['screenshot'].'" alt="'.$name.'">';
|
||||||
|
else
|
||||||
|
$screenshot = '<img src="'.G5_ADMIN_URL.'/img/theme_img.jpg" alt="">';
|
||||||
|
|
||||||
|
$name = get_text($info['theme_name']);
|
||||||
|
if($info['theme_uri']) {
|
||||||
|
$name = '<a href="'.set_http($info['theme_uri']).'" target="_blank" class="thdt_home">'.$name.'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$maker = get_text($info['maker']);
|
||||||
|
if($info['maker_uri']) {
|
||||||
|
$maker = '<a href="'.set_http($info['maker_uri']).'" target="_blank" class="thdt_home">'.$maker.'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$license = get_text($info['license']);
|
||||||
|
if($info['license_uri']) {
|
||||||
|
$license = '<a href="'.set_http($info['license_uri']).'" target="_blank" class="thdt_home">'.$license.'</a>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="theme_detail">
|
||||||
|
<div class="thdt_img"><?php echo $screenshot; ?></div>
|
||||||
|
<div class="thdt_if">
|
||||||
|
<h2><?php echo $name; ?></h2>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Version</th>
|
||||||
|
<td><?php echo get_text($info['version']); ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">Maker</th>
|
||||||
|
<td><?php echo $maker; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">License</th>
|
||||||
|
<td><?php echo $license; ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<p><?php echo get_text($info['detail']); ?></p>
|
||||||
|
<button type="button" class="close_btn">닫기</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(".close_btn").on("click", function() {
|
||||||
|
$("#theme_detail").remove();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "100280";
|
||||||
|
define('_THEME_PREVIEW_', true);
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
$theme_dir = get_theme_dir();
|
||||||
|
|
||||||
|
if(!$theme || !in_array($theme, $theme_dir))
|
||||||
|
alert_close('테마가 존재하지 않거나 올바르지 않습니다.');
|
||||||
|
|
||||||
|
$info = get_theme_info($theme);
|
||||||
|
|
||||||
|
$arr_mode = array('index', 'list', 'view');
|
||||||
|
$mode = substr(strip_tags($_GET['mode']), 0, 20);
|
||||||
|
if(!in_array($mode, $arr_mode))
|
||||||
|
$mode = 'index';
|
||||||
|
|
||||||
|
$qstr_index = '&mode=index';
|
||||||
|
$qstr_list = '&mode=list';
|
||||||
|
$qstr_view = '&mode=view';
|
||||||
|
$qstr_device = '&mode='.$mode.'&device='.(G5_IS_MOBILE ? 'pc' : 'mobile');
|
||||||
|
|
||||||
|
$sql = " select bo_table, wr_parent from {$g5['board_new_table']} order by bn_id desc limit 1 ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
$bo_table = $row['bo_table'];
|
||||||
|
$board = sql_fetch(" select * from {$g5['board_table']} where bo_table = '$bo_table' ");
|
||||||
|
$write_table = $g5['write_prefix'] . $bo_table;
|
||||||
|
|
||||||
|
// theme.config.php 미리보기 게시판 스킨이 설정돼 있다면
|
||||||
|
$tconfig = get_theme_config_value($theme, 'set_default_skin, preview_board_skin, preview_mobile_board_skin');
|
||||||
|
if($mode == 'list' || $mode == 'view') {
|
||||||
|
if($tconfig['preview_board_skin'])
|
||||||
|
$board['bo_skin'] = preg_match('#^theme/.+$#', $tconfig['preview_board_skin']) ? $tconfig['preview_board_skin'] : 'theme/'.$tconfig['preview_board_skin'];
|
||||||
|
|
||||||
|
if($tconfig['preview_mobile_board_skin'])
|
||||||
|
$board['bo_mobile_skin'] = preg_match('#^theme/.+$#', $tconfig['preview_mobile_board_skin']) ? $tconfig['preview_mobile_board_skin'] : 'theme/'.$tconfig['preview_mobile_board_skin'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 스킨경로
|
||||||
|
if (G5_IS_MOBILE) {
|
||||||
|
$board_skin_path = get_skin_path('board', $board['bo_mobile_skin']);
|
||||||
|
$board_skin_url = get_skin_url('board', $board['bo_mobile_skin']);
|
||||||
|
$member_skin_path = get_skin_path('member', $config['cf_mobile_member_skin']);
|
||||||
|
$member_skin_url = get_skin_url('member', $config['cf_mobile_member_skin']);
|
||||||
|
$new_skin_path = get_skin_path('new', $config['cf_mobile_new_skin']);
|
||||||
|
$new_skin_url = get_skin_url('new', $config['cf_mobile_new_skin']);
|
||||||
|
$search_skin_path = get_skin_path('search', $config['cf_mobile_search_skin']);
|
||||||
|
$search_skin_url = get_skin_url('search', $config['cf_mobile_search_skin']);
|
||||||
|
$connect_skin_path = get_skin_path('connect', $config['cf_mobile_connect_skin']);
|
||||||
|
$connect_skin_url = get_skin_url('connect', $config['cf_mobile_connect_skin']);
|
||||||
|
$faq_skin_path = get_skin_path('faq', $config['cf_mobile_faq_skin']);
|
||||||
|
$faq_skin_url = get_skin_url('faq', $config['cf_mobile_faq_skin']);
|
||||||
|
} else {
|
||||||
|
$board_skin_path = get_skin_path('board', $board['bo_skin']);
|
||||||
|
$board_skin_url = get_skin_url('board', $board['bo_skin']);
|
||||||
|
$member_skin_path = get_skin_path('member', $config['cf_member_skin']);
|
||||||
|
$member_skin_url = get_skin_url('member', $config['cf_member_skin']);
|
||||||
|
$new_skin_path = get_skin_path('new', $config['cf_new_skin']);
|
||||||
|
$new_skin_url = get_skin_url('new', $config['cf_new_skin']);
|
||||||
|
$search_skin_path = get_skin_path('search', $config['cf_search_skin']);
|
||||||
|
$search_skin_url = get_skin_url('search', $config['cf_search_skin']);
|
||||||
|
$connect_skin_path = get_skin_path('connect', $config['cf_connect_skin']);
|
||||||
|
$connect_skin_url = get_skin_url('connect', $config['cf_connect_skin']);
|
||||||
|
$faq_skin_path = get_skin_path('faq', $config['cf_faq_skin']);
|
||||||
|
$faq_skin_url = get_skin_url('faq', $config['cf_faq_skin']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$conf = sql_fetch(" select cf_theme from {$g5['config_table']} ");
|
||||||
|
$name = get_text($info['theme_name']);
|
||||||
|
if($conf['cf_theme'] != $theme) {
|
||||||
|
if($tconfig['set_default_skin'])
|
||||||
|
$set_default_skin = 'true';
|
||||||
|
else
|
||||||
|
$set_default_skin = 'false';
|
||||||
|
|
||||||
|
$btn_active = '<li><button type="button" class="theme_sl theme_active" data-theme="'.$theme.'" '.'data-name="'.$name.'" data-set_default_skin="'.$set_default_skin.'">테마적용</button></li>';
|
||||||
|
} else {
|
||||||
|
$btn_active = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$g5['title'] = get_text($info['theme_name']).' 테마 미리보기';
|
||||||
|
require_once(G5_PATH.'/head.sub.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="<?php echo G5_ADMIN_URL; ?>/css/theme.css">
|
||||||
|
<script src="<?php echo G5_ADMIN_URL; ?>/theme.js"></script>
|
||||||
|
|
||||||
|
<section id="preview_item">
|
||||||
|
<ul>
|
||||||
|
<li><a href="./theme_preview.php?theme=<?php echo $theme.$qstr_index; ?>">인덱스 화면</a></li>
|
||||||
|
<li><a href="./theme_preview.php?theme=<?php echo $theme.$qstr_list; ?>">게시글 리스트</a></li>
|
||||||
|
<li><a href="./theme_preview.php?theme=<?php echo $theme.$qstr_view; ?>">게시글 보기</a></li>
|
||||||
|
<li><a href="./theme_preview.php?theme=<?php echo $theme.$qstr_device; ?>"><?php echo (G5_IS_MOBILE ? 'PC 버전' : '모바일 버전'); ?></a></li>
|
||||||
|
<?php echo $btn_active; ?>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="preview_content">
|
||||||
|
<?php
|
||||||
|
switch($mode) {
|
||||||
|
case 'list':
|
||||||
|
include(G5_BBS_PATH.'/board.php');
|
||||||
|
break;
|
||||||
|
case 'view':
|
||||||
|
$wr_id = $row['wr_parent'];
|
||||||
|
$write = sql_fetch(" select * from $write_table where wr_id = '$wr_id' ");
|
||||||
|
include(G5_BBS_PATH.'/board.php');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
include(G5_PATH.'/index.php');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once(G5_PATH.'/tail.sub.php');
|
||||||
|
?>
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "100280";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
die('최고관리자만 접근 가능합니다.');
|
||||||
|
|
||||||
|
$theme = trim($_POST['theme']);
|
||||||
|
$theme_dir = get_theme_dir();
|
||||||
|
|
||||||
|
if($_POST['type'] == 'reset') {
|
||||||
|
$sql = " update {$g5['config_table']} set cf_theme = '' ";
|
||||||
|
sql_query($sql);
|
||||||
|
die('');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!in_array($theme, $theme_dir))
|
||||||
|
die('선택하신 테마가 설치되어 있지 않습니다.');
|
||||||
|
|
||||||
|
// 테마적용
|
||||||
|
$sql = " update {$g5['config_table']} set cf_theme = '$theme' ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
// 테마 설정 스킨 적용
|
||||||
|
if($_POST['set_default_skin'] == 1) {
|
||||||
|
$keys = 'set_default_skin, cf_member_skin, cf_mobile_member_skin, cf_new_skin, cf_mobile_new_skin, cf_search_skin, cf_mobile_search_skin, cf_connect_skin, cf_mobile_connect_skin, cf_faq_skin, cf_mobile_faq_skin, qa_skin, qa_mobile_skin';
|
||||||
|
|
||||||
|
$tconfig = get_theme_config_value($theme, $keys);
|
||||||
|
|
||||||
|
if($tconfig['set_default_skin']) {
|
||||||
|
$sql_common = array();
|
||||||
|
$qa_sql_common = array();
|
||||||
|
|
||||||
|
foreach($tconfig as $key => $val) {
|
||||||
|
if(preg_match('#^qa_.+$#', $key)) {
|
||||||
|
if($val) {
|
||||||
|
if(!preg_match('#^theme/.+$#', $val))
|
||||||
|
$val = 'theme/'.$val;
|
||||||
|
|
||||||
|
$qa_sql_common[] = " $key = '$val' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($config[$key]))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if($val) {
|
||||||
|
if(!preg_match('#^theme/.+$#', $val))
|
||||||
|
$val = 'theme/'.$val;
|
||||||
|
|
||||||
|
$sql_common[] = " $key = '$val' ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($sql_common)) {
|
||||||
|
$sql = " update {$g5['config_table']} set " . implode(', ', $sql_common);
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($qa_sql_common)) {
|
||||||
|
$sql = " update {$g5['qa_config_table']} set " . implode(', ', $qa_sql_common);
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
die('');
|
||||||
|
?>
|
||||||
@@ -0,0 +1,210 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = '300820';
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
// http://www.jqplot.com/
|
||||||
|
add_stylesheet('<link rel="stylesheet" href="'.G5_PLUGIN_URL.'/jqplot/jquery.jqplot.css">', 0);
|
||||||
|
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jquery.jqplot.js"></script>', 0);
|
||||||
|
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.canvasTextRenderer.min.js"></script>', 0);
|
||||||
|
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>', 0);
|
||||||
|
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/plugins/jqplot.pointLabels.min.js"></script>', 0);
|
||||||
|
add_javascript('<!--[if lt IE 9]><script src="'.G5_PLUGIN_URL.'/jqplot/excanvas.js"></script><![endif]-->', 0);
|
||||||
|
|
||||||
|
if (!($graph == 'line' || $graph == 'bar'))
|
||||||
|
$graph = 'line';
|
||||||
|
|
||||||
|
if ($graph == 'bar') {
|
||||||
|
// 바 타입으로 사용하는 코드입니다.
|
||||||
|
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.barRenderer.min.js"></script>', 0);
|
||||||
|
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.categoryAxisRenderer.min.js"></script>', 0);
|
||||||
|
add_javascript('<script src="'.G5_PLUGIN_URL.'/jqplot/jqplot.pointLabels.min.js"></script>', 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$g5['title'] = '글,댓글 현황';
|
||||||
|
include_once ('./admin.head.php');
|
||||||
|
|
||||||
|
$period_array = array(
|
||||||
|
'오늘'=>array('시간', 0),
|
||||||
|
'어제'=>array('시간', 0),
|
||||||
|
'7일전'=>array('일', 7),
|
||||||
|
'14일전'=>array('일', 14),
|
||||||
|
'30일전'=>array('일', 30),
|
||||||
|
'3개월전'=>array('주', 90),
|
||||||
|
'6개월전'=>array('주', 180),
|
||||||
|
'1년전'=>array('월', 365),
|
||||||
|
'2년전'=>array('월', 365*2),
|
||||||
|
'3년전'=>array('월', 365*3),
|
||||||
|
'5년전'=>array('년', 365*5),
|
||||||
|
'10년전'=>array('년', 365*10),
|
||||||
|
);
|
||||||
|
|
||||||
|
$is_period = false;
|
||||||
|
foreach($period_array as $key=>$value) {
|
||||||
|
if ($key == $period) {
|
||||||
|
$is_period = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$is_period)
|
||||||
|
$period = '오늘';
|
||||||
|
|
||||||
|
$day = $period_array[$period][0];
|
||||||
|
|
||||||
|
$today = date('Y-m-d', G5_SERVER_TIME);
|
||||||
|
$yesterday = date('Y-m-d', G5_SERVER_TIME - 86400);
|
||||||
|
|
||||||
|
if ($period == '오늘') {
|
||||||
|
$from = $today;
|
||||||
|
$to = $from;
|
||||||
|
} else if ($period == '어제') {
|
||||||
|
$from = $yesterday;
|
||||||
|
$to = $from;
|
||||||
|
} else if ($period == '내일') {
|
||||||
|
$from = date('Y-m-d', G5_SERVER_TIME + (86400 * 2));
|
||||||
|
$to = $from;
|
||||||
|
} else {
|
||||||
|
$from = date('Y-m-d', G5_SERVER_TIME - (86400 * $period_array[$period][1]));
|
||||||
|
$to = $yesterday;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_bo_table = '';
|
||||||
|
if ($bo_table)
|
||||||
|
$sql_bo_table = "and bo_table = '$bo_table'";
|
||||||
|
|
||||||
|
switch ($day) {
|
||||||
|
case '시간' :
|
||||||
|
$sql = " select substr(bn_datetime,6,8) as hours, sum(if(wr_id=wr_parent,1,0)) as wcount, sum(if(wr_id=wr_parent,0,1)) as ccount from {$g5['board_new_table']} where substr(bn_datetime,1,10) between '$from' and '$to' {$sql_bo_table} group by hours order by bn_datetime ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
// 월-일 시간
|
||||||
|
$line1[] = "['".substr($row['hours'],0,8)."',".$row['wcount'].']';
|
||||||
|
$line2[] = "['".substr($row['hours'],0,8)."',".$row['ccount'].']';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '일' :
|
||||||
|
$sql = " select substr(bn_datetime,1,10) as days, sum(if(wr_id=wr_parent,1,0)) as wcount, sum(if(wr_id=wr_parent,0,1)) as ccount from {$g5['board_new_table']} where substr(bn_datetime,1,10) between '$from' and '$to' {$sql_bo_table} group by days order by bn_datetime ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
// 월-일
|
||||||
|
$line1[] = "['".substr($row['days'],5,5)."',".$row['wcount'].']';
|
||||||
|
$line2[] = "['".substr($row['days'],5,5)."',".$row['ccount'].']';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '주' :
|
||||||
|
$sql = " select concat(substr(bn_datetime,1,4), '-', weekofyear(bn_datetime)) as weeks, sum(if(wr_id=wr_parent,1,0)) as wcount, sum(if(wr_id=wr_parent,0,1)) as ccount from {$g5['board_new_table']} where substr(bn_datetime,1,10) between '$from' and '$to' {$sql_bo_table} group by weeks order by bn_datetime ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
// 올해의 몇주로 보여주면 바로 확인이 안되므로 주를 날짜로 바꾼다.
|
||||||
|
// 년-월-일
|
||||||
|
list($lyear, $lweek) = explode('-', $row['weeks']);
|
||||||
|
$date = date('y-m-d', strtotime($lyear.'W'.str_pad($lweek, 2, '0', STR_PAD_LEFT)));
|
||||||
|
$line1[] = "['".$date."',".$row['wcount'].']';
|
||||||
|
$line2[] = "['".$date."',".$row['ccount'].']';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '월' :
|
||||||
|
$sql = " select substr(bn_datetime,1,7) as months, sum(if(wr_id=wr_parent,1,0)) as wcount, sum(if(wr_id=wr_parent,0,1)) as ccount from {$g5['board_new_table']} where substr(bn_datetime,1,10) between '$from' and '$to' {$sql_bo_table} group by months order by bn_datetime ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
// 년-월
|
||||||
|
$line1[] = "['".substr($row['months'],2,5)."',".$row['wcount'].']';
|
||||||
|
$line2[] = "['".substr($row['months'],2,5)."',".$row['ccount'].']';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '년' :
|
||||||
|
$sql = " select substr(bn_datetime,1,4) as years, sum(if(wr_id=wr_parent,1,0)) as wcount, sum(if(wr_id=wr_parent,0,1)) as ccount from {$g5['board_new_table']} where substr(bn_datetime,1,10) between '$from' and '$to' {$sql_bo_table} group by years order by bn_datetime ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
// 년(4자리)
|
||||||
|
$line1[] = "['".substr($row['years'],0,4)."',".$row['wcount'].']';
|
||||||
|
$line2[] = "['".substr($row['years'],0,4)."',".$row['ccount'].']';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="wr_cont">
|
||||||
|
<form>
|
||||||
|
<select name="bo_table">
|
||||||
|
<option value="">전체게시판</a>
|
||||||
|
<?php
|
||||||
|
$sql = " select bo_table, bo_subject from {$g5['board_table']} order by bo_count_write desc ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
echo "<option value=\"{$row['bo_table']}\"";
|
||||||
|
if ($bo_table == $row['bo_table'])
|
||||||
|
echo ' selected="selected"';
|
||||||
|
echo ">{$row['bo_subject']}</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select name="period">
|
||||||
|
<?php
|
||||||
|
foreach($period_array as $key=>$value) {
|
||||||
|
echo "<option value=\"{$key}\"";
|
||||||
|
if ($key == $period)
|
||||||
|
echo " selected=\"selected\"";
|
||||||
|
echo ">{$key}</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select name="graph">
|
||||||
|
<option value="line" <?php echo ($graph == 'line' ? 'selected="selected"' : ''); ?>>선그래프</option>
|
||||||
|
<option value="bar" <?php echo ($graph == 'bar' ? 'selected="selected"' : ''); ?>>막대그래프</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<input type="submit" class="btn_submit" value="확인">
|
||||||
|
</form>
|
||||||
|
<ul id="grp_color">
|
||||||
|
<li><span></span>글 수</li>
|
||||||
|
<li class="color2"><span></span>댓글 수</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div id="chart_wr">
|
||||||
|
<?php
|
||||||
|
if (empty($line1) || empty($line2)) {
|
||||||
|
echo "<h5>그래프를 만들 데이터가 없습니다.</h5>\n";
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<div id="chart1" style="height:500px; width:100%;"></div>
|
||||||
|
<div>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
var line1 = [<?php echo implode($line1, ','); ?>];
|
||||||
|
var line2 = [<?php echo implode($line2, ','); ?>];
|
||||||
|
var plot1 = $.jqplot ('chart1', [line1, line2], {
|
||||||
|
seriesDefaults: {
|
||||||
|
<?php if ($graph == 'bar') { ?>
|
||||||
|
renderer:$.jqplot.BarRenderer,
|
||||||
|
<?php } ?>
|
||||||
|
pointLabels: { show: true }
|
||||||
|
},
|
||||||
|
axes:{
|
||||||
|
xaxis: {
|
||||||
|
renderer: $.jqplot.CategoryAxisRenderer,
|
||||||
|
label: '<?php echo $day; ?>',
|
||||||
|
pad:0,
|
||||||
|
max:23
|
||||||
|
},
|
||||||
|
yaxis: {
|
||||||
|
label: '글수',
|
||||||
|
min: 0
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?
|
||||||
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
+2
-1
@@ -30,7 +30,8 @@ include_once(G5_PATH.'/head.sub.php');
|
|||||||
|
|
||||||
$msg2 = str_replace("\\n", "<br>", $msg);
|
$msg2 = str_replace("\\n", "<br>", $msg);
|
||||||
|
|
||||||
if (!$url) $url = $_SERVER['HTTP_REFERER'];
|
$url = clean_xss_tags($url);
|
||||||
|
if (!$url) $url = clean_xss_tags($_SERVER['HTTP_REFERER']);
|
||||||
|
|
||||||
// url 체크
|
// url 체크
|
||||||
check_url_host($url);
|
check_url_host($url);
|
||||||
|
|||||||
+4
-4
@@ -222,19 +222,19 @@ $admin_href = "";
|
|||||||
if ($member['mb_id'] && ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id']))
|
if ($member['mb_id'] && ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id']))
|
||||||
$admin_href = G5_ADMIN_URL.'/board_form.php?w=u&bo_table='.$bo_table;
|
$admin_href = G5_ADMIN_URL.'/board_form.php?w=u&bo_table='.$bo_table;
|
||||||
|
|
||||||
include_once('./board_head.php');
|
include_once(G5_BBS_PATH.'/board_head.php');
|
||||||
|
|
||||||
// 게시물 아이디가 있다면 게시물 보기를 INCLUDE
|
// 게시물 아이디가 있다면 게시물 보기를 INCLUDE
|
||||||
if (isset($wr_id) && $wr_id) {
|
if (isset($wr_id) && $wr_id) {
|
||||||
include_once('./view.php');
|
include_once(G5_BBS_PATH.'/view.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 전체목록보이기 사용이 "예" 또는 wr_id 값이 없다면 목록을 보임
|
// 전체목록보이기 사용이 "예" 또는 wr_id 값이 없다면 목록을 보임
|
||||||
//if ($board['bo_use_list_view'] || empty($wr_id))
|
//if ($board['bo_use_list_view'] || empty($wr_id))
|
||||||
if ($member['mb_level'] >= $board['bo_list_level'] && $board['bo_use_list_view'] || empty($wr_id))
|
if ($member['mb_level'] >= $board['bo_list_level'] && $board['bo_use_list_view'] || empty($wr_id))
|
||||||
include_once ('./list.php');
|
include_once (G5_BBS_PATH.'/list.php');
|
||||||
|
|
||||||
include_once('./board_tail.php');
|
include_once(G5_BBS_PATH.'/board_tail.php');
|
||||||
|
|
||||||
echo "\n<!-- 사용스킨 : ".(G5_IS_MOBILE ? $board['bo_mobile_skin'] : $board['bo_skin'])." -->\n";
|
echo "\n<!-- 사용스킨 : ".(G5_IS_MOBILE ? $board['bo_mobile_skin'] : $board['bo_skin'])." -->\n";
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
|||||||
// 게시판 관리의 상단 내용
|
// 게시판 관리의 상단 내용
|
||||||
if (G5_IS_MOBILE) {
|
if (G5_IS_MOBILE) {
|
||||||
// 모바일의 경우 설정을 따르지 않는다.
|
// 모바일의 경우 설정을 따르지 않는다.
|
||||||
include_once('./_head.php');
|
include_once(G5_BBS_PATH.'/_head.php');
|
||||||
echo stripslashes($board['bo_mobile_content_head']);
|
echo stripslashes($board['bo_mobile_content_head']);
|
||||||
} else {
|
} else {
|
||||||
@include ($board['bo_include_head']);
|
@include ($board['bo_include_head']);
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
|||||||
if (G5_IS_MOBILE) {
|
if (G5_IS_MOBILE) {
|
||||||
echo stripslashes($board['bo_mobile_content_tail']);
|
echo stripslashes($board['bo_mobile_content_tail']);
|
||||||
// 모바일의 경우 설정을 따르지 않는다.
|
// 모바일의 경우 설정을 따르지 않는다.
|
||||||
include_once('./_tail.php');
|
include_once(G5_BBS_PATH.'/_tail.php');
|
||||||
} else {
|
} else {
|
||||||
echo stripslashes($board['bo_content_tail']);
|
echo stripslashes($board['bo_content_tail']);
|
||||||
@include ($board['bo_include_tail']);
|
@include ($board['bo_include_tail']);
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
|
||||||
|
$url1 = clean_xss_tags($url1);
|
||||||
|
$url2 = clean_xss_tags($url2);
|
||||||
|
$url3 = clean_xss_tags($url3);
|
||||||
|
|
||||||
// url 체크
|
// url 체크
|
||||||
check_url_host($url1);
|
check_url_host($url1);
|
||||||
check_url_host($url2);
|
check_url_host($url2);
|
||||||
|
|||||||
+2
-2
@@ -62,8 +62,8 @@ $str = preg_replace($src, $dst, $str);
|
|||||||
if(trim($co['co_skin']) == '')
|
if(trim($co['co_skin']) == '')
|
||||||
$co['co_skin'] = 'basic';
|
$co['co_skin'] = 'basic';
|
||||||
|
|
||||||
$content_skin_path = G5_SKIN_PATH.'/content/'.$co['co_skin'];
|
$content_skin_path = get_skin_path('content', $co['co_skin']);
|
||||||
$content_skin_url = G5_SKIN_URL.'/content/'.$co['co_skin'];
|
$content_skin_url = get_skin_url('content', $co['co_skin']);
|
||||||
$skin_file = $content_skin_path.'/content.skin.php';
|
$skin_file = $content_skin_path.'/content.skin.php';
|
||||||
|
|
||||||
if ($is_admin)
|
if ($is_admin)
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ if($config['cf_memo_del'] > 0) {
|
|||||||
|
|
||||||
// 탈퇴회원 자동 삭제
|
// 탈퇴회원 자동 삭제
|
||||||
if($config['cf_leave_day'] > 0) {
|
if($config['cf_leave_day'] > 0) {
|
||||||
$sql = " select mb_id from {$g5['member_table']} where (TO_DAYS('".G5_TIME_YMDHIS."') - TO_DAYS(mb_leave_date)) > '{$config['cf_leave_day']}' ";
|
$sql = " select mb_id from {$g5['member_table']}
|
||||||
|
where (TO_DAYS('".G5_TIME_YMDHIS."') - TO_DAYS(mb_leave_date)) > '{$config['cf_leave_day']}'
|
||||||
|
and mb_memo not regexp '^[0-9]{8}.*삭제함' ";
|
||||||
$result = sql_query($sql);
|
$result = sql_query($sql);
|
||||||
while ($row=sql_fetch_array($result))
|
while ($row=sql_fetch_array($result))
|
||||||
{
|
{
|
||||||
|
|||||||
+11
-2
@@ -1,7 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_LIB_PATH.'/latest.lib.php');
|
|
||||||
$g5['title'] = $group['gr_subject'];
|
if(defined('G5_THEME_PATH')) {
|
||||||
|
$group_file = G5_THEME_PATH.'/group.php';
|
||||||
|
if(is_file($group_file)) {
|
||||||
|
require_once($group_file);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
unset($group_file);
|
||||||
|
}
|
||||||
|
|
||||||
if (G5_IS_MOBILE) {
|
if (G5_IS_MOBILE) {
|
||||||
include_once(G5_MOBILE_PATH.'/group.php');
|
include_once(G5_MOBILE_PATH.'/group.php');
|
||||||
@@ -11,7 +18,9 @@ if (G5_IS_MOBILE) {
|
|||||||
if(!$is_admin && $group['gr_device'] == 'mobile')
|
if(!$is_admin && $group['gr_device'] == 'mobile')
|
||||||
alert($group['gr_subject'].' 그룹은 모바일에서만 접근할 수 있습니다.');
|
alert($group['gr_subject'].' 그룹은 모바일에서만 접근할 수 있습니다.');
|
||||||
|
|
||||||
|
$g5['title'] = $group['gr_subject'];
|
||||||
include_once('./_head.php');
|
include_once('./_head.php');
|
||||||
|
include_once(G5_LIB_PATH.'/latest.lib.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -2,8 +2,8 @@
|
|||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
// 이호경님 제안 코드
|
// 이호경님 제안 코드
|
||||||
session_unset(); // 모든 세션변수를 언레지스터 시켜줌
|
session_unset(); // 모든 세션변수를 언레지스터 시켜줌
|
||||||
session_destroy(); // 세션해제함
|
session_destroy(); // 세션해제함
|
||||||
|
|
||||||
// 자동로그인 해제 --------------------------------
|
// 자동로그인 해제 --------------------------------
|
||||||
set_cookie('ck_mb_id', '', 0);
|
set_cookie('ck_mb_id', '', 0);
|
||||||
@@ -11,7 +11,7 @@ set_cookie('ck_auto', '', 0);
|
|||||||
// 자동로그인 해제 end --------------------------------
|
// 자동로그인 해제 end --------------------------------
|
||||||
|
|
||||||
if ($url) {
|
if ($url) {
|
||||||
$p = parse_url($url);
|
$p = @parse_url($url);
|
||||||
if ($p['scheme'] || $p['host']) {
|
if ($p['scheme'] || $p['host']) {
|
||||||
alert('url에 도메인을 지정할 수 없습니다.');
|
alert('url에 도메인을 지정할 수 없습니다.');
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
|||||||
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
<input type="hidden" name="page" value="<?php echo $page ?>">
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
<input type="hidden" name="act" value="<?php echo $act ?>">
|
<input type="hidden" name="act" value="<?php echo $act ?>">
|
||||||
<input type="hidden" name="url" value="<?php echo $_SERVER['HTTP_REFERER'] ?>">
|
<input type="hidden" name="url" value="<?php echo clean_xss_tags($_SERVER['HTTP_REFERER']); ?>">
|
||||||
|
|
||||||
<div class="tbl_head01 tbl_wrap">
|
<div class="tbl_head01 tbl_wrap">
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
+7
-3
@@ -17,8 +17,12 @@ if ($view == "w")
|
|||||||
$sql_common .= " and a.wr_id = a.wr_parent ";
|
$sql_common .= " and a.wr_id = a.wr_parent ";
|
||||||
else if ($view == "c")
|
else if ($view == "c")
|
||||||
$sql_common .= " and a.wr_id <> a.wr_parent ";
|
$sql_common .= " and a.wr_id <> a.wr_parent ";
|
||||||
|
else
|
||||||
|
$view = '';
|
||||||
|
|
||||||
|
$mb_id = isset($_GET['mb_id']) ? ($_GET['mb_id']) : '';
|
||||||
|
$mb_id = substr(preg_replace('#[^a-z0-9_]#i', '', $mb_id), 0, 20);
|
||||||
|
|
||||||
$mb_id = isset($_GET['mb_id']) ? strip_tags($_GET['mb_id']) : "";
|
|
||||||
if ($mb_id) {
|
if ($mb_id) {
|
||||||
$sql_common .= " and a.mb_id = '{$mb_id}' ";
|
$sql_common .= " and a.mb_id = '{$mb_id}' ";
|
||||||
}
|
}
|
||||||
@@ -28,9 +32,9 @@ $sql = " select count(*) as cnt {$sql_common} ";
|
|||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
$total_count = $row['cnt'];
|
$total_count = $row['cnt'];
|
||||||
|
|
||||||
$rows = $config['cf_new_rows'];
|
$rows = G5_IS_MOBILE ? $config['cf_mobile_page_rows'] : $config['cf_new_rows'];
|
||||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||||
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||||
|
|
||||||
$group_select = '<label for="gr_id" class="sound_only">그룹</label><select name="gr_id" id="gr_id"><option value="">전체그룹';
|
$group_select = '<label for="gr_id" class="sound_only">그룹</label><select name="gr_id" id="gr_id"><option value="">전체그룹';
|
||||||
|
|||||||
+2
-5
@@ -13,14 +13,11 @@ $result = sql_query($sql, false);
|
|||||||
<h2>팝업레이어 알림</h2>
|
<h2>팝업레이어 알림</h2>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
for ($i=0; $row_nw=sql_fetch_array($result); $i++)
|
for ($i=0; $nw=sql_fetch_array($result); $i++)
|
||||||
{
|
{
|
||||||
// 이미 체크 되었다면 Continue
|
// 이미 체크 되었다면 Continue
|
||||||
if ($_COOKIE["hd_pops_{$row_nw['nw_id']}"])
|
if ($_COOKIE["hd_pops_{$nw['nw_id']}"])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$sql = " select * from {$g5['new_win_table']} where nw_id = '{$row_nw['nw_id']}' ";
|
|
||||||
$nw = sql_fetch($sql);
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="hd_pops_<?php echo $nw['nw_id'] ?>" class="hd_pops" style="top:<?php echo $nw['nw_top']?>px;left:<?php echo $nw['nw_left']?>px">
|
<div id="hd_pops_<?php echo $nw['nw_id'] ?>" class="hd_pops" style="top:<?php echo $nw['nw_top']?>px;left:<?php echo $nw['nw_left']?>px">
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ $sql = " select wr_subject from {$write_table}
|
|||||||
and wr_is_comment = 0 ";
|
and wr_is_comment = 0 ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
$g5['title'] = $row['wr_subject'];
|
$g5['title'] = get_text($row['wr_subject']);
|
||||||
|
|
||||||
include_once($member_skin_path.'/password.skin.php');
|
include_once($member_skin_path.'/password.skin.php');
|
||||||
|
|
||||||
|
|||||||
+18
-5
@@ -85,12 +85,25 @@ for ($i=0; $row2=sql_fetch_array($result); $i++) {
|
|||||||
$list3[$i]['subject'] = cut_str($row2['po_subject'],60,"…");
|
$list3[$i]['subject'] = cut_str($row2['po_subject'],60,"…");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G5_IS_MOBILE) {
|
if(preg_match('#^theme/(.+)$#', $skin_dir, $match)) {
|
||||||
$poll_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/poll/'.$skin_dir;
|
if (G5_IS_MOBILE) {
|
||||||
$poll_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/poll/'.$skin_dir;
|
$poll_skin_path = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/poll/'.$match[1];
|
||||||
|
if(!is_dir($poll_skin_path))
|
||||||
|
$poll_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/poll/'.$match[1];
|
||||||
|
$poll_skin_url = str_replace(G5_PATH, G5_URL, $poll_skin_path);
|
||||||
|
} else {
|
||||||
|
$poll_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/poll/'.$match[1];
|
||||||
|
$poll_skin_url = str_replace(G5_PATH, G5_URL, $poll_skin_path);
|
||||||
|
}
|
||||||
|
//$skin_dir = $match[1];
|
||||||
} else {
|
} else {
|
||||||
$poll_skin_path = G5_SKIN_PATH.'/poll/'.$skin_dir;
|
if (G5_IS_MOBILE) {
|
||||||
$poll_skin_url = G5_SKIN_URL.'/poll/'.$skin_dir;
|
$poll_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/poll/'.$skin_dir;
|
||||||
|
$poll_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/poll/'.$skin_dir;
|
||||||
|
} else {
|
||||||
|
$poll_skin_path = G5_SKIN_PATH.'/poll/'.$skin_dir;
|
||||||
|
$poll_skin_url = G5_SKIN_URL.'/poll/'.$skin_dir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
$qa_skin_path = (G5_IS_MOBILE ? G5_MOBILE_PATH : G5_PATH).'/'.G5_SKIN_DIR.'/qa/'.(G5_IS_MOBILE ? $qaconfig['qa_mobile_skin'] : $qaconfig['qa_skin']);
|
$qa_skin_path = get_skin_path('qa', (G5_IS_MOBILE ? $qaconfig['qa_mobile_skin'] : $qaconfig['qa_skin']));
|
||||||
$qa_skin_url = (G5_IS_MOBILE ? G5_MOBILE_URL : G5_URL).'/'.G5_SKIN_DIR.'/qa/'.(G5_IS_MOBILE ? $qaconfig['qa_mobile_skin'] : $qaconfig['qa_skin']);
|
$qa_skin_url = get_skin_url('qa', (G5_IS_MOBILE ? $qaconfig['qa_mobile_skin'] : $qaconfig['qa_skin']));
|
||||||
|
|
||||||
if (G5_IS_MOBILE) {
|
if (G5_IS_MOBILE) {
|
||||||
// 모바일의 경우 설정을 따르지 않는다.
|
// 모바일의 경우 설정을 따르지 않는다.
|
||||||
|
|||||||
@@ -2,27 +2,28 @@
|
|||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||||
|
|
||||||
|
$g5['title'] = '메일인증 메일주소 변경';
|
||||||
|
include_once('./_head.php');
|
||||||
|
|
||||||
|
$mb_id = substr(clean_xss_tags($_GET['mb_id']), 0, 20);
|
||||||
$sql = " select mb_email, mb_datetime, mb_email_certify from {$g5['member_table']} where mb_id = '{$mb_id}' ";
|
$sql = " select mb_email, mb_datetime, mb_email_certify from {$g5['member_table']} where mb_id = '{$mb_id}' ";
|
||||||
$mb = sql_fetch($sql);
|
$mb = sql_fetch($sql);
|
||||||
if (substr($mb['mb_email_certify'],0,1)!=0) {
|
if (substr($mb['mb_email_certify'],0,1)!=0) {
|
||||||
alert("이미 메일인증 하신 회원입니다.", G5_URL);
|
alert("이미 메일인증 하신 회원입니다.", G5_URL);
|
||||||
}
|
}
|
||||||
|
|
||||||
$g5['title'] = '메일인증 메일주소 변경';
|
|
||||||
include_once('./_head.php');
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p>메일인증을 받지 못한 경우 회원정보의 메일주소를 변경 할 수 있습니다.</p>
|
<p class="rg_em_p">메일인증을 받지 못한 경우 회원정보의 메일주소를 변경 할 수 있습니다.</p>
|
||||||
|
|
||||||
<form method="post" name="fregister_email" action="<?php echo G5_HTTPS_BBS_URL.'/register_email_update.php'; ?>" onsubmit="return fregister_email_submit(this);">
|
<form method="post" name="fregister_email" action="<?php echo G5_HTTPS_BBS_URL.'/register_email_update.php'; ?>" onsubmit="return fregister_email_submit(this);">
|
||||||
<input type="hidden" name="mb_id" value="<?php echo $mb_id; ?>">
|
<input type="hidden" name="mb_id" value="<?php echo $mb_id; ?>">
|
||||||
|
|
||||||
<div class="tbl_frm01 tbl_frm">
|
<div class="tbl_frm01 tbl_frm rg_em">
|
||||||
<table>
|
<table>
|
||||||
<caption>사이트 이용정보 입력</caption>
|
<caption>사이트 이용정보 입력</caption>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row"><label for="reg_mb_email">E-mail<strong class="sound_only">필수</strong></label></th>
|
<th scope="row"><label for="reg_mb_email">E-mail<strong class="sound_only">필수</strong></label></th>
|
||||||
<td><input type="text" name="mb_email" id="reg_mb_email" required class="frm_input email required" size="50" maxlength="100" value="<?php echo $mb['mb_email']; ?>"></td>
|
<td><input type="text" name="mb_email" id="reg_mb_email" required class="frm_input email required" size="30" maxlength="100" value="<?php echo $mb['mb_email']; ?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">자동등록방지</th>
|
<th scope="row">자동등록방지</th>
|
||||||
@@ -46,6 +47,6 @@ function fregister_email_submit(f)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<?
|
<?php
|
||||||
include_once('./_tail.php');
|
include_once('./_tail.php');
|
||||||
?>
|
?>
|
||||||
@@ -8,7 +8,7 @@ $mb_email = trim($_POST['mb_email']);
|
|||||||
|
|
||||||
$sql = " select mb_name, mb_datetime from {$g5['member_table']} where mb_id = '{$mb_id}' and mb_email_certify <> '' ";
|
$sql = " select mb_name, mb_datetime from {$g5['member_table']} where mb_id = '{$mb_id}' and mb_email_certify <> '' ";
|
||||||
$mb = sql_fetch($sql);
|
$mb = sql_fetch($sql);
|
||||||
if (!$mb) {
|
if ($mb) {
|
||||||
alert("이미 메일인증 하신 회원입니다.", G5_URL);
|
alert("이미 메일인증 하신 회원입니다.", G5_URL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,6 +115,9 @@ $req_nick = !isset($member['mb_nick_date']) || (isset($member['mb_nick_date']) &
|
|||||||
$required = ($w=='') ? 'required' : '';
|
$required = ($w=='') ? 'required' : '';
|
||||||
$readonly = ($w=='u') ? 'readonly' : '';
|
$readonly = ($w=='u') ? 'readonly' : '';
|
||||||
|
|
||||||
|
$agree = preg_replace('#[^0-9]#', '', $agree);
|
||||||
|
$agree2 = preg_replace('#[^0-9]#', '', $agree2);
|
||||||
|
|
||||||
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||||
if ($config['cf_use_addr'])
|
if ($config['cf_use_addr'])
|
||||||
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ $mb_birth = isset($_POST['mb_birth']) ? trim($_POST['mb_birth'])
|
|||||||
$mb_homepage = isset($_POST['mb_homepage']) ? trim($_POST['mb_homepage']) : "";
|
$mb_homepage = isset($_POST['mb_homepage']) ? trim($_POST['mb_homepage']) : "";
|
||||||
$mb_tel = isset($_POST['mb_tel']) ? trim($_POST['mb_tel']) : "";
|
$mb_tel = isset($_POST['mb_tel']) ? trim($_POST['mb_tel']) : "";
|
||||||
$mb_hp = isset($_POST['mb_hp']) ? trim($_POST['mb_hp']) : "";
|
$mb_hp = isset($_POST['mb_hp']) ? trim($_POST['mb_hp']) : "";
|
||||||
$mb_zip1 = isset($_POST['mb_zip1']) ? trim($_POST['mb_zip1']) : "";
|
$mb_zip1 = isset($_POST['mb_zip']) ? substr(trim($_POST['mb_zip']), 0, 3) : "";
|
||||||
$mb_zip2 = isset($_POST['mb_zip2']) ? trim($_POST['mb_zip2']) : "";
|
$mb_zip2 = isset($_POST['mb_zip']) ? substr(trim($_POST['mb_zip']), 3) : "";
|
||||||
$mb_addr1 = isset($_POST['mb_addr1']) ? trim($_POST['mb_addr1']) : "";
|
$mb_addr1 = isset($_POST['mb_addr1']) ? trim($_POST['mb_addr1']) : "";
|
||||||
$mb_addr2 = isset($_POST['mb_addr2']) ? trim($_POST['mb_addr2']) : "";
|
$mb_addr2 = isset($_POST['mb_addr2']) ? trim($_POST['mb_addr2']) : "";
|
||||||
$mb_addr3 = isset($_POST['mb_addr3']) ? trim($_POST['mb_addr3']) : "";
|
$mb_addr3 = isset($_POST['mb_addr3']) ? trim($_POST['mb_addr3']) : "";
|
||||||
@@ -73,7 +73,7 @@ if ($w == '' || $w == 'u') {
|
|||||||
if($w == '' && $mb_password != $mb_password_re)
|
if($w == '' && $mb_password != $mb_password_re)
|
||||||
alert('비밀번호가 일치하지 않습니다.');
|
alert('비밀번호가 일치하지 않습니다.');
|
||||||
|
|
||||||
if ($msg = empty_mb_name($mb_id)) alert($msg, "", true, true);
|
if ($msg = empty_mb_name($mb_name)) alert($msg, "", true, true);
|
||||||
if ($msg = empty_mb_nick($mb_nick)) alert($msg, "", true, true);
|
if ($msg = empty_mb_nick($mb_nick)) alert($msg, "", true, true);
|
||||||
if ($msg = empty_mb_email($mb_email)) alert($msg, "", true, true);
|
if ($msg = empty_mb_email($mb_email)) alert($msg, "", true, true);
|
||||||
if ($msg = reserve_mb_id($mb_id)) alert($msg, "", true, true);
|
if ($msg = reserve_mb_id($mb_id)) alert($msg, "", true, true);
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ if ($stx) {
|
|||||||
$stx = preg_replace('/\//', '\/', trim($stx));
|
$stx = preg_replace('/\//', '\/', trim($stx));
|
||||||
$sop = strtolower($sop);
|
$sop = strtolower($sop);
|
||||||
if (!$sop || !($sop == 'and' || $sop == 'or')) $sop = 'and'; // 연산자 and , or
|
if (!$sop || !($sop == 'and' || $sop == 'or')) $sop = 'and'; // 연산자 and , or
|
||||||
$srows = isset($_GET['srows']) ? $_GET['srows'] : 10;
|
$srows = isset($_GET['srows']) ? (int)preg_replace('#[^0-9]#', '', $_GET['srows']) : 10;
|
||||||
if (!$srows) $srows = 10; // 한페이지에 출력하는 검색 행수
|
if (!$srows) $srows = 10; // 한페이지에 출력하는 검색 행수
|
||||||
|
|
||||||
$g5_search['tables'] = Array();
|
$g5_search['tables'] = Array();
|
||||||
|
|||||||
+118
-77
@@ -218,58 +218,6 @@ if ($config['cf_editor'])
|
|||||||
else
|
else
|
||||||
define('G5_EDITOR_LIB', G5_LIB_PATH."/editor.lib.php");
|
define('G5_EDITOR_LIB', G5_LIB_PATH."/editor.lib.php");
|
||||||
|
|
||||||
//==============================================================================
|
|
||||||
// 사용기기 설정
|
|
||||||
// config.php G5_SET_DEVICE 설정에 따라 사용자 화면 제한됨
|
|
||||||
// pc 설정 시 모바일 기기에서도 PC화면 보여짐
|
|
||||||
// mobile 설정 시 PC에서도 모바일화면 보여짐
|
|
||||||
// both 설정 시 접속 기기에 따른 화면 보여짐
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
$is_mobile = false;
|
|
||||||
$set_device = true;
|
|
||||||
if(defined('G5_SET_DEVICE')) {
|
|
||||||
switch(G5_SET_DEVICE) {
|
|
||||||
case 'pc':
|
|
||||||
$is_mobile = false;
|
|
||||||
$set_device = false;
|
|
||||||
break;
|
|
||||||
case 'mobile':
|
|
||||||
$is_mobile = true;
|
|
||||||
$set_device = false;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//==============================================================================
|
|
||||||
|
|
||||||
//==============================================================================
|
|
||||||
// Mobile 모바일 설정
|
|
||||||
// 쿠키에 저장된 값이 모바일이라면 브라우저 상관없이 모바일로 실행
|
|
||||||
// 그렇지 않다면 브라우저의 HTTP_USER_AGENT 에 따라 모바일 결정
|
|
||||||
// G5_MOBILE_AGENT : config.php 에서 선언
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
if (G5_USE_MOBILE && $set_device) {
|
|
||||||
if ($_REQUEST['device']=='pc')
|
|
||||||
$is_mobile = false;
|
|
||||||
else if ($_REQUEST['device']=='mobile')
|
|
||||||
$is_mobile = true;
|
|
||||||
else if (isset($_SESSION['ss_is_mobile']))
|
|
||||||
$is_mobile = $_SESSION['ss_is_mobile'];
|
|
||||||
else if (is_mobile())
|
|
||||||
$is_mobile = true;
|
|
||||||
} else {
|
|
||||||
$set_device = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$_SESSION['ss_is_mobile'] = $is_mobile;
|
|
||||||
define('G5_IS_MOBILE', $is_mobile);
|
|
||||||
define('G5_DEVICE_BUTTON_DISPLAY', $set_device);
|
|
||||||
if (G5_IS_MOBILE) {
|
|
||||||
$g5['mobile_path'] = G5_PATH.'/'.$g5['mobile_dir'];
|
|
||||||
}
|
|
||||||
//==============================================================================
|
|
||||||
|
|
||||||
// 4.00.03 : [보안관련] PHPSESSID 가 틀리면 로그아웃한다.
|
// 4.00.03 : [보안관련] PHPSESSID 가 틀리면 로그아웃한다.
|
||||||
if (isset($_REQUEST['PHPSESSID']) && $_REQUEST['PHPSESSID'] != session_id())
|
if (isset($_REQUEST['PHPSESSID']) && $_REQUEST['PHPSESSID'] != session_id())
|
||||||
goto_url(G5_BBS_URL.'/logout.php');
|
goto_url(G5_BBS_URL.'/logout.php');
|
||||||
@@ -371,7 +319,7 @@ if (isset($_REQUEST['url'])) {
|
|||||||
$url = '';
|
$url = '';
|
||||||
$urlencode = urlencode($_SERVER['REQUEST_URI']);
|
$urlencode = urlencode($_SERVER['REQUEST_URI']);
|
||||||
if (G5_DOMAIN) {
|
if (G5_DOMAIN) {
|
||||||
$p = parse_url(G5_DOMAIN);
|
$p = @parse_url(G5_DOMAIN);
|
||||||
$urlencode = G5_DOMAIN.urldecode(preg_replace("/^".urlencode($p['path'])."/", "", $urlencode));
|
$urlencode = G5_DOMAIN.urldecode(preg_replace("/^".urlencode($p['path'])."/", "", $urlencode));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -513,35 +461,128 @@ if ($is_admin != 'super') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 테마경로
|
||||||
|
if(defined('_THEME_PREVIEW_') && _THEME_PREVIEW_ === true)
|
||||||
|
$config['cf_theme'] = trim($_GET['theme']);
|
||||||
|
|
||||||
|
if(isset($config['cf_theme']) && trim($config['cf_theme'])) {
|
||||||
|
$theme_path = G5_PATH.'/'.G5_THEME_DIR.'/'.$config['cf_theme'];
|
||||||
|
if(is_dir($theme_path)) {
|
||||||
|
define('G5_THEME_PATH', $theme_path);
|
||||||
|
define('G5_THEME_URL', G5_URL.'/'.G5_THEME_DIR.'/'.$config['cf_theme']);
|
||||||
|
define('G5_THEME_MOBILE_PATH', $theme_path.'/'.G5_MOBILE_DIR);
|
||||||
|
define('G5_THEME_LIB_PATH', $theme_path.'/'.G5_LIB_DIR);
|
||||||
|
define('G5_THEME_CSS_URL', G5_THEME_URL.'/'.G5_CSS_DIR);
|
||||||
|
define('G5_THEME_IMG_URL', G5_THEME_URL.'/'.G5_IMG_DIR);
|
||||||
|
define('G5_THEME_JS_URL', G5_THEME_URL.'/'.G5_JS_DIR);
|
||||||
|
}
|
||||||
|
unset($theme_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 테마 설정 로드
|
||||||
|
if(is_file(G5_THEME_PATH.'/theme.config.php'))
|
||||||
|
include_once(G5_THEME_PATH.'/theme.config.php');
|
||||||
|
|
||||||
|
//=====================================================================================
|
||||||
|
// 사용기기 설정
|
||||||
|
// 테마의 G5_THEME_DEVICE 설정에 따라 사용자 화면 제한됨
|
||||||
|
// 테마에 별도 설정이 없는 경우 config.php G5_SET_DEVICE 설정에 따라 사용자 화면 제한됨
|
||||||
|
// pc 설정 시 모바일 기기에서도 PC화면 보여짐
|
||||||
|
// mobile 설정 시 PC에서도 모바일화면 보여짐
|
||||||
|
// both 설정 시 접속 기기에 따른 화면 보여짐
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
$is_mobile = false;
|
||||||
|
$set_device = true;
|
||||||
|
|
||||||
|
if(defined('G5_THEME_DEVICE') && G5_THEME_DEVICE != '') {
|
||||||
|
switch(G5_THEME_DEVICE) {
|
||||||
|
case 'pc':
|
||||||
|
$is_mobile = false;
|
||||||
|
$set_device = false;
|
||||||
|
break;
|
||||||
|
case 'mobile':
|
||||||
|
$is_mobile = true;
|
||||||
|
$set_device = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(defined('G5_SET_DEVICE') && $set_device) {
|
||||||
|
switch(G5_SET_DEVICE) {
|
||||||
|
case 'pc':
|
||||||
|
$is_mobile = false;
|
||||||
|
$set_device = false;
|
||||||
|
break;
|
||||||
|
case 'mobile':
|
||||||
|
$is_mobile = true;
|
||||||
|
$set_device = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//==============================================================================
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
// Mobile 모바일 설정
|
||||||
|
// 쿠키에 저장된 값이 모바일이라면 브라우저 상관없이 모바일로 실행
|
||||||
|
// 그렇지 않다면 브라우저의 HTTP_USER_AGENT 에 따라 모바일 결정
|
||||||
|
// G5_MOBILE_AGENT : config.php 에서 선언
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
if (G5_USE_MOBILE && $set_device) {
|
||||||
|
if ($_REQUEST['device']=='pc')
|
||||||
|
$is_mobile = false;
|
||||||
|
else if ($_REQUEST['device']=='mobile')
|
||||||
|
$is_mobile = true;
|
||||||
|
else if (isset($_SESSION['ss_is_mobile']))
|
||||||
|
$is_mobile = $_SESSION['ss_is_mobile'];
|
||||||
|
else if (is_mobile())
|
||||||
|
$is_mobile = true;
|
||||||
|
} else {
|
||||||
|
$set_device = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$_SESSION['ss_is_mobile'] = $is_mobile;
|
||||||
|
define('G5_IS_MOBILE', $is_mobile);
|
||||||
|
define('G5_DEVICE_BUTTON_DISPLAY', $set_device);
|
||||||
|
if (G5_IS_MOBILE) {
|
||||||
|
$g5['mobile_path'] = G5_PATH.'/'.$g5['mobile_dir'];
|
||||||
|
}
|
||||||
|
//==============================================================================
|
||||||
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
// 스킨경로
|
// 스킨경로
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
if (G5_IS_MOBILE) {
|
if (G5_IS_MOBILE) {
|
||||||
$board_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/board/'.$board['bo_mobile_skin'];
|
$board_skin_path = get_skin_path('board', $board['bo_mobile_skin']);
|
||||||
$board_skin_url = G5_MOBILE_URL .'/'.G5_SKIN_DIR.'/board/'.$board['bo_mobile_skin'];
|
$board_skin_url = get_skin_url('board', $board['bo_mobile_skin']);
|
||||||
$member_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/member/'.$config['cf_mobile_member_skin'];
|
$member_skin_path = get_skin_path('member', $config['cf_mobile_member_skin']);
|
||||||
$member_skin_url = G5_MOBILE_URL .'/'.G5_SKIN_DIR.'/member/'.$config['cf_mobile_member_skin'];
|
$member_skin_url = get_skin_url('member', $config['cf_mobile_member_skin']);
|
||||||
$new_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/new/'.$config['cf_mobile_new_skin'];
|
$new_skin_path = get_skin_path('new', $config['cf_mobile_new_skin']);
|
||||||
$new_skin_url = G5_MOBILE_URL .'/'.G5_SKIN_DIR.'/new/'.$config['cf_mobile_new_skin'];
|
$new_skin_url = get_skin_url('new', $config['cf_mobile_new_skin']);
|
||||||
$search_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/search/'.$config['cf_mobile_search_skin'];
|
$search_skin_path = get_skin_path('search', $config['cf_mobile_search_skin']);
|
||||||
$search_skin_url = G5_MOBILE_URL .'/'.G5_SKIN_DIR.'/search/'.$config['cf_mobile_search_skin'];
|
$search_skin_url = get_skin_url('search', $config['cf_mobile_search_skin']);
|
||||||
$connect_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/connect/'.$config['cf_mobile_connect_skin'];
|
$connect_skin_path = get_skin_path('connect', $config['cf_mobile_connect_skin']);
|
||||||
$connect_skin_url = G5_MOBILE_URL .'/'.G5_SKIN_DIR.'/connect/'.$config['cf_mobile_connect_skin'];
|
$connect_skin_url = get_skin_url('connect', $config['cf_mobile_connect_skin']);
|
||||||
$faq_skin_path = G5_MOBILE_PATH .'/'.G5_SKIN_DIR.'/faq/'.$config['cf_mobile_faq_skin'];
|
$faq_skin_path = get_skin_path('faq', $config['cf_mobile_faq_skin']);
|
||||||
$faq_skin_url = G5_MOBILE_URL .'/'.G5_SKIN_DIR.'/faq/'.$config['cf_mobile_faq_skin'];
|
$faq_skin_url = get_skin_url('faq', $config['cf_mobile_faq_skin']);
|
||||||
} else {
|
} else {
|
||||||
$board_skin_path = G5_SKIN_PATH.'/board/'.$board['bo_skin'];
|
$board_skin_path = get_skin_path('board', $board['bo_skin']);
|
||||||
$board_skin_url = G5_SKIN_URL .'/board/'.$board['bo_skin'];
|
$board_skin_url = get_skin_url('board', $board['bo_skin']);
|
||||||
$member_skin_path = G5_SKIN_PATH.'/member/'.$config['cf_member_skin'];
|
$member_skin_path = get_skin_path('member', $config['cf_member_skin']);
|
||||||
$member_skin_url = G5_SKIN_URL .'/member/'.$config['cf_member_skin'];
|
$member_skin_url = get_skin_url('member', $config['cf_member_skin']);
|
||||||
$new_skin_path = G5_SKIN_PATH.'/new/'.$config['cf_new_skin'];
|
$new_skin_path = get_skin_path('new', $config['cf_new_skin']);
|
||||||
$new_skin_url = G5_SKIN_URL .'/new/'.$config['cf_new_skin'];
|
$new_skin_url = get_skin_url('new', $config['cf_new_skin']);
|
||||||
$search_skin_path = G5_SKIN_PATH.'/search/'.$config['cf_search_skin'];
|
$search_skin_path = get_skin_path('search', $config['cf_search_skin']);
|
||||||
$search_skin_url = G5_SKIN_URL .'/search/'.$config['cf_search_skin'];
|
$search_skin_url = get_skin_url('search', $config['cf_search_skin']);
|
||||||
$connect_skin_path = G5_SKIN_PATH.'/connect/'.$config['cf_connect_skin'];
|
$connect_skin_path = get_skin_path('connect', $config['cf_connect_skin']);
|
||||||
$connect_skin_url = G5_SKIN_URL .'/connect/'.$config['cf_connect_skin'];
|
$connect_skin_url = get_skin_url('connect', $config['cf_connect_skin']);
|
||||||
$faq_skin_path = G5_SKIN_PATH.'/faq/'.$config['cf_faq_skin'];
|
$faq_skin_path = get_skin_path('faq', $config['cf_faq_skin']);
|
||||||
$faq_skin_url = G5_SKIN_URL.'/faq/'.$config['cf_faq_skin'];
|
$faq_skin_url = get_skin_url('faq', $config['cf_faq_skin']);
|
||||||
}
|
}
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -5,7 +5,7 @@
|
|||||||
********************/
|
********************/
|
||||||
|
|
||||||
define('G5_VERSION', '그누보드5');
|
define('G5_VERSION', '그누보드5');
|
||||||
define('G5_GNUBOARD_VER', '5.0.38');
|
define('G5_GNUBOARD_VER', '5.1.1');
|
||||||
|
|
||||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||||
define('_GNUBOARD_', true);
|
define('_GNUBOARD_', true);
|
||||||
@@ -59,6 +59,7 @@ define('G5_SNS_DIR', 'sns');
|
|||||||
define('G5_SYNDI_DIR', 'syndi');
|
define('G5_SYNDI_DIR', 'syndi');
|
||||||
define('G5_PHPMAILER_DIR', 'PHPMailer_v2.0.4');
|
define('G5_PHPMAILER_DIR', 'PHPMailer_v2.0.4');
|
||||||
define('G5_SESSION_DIR', 'session');
|
define('G5_SESSION_DIR', 'session');
|
||||||
|
define('G5_THEME_DIR', 'theme');
|
||||||
|
|
||||||
// URL 은 브라우저상에서의 경로 (도메인으로 부터의)
|
// URL 은 브라우저상에서의 경로 (도메인으로 부터의)
|
||||||
if (G5_DOMAIN) {
|
if (G5_DOMAIN) {
|
||||||
|
|||||||
+5
-1
@@ -279,4 +279,8 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
|
|||||||
.pg_current {display:inline-block;margin:0 4px 0 0;background:#333;color:#fff;font-weight:normal}
|
.pg_current {display:inline-block;margin:0 4px 0 0;background:#333;color:#fff;font-weight:normal}
|
||||||
|
|
||||||
/* Mobile화면으로 */
|
/* Mobile화면으로 */
|
||||||
#device_change {display:block;margin:0.3em;padding:0.5em 0;border:1px solid #eee;border-radius:2em;background:#fff;color:#000;font-size:2em;text-decoration:none;text-align:center}
|
#device_change {display:block;margin:0.3em;padding:0.5em 0;border:1px solid #eee;border-radius:2em;background:#fff;color:#000;font-size:2em;text-decoration:none;text-align:center}
|
||||||
|
|
||||||
|
/*메일인증*/
|
||||||
|
.rg_em{margin-top:5px}
|
||||||
|
.rg_em caption{padding:0;font-size:0;line-height:0;overflow:hidden}
|
||||||
+7
-1
@@ -247,4 +247,10 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
|
|||||||
.pg_current {display:inline-block;margin:0 4px 0 0;background:#333;color:#fff;font-weight:normal}
|
.pg_current {display:inline-block;margin:0 4px 0 0;background:#333;color:#fff;font-weight:normal}
|
||||||
|
|
||||||
/* PC화면으로 */
|
/* PC화면으로 */
|
||||||
#device_change {display:block;margin:5px;padding:5px 0;border:1px solid #eee;border-radius:2em;color:#000;font-size:1em;text-decoration:none;text-align:center}
|
#device_change {display:block;margin:5px;padding:5px 0;border:1px solid #eee;border-radius:2em;color:#000;font-size:1em;text-decoration:none;text-align:center}
|
||||||
|
|
||||||
|
/*메일인증*/
|
||||||
|
.rg_em_p{padding:0 5px}
|
||||||
|
.rg_em{margin:5px 5px 10px;}
|
||||||
|
.rg_em table{width:100%;border-collapse:collapse}
|
||||||
|
.rg_em caption{padding:0;font-size:0;line-height:0;overflow:hidden}
|
||||||
@@ -1,8 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
// head.sub.php, tail.sub.php 파일의 이름을 지정할 수 있습니다.
|
|
||||||
// 지정된 파일은 head.sub.php, tail.sub.php 파일과 동일한 위치에 존재해야 합니다.
|
|
||||||
//define('G5_HEAD_SUB_FILE', 'user.head.sub.php');
|
|
||||||
//define('G5_TAIL_SUB_FILE', 'user.tail.sub.php');
|
|
||||||
?>
|
?>
|
||||||
+2
-2
@@ -4,7 +4,7 @@ include_once(G5_LIB_PATH.'/connect.lib.php');
|
|||||||
include_once(G5_LIB_PATH.'/outlogin.lib.php');
|
include_once(G5_LIB_PATH.'/outlogin.lib.php');
|
||||||
|
|
||||||
$g5['title'] = '그누보드4 DB 데이터 이전';
|
$g5['title'] = '그누보드4 DB 데이터 이전';
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/'.G5_THEME_DIR.'/basic/head.sub.php');
|
||||||
|
|
||||||
if(get_session('tables_copied') == 'done')
|
if(get_session('tables_copied') == 'done')
|
||||||
alert('DB 데이터 변환을 이미 실행하였습니다. 중복 실행시 오류가 발생할 수 있습니다.', G5_URL);
|
alert('DB 데이터 변환을 이미 실행하였습니다. 중복 실행시 오류가 발생할 수 있습니다.', G5_URL);
|
||||||
@@ -172,5 +172,5 @@ $(function() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once(G5_PATH.'/tail.sub.php');
|
include_once(G5_PATH.'/'.G5_THEME_DIR.'/basic/tail.sub.php');
|
||||||
?>
|
?>
|
||||||
+2
-2
@@ -10,7 +10,7 @@ set_time_limit ( 0 );
|
|||||||
ini_set('memory_limit', '50M');
|
ini_set('memory_limit', '50M');
|
||||||
|
|
||||||
$g5['title'] = '그누보드4 DB 데이터 이전';
|
$g5['title'] = '그누보드4 DB 데이터 이전';
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/'.G5_THEME_DIR.'/basic/head.sub.php');
|
||||||
|
|
||||||
echo '<link rel="stylesheet" href="'.G5_URL.'/g4_import.css">';
|
echo '<link rel="stylesheet" href="'.G5_URL.'/g4_import.css">';
|
||||||
|
|
||||||
@@ -536,5 +536,5 @@ $(function() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once(G5_PATH.'/tail.sub.php');
|
include_once(G5_PATH.'/'.G5_THEME_DIR.'/basic/tail.sub.php');
|
||||||
?>
|
?>
|
||||||
@@ -1,10 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
// 상단 파일 경로 지정 : 이 코드는 가능한 삭제하지 마십시오.
|
if(defined('G5_THEME_PATH')) {
|
||||||
if ($config['cf_include_head'] && is_file(G5_PATH.'/'.$config['cf_include_head'])) {
|
require_once(G5_THEME_PATH.'/head.php');
|
||||||
include_once(G5_PATH.'/'.$config['cf_include_head']);
|
return;
|
||||||
return; // 이 코드의 아래는 실행을 하지 않습니다.
|
}
|
||||||
|
|
||||||
|
if (G5_IS_MOBILE) {
|
||||||
|
include_once(G5_MOBILE_PATH.'/head.php');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
@@ -14,11 +18,6 @@ include_once(G5_LIB_PATH.'/poll.lib.php');
|
|||||||
include_once(G5_LIB_PATH.'/visit.lib.php');
|
include_once(G5_LIB_PATH.'/visit.lib.php');
|
||||||
include_once(G5_LIB_PATH.'/connect.lib.php');
|
include_once(G5_LIB_PATH.'/connect.lib.php');
|
||||||
include_once(G5_LIB_PATH.'/popular.lib.php');
|
include_once(G5_LIB_PATH.'/popular.lib.php');
|
||||||
|
|
||||||
if (G5_IS_MOBILE) {
|
|
||||||
include_once(G5_MOBILE_PATH.'/head.php');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- 상단 시작 { -->
|
<!-- 상단 시작 { -->
|
||||||
@@ -98,7 +97,7 @@ if (G5_IS_MOBILE) {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
<li><a href="<?php echo G5_BBS_URL ?>/faq.php">FAQ</a></li>
|
<li><a href="<?php echo G5_BBS_URL ?>/faq.php">FAQ</a></li>
|
||||||
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php">1:1문의</a></li>
|
<li><a href="<?php echo G5_BBS_URL ?>/qalist.php">1:1문의</a></li>
|
||||||
<li><a href="<?php echo G5_BBS_URL ?>/current_connect.php">접속자 <?php echo connect(); // 현재 접속자수 ?></a></li>
|
<li><a href="<?php echo G5_BBS_URL ?>/current_connect.php">접속자 <?php echo connect(); // 현재 접속자수, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?></a></li>
|
||||||
<li><a href="<?php echo G5_BBS_URL ?>/new.php">새글</a></li>
|
<li><a href="<?php echo G5_BBS_URL ?>/new.php">새글</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -158,8 +157,8 @@ if (G5_IS_MOBILE) {
|
|||||||
<!-- 콘텐츠 시작 { -->
|
<!-- 콘텐츠 시작 { -->
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
<div id="aside">
|
<div id="aside">
|
||||||
<?php echo outlogin('basic'); // 외부 로그인 ?>
|
<?php echo outlogin('basic'); // 외부 로그인, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
|
||||||
<?php echo poll('basic'); // 설문조사 ?>
|
<?php echo poll('basic'); // 설문조사, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<?php if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) { ?><div id="container_title"><?php echo $g5['title'] ?></div><?php } ?>
|
<?php if ((!$bo_table || $w == 's' ) && !defined("_INDEX_")) { ?><div id="container_title"><?php echo $g5['title'] ?></div><?php } ?>
|
||||||
+7
-6
@@ -2,14 +2,14 @@
|
|||||||
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
|
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
$begin_time = get_microtime();
|
// 테마 head.sub.php 파일
|
||||||
|
if(!defined('G5_IS_ADMIN') && defined('G5_THEME_PATH') && is_file(G5_THEME_PATH.'/head.sub.php')) {
|
||||||
// 사용자가 지정한 head.sub.php 파일이 있다면 include
|
require_once(G5_THEME_PATH.'/head.sub.php');
|
||||||
if(defined('G5_HEAD_SUB_FILE') && is_file(G5_PATH.'/'.G5_HEAD_SUB_FILE)) {
|
|
||||||
include_once(G5_PATH.'/'.G5_HEAD_SUB_FILE);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$begin_time = get_microtime();
|
||||||
|
|
||||||
if (!isset($g5['title'])) {
|
if (!isset($g5['title'])) {
|
||||||
$g5['title'] = $config['cf_title'];
|
$g5['title'] = $config['cf_title'];
|
||||||
$g5_head_title = $g5['title'];
|
$g5_head_title = $g5['title'];
|
||||||
@@ -54,7 +54,8 @@ if($config['cf_add_meta'])
|
|||||||
<title><?php echo $g5_head_title; ?></title>
|
<title><?php echo $g5_head_title; ?></title>
|
||||||
<?php
|
<?php
|
||||||
if (defined('G5_IS_ADMIN')) {
|
if (defined('G5_IS_ADMIN')) {
|
||||||
echo '<link rel="stylesheet" href="'.G5_ADMIN_URL.'/css/admin.css">'.PHP_EOL;
|
if(!defined('_THEME_PREVIEW_'))
|
||||||
|
echo '<link rel="stylesheet" href="'.G5_ADMIN_URL.'/css/admin.css">'.PHP_EOL;
|
||||||
} else {
|
} else {
|
||||||
echo '<link rel="stylesheet" href="'.G5_CSS_URL.'/'.(G5_IS_MOBILE?'mobile':'default').'.css">'.PHP_EOL;
|
echo '<link rel="stylesheet" href="'.G5_CSS_URL.'/'.(G5_IS_MOBILE?'mobile':'default').'.css">'.PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
define('_INDEX_', true);
|
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
|
|
||||||
// 초기화면 파일 경로 지정 : 이 코드는 가능한 삭제하지 마십시오.
|
define('_INDEX_', true);
|
||||||
if ($config['cf_include_index'] && is_file(G5_PATH.'/'.$config['cf_include_index'])) {
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
include_once(G5_PATH.'/'.$config['cf_include_index']);
|
|
||||||
return; // 이 코드의 아래는 실행을 하지 않습니다.
|
if(defined('G5_THEME_PATH')) {
|
||||||
|
require_once(G5_THEME_PATH.'/index.php');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G5_IS_MOBILE) {
|
if (G5_IS_MOBILE) {
|
||||||
@@ -13,7 +14,7 @@ if (G5_IS_MOBILE) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once('./_head.php');
|
include_once(G5_PATH.'/head.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h2 class="sound_only">최신글</h2>
|
<h2 class="sound_only">최신글</h2>
|
||||||
@@ -35,6 +36,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
|||||||
<?php
|
<?php
|
||||||
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
|
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
|
||||||
// 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
|
// 사용방법 : latest(스킨, 게시판아이디, 출력라인, 글자수);
|
||||||
|
// 테마의 스킨을 사용하려면 theme/basic 과 같이 지정
|
||||||
echo latest("basic", $row['bo_table'], 5, 25);
|
echo latest("basic", $row['bo_table'], 5, 25);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@@ -44,5 +46,5 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
|||||||
<!-- } 최신글 끝 -->
|
<!-- } 최신글 끝 -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once('./_tail.php');
|
include_once(G5_PATH.'/tail.php');
|
||||||
?>
|
?>
|
||||||
@@ -185,12 +185,10 @@ CREATE TABLE IF NOT EXISTS `g5_board_new` (
|
|||||||
DROP TABLE IF EXISTS `g5_config`;
|
DROP TABLE IF EXISTS `g5_config`;
|
||||||
CREATE TABLE IF NOT EXISTS `g5_config` (
|
CREATE TABLE IF NOT EXISTS `g5_config` (
|
||||||
`cf_title` varchar(255) NOT NULL DEFAULT '',
|
`cf_title` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`cf_theme` varchar(255) NOT NULL DEFAULT '',
|
||||||
`cf_admin` varchar(255) NOT NULL DEFAULT '',
|
`cf_admin` varchar(255) NOT NULL DEFAULT '',
|
||||||
`cf_admin_email` varchar(255) NOT NULL DEFAULT '',
|
`cf_admin_email` varchar(255) NOT NULL DEFAULT '',
|
||||||
`cf_admin_email_name` varchar(255) NOT NULL DEFAULT '',
|
`cf_admin_email_name` varchar(255) NOT NULL DEFAULT '',
|
||||||
`cf_include_index` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`cf_include_head` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`cf_include_tail` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`cf_add_script` text NOT NULL,
|
`cf_add_script` text NOT NULL,
|
||||||
`cf_use_point` tinyint(4) NOT NULL DEFAULT '0',
|
`cf_use_point` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
`cf_point_term` int(11) NOT NULL DEFAULT '0',
|
`cf_point_term` int(11) NOT NULL DEFAULT '0',
|
||||||
|
|||||||
@@ -53,10 +53,12 @@ if (!$select_db) {
|
|||||||
|
|
||||||
$mysql_set_mode = 'false';
|
$mysql_set_mode = 'false';
|
||||||
@mysql_query('set names utf8');
|
@mysql_query('set names utf8');
|
||||||
if(version_compare(mysql_get_server_info(), '5.6.6', '>=') == 1) {
|
$row = mysql_fetch_assoc(mysql_query(" SELECT @@sql_mode as mode "));
|
||||||
|
if($row['mode']) {
|
||||||
@mysql_query("SET SESSION sql_mode = ''");
|
@mysql_query("SET SESSION sql_mode = ''");
|
||||||
$mysql_set_mode = 'true';
|
$mysql_set_mode = 'true';
|
||||||
}
|
}
|
||||||
|
unset($row);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="ins_inner">
|
<div class="ins_inner">
|
||||||
@@ -90,6 +92,7 @@ $download_point = 0;
|
|||||||
// config 테이블 설정
|
// config 테이블 설정
|
||||||
$sql = " insert into `{$table_prefix}config`
|
$sql = " insert into `{$table_prefix}config`
|
||||||
set cf_title = '".G5_VERSION."',
|
set cf_title = '".G5_VERSION."',
|
||||||
|
cf_theme = 'basic',
|
||||||
cf_admin = '$admin_id',
|
cf_admin = '$admin_id',
|
||||||
cf_admin_email = '$admin_email',
|
cf_admin_email = '$admin_email',
|
||||||
cf_admin_email_name = '".G5_VERSION."',
|
cf_admin_email_name = '".G5_VERSION."',
|
||||||
|
|||||||
+2
-2
@@ -69,7 +69,7 @@ $(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 임시저장된 글 제목과 내용을 가져와서 제목과 내용 입력박스에 노출해 줌
|
// 임시저장된 글 제목과 내용을 가져와서 제목과 내용 입력박스에 노출해 줌
|
||||||
$(".autosave_load").live("click", function(){
|
$(document).on( "click", ".autosave_load", function(){
|
||||||
var $li = $(this).parents("li");
|
var $li = $(this).parents("li");
|
||||||
var as_id = $li.data("as_id");
|
var as_id = $li.data("as_id");
|
||||||
var as_uid = $li.data("uid");
|
var as_uid = $li.data("uid");
|
||||||
@@ -93,7 +93,7 @@ $(function(){
|
|||||||
$("#autosave_pop").hide();
|
$("#autosave_pop").hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".autosave_del").live("click", function(){
|
$(document).on( "click", ".autosave_del", function(){
|
||||||
var $li = $(this).parents("li");
|
var $li = $(this).parents("li");
|
||||||
var as_id = $li.data("as_id");
|
var as_id = $li.data("as_id");
|
||||||
$.get(g5_bbs_url+"/ajax.autosavedel.php", {"as_id":as_id}, function(data){
|
$.get(g5_bbs_url+"/ajax.autosavedel.php", {"as_id":as_id}, function(data){
|
||||||
|
|||||||
+6
-7
@@ -376,7 +376,7 @@ var win_homepage = function(href) {
|
|||||||
/**
|
/**
|
||||||
* 우편번호 창
|
* 우편번호 창
|
||||||
**/
|
**/
|
||||||
var win_zip = function(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2, frm_addr3, frm_jibeon) {
|
var win_zip = function(frm_name, frm_zip, frm_addr1, frm_addr2, frm_addr3, frm_jibeon) {
|
||||||
if(typeof daum === 'undefined'){
|
if(typeof daum === 'undefined'){
|
||||||
alert("다음 우편번호 postcode.v2.js 파일이 로드되지 않았습니다.");
|
alert("다음 우편번호 postcode.v2.js 파일이 로드되지 않았습니다.");
|
||||||
return false;
|
return false;
|
||||||
@@ -386,7 +386,7 @@ var win_zip = function(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2, frm_a
|
|||||||
|
|
||||||
var complete_fn = function(data){
|
var complete_fn = function(data){
|
||||||
// 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
|
// 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분.
|
||||||
|
|
||||||
// 각 주소의 노출 규칙에 따라 주소를 조합한다.
|
// 각 주소의 노출 규칙에 따라 주소를 조합한다.
|
||||||
// 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
|
// 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
|
||||||
var fullAddr = ''; // 최종 주소 변수
|
var fullAddr = ''; // 최종 주소 변수
|
||||||
@@ -417,8 +417,7 @@ var win_zip = function(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2, frm_a
|
|||||||
// 우편번호와 주소 정보를 해당 필드에 넣고, 커서를 상세주소 필드로 이동한다.
|
// 우편번호와 주소 정보를 해당 필드에 넣고, 커서를 상세주소 필드로 이동한다.
|
||||||
var of = document[frm_name];
|
var of = document[frm_name];
|
||||||
|
|
||||||
of[frm_zip1].value = data.postcode1;
|
of[frm_zip].value = data.zonecode;
|
||||||
of[frm_zip2].value = data.postcode2;
|
|
||||||
|
|
||||||
of[frm_addr1].value = fullAddr;
|
of[frm_addr1].value = fullAddr;
|
||||||
of[frm_addr3].value = extraAddr;
|
of[frm_addr3].value = extraAddr;
|
||||||
@@ -432,7 +431,7 @@ var win_zip = function(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2, frm_a
|
|||||||
|
|
||||||
switch(zip_case) {
|
switch(zip_case) {
|
||||||
case 1 : //iframe을 이용하여 페이지에 끼워 넣기
|
case 1 : //iframe을 이용하여 페이지에 끼워 넣기
|
||||||
var daum_pape_id = 'daum_juso_page'+frm_zip1,
|
var daum_pape_id = 'daum_juso_page'+frm_zip,
|
||||||
element_wrap = document.getElementById(daum_pape_id),
|
element_wrap = document.getElementById(daum_pape_id),
|
||||||
currentScroll = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
|
currentScroll = Math.max(document.body.scrollTop, document.documentElement.scrollTop);
|
||||||
if (element_wrap == null) {
|
if (element_wrap == null) {
|
||||||
@@ -475,7 +474,7 @@ var win_zip = function(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2, frm_a
|
|||||||
}).open();
|
}).open();
|
||||||
break;
|
break;
|
||||||
default : //iframe을 이용하여 레이어 띄우기
|
default : //iframe을 이용하여 레이어 띄우기
|
||||||
var rayer_id = 'daum_juso_rayer'+frm_zip1,
|
var rayer_id = 'daum_juso_rayer'+frm_zip,
|
||||||
element_layer = document.getElementById(rayer_id);
|
element_layer = document.getElementById(rayer_id);
|
||||||
if (element_layer == null) {
|
if (element_layer == null) {
|
||||||
element_layer = document.createElement("div");
|
element_layer = document.createElement("div");
|
||||||
@@ -675,7 +674,7 @@ $(function(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("textarea#wr_content[maxlength]").live("keyup change", function() {
|
$(document).on( "keyup change", "textarea#wr_content[maxlength]", function(){
|
||||||
var str = $(this).val();
|
var str = $(this).val();
|
||||||
var mx = parseInt($(this).attr("maxlength"));
|
var mx = parseInt($(this).attr("maxlength"));
|
||||||
if (str.length > mx) {
|
if (str.length > mx) {
|
||||||
|
|||||||
+53
-12
@@ -192,7 +192,7 @@ function confirm($msg, $url1='', $url2='', $url3='')
|
|||||||
alert($msg);
|
alert($msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$url3) $url3 = $_SERVER['HTTP_REFERER'];
|
if (!$url3) $url3 = clean_xss_tags($_SERVER['HTTP_REFERER']);
|
||||||
|
|
||||||
$msg = str_replace("\\n", "<br>", $msg);
|
$msg = str_replace("\\n", "<br>", $msg);
|
||||||
|
|
||||||
@@ -1309,7 +1309,7 @@ function view_file_link($file, $width, $height, $content='')
|
|||||||
|
|
||||||
if (preg_match("/\.({$config['cf_image_extension']})$/i", $file)) {
|
if (preg_match("/\.({$config['cf_image_extension']})$/i", $file)) {
|
||||||
$img = '<a href="'.G5_BBS_URL.'/view_image.php?bo_table='.$board['bo_table'].'&fn='.urlencode($file).'" target="_blank" class="view_image">';
|
$img = '<a href="'.G5_BBS_URL.'/view_image.php?bo_table='.$board['bo_table'].'&fn='.urlencode($file).'" target="_blank" class="view_image">';
|
||||||
$img .= '<img src="'.G5_DATA_URL.'/file/'.$board['bo_table'].'/'.urlencode($file).'" alt="'.$content.'">';
|
$img .= '<img src="'.G5_DATA_URL.'/file/'.$board['bo_table'].'/'.urlencode($file).'" alt="'.$content.'" '.$attr.'>';
|
||||||
$img .= '</a>';
|
$img .= '</a>';
|
||||||
|
|
||||||
return $img;
|
return $img;
|
||||||
@@ -2066,7 +2066,7 @@ function delete_editor_thumbnail($contents)
|
|||||||
|
|
||||||
for($i=0; $i<count($matchs[1]); $i++) {
|
for($i=0; $i<count($matchs[1]); $i++) {
|
||||||
// 이미지 path 구함
|
// 이미지 path 구함
|
||||||
$imgurl = parse_url($matchs[1][$i]);
|
$imgurl = @parse_url($matchs[1][$i]);
|
||||||
$srcfile = $_SERVER['DOCUMENT_ROOT'].$imgurl['path'];
|
$srcfile = $_SERVER['DOCUMENT_ROOT'].$imgurl['path'];
|
||||||
|
|
||||||
$filename = preg_replace("/\.[^\.]+$/i", "", basename($srcfile));
|
$filename = preg_replace("/\.[^\.]+$/i", "", basename($srcfile));
|
||||||
@@ -2367,12 +2367,8 @@ function hyphen_hp_number($hp)
|
|||||||
function login_url($url='')
|
function login_url($url='')
|
||||||
{
|
{
|
||||||
if (!$url) $url = G5_URL;
|
if (!$url) $url = G5_URL;
|
||||||
/*
|
|
||||||
$p = parse_url($url);
|
return urlencode(clean_xss_tags(urldecode($url)));
|
||||||
echo urlencode($_SERVER['REQUEST_URI']);
|
|
||||||
return $url.urldecode(preg_replace("/^".urlencode($p['path'])."/", "", urlencode($_SERVER['REQUEST_URI'])));
|
|
||||||
*/
|
|
||||||
return $url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2727,6 +2723,11 @@ function clean_xss_tags($str)
|
|||||||
{
|
{
|
||||||
$str = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $str);
|
$str = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $str);
|
||||||
|
|
||||||
|
$search = array('"', "'");
|
||||||
|
$replace = array('"', ''');
|
||||||
|
|
||||||
|
$str = str_replace($search, $replace, $str);
|
||||||
|
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2747,6 +2748,11 @@ function member_delete($mb_id)
|
|||||||
|
|
||||||
$sql = " select mb_name, mb_nick, mb_ip, mb_recommend, mb_memo, mb_level from {$g5['member_table']} where mb_id= '".$mb_id."' ";
|
$sql = " select mb_name, mb_nick, mb_ip, mb_recommend, mb_memo, mb_level from {$g5['member_table']} where mb_id= '".$mb_id."' ";
|
||||||
$mb = sql_fetch($sql);
|
$mb = sql_fetch($sql);
|
||||||
|
|
||||||
|
// 이미 삭제된 회원은 제외
|
||||||
|
if(preg_match('#^[0-9]{8}.*삭제함#', $mb['mb_memo']))
|
||||||
|
return;
|
||||||
|
|
||||||
if ($mb['mb_recommend']) {
|
if ($mb['mb_recommend']) {
|
||||||
$row = sql_fetch(" select count(*) as cnt from {$g5['member_table']} where mb_id = '".addslashes($mb['mb_recommend'])."' ");
|
$row = sql_fetch(" select count(*) as cnt from {$g5['member_table']} where mb_id = '".addslashes($mb['mb_recommend'])."' ");
|
||||||
if ($row['cnt'])
|
if ($row['cnt'])
|
||||||
@@ -2754,7 +2760,7 @@ function member_delete($mb_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 회원자료는 정보만 없앤 후 아이디는 보관하여 다른 사람이 사용하지 못하도록 함 : 061025
|
// 회원자료는 정보만 없앤 후 아이디는 보관하여 다른 사람이 사용하지 못하도록 함 : 061025
|
||||||
$sql = " update {$g5['member_table']} set mb_password = '', mb_level = 1, mb_email = '', mb_homepage = '', mb_tel = '', mb_hp = '', mb_zip1 = '', mb_zip2 = '', mb_addr1 = '', mb_addr2 = '', mb_birth = '', mb_sex = '', mb_signature = '', mb_memo = '".date('Ymd', G5_SERVER_TIME)." 삭제함\n{$mb['mb_memo']}', mb_leave_date = '".date('Ymd', G5_SERVER_TIME)."' where mb_id = '{$mb_id}' ";
|
$sql = " update {$g5['member_table']} set mb_password = '', mb_level = 1, mb_email = '', mb_homepage = '', mb_tel = '', mb_hp = '', mb_zip1 = '', mb_zip2 = '', mb_addr1 = '', mb_addr2 = '', mb_birth = '', mb_sex = '', mb_signature = '', mb_memo = '".date('Ymd', G5_SERVER_TIME)." 삭제함\n{$mb['mb_memo']}' where mb_id = '{$mb_id}' ";
|
||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
|
|
||||||
// 포인트 테이블에서 삭제
|
// 포인트 테이블에서 삭제
|
||||||
@@ -2851,7 +2857,7 @@ function check_url_host($url, $msg='', $return_url=G5_URL)
|
|||||||
if(!$msg)
|
if(!$msg)
|
||||||
$msg = 'url에 타 도메인을 지정할 수 없습니다.';
|
$msg = 'url에 타 도메인을 지정할 수 없습니다.';
|
||||||
|
|
||||||
$p = parse_url($url);
|
$p = @parse_url($url);
|
||||||
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
|
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
|
||||||
|
|
||||||
if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host'])) {
|
if ((isset($p['scheme']) && $p['scheme']) || (isset($p['host']) && $p['host'])) {
|
||||||
@@ -2956,7 +2962,7 @@ function clean_query_string($query, $amp=true)
|
|||||||
|
|
||||||
function get_device_change_url()
|
function get_device_change_url()
|
||||||
{
|
{
|
||||||
$p = parse_url(G5_URL);
|
$p = @parse_url(G5_URL);
|
||||||
$href = $p['scheme'].'://'.$p['host'];
|
$href = $p['scheme'].'://'.$p['host'];
|
||||||
if(isset($p['port']) && $p['port'])
|
if(isset($p['port']) && $p['port'])
|
||||||
$href .= ':'.$p['port'];
|
$href .= ':'.$p['port'];
|
||||||
@@ -2987,4 +2993,39 @@ function get_device_change_url()
|
|||||||
|
|
||||||
return $href;
|
return $href;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 스킨 path
|
||||||
|
function get_skin_path($dir, $skin)
|
||||||
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
if(preg_match('#^theme/(.+)$#', $skin, $match)) { // 테마에 포함된 스킨이라면
|
||||||
|
$theme_path = '';
|
||||||
|
$cf_theme = trim($config['cf_theme']);
|
||||||
|
|
||||||
|
$theme_path = G5_PATH.'/'.G5_THEME_DIR.'/'.$cf_theme;
|
||||||
|
if(G5_IS_MOBILE) {
|
||||||
|
$skin_path = $theme_path.'/'.G5_MOBILE_DIR.'/'.G5_SKIN_DIR.'/'.$dir.'/'.$match[1];
|
||||||
|
if(!is_dir($skin_path))
|
||||||
|
$skin_path = $theme_path.'/'.G5_SKIN_DIR.'/'.$dir.'/'.$match[1];
|
||||||
|
} else {
|
||||||
|
$skin_path = $theme_path.'/'.G5_SKIN_DIR.'/'.$dir.'/'.$match[1];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(G5_IS_MOBILE)
|
||||||
|
$skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/'.$dir.'/'.$skin;
|
||||||
|
else
|
||||||
|
$skin_path = G5_SKIN_PATH.'/'.$dir.'/'.$skin;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $skin_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 스킨 url
|
||||||
|
function get_skin_url($dir, $skin)
|
||||||
|
{
|
||||||
|
$skin_path = get_skin_path($dir, $skin);
|
||||||
|
|
||||||
|
return str_replace(G5_PATH, G5_URL, $skin_path);
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
+18
-5
@@ -10,12 +10,25 @@ function connect($skin_dir='basic')
|
|||||||
$sql = " select sum(IF(mb_id<>'',1,0)) as mb_cnt, count(*) as total_cnt from {$g5['login_table']} where mb_id <> '{$config['cf_admin']}' ";
|
$sql = " select sum(IF(mb_id<>'',1,0)) as mb_cnt, count(*) as total_cnt from {$g5['login_table']} where mb_id <> '{$config['cf_admin']}' ";
|
||||||
$row = sql_fetch($sql);
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
if(G5_IS_MOBILE) {
|
if(preg_match('#^theme/(.+)$#', $skin_dir, $match)) {
|
||||||
$connect_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/connect/'.$skin_dir;
|
if (G5_IS_MOBILE) {
|
||||||
$connect_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/connect/'.$skin_dir;
|
$connect_skin_path = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/connect/'.$match[1];
|
||||||
|
if(!is_dir($connect_skin_path))
|
||||||
|
$connect_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/connect/'.$match[1];
|
||||||
|
$connect_skin_url = str_replace(G5_PATH, G5_URL, $connect_skin_path);
|
||||||
|
} else {
|
||||||
|
$connect_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/connect/'.$match[1];
|
||||||
|
$connect_skin_url = str_replace(G5_PATH, G5_URL, $connect_skin_path);
|
||||||
|
}
|
||||||
|
$skin_dir = $match[1];
|
||||||
} else {
|
} else {
|
||||||
$connect_skin_path = G5_SKIN_PATH.'/connect/'.$skin_dir;
|
if(G5_IS_MOBILE) {
|
||||||
$connect_skin_url = G5_SKIN_URL.'/connect/'.$skin_dir;
|
$connect_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/connect/'.$skin_dir;
|
||||||
|
$connect_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/connect/'.$skin_dir;
|
||||||
|
} else {
|
||||||
|
$connect_skin_path = G5_SKIN_PATH.'/connect/'.$skin_dir;
|
||||||
|
$connect_skin_url = G5_SKIN_URL.'/connect/'.$skin_dir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit;
|
||||||
|
|
||||||
|
// http://tinsology.net/2011/04/php-json_encode-and-json_decode-alternatives/
|
||||||
|
|
||||||
|
if(!function_exists('json_encode'))
|
||||||
|
{
|
||||||
|
function json_encode($a=false)
|
||||||
|
{
|
||||||
|
// Some basic debugging to ensure we have something returned
|
||||||
|
if (is_null($a)) return 'null';
|
||||||
|
if ($a === false) return 'false';
|
||||||
|
if ($a === true) return 'true';
|
||||||
|
if (is_scalar($a))
|
||||||
|
{
|
||||||
|
if (is_float($a))
|
||||||
|
{
|
||||||
|
// Always use '.' for floats.
|
||||||
|
return floatval(str_replace(',', '.', strval($a)));
|
||||||
|
}
|
||||||
|
if (is_string($a))
|
||||||
|
{
|
||||||
|
static $jsonReplaces = array(array('\\', '/', "\n", "\t", "\r", "\b", "\f", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'));
|
||||||
|
return '"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $a) . '"';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return $a;
|
||||||
|
}
|
||||||
|
$isList = true;
|
||||||
|
for ($i = 0, reset($a); true; $i++) {
|
||||||
|
if (key($a) !== $i)
|
||||||
|
{
|
||||||
|
$isList = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$result = array();
|
||||||
|
if ($isList)
|
||||||
|
{
|
||||||
|
foreach ($a as $v) $result[] = json_encode($v);
|
||||||
|
return '[' . join(',', $result) . ']';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach ($a as $k => $v) $result[] = json_encode($k).':'.json_encode($v);
|
||||||
|
return '{' . join(',', $result) . '}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!function_exists('json_decode'))
|
||||||
|
{
|
||||||
|
function json_decode($json)
|
||||||
|
{
|
||||||
|
$comment = false;
|
||||||
|
$out = '$x=';
|
||||||
|
for ($i=0; $i<strlen($json); $i++)
|
||||||
|
{
|
||||||
|
if (!$comment)
|
||||||
|
{
|
||||||
|
if (($json[$i] == '{') || ($json[$i] == '['))
|
||||||
|
$out .= ' array(';
|
||||||
|
else if (($json[$i] == '}') || ($json[$i] == ']'))
|
||||||
|
$out .= ')';
|
||||||
|
else if ($json[$i] == ':')
|
||||||
|
$out .= '=>';
|
||||||
|
else
|
||||||
|
$out .= $json[$i];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$out .= $json[$i];
|
||||||
|
if ($json[$i] == '"' && $json[($i-1)]!="\\")
|
||||||
|
$comment = !$comment;
|
||||||
|
}
|
||||||
|
eval($out . ';');
|
||||||
|
return $x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
+18
-14
@@ -6,16 +6,28 @@ if (!defined('_GNUBOARD_')) exit;
|
|||||||
function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=1, $options='')
|
function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=1, $options='')
|
||||||
{
|
{
|
||||||
global $g5;
|
global $g5;
|
||||||
//static $css = array();
|
|
||||||
|
|
||||||
if (!$skin_dir) $skin_dir = 'basic';
|
if (!$skin_dir) $skin_dir = 'basic';
|
||||||
|
|
||||||
if(G5_IS_MOBILE) {
|
if(preg_match('#^theme/(.+)$#', $skin_dir, $match)) {
|
||||||
$latest_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/latest/'.$skin_dir;
|
if (G5_IS_MOBILE) {
|
||||||
$latest_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/latest/'.$skin_dir;
|
$latest_skin_path = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/latest/'.$match[1];
|
||||||
|
if(!is_dir($latest_skin_path))
|
||||||
|
$latest_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/latest/'.$match[1];
|
||||||
|
$latest_skin_url = str_replace(G5_PATH, G5_URL, $latest_skin_path);
|
||||||
|
} else {
|
||||||
|
$latest_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/latest/'.$match[1];
|
||||||
|
$latest_skin_url = str_replace(G5_PATH, G5_URL, $latest_skin_path);
|
||||||
|
}
|
||||||
|
$skin_dir = $match[1];
|
||||||
} else {
|
} else {
|
||||||
$latest_skin_path = G5_SKIN_PATH.'/latest/'.$skin_dir;
|
if(G5_IS_MOBILE) {
|
||||||
$latest_skin_url = G5_SKIN_URL.'/latest/'.$skin_dir;
|
$latest_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/latest/'.$skin_dir;
|
||||||
|
$latest_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/latest/'.$skin_dir;
|
||||||
|
} else {
|
||||||
|
$latest_skin_path = G5_SKIN_PATH.'/latest/'.$skin_dir;
|
||||||
|
$latest_skin_url = G5_SKIN_URL.'/latest/'.$skin_dir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$cache_fwrite = false;
|
$cache_fwrite = false;
|
||||||
@@ -60,14 +72,6 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $cache_time=
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
// 같은 스킨은 .css 를 한번만 호출한다.
|
|
||||||
if (!in_array($skin_dir, $css) && is_file($latest_skin_path.'/style.css')) {
|
|
||||||
echo '<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">';
|
|
||||||
$css[] = $skin_dir;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
include $latest_skin_path.'/latest.skin.php';
|
include $latest_skin_path.'/latest.skin.php';
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
|
|||||||
+18
-5
@@ -13,12 +13,25 @@ function outlogin($skin_dir='basic')
|
|||||||
$point = number_format($member['mb_point']);
|
$point = number_format($member['mb_point']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (G5_IS_MOBILE) {
|
if(preg_match('#^theme/(.+)$#', $skin_dir, $match)) {
|
||||||
$outlogin_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/outlogin/'.$skin_dir;
|
if (G5_IS_MOBILE) {
|
||||||
$outlogin_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/outlogin/'.$skin_dir;
|
$outlogin_skin_path = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/outlogin/'.$match[1];
|
||||||
|
if(!is_dir($outlogin_skin_path))
|
||||||
|
$outlogin_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/outlogin/'.$match[1];
|
||||||
|
$outlogin_skin_url = str_replace(G5_PATH, G5_URL, $outlogin_skin_path);
|
||||||
|
} else {
|
||||||
|
$outlogin_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/outlogin/'.$match[1];
|
||||||
|
$outlogin_skin_url = str_replace(G5_PATH, G5_URL, $outlogin_skin_path);
|
||||||
|
}
|
||||||
|
$skin_dir = $match[1];
|
||||||
} else {
|
} else {
|
||||||
$outlogin_skin_path = G5_SKIN_PATH.'/outlogin/'.$skin_dir;
|
if (G5_IS_MOBILE) {
|
||||||
$outlogin_skin_url = G5_SKIN_URL.'/outlogin/'.$skin_dir;
|
$outlogin_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/outlogin/'.$skin_dir;
|
||||||
|
$outlogin_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/outlogin/'.$skin_dir;
|
||||||
|
} else {
|
||||||
|
$outlogin_skin_path = G5_SKIN_PATH.'/outlogin/'.$skin_dir;
|
||||||
|
$outlogin_skin_url = G5_SKIN_URL.'/outlogin/'.$skin_dir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 읽지 않은 쪽지가 있다면
|
// 읽지 않은 쪽지가 있다면
|
||||||
|
|||||||
+21
-7
@@ -15,16 +15,30 @@ function poll($skin_dir='basic', $po_id=false)
|
|||||||
if(!$po_id)
|
if(!$po_id)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(preg_match('#^theme/(.+)$#', $skin_dir, $match)) {
|
||||||
|
if (G5_IS_MOBILE) {
|
||||||
|
$poll_skin_path = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/poll/'.$match[1];
|
||||||
|
if(!is_dir($poll_skin_path))
|
||||||
|
$poll_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/poll/'.$match[1];
|
||||||
|
$poll_skin_url = str_replace(G5_PATH, G5_URL, $poll_skin_path);
|
||||||
|
} else {
|
||||||
|
$poll_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/poll/'.$match[1];
|
||||||
|
$poll_skin_url = str_replace(G5_PATH, G5_URL, $poll_skin_path);
|
||||||
|
}
|
||||||
|
//$skin_dir = $match[1];
|
||||||
|
} else {
|
||||||
|
if (G5_IS_MOBILE) {
|
||||||
|
$poll_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/poll/'.$skin_dir;
|
||||||
|
$poll_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/poll/'.$skin_dir;
|
||||||
|
} else {
|
||||||
|
$poll_skin_path = G5_SKIN_PATH.'/poll/'.$skin_dir;
|
||||||
|
$poll_skin_url = G5_SKIN_URL.'/poll/'.$skin_dir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$po = sql_fetch(" select * from {$g5['poll_table']} where po_id = '$po_id' ");
|
$po = sql_fetch(" select * from {$g5['poll_table']} where po_id = '$po_id' ");
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
if (G5_IS_MOBILE) {
|
|
||||||
$poll_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/poll/'.$skin_dir;
|
|
||||||
$poll_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/poll/'.$skin_dir;
|
|
||||||
} else {
|
|
||||||
$poll_skin_path = G5_SKIN_PATH.'/poll/'.$skin_dir;
|
|
||||||
$poll_skin_url = G5_SKIN_URL.'/poll/'.$skin_dir;
|
|
||||||
}
|
|
||||||
include_once ($poll_skin_path.'/poll.skin.php');
|
include_once ($poll_skin_path.'/poll.skin.php');
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|||||||
+20
-6
@@ -20,14 +20,28 @@ function popular($skin_dir='basic', $pop_cnt=7, $date_cnt=3)
|
|||||||
$list[$i]['pp_word'] = get_text($list[$i]['pp_word']);
|
$list[$i]['pp_word'] = get_text($list[$i]['pp_word']);
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
if(preg_match('#^theme/(.+)$#', $skin_dir, $match)) {
|
||||||
if(G5_IS_MOBILE) {
|
if (G5_IS_MOBILE) {
|
||||||
$popular_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/popular/'.$skin_dir;
|
$popular_skin_path = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/popular/'.$match[1];
|
||||||
$popular_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/popular/'.$skin_dir;
|
if(!is_dir($popular_skin_path))
|
||||||
|
$popular_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/popular/'.$match[1];
|
||||||
|
$popular_skin_url = str_replace(G5_PATH, G5_URL, $popular_skin_path);
|
||||||
|
} else {
|
||||||
|
$popular_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/popular/'.$match[1];
|
||||||
|
$popular_skin_url = str_replace(G5_PATH, G5_URL,$popular_skin_path);
|
||||||
|
}
|
||||||
|
$skin_dir = $match[1];
|
||||||
} else {
|
} else {
|
||||||
$popular_skin_path = G5_SKIN_PATH.'/popular/'.$skin_dir;
|
if(G5_IS_MOBILE) {
|
||||||
$popular_skin_url = G5_SKIN_URL.'/popular/'.$skin_dir;
|
$popular_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/popular/'.$skin_dir;
|
||||||
|
$popular_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/popular/'.$skin_dir;
|
||||||
|
} else {
|
||||||
|
$popular_skin_path = G5_SKIN_PATH.'/popular/'.$skin_dir;
|
||||||
|
$popular_skin_url = G5_SKIN_URL.'/popular/'.$skin_dir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ob_start();
|
||||||
include_once ($popular_skin_path.'/popular.skin.php');
|
include_once ($popular_skin_path.'/popular.skin.php');
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|||||||
@@ -59,15 +59,19 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
|
|||||||
|
|
||||||
if($tname) {
|
if($tname) {
|
||||||
if($edt) {
|
if($edt) {
|
||||||
|
// 오리지날 이미지
|
||||||
|
$ori = G5_URL.$data_path;
|
||||||
|
// 썸네일 이미지
|
||||||
$src = G5_URL.str_replace($filename, $tname, $data_path);
|
$src = G5_URL.str_replace($filename, $tname, $data_path);
|
||||||
} else {
|
} else {
|
||||||
|
$ori = G5_DATA_URL.'/file/'.$bo_table.'/'.$filename;
|
||||||
$src = G5_DATA_URL.'/file/'.$bo_table.'/'.$tname;
|
$src = G5_DATA_URL.'/file/'.$bo_table.'/'.$tname;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$thumb = array("src"=>$src, "alt"=>$alt);
|
$thumb = array("src"=>$src, "ori"=>$ori, "alt"=>$alt);
|
||||||
|
|
||||||
return $thumb;
|
return $thumb;
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-6
@@ -18,14 +18,28 @@ function visit($skin_dir='basic')
|
|||||||
settype($visit[3], "integer");
|
settype($visit[3], "integer");
|
||||||
settype($visit[4], "integer");
|
settype($visit[4], "integer");
|
||||||
|
|
||||||
ob_start();
|
if(preg_match('#^theme/(.+)$#', $skin_dir, $match)) {
|
||||||
if(G5_IS_MOBILE) {
|
if (G5_IS_MOBILE) {
|
||||||
$visit_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/visit/'.$skin_dir;
|
$visit_skin_path = G5_THEME_MOBILE_PATH.'/'.G5_SKIN_DIR.'/visit/'.$match[1];
|
||||||
$visit_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/visit/'.$skin_dir;
|
if(!is_dir($visit_skin_path))
|
||||||
|
$visit_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/visit/'.$match[1];
|
||||||
|
$visit_skin_url = str_replace(G5_PATH, G5_URL, $visit_skin_path);
|
||||||
|
} else {
|
||||||
|
$visit_skin_path = G5_THEME_PATH.'/'.G5_SKIN_DIR.'/visit/'.$match[1];
|
||||||
|
$visit_skin_url = str_replace(G5_PATH, G5_URL, $visit_skin_path);
|
||||||
|
}
|
||||||
|
$skin_dir = $match[1];
|
||||||
} else {
|
} else {
|
||||||
$visit_skin_path = G5_SKIN_PATH.'/visit/'.$skin_dir;
|
if(G5_IS_MOBILE) {
|
||||||
$visit_skin_url = G5_SKIN_URL.'/visit/'.$skin_dir;
|
$visit_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/visit/'.$skin_dir;
|
||||||
|
$visit_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/visit/'.$skin_dir;
|
||||||
|
} else {
|
||||||
|
$visit_skin_path = G5_SKIN_PATH.'/visit/'.$skin_dir;
|
||||||
|
$visit_skin_url = G5_SKIN_URL.'/visit/'.$skin_dir;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ob_start();
|
||||||
include_once ($visit_skin_path.'/visit.skin.php');
|
include_once ($visit_skin_path.'/visit.skin.php');
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|||||||
+2
-2
@@ -49,8 +49,8 @@ $str = preg_replace($src, $dst, $str);
|
|||||||
if(trim($co['co_mobile_skin']) == '')
|
if(trim($co['co_mobile_skin']) == '')
|
||||||
$co['co_mobile_skin'] = 'basic';
|
$co['co_mobile_skin'] = 'basic';
|
||||||
|
|
||||||
$content_skin_path = G5_MOBILE_PATH .'/'.G5_SKIN_DIR.'/content/'.$co['co_mobile_skin'];
|
$content_skin_path = get_skin_path('content', $co['co_mobile_skin']);
|
||||||
$content_skin_url = G5_MOBILE_URL .'/'.G5_SKIN_DIR.'/content/'.$co['co_mobile_skin'];
|
$content_skin_url = get_skin_url('content', $co['co_mobile_skin']);
|
||||||
$skin_file = $content_skin_path.'/content.skin.php';
|
$skin_file = $content_skin_path.'/content.skin.php';
|
||||||
|
|
||||||
if(is_file($skin_file)) {
|
if(is_file($skin_file)) {
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
if(defined('G5_THEME_PATH')) {
|
||||||
|
require_once(G5_THEME_PATH.'/head.php');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
include_once(G5_LIB_PATH.'/latest.lib.php');
|
include_once(G5_LIB_PATH.'/latest.lib.php');
|
||||||
include_once(G5_LIB_PATH.'/outlogin.lib.php');
|
include_once(G5_LIB_PATH.'/outlogin.lib.php');
|
||||||
|
|||||||
+7
-2
@@ -1,7 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
include_once(G5_MOBILE_PATH.'/_head.php');
|
if(defined('G5_THEME_PATH')) {
|
||||||
|
require_once(G5_THEME_PATH.'/index.php');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
include_once(G5_MOBILE_PATH.'/head.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- 메인화면 최신글 시작 -->
|
<!-- 메인화면 최신글 시작 -->
|
||||||
@@ -26,5 +31,5 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
|
|||||||
<!-- 메인화면 최신글 끝 -->
|
<!-- 메인화면 최신글 끝 -->
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include_once(G5_MOBILE_PATH.'/_tail.php');
|
include_once(G5_MOBILE_PATH.'/tail.php');
|
||||||
?>
|
?>
|
||||||
@@ -13,14 +13,11 @@ $result = sql_query($sql, false);
|
|||||||
<h2>팝업레이어 알림</h2>
|
<h2>팝업레이어 알림</h2>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
for ($i=0; $row_nw=sql_fetch_array($result); $i++)
|
for ($i=0; $nw=sql_fetch_array($result); $i++)
|
||||||
{
|
{
|
||||||
// 이미 체크 되었다면 Continue
|
// 이미 체크 되었다면 Continue
|
||||||
if ($_COOKIE["hd_pops_{$row_nw['nw_id']}"])
|
if ($_COOKIE["hd_pops_{$nw['nw_id']}"])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$sql = " select * from {$g5['new_win_table']} where nw_id = '{$row_nw['nw_id']}' ";
|
|
||||||
$nw = sql_fetch($sql);
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="hd_pops_<?php echo $nw['nw_id'] ?>" class="hd_pops" style="top:<?php echo $nw['nw_top']?>px;left:<?php echo $nw['nw_left']?>px;">
|
<div id="hd_pops_<?php echo $nw['nw_id'] ?>" class="hd_pops" style="top:<?php echo $nw['nw_top']?>px;left:<?php echo $nw['nw_left']?>px;">
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (implode('', $view['link'])) {
|
if ($view['link']) {
|
||||||
?>
|
?>
|
||||||
<section id="bo_v_link">
|
<section id="bo_v_link">
|
||||||
<h2>관련링크</h2>
|
<h2>관련링크</h2>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -179,7 +179,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
// 코멘트 입출력
|
// 코멘트 입출력
|
||||||
include_once('./view_comment.php');
|
include_once(G5_BBS_PATH.'/view_comment.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="bo_v_bot">
|
<div id="bo_v_bot">
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ $(window).on("load", function() {
|
|||||||
<option value="wr_name,1"<?php echo get_selected($sfl, "wr_name,1"); ?>>글쓴이</option>
|
<option value="wr_name,1"<?php echo get_selected($sfl, "wr_name,1"); ?>>글쓴이</option>
|
||||||
<option value="wr_name,0"<?php echo get_selected($sfl, "wr_name,0"); ?>>글쓴이(코)</option>
|
<option value="wr_name,0"<?php echo get_selected($sfl, "wr_name,0"); ?>>글쓴이(코)</option>
|
||||||
</select>
|
</select>
|
||||||
<input name="stx" value="<?php echo stripslashes($stx) ?>" placeholder="검색어(필수)" required id="stx" class="required" size="15" maxlength="20">
|
<input name="stx" value="<?php echo stripslashes($stx) ?>" placeholder="검색어(필수)" required id="stx" class="required frm_input" size="15" maxlength="20">
|
||||||
<input type="submit" value="검색">
|
<input type="submit" value="검색">
|
||||||
</form>
|
</form>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (implode('', $view['link'])) {
|
if ($view['link']) {
|
||||||
?>
|
?>
|
||||||
<section id="bo_v_link">
|
<section id="bo_v_link">
|
||||||
<h2>관련링크</h2>
|
<h2>관련링크</h2>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -179,7 +179,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
// 코멘트 입출력
|
// 코멘트 입출력
|
||||||
include_once('./view_comment.php');
|
include_once(G5_BBS_PATH.'/view_comment.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="bo_v_bot">
|
<div id="bo_v_bot">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
|||||||
<h1><?php echo $g5['title'] ?></h1>
|
<h1><?php echo $g5['title'] ?></h1>
|
||||||
|
|
||||||
<form name="flogin" action="<?php echo $login_action_url ?>" onsubmit="return flogin_submit(this);" method="post">
|
<form name="flogin" action="<?php echo $login_action_url ?>" onsubmit="return flogin_submit(this);" method="post">
|
||||||
<input type="hidden" name="url" value='<?php echo $login_url ?>'>
|
<input type="hidden" name="url" value="<?php echo $login_url ?>">
|
||||||
|
|
||||||
<div id="login_frm">
|
<div id="login_frm">
|
||||||
<label for="login_id" class="sound_only">아이디<strong class="sound_only"> 필수</strong></label>
|
<label for="login_id" class="sound_only">아이디<strong class="sound_only"> 필수</strong></label>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
|||||||
<ul id="memo_list_ul">
|
<ul id="memo_list_ul">
|
||||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo $list[$i]['view_href'] ?>" class="memo_link"><?php echo $list[$i]['send_datetime'] ?> 에 받은 쪽지</a>
|
<a href="<?php echo $list[$i]['view_href'] ?>" class="memo_link"><?php echo $list[$i]['send_datetime'] ?> 에 <?php echo ($kind == "recv") ? "받은" : "보낸"; ?> 쪽지</a>
|
||||||
<span class="memo_read"><?php echo $list[$i]['read_datetime'] ?></span>
|
<span class="memo_read"><?php echo $list[$i]['read_datetime'] ?></span>
|
||||||
<span class="memo_send"><?php echo $list[$i]['name'] ?></span>
|
<span class="memo_send"><?php echo $list[$i]['name'] ?></span>
|
||||||
<a href="<?php echo $list[$i]['del_href'] ?>" onclick="del(this.href); return false;" class="memo_del">삭제</a>
|
<a href="<?php echo $list[$i]['del_href'] ?>" onclick="del(this.href); return false;" class="memo_del">삭제</a>
|
||||||
|
|||||||
@@ -141,12 +141,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
|||||||
<?php if ($config['cf_req_addr']) { ?><strong class="sound_only">필수</strong><?php } ?>
|
<?php if ($config['cf_req_addr']) { ?><strong class="sound_only">필수</strong><?php } ?>
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<label for="reg_mb_zip1" class="sound_only">우편번호 앞자리<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label>
|
<label for="reg_mb_zip" class="sound_only">우편번호<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label>
|
||||||
<input type="text" name="mb_zip1" value="<?php echo $member['mb_zip1'] ?>" id="reg_mb_zip1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input <?php echo $config['cf_req_addr']?"required":""; ?>" size="3" maxlength="3">
|
<input type="text" name="mb_zip" value="<?php echo $member['mb_zip1'].$member['mb_zip2']; ?>" id="reg_mb_zip" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input <?php echo $config['cf_req_addr']?"required":""; ?>" size="5" maxlength="6">
|
||||||
-
|
<button type="button" class="btn_frmline" onclick="win_zip('fregisterform', 'mb_zip', 'mb_addr1', 'mb_addr2', 'mb_addr3', 'mb_addr_jibeon');">주소 검색</button><br>
|
||||||
<label for="reg_mb_zip2" class="sound_only">우편번호 뒷자리<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label>
|
|
||||||
<input type="text" name="mb_zip2" value="<?php echo $member['mb_zip2'] ?>" id="reg_mb_zip2" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input <?php echo $config['cf_req_addr']?"required":""; ?>" size="3" maxlength="3">
|
|
||||||
<button type="button" class="btn_frmline" onclick="win_zip('fregisterform', 'mb_zip1', 'mb_zip2', 'mb_addr1', 'mb_addr2', 'mb_addr3', 'mb_addr_jibeon');">주소 검색</button><br>
|
|
||||||
<label for="reg_mb_addr1" class="sound_only">주소<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label>
|
<label for="reg_mb_addr1" class="sound_only">주소<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label>
|
||||||
<input type="text" name="mb_addr1" value="<?php echo $member['mb_addr1'] ?>" id="reg_mb_addr1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input frm_address <?php echo $config['cf_req_addr']?"required":""; ?>" size="50"><br>
|
<input type="text" name="mb_addr1" value="<?php echo $member['mb_addr1'] ?>" id="reg_mb_addr1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input frm_address <?php echo $config['cf_req_addr']?"required":""; ?>" size="50"><br>
|
||||||
<label for="reg_mb_addr2" class="sound_only">상세주소</label>
|
<label for="reg_mb_addr2" class="sound_only">상세주소</label>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
if(defined('G5_THEME_PATH')) {
|
||||||
|
require_once(G5_THEME_PATH.'/tail.php');
|
||||||
|
return;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ function editor_html($id, $content, $is_dhtml_editor=true)
|
|||||||
$(this).text("단축키 일람 닫기");
|
$(this).text("단축키 일람 닫기");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(".btn_cke_sc_close").live("click",function(){
|
$(document).on("click", ".btn_cke_sc_close", function(){
|
||||||
$(this).parent("div.cke_sc_def").remove();
|
$(this).parent("div.cke_sc_def").remove();
|
||||||
});
|
});
|
||||||
});';
|
});';
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
Title: MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2009-2013 Chris Leonello
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
File diff suppressed because it is too large.
Load diff
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
/* jqPlot @VERSION | (c) 2009-2013 Chris Leonello | jplot.com
|
||||||
|
jsDate | (c) 2010-2013 Chris Leonello
|
||||||
|
*/if(!document.createElement("canvas").getContext){(function(){var ab=Math;var n=ab.round;var l=ab.sin;var A=ab.cos;var H=ab.abs;var N=ab.sqrt;var d=10;var f=d/2;var z=+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];function y(){return this.context_||(this.context_=new D(this))}var t=Array.prototype.slice;function g(j,m,p){var i=t.call(arguments,2);return function(){return j.apply(m,i.concat(t.call(arguments)))}}function af(i){return String(i).replace(/&/g,"&").replace(/"/g,""")}function Y(m,j,i){if(!m.namespaces[j]){m.namespaces.add(j,i,"#default#VML")}}function R(j){Y(j,"g_vml_","urn:schemas-microsoft-com:vml");Y(j,"g_o_","urn:schemas-microsoft-com:office:office");if(!j.styleSheets.ex_canvas_){var i=j.createStyleSheet();i.owningElement.id="ex_canvas_";i.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}R(document);var e={init:function(i){var j=i||document;j.createElement("canvas");j.attachEvent("onreadystatechange",g(this.init_,this,j))},init_:function(p){var m=p.getElementsByTagName("canvas");for(var j=0;j<m.length;j++){this.initElement(m[j])}},initElement:function(j){if(!j.getContext){j.getContext=y;R(j.ownerDocument);j.innerHTML="";j.attachEvent("onpropertychange",x);j.attachEvent("onresize",W);var i=j.attributes;if(i.width&&i.width.specified){j.style.width=i.width.nodeValue+"px"}else{j.width=j.clientWidth}if(i.height&&i.height.specified){j.style.height=i.height.nodeValue+"px"}else{j.height=j.clientHeight}}return j},uninitElement:function(j){if(j.getContext){var i=j.getContext();delete i.element_;delete i.canvas;j.innerHTML="";j.context_=null;j.getContext=null;j.detachEvent("onpropertychange",x);j.detachEvent("onresize",W)}}};function x(j){var i=j.srcElement;switch(j.propertyName){case"width":i.getContext().clearRect();i.style.width=i.attributes.width.nodeValue+"px";i.firstChild.style.width=i.clientWidth+"px";break;case"height":i.getContext().clearRect();i.style.height=i.attributes.height.nodeValue+"px";i.firstChild.style.height=i.clientHeight+"px";break}}function W(j){var i=j.srcElement;if(i.firstChild){i.firstChild.style.width=i.clientWidth+"px";i.firstChild.style.height=i.clientHeight+"px"}}e.init();var k=[];for(var ae=0;ae<16;ae++){for(var ad=0;ad<16;ad++){k[ae*16+ad]=ae.toString(16)+ad.toString(16)}}function B(){return[[1,0,0],[0,1,0],[0,0,1]]}function J(p,m){var j=B();for(var i=0;i<3;i++){for(var ah=0;ah<3;ah++){var Z=0;for(var ag=0;ag<3;ag++){Z+=p[i][ag]*m[ag][ah]}j[i][ah]=Z}}return j}function v(j,i){i.fillStyle=j.fillStyle;i.lineCap=j.lineCap;i.lineJoin=j.lineJoin;i.lineWidth=j.lineWidth;i.miterLimit=j.miterLimit;i.shadowBlur=j.shadowBlur;i.shadowColor=j.shadowColor;i.shadowOffsetX=j.shadowOffsetX;i.shadowOffsetY=j.shadowOffsetY;i.strokeStyle=j.strokeStyle;i.globalAlpha=j.globalAlpha;i.font=j.font;i.textAlign=j.textAlign;i.textBaseline=j.textBaseline;i.arcScaleX_=j.arcScaleX_;i.arcScaleY_=j.arcScaleY_;i.lineScale_=j.lineScale_}var b={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldeLine truncated
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||||
|
jsDate | (c) 2010-2013 Chris Leonello
|
||||||
|
*/(function(d){d.jqplot.BarRenderer=function(){d.jqplot.LineRenderer.call(this)};d.jqplot.BarRenderer.prototype=new d.jqplot.LineRenderer();d.jqplot.BarRenderer.prototype.constructor=d.jqplot.BarRenderer;d.jqplot.BarRenderer.prototype.init=function(o,q){this.barPadding=8;this.barMargin=10;this.barDirection="vertical";this.barWidth=null;this.shadowOffset=2;this.shadowDepth=5;this.shadowAlpha=0.08;this.waterfall=false;this.groups=1;this.varyBarColor=false;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.transposedData=true;this.renderer.animation={show:false,direction:"down",speed:3000,_supported:true};this._type="bar";if(o.highlightMouseDown&&o.highlightMouseOver==null){o.highlightMouseOver=false}d.extend(true,this,o);d.extend(true,this.renderer,o);this.fill=true;if(this.barDirection==="horizontal"&&this.rendererOptions.animation&&this.rendererOptions.animation.direction==null){this.renderer.animation.direction="left"}if(this.waterfall){this.fillToZero=false;this.disableStack=true}if(this.barDirection=="vertical"){this._primaryAxis="_xaxis";this._stackAxis="y";this.fillAxis="y"}else{this._primaryAxis="_yaxis";this._stackAxis="x";this.fillAxis="x"}this._highlightedPoint=null;this._plotSeriesInfo=null;this._dataColors=[];this._barPoints=[];var p={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,strokeStyle:this.color,fillStyle:this.color,closePath:this.fill};this.renderer.shapeRenderer.init(p);var n={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,closePath:this.fill};this.renderer.shadowRenderer.init(n);q.postInitHooks.addOnce(h);q.postDrawHooks.addOnce(j);q.eventListenerHooks.addOnce("jqplotMouseMove",b);q.eventListenerHooks.addOnce("jqplotMouseDown",a);q.eventListenerHooks.addOnce("jqplotMouseUp",l);q.eventListenerHooks.addOnce("jqplotClick",e);q.eventListenerHooks.addOnce("jqplotRightClick",m)};function g(t,p,o,w){if(this.rendererOptions.barDirection=="horizontal"){this._stackAxis="x";this._primaryAxis="_yaxis"}if(this.rendererOptions.waterfall==true){this._data=d.extend(true,[],this.data);var s=0;var u=(!this.rendererOptions.barDirection||this.rendererOptions.barDirection==="vertical"||this.transposedData===false)?1:0;for(var q=0;q<this.data.length;q++){s+=this.data[q][u];if(q>0){this.data[q][u]+=this.data[q-1][u]}}this.data[this.data.length]=(u==1)?[this.data.length+1,s]:[s,this.data.length+1];this._data[this._data.length]=(u==1)?[this._data.length+1,s]:[s,this._data.length+1]}if(this.rendererOptions.groups>1){this.breakOnNull=true;var n=this.data.length;var v=parseInt(n/this.rendererOptions.groups,10);var r=0;for(var q=v;q<n;q+=v){this.data.splice(q+r,0,[null,null]);this._plotData.splice(q+r,0,[null,null]);this._stackData.splice(q+r,0,[null,null]);r++}for(q=0;q<this.data.length;q++){if(this._primaryAxis=="_xaxis"){this.data[q][0]=q+1;this._plotData[q][0]=q+1;this._stackData[q][0]=q+1}else{this.data[q][1]=q+1;this._plotData[q][1]=q+1;this._stackData[q][1]=q+1}}}}d.jqplot.preSeriesInitHooks.push(g);d.jqplot.BarRenderer.prototype.calcSeriesNumbers=function(){var r=0;var t=0;var q=this[this._primaryAxis];var p,o,u;for(var n=0;n<q._series.length;n++){o=q._series[n];if(o===this){u=n}if(o.renderer.constructor==d.jqplot.BarRenderer){r+=o.data.length;t+=1}}return[r,t,u]};d.jqplot.BarRenderer.prototype.setBarWidth=function(){var q;var n=0;var o=0;var t=this[this._primaryAxis];var x,r,v;var w=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this);n=w[0];o=w[1];var u=t.numberTicks;var p=(u-1)/2;if(t.name=="xaxis"||t.name=="x2axis"){if(this._stack){this.barWidth=(t._offsets.max-t._offsets.min)/n*o-this.barMargin}else{this.barWidth=((t._offsets.max-t._offsets.min)/p-this.barPadding*(o-1)-this.barMargin*2)/o}}else{if(this._stack){this.barWidth=(t._offsets.min-t._offsets.max)/n*o-this.barMargin}else{this.barWidth=((t._offsets.min-t._offsets.max)/p-this.barPadding*(o-1)-this.barMargin*2)/o}}return[n,o]};function f(o){var q=[];for(var s=0;s<o.length;s++){var r=d.jqplot.getColorComponents(o[s]);var n=[r[0],r[1],r[2]];var t=n[0]+n[1]+n[2];for(var p=0;p<3;p++){n[p]=(t>570)?n[p]*0.8:n[p]+0.3*(255-n[p]);n[p]=parseInt(n[p],10)}q.push("rgb("+n[0]+","+n[1]+","+n[2]+")")}return q}function i(v,u,s,t,o){var q=v,w=v-1,n,p,r=(o==="x")?0:1;if(q>0){p=t.series[w]._plotData[u][r];if((s*p)<0){n=i(w,u,s,t,o)}else{n=t.series[w].gridData[u][r]}}else{n=(r===0)?t.series[q]._xaxis.series_u2p(0):t.series[q]._yaxis.series_u2p(0)}return n}d.jqplot.BarRenderer.prototype.draw=function(E,L,q,G){var I;var A=d.extend({},q);var w=(A.shadow!=undefined)?A.shadow:this.shadow;var O=(A.showLine!=undefined)?A.showLine:this.showLine;var F=(A.fill!=undefined)?A.fill:this.fill;var p=this.xaxis;var J=this.yaxis;var y=this._xaxis.series_u2p;var K=this._yaxis.series_u2p;var D,C;this._dataColors=[];this._barPoints=[];if(this.barWidth==null){this.renderer.setBarWidth.call(this)}var N=this._plotSeriesInfo=this.renLine truncated
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||||
|
jsDate | (c) 2010-2013 Chris Leonello
|
||||||
|
*/(function(a){a.jqplot.CategoryAxisRenderer=function(b){a.jqplot.LinearAxisRenderer.call(this);this.sortMergedLabels=false};a.jqplot.CategoryAxisRenderer.prototype=new a.jqplot.LinearAxisRenderer();a.jqplot.CategoryAxisRenderer.prototype.constructor=a.jqplot.CategoryAxisRenderer;a.jqplot.CategoryAxisRenderer.prototype.init=function(e){this.groups=1;this.groupLabels=[];this._groupLabels=[];this._grouped=false;this._barsPerGroup=null;this.reverse=false;a.extend(true,this,{tickOptions:{formatString:"%d"}},e);var b=this._dataBounds;for(var f=0;f<this._series.length;f++){var g=this._series[f];if(g.groups){this.groups=g.groups}var h=g.data;for(var c=0;c<h.length;c++){if(this.name=="xaxis"||this.name=="x2axis"){if(h[c][0]<b.min||b.min==null){b.min=h[c][0]}if(h[c][0]>b.max||b.max==null){b.max=h[c][0]}}else{if(h[c][1]<b.min||b.min==null){b.min=h[c][1]}if(h[c][1]>b.max||b.max==null){b.max=h[c][1]}}}}if(this.groupLabels.length){this.groups=this.groupLabels.length}};a.jqplot.CategoryAxisRenderer.prototype.createTicks=function(){var D=this._ticks;var z=this.ticks;var F=this.name;var C=this._dataBounds;var v,A;var q,w;var d,c;var b,x;if(z.length){if(this.groups>1&&!this._grouped){var r=z.length;var p=parseInt(r/this.groups,10);var e=0;for(var x=p;x<r;x+=p){z.splice(x+e,0," ");e++}this._grouped=true}this.min=0.5;this.max=z.length+0.5;var m=this.max-this.min;this.numberTicks=2*z.length+1;for(x=0;x<z.length;x++){b=this.min+2*x*m/(this.numberTicks-1);var h=new this.tickRenderer(this.tickOptions);h.showLabel=false;h.setTick(b,this.name);this._ticks.push(h);var h=new this.tickRenderer(this.tickOptions);h.label=z[x];h.showMark=false;h.showGridline=false;h.setTick(b+0.5,this.name);this._ticks.push(h)}var h=new this.tickRenderer(this.tickOptions);h.showLabel=false;h.setTick(b+1,this.name);this._ticks.push(h)}else{if(F=="xaxis"||F=="x2axis"){v=this._plotDimensions.width}else{v=this._plotDimensions.height}if(this.min!=null&&this.max!=null&&this.numberTicks!=null){this.tickInterval=null}if(this.min!=null&&this.max!=null&&this.tickInterval!=null){if(parseInt((this.max-this.min)/this.tickInterval,10)!=(this.max-this.min)/this.tickInterval){this.tickInterval=null}}var y=[];var B=0;var q=0.5;var w,E;var f=false;for(var x=0;x<this._series.length;x++){var k=this._series[x];for(var u=0;u<k.data.length;u++){if(this.name=="xaxis"||this.name=="x2axis"){E=k.data[u][0]}else{E=k.data[u][1]}if(a.inArray(E,y)==-1){f=true;B+=1;y.push(E)}}}if(f&&this.sortMergedLabels){if(typeof y[0]=="string"){y.sort()}else{y.sort(function(j,i){return j-i})}}this.ticks=y;for(var x=0;x<this._series.length;x++){var k=this._series[x];for(var u=0;u<k.data.length;u++){if(this.name=="xaxis"||this.name=="x2axis"){E=k.data[u][0]}else{E=k.data[u][1]}var n=a.inArray(E,y)+1;if(this.name=="xaxis"||this.name=="x2axis"){k.data[u][0]=n}else{k.data[u][1]=n}}}if(this.groups>1&&!this._grouped){var r=y.length;var p=parseInt(r/this.groups,10);var e=0;for(var x=p;x<r;x+=p+1){y[x]=" "}this._grouped=true}w=B+0.5;if(this.numberTicks==null){this.numberTicks=2*B+1}var m=w-q;this.min=q;this.max=w;var o=0;var g=parseInt(3+v/10,10);var p=parseInt(B/g,10);if(this.tickInterval==null){this.tickInterval=m/(this.numberTicks-1)}for(var x=0;x<this.numberTicks;x++){b=this.min+x*this.tickInterval;var h=new this.tickRenderer(this.tickOptions);if(x/2==parseInt(x/2,10)){h.showLabel=false;h.showMark=true}else{if(p>0&&o<p){h.showLabel=false;o+=1}else{h.showLabel=true;o=0}h.label=h.formatter(h.formatString,y[(x-1)/2]);h.showMark=false;h.showGridline=false}h.setTick(b,this.name);this._ticks.push(h)}}};a.jqplot.CategoryAxisRenderer.prototype.draw=function(b,j){if(this.show){this.renderer.createTicks.call(this);var h=0;var c;if(this._elem){this._elem.emptyForce()}this._elem=this._elem||a('<div class="jqplot-axis jqplot-'+this.name+'" style="position:absolute;"></div>');if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var g=this._label.draw(b,j);g.appendTo(this._elem)}var f=this._ticks;for(var e=0;e<f.length;e++){var d=f[e];if(d.showLabel&&(!d.isMinorTick||this.showMinorTicks)){var g=d.draw(b,j);g.appendTo(this._elem)}}this._groupLabels=[];for(var e=0;e<this.groupLabels.length;e++){var g=a('<div style="position:absolute;" class="jqplot-'+this.name+'-groupLabel"></div>');g.html(this.groupLabels[e]);this._groupLabels.push(g);g.appendTo(this._elem)}}return this._elem};a.jqplot.CategoryAxisRenderer.prototype.set=function(){var e=0;var m;var k=0;var f=0;var d=(this._label==null)?false:this._label.show;if(this.show){var n=this._ticks;for(var c=0;c<n.length;c++){var g=n[c];if(g.showLabel&&(!g.isMinorTick||this.showMinorTicks)){if(this.name=="xaxis"||this.name=="x2axis"){m=g._elem.outerHeight(true)}else{m=g._elem.outerWidth(true)}if(m>e){e=m}}}var j=0;for(var c=0;c<this._groupLabels.length;c++){var b=this._groupLabels[c];Line truncated
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||||
|
jsDate | (c) 2010-2013 Chris Leonello
|
||||||
|
*/(function(c){c.jqplot.PointLabels=function(e){this.show=c.jqplot.config.enablePlugins;this.location="n";this.labelsFromSeries=false;this.seriesLabelIndex=null;this.labels=[];this._labels=[];this.stackedValue=false;this.ypadding=6;this.xpadding=6;this.escapeHTML=true;this.edgeTolerance=-5;this.formatter=c.jqplot.DefaultTickFormatter;this.formatString="";this.hideZeros=false;this._elems=[];c.extend(true,this,e)};var a=["nw","n","ne","e","se","s","sw","w"];var d={nw:0,n:1,ne:2,e:3,se:4,s:5,sw:6,w:7};var b=["se","s","sw","w","nw","n","ne","e"];c.jqplot.PointLabels.init=function(j,h,f,g,i){var e=c.extend(true,{},f,g);e.pointLabels=e.pointLabels||{};if(this.renderer.constructor===c.jqplot.BarRenderer&&this.barDirection==="horizontal"&&!e.pointLabels.location){e.pointLabels.location="e"}this.plugins.pointLabels=new c.jqplot.PointLabels(e.pointLabels);this.plugins.pointLabels.setLabels.call(this)};c.jqplot.PointLabels.prototype.setLabels=function(){var f=this.plugins.pointLabels;var h;if(f.seriesLabelIndex!=null){h=f.seriesLabelIndex}else{if(this.renderer.constructor===c.jqplot.BarRenderer&&this.barDirection==="horizontal"){h=(this._plotData[0].length<3)?0:this._plotData[0].length-1}else{h=(this._plotData.length===0)?0:this._plotData[0].length-1}}f._labels=[];if(f.labels.length===0||f.labelsFromSeries){if(f.stackedValue){if(this._plotData.length&&this._plotData[0].length){for(var e=0;e<this._plotData.length;e++){f._labels.push(this._plotData[e][h])}}}else{var g=this.data;if(this.renderer.constructor===c.jqplot.BarRenderer&&this.waterfall){g=this._data}if(g.length&&g[0].length){for(var e=0;e<g.length;e++){f._labels.push(g[e][h])}}g=null}}else{if(f.labels.length){f._labels=f.labels}}};c.jqplot.PointLabels.prototype.xOffset=function(f,e,g){e=e||this.location;g=g||this.xpadding;var h;switch(e){case"nw":h=-f.outerWidth(true)-this.xpadding;break;case"n":h=-f.outerWidth(true)/2;break;case"ne":h=this.xpadding;break;case"e":h=this.xpadding;break;case"se":h=this.xpadding;break;case"s":h=-f.outerWidth(true)/2;break;case"sw":h=-f.outerWidth(true)-this.xpadding;break;case"w":h=-f.outerWidth(true)-this.xpadding;break;default:h=-f.outerWidth(true)-this.xpadding;break}return h};c.jqplot.PointLabels.prototype.yOffset=function(f,e,g){e=e||this.location;g=g||this.xpadding;var h;switch(e){case"nw":h=-f.outerHeight(true)-this.ypadding;break;case"n":h=-f.outerHeight(true)-this.ypadding;break;case"ne":h=-f.outerHeight(true)-this.ypadding;break;case"e":h=-f.outerHeight(true)/2;break;case"se":h=this.ypadding;break;case"s":h=this.ypadding;break;case"sw":h=this.ypadding;break;case"w":h=-f.outerHeight(true)/2;break;default:h=-f.outerHeight(true)-this.ypadding;break}return h};c.jqplot.PointLabels.draw=function(x,j,v){var t=this.plugins.pointLabels;t.setLabels.call(this);for(var w=0;w<t._elems.length;w++){t._elems[w].emptyForce()}t._elems.splice(0,t._elems.length);if(t.show){var r="_"+this._stackAxis+"axis";if(!t.formatString){t.formatString=this[r]._ticks[0].formatString;t.formatter=this[r]._ticks[0].formatter}var E=this._plotData;var D=this._prevPlotData;var A=this._xaxis;var q=this._yaxis;var z,f;for(var w=0,u=t._labels.length;w<u;w++){var o=t._labels[w];if(o==null||(t.hideZeros&&parseInt(o,10)==0)){continue}o=t.formatter(t.formatString,o);f=document.createElement("div");t._elems[w]=c(f);z=t._elems[w];z.addClass("jqplot-point-label jqplot-series-"+this.index+" jqplot-point-"+w);z.css("position","absolute");z.insertAfter(x.canvas);if(t.escapeHTML){z.text(o)}else{z.html(o)}var g=t.location;if((this.fillToZero&&E[w][1]<0)||(this.fillToZero&&this._type==="bar"&&this.barDirection==="horizontal"&&E[w][0]<0)||(this.waterfall&&parseInt(o,10))<0){g=b[d[g]]}var n=A.u2p(E[w][0])+t.xOffset(z,g);var h=q.u2p(E[w][1])+t.yOffset(z,g);if(this._stack&&!t.stackedValue){if(this.barDirection==="vertical"){h=(this._barPoints[w][0][1]+this._barPoints[w][1][1])/2+v._gridPadding.top-0.5*z.outerHeight(true)}else{n=(this._barPoints[w][2][0]+this._barPoints[w][0][0])/2+v._gridPadding.left-0.5*z.outerWidth(true)}}if(this.renderer.constructor==c.jqplot.BarRenderer){if(this.barDirection=="vertical"){n+=this._barNudge}else{h-=this._barNudge}}z.css("left",n);z.css("top",h);var k=n+z.width();var s=h+z.height();var C=t.edgeTolerance;var e=c(x.canvas).position().left;var y=c(x.canvas).position().top;var B=x.canvas.width+e;var m=x.canvas.height+y;if(n-C<e||h-C<y||k+C>B||s+C>m){z.remove()}z=null;f=null}}};c.jqplot.postSeriesInitHooks.push(c.jqplot.PointLabels.init);c.jqplot.postDrawSeriesHooks.push(c.jqplot.PointLabels.draw)})(jQuery);
|
||||||
@@ -0,0 +1,261 @@
|
|||||||
|
/*rules for the plot target div. These will be cascaded down to all plot elements according to css rules*/
|
||||||
|
.jqplot-target {
|
||||||
|
position: relative;
|
||||||
|
color: #666666;
|
||||||
|
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||||
|
font-size: 1em;
|
||||||
|
/* height: 300px;
|
||||||
|
width: 400px;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/*rules applied to all axes*/
|
||||||
|
.jqplot-axis {
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-xaxis {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-x2axis {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-yaxis {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-y2axis, .jqplot-y3axis, .jqplot-y4axis, .jqplot-y5axis, .jqplot-y6axis, .jqplot-y7axis, .jqplot-y8axis, .jqplot-y9axis, .jqplot-yMidAxis {
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*rules applied to all axis tick divs*/
|
||||||
|
.jqplot-axis-tick, .jqplot-xaxis-tick, .jqplot-yaxis-tick, .jqplot-x2axis-tick, .jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick, .jqplot-yMidAxis-tick {
|
||||||
|
position: absolute;
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.jqplot-xaxis-tick {
|
||||||
|
top: 0px;
|
||||||
|
/* initial position untill tick is drawn in proper place */
|
||||||
|
left: 15px;
|
||||||
|
/* padding-top: 10px;*/
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-x2axis-tick {
|
||||||
|
bottom: 0px;
|
||||||
|
/* initial position untill tick is drawn in proper place */
|
||||||
|
left: 15px;
|
||||||
|
/* padding-bottom: 10px;*/
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-yaxis-tick {
|
||||||
|
right: 0px;
|
||||||
|
/* initial position untill tick is drawn in proper place */
|
||||||
|
top: 15px;
|
||||||
|
/* padding-right: 10px;*/
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-yaxis-tick.jqplot-breakTick {
|
||||||
|
right: -20px;
|
||||||
|
margin-right: 0px;
|
||||||
|
padding:1px 5px 1px 5px;
|
||||||
|
/*background-color: white;*/
|
||||||
|
z-index: 2;
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
|
||||||
|
left: 0px;
|
||||||
|
/* initial position untill tick is drawn in proper place */
|
||||||
|
top: 15px;
|
||||||
|
/* padding-left: 10px;*/
|
||||||
|
/* padding-right: 15px;*/
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-yMidAxis-tick {
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-xaxis-label {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 11pt;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-x2axis-label {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 11pt;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-yaxis-label {
|
||||||
|
margin-right: 10px;
|
||||||
|
/* text-align: center;*/
|
||||||
|
font-size: 11pt;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-yMidAxis-label {
|
||||||
|
font-size: 11pt;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-y2axis-label, .jqplot-y3axis-label, .jqplot-y4axis-label, .jqplot-y5axis-label, .jqplot-y6axis-label, .jqplot-y7axis-label, .jqplot-y8axis-label, .jqplot-y9axis-label {
|
||||||
|
/* text-align: center;*/
|
||||||
|
font-size: 11pt;
|
||||||
|
margin-left: 10px;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-meterGauge-tick {
|
||||||
|
font-size: 0.75em;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-meterGauge-label {
|
||||||
|
font-size: 1em;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.jqplot-table-legend {
|
||||||
|
margin-top: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
margin-left: 12px;
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.jqplot-table-legend, table.jqplot-cursor-legend {
|
||||||
|
background-color: rgba(255,255,255,0.6);
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
position: absolute;
|
||||||
|
font-size: 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.jqplot-table-legend {
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
These rules could be used instead of assigning
|
||||||
|
element styles and relying on js object properties.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
td.jqplot-table-legend-swatch {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.jqplot-table-legend:first td.jqplot-table-legend-swatch {
|
||||||
|
padding-top: 0px;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
td.jqplot-seriesToggle:hover, td.jqplot-seriesToggle:active {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-table-legend .jqplot-series-hidden {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.jqplot-table-legend-swatch-outline {
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
padding:1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.jqplot-table-legend-swatch {
|
||||||
|
width:0px;
|
||||||
|
height:0px;
|
||||||
|
border-top-width: 5px;
|
||||||
|
border-bottom-width: 5px;
|
||||||
|
border-left-width: 6px;
|
||||||
|
border-right-width: 6px;
|
||||||
|
border-top-style: solid;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
border-left-style: solid;
|
||||||
|
border-right-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-title {
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
padding-bottom: 0.5em;
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.jqplot-cursor-tooltip {
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
font-size: 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.jqplot-cursor-tooltip {
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
font-size: 0.75em;
|
||||||
|
white-space: nowrap;
|
||||||
|
background: rgba(208,208,208,0.5);
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-highlighter-tooltip, .jqplot-canvasOverlay-tooltip {
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
font-size: 0.75em;
|
||||||
|
white-space: nowrap;
|
||||||
|
background: rgba(208,208,208,0.5);
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-point-label {
|
||||||
|
font-size: 1em;
|
||||||
|
z-index: 2;
|
||||||
|
font-weight:bold;
|
||||||
|
color:#ff670f;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.jqplot-cursor-legend-swatch {
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.jqplot-cursor-legend-swatch {
|
||||||
|
width: 1.2em;
|
||||||
|
height: 0.7em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-error {
|
||||||
|
/* Styles added to the plot target container when there is an error go here.*/
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jqplot-error-message {
|
||||||
|
/* Styling of the custom error message div goes here.*/
|
||||||
|
position: relative;
|
||||||
|
top: 46%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.jqplot-bubble-label {
|
||||||
|
font-size: 0.8em;
|
||||||
|
/* background: rgba(90%, 90%, 90%, 0.15);*/
|
||||||
|
padding-left: 2px;
|
||||||
|
padding-right: 2px;
|
||||||
|
color: rgb(20%, 20%, 20%);
|
||||||
|
}
|
||||||
|
|
||||||
|
div.jqplot-bubble-label.jqplot-bubble-label-highlight {
|
||||||
|
background: rgba(90%, 90%, 90%, 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
div.jqplot-noData-container {
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgba(96%, 96%, 96%, 0.3);
|
||||||
|
}
|
||||||
File diff suppressed because it is too large.
Load diff
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
.jqplot-target{position:relative;color:#666;font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;font-size:1em}.jqplot-axis{font-size:.75em}.jqplot-xaxis{margin-top:10px}.jqplot-x2axis{margin-bottom:10px}.jqplot-yaxis{margin-right:10px}.jqplot-y2axis,.jqplot-y3axis,.jqplot-y4axis,.jqplot-y5axis,.jqplot-y6axis,.jqplot-y7axis,.jqplot-y8axis,.jqplot-y9axis,.jqplot-yMidAxis{margin-left:10px;margin-right:10px}.jqplot-axis-tick,.jqplot-xaxis-tick,.jqplot-yaxis-tick,.jqplot-x2axis-tick,.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick,.jqplot-yMidAxis-tick{position:absolute;white-space:pre}.jqplot-xaxis-tick{top:0;left:15px;vertical-align:top}.jqplot-x2axis-tick{bottom:0;left:15px;vertical-align:bottom}.jqplot-yaxis-tick{right:0;top:15px;text-align:right}.jqplot-yaxis-tick.jqplot-breakTick{right:-20px;margin-right:0;padding:1px 5px 1px 5px;z-index:2;font-size:1.5em}.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{left:0;top:15px;text-align:left}.jqplot-yMidAxis-tick{text-align:center;white-space:nowrap}.jqplot-xaxis-label{margin-top:10px;font-size:11pt;position:absolute}.jqplot-x2axis-label{margin-bottom:10px;font-size:11pt;position:absolute}.jqplot-yaxis-label{margin-right:10px;font-size:11pt;position:absolute}.jqplot-yMidAxis-label{font-size:11pt;position:absolute}.jqplot-y2axis-label,.jqplot-y3axis-label,.jqplot-y4axis-label,.jqplot-y5axis-label,.jqplot-y6axis-label,.jqplot-y7axis-label,.jqplot-y8axis-label,.jqplot-y9axis-label{font-size:11pt;margin-left:10px;position:absolute}.jqplot-meterGauge-tick{font-size:.75em;color:#999}.jqplot-meterGauge-label{font-size:1em;color:#999}table.jqplot-table-legend{margin-top:12px;margin-bottom:12px;margin-left:12px;margin-right:12px}table.jqplot-table-legend,table.jqplot-cursor-legend{background-color:rgba(255,255,255,0.6);border:1px solid #ccc;position:absolute;font-size:.75em}td.jqplot-table-legend{vertical-align:middle}td.jqplot-seriesToggle:hover,td.jqplot-seriesToggle:active{cursor:pointer}.jqplot-table-legend .jqplot-series-hidden{text-decoration:line-through}div.jqplot-table-legend-swatch-outline{border:1px solid #ccc;padding:1px}div.jqplot-table-legend-swatch{width:0;height:0;border-top-width:5px;border-bottom-width:5px;border-left-width:6px;border-right-width:6px;border-top-style:solid;border-bottom-style:solid;border-left-style:solid;border-right-style:solid}.jqplot-title{top:0;left:0;padding-bottom:.5em;font-size:1.2em}table.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em}.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px}.jqplot-highlighter-tooltip,.jqplot-canvasOverlay-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px}.jqplot-point-label{font-size:.75em;z-index:2}td.jqplot-cursor-legend-swatch{vertical-align:middle;text-align:center}div.jqplot-cursor-legend-swatch{width:1.2em;height:.7em}.jqplot-error{text-align:center}.jqplot-error-message{position:relative;top:46%;display:inline-block}div.jqplot-bubble-label{font-size:.8em;padding-left:2px;padding-right:2px;color:rgb(20%,20%,20%)}div.jqplot-bubble-label.jqplot-bubble-label-highlight{background:rgba(90%,90%,90%,0.7)}div.jqplot-noData-container{text-align:center;background-color:rgba(96%,96%,96%,0.3)}
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||||
|
jsDate | (c) 2010-2013 Chris Leonello
|
||||||
|
*/(function(L){var u;L.fn.emptyForce=function(){for(var ah=0,ai;(ai=L(this)[ah])!=null;ah++){if(ai.nodeType===1){L.cleanData(ai.getElementsByTagName("*"))}if(L.jqplot.use_excanvas){ai.outerHTML=""}else{while(ai.firstChild){ai.removeChild(ai.firstChild)}}ai=null}return L(this)};L.fn.removeChildForce=function(ah){while(ah.firstChild){this.removeChildForce(ah.firstChild);ah.removeChild(ah.firstChild)}};L.fn.jqplot=function(){var ah=[];var aj=[];for(var ak=0,ai=arguments.length;ak<ai;ak++){if(L.isArray(arguments[ak])){ah.push(arguments[ak])}else{if(L.isPlainObject(arguments[ak])){aj.push(arguments[ak])}}}return this.each(function(an){var at,ar,aq=L(this),am=ah.length,al=aj.length,ap,ao;if(an<am){ap=ah[an]}else{ap=am?ah[am-1]:null}if(an<al){ao=aj[an]}else{ao=al?aj[al-1]:null}at=aq.attr("id");if(at===u){at="jqplot_target_"+L.jqplot.targetCounter++;aq.attr("id",at)}ar=L.jqplot(at,ap,ao);aq.data("jqplot",ar)})};L.jqplot=function(an,ak,ai){var aj=null,ah=null;if(arguments.length===3){aj=ak;ah=ai}else{if(arguments.length===2){if(L.isArray(ak)){aj=ak}else{if(L.isPlainObject(ak)){ah=ak}}}}if(aj===null&&ah!==null&&ah.data){aj=ah.data}var am=new R();L("#"+an).removeClass("jqplot-error");if(L.jqplot.config.catchErrors){try{am.init(an,aj,ah);am.draw();am.themeEngine.init.call(am);return am}catch(al){var ao=L.jqplot.config.errorMessage||al.message;L("#"+an).append('<div class="jqplot-error-message">'+ao+"</div>");L("#"+an).addClass("jqplot-error");document.getElementById(an).style.background=L.jqplot.config.errorBackground;document.getElementById(an).style.border=L.jqplot.config.errorBorder;document.getElementById(an).style.fontFamily=L.jqplot.config.errorFontFamily;document.getElementById(an).style.fontSize=L.jqplot.config.errorFontSize;document.getElementById(an).style.fontStyle=L.jqplot.config.errorFontStyle;document.getElementById(an).style.fontWeight=L.jqplot.config.errorFontWeight}}else{am.init(an,aj,ah);am.draw();am.themeEngine.init.call(am);return am}};L.jqplot.version="1.0.8";L.jqplot.revision="1250";L.jqplot.targetCounter=1;L.jqplot.CanvasManager=function(){if(typeof L.jqplot.CanvasManager.canvases=="undefined"){L.jqplot.CanvasManager.canvases=[];L.jqplot.CanvasManager.free=[]}var ah=[];this.getCanvas=function(){var ak;var aj=true;if(!L.jqplot.use_excanvas){for(var al=0,ai=L.jqplot.CanvasManager.canvases.length;al<ai;al++){if(L.jqplot.CanvasManager.free[al]===true){aj=false;ak=L.jqplot.CanvasManager.canvases[al];L.jqplot.CanvasManager.free[al]=false;ah.push(al);break}}}if(aj){ak=document.createElement("canvas");ah.push(L.jqplot.CanvasManager.canvases.length);L.jqplot.CanvasManager.canvases.push(ak);L.jqplot.CanvasManager.free.push(false)}return ak};this.initCanvas=function(ai){if(L.jqplot.use_excanvas){return window.G_vmlCanvasManager.initElement(ai)}return ai};this.freeAllCanvases=function(){for(var aj=0,ai=ah.length;aj<ai;aj++){this.freeCanvas(ah[aj])}ah=[]};this.freeCanvas=function(ai){if(L.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==u){window.G_vmlCanvasManager.uninitElement(L.jqplot.CanvasManager.canvases[ai]);L.jqplot.CanvasManager.canvases[ai]=null}else{var aj=L.jqplot.CanvasManager.canvases[ai];aj.getContext("2d").clearRect(0,0,aj.width,aj.height);L(aj).unbind().removeAttr("class").removeAttr("style");L(aj).css({left:"",top:"",position:""});aj.width=0;aj.height=0;L.jqplot.CanvasManager.free[ai]=true}}};L.jqplot.log=function(){if(window.console){window.console.log.apply(window.console,arguments)}};L.jqplot.config={addDomReference:false,enablePlugins:false,defaultHeight:300,defaultWidth:400,UTCAdjust:false,timezoneOffset:new Date(new Date().getTimezoneOffset()*60000),errorMessage:"",errorBackground:"",errorBorder:"",errorFontFamily:"",errorFontSize:"",errorFontStyle:"",errorFontWeight:"",catchErrors:false,defaultTickFormatString:"%.1f",defaultColors:["#4bb2c5","#EAA228","#c5b47f","#579575","#839557","#958c12","#953579","#4b5de4","#d8b83f","#ff5800","#0085cc","#c747a3","#cddf54","#FBD178","#26B4E3","#bd70c7"],defaultNegativeColors:["#498991","#C08840","#9F9274","#546D61","#646C4A","#6F6621","#6E3F5F","#4F64B0","#A89050","#C45923","#187399","#945381","#959E5C","#C7AF7B","#478396","#907294"],dashLength:4,gapLength:4,dotGapLength:2.5,srcLocation:"jqplot/src/",pluginLocation:"jqplot/src/plugins/"};L.jqplot.arrayMax=function(ah){return Math.max.apply(Math,ah)};L.jqplot.arrayMin=function(ah){return Math.min.apply(Math,ah)};L.jqplot.enablePlugins=L.jqplot.config.enablePlugins;L.jqplot.support_canvas=function(){if(typeof L.jqplot.support_canvas.result=="undefined"){L.jqplot.support_canvas.result=!!document.createElement("canvas").getContext}return L.jqplot.support_canvas.result};L.jqplot.support_canvas_text=function(){if(typeof L.jqplot.support_canvas_text.result=="undefined"){if(window.G_vmlCanvasManager!==u&&window.G_vmlCanvasManager._version>887){L.jqplot.support_canvas_text.result=true}else{L.jqplot.support_canvas_text.result=!!(document.createElement("canvas").getContext&&typeof document.creLine truncated
|
||||||
@@ -0,0 +1,314 @@
|
|||||||
|
/**
|
||||||
|
* jqPlot
|
||||||
|
* Pure JavaScript plotting plugin using jQuery
|
||||||
|
*
|
||||||
|
* Version: 1.0.8
|
||||||
|
* Revision: 1250
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009-2013 Chris Leonello
|
||||||
|
* jqPlot is currently available for use in all personal or commercial projects
|
||||||
|
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||||
|
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||||
|
* choose the license that best suits your project and use it accordingly.
|
||||||
|
*
|
||||||
|
* Although not required, the author would appreciate an email letting him
|
||||||
|
* know of any substantial use of jqPlot. You can reach the author at:
|
||||||
|
* chris at jqplot dot com or see http://www.jqplot.com/info.php .
|
||||||
|
*
|
||||||
|
* If you are feeling kind and generous, consider supporting the project by
|
||||||
|
* making a donation at: http://www.jqplot.com/donate.php .
|
||||||
|
*
|
||||||
|
* sprintf functions contained in jqplot.sprintf.js by Ash Searle:
|
||||||
|
*
|
||||||
|
* version 2007.04.27
|
||||||
|
* author Ash Searle
|
||||||
|
* http://hexmen.com/blog/2007/03/printf-sprintf/
|
||||||
|
* http://hexmen.com/js/sprintf.js
|
||||||
|
* The author (Ash Searle) has placed this code in the public domain:
|
||||||
|
* "This code is unrestricted: you are free to use it however you like."
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
(function($) {
|
||||||
|
// Class: $.jqplot.BezierCurveRenderer.js
|
||||||
|
// Renderer which draws lines as stacked bezier curves.
|
||||||
|
// Data for the line will not be specified as an array of
|
||||||
|
// [x, y] data point values, but as a an array of [start piont, bezier curve]
|
||||||
|
// So, the line is specified as: [[xstart, ystart], [cp1x, cp1y, cp2x, cp2y, xend, yend]].
|
||||||
|
$.jqplot.BezierCurveRenderer = function(){
|
||||||
|
$.jqplot.LineRenderer.call(this);
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BezierCurveRenderer.prototype = new $.jqplot.LineRenderer();
|
||||||
|
$.jqplot.BezierCurveRenderer.prototype.constructor = $.jqplot.BezierCurveRenderer;
|
||||||
|
|
||||||
|
|
||||||
|
// Method: setGridData
|
||||||
|
// converts the user data values to grid coordinates and stores them
|
||||||
|
// in the gridData array.
|
||||||
|
// Called with scope of a series.
|
||||||
|
$.jqplot.BezierCurveRenderer.prototype.setGridData = function(plot) {
|
||||||
|
// recalculate the grid data
|
||||||
|
var xp = this._xaxis.series_u2p;
|
||||||
|
var yp = this._yaxis.series_u2p;
|
||||||
|
// this._plotData should be same as this.data
|
||||||
|
var data = this.data;
|
||||||
|
this.gridData = [];
|
||||||
|
this._prevGridData = [];
|
||||||
|
// if seriesIndex = 0, fill to x axis.
|
||||||
|
// if seriesIndex > 0, fill to previous series data.
|
||||||
|
var idx = this.index;
|
||||||
|
if (data.length == 2) {
|
||||||
|
if (idx == 0) {
|
||||||
|
this.gridData = [
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
|
||||||
|
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
|
||||||
|
xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]),
|
||||||
|
xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])],
|
||||||
|
[xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, this._yaxis.min)],
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var psd = plot.series[idx-1].data;
|
||||||
|
this.gridData = [
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
|
||||||
|
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
|
||||||
|
xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]),
|
||||||
|
xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])],
|
||||||
|
[xp.call(this._xaxis, psd[1][4]), yp.call(this._yaxis, psd[1][5])],
|
||||||
|
[xp.call(this._xaxis, psd[1][2]), yp.call(this._yaxis, psd[1][3]),
|
||||||
|
xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]),
|
||||||
|
xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (idx == 0) {
|
||||||
|
this.gridData = [
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
|
||||||
|
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
|
||||||
|
xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]),
|
||||||
|
xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])],
|
||||||
|
[xp.call(this._xaxis, data[3][1]), yp.call(this._yaxis, this._yaxis.min)],
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var psd = plot.series[idx-1].data;
|
||||||
|
this.gridData = [
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
|
||||||
|
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
|
||||||
|
xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]),
|
||||||
|
xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])],
|
||||||
|
[xp.call(this._xaxis, psd[3][0]), yp.call(this._yaxis, psd[3][1])],
|
||||||
|
[xp.call(this._xaxis, psd[2][0]), yp.call(this._yaxis, psd[2][1]),
|
||||||
|
xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]),
|
||||||
|
xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Method: makeGridData
|
||||||
|
// converts any arbitrary data values to grid coordinates and
|
||||||
|
// returns them. This method exists so that plugins can use a series'
|
||||||
|
// linerenderer to generate grid data points without overwriting the
|
||||||
|
// grid data associated with that series.
|
||||||
|
// Called with scope of a series.
|
||||||
|
$.jqplot.BezierCurveRenderer.prototype.makeGridData = function(data, plot) {
|
||||||
|
// recalculate the grid data
|
||||||
|
var xp = this._xaxis.series_u2p;
|
||||||
|
var yp = this._yaxis.series_u2p;
|
||||||
|
var gd = [];
|
||||||
|
var pgd = [];
|
||||||
|
// if seriesIndex = 0, fill to x axis.
|
||||||
|
// if seriesIndex > 0, fill to previous series data.
|
||||||
|
var idx = this.index;
|
||||||
|
if (data.length == 2) {
|
||||||
|
if (idx == 0) {
|
||||||
|
gd = [
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
|
||||||
|
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
|
||||||
|
xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]),
|
||||||
|
xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])],
|
||||||
|
[xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, this._yaxis.min)],
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var psd = plot.series[idx-1].data;
|
||||||
|
gd = [
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
|
||||||
|
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
|
||||||
|
xp.call(this._xaxis, data[1][2]), yp.call(this._yaxis, data[1][3]),
|
||||||
|
xp.call(this._xaxis, data[1][4]), yp.call(this._yaxis, data[1][5])],
|
||||||
|
[xp.call(this._xaxis, psd[1][4]), yp.call(this._yaxis, psd[1][5])],
|
||||||
|
[xp.call(this._xaxis, psd[1][2]), yp.call(this._yaxis, psd[1][3]),
|
||||||
|
xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]),
|
||||||
|
xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (idx == 0) {
|
||||||
|
gd = [
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
|
||||||
|
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
|
||||||
|
xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]),
|
||||||
|
xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])],
|
||||||
|
[xp.call(this._xaxis, data[3][1]), yp.call(this._yaxis, this._yaxis.min)],
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, this._yaxis.min)]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var psd = plot.series[idx-1].data;
|
||||||
|
gd = [
|
||||||
|
[xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])],
|
||||||
|
[xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]),
|
||||||
|
xp.call(this._xaxis, data[2][0]), yp.call(this._yaxis, data[2][1]),
|
||||||
|
xp.call(this._xaxis, data[3][0]), yp.call(this._yaxis, data[3][1])],
|
||||||
|
[xp.call(this._xaxis, psd[3][0]), yp.call(this._yaxis, psd[3][1])],
|
||||||
|
[xp.call(this._xaxis, psd[2][0]), yp.call(this._yaxis, psd[2][1]),
|
||||||
|
xp.call(this._xaxis, psd[1][0]), yp.call(this._yaxis, psd[1][1]),
|
||||||
|
xp.call(this._xaxis, psd[0][0]), yp.call(this._yaxis, psd[0][1])]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return gd;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// called within scope of series.
|
||||||
|
$.jqplot.BezierCurveRenderer.prototype.draw = function(ctx, gd, options) {
|
||||||
|
var i;
|
||||||
|
ctx.save();
|
||||||
|
if (gd.length) {
|
||||||
|
if (this.showLine) {
|
||||||
|
ctx.save();
|
||||||
|
var opts = (options != null) ? options : {};
|
||||||
|
ctx.fillStyle = opts.fillStyle || this.color;
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.moveTo(gd[0][0], gd[0][1]);
|
||||||
|
ctx.bezierCurveTo(gd[1][0], gd[1][1], gd[1][2], gd[1][3], gd[1][4], gd[1][5]);
|
||||||
|
ctx.lineTo(gd[2][0], gd[2][1]);
|
||||||
|
if (gd[3].length == 2) {
|
||||||
|
ctx.lineTo(gd[3][0], gd[3][1]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ctx.bezierCurveTo(gd[3][0], gd[3][1], gd[3][2], gd[3][3], gd[3][4], gd[3][5]);
|
||||||
|
}
|
||||||
|
ctx.closePath();
|
||||||
|
ctx.fill();
|
||||||
|
ctx.restore();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.restore();
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BezierCurveRenderer.prototype.drawShadow = function(ctx, gd, options) {
|
||||||
|
// This is a no-op, shadows drawn with lines.
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BezierAxisRenderer = function() {
|
||||||
|
$.jqplot.LinearAxisRenderer.call(this);
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BezierAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer();
|
||||||
|
$.jqplot.BezierAxisRenderer.prototype.constructor = $.jqplot.BezierAxisRenderer;
|
||||||
|
|
||||||
|
|
||||||
|
// Axes on a plot with Bezier Curves
|
||||||
|
$.jqplot.BezierAxisRenderer.prototype.init = function(options){
|
||||||
|
$.extend(true, this, options);
|
||||||
|
var db = this._dataBounds;
|
||||||
|
// Go through all the series attached to this axis and find
|
||||||
|
// the min/max bounds for this axis.
|
||||||
|
for (var i=0; i<this._series.length; i++) {
|
||||||
|
var s = this._series[i];
|
||||||
|
var d = s.data;
|
||||||
|
if (d.length == 4) {
|
||||||
|
for (var j=0; j<d.length; j++) {
|
||||||
|
if (this.name == 'xaxis' || this.name == 'x2axis') {
|
||||||
|
if (d[j][0] < db.min || db.min == null) {
|
||||||
|
db.min = d[j][0];
|
||||||
|
}
|
||||||
|
if (d[j][0] > db.max || db.max == null) {
|
||||||
|
db.max = d[j][0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (d[j][1] < db.min || db.min == null) {
|
||||||
|
db.min = d[j][1];
|
||||||
|
}
|
||||||
|
if (d[j][1] > db.max || db.max == null) {
|
||||||
|
db.max = d[j][1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (this.name == 'xaxis' || this.name == 'x2axis') {
|
||||||
|
if (d[0][0] < db.min || db.min == null) {
|
||||||
|
db.min = d[0][0];
|
||||||
|
}
|
||||||
|
if (d[0][0] > db.max || db.max == null) {
|
||||||
|
db.max = d[0][0];
|
||||||
|
}
|
||||||
|
for (var j=0; j<5; j+=2) {
|
||||||
|
if (d[1][j] < db.min || db.min == null) {
|
||||||
|
db.min = d[1][j];
|
||||||
|
}
|
||||||
|
if (d[1][j] > db.max || db.max == null) {
|
||||||
|
db.max = d[1][j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (d[0][1] < db.min || db.min == null) {
|
||||||
|
db.min = d[0][1];
|
||||||
|
}
|
||||||
|
if (d[0][1] > db.max || db.max == null) {
|
||||||
|
db.max = d[0][1];
|
||||||
|
}
|
||||||
|
for (var j=1; j<6; j+=2) {
|
||||||
|
if (d[1][j] < db.min || db.min == null) {
|
||||||
|
db.min = d[1][j];
|
||||||
|
}
|
||||||
|
if (d[1][j] > db.max || db.max == null) {
|
||||||
|
db.max = d[1][j];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// setup default renderers for axes and legend so user doesn't have to
|
||||||
|
// called with scope of plot
|
||||||
|
function preInit(target, data, options) {
|
||||||
|
options = options || {};
|
||||||
|
options.axesDefaults = $.extend(true, {pad:0}, options.axesDefaults);
|
||||||
|
options.seriesDefaults = options.seriesDefaults || {};
|
||||||
|
options.legend = $.extend(true, {placement:'outside'}, options.legend);
|
||||||
|
// only set these if there is a pie series
|
||||||
|
var setopts = false;
|
||||||
|
if (options.seriesDefaults.renderer == $.jqplot.BezierCurveRenderer) {
|
||||||
|
setopts = true;
|
||||||
|
}
|
||||||
|
else if (options.series) {
|
||||||
|
for (var i=0; i < options.series.length; i++) {
|
||||||
|
if (options.series[i].renderer == $.jqplot.BezierCurveRenderer) {
|
||||||
|
setopts = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (setopts) {
|
||||||
|
options.axesDefaults.renderer = $.jqplot.BezierAxisRenderer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$.jqplot.preInitHooks.push(preInit);
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||||
|
jsDate | (c) 2010-2013 Chris Leonello
|
||||||
|
*/(function(b){b.jqplot.BezierCurveRenderer=function(){b.jqplot.LineRenderer.call(this)};b.jqplot.BezierCurveRenderer.prototype=new b.jqplot.LineRenderer();b.jqplot.BezierCurveRenderer.prototype.constructor=b.jqplot.BezierCurveRenderer;b.jqplot.BezierCurveRenderer.prototype.setGridData=function(h){var e=this._xaxis.series_u2p;var g=this._yaxis.series_u2p;var f=this.data;this.gridData=[];this._prevGridData=[];var d=this.index;if(f.length==2){if(d==0){this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[1][2]),g.call(this._yaxis,f[1][3]),e.call(this._xaxis,f[1][4]),g.call(this._yaxis,f[1][5])],[e.call(this._xaxis,f[1][4]),g.call(this._yaxis,this._yaxis.min)],[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,this._yaxis.min)]]}else{var c=h.series[d-1].data;this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[1][2]),g.call(this._yaxis,f[1][3]),e.call(this._xaxis,f[1][4]),g.call(this._yaxis,f[1][5])],[e.call(this._xaxis,c[1][4]),g.call(this._yaxis,c[1][5])],[e.call(this._xaxis,c[1][2]),g.call(this._yaxis,c[1][3]),e.call(this._xaxis,c[1][0]),g.call(this._yaxis,c[1][1]),e.call(this._xaxis,c[0][0]),g.call(this._yaxis,c[0][1])]]}}else{if(d==0){this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[2][0]),g.call(this._yaxis,f[2][1]),e.call(this._xaxis,f[3][0]),g.call(this._yaxis,f[3][1])],[e.call(this._xaxis,f[3][1]),g.call(this._yaxis,this._yaxis.min)],[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,this._yaxis.min)]]}else{var c=h.series[d-1].data;this.gridData=[[e.call(this._xaxis,f[0][0]),g.call(this._yaxis,f[0][1])],[e.call(this._xaxis,f[1][0]),g.call(this._yaxis,f[1][1]),e.call(this._xaxis,f[2][0]),g.call(this._yaxis,f[2][1]),e.call(this._xaxis,f[3][0]),g.call(this._yaxis,f[3][1])],[e.call(this._xaxis,c[3][0]),g.call(this._yaxis,c[3][1])],[e.call(this._xaxis,c[2][0]),g.call(this._yaxis,c[2][1]),e.call(this._xaxis,c[1][0]),g.call(this._yaxis,c[1][1]),e.call(this._xaxis,c[0][0]),g.call(this._yaxis,c[0][1])]]}}};b.jqplot.BezierCurveRenderer.prototype.makeGridData=function(g,i){var f=this._xaxis.series_u2p;var h=this._yaxis.series_u2p;var e=[];var j=[];var d=this.index;if(g.length==2){if(d==0){e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[1][2]),h.call(this._yaxis,g[1][3]),f.call(this._xaxis,g[1][4]),h.call(this._yaxis,g[1][5])],[f.call(this._xaxis,g[1][4]),h.call(this._yaxis,this._yaxis.min)],[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,this._yaxis.min)]]}else{var c=i.series[d-1].data;e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[1][2]),h.call(this._yaxis,g[1][3]),f.call(this._xaxis,g[1][4]),h.call(this._yaxis,g[1][5])],[f.call(this._xaxis,c[1][4]),h.call(this._yaxis,c[1][5])],[f.call(this._xaxis,c[1][2]),h.call(this._yaxis,c[1][3]),f.call(this._xaxis,c[1][0]),h.call(this._yaxis,c[1][1]),f.call(this._xaxis,c[0][0]),h.call(this._yaxis,c[0][1])]]}}else{if(d==0){e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[2][0]),h.call(this._yaxis,g[2][1]),f.call(this._xaxis,g[3][0]),h.call(this._yaxis,g[3][1])],[f.call(this._xaxis,g[3][1]),h.call(this._yaxis,this._yaxis.min)],[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,this._yaxis.min)]]}else{var c=i.series[d-1].data;e=[[f.call(this._xaxis,g[0][0]),h.call(this._yaxis,g[0][1])],[f.call(this._xaxis,g[1][0]),h.call(this._yaxis,g[1][1]),f.call(this._xaxis,g[2][0]),h.call(this._yaxis,g[2][1]),f.call(this._xaxis,g[3][0]),h.call(this._yaxis,g[3][1])],[f.call(this._xaxis,c[3][0]),h.call(this._yaxis,c[3][1])],[f.call(this._xaxis,c[2][0]),h.call(this._yaxis,c[2][1]),f.call(this._xaxis,c[1][0]),h.call(this._yaxis,c[1][1]),f.call(this._xaxis,c[0][0]),h.call(this._yaxis,c[0][1])]]}}return e};b.jqplot.BezierCurveRenderer.prototype.draw=function(c,g,d){var e;c.save();if(g.length){if(this.showLine){c.save();var f=(d!=null)?d:{};c.fillStyle=f.fillStyle||this.color;c.beginPath();c.moveTo(g[0][0],g[0][1]);c.bezierCurveTo(g[1][0],g[1][1],g[1][2],g[1][3],g[1][4],g[1][5]);c.lineTo(g[2][0],g[2][1]);if(g[3].length==2){c.lineTo(g[3][0],g[3][1])}else{c.bezierCurveTo(g[3][0],g[3][1],g[3][2],g[3][3],g[3][4],g[3][5])}c.closePath();c.fill();c.restore()}}c.restore()};b.jqplot.BezierCurveRenderer.prototype.drawShadow=function(c,e,d){};b.jqplot.BezierAxisRenderer=function(){b.jqplot.LinearAxisRenderer.call(this)};b.jqplot.BezierAxisRenderer.prototype=new b.jqplot.LinearAxisRenderer();b.jqplot.BezierAxisRenderer.prototype.constructor=b.jqplot.BezierAxisRenderer;b.jqplot.BezierAxisRenderer.prototype.init=function(f){b.extend(true,this,f);var c=this.Line truncated
|
||||||
@@ -0,0 +1,801 @@
|
|||||||
|
/**
|
||||||
|
* jqPlot
|
||||||
|
* Pure JavaScript plotting plugin using jQuery
|
||||||
|
*
|
||||||
|
* Version: 1.0.8
|
||||||
|
* Revision: 1250
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009-2013 Chris Leonello
|
||||||
|
* jqPlot is currently available for use in all personal or commercial projects
|
||||||
|
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||||
|
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||||
|
* choose the license that best suits your project and use it accordingly.
|
||||||
|
*
|
||||||
|
* Although not required, the author would appreciate an email letting him
|
||||||
|
* know of any substantial use of jqPlot. You can reach the author at:
|
||||||
|
* chris at jqplot dot com or see http://www.jqplot.com/info.php .
|
||||||
|
*
|
||||||
|
* If you are feeling kind and generous, consider supporting the project by
|
||||||
|
* making a donation at: http://www.jqplot.com/donate.php .
|
||||||
|
*
|
||||||
|
* sprintf functions contained in jqplot.sprintf.js by Ash Searle:
|
||||||
|
*
|
||||||
|
* version 2007.04.27
|
||||||
|
* author Ash Searle
|
||||||
|
* http://hexmen.com/blog/2007/03/printf-sprintf/
|
||||||
|
* http://hexmen.com/js/sprintf.js
|
||||||
|
* The author (Ash Searle) has placed this code in the public domain:
|
||||||
|
* "This code is unrestricted: you are free to use it however you like."
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
(function($) {
|
||||||
|
|
||||||
|
// Class: $.jqplot.BarRenderer
|
||||||
|
// A plugin renderer for jqPlot to draw a bar plot.
|
||||||
|
// Draws series as a line.
|
||||||
|
|
||||||
|
$.jqplot.BarRenderer = function(){
|
||||||
|
$.jqplot.LineRenderer.call(this);
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BarRenderer.prototype = new $.jqplot.LineRenderer();
|
||||||
|
$.jqplot.BarRenderer.prototype.constructor = $.jqplot.BarRenderer;
|
||||||
|
|
||||||
|
// called with scope of series.
|
||||||
|
$.jqplot.BarRenderer.prototype.init = function(options, plot) {
|
||||||
|
// Group: Properties
|
||||||
|
//
|
||||||
|
// prop: barPadding
|
||||||
|
// Number of pixels between adjacent bars at the same axis value.
|
||||||
|
this.barPadding = 8;
|
||||||
|
// prop: barMargin
|
||||||
|
// Number of pixels between groups of bars at adjacent axis values.
|
||||||
|
this.barMargin = 10;
|
||||||
|
// prop: barDirection
|
||||||
|
// 'vertical' = up and down bars, 'horizontal' = side to side bars
|
||||||
|
this.barDirection = 'vertical';
|
||||||
|
// prop: barWidth
|
||||||
|
// Width of the bar in pixels (auto by devaul). null = calculated automatically.
|
||||||
|
this.barWidth = null;
|
||||||
|
// prop: shadowOffset
|
||||||
|
// offset of the shadow from the slice and offset of
|
||||||
|
// each succesive stroke of the shadow from the last.
|
||||||
|
this.shadowOffset = 2;
|
||||||
|
// prop: shadowDepth
|
||||||
|
// number of strokes to apply to the shadow,
|
||||||
|
// each stroke offset shadowOffset from the last.
|
||||||
|
this.shadowDepth = 5;
|
||||||
|
// prop: shadowAlpha
|
||||||
|
// transparency of the shadow (0 = transparent, 1 = opaque)
|
||||||
|
this.shadowAlpha = 0.08;
|
||||||
|
// prop: waterfall
|
||||||
|
// true to enable waterfall plot.
|
||||||
|
this.waterfall = false;
|
||||||
|
// prop: groups
|
||||||
|
// group bars into this many groups
|
||||||
|
this.groups = 1;
|
||||||
|
// prop: varyBarColor
|
||||||
|
// true to color each bar of a series separately rather than
|
||||||
|
// have every bar of a given series the same color.
|
||||||
|
// If used for non-stacked multiple series bar plots, user should
|
||||||
|
// specify a separate 'seriesColors' array for each series.
|
||||||
|
// Otherwise, each series will set their bars to the same color array.
|
||||||
|
// This option has no Effect for stacked bar charts and is disabled.
|
||||||
|
this.varyBarColor = false;
|
||||||
|
// prop: highlightMouseOver
|
||||||
|
// True to highlight slice when moused over.
|
||||||
|
// This must be false to enable highlightMouseDown to highlight when clicking on a slice.
|
||||||
|
this.highlightMouseOver = true;
|
||||||
|
// prop: highlightMouseDown
|
||||||
|
// True to highlight when a mouse button is pressed over a slice.
|
||||||
|
// This will be disabled if highlightMouseOver is true.
|
||||||
|
this.highlightMouseDown = false;
|
||||||
|
// prop: highlightColors
|
||||||
|
// an array of colors to use when highlighting a bar.
|
||||||
|
this.highlightColors = [];
|
||||||
|
// prop: transposedData
|
||||||
|
// NOT IMPLEMENTED YET. True if this is a horizontal bar plot and
|
||||||
|
// x and y values are "transposed". Tranposed, or "swapped", data is
|
||||||
|
// required prior to rev. 894 builds of jqPlot with horizontal bars.
|
||||||
|
// Allows backward compatability of bar renderer horizontal bars with
|
||||||
|
// old style data sets.
|
||||||
|
this.transposedData = true;
|
||||||
|
this.renderer.animation = {
|
||||||
|
show: false,
|
||||||
|
direction: 'down',
|
||||||
|
speed: 3000,
|
||||||
|
_supported: true
|
||||||
|
};
|
||||||
|
this._type = 'bar';
|
||||||
|
|
||||||
|
// if user has passed in highlightMouseDown option and not set highlightMouseOver, disable highlightMouseOver
|
||||||
|
if (options.highlightMouseDown && options.highlightMouseOver == null) {
|
||||||
|
options.highlightMouseOver = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//////
|
||||||
|
// This is probably wrong here.
|
||||||
|
// After going back and forth on whether renderer should be the thing
|
||||||
|
// or extend the thing, it seems that it it best if it is a property
|
||||||
|
// on the thing. This should be something that is commonized
|
||||||
|
// among series renderers in the future.
|
||||||
|
//////
|
||||||
|
$.extend(true, this, options);
|
||||||
|
|
||||||
|
// really should probably do this
|
||||||
|
$.extend(true, this.renderer, options);
|
||||||
|
// fill is still needed to properly draw the legend.
|
||||||
|
// bars have to be filled.
|
||||||
|
this.fill = true;
|
||||||
|
|
||||||
|
// if horizontal bar and animating, reset the default direction
|
||||||
|
if (this.barDirection === 'horizontal' && this.rendererOptions.animation && this.rendererOptions.animation.direction == null) {
|
||||||
|
this.renderer.animation.direction = 'left';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.waterfall) {
|
||||||
|
this.fillToZero = false;
|
||||||
|
this.disableStack = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.barDirection == 'vertical' ) {
|
||||||
|
this._primaryAxis = '_xaxis';
|
||||||
|
this._stackAxis = 'y';
|
||||||
|
this.fillAxis = 'y';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this._primaryAxis = '_yaxis';
|
||||||
|
this._stackAxis = 'x';
|
||||||
|
this.fillAxis = 'x';
|
||||||
|
}
|
||||||
|
// index of the currenty highlighted point, if any
|
||||||
|
this._highlightedPoint = null;
|
||||||
|
// total number of values for all bar series, total number of bar series, and position of this series
|
||||||
|
this._plotSeriesInfo = null;
|
||||||
|
// Array of actual data colors used for each data point.
|
||||||
|
this._dataColors = [];
|
||||||
|
this._barPoints = [];
|
||||||
|
|
||||||
|
// set the shape renderer options
|
||||||
|
var opts = {lineJoin:'miter', lineCap:'round', fill:true, isarc:false, strokeStyle:this.color, fillStyle:this.color, closePath:this.fill};
|
||||||
|
this.renderer.shapeRenderer.init(opts);
|
||||||
|
// set the shadow renderer options
|
||||||
|
var sopts = {lineJoin:'miter', lineCap:'round', fill:true, isarc:false, angle:this.shadowAngle, offset:this.shadowOffset, alpha:this.shadowAlpha, depth:this.shadowDepth, closePath:this.fill};
|
||||||
|
this.renderer.shadowRenderer.init(sopts);
|
||||||
|
|
||||||
|
plot.postInitHooks.addOnce(postInit);
|
||||||
|
plot.postDrawHooks.addOnce(postPlotDraw);
|
||||||
|
plot.eventListenerHooks.addOnce('jqplotMouseMove', handleMove);
|
||||||
|
plot.eventListenerHooks.addOnce('jqplotMouseDown', handleMouseDown);
|
||||||
|
plot.eventListenerHooks.addOnce('jqplotMouseUp', handleMouseUp);
|
||||||
|
plot.eventListenerHooks.addOnce('jqplotClick', handleClick);
|
||||||
|
plot.eventListenerHooks.addOnce('jqplotRightClick', handleRightClick);
|
||||||
|
};
|
||||||
|
|
||||||
|
// called with scope of series
|
||||||
|
function barPreInit(target, data, seriesDefaults, options) {
|
||||||
|
if (this.rendererOptions.barDirection == 'horizontal') {
|
||||||
|
this._stackAxis = 'x';
|
||||||
|
this._primaryAxis = '_yaxis';
|
||||||
|
}
|
||||||
|
if (this.rendererOptions.waterfall == true) {
|
||||||
|
this._data = $.extend(true, [], this.data);
|
||||||
|
var sum = 0;
|
||||||
|
var pos = (!this.rendererOptions.barDirection || this.rendererOptions.barDirection === 'vertical' || this.transposedData === false) ? 1 : 0;
|
||||||
|
for(var i=0; i<this.data.length; i++) {
|
||||||
|
sum += this.data[i][pos];
|
||||||
|
if (i>0) {
|
||||||
|
this.data[i][pos] += this.data[i-1][pos];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.data[this.data.length] = (pos == 1) ? [this.data.length+1, sum] : [sum, this.data.length+1];
|
||||||
|
this._data[this._data.length] = (pos == 1) ? [this._data.length+1, sum] : [sum, this._data.length+1];
|
||||||
|
}
|
||||||
|
if (this.rendererOptions.groups > 1) {
|
||||||
|
this.breakOnNull = true;
|
||||||
|
var l = this.data.length;
|
||||||
|
var skip = parseInt(l/this.rendererOptions.groups, 10);
|
||||||
|
var count = 0;
|
||||||
|
for (var i=skip; i<l; i+=skip) {
|
||||||
|
this.data.splice(i+count, 0, [null, null]);
|
||||||
|
this._plotData.splice(i+count, 0, [null, null]);
|
||||||
|
this._stackData.splice(i+count, 0, [null, null]);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
for (i=0; i<this.data.length; i++) {
|
||||||
|
if (this._primaryAxis == '_xaxis') {
|
||||||
|
this.data[i][0] = i+1;
|
||||||
|
this._plotData[i][0] = i+1;
|
||||||
|
this._stackData[i][0] = i+1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.data[i][1] = i+1;
|
||||||
|
this._plotData[i][1] = i+1;
|
||||||
|
this._stackData[i][1] = i+1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$.jqplot.preSeriesInitHooks.push(barPreInit);
|
||||||
|
|
||||||
|
// needs to be called with scope of series, not renderer.
|
||||||
|
$.jqplot.BarRenderer.prototype.calcSeriesNumbers = function() {
|
||||||
|
var nvals = 0;
|
||||||
|
var nseries = 0;
|
||||||
|
var paxis = this[this._primaryAxis];
|
||||||
|
var s, series, pos;
|
||||||
|
// loop through all series on this axis
|
||||||
|
for (var i=0; i < paxis._series.length; i++) {
|
||||||
|
series = paxis._series[i];
|
||||||
|
if (series === this) {
|
||||||
|
pos = i;
|
||||||
|
}
|
||||||
|
// is the series rendered as a bar?
|
||||||
|
if (series.renderer.constructor == $.jqplot.BarRenderer) {
|
||||||
|
// gridData may not be computed yet, use data length insted
|
||||||
|
nvals += series.data.length;
|
||||||
|
nseries += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// return total number of values for all bar series, total number of bar series, and position of this series
|
||||||
|
return [nvals, nseries, pos];
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BarRenderer.prototype.setBarWidth = function() {
|
||||||
|
// need to know how many data values we have on the approprate axis and figure it out.
|
||||||
|
var i;
|
||||||
|
var nvals = 0;
|
||||||
|
var nseries = 0;
|
||||||
|
var paxis = this[this._primaryAxis];
|
||||||
|
var s, series, pos;
|
||||||
|
var temp = this._plotSeriesInfo = this.renderer.calcSeriesNumbers.call(this);
|
||||||
|
nvals = temp[0];
|
||||||
|
nseries = temp[1];
|
||||||
|
var nticks = paxis.numberTicks;
|
||||||
|
var nbins = (nticks-1)/2;
|
||||||
|
// so, now we have total number of axis values.
|
||||||
|
if (paxis.name == 'xaxis' || paxis.name == 'x2axis') {
|
||||||
|
if (this._stack) {
|
||||||
|
this.barWidth = (paxis._offsets.max - paxis._offsets.min) / nvals * nseries - this.barMargin;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.barWidth = ((paxis._offsets.max - paxis._offsets.min)/nbins - this.barPadding * (nseries-1) - this.barMargin*2)/nseries;
|
||||||
|
// this.barWidth = (paxis._offsets.max - paxis._offsets.min) / nvals - this.barPadding - this.barMargin/nseries;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (this._stack) {
|
||||||
|
this.barWidth = (paxis._offsets.min - paxis._offsets.max) / nvals * nseries - this.barMargin;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.barWidth = ((paxis._offsets.min - paxis._offsets.max)/nbins - this.barPadding * (nseries-1) - this.barMargin*2)/nseries;
|
||||||
|
// this.barWidth = (paxis._offsets.min - paxis._offsets.max) / nvals - this.barPadding - this.barMargin/nseries;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return [nvals, nseries];
|
||||||
|
};
|
||||||
|
|
||||||
|
function computeHighlightColors (colors) {
|
||||||
|
var ret = [];
|
||||||
|
for (var i=0; i<colors.length; i++){
|
||||||
|
var rgba = $.jqplot.getColorComponents(colors[i]);
|
||||||
|
var newrgb = [rgba[0], rgba[1], rgba[2]];
|
||||||
|
var sum = newrgb[0] + newrgb[1] + newrgb[2];
|
||||||
|
for (var j=0; j<3; j++) {
|
||||||
|
// when darkening, lowest color component can be is 60.
|
||||||
|
newrgb[j] = (sum > 570) ? newrgb[j] * 0.8 : newrgb[j] + 0.3 * (255 - newrgb[j]);
|
||||||
|
newrgb[j] = parseInt(newrgb[j], 10);
|
||||||
|
}
|
||||||
|
ret.push('rgb('+newrgb[0]+','+newrgb[1]+','+newrgb[2]+')');
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getStart(sidx, didx, comp, plot, axis) {
|
||||||
|
// check if sign change
|
||||||
|
var seriesIndex = sidx,
|
||||||
|
prevSeriesIndex = sidx - 1,
|
||||||
|
start,
|
||||||
|
prevVal,
|
||||||
|
aidx = (axis === 'x') ? 0 : 1;
|
||||||
|
|
||||||
|
// is this not the first series?
|
||||||
|
if (seriesIndex > 0) {
|
||||||
|
prevVal = plot.series[prevSeriesIndex]._plotData[didx][aidx];
|
||||||
|
|
||||||
|
// is there a sign change
|
||||||
|
if ((comp * prevVal) < 0) {
|
||||||
|
start = getStart(prevSeriesIndex, didx, comp, plot, axis);
|
||||||
|
}
|
||||||
|
|
||||||
|
// no sign change.
|
||||||
|
else {
|
||||||
|
start = plot.series[prevSeriesIndex].gridData[didx][aidx];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// if first series, return value at 0
|
||||||
|
else {
|
||||||
|
|
||||||
|
start = (aidx === 0) ? plot.series[seriesIndex]._xaxis.series_u2p(0) : plot.series[seriesIndex]._yaxis.series_u2p(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return start;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$.jqplot.BarRenderer.prototype.draw = function(ctx, gridData, options, plot) {
|
||||||
|
var i;
|
||||||
|
// Ughhh, have to make a copy of options b/c it may be modified later.
|
||||||
|
var opts = $.extend({}, options);
|
||||||
|
var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow;
|
||||||
|
var showLine = (opts.showLine != undefined) ? opts.showLine : this.showLine;
|
||||||
|
var fill = (opts.fill != undefined) ? opts.fill : this.fill;
|
||||||
|
var xaxis = this.xaxis;
|
||||||
|
var yaxis = this.yaxis;
|
||||||
|
var xp = this._xaxis.series_u2p;
|
||||||
|
var yp = this._yaxis.series_u2p;
|
||||||
|
var pointx, pointy;
|
||||||
|
// clear out data colors.
|
||||||
|
this._dataColors = [];
|
||||||
|
this._barPoints = [];
|
||||||
|
|
||||||
|
if (this.barWidth == null) {
|
||||||
|
this.renderer.setBarWidth.call(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
var temp = this._plotSeriesInfo = this.renderer.calcSeriesNumbers.call(this);
|
||||||
|
var nvals = temp[0];
|
||||||
|
var nseries = temp[1];
|
||||||
|
var pos = temp[2];
|
||||||
|
var points = [];
|
||||||
|
|
||||||
|
if (this._stack) {
|
||||||
|
this._barNudge = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this._barNudge = (-Math.abs(nseries/2 - 0.5) + pos) * (this.barWidth + this.barPadding);
|
||||||
|
}
|
||||||
|
if (showLine) {
|
||||||
|
var negativeColors = new $.jqplot.ColorGenerator(this.negativeSeriesColors);
|
||||||
|
var positiveColors = new $.jqplot.ColorGenerator(this.seriesColors);
|
||||||
|
var negativeColor = negativeColors.get(this.index);
|
||||||
|
if (! this.useNegativeColors) {
|
||||||
|
negativeColor = opts.fillStyle;
|
||||||
|
}
|
||||||
|
var positiveColor = opts.fillStyle;
|
||||||
|
var base;
|
||||||
|
var xstart;
|
||||||
|
var ystart;
|
||||||
|
|
||||||
|
if (this.barDirection == 'vertical') {
|
||||||
|
for (var i=0; i<gridData.length; i++) {
|
||||||
|
if (!this._stack && this.data[i][1] == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
points = [];
|
||||||
|
base = gridData[i][0] + this._barNudge;
|
||||||
|
|
||||||
|
// stacked
|
||||||
|
if (this._stack && this._prevGridData.length) {
|
||||||
|
ystart = getStart(this.index, i, this._plotData[i][1], plot, 'y');
|
||||||
|
}
|
||||||
|
|
||||||
|
// not stacked
|
||||||
|
else {
|
||||||
|
if (this.fillToZero) {
|
||||||
|
ystart = this._yaxis.series_u2p(0);
|
||||||
|
}
|
||||||
|
else if (this.waterfall && i > 0 && i < this.gridData.length-1) {
|
||||||
|
ystart = this.gridData[i-1][1];
|
||||||
|
}
|
||||||
|
else if (this.waterfall && i == 0 && i < this.gridData.length-1) {
|
||||||
|
if (this._yaxis.min <= 0 && this._yaxis.max >= 0) {
|
||||||
|
ystart = this._yaxis.series_u2p(0);
|
||||||
|
}
|
||||||
|
else if (this._yaxis.min > 0) {
|
||||||
|
ystart = ctx.canvas.height;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ystart = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.waterfall && i == this.gridData.length - 1) {
|
||||||
|
if (this._yaxis.min <= 0 && this._yaxis.max >= 0) {
|
||||||
|
ystart = this._yaxis.series_u2p(0);
|
||||||
|
}
|
||||||
|
else if (this._yaxis.min > 0) {
|
||||||
|
ystart = ctx.canvas.height;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ystart = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ystart = ctx.canvas.height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((this.fillToZero && this._plotData[i][1] < 0) || (this.waterfall && this._data[i][1] < 0)) {
|
||||||
|
if (this.varyBarColor && !this._stack) {
|
||||||
|
if (this.useNegativeColors) {
|
||||||
|
opts.fillStyle = negativeColors.next();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
opts.fillStyle = positiveColors.next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
opts.fillStyle = negativeColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (this.varyBarColor && !this._stack) {
|
||||||
|
opts.fillStyle = positiveColors.next();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
opts.fillStyle = positiveColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.fillToZero || this._plotData[i][1] >= 0) {
|
||||||
|
points.push([base-this.barWidth/2, ystart]);
|
||||||
|
points.push([base-this.barWidth/2, gridData[i][1]]);
|
||||||
|
points.push([base+this.barWidth/2, gridData[i][1]]);
|
||||||
|
points.push([base+this.barWidth/2, ystart]);
|
||||||
|
}
|
||||||
|
// for negative bars make sure points are always ordered clockwise
|
||||||
|
else {
|
||||||
|
points.push([base-this.barWidth/2, gridData[i][1]]);
|
||||||
|
points.push([base-this.barWidth/2, ystart]);
|
||||||
|
points.push([base+this.barWidth/2, ystart]);
|
||||||
|
points.push([base+this.barWidth/2, gridData[i][1]]);
|
||||||
|
}
|
||||||
|
this._barPoints.push(points);
|
||||||
|
// now draw the shadows if not stacked.
|
||||||
|
// for stacked plots, they are predrawn by drawShadow
|
||||||
|
if (shadow && !this._stack) {
|
||||||
|
var sopts = $.extend(true, {}, opts);
|
||||||
|
// need to get rid of fillStyle on shadow.
|
||||||
|
delete sopts.fillStyle;
|
||||||
|
this.renderer.shadowRenderer.draw(ctx, points, sopts);
|
||||||
|
}
|
||||||
|
var clr = opts.fillStyle || this.color;
|
||||||
|
this._dataColors.push(clr);
|
||||||
|
this.renderer.shapeRenderer.draw(ctx, points, opts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (this.barDirection == 'horizontal'){
|
||||||
|
for (var i=0; i<gridData.length; i++) {
|
||||||
|
if (!this._stack && this.data[i][0] == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
points = [];
|
||||||
|
base = gridData[i][1] - this._barNudge;
|
||||||
|
xstart;
|
||||||
|
|
||||||
|
if (this._stack && this._prevGridData.length) {
|
||||||
|
xstart = getStart(this.index, i, this._plotData[i][0], plot, 'x');
|
||||||
|
}
|
||||||
|
// not stacked
|
||||||
|
else {
|
||||||
|
if (this.fillToZero) {
|
||||||
|
xstart = this._xaxis.series_u2p(0);
|
||||||
|
}
|
||||||
|
else if (this.waterfall && i > 0 && i < this.gridData.length-1) {
|
||||||
|
xstart = this.gridData[i-1][0];
|
||||||
|
}
|
||||||
|
else if (this.waterfall && i == 0 && i < this.gridData.length-1) {
|
||||||
|
if (this._xaxis.min <= 0 && this._xaxis.max >= 0) {
|
||||||
|
xstart = this._xaxis.series_u2p(0);
|
||||||
|
}
|
||||||
|
else if (this._xaxis.min > 0) {
|
||||||
|
xstart = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
xstart = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.waterfall && i == this.gridData.length - 1) {
|
||||||
|
if (this._xaxis.min <= 0 && this._xaxis.max >= 0) {
|
||||||
|
xstart = this._xaxis.series_u2p(0);
|
||||||
|
}
|
||||||
|
else if (this._xaxis.min > 0) {
|
||||||
|
xstart = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
xstart = ctx.canvas.width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
xstart = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((this.fillToZero && this._plotData[i][0] < 0) || (this.waterfall && this._data[i][0] < 0)) {
|
||||||
|
if (this.varyBarColor && !this._stack) {
|
||||||
|
if (this.useNegativeColors) {
|
||||||
|
opts.fillStyle = negativeColors.next();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
opts.fillStyle = positiveColors.next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
opts.fillStyle = negativeColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (this.varyBarColor && !this._stack) {
|
||||||
|
opts.fillStyle = positiveColors.next();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
opts.fillStyle = positiveColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!this.fillToZero || this._plotData[i][0] >= 0) {
|
||||||
|
points.push([xstart, base + this.barWidth / 2]);
|
||||||
|
points.push([xstart, base - this.barWidth / 2]);
|
||||||
|
points.push([gridData[i][0], base - this.barWidth / 2]);
|
||||||
|
points.push([gridData[i][0], base + this.barWidth / 2]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
points.push([gridData[i][0], base + this.barWidth / 2]);
|
||||||
|
points.push([gridData[i][0], base - this.barWidth / 2]);
|
||||||
|
points.push([xstart, base - this.barWidth / 2]);
|
||||||
|
points.push([xstart, base + this.barWidth / 2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
this._barPoints.push(points);
|
||||||
|
// now draw the shadows if not stacked.
|
||||||
|
// for stacked plots, they are predrawn by drawShadow
|
||||||
|
if (shadow && !this._stack) {
|
||||||
|
var sopts = $.extend(true, {}, opts);
|
||||||
|
delete sopts.fillStyle;
|
||||||
|
this.renderer.shadowRenderer.draw(ctx, points, sopts);
|
||||||
|
}
|
||||||
|
var clr = opts.fillStyle || this.color;
|
||||||
|
this._dataColors.push(clr);
|
||||||
|
this.renderer.shapeRenderer.draw(ctx, points, opts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.highlightColors.length == 0) {
|
||||||
|
this.highlightColors = $.jqplot.computeHighlightColors(this._dataColors);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (typeof(this.highlightColors) == 'string') {
|
||||||
|
var temp = this.highlightColors;
|
||||||
|
this.highlightColors = [];
|
||||||
|
for (var i=0; i<this._dataColors.length; i++) {
|
||||||
|
this.highlightColors.push(temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// for stacked plots, shadows will be pre drawn by drawShadow.
|
||||||
|
$.jqplot.BarRenderer.prototype.drawShadow = function(ctx, gridData, options, plot) {
|
||||||
|
var i;
|
||||||
|
var opts = (options != undefined) ? options : {};
|
||||||
|
var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow;
|
||||||
|
var showLine = (opts.showLine != undefined) ? opts.showLine : this.showLine;
|
||||||
|
var fill = (opts.fill != undefined) ? opts.fill : this.fill;
|
||||||
|
var xaxis = this.xaxis;
|
||||||
|
var yaxis = this.yaxis;
|
||||||
|
var xp = this._xaxis.series_u2p;
|
||||||
|
var yp = this._yaxis.series_u2p;
|
||||||
|
var pointx, points, pointy, nvals, nseries, pos;
|
||||||
|
|
||||||
|
if (this._stack && this.shadow) {
|
||||||
|
if (this.barWidth == null) {
|
||||||
|
this.renderer.setBarWidth.call(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
var temp = this._plotSeriesInfo = this.renderer.calcSeriesNumbers.call(this);
|
||||||
|
nvals = temp[0];
|
||||||
|
nseries = temp[1];
|
||||||
|
pos = temp[2];
|
||||||
|
|
||||||
|
if (this._stack) {
|
||||||
|
this._barNudge = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this._barNudge = (-Math.abs(nseries/2 - 0.5) + pos) * (this.barWidth + this.barPadding);
|
||||||
|
}
|
||||||
|
if (showLine) {
|
||||||
|
|
||||||
|
if (this.barDirection == 'vertical') {
|
||||||
|
for (var i=0; i<gridData.length; i++) {
|
||||||
|
if (this.data[i][1] == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
points = [];
|
||||||
|
var base = gridData[i][0] + this._barNudge;
|
||||||
|
var ystart;
|
||||||
|
|
||||||
|
if (this._stack && this._prevGridData.length) {
|
||||||
|
ystart = getStart(this.index, i, this._plotData[i][1], plot, 'y');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (this.fillToZero) {
|
||||||
|
ystart = this._yaxis.series_u2p(0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ystart = ctx.canvas.height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
points.push([base-this.barWidth/2, ystart]);
|
||||||
|
points.push([base-this.barWidth/2, gridData[i][1]]);
|
||||||
|
points.push([base+this.barWidth/2, gridData[i][1]]);
|
||||||
|
points.push([base+this.barWidth/2, ystart]);
|
||||||
|
this.renderer.shadowRenderer.draw(ctx, points, opts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (this.barDirection == 'horizontal'){
|
||||||
|
for (var i=0; i<gridData.length; i++) {
|
||||||
|
if (this.data[i][0] == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
points = [];
|
||||||
|
var base = gridData[i][1] - this._barNudge;
|
||||||
|
var xstart;
|
||||||
|
|
||||||
|
if (this._stack && this._prevGridData.length) {
|
||||||
|
xstart = getStart(this.index, i, this._plotData[i][0], plot, 'x');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (this.fillToZero) {
|
||||||
|
xstart = this._xaxis.series_u2p(0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
xstart = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
points.push([xstart, base+this.barWidth/2]);
|
||||||
|
points.push([gridData[i][0], base+this.barWidth/2]);
|
||||||
|
points.push([gridData[i][0], base-this.barWidth/2]);
|
||||||
|
points.push([xstart, base-this.barWidth/2]);
|
||||||
|
this.renderer.shadowRenderer.draw(ctx, points, opts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function postInit(target, data, options) {
|
||||||
|
for (var i=0; i<this.series.length; i++) {
|
||||||
|
if (this.series[i].renderer.constructor == $.jqplot.BarRenderer) {
|
||||||
|
// don't allow mouseover and mousedown at same time.
|
||||||
|
if (this.series[i].highlightMouseOver) {
|
||||||
|
this.series[i].highlightMouseDown = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// called within context of plot
|
||||||
|
// create a canvas which we can draw on.
|
||||||
|
// insert it before the eventCanvas, so eventCanvas will still capture events.
|
||||||
|
function postPlotDraw() {
|
||||||
|
// Memory Leaks patch
|
||||||
|
if (this.plugins.barRenderer && this.plugins.barRenderer.highlightCanvas) {
|
||||||
|
|
||||||
|
this.plugins.barRenderer.highlightCanvas.resetCanvas();
|
||||||
|
this.plugins.barRenderer.highlightCanvas = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.plugins.barRenderer = {highlightedSeriesIndex:null};
|
||||||
|
this.plugins.barRenderer.highlightCanvas = new $.jqplot.GenericCanvas();
|
||||||
|
|
||||||
|
this.eventCanvas._elem.before(this.plugins.barRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-barRenderer-highlight-canvas', this._plotDimensions, this));
|
||||||
|
this.plugins.barRenderer.highlightCanvas.setContext();
|
||||||
|
this.eventCanvas._elem.bind('mouseleave', {plot:this}, function (ev) { unhighlight(ev.data.plot); });
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlight (plot, sidx, pidx, points) {
|
||||||
|
var s = plot.series[sidx];
|
||||||
|
var canvas = plot.plugins.barRenderer.highlightCanvas;
|
||||||
|
canvas._ctx.clearRect(0,0,canvas._ctx.canvas.width, canvas._ctx.canvas.height);
|
||||||
|
s._highlightedPoint = pidx;
|
||||||
|
plot.plugins.barRenderer.highlightedSeriesIndex = sidx;
|
||||||
|
var opts = {fillStyle: s.highlightColors[pidx]};
|
||||||
|
s.renderer.shapeRenderer.draw(canvas._ctx, points, opts);
|
||||||
|
canvas = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function unhighlight (plot) {
|
||||||
|
var canvas = plot.plugins.barRenderer.highlightCanvas;
|
||||||
|
canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height);
|
||||||
|
for (var i=0; i<plot.series.length; i++) {
|
||||||
|
plot.series[i]._highlightedPoint = null;
|
||||||
|
}
|
||||||
|
plot.plugins.barRenderer.highlightedSeriesIndex = null;
|
||||||
|
plot.target.trigger('jqplotDataUnhighlight');
|
||||||
|
canvas = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function handleMove(ev, gridpos, datapos, neighbor, plot) {
|
||||||
|
if (neighbor) {
|
||||||
|
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
|
||||||
|
var evt1 = jQuery.Event('jqplotDataMouseOver');
|
||||||
|
evt1.pageX = ev.pageX;
|
||||||
|
evt1.pageY = ev.pageY;
|
||||||
|
plot.target.trigger(evt1, ins);
|
||||||
|
if (plot.series[ins[0]].show && plot.series[ins[0]].highlightMouseOver &&
|
||||||
|
!(ins[0] == plot.plugins.barRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
|
||||||
|
var evt = jQuery.Event('jqplotDataHighlight');
|
||||||
|
evt.which = ev.which;
|
||||||
|
evt.pageX = ev.pageX;
|
||||||
|
evt.pageY = ev.pageY;
|
||||||
|
plot.target.trigger(evt, ins);
|
||||||
|
highlight (plot, neighbor.seriesIndex, neighbor.pointIndex, neighbor.points);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (neighbor == null) {
|
||||||
|
unhighlight (plot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleMouseDown(ev, gridpos, datapos, neighbor, plot) {
|
||||||
|
if (neighbor) {
|
||||||
|
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
|
||||||
|
if (plot.series[ins[0]].highlightMouseDown && !(ins[0] == plot.plugins.barRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
|
||||||
|
var evt = jQuery.Event('jqplotDataHighlight');
|
||||||
|
evt.which = ev.which;
|
||||||
|
evt.pageX = ev.pageX;
|
||||||
|
evt.pageY = ev.pageY;
|
||||||
|
plot.target.trigger(evt, ins);
|
||||||
|
highlight (plot, neighbor.seriesIndex, neighbor.pointIndex, neighbor.points);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (neighbor == null) {
|
||||||
|
unhighlight (plot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleMouseUp(ev, gridpos, datapos, neighbor, plot) {
|
||||||
|
var idx = plot.plugins.barRenderer.highlightedSeriesIndex;
|
||||||
|
if (idx != null && plot.series[idx].highlightMouseDown) {
|
||||||
|
unhighlight(plot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleClick(ev, gridpos, datapos, neighbor, plot) {
|
||||||
|
if (neighbor) {
|
||||||
|
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
|
||||||
|
var evt = jQuery.Event('jqplotDataClick');
|
||||||
|
evt.which = ev.which;
|
||||||
|
evt.pageX = ev.pageX;
|
||||||
|
evt.pageY = ev.pageY;
|
||||||
|
plot.target.trigger(evt, ins);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleRightClick(ev, gridpos, datapos, neighbor, plot) {
|
||||||
|
if (neighbor) {
|
||||||
|
var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
|
||||||
|
var idx = plot.plugins.barRenderer.highlightedSeriesIndex;
|
||||||
|
if (idx != null && plot.series[idx].highlightMouseDown) {
|
||||||
|
unhighlight(plot);
|
||||||
|
}
|
||||||
|
var evt = jQuery.Event('jqplotDataRightClick');
|
||||||
|
evt.which = ev.which;
|
||||||
|
evt.pageX = ev.pageX;
|
||||||
|
evt.pageY = ev.pageY;
|
||||||
|
plot.target.trigger(evt, ins);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||||
|
jsDate | (c) 2010-2013 Chris Leonello
|
||||||
|
*/(function(d){d.jqplot.BarRenderer=function(){d.jqplot.LineRenderer.call(this)};d.jqplot.BarRenderer.prototype=new d.jqplot.LineRenderer();d.jqplot.BarRenderer.prototype.constructor=d.jqplot.BarRenderer;d.jqplot.BarRenderer.prototype.init=function(o,q){this.barPadding=8;this.barMargin=10;this.barDirection="vertical";this.barWidth=null;this.shadowOffset=2;this.shadowDepth=5;this.shadowAlpha=0.08;this.waterfall=false;this.groups=1;this.varyBarColor=false;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.transposedData=true;this.renderer.animation={show:false,direction:"down",speed:3000,_supported:true};this._type="bar";if(o.highlightMouseDown&&o.highlightMouseOver==null){o.highlightMouseOver=false}d.extend(true,this,o);d.extend(true,this.renderer,o);this.fill=true;if(this.barDirection==="horizontal"&&this.rendererOptions.animation&&this.rendererOptions.animation.direction==null){this.renderer.animation.direction="left"}if(this.waterfall){this.fillToZero=false;this.disableStack=true}if(this.barDirection=="vertical"){this._primaryAxis="_xaxis";this._stackAxis="y";this.fillAxis="y"}else{this._primaryAxis="_yaxis";this._stackAxis="x";this.fillAxis="x"}this._highlightedPoint=null;this._plotSeriesInfo=null;this._dataColors=[];this._barPoints=[];var p={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,strokeStyle:this.color,fillStyle:this.color,closePath:this.fill};this.renderer.shapeRenderer.init(p);var n={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,closePath:this.fill};this.renderer.shadowRenderer.init(n);q.postInitHooks.addOnce(h);q.postDrawHooks.addOnce(j);q.eventListenerHooks.addOnce("jqplotMouseMove",b);q.eventListenerHooks.addOnce("jqplotMouseDown",a);q.eventListenerHooks.addOnce("jqplotMouseUp",l);q.eventListenerHooks.addOnce("jqplotClick",e);q.eventListenerHooks.addOnce("jqplotRightClick",m)};function g(t,p,o,w){if(this.rendererOptions.barDirection=="horizontal"){this._stackAxis="x";this._primaryAxis="_yaxis"}if(this.rendererOptions.waterfall==true){this._data=d.extend(true,[],this.data);var s=0;var u=(!this.rendererOptions.barDirection||this.rendererOptions.barDirection==="vertical"||this.transposedData===false)?1:0;for(var q=0;q<this.data.length;q++){s+=this.data[q][u];if(q>0){this.data[q][u]+=this.data[q-1][u]}}this.data[this.data.length]=(u==1)?[this.data.length+1,s]:[s,this.data.length+1];this._data[this._data.length]=(u==1)?[this._data.length+1,s]:[s,this._data.length+1]}if(this.rendererOptions.groups>1){this.breakOnNull=true;var n=this.data.length;var v=parseInt(n/this.rendererOptions.groups,10);var r=0;for(var q=v;q<n;q+=v){this.data.splice(q+r,0,[null,null]);this._plotData.splice(q+r,0,[null,null]);this._stackData.splice(q+r,0,[null,null]);r++}for(q=0;q<this.data.length;q++){if(this._primaryAxis=="_xaxis"){this.data[q][0]=q+1;this._plotData[q][0]=q+1;this._stackData[q][0]=q+1}else{this.data[q][1]=q+1;this._plotData[q][1]=q+1;this._stackData[q][1]=q+1}}}}d.jqplot.preSeriesInitHooks.push(g);d.jqplot.BarRenderer.prototype.calcSeriesNumbers=function(){var r=0;var t=0;var q=this[this._primaryAxis];var p,o,u;for(var n=0;n<q._series.length;n++){o=q._series[n];if(o===this){u=n}if(o.renderer.constructor==d.jqplot.BarRenderer){r+=o.data.length;t+=1}}return[r,t,u]};d.jqplot.BarRenderer.prototype.setBarWidth=function(){var q;var n=0;var o=0;var t=this[this._primaryAxis];var x,r,v;var w=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this);n=w[0];o=w[1];var u=t.numberTicks;var p=(u-1)/2;if(t.name=="xaxis"||t.name=="x2axis"){if(this._stack){this.barWidth=(t._offsets.max-t._offsets.min)/n*o-this.barMargin}else{this.barWidth=((t._offsets.max-t._offsets.min)/p-this.barPadding*(o-1)-this.barMargin*2)/o}}else{if(this._stack){this.barWidth=(t._offsets.min-t._offsets.max)/n*o-this.barMargin}else{this.barWidth=((t._offsets.min-t._offsets.max)/p-this.barPadding*(o-1)-this.barMargin*2)/o}}return[n,o]};function f(o){var q=[];for(var s=0;s<o.length;s++){var r=d.jqplot.getColorComponents(o[s]);var n=[r[0],r[1],r[2]];var t=n[0]+n[1]+n[2];for(var p=0;p<3;p++){n[p]=(t>570)?n[p]*0.8:n[p]+0.3*(255-n[p]);n[p]=parseInt(n[p],10)}q.push("rgb("+n[0]+","+n[1]+","+n[2]+")")}return q}function i(v,u,s,t,o){var q=v,w=v-1,n,p,r=(o==="x")?0:1;if(q>0){p=t.series[w]._plotData[u][r];if((s*p)<0){n=i(w,u,s,t,o)}else{n=t.series[w].gridData[u][r]}}else{n=(r===0)?t.series[q]._xaxis.series_u2p(0):t.series[q]._yaxis.series_u2p(0)}return n}d.jqplot.BarRenderer.prototype.draw=function(E,L,q,G){var I;var A=d.extend({},q);var w=(A.shadow!=undefined)?A.shadow:this.shadow;var O=(A.showLine!=undefined)?A.showLine:this.showLine;var F=(A.fill!=undefined)?A.fill:this.fill;var p=this.xaxis;var J=this.yaxis;var y=this._xaxis.series_u2p;var K=this._yaxis.series_u2p;var D,C;this._dataColors=[];this._barPoints=[];if(this.barWidth==null){this.renderer.setBarWidth.call(this)}var N=this._plotSeriesInfo=this.renLine truncated
|
||||||
@@ -0,0 +1,235 @@
|
|||||||
|
/**
|
||||||
|
* jqPlot
|
||||||
|
* Pure JavaScript plotting plugin using jQuery
|
||||||
|
*
|
||||||
|
* Version: 1.0.8
|
||||||
|
* Revision: 1250
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009-2013 Chris Leonello
|
||||||
|
* jqPlot is currently available for use in all personal or commercial projects
|
||||||
|
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||||
|
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||||
|
* choose the license that best suits your project and use it accordingly.
|
||||||
|
*
|
||||||
|
* Although not required, the author would appreciate an email letting him
|
||||||
|
* know of any substantial use of jqPlot. You can reach the author at:
|
||||||
|
* chris at jqplot dot com or see http://www.jqplot.com/info.php .
|
||||||
|
*
|
||||||
|
* If you are feeling kind and generous, consider supporting the project by
|
||||||
|
* making a donation at: http://www.jqplot.com/donate.php .
|
||||||
|
*
|
||||||
|
* sprintf functions contained in jqplot.sprintf.js by Ash Searle:
|
||||||
|
*
|
||||||
|
* version 2007.04.27
|
||||||
|
* author Ash Searle
|
||||||
|
* http://hexmen.com/blog/2007/03/printf-sprintf/
|
||||||
|
* http://hexmen.com/js/sprintf.js
|
||||||
|
* The author (Ash Searle) has placed this code in the public domain:
|
||||||
|
* "This code is unrestricted: you are free to use it however you like."
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
(function($) {
|
||||||
|
/**
|
||||||
|
* Class: $.jqplot.BlockRenderer
|
||||||
|
* Plugin renderer to draw a x-y block chart. A Block chart has data points displayed as
|
||||||
|
* colored squares with a text label inside. Data must be supplied in the form:
|
||||||
|
*
|
||||||
|
* > [[x1, y1, "label 1", {css}], [x2, y2, "label 2", {css}], ...]
|
||||||
|
*
|
||||||
|
* The label and css object are optional. If the label is ommitted, the
|
||||||
|
* box will collapse unless a css height and/or width is specified.
|
||||||
|
*
|
||||||
|
* The css object is an object specifying css properties
|
||||||
|
* such as:
|
||||||
|
*
|
||||||
|
* > {background:'#4f98a5', border:'3px solid gray', padding:'1px'}
|
||||||
|
*
|
||||||
|
* Note that css properties specified with the data point override defaults
|
||||||
|
* specified with the series.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
$.jqplot.BlockRenderer = function(){
|
||||||
|
$.jqplot.LineRenderer.call(this);
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BlockRenderer.prototype = new $.jqplot.LineRenderer();
|
||||||
|
$.jqplot.BlockRenderer.prototype.constructor = $.jqplot.BlockRenderer;
|
||||||
|
|
||||||
|
// called with scope of a series
|
||||||
|
$.jqplot.BlockRenderer.prototype.init = function(options) {
|
||||||
|
// Group: Properties
|
||||||
|
//
|
||||||
|
// prop: css
|
||||||
|
// default css styles that will be applied to all data blocks.
|
||||||
|
// these values will be overridden by css styles supplied with the
|
||||||
|
// individulal data points.
|
||||||
|
this.css = {padding:'2px', border:'1px solid #999', textAlign:'center'};
|
||||||
|
// prop: escapeHtml
|
||||||
|
// true to escape html in the box label.
|
||||||
|
this.escapeHtml = false;
|
||||||
|
// prop: insertBreaks
|
||||||
|
// true to turn spaces in data block label into html breaks <br />.
|
||||||
|
this.insertBreaks = true;
|
||||||
|
// prop: varyBlockColors
|
||||||
|
// true to vary the color of each block in this series according to
|
||||||
|
// the seriesColors array. False to set each block to the color
|
||||||
|
// specified on this series. This has no effect if a css background color
|
||||||
|
// option is specified in the renderer css options.
|
||||||
|
this.varyBlockColors = false;
|
||||||
|
$.extend(true, this, options);
|
||||||
|
if (this.css.backgroundColor) {
|
||||||
|
this.color = this.css.backgroundColor;
|
||||||
|
}
|
||||||
|
else if (this.css.background) {
|
||||||
|
this.color = this.css.background;
|
||||||
|
}
|
||||||
|
else if (!this.varyBlockColors) {
|
||||||
|
this.css.background = this.color;
|
||||||
|
}
|
||||||
|
this.canvas = new $.jqplot.BlockCanvas();
|
||||||
|
this.shadowCanvas = new $.jqplot.BlockCanvas();
|
||||||
|
this.canvas._plotDimensions = this._plotDimensions;
|
||||||
|
this.shadowCanvas._plotDimensions = this._plotDimensions;
|
||||||
|
this._type = 'block';
|
||||||
|
|
||||||
|
// group: Methods
|
||||||
|
//
|
||||||
|
// Method: moveBlock
|
||||||
|
// Moves an individual block. More efficient than redrawing
|
||||||
|
// the whole series by calling plot.drawSeries().
|
||||||
|
// Properties:
|
||||||
|
// idx - the 0 based index of the block or point in this series.
|
||||||
|
// x - the x coordinate in data units (value on x axis) to move the block to.
|
||||||
|
// y - the y coordinate in data units (value on the y axis) to move the block to.
|
||||||
|
// duration - optional parameter to create an animated movement. Can be a
|
||||||
|
// number (higher is slower animation) or 'fast', 'normal' or 'slow'. If not
|
||||||
|
// provided, the element is moved without any animation.
|
||||||
|
this.moveBlock = function (idx, x, y, duration) {
|
||||||
|
// update plotData, stackData, data and gridData
|
||||||
|
// x and y are in data coordinates.
|
||||||
|
var el = this.canvas._elem.children(':eq('+idx+')');
|
||||||
|
this.data[idx][0] = x;
|
||||||
|
this.data[idx][1] = y;
|
||||||
|
this._plotData[idx][0] = x;
|
||||||
|
this._plotData[idx][1] = y;
|
||||||
|
this._stackData[idx][0] = x;
|
||||||
|
this._stackData[idx][1] = y;
|
||||||
|
this.gridData[idx][0] = this._xaxis.series_u2p(x);
|
||||||
|
this.gridData[idx][1] = this._yaxis.series_u2p(y);
|
||||||
|
var w = el.outerWidth();
|
||||||
|
var h = el.outerHeight();
|
||||||
|
var left = this.gridData[idx][0] - w/2 + 'px';
|
||||||
|
var top = this.gridData[idx][1] - h/2 + 'px';
|
||||||
|
if (duration) {
|
||||||
|
if (parseInt(duration, 10)) {
|
||||||
|
duration = parseInt(duration, 10);
|
||||||
|
}
|
||||||
|
el.animate({left:left, top:top}, duration);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
el.css({left:left, top:top});
|
||||||
|
}
|
||||||
|
el = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// called with scope of series
|
||||||
|
$.jqplot.BlockRenderer.prototype.draw = function (ctx, gd, options) {
|
||||||
|
if (this.plugins.pointLabels) {
|
||||||
|
this.plugins.pointLabels.show = false;
|
||||||
|
}
|
||||||
|
var i, el, d, gd, t, css, w, h, left, top;
|
||||||
|
var opts = (options != undefined) ? options : {};
|
||||||
|
var colorGenerator = new $.jqplot.ColorGenerator(this.seriesColors);
|
||||||
|
this.canvas._elem.empty();
|
||||||
|
for (i=0; i<this.gridData.length; i++) {
|
||||||
|
d = this.data[i];
|
||||||
|
gd = this.gridData[i];
|
||||||
|
t = '';
|
||||||
|
css = {};
|
||||||
|
if (typeof d[2] == 'string') {
|
||||||
|
t = d[2];
|
||||||
|
}
|
||||||
|
else if (typeof d[2] == 'object') {
|
||||||
|
css = d[2];
|
||||||
|
}
|
||||||
|
if (typeof d[3] == 'object') {
|
||||||
|
css = d[3];
|
||||||
|
}
|
||||||
|
if (this.insertBreaks){
|
||||||
|
t = t.replace(/ /g, '<br />');
|
||||||
|
}
|
||||||
|
css = $.extend(true, {}, this.css, css);
|
||||||
|
// create a div
|
||||||
|
el = $('<div style="position:absolute;margin-left:auto;margin-right:auto;"></div>');
|
||||||
|
this.canvas._elem.append(el);
|
||||||
|
// set text
|
||||||
|
this.escapeHtml ? el.text(t) : el.html(t);
|
||||||
|
// style it
|
||||||
|
// remove styles we don't want overridden.
|
||||||
|
delete css.position;
|
||||||
|
delete css.marginRight;
|
||||||
|
delete css.marginLeft;
|
||||||
|
if (!css.background && !css.backgroundColor && !css.backgroundImage){
|
||||||
|
css.background = colorGenerator.next();
|
||||||
|
}
|
||||||
|
el.css(css);
|
||||||
|
w = el.outerWidth();
|
||||||
|
h = el.outerHeight();
|
||||||
|
left = gd[0] - w/2 + 'px';
|
||||||
|
top = gd[1] - h/2 + 'px';
|
||||||
|
el.css({left:left, top:top});
|
||||||
|
el = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BlockCanvas = function() {
|
||||||
|
$.jqplot.ElemContainer.call(this);
|
||||||
|
this._ctx;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BlockCanvas.prototype = new $.jqplot.ElemContainer();
|
||||||
|
$.jqplot.BlockCanvas.prototype.constructor = $.jqplot.BlockCanvas;
|
||||||
|
|
||||||
|
$.jqplot.BlockCanvas.prototype.createElement = function(offsets, clss, plotDimensions) {
|
||||||
|
this._offsets = offsets;
|
||||||
|
var klass = 'jqplot-blockCanvas';
|
||||||
|
if (clss != undefined) {
|
||||||
|
klass = clss;
|
||||||
|
}
|
||||||
|
var elem;
|
||||||
|
// if this canvas already has a dom element, don't make a new one.
|
||||||
|
if (this._elem) {
|
||||||
|
elem = this._elem.get(0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
elem = document.createElement('div');
|
||||||
|
}
|
||||||
|
// if new plotDimensions supplied, use them.
|
||||||
|
if (plotDimensions != undefined) {
|
||||||
|
this._plotDimensions = plotDimensions;
|
||||||
|
}
|
||||||
|
|
||||||
|
var w = this._plotDimensions.width - this._offsets.left - this._offsets.right + 'px';
|
||||||
|
var h = this._plotDimensions.height - this._offsets.top - this._offsets.bottom + 'px';
|
||||||
|
this._elem = $(elem);
|
||||||
|
this._elem.css({ position: 'absolute', width:w, height:h, left: this._offsets.left, top: this._offsets.top });
|
||||||
|
|
||||||
|
this._elem.addClass(klass);
|
||||||
|
return this._elem;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BlockCanvas.prototype.setContext = function() {
|
||||||
|
this._ctx = {
|
||||||
|
canvas:{
|
||||||
|
width:0,
|
||||||
|
height:0
|
||||||
|
},
|
||||||
|
clearRect:function(){return null;}
|
||||||
|
};
|
||||||
|
return this._ctx;
|
||||||
|
};
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||||
|
jsDate | (c) 2010-2013 Chris Leonello
|
||||||
|
*/(function(a){a.jqplot.BlockRenderer=function(){a.jqplot.LineRenderer.call(this)};a.jqplot.BlockRenderer.prototype=new a.jqplot.LineRenderer();a.jqplot.BlockRenderer.prototype.constructor=a.jqplot.BlockRenderer;a.jqplot.BlockRenderer.prototype.init=function(b){this.css={padding:"2px",border:"1px solid #999",textAlign:"center"};this.escapeHtml=false;this.insertBreaks=true;this.varyBlockColors=false;a.extend(true,this,b);if(this.css.backgroundColor){this.color=this.css.backgroundColor}else{if(this.css.background){this.color=this.css.background}else{if(!this.varyBlockColors){this.css.background=this.color}}}this.canvas=new a.jqplot.BlockCanvas();this.shadowCanvas=new a.jqplot.BlockCanvas();this.canvas._plotDimensions=this._plotDimensions;this.shadowCanvas._plotDimensions=this._plotDimensions;this._type="block";this.moveBlock=function(l,j,i,e){var c=this.canvas._elem.children(":eq("+l+")");this.data[l][0]=j;this.data[l][1]=i;this._plotData[l][0]=j;this._plotData[l][1]=i;this._stackData[l][0]=j;this._stackData[l][1]=i;this.gridData[l][0]=this._xaxis.series_u2p(j);this.gridData[l][1]=this._yaxis.series_u2p(i);var k=c.outerWidth();var f=c.outerHeight();var d=this.gridData[l][0]-k/2+"px";var g=this.gridData[l][1]-f/2+"px";if(e){if(parseInt(e,10)){e=parseInt(e,10)}c.animate({left:d,top:g},e)}else{c.css({left:d,top:g})}c=null}};a.jqplot.BlockRenderer.prototype.draw=function(q,o,r){if(this.plugins.pointLabels){this.plugins.pointLabels.show=false}var f,c,l,o,p,k,n,g,e,m;var b=(r!=undefined)?r:{};var j=new a.jqplot.ColorGenerator(this.seriesColors);this.canvas._elem.empty();for(f=0;f<this.gridData.length;f++){l=this.data[f];o=this.gridData[f];p="";k={};if(typeof l[2]=="string"){p=l[2]}else{if(typeof l[2]=="object"){k=l[2]}}if(typeof l[3]=="object"){k=l[3]}if(this.insertBreaks){p=p.replace(/ /g,"<br />")}k=a.extend(true,{},this.css,k);c=a('<div style="position:absolute;margin-left:auto;margin-right:auto;"></div>');this.canvas._elem.append(c);this.escapeHtml?c.text(p):c.html(p);delete k.position;delete k.marginRight;delete k.marginLeft;if(!k.background&&!k.backgroundColor&&!k.backgroundImage){k.background=j.next()}c.css(k);n=c.outerWidth();g=c.outerHeight();e=o[0]-n/2+"px";m=o[1]-g/2+"px";c.css({left:e,top:m});c=null}};a.jqplot.BlockCanvas=function(){a.jqplot.ElemContainer.call(this);this._ctx};a.jqplot.BlockCanvas.prototype=new a.jqplot.ElemContainer();a.jqplot.BlockCanvas.prototype.constructor=a.jqplot.BlockCanvas;a.jqplot.BlockCanvas.prototype.createElement=function(i,e,c){this._offsets=i;var b="jqplot-blockCanvas";if(e!=undefined){b=e}var g;if(this._elem){g=this._elem.get(0)}else{g=document.createElement("div")}if(c!=undefined){this._plotDimensions=c}var d=this._plotDimensions.width-this._offsets.left-this._offsets.right+"px";var f=this._plotDimensions.height-this._offsets.top-this._offsets.bottom+"px";this._elem=a(g);this._elem.css({position:"absolute",width:d,height:f,left:this._offsets.left,top:this._offsets.top});this._elem.addClass(b);return this._elem};a.jqplot.BlockCanvas.prototype.setContext=function(){this._ctx={canvas:{width:0,height:0},clearRect:function(){return null}};return this._ctx}})(jQuery);
|
||||||
@@ -0,0 +1,759 @@
|
|||||||
|
/**
|
||||||
|
* jqPlot
|
||||||
|
* Pure JavaScript plotting plugin using jQuery
|
||||||
|
*
|
||||||
|
* Version: 1.0.8
|
||||||
|
* Revision: 1250
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009-2013 Chris Leonello
|
||||||
|
* jqPlot is currently available for use in all personal or commercial projects
|
||||||
|
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||||
|
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||||
|
* choose the license that best suits your project and use it accordingly.
|
||||||
|
*
|
||||||
|
* Although not required, the author would appreciate an email letting him
|
||||||
|
* know of any substantial use of jqPlot. You can reach the author at:
|
||||||
|
* chris at jqplot dot com or see http://www.jqplot.com/info.php .
|
||||||
|
*
|
||||||
|
* If you are feeling kind and generous, consider supporting the project by
|
||||||
|
* making a donation at: http://www.jqplot.com/donate.php .
|
||||||
|
*
|
||||||
|
* sprintf functions contained in jqplot.sprintf.js by Ash Searle:
|
||||||
|
*
|
||||||
|
* version 2007.04.27
|
||||||
|
* author Ash Searle
|
||||||
|
* http://hexmen.com/blog/2007/03/printf-sprintf/
|
||||||
|
* http://hexmen.com/js/sprintf.js
|
||||||
|
* The author (Ash Searle) has placed this code in the public domain:
|
||||||
|
* "This code is unrestricted: you are free to use it however you like."
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
(function($) {
|
||||||
|
var arrayMax = function( array ){
|
||||||
|
return Math.max.apply( Math, array );
|
||||||
|
};
|
||||||
|
var arrayMin = function( array ){
|
||||||
|
return Math.min.apply( Math, array );
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class: $.jqplot.BubbleRenderer
|
||||||
|
* Plugin renderer to draw a bubble chart. A Bubble chart has data points displayed as
|
||||||
|
* colored circles with an optional text label inside. To use
|
||||||
|
* the bubble renderer, you must include the bubble renderer like:
|
||||||
|
*
|
||||||
|
* > <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.bubbleRenderer.js"></script>
|
||||||
|
*
|
||||||
|
* Data must be supplied in
|
||||||
|
* the form:
|
||||||
|
*
|
||||||
|
* > [[x1, y1, r1, <label or {label:'text', color:color}>], ...]
|
||||||
|
*
|
||||||
|
* where the label or options
|
||||||
|
* object is optional.
|
||||||
|
*
|
||||||
|
* Note that all bubble colors will be the same
|
||||||
|
* unless the "varyBubbleColors" option is set to true. Colors can be specified in the data array
|
||||||
|
* or in the seriesColors array option on the series. If no colors are defined, the default jqPlot
|
||||||
|
* series of 16 colors are used. Colors are automatically cycled around again if there are more
|
||||||
|
* bubbles than colors.
|
||||||
|
*
|
||||||
|
* Bubbles are autoscaled by default to fit within the chart area while maintaining
|
||||||
|
* relative sizes. If the "autoscaleBubbles" option is set to false, the r(adius) values
|
||||||
|
* in the data array a treated as literal pixel values for the radii of the bubbles.
|
||||||
|
*
|
||||||
|
* Properties are passed into the bubble renderer in the rendererOptions object of
|
||||||
|
* the series options like:
|
||||||
|
*
|
||||||
|
* > seriesDefaults: {
|
||||||
|
* > renderer: $.jqplot.BubbleRenderer,
|
||||||
|
* > rendererOptions: {
|
||||||
|
* > bubbleAlpha: 0.7,
|
||||||
|
* > varyBubbleColors: false
|
||||||
|
* > }
|
||||||
|
* > }
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
$.jqplot.BubbleRenderer = function(){
|
||||||
|
$.jqplot.LineRenderer.call(this);
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BubbleRenderer.prototype = new $.jqplot.LineRenderer();
|
||||||
|
$.jqplot.BubbleRenderer.prototype.constructor = $.jqplot.BubbleRenderer;
|
||||||
|
|
||||||
|
// called with scope of a series
|
||||||
|
$.jqplot.BubbleRenderer.prototype.init = function(options, plot) {
|
||||||
|
// Group: Properties
|
||||||
|
//
|
||||||
|
// prop: varyBubbleColors
|
||||||
|
// True to vary the color of each bubble in this series according to
|
||||||
|
// the seriesColors array. False to set each bubble to the color
|
||||||
|
// specified on this series. This has no effect if a css background color
|
||||||
|
// option is specified in the renderer css options.
|
||||||
|
this.varyBubbleColors = true;
|
||||||
|
// prop: autoscaleBubbles
|
||||||
|
// True to scale the bubble radius based on plot size.
|
||||||
|
// False will use the radius value as provided as a raw pixel value for
|
||||||
|
// bubble radius.
|
||||||
|
this.autoscaleBubbles = true;
|
||||||
|
// prop: autoscaleMultiplier
|
||||||
|
// Multiplier the bubble size if autoscaleBubbles is true.
|
||||||
|
this.autoscaleMultiplier = 1.0;
|
||||||
|
// prop: autoscalePointsFactor
|
||||||
|
// Factor which decreases bubble size based on how many bubbles on on the chart.
|
||||||
|
// 0 means no adjustment for number of bubbles. Negative values will decrease
|
||||||
|
// size of bubbles as more bubbles are added. Values between 0 and -0.2
|
||||||
|
// should work well.
|
||||||
|
this.autoscalePointsFactor = -0.07;
|
||||||
|
// prop: escapeHtml
|
||||||
|
// True to escape html in bubble label text.
|
||||||
|
this.escapeHtml = true;
|
||||||
|
// prop: highlightMouseOver
|
||||||
|
// True to highlight bubbles when moused over.
|
||||||
|
// This must be false to enable highlightMouseDown to highlight when clicking on a slice.
|
||||||
|
this.highlightMouseOver = true;
|
||||||
|
// prop: highlightMouseDown
|
||||||
|
// True to highlight when a mouse button is pressed over a bubble.
|
||||||
|
// This will be disabled if highlightMouseOver is true.
|
||||||
|
this.highlightMouseDown = false;
|
||||||
|
// prop: highlightColors
|
||||||
|
// An array of colors to use when highlighting a slice. Calculated automatically
|
||||||
|
// if not supplied.
|
||||||
|
this.highlightColors = [];
|
||||||
|
// prop: bubbleAlpha
|
||||||
|
// Alpha transparency to apply to all bubbles in this series.
|
||||||
|
this.bubbleAlpha = 1.0;
|
||||||
|
// prop: highlightAlpha
|
||||||
|
// Alpha transparency to apply when highlighting bubble.
|
||||||
|
// Set to value of bubbleAlpha by default.
|
||||||
|
this.highlightAlpha = null;
|
||||||
|
// prop: bubbleGradients
|
||||||
|
// True to color the bubbles with gradient fills instead of flat colors.
|
||||||
|
// NOT AVAILABLE IN IE due to lack of excanvas support for radial gradient fills.
|
||||||
|
// will be ignored in IE.
|
||||||
|
this.bubbleGradients = false;
|
||||||
|
// prop: showLabels
|
||||||
|
// True to show labels on bubbles (if any), false to not show.
|
||||||
|
this.showLabels = true;
|
||||||
|
// array of [point index, radius] which will be sorted in descending order to plot
|
||||||
|
// largest points below smaller points.
|
||||||
|
this.radii = [];
|
||||||
|
this.maxRadius = 0;
|
||||||
|
// index of the currenty highlighted point, if any
|
||||||
|
this._highlightedPoint = null;
|
||||||
|
// array of jQuery labels.
|
||||||
|
this.labels = [];
|
||||||
|
this.bubbleCanvases = [];
|
||||||
|
this._type = 'bubble';
|
||||||
|
|
||||||
|
// if user has passed in highlightMouseDown option and not set highlightMouseOver, disable highlightMouseOver
|
||||||
|
if (options.highlightMouseDown && options.highlightMouseOver == null) {
|
||||||
|
options.highlightMouseOver = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.extend(true, this, options);
|
||||||
|
|
||||||
|
if (this.highlightAlpha == null) {
|
||||||
|
this.highlightAlpha = this.bubbleAlpha;
|
||||||
|
if (this.bubbleGradients) {
|
||||||
|
this.highlightAlpha = 0.35;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.autoscaleMultiplier = this.autoscaleMultiplier * Math.pow(this.data.length, this.autoscalePointsFactor);
|
||||||
|
|
||||||
|
// index of the currenty highlighted point, if any
|
||||||
|
this._highlightedPoint = null;
|
||||||
|
|
||||||
|
// adjust the series colors for options colors passed in with data or for alpha.
|
||||||
|
// note, this can leave undefined holes in the seriesColors array.
|
||||||
|
var comps;
|
||||||
|
for (var i=0; i<this.data.length; i++) {
|
||||||
|
var color = null;
|
||||||
|
var d = this.data[i];
|
||||||
|
this.maxRadius = Math.max(this.maxRadius, d[2]);
|
||||||
|
if (d[3]) {
|
||||||
|
if (typeof(d[3]) == 'object') {
|
||||||
|
color = d[3]['color'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (color == null) {
|
||||||
|
if (this.seriesColors[i] != null) {
|
||||||
|
color = this.seriesColors[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (color && this.bubbleAlpha < 1.0) {
|
||||||
|
comps = $.jqplot.getColorComponents(color);
|
||||||
|
color = 'rgba('+comps[0]+', '+comps[1]+', '+comps[2]+', '+this.bubbleAlpha+')';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (color) {
|
||||||
|
this.seriesColors[i] = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.varyBubbleColors) {
|
||||||
|
this.seriesColors = [this.color];
|
||||||
|
}
|
||||||
|
|
||||||
|
this.colorGenerator = new $.jqplot.ColorGenerator(this.seriesColors);
|
||||||
|
|
||||||
|
// set highlight colors if none provided
|
||||||
|
if (this.highlightColors.length == 0) {
|
||||||
|
for (var i=0; i<this.seriesColors.length; i++){
|
||||||
|
var rgba = $.jqplot.getColorComponents(this.seriesColors[i]);
|
||||||
|
var newrgb = [rgba[0], rgba[1], rgba[2]];
|
||||||
|
var sum = newrgb[0] + newrgb[1] + newrgb[2];
|
||||||
|
for (var j=0; j<3; j++) {
|
||||||
|
// when darkening, lowest color component can be is 60.
|
||||||
|
newrgb[j] = (sum > 570) ? newrgb[j] * 0.8 : newrgb[j] + 0.3 * (255 - newrgb[j]);
|
||||||
|
newrgb[j] = parseInt(newrgb[j], 10);
|
||||||
|
}
|
||||||
|
this.highlightColors.push('rgba('+newrgb[0]+','+newrgb[1]+','+newrgb[2]+', '+this.highlightAlpha+')');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.highlightColorGenerator = new $.jqplot.ColorGenerator(this.highlightColors);
|
||||||
|
|
||||||
|
var sopts = {fill:true, isarc:true, angle:this.shadowAngle, alpha:this.shadowAlpha, closePath:true};
|
||||||
|
|
||||||
|
this.renderer.shadowRenderer.init(sopts);
|
||||||
|
|
||||||
|
this.canvas = new $.jqplot.DivCanvas();
|
||||||
|
this.canvas._plotDimensions = this._plotDimensions;
|
||||||
|
|
||||||
|
plot.eventListenerHooks.addOnce('jqplotMouseMove', handleMove);
|
||||||
|
plot.eventListenerHooks.addOnce('jqplotMouseDown', handleMouseDown);
|
||||||
|
plot.eventListenerHooks.addOnce('jqplotMouseUp', handleMouseUp);
|
||||||
|
plot.eventListenerHooks.addOnce('jqplotClick', handleClick);
|
||||||
|
plot.eventListenerHooks.addOnce('jqplotRightClick', handleRightClick);
|
||||||
|
plot.postDrawHooks.addOnce(postPlotDraw);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// converts the user data values to grid coordinates and stores them
|
||||||
|
// in the gridData array.
|
||||||
|
// Called with scope of a series.
|
||||||
|
$.jqplot.BubbleRenderer.prototype.setGridData = function(plot) {
|
||||||
|
// recalculate the grid data
|
||||||
|
var xp = this._xaxis.series_u2p;
|
||||||
|
var yp = this._yaxis.series_u2p;
|
||||||
|
var data = this._plotData;
|
||||||
|
this.gridData = [];
|
||||||
|
var radii = [];
|
||||||
|
this.radii = [];
|
||||||
|
var dim = Math.min(plot._height, plot._width);
|
||||||
|
for (var i=0; i<this.data.length; i++) {
|
||||||
|
if (data[i] != null) {
|
||||||
|
this.gridData.push([xp.call(this._xaxis, data[i][0]), yp.call(this._yaxis, data[i][1]), data[i][2]]);
|
||||||
|
this.radii.push([i, data[i][2]]);
|
||||||
|
radii.push(data[i][2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var r, val, maxr = this.maxRadius = arrayMax(radii);
|
||||||
|
var l = this.gridData.length;
|
||||||
|
if (this.autoscaleBubbles) {
|
||||||
|
for (var i=0; i<l; i++) {
|
||||||
|
val = radii[i]/maxr;
|
||||||
|
r = this.autoscaleMultiplier * dim / 6;
|
||||||
|
this.gridData[i][2] = r * val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.radii.sort(function(a, b) { return b[1] - a[1]; });
|
||||||
|
};
|
||||||
|
|
||||||
|
// converts any arbitrary data values to grid coordinates and
|
||||||
|
// returns them. This method exists so that plugins can use a series'
|
||||||
|
// linerenderer to generate grid data points without overwriting the
|
||||||
|
// grid data associated with that series.
|
||||||
|
// Called with scope of a series.
|
||||||
|
$.jqplot.BubbleRenderer.prototype.makeGridData = function(data, plot) {
|
||||||
|
// recalculate the grid data
|
||||||
|
var xp = this._xaxis.series_u2p;
|
||||||
|
var yp = this._yaxis.series_u2p;
|
||||||
|
var gd = [];
|
||||||
|
var radii = [];
|
||||||
|
this.radii = [];
|
||||||
|
var dim = Math.min(plot._height, plot._width);
|
||||||
|
for (var i=0; i<data.length; i++) {
|
||||||
|
if (data[i] != null) {
|
||||||
|
gd.push([xp.call(this._xaxis, data[i][0]), yp.call(this._yaxis, data[i][1]), data[i][2]]);
|
||||||
|
radii.push(data[i][2]);
|
||||||
|
this.radii.push([i, data[i][2]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var r, val, maxr = this.maxRadius = arrayMax(radii);
|
||||||
|
var l = this.gridData.length;
|
||||||
|
if (this.autoscaleBubbles) {
|
||||||
|
for (var i=0; i<l; i++) {
|
||||||
|
val = radii[i]/maxr;
|
||||||
|
r = this.autoscaleMultiplier * dim / 6;
|
||||||
|
gd[i][2] = r * val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.radii.sort(function(a, b) { return b[1] - a[1]; });
|
||||||
|
return gd;
|
||||||
|
};
|
||||||
|
|
||||||
|
// called with scope of series
|
||||||
|
$.jqplot.BubbleRenderer.prototype.draw = function (ctx, gd, options) {
|
||||||
|
if (this.plugins.pointLabels) {
|
||||||
|
this.plugins.pointLabels.show = false;
|
||||||
|
}
|
||||||
|
var opts = (options != undefined) ? options : {};
|
||||||
|
var shadow = (opts.shadow != undefined) ? opts.shadow : this.shadow;
|
||||||
|
this.canvas._elem.empty();
|
||||||
|
for (var i=0; i<this.radii.length; i++) {
|
||||||
|
var idx = this.radii[i][0];
|
||||||
|
var t=null;
|
||||||
|
var color = null;
|
||||||
|
var el = null;
|
||||||
|
var tel = null;
|
||||||
|
var d = this.data[idx];
|
||||||
|
var gd = this.gridData[idx];
|
||||||
|
if (d[3]) {
|
||||||
|
if (typeof(d[3]) == 'object') {
|
||||||
|
t = d[3]['label'];
|
||||||
|
}
|
||||||
|
else if (typeof(d[3]) == 'string') {
|
||||||
|
t = d[3];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// color = (this.varyBubbleColors) ? this.colorGenerator.get(idx) : this.color;
|
||||||
|
color = this.colorGenerator.get(idx);
|
||||||
|
|
||||||
|
// If we're drawing a shadow, expand the canvas dimensions to accomodate.
|
||||||
|
var canvasRadius = gd[2];
|
||||||
|
var offset, depth;
|
||||||
|
if (this.shadow) {
|
||||||
|
offset = (0.7 + gd[2]/40).toFixed(1);
|
||||||
|
depth = 1 + Math.ceil(gd[2]/15);
|
||||||
|
canvasRadius += offset*depth;
|
||||||
|
}
|
||||||
|
this.bubbleCanvases[idx] = new $.jqplot.BubbleCanvas();
|
||||||
|
this.canvas._elem.append(this.bubbleCanvases[idx].createElement(gd[0], gd[1], canvasRadius));
|
||||||
|
this.bubbleCanvases[idx].setContext();
|
||||||
|
var ctx = this.bubbleCanvases[idx]._ctx;
|
||||||
|
var x = ctx.canvas.width/2;
|
||||||
|
var y = ctx.canvas.height/2;
|
||||||
|
if (this.shadow) {
|
||||||
|
this.renderer.shadowRenderer.draw(ctx, [x, y, gd[2], 0, 2*Math.PI], {offset: offset, depth: depth});
|
||||||
|
}
|
||||||
|
this.bubbleCanvases[idx].draw(gd[2], color, this.bubbleGradients, this.shadowAngle/180*Math.PI);
|
||||||
|
|
||||||
|
// now draw label.
|
||||||
|
if (t && this.showLabels) {
|
||||||
|
tel = $('<div style="position:absolute;" class="jqplot-bubble-label"></div>');
|
||||||
|
if (this.escapeHtml) {
|
||||||
|
tel.text(t);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tel.html(t);
|
||||||
|
}
|
||||||
|
this.canvas._elem.append(tel);
|
||||||
|
var h = $(tel).outerHeight();
|
||||||
|
var w = $(tel).outerWidth();
|
||||||
|
var top = gd[1] - 0.5*h;
|
||||||
|
var left = gd[0] - 0.5*w;
|
||||||
|
tel.css({top: top, left: left});
|
||||||
|
this.labels[idx] = $(tel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
$.jqplot.DivCanvas = function() {
|
||||||
|
$.jqplot.ElemContainer.call(this);
|
||||||
|
this._ctx;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.DivCanvas.prototype = new $.jqplot.ElemContainer();
|
||||||
|
$.jqplot.DivCanvas.prototype.constructor = $.jqplot.DivCanvas;
|
||||||
|
|
||||||
|
$.jqplot.DivCanvas.prototype.createElement = function(offsets, clss, plotDimensions) {
|
||||||
|
this._offsets = offsets;
|
||||||
|
var klass = 'jqplot-DivCanvas';
|
||||||
|
if (clss != undefined) {
|
||||||
|
klass = clss;
|
||||||
|
}
|
||||||
|
var elem;
|
||||||
|
// if this canvas already has a dom element, don't make a new one.
|
||||||
|
if (this._elem) {
|
||||||
|
elem = this._elem.get(0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
elem = document.createElement('div');
|
||||||
|
}
|
||||||
|
// if new plotDimensions supplied, use them.
|
||||||
|
if (plotDimensions != undefined) {
|
||||||
|
this._plotDimensions = plotDimensions;
|
||||||
|
}
|
||||||
|
|
||||||
|
var w = this._plotDimensions.width - this._offsets.left - this._offsets.right + 'px';
|
||||||
|
var h = this._plotDimensions.height - this._offsets.top - this._offsets.bottom + 'px';
|
||||||
|
this._elem = $(elem);
|
||||||
|
this._elem.css({ position: 'absolute', width:w, height:h, left: this._offsets.left, top: this._offsets.top });
|
||||||
|
|
||||||
|
this._elem.addClass(klass);
|
||||||
|
return this._elem;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.DivCanvas.prototype.setContext = function() {
|
||||||
|
this._ctx = {
|
||||||
|
canvas:{
|
||||||
|
width:0,
|
||||||
|
height:0
|
||||||
|
},
|
||||||
|
clearRect:function(){return null;}
|
||||||
|
};
|
||||||
|
return this._ctx;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BubbleCanvas = function() {
|
||||||
|
$.jqplot.ElemContainer.call(this);
|
||||||
|
this._ctx;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BubbleCanvas.prototype = new $.jqplot.ElemContainer();
|
||||||
|
$.jqplot.BubbleCanvas.prototype.constructor = $.jqplot.BubbleCanvas;
|
||||||
|
|
||||||
|
// initialize with the x,y pont of bubble center and the bubble radius.
|
||||||
|
$.jqplot.BubbleCanvas.prototype.createElement = function(x, y, r) {
|
||||||
|
var klass = 'jqplot-bubble-point';
|
||||||
|
|
||||||
|
var elem;
|
||||||
|
// if this canvas already has a dom element, don't make a new one.
|
||||||
|
if (this._elem) {
|
||||||
|
elem = this._elem.get(0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
elem = document.createElement('canvas');
|
||||||
|
}
|
||||||
|
|
||||||
|
elem.width = (r != null) ? 2*r : elem.width;
|
||||||
|
elem.height = (r != null) ? 2*r : elem.height;
|
||||||
|
this._elem = $(elem);
|
||||||
|
var l = (x != null && r != null) ? x - r : this._elem.css('left');
|
||||||
|
var t = (y != null && r != null) ? y - r : this._elem.css('top');
|
||||||
|
this._elem.css({ position: 'absolute', left: l, top: t });
|
||||||
|
|
||||||
|
this._elem.addClass(klass);
|
||||||
|
if ($.jqplot.use_excanvas) {
|
||||||
|
window.G_vmlCanvasManager.init_(document);
|
||||||
|
elem = window.G_vmlCanvasManager.initElement(elem);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this._elem;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BubbleCanvas.prototype.draw = function(r, color, gradients, angle) {
|
||||||
|
var ctx = this._ctx;
|
||||||
|
// r = Math.floor(r*1.04);
|
||||||
|
// var x = Math.round(ctx.canvas.width/2);
|
||||||
|
// var y = Math.round(ctx.canvas.height/2);
|
||||||
|
var x = ctx.canvas.width/2;
|
||||||
|
var y = ctx.canvas.height/2;
|
||||||
|
ctx.save();
|
||||||
|
if (gradients && !$.jqplot.use_excanvas) {
|
||||||
|
r = r*1.04;
|
||||||
|
var comps = $.jqplot.getColorComponents(color);
|
||||||
|
var colorinner = 'rgba('+Math.round(comps[0]+0.8*(255-comps[0]))+', '+Math.round(comps[1]+0.8*(255-comps[1]))+', '+Math.round(comps[2]+0.8*(255-comps[2]))+', '+comps[3]+')';
|
||||||
|
var colorend = 'rgba('+comps[0]+', '+comps[1]+', '+comps[2]+', 0)';
|
||||||
|
// var rinner = Math.round(0.35 * r);
|
||||||
|
// var xinner = Math.round(x - Math.cos(angle) * 0.33 * r);
|
||||||
|
// var yinner = Math.round(y - Math.sin(angle) * 0.33 * r);
|
||||||
|
var rinner = 0.35 * r;
|
||||||
|
var xinner = x - Math.cos(angle) * 0.33 * r;
|
||||||
|
var yinner = y - Math.sin(angle) * 0.33 * r;
|
||||||
|
var radgrad = ctx.createRadialGradient(xinner, yinner, rinner, x, y, r);
|
||||||
|
radgrad.addColorStop(0, colorinner);
|
||||||
|
radgrad.addColorStop(0.93, color);
|
||||||
|
radgrad.addColorStop(0.96, colorend);
|
||||||
|
radgrad.addColorStop(1, colorend);
|
||||||
|
// radgrad.addColorStop(.98, colorend);
|
||||||
|
ctx.fillStyle = radgrad;
|
||||||
|
ctx.fillRect(0,0, ctx.canvas.width, ctx.canvas.height);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ctx.fillStyle = color;
|
||||||
|
ctx.strokeStyle = color;
|
||||||
|
ctx.lineWidth = 1;
|
||||||
|
ctx.beginPath();
|
||||||
|
var ang = 2*Math.PI;
|
||||||
|
ctx.arc(x, y, r, 0, ang, 0);
|
||||||
|
ctx.closePath();
|
||||||
|
ctx.fill();
|
||||||
|
}
|
||||||
|
ctx.restore();
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BubbleCanvas.prototype.setContext = function() {
|
||||||
|
this._ctx = this._elem.get(0).getContext("2d");
|
||||||
|
return this._ctx;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BubbleAxisRenderer = function() {
|
||||||
|
$.jqplot.LinearAxisRenderer.call(this);
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.BubbleAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer();
|
||||||
|
$.jqplot.BubbleAxisRenderer.prototype.constructor = $.jqplot.BubbleAxisRenderer;
|
||||||
|
|
||||||
|
// called with scope of axis object.
|
||||||
|
$.jqplot.BubbleAxisRenderer.prototype.init = function(options){
|
||||||
|
$.extend(true, this, options);
|
||||||
|
var db = this._dataBounds;
|
||||||
|
var minsidx = 0,
|
||||||
|
minpidx = 0,
|
||||||
|
maxsidx = 0,
|
||||||
|
maxpidx = 0,
|
||||||
|
maxr = 0,
|
||||||
|
minr = 0,
|
||||||
|
minMaxRadius = 0,
|
||||||
|
maxMaxRadius = 0,
|
||||||
|
maxMult = 0,
|
||||||
|
minMult = 0;
|
||||||
|
// Go through all the series attached to this axis and find
|
||||||
|
// the min/max bounds for this axis.
|
||||||
|
for (var i=0; i<this._series.length; i++) {
|
||||||
|
var s = this._series[i];
|
||||||
|
var d = s._plotData;
|
||||||
|
|
||||||
|
for (var j=0; j<d.length; j++) {
|
||||||
|
if (this.name == 'xaxis' || this.name == 'x2axis') {
|
||||||
|
if (d[j][0] < db.min || db.min == null) {
|
||||||
|
db.min = d[j][0];
|
||||||
|
minsidx=i;
|
||||||
|
minpidx=j;
|
||||||
|
minr = d[j][2];
|
||||||
|
minMaxRadius = s.maxRadius;
|
||||||
|
minMult = s.autoscaleMultiplier;
|
||||||
|
}
|
||||||
|
if (d[j][0] > db.max || db.max == null) {
|
||||||
|
db.max = d[j][0];
|
||||||
|
maxsidx=i;
|
||||||
|
maxpidx=j;
|
||||||
|
maxr = d[j][2];
|
||||||
|
maxMaxRadius = s.maxRadius;
|
||||||
|
maxMult = s.autoscaleMultiplier;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (d[j][1] < db.min || db.min == null) {
|
||||||
|
db.min = d[j][1];
|
||||||
|
minsidx=i;
|
||||||
|
minpidx=j;
|
||||||
|
minr = d[j][2];
|
||||||
|
minMaxRadius = s.maxRadius;
|
||||||
|
minMult = s.autoscaleMultiplier;
|
||||||
|
}
|
||||||
|
if (d[j][1] > db.max || db.max == null) {
|
||||||
|
db.max = d[j][1];
|
||||||
|
maxsidx=i;
|
||||||
|
maxpidx=j;
|
||||||
|
maxr = d[j][2];
|
||||||
|
maxMaxRadius = s.maxRadius;
|
||||||
|
maxMult = s.autoscaleMultiplier;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var minRatio = minr/minMaxRadius;
|
||||||
|
var maxRatio = maxr/maxMaxRadius;
|
||||||
|
|
||||||
|
// need to estimate the effect of the radius on total axis span and adjust axis accordingly.
|
||||||
|
var span = db.max - db.min;
|
||||||
|
// var dim = (this.name == 'xaxis' || this.name == 'x2axis') ? this._plotDimensions.width : this._plotDimensions.height;
|
||||||
|
var dim = Math.min(this._plotDimensions.width, this._plotDimensions.height);
|
||||||
|
|
||||||
|
var minfact = minRatio * minMult/3 * span;
|
||||||
|
var maxfact = maxRatio * maxMult/3 * span;
|
||||||
|
db.max += maxfact;
|
||||||
|
db.min -= minfact;
|
||||||
|
};
|
||||||
|
|
||||||
|
function highlight (plot, sidx, pidx) {
|
||||||
|
plot.plugins.bubbleRenderer.highlightLabelCanvas.empty();
|
||||||
|
var s = plot.series[sidx];
|
||||||
|
var canvas = plot.plugins.bubbleRenderer.highlightCanvas;
|
||||||
|
var ctx = canvas._ctx;
|
||||||
|
ctx.clearRect(0,0,ctx.canvas.width, ctx.canvas.height);
|
||||||
|
s._highlightedPoint = pidx;
|
||||||
|
plot.plugins.bubbleRenderer.highlightedSeriesIndex = sidx;
|
||||||
|
|
||||||
|
var color = s.highlightColorGenerator.get(pidx);
|
||||||
|
var x = s.gridData[pidx][0],
|
||||||
|
y = s.gridData[pidx][1],
|
||||||
|
r = s.gridData[pidx][2];
|
||||||
|
ctx.save();
|
||||||
|
ctx.fillStyle = color;
|
||||||
|
ctx.strokeStyle = color;
|
||||||
|
ctx.lineWidth = 1;
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.arc(x, y, r, 0, 2*Math.PI, 0);
|
||||||
|
ctx.closePath();
|
||||||
|
ctx.fill();
|
||||||
|
ctx.restore();
|
||||||
|
// bring label to front
|
||||||
|
if (s.labels[pidx]) {
|
||||||
|
plot.plugins.bubbleRenderer.highlightLabel = s.labels[pidx].clone();
|
||||||
|
plot.plugins.bubbleRenderer.highlightLabel.appendTo(plot.plugins.bubbleRenderer.highlightLabelCanvas);
|
||||||
|
plot.plugins.bubbleRenderer.highlightLabel.addClass('jqplot-bubble-label-highlight');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function unhighlight (plot) {
|
||||||
|
var canvas = plot.plugins.bubbleRenderer.highlightCanvas;
|
||||||
|
var sidx = plot.plugins.bubbleRenderer.highlightedSeriesIndex;
|
||||||
|
plot.plugins.bubbleRenderer.highlightLabelCanvas.empty();
|
||||||
|
canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height);
|
||||||
|
for (var i=0; i<plot.series.length; i++) {
|
||||||
|
plot.series[i]._highlightedPoint = null;
|
||||||
|
}
|
||||||
|
plot.plugins.bubbleRenderer.highlightedSeriesIndex = null;
|
||||||
|
plot.target.trigger('jqplotDataUnhighlight');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function handleMove(ev, gridpos, datapos, neighbor, plot) {
|
||||||
|
if (neighbor) {
|
||||||
|
var si = neighbor.seriesIndex;
|
||||||
|
var pi = neighbor.pointIndex;
|
||||||
|
var ins = [si, pi, neighbor.data, plot.series[si].gridData[pi][2]];
|
||||||
|
var evt1 = jQuery.Event('jqplotDataMouseOver');
|
||||||
|
evt1.pageX = ev.pageX;
|
||||||
|
evt1.pageY = ev.pageY;
|
||||||
|
plot.target.trigger(evt1, ins);
|
||||||
|
if (plot.series[ins[0]].highlightMouseOver && !(ins[0] == plot.plugins.bubbleRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
|
||||||
|
var evt = jQuery.Event('jqplotDataHighlight');
|
||||||
|
evt.which = ev.which;
|
||||||
|
evt.pageX = ev.pageX;
|
||||||
|
evt.pageY = ev.pageY;
|
||||||
|
plot.target.trigger(evt, ins);
|
||||||
|
highlight (plot, ins[0], ins[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (neighbor == null) {
|
||||||
|
unhighlight (plot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleMouseDown(ev, gridpos, datapos, neighbor, plot) {
|
||||||
|
if (neighbor) {
|
||||||
|
var si = neighbor.seriesIndex;
|
||||||
|
var pi = neighbor.pointIndex;
|
||||||
|
var ins = [si, pi, neighbor.data, plot.series[si].gridData[pi][2]];
|
||||||
|
if (plot.series[ins[0]].highlightMouseDown && !(ins[0] == plot.plugins.bubbleRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
|
||||||
|
var evt = jQuery.Event('jqplotDataHighlight');
|
||||||
|
evt.which = ev.which;
|
||||||
|
evt.pageX = ev.pageX;
|
||||||
|
evt.pageY = ev.pageY;
|
||||||
|
plot.target.trigger(evt, ins);
|
||||||
|
highlight (plot, ins[0], ins[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (neighbor == null) {
|
||||||
|
unhighlight (plot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleMouseUp(ev, gridpos, datapos, neighbor, plot) {
|
||||||
|
var idx = plot.plugins.bubbleRenderer.highlightedSeriesIndex;
|
||||||
|
if (idx != null && plot.series[idx].highlightMouseDown) {
|
||||||
|
unhighlight(plot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleClick(ev, gridpos, datapos, neighbor, plot) {
|
||||||
|
if (neighbor) {
|
||||||
|
var si = neighbor.seriesIndex;
|
||||||
|
var pi = neighbor.pointIndex;
|
||||||
|
var ins = [si, pi, neighbor.data, plot.series[si].gridData[pi][2]];
|
||||||
|
var evt = jQuery.Event('jqplotDataClick');
|
||||||
|
evt.which = ev.which;
|
||||||
|
evt.pageX = ev.pageX;
|
||||||
|
evt.pageY = ev.pageY;
|
||||||
|
plot.target.trigger(evt, ins);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleRightClick(ev, gridpos, datapos, neighbor, plot) {
|
||||||
|
if (neighbor) {
|
||||||
|
var si = neighbor.seriesIndex;
|
||||||
|
var pi = neighbor.pointIndex;
|
||||||
|
var ins = [si, pi, neighbor.data, plot.series[si].gridData[pi][2]];
|
||||||
|
var idx = plot.plugins.bubbleRenderer.highlightedSeriesIndex;
|
||||||
|
if (idx != null && plot.series[idx].highlightMouseDown) {
|
||||||
|
unhighlight(plot);
|
||||||
|
}
|
||||||
|
var evt = jQuery.Event('jqplotDataRightClick');
|
||||||
|
evt.which = ev.which;
|
||||||
|
evt.pageX = ev.pageX;
|
||||||
|
evt.pageY = ev.pageY;
|
||||||
|
plot.target.trigger(evt, ins);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// called within context of plot
|
||||||
|
// create a canvas which we can draw on.
|
||||||
|
// insert it before the eventCanvas, so eventCanvas will still capture events.
|
||||||
|
function postPlotDraw() {
|
||||||
|
// Memory Leaks patch
|
||||||
|
if (this.plugins.bubbleRenderer && this.plugins.bubbleRenderer.highlightCanvas) {
|
||||||
|
this.plugins.bubbleRenderer.highlightCanvas.resetCanvas();
|
||||||
|
this.plugins.bubbleRenderer.highlightCanvas = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.plugins.bubbleRenderer = {highlightedSeriesIndex:null};
|
||||||
|
this.plugins.bubbleRenderer.highlightCanvas = new $.jqplot.GenericCanvas();
|
||||||
|
this.plugins.bubbleRenderer.highlightLabel = null;
|
||||||
|
this.plugins.bubbleRenderer.highlightLabelCanvas = $('<div style="position:absolute;"></div>');
|
||||||
|
var top = this._gridPadding.top;
|
||||||
|
var left = this._gridPadding.left;
|
||||||
|
var width = this._plotDimensions.width - this._gridPadding.left - this._gridPadding.right;
|
||||||
|
var height = this._plotDimensions.height - this._gridPadding.top - this._gridPadding.bottom;
|
||||||
|
this.plugins.bubbleRenderer.highlightLabelCanvas.css({top:top, left:left, width:width+'px', height:height+'px'});
|
||||||
|
|
||||||
|
this.eventCanvas._elem.before(this.plugins.bubbleRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-bubbleRenderer-highlight-canvas', this._plotDimensions, this));
|
||||||
|
this.eventCanvas._elem.before(this.plugins.bubbleRenderer.highlightLabelCanvas);
|
||||||
|
|
||||||
|
var hctx = this.plugins.bubbleRenderer.highlightCanvas.setContext();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// setup default renderers for axes and legend so user doesn't have to
|
||||||
|
// called with scope of plot
|
||||||
|
function preInit(target, data, options) {
|
||||||
|
options = options || {};
|
||||||
|
options.axesDefaults = options.axesDefaults || {};
|
||||||
|
options.seriesDefaults = options.seriesDefaults || {};
|
||||||
|
// only set these if there is a Bubble series
|
||||||
|
var setopts = false;
|
||||||
|
if (options.seriesDefaults.renderer == $.jqplot.BubbleRenderer) {
|
||||||
|
setopts = true;
|
||||||
|
}
|
||||||
|
else if (options.series) {
|
||||||
|
for (var i=0; i < options.series.length; i++) {
|
||||||
|
if (options.series[i].renderer == $.jqplot.BubbleRenderer) {
|
||||||
|
setopts = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (setopts) {
|
||||||
|
options.axesDefaults.renderer = $.jqplot.BubbleAxisRenderer;
|
||||||
|
options.sortData = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$.jqplot.preInitHooks.push(preInit);
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
|
||||||
|
jsDate | (c) 2010-2013 Chris Leonello
|
||||||
|
*/(function(f){var d=function(m){return Math.max.apply(Math,m)};var j=function(m){return Math.min.apply(Math,m)};f.jqplot.BubbleRenderer=function(){f.jqplot.LineRenderer.call(this)};f.jqplot.BubbleRenderer.prototype=new f.jqplot.LineRenderer();f.jqplot.BubbleRenderer.prototype.constructor=f.jqplot.BubbleRenderer;f.jqplot.BubbleRenderer.prototype.init=function(w,t){this.varyBubbleColors=true;this.autoscaleBubbles=true;this.autoscaleMultiplier=1;this.autoscalePointsFactor=-0.07;this.escapeHtml=true;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.bubbleAlpha=1;this.highlightAlpha=null;this.bubbleGradients=false;this.showLabels=true;this.radii=[];this.maxRadius=0;this._highlightedPoint=null;this.labels=[];this.bubbleCanvases=[];this._type="bubble";if(w.highlightMouseDown&&w.highlightMouseOver==null){w.highlightMouseOver=false}f.extend(true,this,w);if(this.highlightAlpha==null){this.highlightAlpha=this.bubbleAlpha;if(this.bubbleGradients){this.highlightAlpha=0.35}}this.autoscaleMultiplier=this.autoscaleMultiplier*Math.pow(this.data.length,this.autoscalePointsFactor);this._highlightedPoint=null;var n;for(var r=0;r<this.data.length;r++){var p=null;var v=this.data[r];this.maxRadius=Math.max(this.maxRadius,v[2]);if(v[3]){if(typeof(v[3])=="object"){p=v[3]["color"]}}if(p==null){if(this.seriesColors[r]!=null){p=this.seriesColors[r]}}if(p&&this.bubbleAlpha<1){n=f.jqplot.getColorComponents(p);p="rgba("+n[0]+", "+n[1]+", "+n[2]+", "+this.bubbleAlpha+")"}if(p){this.seriesColors[r]=p}}if(!this.varyBubbleColors){this.seriesColors=[this.color]}this.colorGenerator=new f.jqplot.ColorGenerator(this.seriesColors);if(this.highlightColors.length==0){for(var r=0;r<this.seriesColors.length;r++){var o=f.jqplot.getColorComponents(this.seriesColors[r]);var u=[o[0],o[1],o[2]];var s=u[0]+u[1]+u[2];for(var q=0;q<3;q++){u[q]=(s>570)?u[q]*0.8:u[q]+0.3*(255-u[q]);u[q]=parseInt(u[q],10)}this.highlightColors.push("rgba("+u[0]+","+u[1]+","+u[2]+", "+this.highlightAlpha+")")}}this.highlightColorGenerator=new f.jqplot.ColorGenerator(this.highlightColors);var m={fill:true,isarc:true,angle:this.shadowAngle,alpha:this.shadowAlpha,closePath:true};this.renderer.shadowRenderer.init(m);this.canvas=new f.jqplot.DivCanvas();this.canvas._plotDimensions=this._plotDimensions;t.eventListenerHooks.addOnce("jqplotMouseMove",a);t.eventListenerHooks.addOnce("jqplotMouseDown",b);t.eventListenerHooks.addOnce("jqplotMouseUp",k);t.eventListenerHooks.addOnce("jqplotClick",g);t.eventListenerHooks.addOnce("jqplotRightClick",l);t.postDrawHooks.addOnce(h)};f.jqplot.BubbleRenderer.prototype.setGridData=function(w){var q=this._xaxis.series_u2p;var m=this._yaxis.series_u2p;var t=this._plotData;this.gridData=[];var s=[];this.radii=[];var v=Math.min(w._height,w._width);for(var u=0;u<this.data.length;u++){if(t[u]!=null){this.gridData.push([q.call(this._xaxis,t[u][0]),m.call(this._yaxis,t[u][1]),t[u][2]]);this.radii.push([u,t[u][2]]);s.push(t[u][2])}}var n,o,x=this.maxRadius=d(s);var p=this.gridData.length;if(this.autoscaleBubbles){for(var u=0;u<p;u++){o=s[u]/x;n=this.autoscaleMultiplier*v/6;this.gridData[u][2]=n*o}}this.radii.sort(function(y,r){return r[1]-y[1]})};f.jqplot.BubbleRenderer.prototype.makeGridData=function(t,w){var q=this._xaxis.series_u2p;var n=this._yaxis.series_u2p;var x=[];var s=[];this.radii=[];var v=Math.min(w._height,w._width);for(var u=0;u<t.length;u++){if(t[u]!=null){x.push([q.call(this._xaxis,t[u][0]),n.call(this._yaxis,t[u][1]),t[u][2]]);s.push(t[u][2]);this.radii.push([u,t[u][2]])}}var m,o,y=this.maxRadius=d(s);var p=this.gridData.length;if(this.autoscaleBubbles){for(var u=0;u<p;u++){o=s[u]/y;m=this.autoscaleMultiplier*v/6;x[u][2]=m*o}}this.radii.sort(function(z,r){return r[1]-z[1]});return x};f.jqplot.BubbleRenderer.prototype.draw=function(D,J,n){if(this.plugins.pointLabels){this.plugins.pointLabels.show=false}var A=(n!=undefined)?n:{};var r=(A.shadow!=undefined)?A.shadow:this.shadow;this.canvas._elem.empty();for(var G=0;G<this.radii.length;G++){var C=this.radii[G][0];var z=null;var F=null;var m=null;var p=null;var I=this.data[C];var J=this.gridData[C];if(I[3]){if(typeof(I[3])=="object"){z=I[3]["label"]}else{if(typeof(I[3])=="string"){z=I[3]}}}F=this.colorGenerator.get(C);var E=J[2];var q,K;if(this.shadow){q=(0.7+J[2]/40).toFixed(1);K=1+Math.ceil(J[2]/15);E+=q*K}this.bubbleCanvases[C]=new f.jqplot.BubbleCanvas();this.canvas._elem.append(this.bubbleCanvases[C].createElement(J[0],J[1],E));this.bubbleCanvases[C].setContext();var D=this.bubbleCanvases[C]._ctx;var u=D.canvas.width/2;var s=D.canvas.height/2;if(this.shadow){this.renderer.shadowRenderer.draw(D,[u,s,J[2],0,2*Math.PI],{offset:q,depth:K})}this.bubbleCanvases[C].draw(J[2],F,this.bubbleGradients,this.shadowAngle/180*Math.PI);if(z&&this.showLabels){p=f('<div style="position:absolute;" class="jqplot-bubble-label"></div>');if(this.escapeHtml){p.text(z)}else{p.html(z)}this.canvas._elem.append(p);var H=f(p).outerHeight();var v=f(p).outerWidth();var B=J[1]-0.5*H;vLine truncated
|
||||||
@@ -0,0 +1,203 @@
|
|||||||
|
/**
|
||||||
|
* jqPlot
|
||||||
|
* Pure JavaScript plotting plugin using jQuery
|
||||||
|
*
|
||||||
|
* Version: 1.0.8
|
||||||
|
* Revision: 1250
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009-2013 Chris Leonello
|
||||||
|
* jqPlot is currently available for use in all personal or commercial projects
|
||||||
|
* under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL
|
||||||
|
* version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can
|
||||||
|
* choose the license that best suits your project and use it accordingly.
|
||||||
|
*
|
||||||
|
* Although not required, the author would appreciate an email letting him
|
||||||
|
* know of any substantial use of jqPlot. You can reach the author at:
|
||||||
|
* chris at jqplot dot com or see http://www.jqplot.com/info.php .
|
||||||
|
*
|
||||||
|
* If you are feeling kind and generous, consider supporting the project by
|
||||||
|
* making a donation at: http://www.jqplot.com/donate.php .
|
||||||
|
*
|
||||||
|
* sprintf functions contained in jqplot.sprintf.js by Ash Searle:
|
||||||
|
*
|
||||||
|
* version 2007.04.27
|
||||||
|
* author Ash Searle
|
||||||
|
* http://hexmen.com/blog/2007/03/printf-sprintf/
|
||||||
|
* http://hexmen.com/js/sprintf.js
|
||||||
|
* The author (Ash Searle) has placed this code in the public domain:
|
||||||
|
* "This code is unrestricted: you are free to use it however you like."
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
(function($) {
|
||||||
|
/**
|
||||||
|
* Class: $.jqplot.CanvasAxisLabelRenderer
|
||||||
|
* Renderer to draw axis labels with a canvas element to support advanced
|
||||||
|
* featrues such as rotated text. This renderer uses a separate rendering engine
|
||||||
|
* to draw the text on the canvas. Two modes of rendering the text are available.
|
||||||
|
* If the browser has native font support for canvas fonts (currently Mozila 3.5
|
||||||
|
* and Safari 4), you can enable text rendering with the canvas fillText method.
|
||||||
|
* You do so by setting the "enableFontSupport" option to true.
|
||||||
|
*
|
||||||
|
* Browsers lacking native font support will have the text drawn on the canvas
|
||||||
|
* using the Hershey font metrics. Even if the "enableFontSupport" option is true
|
||||||
|
* non-supporting browsers will still render with the Hershey font.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
$.jqplot.CanvasAxisLabelRenderer = function(options) {
|
||||||
|
// Group: Properties
|
||||||
|
|
||||||
|
// prop: angle
|
||||||
|
// angle of text, measured clockwise from x axis.
|
||||||
|
this.angle = 0;
|
||||||
|
// name of the axis associated with this tick
|
||||||
|
this.axis;
|
||||||
|
// prop: show
|
||||||
|
// whether or not to show the tick (mark and label).
|
||||||
|
this.show = true;
|
||||||
|
// prop: showLabel
|
||||||
|
// whether or not to show the label.
|
||||||
|
this.showLabel = true;
|
||||||
|
// prop: label
|
||||||
|
// label for the axis.
|
||||||
|
this.label = '';
|
||||||
|
// prop: fontFamily
|
||||||
|
// CSS spec for the font-family css attribute.
|
||||||
|
// Applies only to browsers supporting native font rendering in the
|
||||||
|
// canvas tag. Currently Mozilla 3.5 and Safari 4.
|
||||||
|
this.fontFamily = '"Trebuchet MS", Arial, Helvetica, sans-serif';
|
||||||
|
// prop: fontSize
|
||||||
|
// CSS spec for font size.
|
||||||
|
this.fontSize = '11pt';
|
||||||
|
// prop: fontWeight
|
||||||
|
// CSS spec for fontWeight: normal, bold, bolder, lighter or a number 100 - 900
|
||||||
|
this.fontWeight = 'normal';
|
||||||
|
// prop: fontStretch
|
||||||
|
// Multiplier to condense or expand font width.
|
||||||
|
// Applies only to browsers which don't support canvas native font rendering.
|
||||||
|
this.fontStretch = 1.0;
|
||||||
|
// prop: textColor
|
||||||
|
// css spec for the color attribute.
|
||||||
|
this.textColor = '#666666';
|
||||||
|
// prop: enableFontSupport
|
||||||
|
// true to turn on native canvas font support in Mozilla 3.5+ and Safari 4+.
|
||||||
|
// If true, label will be drawn with canvas tag native support for fonts.
|
||||||
|
// If false, label will be drawn with Hershey font metrics.
|
||||||
|
this.enableFontSupport = true;
|
||||||
|
// prop: pt2px
|
||||||
|
// Point to pixel scaling factor, used for computing height of bounding box
|
||||||
|
// around a label. The labels text renderer has a default setting of 1.4, which
|
||||||
|
// should be suitable for most fonts. Leave as null to use default. If tops of
|
||||||
|
// letters appear clipped, increase this. If bounding box seems too big, decrease.
|
||||||
|
// This is an issue only with the native font renderering capabilities of Mozilla
|
||||||
|
// 3.5 and Safari 4 since they do not provide a method to determine the font height.
|
||||||
|
this.pt2px = null;
|
||||||
|
|
||||||
|
this._elem;
|
||||||
|
this._ctx;
|
||||||
|
this._plotWidth;
|
||||||
|
this._plotHeight;
|
||||||
|
this._plotDimensions = {height:null, width:null};
|
||||||
|
|
||||||
|
$.extend(true, this, options);
|
||||||
|
|
||||||
|
if (options.angle == null && this.axis != 'xaxis' && this.axis != 'x2axis') {
|
||||||
|
this.angle = -90;
|
||||||
|
}
|
||||||
|
|
||||||
|
var ropts = {fontSize:this.fontSize, fontWeight:this.fontWeight, fontStretch:this.fontStretch, fillStyle:this.textColor, angle:this.getAngleRad(), fontFamily:this.fontFamily};
|
||||||
|
if (this.pt2px) {
|
||||||
|
ropts.pt2px = this.pt2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.enableFontSupport) {
|
||||||
|
if ($.jqplot.support_canvas_text()) {
|
||||||
|
this._textRenderer = new $.jqplot.CanvasFontRenderer(ropts);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this._textRenderer = new $.jqplot.CanvasTextRenderer(ropts);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.CanvasAxisLabelRenderer.prototype.init = function(options) {
|
||||||
|
$.extend(true, this, options);
|
||||||
|
this._textRenderer.init({fontSize:this.fontSize, fontWeight:this.fontWeight, fontStretch:this.fontStretch, fillStyle:this.textColor, angle:this.getAngleRad(), fontFamily:this.fontFamily});
|
||||||
|
};
|
||||||
|
|
||||||
|
// return width along the x axis
|
||||||
|
// will check first to see if an element exists.
|
||||||
|
// if not, will return the computed text box width.
|
||||||
|
$.jqplot.CanvasAxisLabelRenderer.prototype.getWidth = function(ctx) {
|
||||||
|
if (this._elem) {
|
||||||
|
return this._elem.outerWidth(true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var tr = this._textRenderer;
|
||||||
|
var l = tr.getWidth(ctx);
|
||||||
|
var h = tr.getHeight(ctx);
|
||||||
|
var w = Math.abs(Math.sin(tr.angle)*h) + Math.abs(Math.cos(tr.angle)*l);
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// return height along the y axis.
|
||||||
|
$.jqplot.CanvasAxisLabelRenderer.prototype.getHeight = function(ctx) {
|
||||||
|
if (this._elem) {
|
||||||
|
return this._elem.outerHeight(true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var tr = this._textRenderer;
|
||||||
|
var l = tr.getWidth(ctx);
|
||||||
|
var h = tr.getHeight(ctx);
|
||||||
|
var w = Math.abs(Math.cos(tr.angle)*h) + Math.abs(Math.sin(tr.angle)*l);
|
||||||
|
return w;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.CanvasAxisLabelRenderer.prototype.getAngleRad = function() {
|
||||||
|
var a = this.angle * Math.PI/180;
|
||||||
|
return a;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.CanvasAxisLabelRenderer.prototype.draw = function(ctx, plot) {
|
||||||
|
// Memory Leaks patch
|
||||||
|
if (this._elem) {
|
||||||
|
if ($.jqplot.use_excanvas && window.G_vmlCanvasManager.uninitElement !== undefined) {
|
||||||
|
window.G_vmlCanvasManager.uninitElement(this._elem.get(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
this._elem.emptyForce();
|
||||||
|
this._elem = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// create a canvas here, but can't draw on it untill it is appended
|
||||||
|
// to dom for IE compatability.
|
||||||
|
var elem = plot.canvasManager.getCanvas();
|
||||||
|
|
||||||
|
this._textRenderer.setText(this.label, ctx);
|
||||||
|
var w = this.getWidth(ctx);
|
||||||
|
var h = this.getHeight(ctx);
|
||||||
|
elem.width = w;
|
||||||
|
elem.height = h;
|
||||||
|
elem.style.width = w;
|
||||||
|
elem.style.height = h;
|
||||||
|
|
||||||
|
elem = plot.canvasManager.initCanvas(elem);
|
||||||
|
|
||||||
|
this._elem = $(elem);
|
||||||
|
this._elem.css({ position: 'absolute'});
|
||||||
|
this._elem.addClass('jqplot-'+this.axis+'-label');
|
||||||
|
|
||||||
|
elem = null;
|
||||||
|
return this._elem;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.jqplot.CanvasAxisLabelRenderer.prototype.pack = function() {
|
||||||
|
this._textRenderer.draw(this._elem.get(0).getContext("2d"), this.label);
|
||||||
|
};
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
Loaded 100 of 383 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user