Example #1
0
                $logitem->Action = __("Create");
                break;
            case 2:
                $logitem->Action = __("Delete");
                break;
            case 3:
                $logitem->Action = __("Update");
                break;
            default:
        }
        $body .= "\t\t<tr>\n\t\t\t\t<td>{$logitem->Time}</td>\n\t\t\t\t<td>{$logitem->UserID}</td>\n\t\t\t\t<td>{$logitem->Class}</td>\n\t\t\t\t<td>{$logitem->ObjectID}</td>\n\t\t\t\t<td>{$logitem->ChildID}</td>\n\t\t\t\t<td>{$logitem->Action}</td>\n\t\t\t\t<td>{$logitem->Property}</td>\n\t\t\t\t<td>{$logitem->OldVal}</td>\n\t\t\t\t<td>{$logitem->NewVal}</td>\n\t\t</tr>\n";
    }
    $body .= "\t\t</tbody>\n\t</table>\n";
    return $body;
}
$body = BuildDataTable($log);
function buildselect($prop)
{
    $return_html = "<select name=\"{$prop}\"></select>";
    return $return_html;
}
?>
<!doctype html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="css/inventory.php" type="text/css">
  <link rel="stylesheet" href="css/print.css" type="text/css" media="print">
  <link rel="stylesheet" href="css/jquery-ui.css" type="text/css">
  <link rel="stylesheet" href="css/jquery.dataTables.css" type="text/css">
Example #2
0
            $p[] = $count == 0 ? '"' . $k . '"' : $k;
            $count++;
        }
        $chart_data[] = "[" . implode(",", $p) . "]";
    }
    foreach ($gheader as $d) {
        $header_data[] = '"' . $d . '"';
    }
    $header_data = "[" . implode(",", $header_data) . "]";
    $chart_data = implode(",", $chart_data);
    $full_chart_data = "[" . $header_data . "," . $chart_data . "]";
    return $full_chart_data;
}
$DataFile = $_SERVER['DOCUMENT_ROOT'] . "/googlechart/tread.csv";
$GChartData = csv_to_array($DataFile);
$full_chart_data = BuildDataTable($GChartData['data'], $GChartData['header']);
?>

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
  google.load("visualization", "1", {packages:["corechart"]});
  google.setOnLoadCallback(drawChart);
  function drawChart() {
    var data = google.visualization.arrayToDataTable(<?php 
echo $full_chart_data;
?>
);

    var options = {
        title: '',
        width: '100%',