histogram: Make histograms crash less
[ninja.git] / application / views / tac / index.php
blobcbe1ec78ffd5fc65765de4a818eff555d8f09f8a
1 <?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
3 <div id="response"></div>
5 <?php
6 function render_placeholder( $widgets, $placeholder, $style='' ) {
7 $widget_list = isset($widgets[$placeholder])?$widgets[$placeholder]:array();
8 $placeholder_id = 'widget-placeholder';
9 if( $placeholder > 0 )
10 $placeholder_id .= $placeholder;
11 echo '<div class="widget-place" id="'.$placeholder_id.'" style="'.htmlentities($style).'">';
12 foreach ($widget_list as $idx => $widget) {
13 echo $widget;
15 echo "</div>";
18 $i = 0;
19 foreach( $tac_column_count as $count ) {
20 for( $j=0; $j<$count; $j++ ) {
21 render_placeholder($widgets, $i, 'width: '.(100/$count).'%;' );
22 $i++;
24 echo '<div style="clear: both;"></div>';