Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset error for php 5.5.* #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/distribusi_listrik_PLN.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ Tahun;Sosial;Rumah_Tangga;Bisnis;Industri;Publik
2005;2429858;41184272;17022873;42448363;3946933
2006;2603623;43753223;18415513;43615446;4222040
2007;2908719;47324905;20608473;45802511;4602230
2008;3082428;50184187;22926282;47968859;4857099
2008;3082.428;50184187;22926282;47968859;4857099
2009;3384361;54945410;24825243;46204240;5222795
</DATA>
1 change: 1 addition & 0 deletions graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
$ticks_str = "['".(implode("','", $ticks))."']";

$data_str = "[";
$data_strs = array();
foreach($plot_data as $index=>$data)
{
$data_strs[] .= "[".implode(",", $data)."]";
Expand Down
8 changes: 5 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

// Process query or get catalog
$TITLE = 'Gudang Data Indonesia';
$query = $_GET['q'];
$output = $_GET['o'];
$query = (isset($_GET['q']) ? $_GET['q'] : "");
$output = (isset($_GET['o']) ? $_GET['o'] : "");
if (isset($query))
{
$gdi = new gdi();
Expand All @@ -41,6 +41,7 @@
if ($output == 'meta') $CONTENT = json_encode($meta);
$TITLE = $meta['deskripsi'];
$types = json_decode('{"html":"","meta":"","graph":"","csv":"","json":"","xml":""}', true);
$ACTION = true;
foreach ($types as $key => $val)
{
$ACTION .= sprintf('<li><a href="./%1$s?q=%2$s&o=%3$s">%4$s</a></li>',
Expand All @@ -59,6 +60,7 @@
}

// Further process if else
$MENU = true;
$MENU .= '<li><a href="./?">Katalog</a></li>';
$MENU .= '<li><a href="#">Dataset baru</a></li>';
$MENU = '<ul class="menu">' . $MENU . '</ul>';
Expand All @@ -70,7 +72,7 @@
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="id" dir="ltr"" xmlns="http://www.w3.org/1999/xhtml">
<html lang="id" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo($TITLE); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Expand Down