Exemplo n.º 1
0
function load_widgets($dbc, $workspace = 1)
{
    $q = "SELECT * FROM widgets WHERE workspace = {$workspace}";
    $r = mysqli_query($dbc, $q);
    while ($widget = mysqli_fetch_assoc($r)) {
        build_widget($widget['name'], $widget['x'], $widget['y'], $widget['w'], $widget['h'], $widget['state'], $workspace);
    }
}
Exemplo n.º 2
0
<?php

require_once BASEPATH . "../themes/" . $cms['site_theme'] . "/lib/function.php";
?>
<hr />WIDGET<hr />
<?php 
echo build_widget($cms['widget'], 'sidebar');
?>
<hr />ADVERTISEMENT<hr />
<?php 
echo build_widget($cms['widget'], 'advertisement');