-
+
+
+
diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php
index 9b8cf928..357d12ef 100755
--- a/application/default/controllers/DataController.php
+++ b/application/default/controllers/DataController.php
@@ -1,613 +1,613 @@
-db=Zend_Registry::get('db');
- $this->view->config = Zend_Registry::get('config');
- $this->messenger=$this->_helper->getHelper('FlashMessenger');
- $this->view->messages = $this->messenger->getMessages();
- $this->view->theme = new Theme();
- $this->view->main_nav_pageID = "data";
-
- $this->view->nav = array(
- array('link'=>'/','title'=>''),
- array('link'=>'/data','title'=>$this->view->config->title->data),
- );
- }
- function indexAction()
- {
- //序列
- $state=$this->db->query('select s.id,s.name,count(*) as count from series s,dataseries d where d.sid=s.id and length(s.name)>2 group by s.id,s.name order by count desc limit 15');
- $this->view->serie=$state->fetchAll();
- //分类
- $state=$this->db->query('select c.code,name,name_zh,count(*) from category c,categorycode cc where c.code=cc.code group by c.code,cc.name,cc.name_zh');
- $this->view->category=$state->fetchAll();
- //关键词
- $state=$this->db->query("select keyword,count(*) from keyword right join normalmetadata on keyword.id=normalmetadata.id where keytype='place' group by keyword order by count desc limit 20");
- $k1=$state->fetchAll();
- $state=$this->db->query("select keyword,count(*) from keyword right join normalmetadata on keyword.id=normalmetadata.id where keytype='theme' group by keyword order by count desc limit 20");
- //$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='theme' and (m.uuid in (select uuid from dataorder group by uuid order by count(uuid) desc limit 20)) group by k.keyword order by count(k.keyword) desc limit 20");
- $k2=$state->fetchAll();
- $state=$this->db->query("select keyword,count(*) from keyword right join normalmetadata on keyword.id=normalmetadata.id where keytype='discipline' group by keyword order by count desc limit 20");
- $k3=$state->fetchAll();
- $state=$this->db->query("select keyword,count(*) from keyword right join normalmetadata on keyword.id=normalmetadata.id where keytype='stratum' group by keyword order by count desc limit 20");
- $k4=$state->fetchAll();
- $state=$this->db->query("select keyword,count(*) from keyword right join normalmetadata on keyword.id=normalmetadata.id where keytype='temporal' group by keyword order by count desc limit 20");
- //$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='temporal' and (m.uuid in (select uuid from dataorder group by uuid order by count(uuid) desc limit 20)) group by k.keyword order by count(k.keyword) desc limit 20");
- $k5=$state->fetchAll();
- $this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
- //最新10个入库数据
- $state=$this->db->query('select id,uuid,title from normalmetadata order by id desc limit 10');
- $this->view->metadata = $state->fetchAll();
- //特色数据
-
- //服务
- $l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
- $this->view->newsletter=$l->getLast();
- $name=basename($this->view->newsletter,'.pdf');
- list(,$this->view->newsletterno)=explode("_",$name);
-
- $this->view->addHelperPath('helper','Zend_View_Helper_');
- $form=new MaillistForm();
- $form->submit->setLabel('输入邮件地址,订阅数据通讯列表');
-
- $this->view->form=$form;
- if ($this->_request->isPost()) {
- //发送邮件
- $formData=$this->_request->getPost();
- if ($form->isValid($formData)) {
- $mail=new WestdcMailer($this->view->config->smtp);
- $mail->setFrom($formData['email']);
- $mail->setBodyText(".");
- $mail->setSubject('subscribe');
- $mail->addTo($this->view->config->reportemail);
- $mail->send();
- $this->messenger->addMessage('订阅成功,请检查您的邮件!');
- $this->_redirect('/data/');
- }
- } else {
- $auth = Zend_Auth::getInstance();
- if ($auth->hasIdentity()) {
- $user=$auth->getIdentity();
- $formData['email']=$user->email;
- $form->populate($formData);
- }
- }
- $searchform=new SearchForm();
- $this->view->searchform=$searchform;
-
- //其他连接
- }
- function onlinelistAction()
- {
- $page=(int)$this->_request->getParam('page');
- if (empty($page)) $page=1;
- $limit=30;
- $offset=$limit*($page-1);
- $state=$this->db->query('select count(*) from normalmetadata where datatype=0');
- $row=$state->fetchAll();
- $sum=$row[0]['count'];
- $select=$this->db->select();
- $select->from('normalmetadata','*')->where('datatype=0')->order('title')->limitPage($page,$limit);
- $this->view->metadata = $this->db->fetchAll($select);
- $this->view->page=new Pagination($sum,$page,$limit);
- }
- function offlinelistAction()
- {
- $page=(int)$this->_request->getParam('page');
- if (empty($page)) $page=1;
- $limit=30;
- $offset=$limit*($page-1);
- $state=$this->db->query('select count(*) from normalmetadata where datatype=1');
- $row=$state->fetchAll();
- $sum=$row[0]['count'];
- $select=$this->db->select();
- $select->from('normalmetadata','*')->where('datatype=1')->order('title')->limitPage($page,$limit);
- $this->view->metadata = $this->db->fetchAll($select);
- $this->view->page=new Pagination($sum,$page,$limit);
- }
- //展示最近20条离线神情记录情况
- function offlineappAction()
- {
- $sql="select * from offlineapp where ts_approved is not null and pdflink<>'' and status>=0 order by ts_created desc limit 20";
- $this->view->rows=$this->db->fetchAll($sql);
- }
- function requestAction()
- {
- $archives=new Archive($this->db);
- $this->view->item=$archives->getOneArchive('如何申请数据','help');
- }
- function submitAction()
- {
- $archives=new Archive($this->db);
- $this->view->item=$archives->getOneArchive('如何发布数据','help');
- }
- function serviceAction()
- {
- }
- function newsletterAction()
- {
- $l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
- $this->view->newsletters=$l->toArray();
- $this->view->addHelperPath('helper','Zend_View_Helper_');
- rsort($this->view->newsletters);
- $form=new MaillistForm();
- $this->view->form=$form;
- $form->submit->setLabel('输入邮件地址,订阅数据通讯列表');
- if ($this->_request->isPost()) {
- //发送邮件
- $formData=$this->_request->getPost();
- if ($form->isValid($formData)) {
- //$mail=new Zend_Mail('utf-8');
- $mail=new WestdcMailer($this->view->config->smtp);
- $mail->setFrom($formData['email']);
- $mail->setBodyText(".");
- $mail->setSubject('subscribe');
- $mail->addTo($this->view->config->reportemail);
- /*
- $tr=new Zend_Mail_Transport_Smtp($this->view->config->smtp->host,
- array('ssl' => $this->view->config->smtp->ssl,
- 'auth'=>$this->view->config->smtp->auth,
- 'username'=>$this->view->config->smtp->username,
- 'password'=>$this->view->config->smtp->password));
- $mail->send($tr);
- */
- $mail->send();
- $this->messenger->addMessage('订阅成功,请检查您的邮件!');
- $this->_redirect('/data/newsletter');
- }
- } else {
- $auth = Zend_Auth::getInstance();
- if ($auth->hasIdentity()) {
- $user=$auth->getIdentity();
- $formData['email']=$user->email;
- $form->populate($formData);
- }
- }
- }
- function featureAction()
- {
- $sql="select * from datafeature order by id desc";
- $this->view->feature=$this->db->fetchAll($sql);
- }
-
- function datasetcdAction()
- {
- $cd=new DatasetcdTable();
- $this->view->rows=$cd->fetchAll();
- }
- /*
- * 数据浏览
- */
- function browseAction()
- {
- $page=(int)$this->_request->getParam('page');
- if (empty($page)) $page=1;
- $limit=10;
- $offset=$limit*($page-1);
- $state=$this->db->query('select count(*) from metadata');
- $row=$state->fetchAll();
- $sum=$row[0]['count'];
- $select=$this->db->select();
- $select->from('metadata','*')->order('id desc')->limitPage($page,$limit);
- $this->view->metadata = $this->db->fetchAll($select);
- $this->view->page=new Pagination($sum,$page,$limit);
- }
- function tagAction()
- {
- $id = (int)$this->_request->getParam('id');
- $key = $this->_request->getParam('key');
- $keytype = $this->_request->getParam('keytype');
- $page=(int)$this->_request->getParam('page');
- if (empty($page)) $page=1;
- $limit=10;
- $offset=$limit*($page-1);
- $sql='select keyword,count(*),keytype from keyword right join normalmetadata on keyword.id=normalmetadata.id ';
- if (!empty($keytype) && ($keytype=='place' || $keytype=='theme' || $keytype=='discipline'||$keytype=='temporal')) $sql.=" where keytype='".$keytype."'";
- $sql.=' group by keyword,keytype order by keytype,keyword,count desc';
- $state=$this->db->query($sql);
- $this->view->keywords=$state->fetchAll();
-
- if ($id>0 or !empty($key)) {
- if (empty($key)) {
- $where=$this->db->quoteInto('id = ?',$id);
- $row=$md->fetchRow($where);
- $key=$row->name;
- }
- $this->view->codename=$key;
- $sql=$this->db->quoteInto('select count(m.id) from normalmetadata m,keyword k where m.id=k.id and k.keyword=?',$key);
-
- $state=$this->db->query($sql);
- $row=$state->fetchAll();
- $sum=$row[0]['count'];
- $select=$this->db->select();
- $select->from('normalmetadata','*')->join('keyword','normalmetadata.id=keyword.id')->where('keyword.keyword=?',$key)->order('normalmetadata.title')->limitPage($page,$limit);
- //$sql=$db->quoteInto('select m.* from metadata m,keyword k where m.id=k.id and k.keyword=?',$key);
- //$state=$db->query($sql);
- $this->view->metadata=$this->db->fetchAll($select);
- $this->view->page=new Pagination($sum,$page,$limit);
- }
- }
- /*
- * 数据集序列浏览
- */
- function seriesAction()
- {
- $id = $this->_request->getParam('id');
- if (empty($id)) $id=0;
- if (!is_numeric($id))
- {
- $name=$id;
- $id='';
- }
- $keyword=$this->_request->getParam('keyword');
- if (empty($id)) {
- if (!empty($name))
- {
- $where=$this->db->quoteInto('name = ?',$name);
- $row=$this->db->fetchRow("select * from series where ".$where);
- }
- } else {
- $where=$this->db->quoteInto('id = ?',$id);
- $row=$this->db->fetchRow("select * from series where ".$where);
- }
- if (!empty($id) or !empty($name))
- {
- if (!$row) $this->_redirect('/data');
- $id=$row['id'];
- }
- $page=(int)$this->_request->getParam('page');
- if (empty($page)) $page=1;
- $limit=10;
- $offset=$limit*($page-1);
- $state=$this->db->query('select s.id,name,count(*) from series s,dataseries d where d.sid=s.id group by s.id,s.name');
- $this->view->serie=$state->fetchAll();
- if ($id>0) {
- //$where=$this->db->quoteInto('id = ?',$id);
- //$row=$this->db->fetchRow("select * from series where ".$where);
- $this->view->codename=$row['name'];
- if (!empty($keyword))
- {
- $sql='select count(m.id) as count from normalmetadata m,dataseries d,keyword k where m.id=d.id and m.id=k.id and d.sid=? and k.keyword=?';
- $row=$this->db->fetchAll($sql,array($id,$keyword));
- $this->view->codename.="【关键词:".$keyword."】";
- }else{
- $sql='select count(m.id) as count from normalmetadata m,dataseries d where m.id=d.id and d.sid=?';
- $row=$this->db->fetchAll($sql,array($id));
- }
- $sum=$row[0]['count'];
- $select=$this->db->select();
- $select->from('normalmetadata','*')->join('dataseries','normalmetadata.id=dataseries.id')->where('dataseries.sid=?',$id)->order('normalmetadata.title')->limitPage($page,$limit);
- if (!empty($keyword)) $select->join('keyword','keyword.id=normalmetadata.id')->where('keyword.keyword=?',$keyword);
- $this->view->metadata=$this->db->fetchAll($select);
- $this->view->page=new Pagination($sum,$page,$limit);
- //$this->view->showtools=($sum>$page)?true:false;
- //$this->view->form=new SearchForm();
- $sql=$this->db->quoteInto("select keyword,count(*) as count from (select t.keyword,t.id from keyword t left join dataseries d on t.id=d.id where t.keytype='place' and d.sid=?) as f group by keyword order by count desc limit 30",$id);
- $state=$this->db->query($sql);
- $row=$state->fetchAll();
- $this->view->places=$row;
- $this->view->seriesid=$id;
- } else {
- //提供全部数据集序列列表
- }
- }
- /*
- * 分类浏览模式
- */
- function categoryAction()
- {
- $page = $this->_request->getParam('page');
- $code = (int)$this->_request->getParam('code');
- $state=$this->db->query('select c.code,name,name_zh,count(*) from category c,categorycode cc where c.code=cc.code group by c.code,cc.name,cc.name_zh');
- $this->view->category=$state->fetchAll();
- if ($code>0 && $code<20) {
- $where=$this->db->quoteInto('code = ?',$code);
- $row=$this->db->fetchRow("select * from categorycode where ".$where);
- $this->view->codename=(empty($row['name_zh'])?$row['name']:$row['name_zh']);
- $sql='select count(m.id) from normalmetadata m left join category c on m.id=c.id where c.code=?';
- $row=$this->db->fetchRow($sql,array($code));
- $sum=$row['count'];
- $select=$this->db->select();
- $select->from('normalmetadata as m','*')->joinLeft('category as c','m.id=c.id')->where('c.code=?',$code)->order('m.title')->limitPage($page,$this->limit);
- $this->view->metadata=$this->db->fetchAll($select);
- $this->view->page=new Pagination($sum,$page,$this->limit);
- } else {
- //提供全部分类列表
- }
- }
- /*
- * 时间浏览方式
- * todo:实现xml的缓存,基于时间的缓存(每天)?基于元数据修改的缓存,每次导入后都重新生成一次。
- */
- function timelineAction()
- {
- $fn="time1.xml";
- $rows=$this->db->fetchAll("select ts_created from normalmetadata order by ts_created desc limit 1");
- $last_update=strtotime($rows[0]['ts_created']);
- if (!file_exists($fn) || (filemtime($fn)<$last_update))
- {
- $dateformat="M j Y";
- $md = new MetadataTable();
- $db=$md->getAdapter();
- $state=$db->query('select id,uuid,description,title,timebegin,timeend from normalmetadata where timebegin is not null order by timebegin');
- $rows=$state->fetchAll();
- $timexml='';
- foreach($rows as $row) {
- $timexml.='
",$v['changelog']); - } - $data = array("list"=>$rows); - $this->jsonexit($data); - return true; - }else{ - $data = array("error"=>"处理中出现错误"); - $this->jsonexit($data); - return true; - } - } - - }//getversionAction() - - function replace($string){ - $patterns = array("/\"/i","/\'/i"); - $replacements = array("“","‘"); - ksort($patterns); - ksort($replacements); - return preg_replace($patterns, $replacements, $string); - }//引号替换 - - - function postcommentAction(){ - $this->_helper->layout->disableLayout(); - $this->_helper->viewRenderer->setNoRender(); - try{ - $auth = Zend_Auth::getInstance(); - if($auth->hasIdentity()) - { - $user = $auth->getIdentity(); - $userid = $user->id; - }else - { - $userid=0; - } - - $author = mb_substr($this->replace(trim($this->_request->getParam('author'))),0,30,'UTF-8'); - $email = mb_substr($this->replace(trim($this->_request->getParam('email'))),0,60,'UTF-8'); - $url = mb_substr($this->replace(trim($this->_request->getParam('url'))),0,60,'UTF-8'); - $content = $this->replace(trim($this->_request->getParam('content'))); - $vdcode = mb_substr($this->replace(trim($this->_request->getParam('vdcode'))),0,4,'UTF-8'); - - if(empty($author)) - { - echo "请输入您的名字"; - exit(); - } - - if(strlen($author)<3) exit("姓名长度不得少于2个汉字 :)"); - - if(empty($email)) - { - echo "请输入您的电子邮箱地址"; - exit(); - } - - if(strlen($email)<4) exit("Email长度太短,请填写正确的Email :)"); - - if(!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/i",$email)) - { - echo "Email格式不正确"; - exit(); - } - - if(strlen($content)<5) exit("评论长度不得少于3个汉字 :)"); - - if(preg_match("/script/i",$content)) - { - $content = preg_replace("/script/i","script",$content); - } - - if(preg_match("/<|>/",$content)) - { - $data=array( - '<'=>'<', - '>'=>'>', - ); - - $patterns = array(); - $replacements = array(); - foreach($data as $k=>$v) - { - $patterns[]='/'.$k.'/i'; - $replacements[]=$v; - } - ksort($patterns); - ksort($replacements); - $content=preg_replace($patterns, $replacements, $content); - if(!empty($url)) - { - $url=preg_replace($patterns, $replacements, $url); - } - } - - if(preg_match("/script/i",$url)) - { - $url = preg_replace("/script/i","script",$url); - } - - if(!preg_match("/http:\/\//",$url)) - { - $url = "http://".$url; - } - - $uuid = trim($this->_request->getParam('uuid')); - - if(!preg_match("/^[0-9A-Za-z]{8}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{12}$/",$uuid)) - { - echo "参数错误!"; - exit(); - } - - if(strtolower($vdcode) != $_SESSION['vdcodes']) - { - echo "验证码错误,请重新输入"; - exit(); - } - - - $data = array( - 'uuid' => $uuid, - 'uid' => $userid, - 'author' => $author, - 'email' => $email, - 'url' => $url, - 'ip' => $_SERVER['REMOTE_ADDR'], - 'content' => $content, - 'agent' => $_SERVER['HTTP_USER_AGENT'], - 'type' => 'comment' - ); - - $sql = "INSERT INTO comments (author,email,url,ip,content,agent,type,uuid,userid) VALUES (?,?,?,?,?,?,?,?,?)"; - $sth = $this->db->prepare($sql); - $exec = $sth->execute(array($data['author'],$data['email'],$data['url'],$data['ip'],$data['content'],$data['agent'],$data['type'],$data['uuid'],$data['uid'])); - - if($exec) - { - $sql = "SELECT u.email FROM mdauthor au - LEFT JOIN users u on au.userid=u.id - WHERE au.uuid='$uuid'"; - $sth = $this->db->query($sql); - $rows = $sth->fetchAll(); - - @$mailtp=new EmailText( - $this->db, - 'data-comment-note', - array( - 'user' =>$user->username, - 'uuid' =>$data['uuid'], - 'title' =>$this->replace(trim($this->_request->getParam('mdtitle'))), - 'content'=>$content - ) - ); - @$mail=new WestdcMailer($this->view->config->smtp); - @$mail->setBodyText($mailtp->getBody()); - @$mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); - @$mail->addTo($this->view->config->service->email); - if(is_array($rows) && count($rows)>0) - { - foreach($rows as $v) - { - @$mail->addTo($v['email']); - } - } - @$mail->setSubject($mailtp->getSubject()); - @$mail->send(); - $msg = "用户".$user->username."对元数据《".$this->replace(trim($this->_request->getParam('mdtitle')))."》进行了评论,点击查看"; - include_once("message.php"); - message::post($this->db,0,-1,"收到新数据评论",$msg); - echo "评论成功"; - exit(); - }else - { - echo "评论失败,请重试 :)"; - exit(); - } - }catch(Exception $e){ - echo "出错了,请稍后再试"; - exit(); - } - }//ajax评论 - - - /* - * 数据评论,根据UUID读取 - */ - function commentAction() - { - $this->_helper->layout->disableLayout(); - $this->_helper->viewRenderer->setNoRender(); - $uuid=$this->_request->getParam('uuid'); - if (empty($uuid)) die(); - $sql="select * from comments where uuid=? AND reply=0 order by id desc"; - $comments=$this->db->fetchAll($sql,array($uuid)); - - $paginator = Zend_Paginator::factory($comments); - $paginator->setCurrentPageNumber($this->_getParam('page')); - $paginator->setItemCountPerPage(5); - $paginator->setView($this->view); - Zend_View_Helper_PaginationControl::setDefaultViewPartial('data/pagination_ajax.phtml'); - - include_once("Avatar.php"); - $avatar = new Avatar(); - if ($paginator) - { - foreach($paginator as $c) - { - //$author=$this->view->escape($c['author']); - $sql = "SELECT cr.id,cr.content as body,cr.reply,u.username,cr.ts_created,u.usertype,u.email as email, - (SELECT au.uuid FROM mdauthor au WHERE au.userid=u.id AND au.uuid='$uuid') as uuid - FROM comments cr - LEFT JOIN users u ON cr.userid=u.id - WHERE cr.reply=?"; - $sth = $this->db->prepare($sql); - $sth->execute(array($c['id'])); - $replys = $sth->fetchAll(); - $replyhtml = ""; - if(!empty($replys) || count($replys)>0) - { - foreach($replys as $v) - { - $usertype = ""; - $color = ""; - if($v['usertype'] == "administrator") - { - $usertype = "[管理员]"; - $color="#009d00"; - } - if($v['uuid'] == $uuid) - { - $usertype = "[数据作者]"; - $color="#add2e9"; - } - if(!empty($color)) - { - $color = 'background:'.$color.';color:#FFFFFF;'; - } - $img = $avatar->Get($v['email'],48); - $replyhtml .=' -
",$v['changelog']); + } + $data = array("list"=>$rows); + $this->jsonexit($data); + return true; + }else{ + $data = array("error"=>"处理中出现错误"); + $this->jsonexit($data); + return true; + } + } + + }//getversionAction() + + function replace($string){ + $patterns = array("/\"/i","/\'/i"); + $replacements = array("“","‘"); + ksort($patterns); + ksort($replacements); + return preg_replace($patterns, $replacements, $string); + }//引号替换 + + + function postcommentAction(){ + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + try{ + $auth = Zend_Auth::getInstance(); + if($auth->hasIdentity()) + { + $user = $auth->getIdentity(); + $userid = $user->id; + }else + { + $userid=0; + } + + $author = mb_substr($this->replace(trim($this->_request->getParam('author'))),0,30,'UTF-8'); + $email = mb_substr($this->replace(trim($this->_request->getParam('email'))),0,60,'UTF-8'); + $url = mb_substr($this->replace(trim($this->_request->getParam('url'))),0,60,'UTF-8'); + $content = $this->replace(trim($this->_request->getParam('content'))); + $vdcode = mb_substr($this->replace(trim($this->_request->getParam('vdcode'))),0,4,'UTF-8'); + + if(empty($author)) + { + echo "请输入您的名字"; + exit(); + } + + if(strlen($author)<3) exit("姓名长度不得少于2个汉字 :)"); + + if(empty($email)) + { + echo "请输入您的电子邮箱地址"; + exit(); + } + + if(strlen($email)<4) exit("Email长度太短,请填写正确的Email :)"); + + if(!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/i",$email)) + { + echo "Email格式不正确"; + exit(); + } + + if(strlen($content)<5) exit("评论长度不得少于3个汉字 :)"); + + if(preg_match("/script/i",$content)) + { + $content = preg_replace("/script/i","script",$content); + } + + if(preg_match("/<|>/",$content)) + { + $data=array( + '<'=>'<', + '>'=>'>', + ); + + $patterns = array(); + $replacements = array(); + foreach($data as $k=>$v) + { + $patterns[]='/'.$k.'/i'; + $replacements[]=$v; + } + ksort($patterns); + ksort($replacements); + $content=preg_replace($patterns, $replacements, $content); + if(!empty($url)) + { + $url=preg_replace($patterns, $replacements, $url); + } + } + + if(preg_match("/script/i",$url)) + { + $url = preg_replace("/script/i","script",$url); + } + + if(!preg_match("/http:\/\//",$url)) + { + $url = "http://".$url; + } + + $uuid = trim($this->_request->getParam('uuid')); + + if(!preg_match("/^[0-9A-Za-z]{8}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{12}$/",$uuid)) + { + echo "参数错误!"; + exit(); + } + + if(strtolower($vdcode) != $_SESSION['vdcodes']) + { + echo "验证码错误,请重新输入"; + exit(); + } + + + $data = array( + 'uuid' => $uuid, + 'uid' => $userid, + 'author' => $author, + 'email' => $email, + 'url' => $url, + 'ip' => $_SERVER['REMOTE_ADDR'], + 'content' => $content, + 'agent' => $_SERVER['HTTP_USER_AGENT'], + 'type' => 'comment' + ); + + $sql = "INSERT INTO comments (author,email,url,ip,content,agent,type,uuid,userid) VALUES (?,?,?,?,?,?,?,?,?)"; + $sth = $this->db->prepare($sql); + $exec = $sth->execute(array($data['author'],$data['email'],$data['url'],$data['ip'],$data['content'],$data['agent'],$data['type'],$data['uuid'],$data['uid'])); + + if($exec) + { + $sql = "SELECT u.email FROM mdauthor au + LEFT JOIN users u on au.userid=u.id + WHERE au.uuid='$uuid'"; + $sth = $this->db->query($sql); + $rows = $sth->fetchAll(); + + @$mailtp=new EmailText( + $this->db, + 'data-comment-note', + array( + 'user' =>$user->username, + 'uuid' =>$data['uuid'], + 'title' =>$this->replace(trim($this->_request->getParam('mdtitle'))), + 'content'=>$content + ) + ); + @$mail=new WestdcMailer($this->view->config->smtp); + @$mail->setBodyText($mailtp->getBody()); + @$mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); + @$mail->addTo($this->view->config->service->email); + if(is_array($rows) && count($rows)>0) + { + foreach($rows as $v) + { + @$mail->addTo($v['email']); + } + } + @$mail->setSubject($mailtp->getSubject()); + @$mail->send(); + $msg = "用户".$user->username."对元数据《".$this->replace(trim($this->_request->getParam('mdtitle')))."》进行了评论,点击查看"; + include_once("message.php"); + message::post($this->db,0,-1,"收到新数据评论",$msg); + echo "评论成功"; + exit(); + }else + { + echo "评论失败,请重试 :)"; + exit(); + } + }catch(Exception $e){ + echo "出错了,请稍后再试"; + exit(); + } + }//ajax评论 + + + /* + * 数据评论,根据UUID读取 + */ + function commentAction() + { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + $uuid=$this->_request->getParam('uuid'); + if (empty($uuid)) die(); + $sql="select * from comments where uuid=? AND reply=0 order by id desc"; + $comments=$this->db->fetchAll($sql,array($uuid)); + + $paginator = Zend_Paginator::factory($comments); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage(5); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('data/pagination_ajax.phtml'); + + include_once("Avatar.php"); + $avatar = new Avatar(); + if ($paginator) + { + foreach($paginator as $c) + { + //$author=$this->view->escape($c['author']); + $sql = "SELECT cr.id,cr.content as body,cr.reply,u.username,cr.ts_created,u.usertype,u.email as email, + (SELECT au.uuid FROM mdauthor au WHERE au.userid=u.id AND au.uuid='$uuid') as uuid + FROM comments cr + LEFT JOIN users u ON cr.userid=u.id + WHERE cr.reply=?"; + $sth = $this->db->prepare($sql); + $sth->execute(array($c['id'])); + $replys = $sth->fetchAll(); + $replyhtml = ""; + if(!empty($replys) || count($replys)>0) + { + foreach($replys as $v) + { + $usertype = ""; + $color = ""; + if($v['usertype'] == "administrator") + { + $usertype = "[管理员]"; + $color="#009d00"; + } + if($v['uuid'] == $uuid) + { + $usertype = "[数据作者]"; + $color="#add2e9"; + } + if(!empty($color)) + { + $color = 'background:'.$color.';color:#FFFFFF;'; + } + $img = $avatar->Get($v['email'],48); + $replyhtml .=' +
0;)f[c]+=h/2;f[0]=d}this.currentDataGrouping=k.info;if(b.pointRange===null)this.pointRange=k.info.totalRange;this.closestPointRange=k.info.totalRange;if(t(f[0])&&
+f[0]
Open: {point.open}
High: {point.high}
Low: {point.low}
Close: {point.close}
'},states:{hover:{lineWidth:3}},threshold:null});J=ga(C.column,{type:"ohlc",
+pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"high",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},upColorProp:"stroke",getAttribs:function(){C.column.prototype.getAttribs.apply(this,arguments);var a=this.options,b=a.states,a=a.upColor||this.color,c=y(this.pointAttr),d=this.upColorProp;c[""][d]=a;c.hover[d]=b.hover.upColor||a;c.select[d]=b.select.upColor||a;q(this.points,function(a){if(a.open
"},states:{normal:{animation:!0},hover:{brightness:0.2}}});m.heatmap=z(m.scatter,l(g,{type:"heatmap",pointArrayMap:["y","value"],hasPointSpecificOptions:!0,supportsDrilldown:!0,getExtremesFromAll:!0,init:function(){m.scatter.prototype.init.apply(this,
+arguments);this.pointRange=this.options.colsize||1;this.yAxis.axisPointRange=this.options.rowsize||1},translate:function(){var b=this.options,a=this.xAxis,d=this.yAxis;this.generatePoints();k(this.points,function(c){var e=(b.colsize||1)/2,h=(b.rowsize||1)/2,f=Math.round(a.len-a.translate(c.x-e,0,1,0,1)),e=Math.round(a.len-a.translate(c.x+e,0,1,0,1)),g=Math.round(d.translate(c.y-h,0,1,0,1)),h=Math.round(d.translate(c.y+h,0,1,0,1));c.plotX=(f+e)/2;c.plotY=(g+h)/2;c.shapeType="rect";c.shapeArgs={x:Math.min(f,
+e),y:Math.min(g,h),width:Math.abs(e-f),height:Math.abs(h-g)}});this.translateColors()},drawPoints:m.column.prototype.drawPoints,animate:n,getBox:n,drawLegendSymbol:s.drawRectangle,getExtremes:function(){t.prototype.getExtremes.call(this,this.valueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;t.prototype.getExtremes.call(this)}}))})(Highcharts);
diff --git a/htdocs/js/lib/highstock/modules/no-data-to-display.js b/htdocs/js/lib/highstock/modules/no-data-to-display.js
new file mode 100644
index 00000000..27eb0bde
--- /dev/null
+++ b/htdocs/js/lib/highstock/modules/no-data-to-display.js
@@ -0,0 +1,12 @@
+/*
+ Highstock JS v2.0.1 (2014-04-24)
+ Plugin for displaying a message when there is no data visible in chart.
+
+ (c) 2010-2014 Highsoft AS
+ Author: Oystein Moseng
+
+ License: www.highcharts.com/license
+*/
+(function(c){function f(){return!!this.points.length}function g(){this.hasData()?this.hideNoData():this.showNoData()}var d=c.seriesTypes,e=c.Chart.prototype,h=c.getOptions(),i=c.extend;i(h.lang,{noData:"No data to display"});h.noData={position:{x:0,y:0,align:"center",verticalAlign:"middle"},attr:{},style:{fontWeight:"bold",fontSize:"12px",color:"#60606a"}};if(d.pie)d.pie.prototype.hasData=f;if(d.gauge)d.gauge.prototype.hasData=f;if(d.waterfall)d.waterfall.prototype.hasData=f;c.Series.prototype.hasData=
+function(){return this.dataMax!==void 0&&this.dataMin!==void 0};e.showNoData=function(a){var b=this.options,a=a||b.lang.noData,b=b.noData;if(!this.noDataLabel)this.noDataLabel=this.renderer.label(a,0,0,null,null,null,null,null,"no-data").attr(b.attr).css(b.style).add(),this.noDataLabel.align(i(this.noDataLabel.getBBox(),b.position),!1,"plotBox")};e.hideNoData=function(){if(this.noDataLabel)this.noDataLabel=this.noDataLabel.destroy()};e.hasData=function(){for(var a=this.series,b=a.length;b--;)if(a[b].hasData()&&
+!a[b].options.isInternal)return!0;return!1};e.callbacks.push(function(a){c.addEvent(a,"load",g);c.addEvent(a,"redraw",g)})})(Highcharts);
diff --git a/htdocs/js/lib/highstock/modules/solid-gauge.js b/htdocs/js/lib/highstock/modules/solid-gauge.js
new file mode 100644
index 00000000..41597e15
--- /dev/null
+++ b/htdocs/js/lib/highstock/modules/solid-gauge.js
@@ -0,0 +1,13 @@
+/*
+ Highstock JS v2.0.1 (2014-04-24)
+ Solid angular gauge module
+
+ (c) 2010-2014 Torstein Honsi
+
+ License: www.highcharts.com/license
+*/
+(function(a){var l=a.getOptions().plotOptions,o=a.pInt,p=a.pick,j=a.each,m;l.solidgauge=a.merge(l.gauge,{colorByPoint:!0});m={initDataClasses:function(b){var h=this,e=this.chart,c,k=0,f=this.options;this.dataClasses=c=[];j(b.dataClasses,function(g,d){var i,g=a.merge(g);c.push(g);if(!g.color)f.dataClassColor==="category"?(i=e.options.colors,g.color=i[k++],k===i.length&&(k=0)):g.color=h.tweenColors(a.Color(f.minColor),a.Color(f.maxColor),d/(b.dataClasses.length-1))})},initStops:function(b){this.stops=
+b.stops||[[0,this.options.minColor],[1,this.options.maxColor]];j(this.stops,function(b){b.color=a.Color(b[1])})},toColor:function(b,h){var e,c=this.stops,a,f=this.dataClasses,g,d;if(f)for(d=f.length;d--;){if(g=f[d],a=g.from,c=g.to,(a===void 0||b>=a)&&(c===void 0||b<=c)){e=g.color;if(h)h.dataClass=d;break}}else{this.isLog&&(b=this.val2lin(b));e=1-(this.max-b)/(this.max-this.min);for(d=c.length;d--;)if(e>c[d][0])break;a=c[d]||c[d+1];c=c[d+1]||a;e=1-(c[0]-e)/(c[0]-a[0]||1);e=this.tweenColors(a.color,
+c.color,e)}return e},tweenColors:function(b,a,e){var c=a.rgba[3]!==1||b.rgba[3]!==1;return b.rgba.length===0||a.rgba.length===0?"none":(c?"rgba(":"rgb(")+Math.round(a.rgba[0]+(b.rgba[0]-a.rgba[0])*(1-e))+","+Math.round(a.rgba[1]+(b.rgba[1]-a.rgba[1])*(1-e))+","+Math.round(a.rgba[2]+(b.rgba[2]-a.rgba[2])*(1-e))+(c?","+(a.rgba[3]+(b.rgba[3]-a.rgba[3])*(1-e)):"")+")"}};a.seriesTypes.solidgauge=a.extendClass(a.seriesTypes.gauge,{type:"solidgauge",bindAxes:function(){var b;a.seriesTypes.gauge.prototype.bindAxes.call(this);
+b=this.yAxis;a.extend(b,m);b.options.dataClasses&&b.initDataClasses(b.options);b.initStops(b.options)},drawPoints:function(){var b=this,h=b.yAxis,e=h.center,c=b.options,k=b.chart.renderer;a.each(b.points,function(f){var g=f.graphic,d=h.startAngleRad+h.translate(f.y,null,null,null,!0),i=o(p(c.radius,100))*e[2]/200,l=o(p(c.innerRadius,60))*e[2]/200,n=h.toColor(f.y,f),j;if(n!=="none")j=f.color,f.color=n;c.wrap===!1&&(d=Math.max(h.startAngleRad,Math.min(h.endAngleRad,d)));d=d*180/Math.PI;d={x:e[0],y:e[1],
+r:i,innerR:l,start:h.startAngleRad,end:d/(180/Math.PI)};g?(i=d.d,g.attr({fill:f.color}).animate(d,{step:function(b,c){g.attr("fill",m.tweenColors(a.Color(j),a.Color(n),c.pos))}}),d.d=i):f.graphic=k.arc(d).attr({stroke:c.borderColor||"none","stroke-width":c.borderWidth||0,fill:f.color}).add(b.group)})},animate:null})})(Highcharts);
diff --git a/htdocs/js/lib/highstock/themes/dark-blue.js b/htdocs/js/lib/highstock/themes/dark-blue.js
new file mode 100644
index 00000000..7cf7138a
--- /dev/null
+++ b/htdocs/js/lib/highstock/themes/dark-blue.js
@@ -0,0 +1,254 @@
+/**
+ * Dark blue theme for Highcharts JS
+ * @author Torstein Honsi
+ */
+
+Highcharts.theme = {
+ colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
+ "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+ chart: {
+ backgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
+ stops: [
+ [0, 'rgb(48, 48, 96)'],
+ [1, 'rgb(0, 0, 0)']
+ ]
+ },
+ borderColor: '#000000',
+ borderWidth: 2,
+ className: 'dark-container',
+ plotBackgroundColor: 'rgba(255, 255, 255, .1)',
+ plotBorderColor: '#CCCCCC',
+ plotBorderWidth: 1
+ },
+ title: {
+ style: {
+ color: '#C0C0C0',
+ font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+ }
+ },
+ subtitle: {
+ style: {
+ color: '#666666',
+ font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+ }
+ },
+ xAxis: {
+ gridLineColor: '#333333',
+ gridLineWidth: 1,
+ labels: {
+ style: {
+ color: '#A0A0A0'
+ }
+ },
+ lineColor: '#A0A0A0',
+ tickColor: '#A0A0A0',
+ title: {
+ style: {
+ color: '#CCC',
+ fontWeight: 'bold',
+ fontSize: '12px',
+ fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+ }
+ }
+ },
+ yAxis: {
+ gridLineColor: '#333333',
+ labels: {
+ style: {
+ color: '#A0A0A0'
+ }
+ },
+ lineColor: '#A0A0A0',
+ minorTickInterval: null,
+ tickColor: '#A0A0A0',
+ tickWidth: 1,
+ title: {
+ style: {
+ color: '#CCC',
+ fontWeight: 'bold',
+ fontSize: '12px',
+ fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+ }
+ }
+ },
+ tooltip: {
+ backgroundColor: 'rgba(0, 0, 0, 0.75)',
+ style: {
+ color: '#F0F0F0'
+ }
+ },
+ toolbar: {
+ itemStyle: {
+ color: 'silver'
+ }
+ },
+ plotOptions: {
+ line: {
+ dataLabels: {
+ color: '#CCC'
+ },
+ marker: {
+ lineColor: '#333'
+ }
+ },
+ spline: {
+ marker: {
+ lineColor: '#333'
+ }
+ },
+ scatter: {
+ marker: {
+ lineColor: '#333'
+ }
+ },
+ candlestick: {
+ lineColor: 'white'
+ }
+ },
+ legend: {
+ itemStyle: {
+ font: '9pt Trebuchet MS, Verdana, sans-serif',
+ color: '#A0A0A0'
+ },
+ itemHoverStyle: {
+ color: '#FFF'
+ },
+ itemHiddenStyle: {
+ color: '#444'
+ }
+ },
+ credits: {
+ style: {
+ color: '#666'
+ }
+ },
+ labels: {
+ style: {
+ color: '#CCC'
+ }
+ },
+
+ navigation: {
+ buttonOptions: {
+ symbolStroke: '#DDDDDD',
+ hoverSymbolStroke: '#FFFFFF',
+ theme: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#606060'],
+ [0.6, '#333333']
+ ]
+ },
+ stroke: '#000000'
+ }
+ }
+ },
+
+ // scroll charts
+ rangeSelector: {
+ buttonTheme: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#888'],
+ [0.6, '#555']
+ ]
+ },
+ stroke: '#000000',
+ style: {
+ color: '#CCC',
+ fontWeight: 'bold'
+ },
+ states: {
+ hover: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#BBB'],
+ [0.6, '#888']
+ ]
+ },
+ stroke: '#000000',
+ style: {
+ color: 'white'
+ }
+ },
+ select: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.1, '#000'],
+ [0.3, '#333']
+ ]
+ },
+ stroke: '#000000',
+ style: {
+ color: 'yellow'
+ }
+ }
+ }
+ },
+ inputStyle: {
+ backgroundColor: '#333',
+ color: 'silver'
+ },
+ labelStyle: {
+ color: 'silver'
+ }
+ },
+
+ navigator: {
+ handles: {
+ backgroundColor: '#666',
+ borderColor: '#AAA'
+ },
+ outlineColor: '#CCC',
+ maskFill: 'rgba(16, 16, 16, 0.5)',
+ series: {
+ color: '#7798BF',
+ lineColor: '#A6C7ED'
+ }
+ },
+
+ scrollbar: {
+ barBackgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#888'],
+ [0.6, '#555']
+ ]
+ },
+ barBorderColor: '#CCC',
+ buttonArrowColor: '#CCC',
+ buttonBackgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#888'],
+ [0.6, '#555']
+ ]
+ },
+ buttonBorderColor: '#CCC',
+ rifleColor: '#FFF',
+ trackBackgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0, '#000'],
+ [1, '#333']
+ ]
+ },
+ trackBorderColor: '#666'
+ },
+
+ // special colors for some of the
+ legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
+ background2: 'rgb(35, 35, 70)',
+ dataLabelsColor: '#444',
+ textColor: '#C0C0C0',
+ maskColor: 'rgba(255,255,255,0.3)'
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
diff --git a/htdocs/js/lib/highstock/themes/dark-green.js b/htdocs/js/lib/highstock/themes/dark-green.js
new file mode 100644
index 00000000..4a7ad586
--- /dev/null
+++ b/htdocs/js/lib/highstock/themes/dark-green.js
@@ -0,0 +1,255 @@
+/**
+ * Dark blue theme for Highcharts JS
+ * @author Torstein Honsi
+ */
+
+Highcharts.theme = {
+ colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
+ "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+ chart: {
+ backgroundColor: {
+ linearGradient: [0, 0, 250, 500],
+ stops: [
+ [0, 'rgb(48, 96, 48)'],
+ [1, 'rgb(0, 0, 0)']
+ ]
+ },
+ borderColor: '#000000',
+ borderWidth: 2,
+ className: 'dark-container',
+ plotBackgroundColor: 'rgba(255, 255, 255, .1)',
+ plotBorderColor: '#CCCCCC',
+ plotBorderWidth: 1
+ },
+ title: {
+ style: {
+ color: '#C0C0C0',
+ font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+ }
+ },
+ subtitle: {
+ style: {
+ color: '#666666',
+ font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+ }
+ },
+ xAxis: {
+ gridLineColor: '#333333',
+ gridLineWidth: 1,
+ labels: {
+ style: {
+ color: '#A0A0A0'
+ }
+ },
+ lineColor: '#A0A0A0',
+ tickColor: '#A0A0A0',
+ title: {
+ style: {
+ color: '#CCC',
+ fontWeight: 'bold',
+ fontSize: '12px',
+ fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+ }
+ }
+ },
+ yAxis: {
+ gridLineColor: '#333333',
+ labels: {
+ style: {
+ color: '#A0A0A0'
+ }
+ },
+ lineColor: '#A0A0A0',
+ minorTickInterval: null,
+ tickColor: '#A0A0A0',
+ tickWidth: 1,
+ title: {
+ style: {
+ color: '#CCC',
+ fontWeight: 'bold',
+ fontSize: '12px',
+ fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+ }
+ }
+ },
+ tooltip: {
+ backgroundColor: 'rgba(0, 0, 0, 0.75)',
+ style: {
+ color: '#F0F0F0'
+ }
+ },
+ toolbar: {
+ itemStyle: {
+ color: 'silver'
+ }
+ },
+ plotOptions: {
+ line: {
+ dataLabels: {
+ color: '#CCC'
+ },
+ marker: {
+ lineColor: '#333'
+ }
+ },
+ spline: {
+ marker: {
+ lineColor: '#333'
+ }
+ },
+ scatter: {
+ marker: {
+ lineColor: '#333'
+ }
+ },
+ candlestick: {
+ lineColor: 'white'
+ }
+ },
+ legend: {
+ itemStyle: {
+ font: '9pt Trebuchet MS, Verdana, sans-serif',
+ color: '#A0A0A0'
+ },
+ itemHoverStyle: {
+ color: '#FFF'
+ },
+ itemHiddenStyle: {
+ color: '#444'
+ }
+ },
+ credits: {
+ style: {
+ color: '#666'
+ }
+ },
+ labels: {
+ style: {
+ color: '#CCC'
+ }
+ },
+
+
+ navigation: {
+ buttonOptions: {
+ symbolStroke: '#DDDDDD',
+ hoverSymbolStroke: '#FFFFFF',
+ theme: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#606060'],
+ [0.6, '#333333']
+ ]
+ },
+ stroke: '#000000'
+ }
+ }
+ },
+
+ // scroll charts
+ rangeSelector: {
+ buttonTheme: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#888'],
+ [0.6, '#555']
+ ]
+ },
+ stroke: '#000000',
+ style: {
+ color: '#CCC',
+ fontWeight: 'bold'
+ },
+ states: {
+ hover: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#BBB'],
+ [0.6, '#888']
+ ]
+ },
+ stroke: '#000000',
+ style: {
+ color: 'white'
+ }
+ },
+ select: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.1, '#000'],
+ [0.3, '#333']
+ ]
+ },
+ stroke: '#000000',
+ style: {
+ color: 'yellow'
+ }
+ }
+ }
+ },
+ inputStyle: {
+ backgroundColor: '#333',
+ color: 'silver'
+ },
+ labelStyle: {
+ color: 'silver'
+ }
+ },
+
+ navigator: {
+ handles: {
+ backgroundColor: '#666',
+ borderColor: '#AAA'
+ },
+ outlineColor: '#CCC',
+ maskFill: 'rgba(16, 16, 16, 0.5)',
+ series: {
+ color: '#7798BF',
+ lineColor: '#A6C7ED'
+ }
+ },
+
+ scrollbar: {
+ barBackgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#888'],
+ [0.6, '#555']
+ ]
+ },
+ barBorderColor: '#CCC',
+ buttonArrowColor: '#CCC',
+ buttonBackgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#888'],
+ [0.6, '#555']
+ ]
+ },
+ buttonBorderColor: '#CCC',
+ rifleColor: '#FFF',
+ trackBackgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0, '#000'],
+ [1, '#333']
+ ]
+ },
+ trackBorderColor: '#666'
+ },
+
+ // special colors for some of the
+ legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
+ background2: 'rgb(35, 35, 70)',
+ dataLabelsColor: '#444',
+ textColor: '#C0C0C0',
+ maskColor: 'rgba(255,255,255,0.3)'
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
diff --git a/htdocs/js/lib/highstock/themes/dark-unica.js b/htdocs/js/lib/highstock/themes/dark-unica.js
new file mode 100644
index 00000000..4f1f8df5
--- /dev/null
+++ b/htdocs/js/lib/highstock/themes/dark-unica.js
@@ -0,0 +1,213 @@
+/**
+ * Dark theme for Highcharts JS
+ * @author Torstein Honsi
+ */
+
+// Load the fonts
+Highcharts.createElement('link', {
+ href: 'http://fonts.googleapis.com/css?family=Unica+One',
+ rel: 'stylesheet',
+ type: 'text/css'
+}, null, document.getElementsByTagName('head')[0]);
+
+Highcharts.theme = {
+ colors: ["#2b908f", "#90ee7e", "#f45b5b", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
+ "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+ chart: {
+ backgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
+ stops: [
+ [0, '#2a2a2b'],
+ [1, '#3e3e40']
+ ]
+ },
+ style: {
+ fontFamily: "'Unica One', sans-serif"
+ },
+ plotBorderColor: '#606063'
+ },
+ title: {
+ style: {
+ color: '#E0E0E3',
+ textTransform: 'uppercase',
+ fontSize: '20px'
+ }
+ },
+ subtitle: {
+ style: {
+ color: '#E0E0E3',
+ textTransform: 'uppercase'
+ }
+ },
+ xAxis: {
+ gridLineColor: '#707073',
+ labels: {
+ style: {
+ color: '#E0E0E3'
+ }
+ },
+ lineColor: '#707073',
+ minorGridLineColor: '#505053',
+ tickColor: '#707073',
+ title: {
+ style: {
+ color: '#A0A0A3'
+
+ }
+ }
+ },
+ yAxis: {
+ gridLineColor: '#707073',
+ labels: {
+ style: {
+ color: '#E0E0E3'
+ }
+ },
+ lineColor: '#707073',
+ minorGridLineColor: '#505053',
+ tickColor: '#707073',
+ tickWidth: 1,
+ title: {
+ style: {
+ color: '#A0A0A3'
+ }
+ }
+ },
+ tooltip: {
+ backgroundColor: 'rgba(0, 0, 0, 0.85)',
+ style: {
+ color: '#F0F0F0'
+ }
+ },
+ plotOptions: {
+ series: {
+ dataLabels: {
+ color: '#B0B0B3'
+ },
+ marker: {
+ lineColor: '#333'
+ }
+ },
+ boxplot: {
+ fillColor: '#505053'
+ },
+ candlestick: {
+ lineColor: 'white'
+ },
+ errorbar: {
+ color: 'white'
+ }
+ },
+ legend: {
+ itemStyle: {
+ color: '#E0E0E3'
+ },
+ itemHoverStyle: {
+ color: '#FFF'
+ },
+ itemHiddenStyle: {
+ color: '#606063'
+ }
+ },
+ credits: {
+ style: {
+ color: '#666'
+ }
+ },
+ labels: {
+ style: {
+ color: '#707073'
+ }
+ },
+
+ drilldown: {
+ activeAxisLabelStyle: {
+ color: '#F0F0F3'
+ },
+ activeDataLabelStyle: {
+ color: '#F0F0F3'
+ }
+ },
+
+ navigation: {
+ buttonOptions: {
+ symbolStroke: '#DDDDDD',
+ theme: {
+ fill: '#505053'
+ }
+ }
+ },
+
+ // scroll charts
+ rangeSelector: {
+ buttonTheme: {
+ fill: '#505053',
+ stroke: '#000000',
+ style: {
+ color: '#CCC'
+ },
+ states: {
+ hover: {
+ fill: '#707073',
+ stroke: '#000000',
+ style: {
+ color: 'white'
+ }
+ },
+ select: {
+ fill: '#000003',
+ stroke: '#000000',
+ style: {
+ color: 'white'
+ }
+ }
+ }
+ },
+ inputBoxBorderColor: '#505053',
+ inputStyle: {
+ backgroundColor: '#333',
+ color: 'silver'
+ },
+ labelStyle: {
+ color: 'silver'
+ }
+ },
+
+ navigator: {
+ handles: {
+ backgroundColor: '#666',
+ borderColor: '#AAA'
+ },
+ outlineColor: '#CCC',
+ maskFill: 'rgba(255,255,255,0.1)',
+ series: {
+ color: '#7798BF',
+ lineColor: '#A6C7ED'
+ },
+ xAxis: {
+ gridLineColor: '#505053'
+ }
+ },
+
+ scrollbar: {
+ barBackgroundColor: '#808083',
+ barBorderColor: '#808083',
+ buttonArrowColor: '#CCC',
+ buttonBackgroundColor: '#606063',
+ buttonBorderColor: '#606063',
+ rifleColor: '#FFF',
+ trackBackgroundColor: '#404043',
+ trackBorderColor: '#404043'
+ },
+
+ // special colors for some of the
+ legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
+ background2: '#505053',
+ dataLabelsColor: '#B0B0B3',
+ textColor: '#C0C0C0',
+ contrastTextColor: '#F0F0F3',
+ maskColor: 'rgba(255,255,255,0.3)'
+};
+
+// Apply the theme
+Highcharts.setOptions(Highcharts.theme);
diff --git a/htdocs/js/lib/highstock/themes/gray.js b/htdocs/js/lib/highstock/themes/gray.js
new file mode 100644
index 00000000..d9a40169
--- /dev/null
+++ b/htdocs/js/lib/highstock/themes/gray.js
@@ -0,0 +1,257 @@
+/**
+ * Gray theme for Highcharts JS
+ * @author Torstein Honsi
+ */
+
+Highcharts.theme = {
+ colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee",
+ "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+ chart: {
+ backgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0, 'rgb(96, 96, 96)'],
+ [1, 'rgb(16, 16, 16)']
+ ]
+ },
+ borderWidth: 0,
+ borderRadius: 0,
+ plotBackgroundColor: null,
+ plotShadow: false,
+ plotBorderWidth: 0
+ },
+ title: {
+ style: {
+ color: '#FFF',
+ font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+ }
+ },
+ subtitle: {
+ style: {
+ color: '#DDD',
+ font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+ }
+ },
+ xAxis: {
+ gridLineWidth: 0,
+ lineColor: '#999',
+ tickColor: '#999',
+ labels: {
+ style: {
+ color: '#999',
+ fontWeight: 'bold'
+ }
+ },
+ title: {
+ style: {
+ color: '#AAA',
+ font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+ }
+ }
+ },
+ yAxis: {
+ alternateGridColor: null,
+ minorTickInterval: null,
+ gridLineColor: 'rgba(255, 255, 255, .1)',
+ minorGridLineColor: 'rgba(255,255,255,0.07)',
+ lineWidth: 0,
+ tickWidth: 0,
+ labels: {
+ style: {
+ color: '#999',
+ fontWeight: 'bold'
+ }
+ },
+ title: {
+ style: {
+ color: '#AAA',
+ font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+ }
+ }
+ },
+ legend: {
+ itemStyle: {
+ color: '#CCC'
+ },
+ itemHoverStyle: {
+ color: '#FFF'
+ },
+ itemHiddenStyle: {
+ color: '#333'
+ }
+ },
+ labels: {
+ style: {
+ color: '#CCC'
+ }
+ },
+ tooltip: {
+ backgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0, 'rgba(96, 96, 96, .8)'],
+ [1, 'rgba(16, 16, 16, .8)']
+ ]
+ },
+ borderWidth: 0,
+ style: {
+ color: '#FFF'
+ }
+ },
+
+
+ plotOptions: {
+ series: {
+ nullColor: '#444444'
+ },
+ line: {
+ dataLabels: {
+ color: '#CCC'
+ },
+ marker: {
+ lineColor: '#333'
+ }
+ },
+ spline: {
+ marker: {
+ lineColor: '#333'
+ }
+ },
+ scatter: {
+ marker: {
+ lineColor: '#333'
+ }
+ },
+ candlestick: {
+ lineColor: 'white'
+ }
+ },
+
+ toolbar: {
+ itemStyle: {
+ color: '#CCC'
+ }
+ },
+
+ navigation: {
+ buttonOptions: {
+ symbolStroke: '#DDDDDD',
+ hoverSymbolStroke: '#FFFFFF',
+ theme: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#606060'],
+ [0.6, '#333333']
+ ]
+ },
+ stroke: '#000000'
+ }
+ }
+ },
+
+ // scroll charts
+ rangeSelector: {
+ buttonTheme: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#888'],
+ [0.6, '#555']
+ ]
+ },
+ stroke: '#000000',
+ style: {
+ color: '#CCC',
+ fontWeight: 'bold'
+ },
+ states: {
+ hover: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#BBB'],
+ [0.6, '#888']
+ ]
+ },
+ stroke: '#000000',
+ style: {
+ color: 'white'
+ }
+ },
+ select: {
+ fill: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.1, '#000'],
+ [0.3, '#333']
+ ]
+ },
+ stroke: '#000000',
+ style: {
+ color: 'yellow'
+ }
+ }
+ }
+ },
+ inputStyle: {
+ backgroundColor: '#333',
+ color: 'silver'
+ },
+ labelStyle: {
+ color: 'silver'
+ }
+ },
+
+ navigator: {
+ handles: {
+ backgroundColor: '#666',
+ borderColor: '#AAA'
+ },
+ outlineColor: '#CCC',
+ maskFill: 'rgba(16, 16, 16, 0.5)',
+ series: {
+ color: '#7798BF',
+ lineColor: '#A6C7ED'
+ }
+ },
+
+ scrollbar: {
+ barBackgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#888'],
+ [0.6, '#555']
+ ]
+ },
+ barBorderColor: '#CCC',
+ buttonArrowColor: '#CCC',
+ buttonBackgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0.4, '#888'],
+ [0.6, '#555']
+ ]
+ },
+ buttonBorderColor: '#CCC',
+ rifleColor: '#FFF',
+ trackBackgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+ stops: [
+ [0, '#000'],
+ [1, '#333']
+ ]
+ },
+ trackBorderColor: '#666'
+ },
+
+ // special colors for some of the demo examples
+ legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
+ background2: 'rgb(70, 70, 70)',
+ dataLabelsColor: '#444',
+ textColor: '#E0E0E0',
+ maskColor: 'rgba(255,255,255,0.3)'
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
diff --git a/htdocs/js/lib/highstock/themes/grid-light.js b/htdocs/js/lib/highstock/themes/grid-light.js
new file mode 100644
index 00000000..acf53aec
--- /dev/null
+++ b/htdocs/js/lib/highstock/themes/grid-light.js
@@ -0,0 +1,74 @@
+/**
+ * Grid-light theme for Highcharts JS
+ * @author Torstein Honsi
+ */
+
+// Load the fonts
+Highcharts.createElement('link', {
+ href: 'http://fonts.googleapis.com/css?family=Dosis:400,600',
+ rel: 'stylesheet',
+ type: 'text/css'
+}, null, document.getElementsByTagName('head')[0]);
+
+Highcharts.theme = {
+ colors: ["#7cb5ec", "#f7a35c", "#90ee7e", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
+ "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+ chart: {
+ backgroundColor: null,
+ style: {
+ fontFamily: "Dosis, sans-serif"
+ }
+ },
+ title: {
+ style: {
+ fontSize: '16px',
+ fontWeight: 'bold',
+ textTransform: 'uppercase'
+ }
+ },
+ tooltip: {
+ borderWidth: 0,
+ backgroundColor: 'rgba(219,219,216,0.8)',
+ shadow: false
+ },
+ legend: {
+ itemStyle: {
+ fontWeight: 'bold',
+ fontSize: '13px'
+ }
+ },
+ xAxis: {
+ gridLineWidth: 1,
+ labels: {
+ style: {
+ fontSize: '12px'
+ }
+ }
+ },
+ yAxis: {
+ minorTickInterval: 'auto',
+ title: {
+ style: {
+ textTransform: 'uppercase'
+ }
+ },
+ labels: {
+ style: {
+ fontSize: '12px'
+ }
+ }
+ },
+ plotOptions: {
+ candlestick: {
+ lineColor: '#404048'
+ }
+ },
+
+
+ // General
+ background2: '#F0F0EA'
+
+};
+
+// Apply the theme
+Highcharts.setOptions(Highcharts.theme);
diff --git a/htdocs/js/lib/highstock/themes/grid.js b/htdocs/js/lib/highstock/themes/grid.js
new file mode 100644
index 00000000..70342f5e
--- /dev/null
+++ b/htdocs/js/lib/highstock/themes/grid.js
@@ -0,0 +1,103 @@
+/**
+ * Grid theme for Highcharts JS
+ * @author Torstein Honsi
+ */
+
+Highcharts.theme = {
+ colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
+ chart: {
+ backgroundColor: {
+ linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
+ stops: [
+ [0, 'rgb(255, 255, 255)'],
+ [1, 'rgb(240, 240, 255)']
+ ]
+ },
+ borderWidth: 2,
+ plotBackgroundColor: 'rgba(255, 255, 255, .9)',
+ plotShadow: true,
+ plotBorderWidth: 1
+ },
+ title: {
+ style: {
+ color: '#000',
+ font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+ }
+ },
+ subtitle: {
+ style: {
+ color: '#666666',
+ font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+ }
+ },
+ xAxis: {
+ gridLineWidth: 1,
+ lineColor: '#000',
+ tickColor: '#000',
+ labels: {
+ style: {
+ color: '#000',
+ font: '11px Trebuchet MS, Verdana, sans-serif'
+ }
+ },
+ title: {
+ style: {
+ color: '#333',
+ fontWeight: 'bold',
+ fontSize: '12px',
+ fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+ }
+ }
+ },
+ yAxis: {
+ minorTickInterval: 'auto',
+ lineColor: '#000',
+ lineWidth: 1,
+ tickWidth: 1,
+ tickColor: '#000',
+ labels: {
+ style: {
+ color: '#000',
+ font: '11px Trebuchet MS, Verdana, sans-serif'
+ }
+ },
+ title: {
+ style: {
+ color: '#333',
+ fontWeight: 'bold',
+ fontSize: '12px',
+ fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+ }
+ }
+ },
+ legend: {
+ itemStyle: {
+ font: '9pt Trebuchet MS, Verdana, sans-serif',
+ color: 'black'
+
+ },
+ itemHoverStyle: {
+ color: '#039'
+ },
+ itemHiddenStyle: {
+ color: 'gray'
+ }
+ },
+ labels: {
+ style: {
+ color: '#99b'
+ }
+ },
+
+ navigation: {
+ buttonOptions: {
+ theme: {
+ stroke: '#CCCCCC'
+ }
+ }
+ }
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
diff --git a/htdocs/js/lib/highstock/themes/sand-signika.js b/htdocs/js/lib/highstock/themes/sand-signika.js
new file mode 100644
index 00000000..27198331
--- /dev/null
+++ b/htdocs/js/lib/highstock/themes/sand-signika.js
@@ -0,0 +1,101 @@
+/**
+ * Sand-Signika theme for Highcharts JS
+ * @author Torstein Honsi
+ */
+
+// Load the fonts
+Highcharts.createElement('link', {
+ href: 'http://fonts.googleapis.com/css?family=Signika:400,700',
+ rel: 'stylesheet',
+ type: 'text/css'
+}, null, document.getElementsByTagName('head')[0]);
+
+// Add the background image to the container
+Highcharts.wrap(Highcharts.Chart.prototype, 'getContainer', function (proceed) {
+ proceed.call(this);
+ this.container.style.background = 'url(http://www.highcharts.com/samples/graphics/sand.png)';
+});
+
+
+Highcharts.theme = {
+ colors: ["#f45b5b", "#8085e9", "#8d4654", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
+ "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+ chart: {
+ backgroundColor: null,
+ style: {
+ fontFamily: "Signika, serif"
+ }
+ },
+ title: {
+ style: {
+ color: 'black',
+ fontSize: '16px',
+ fontWeight: 'bold'
+ }
+ },
+ subtitle: {
+ style: {
+ color: 'black'
+ }
+ },
+ tooltip: {
+ borderWidth: 0
+ },
+ legend: {
+ itemStyle: {
+ fontWeight: 'bold',
+ fontSize: '13px'
+ }
+ },
+ xAxis: {
+ labels: {
+ style: {
+ color: '#6e6e70'
+ }
+ }
+ },
+ yAxis: {
+ labels: {
+ style: {
+ color: '#6e6e70'
+ }
+ }
+ },
+ plotOptions: {
+ series: {
+ shadow: true
+ },
+ candlestick: {
+ lineColor: '#404048'
+ }
+ },
+
+ // Highstock specific
+ navigator: {
+ xAxis: {
+ gridLineColor: '#D0D0D8'
+ }
+ },
+ rangeSelector: {
+ buttonTheme: {
+ fill: 'white',
+ stroke: '#C0C0C8',
+ 'stroke-width': 1,
+ states: {
+ select: {
+ fill: '#D0D0D8'
+ }
+ }
+ }
+ },
+ scrollbar: {
+ trackBorderColor: '#C0C0C8'
+ },
+
+ // General
+ background2: '#E0E0E8'
+
+};
+
+// Apply the theme
+Highcharts.setOptions(Highcharts.theme);
diff --git a/htdocs/js/lib/highstock/themes/skies.js b/htdocs/js/lib/highstock/themes/skies.js
new file mode 100644
index 00000000..d58b1f24
--- /dev/null
+++ b/htdocs/js/lib/highstock/themes/skies.js
@@ -0,0 +1,89 @@
+/**
+ * Skies theme for Highcharts JS
+ * @author Torstein Honsi
+ */
+
+Highcharts.theme = {
+ colors: ["#514F78", "#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B"],
+ chart: {
+ className: 'skies',
+ borderWidth: 0,
+ plotShadow: true,
+ plotBackgroundImage: 'http://www.highcharts.com/demo/gfx/skies.jpg',
+ plotBackgroundColor: {
+ linearGradient: [0, 0, 250, 500],
+ stops: [
+ [0, 'rgba(255, 255, 255, 1)'],
+ [1, 'rgba(255, 255, 255, 0)']
+ ]
+ },
+ plotBorderWidth: 1
+ },
+ title: {
+ style: {
+ color: '#3E576F',
+ font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+ }
+ },
+ subtitle: {
+ style: {
+ color: '#6D869F',
+ font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+ }
+ },
+ xAxis: {
+ gridLineWidth: 0,
+ lineColor: '#C0D0E0',
+ tickColor: '#C0D0E0',
+ labels: {
+ style: {
+ color: '#666',
+ fontWeight: 'bold'
+ }
+ },
+ title: {
+ style: {
+ color: '#666',
+ font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+ }
+ }
+ },
+ yAxis: {
+ alternateGridColor: 'rgba(255, 255, 255, .5)',
+ lineColor: '#C0D0E0',
+ tickColor: '#C0D0E0',
+ tickWidth: 1,
+ labels: {
+ style: {
+ color: '#666',
+ fontWeight: 'bold'
+ }
+ },
+ title: {
+ style: {
+ color: '#666',
+ font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+ }
+ }
+ },
+ legend: {
+ itemStyle: {
+ font: '9pt Trebuchet MS, Verdana, sans-serif',
+ color: '#3E576F'
+ },
+ itemHoverStyle: {
+ color: 'black'
+ },
+ itemHiddenStyle: {
+ color: 'silver'
+ }
+ },
+ labels: {
+ style: {
+ color: '#3E576F'
+ }
+ }
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);