Esempio n. 1
0
} elseif ($no_content_for_this_page || $content["main"] === '') {
    // [404_ELSE] … {404_ELSE} … [/404_ELSE]
    $content["main"] .= render_cnt_template($block["errortext"], '404', '', '<!-- Just empty: Why ever, there is no content! -->');
}
//check if one of needed block texts and values are empty and if then fill with content
if (empty($block["maintext"])) {
    $block["maintext"] = $content["main"];
}
//normal page operation
if ($aktion[2] == 0) {
    switch ($pagelayout["layout_render"]) {
        case 0:
            //create the page layout table (header, left, content, right, footer)
            $content["all"] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"";
            //start main table
            $content["all"] .= td_attributes($pagelayout, "all", 0);
            $content["all"] .= align_base_layout($pagelayout["layout_align"]) . " summary=\"\">" . LF;
            // align table
            //header
            $content["all"] .= colspan_table_row($pagelayout, "header", $colspan, $block["headertext"]);
            //header row
            if ($pagelayout["layout_topspace_height"]) {
                //header space
                $content["all"] .= colspan_table_row($pagelayout, "topspace", $colspan, spacer(1, $pagelayout["layout_topspace_height"]));
            }
            //returns the main blocks: left column, content column, right column
            $content["all"] .= get_table_block($pagelayout, $block["maintext"], $block["lefttext"], $block["righttext"]);
            //footer
            if ($pagelayout["layout_bottomspace_height"]) {
                //bottom space
                $content["all"] .= colspan_table_row($pagelayout, "bottomspace", $colspan, spacer(1, $pagelayout["layout_bottomspace_height"]));
Esempio n. 2
0
function get_table_block($val, $content = "", $leftblock = "", $rightblock = "")
{
    //creates the string with all relevant main block data
    //$val = $pagelayout array values
    $mainblock = "<tr>\n";
    //start row
    //if 3column or 2column (with left block)
    if ($val["layout_type"] == 0 || $val["layout_type"] == 1) {
        $mainblock .= "<td" . td_attributes($val, "left") . ">" . $leftblock . "</td>\n";
    }
    //if there is a spacer column between left and main block
    if ($val["layout_leftspace_width"]) {
        $mainblock .= "<td" . td_attributes($val, "leftspace") . ">";
        $mainblock .= spacer($val["layout_leftspace_width"]);
        $mainblock .= "</td>\n";
    }
    $mainblock .= "<td" . td_attributes($val, "content") . ">" . $content . "</td>\n";
    //if there is a spacer column between main block and right column
    if ($val["layout_rightspace_width"]) {
        $mainblock .= "<td" . td_attributes($val, "rightspace") . ">";
        $mainblock .= spacer($val["layout_rightspace_width"]);
        $mainblock .= "</td>\n";
    }
    //if 3column or 2column (with right block)
    if ($val["layout_type"] == 0 || $val["layout_type"] == 2) {
        $mainblock .= "<td" . td_attributes($val, "right") . ">" . $rightblock . "</td>\n";
    }
    $mainblock .= "</tr>\n";
    //end row
    return $mainblock;
}