function block_render($mname)
{
    $mod_dir = "modules/{$mname}/blocks";
    if (@is_dir($mod_dir)) {
        if ($dh = @opendir($mod_dir)) {
            while (($file = @readdir($dh)) !== false) {
                if ($file != '.' and $file != '..' and substr($file, strlen($file) - 3, 3) != 'LCK' and substr($file, strlen($file) - 3, 3) != 'LOG') {
                    $reqfile = "./modules/{$mname}/blocks/" . $file;
                    @(require $reqfile);
                    block_create($block_id, $block_title, $block_content);
                }
            }
            closedir($dh);
        }
    }
}
Example #2
0
function sch_block()
{
    global $home_url;
    $sekretariat_url = "index.php?_mod=sekretariat";
    $logout_url = "index.php?_mod=logout";
    //$sch_content  = "<li><a href=${sekretariat_url}&task=admin_agenda&act=new>Jadwal</a></li>";
    // $srt_content  .= "<li><a href=${logout_url}&task=logout><i>Logout</i></a></li>";
    block_create('Schedule', $sch_content);
}