コード例 #1
0
ファイル: module_menu.php プロジェクト: skymak2050/Schol2
function ModuleMenu($head, $module_id, $arr_menu, $arr_images = "")
{
    $ui = $GLOBALS['ui'];
    $wb = $GLOBALS['wb'];
    $c = "<table class='plain'>\n";
    $c .= "<tr>\n";
    $c .= "<td colspan='2' class='bold'>" . $head . "</td>\n";
    $c .= "</tr>\n";
    /* LOOP ALL THE ITEMS IN THE MENU ARRAY */
    for ($i = 0; $i < count($arr_menu); $i++) {
        /* CHECK THE ACL FOR THIS MODULE */
        //echo $GLOBALS['wui']->RoleID()."<br>";
        //echo $module."<br>";
        //echo $arr_menu[$i]."<br>";
        if (CheckAccess($GLOBALS['wui']->RoleID(), $module_id, $arr_menu[$i])) {
            $friendly = InitCap($arr_menu[$i]);
            if (defined('_VALID_MVH_MOBILE_')) {
                $c .= "<tr><td colspan='2'>+<a href='index.php?module=" . EscapeData($_GET['module']) . "&task=" . $arr_menu[$i] . "'>" . $friendly . "</a></td></tr>";
            } else {
                $c .= "<tr>\n";
                $c .= "<td width='16'><img src='" . $wb . "images/" . $arr_images[$i] . "'></td>\n";
                $c .= "<td><a href='index.php?module=" . EscapeData($_GET['module']) . "&task=" . $arr_menu[$i] . "'>" . $friendly . "</a></td>\n";
                $c .= "</tr>\n";
            }
        }
    }
    $c .= "</table>\n";
    return $c;
}
コード例 #2
0
ファイル: tab_boxes.php プロジェクト: skymak2050/Schol2
 function DrawTopMenu()
 {
     $c = "<table class='plain_border'>\n";
     $c .= "<tr>\n";
     $width = 100 / count($this->arr);
     for ($i = 0; $i < count($this->arr); $i++) {
         $c .= "<td class='bold' width='" . $width . "%' align='center'><a href='#stayhere' id='Head_" . $this->arr[$i] . "' onClick=\"Display" . $this->arr[$i] . "()\">" . InitCap($this->arr[$i]) . "</a></td>\n";
     }
     $c .= "</tr>\n";
     $c .= "</table>\n";
     return $c;
 }
コード例 #3
0
function ModuleMenuDynamic($module_id, $module_name, $items)
{
    $ui = $GLOBALS['ui'];
    $dr = $GLOBALS['dr'];
    $wb = $GLOBALS['wb'];
    $module_id = $GLOBALS['module_id'];
    $c = "<table class='plain' width='150'>\n";
    $c .= "<tr>\n";
    $c .= "<td colspan='3' class='bold'>" . InitCap($module_name) . " Menu</td>\n";
    $c .= "</tr>\n";
    /* LOOP ALL THE ITEMS IN THE MENU ARRAY */
    for ($i = 0; $i < count($items); $i++) {
        /* CHECK THE ACL FOR THIS MODULE */
        //echo $GLOBALS['wui']->RoleID()."<br>";
        //echo $module."<br>";
        //echo $arr_menu[$i]."<br>";
        $task_img_desc = STRTOLOWER($items[$i]);
        $task_img_desc = STR_REPLACE(" ", "_", $task_img_desc);
        //echo $task_img_desc."<br>";
        if (CheckAccess($GLOBALS['wui']->RoleID(), $module_id, $task_img_desc)) {
            $friendly = InitCap($items[$i]);
            if (defined('_VALID_MVH_MOBILE_')) {
                $c .= "<tr><td colspan='2'>+<a href='index.php?module=" . $module_name . "&task=" . $task_img_desc . "'>" . $friendly . "</a></td></tr>";
            } else {
                $icon_file = $dr . "modules/" . $module_name . "/images/default/" . $task_img_desc . ".png";
                $icon_http = "modules/" . $module_name . "/images/default/" . $task_img_desc . ".png";
                //echo $icon."<br>";
                if (file_exists($icon_file)) {
                    $icon_file = $icon_http;
                } else {
                    $icon_file = $wb . "images/nuvola/16x16/actions/view_remove.png";
                }
                if ($_GET['task'] == $task_img_desc) {
                    $arrow = "<img src='images/nuvola/16x16/actions/player_play.png'>";
                    $bgcolor = "#dedede";
                } else {
                    $arrow = "";
                    $bgcolor = "#ffffff";
                }
                $c .= "<tr>\n";
                $c .= "<td width='16'>" . $arrow . "</td>\n";
                $c .= "<td width='16'><img src='" . $icon_file . "'></td>\n";
                $c .= "<td bgcolor='" . $bgcolor . "' width='134'><a href='index.php?module=" . $module_name . "&task=" . $task_img_desc . "'>" . $friendly . "</a></td>\n";
                $c .= "</tr>\n";
            }
        }
    }
    $c .= "</table>\n";
    return $c;
}
コード例 #4
0
ファイル: home_task_info.php プロジェクト: skymak2050/Schol2
function HomeTaskInfo()
{
    $s = "<table class='plain' width='100%' height='400' cellpadding='0' cellspacing='0'>\n";
    $s .= "<tr>\n";
    $s .= "<td colspan='3' height='2' background='images/home/bg_faded_line.gif'><img src='images/spacer.gif'></td>\n";
    $s .= "</tr>\n";
    $s .= "<tr>\n";
    $s .= "<td width='200' align='center' background='images/home/bg_faded_line_left.gif' class='homehead'><img src='modules/" . $_GET['module'] . "/images/default/icon_module.png'><br>" . InitCap($_GET['module']) . "</td>";
    $s .= "<td width='2' bgcolor='#336699'></td>";
    //$s.="<td width='500' align='center' valign='top' background='images/home/bg_faded_line_right.gif' class='homebody'><br><br></h3>Welcome to the module</h3></td>";
    $s .= "<td width='500' align='center' valign='top' background='images/home/bg_faded_line_right.gif' class='homebody'>" . ContentPanel() . "</td>";
    $s .= "</tr>\n";
    $s .= "<tr>\n";
    $s .= "<td colspan='3' height='2' background='images/home/bg_faded_line.gif'><img src='images/spacer.gif'></td>\n";
    $s .= "</tr>\n";
    $s .= "</table>\n";
    return $s;
}