Exemple #1
0
                    }
                    echo "<div id=\"tab-content\">";
                    echo "\n<div class=\"tabContent\" id=\"breakdown\">";
                    echo "<ul class=\"graph\">";
                    echo "<li>" . render_chart_image('item_ownership') . "</li>";
                    echo "<li>" . render_chart_image('item_types') . "</li>";
                    echo "<li>" . render_chart_image('categories') . "</li>";
                    echo "</ul>";
                    echo "</div>";
                    reset($item_type_rs);
                    while (list(, $item_type_r) = each($item_type_rs)) {
                        echo "\n<div class=\"tabContentHidden\" id=\"{$item_type_r['s_item_type']}\">";
                        echo "<h3>" . get_opendb_lang_var('itemtype_breakdown', array('desc' => $item_type_r['description'], 's_item_type' => $item_type_r['s_item_type'], 'total' => $item_type_r['count'])) . "</h3>";
                        echo "<ul class=\"graph\">";
                        echo "<li>" . render_chart_image('item_type_ownership', $item_type_r['s_item_type']) . "</li>";
                        echo "<li>" . render_chart_image('item_type_category', $item_type_r['s_item_type']) . "</li>";
                        echo "</ul>";
                        echo "</div>\n";
                    }
                }
                echo "</div>";
            }
            echo _theme_footer();
        } else {
            opendb_not_authorised_page(PERM_VIEW_STATS, $HTTP_VARS);
        }
    } else {
        // invalid login, so login instead.
        redirect_login($PHP_SELF, $HTTP_VARS);
    }
} else {
 function renderBlock($userid, $lastvisit)
 {
     return "\n<ul>" . "<li>" . render_chart_image('categories') . "</li>" . "\n</ul>";
 }