Skip to content

Commit

Permalink
add:hichart demo fix js and css cdn url
Browse files Browse the repository at this point in the history
  • Loading branch information
sheyi committed Jul 8, 2014
1 parent b895b0f commit 10153c2
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 43 deletions.
52 changes: 22 additions & 30 deletions chart.php
Expand Up @@ -2,53 +2,45 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!---------------------------
// higrid嗨网 中文PHP表格, Copyright (C) 2003 - 2011 http://higrid.net
// higrid嗨网 中文PHP表格, Copyright (C) 2003 - 2014 http://higrid.net
---------------------------->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>嗨网HiGrid演示</title>
<script src="js/jquery.js"></script>
<link rel="stylesheet" href="http://higrid.net/include/css/higridstock.css?20130313" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" src="http://higrid.net/include/js/higridstock.js?20130313" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" media="screen" href="//lib.sinaapp.com/js/jquery-ui/1.10.2/themes/redmond/jquery-ui.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="//cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="//cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/plugins/ui.multiselect.css" />


<script src="//libs.baidu.com/jquery/1.9.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/js/i18n/grid.locale-cn.js" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="//lib.sinaapp.com/js/jquery-ui/1.10.2/jquery-ui.min.js "></script>
<script type="text/javascript">
$.jgrid.no_legacy_api = true;
$.jgrid.useJSON = true;
</script>

</head>
<body>

<div>
<?php
defined('HIGRIDPROPATH') || define('HIGRIDPROPATH', dirname(__FILE__).'/');
//error_reporting(0);


$ex=rtrim(strtolower($_GET['ex']));
<?php
//error_reporting(0);

$higridchart=file_exists(HIGRIDPROPATH.'/chart/'. $ex ) ? HIGRIDPROPATH.'/chart/'. $ex : HIGRIDPROPATH.'/chart/default.php';
defined('HIGRID_PATH') || define('HIGRID_PATH', str_replace('\\', '/', __DIR__) . '/');
require(HIGRID_PATH . 'config/functions.php');

$ex=rtrim(strtolower($_GET['id'])).'.php';
$higridchart=file_exists(HIGRID_PATH.'/chart/'. $ex ) ? HIGRID_PATH.'/chart/'. $ex : HIGRID_PATH.'/example/chart.php';
include_once $higridchart;

?>

<table id="grid"></table>
<div id="pager"></div>



</div>

<br />
<div style="border:1px dotted #F90; border-left:6px solid #F60; padding:15px; background:#FFC">
<a href="http://higrid.net/">PHP程序由嗨网HiGrid.net提供</a>
</div>


<div style="display:none">
<!--HIGRID GOOGLE STATS -->
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fe800be547df3ec1416d26a49a98b6f44' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript" src="http://higrid.net/include/js/statgoogle.js" charset="utf-8"></script>
<script src="http://s20.cnzz.com/stat.php?id=3552716&web_id=3552716" language="javascript"></script>
</div>

<script src="//lib.sinaapp.com/js/highstock/2.0.1/highstock.js"></script>
</body>
</html>
8 changes: 2 additions & 6 deletions chart/config.php
Expand Up @@ -15,10 +15,6 @@
define('DB_PASSWORD', 'higridpass'); // 将higridpass替换成您的mysql密码
*/



require(HIPATH.'../../config/higrid.php');//演示数据库设置,经过上述设置后注释本条
require(HIPATH.'../../config/demo_higrid_pro.php');//演示数据库设置,经过上述设置后注释本条

require(HIPATH.'../config/data.php');//演示数据库设置,经过上述设置后注释本条
defined('IN_HIGRID') || define('IN_HIGRID', true); // 常量定义
require_once(HIPATH.'../higrid/HiGrid_chart.php');// higrid php主文件
require_once(HIPATH.'../higrid/HiGrid_chart.php');// higrid php主文件
4 changes: 4 additions & 0 deletions config/functions.php
Expand Up @@ -27,3 +27,7 @@ function higrid_csv_to_array($filename = '', $delimiter = ',')
function higrid_demo_link($a){
return '<a href="/example.php?id='.$a.'" target="_blank">'.$a.'在线演示</a>';
}

function hichart_demo_link($a){
return '<a href="/chart.php?id='.$a.'" target="_blank">'.$a.'在线演示</a>';
}
35 changes: 35 additions & 0 deletions config/hichart_demo.csv
@@ -0,0 +1,35 @@
demo,page,comment
区域图,areabasic,暂无描述
区域图,areainvert,暂无描述
间断图,areamissing,暂无描述
带复制区域图,areanegative,暂无描述
百分比区域图,areapercent,暂无描述
调整节点,areaspline,暂无描述
调整节点,areastacked,暂无描述
条状图,barbasic,暂无描述
条状图2,barnegative,暂无描述
条状图3,barstacked,暂无描述
典型图,basic,暂无描述
柱状图,columnbasic,暂无描述
柱状图3,columnegative,暂无描述
柱状图4,columnpercent,暂无描述
柱状图5,columnrotate,暂无描述
柱状图6,columnstacked,暂无描述
柱状图7,columnstackgroup,暂无描述
综合图,combo,暂无描述
双坐标,combo_dual_axes,暂无描述
多坐标,combo_multi_axes,暂无描述
综合散点图,combo_scatter,暂无描述
动态图,dynnewpoint,暂无描述
调整节点,labels,暂无描述
饼状图1,pie,暂无描述
饼状图2,piedonut,暂无描述
饼状图3,pielegend,暂无描述
散点图,skatter,暂无描述
曲线图,splineinvert,暂无描述
调整节点,splineplot,暂无描述
带标识曲线图,splinesymbol,暂无描述
sql查询,sql,暂无描述
sql查询2,sqlbar,暂无描述
图标结合,sqlgridchart,暂无描述
时区图,timezoom,暂无描述
8 changes: 3 additions & 5 deletions example.php
Expand Up @@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!---------------------------
// higrid嗨网 中文PHP表格, Copyright (C) 2003 - 2011 http://higrid.net
// higrid嗨网 中文PHP表格, Copyright (C) 2003 - 2014 http://higrid.net
---------------------------->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
Expand All @@ -23,13 +23,10 @@
}
</style>

<script src="//libs.baidu.com/jquery/2.0.3/jquery.min.js"></script>
<script src="//libs.baidu.com/jquery/1.9.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/js/i18n/grid.locale-cn.js" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqgrid/4.6.0/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="//lib.sinaapp.com/js/jquery-ui/1.10.2/jquery-ui.min.js "></script>



<script type="text/javascript">
$.jgrid.no_legacy_api = true;
$.jgrid.useJSON = true;
Expand All @@ -50,5 +47,6 @@
include_once $higridpro;

?>
</div>
</body>
</html>
27 changes: 25 additions & 2 deletions index.php
Expand Up @@ -93,8 +93,31 @@

<!-- tab3-->
<div class="tab-pane" id="tab3">

<table class="table table-striped table-condensed table-hover">
hello
<tr>
<th>主要功能</th>
<th>在线演示</th>
<th>开放源代码</th>
<th>编辑</th>
<th>备注</th>
</tr>
<?php
$highcharts_csvdata=higrid_csv_to_array(HIGRID_PATH.'/config/hichart_demo.csv');
foreach($highcharts_csvdata as $k=>$x)
{
echo "<tr>";
echo "<td>".$x['demo']."</td>";
echo "<td>".hichart_demo_link($x['page'])."</td>";
echo '<td><a href="https://github.com/sheyi/higrid/blob/master/chart/'.$x['page'].'.php">源代码</a></td>';
echo '<td><a href="https://github.com/sheyi/higrid/edit/master/chart/'.$x['page'].'.php">编辑</a/td>';
echo "<td>".$x['comment']."</td>";
echo "</tr>";
}



?>
</table>

</div><!-- /tab3-->
Expand All @@ -120,7 +143,7 @@
</footer>

<!--javascript-->
<script src="http://libs.baidu.com/jquery/2.0.3/jquery.min.js"></script>
<script src="//libs.baidu.com/jquery/1.9.0/jquery.min.js"></script>
<!---
//CDN公共库
http://developer.baidu.com/wiki/index.php?title=docs/cplat/libs
Expand Down

0 comments on commit 10153c2

Please sign in to comment.