function struct_levellist($struct, $key, $counter, $copy_article_content, $cut_article_content, $copy_id, $copy_article, $cut_id, $forbid_cut, $forbid_copy, $listmode, $cut_article, $count_row, $dbcon)
{
    global $BL;
    $page_val = $listmode ? "do=admin&p=6" : "do=articles";
    $child_count = get_root_childcount($struct[$key]["acat_id"], $dbcon);
    $child_sort = ($child_count + 1) * 10;
    $forbid_cut = $struct[$key]["acat_struct"] == $cut_id || $forbid_cut ? 1 : 0;
    $forbid_copy = $struct[$key]["acat_struct"] == $copy_id || $forbid_copy ? 1 : 0;
    $an = html($struct[$key]["acat_name"]);
    $a = "<tr onmouseover=\"this.bgColor='#CCFF00';\" onmouseout=\"this.bgColor='#FFFFFF';\">\n";
    $a .= '<td width="461">';
    $a .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\">\n<tr>\n";
    $a .= '<td nowrap="nowrap"><img src="img/leer.gif" width="' . (14 + 14 * ($counter - 1)) . "\" height=\"1\" alt=\"\" />";
    //14
    $a .= $child_count ? "<a href=\"phpwcms.php?" . $page_val . "&amp;open=" . rawurlencode($struct[$key]["acat_id"] . ":" . (!empty($_SESSION["structure"][$struct[$key]["acat_id"]]) ? 0 : 1)) . "\">" : "";
    $a .= "<img src=\"img/symbole/plus_" . ($child_count ? !empty($_SESSION["structure"][$struct[$key]["acat_id"]]) ? "close" : "open" : "empty");
    $a .= ".gif\" width=\"15\" height=\"15\" border=\"0\" alt=\"\" />" . ($child_count ? "</a>" : "");
    $a .= "<img src=\"img/symbole/page_" . (!$struct[$key]["acat_hidden"] ? 1 : 7);
    if ($struct[$key]["acat_regonly"]) {
        $a .= '_locked';
    }
    $a .= ".gif\" width=\"11\" height=\"15\" ";
    $info = 'ID: <b>' . $struct[$key]["acat_id"] . '</b><br />';
    $info .= $BL['be_alias'] . ': ' . html($struct[$key]["acat_alias"]) . '<br />';
    $info .= $BL['be_cnt_sortvalue'] . ': ' . $struct[$key]["acat_sort"];
    $info .= '<br>' . $BL['be_admin_struct_template'] . ': ';
    if (empty($struct[$key]['template_trash'])) {
        $info .= html($struct[$key]["template_name"]);
        if ($struct[$key]["template_default"]) {
            $info .= ' (' . $BL['be_admin_tmpl_default'] . ')';
        }
    } else {
        $info .= $BL['be_admin_tmpl_default'];
    }
    $a .= 'onmouseover="Tip(\'' . $info . '\');" onmouseout="UnTip()" alt=""';
    $a .= "></td>\n";
    $a .= "<td><img src=\"img/leer.gif\" width=\"2\" height=\"15\" alt=\"\" /></td>\n";
    $a .= '<td class="dir" width="95%"><strong><a href="';
    $a .= rel_url(array('phpwcms-preview' => 1), array(), empty($struct[$key]["acat_alias"]) ? 'id=' . $struct[$key]["acat_id"] : $struct[$key]["acat_alias"]);
    $a .= '" target="_blank" title="' . $BL['be_func_struct_preview'] . ': ' . $an . '">';
    $a .= $an . "</a></strong></td>\n</tr>\n</table></td>\n<td width=\"77\" nowrap=\"nowrap\">";
    $a .= listmode_edits($listmode, $struct, $key, $an, $copy_article_content, $cut_article_content, $copy_article, $copy_id, $cut_article, $cut_id, $forbid_cut, $forbid_copy, $count_row, $child_sort);
    $a .= "</td>\n</tr>\n";
    echo $a;
    if (isset($_SESSION["structure"][$struct[$key]["acat_id"]]) && $_SESSION["structure"][$struct[$key]["acat_id"]]) {
        if (!$listmode) {
            struct_articlelist($struct[$key]["acat_id"], $counter, $copy_article_content, $cut_article_content, $copy_article, $cut_article, $struct[$key]["acat_order"]);
        }
        struct_list($struct[$key]["acat_id"], $dbcon, $copy_article_content, $cut_article_content, $copy_id, $copy_article, $cut_id, $cut_article, $listmode, $forbid_cut, $forbid_copy, $counter);
    }
}
Esempio n. 2
0
/**
 * phpwcms content management system
 *
 * @author Oliver Georgi <*****@*****.**>
 * @copyright Copyright (c) 2002-2015, Oliver Georgi
 * @license http://opensource.org/licenses/GPL-2.0 GNU GPL-2
 * @link http://www.phpwcms.de
 *
 **/
function struct_list($struct_id, $dbcon, $counter = 0)
{
    //Create Listing for Site Structure
    $struct_id = intval($struct_id);
    $counter++;
    $sql = "SELECT * FROM " . DB_PREPEND . "phpwcms_articlecat WHERE acat_struct=" . $struct_id . " ORDER BY acat_sort;";
    if ($result = mysql_query($sql, $dbcon)) {
        while ($row = mysql_fetch_array($result)) {
            echo "<tr>\n<td nowrap=\"nowrap\"><img src=\"img/leer.gif\" width=\"15\" height=\"11\"></td>\n";
            echo "<td class=\"dir\">" . html($row["acat_name"]) . "</td>\n";
            echo "<td><img src=\"img/button/add_11x11.gif\" width=\"11\" height=\"11\">";
            echo "<img src=\"img/button/edit_22x11.gif\" width=\"22\" height=\"11\">";
            echo "<img src=\"img/button/sort_0_1.gif\" width=\"11\" height=\"11\">";
            echo "<img src=\"img/button/sort_1_1.gif\" width=\"11\" height=\"11\">";
            echo "<img src=\"img/button/sort_2_1.gif\" width=\"11\" height=\"11\">";
            echo "<img src=\"img/button/sort_3_1.gif\" width=\"11\" height=\"11\">";
            echo "<img src=\"img/button/del_11x11.gif\" width=\"11\" height=\"11\">";
            echo "</td>\n</tr>\n";
            struct_list($row["acat_name"], $dbcon, $counter);
        }
        //mysql_free_result($result);
    }
}
$a = "<tr onMouseOver=\"this.bgColor='#CCFF00';\" onMouseOut=\"this.bgColor='#FFFFFF';\">\n";
$a .= '<td width="461">';
$a .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\">\n<tr>\n";
$a .= '<td nowrap="nowrap">';
$a .= $child_count ? "<a href=\"phpwcms.php?do=articles&amp;open=0:" . ($_SESSION["structure"][0] ? 0 : 1) . "\">" : "";
$a .= "<img src=\"img/symbole/plus_" . ($child_count ? $_SESSION["structure"][0] ? "close" : "open" : "empty");
$a .= ".gif\" width=\"15\" height=\"15\" border=\"0\" alt=\"\">" . ($child_count ? "</a>" : "");
$a .= "<img src=\"img/symbole/page_1.gif\" width=\"11\" height=\"15\" ";
$info = 'ID: <b>0</b><br />';
$info .= 'ALIAS: ' . html($indexpage["acat_alias"]);
$a .= 'onmouseover="Tip(\'' . $info . '\');" onmouseout="UnTip()" alt="" />';
$a .= "</td>\n";
$a .= "<td><img src=\"img/leer.gif\" width=\"2\" height=\"15\" alt=\"\" /></td>\n";
$a .= '<td class="dir" width="97%"><strong>' . $an . "</strong></td>\n</tr>\n</table></td>\n";
echo $a;
echo '<td width="77" nowrap="nowrap">';
$struct[0]["acat_id"] = 0;
$struct[0]["acat_aktiv"] = 1;
$struct[0]["acat_struct"] = 0;
echo listmode_edits($listmode, $struct, 0, $an, $copy_article_content, $cut_article_content, $copy_article, $copy_id, $cut_article, $cut_id, 0, 0, 0, 0);
echo "</td>\n</tr>\n";
if ($_SESSION["structure"][0]) {
    struct_articlelist(0, 0, $copy_article_content, $cut_article_content, $copy_article, $cut_article, $indexpage['acat_order']);
    //$template_default["article_order"]
    struct_list(0, $db, $copy_article_content, $cut_article_content, $copy_id, $copy_article, $cut_id, $cut_article, $listmode);
}
?>
<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>
<tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr>
<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr>
</table>