示例#1
0
function print_menu_row($id, $mother, $TOOLBAR_LANG)
{
    global $TOOLBOX_SELECTED_OPTIONS;
    global $mysql_order_by;
    $sql_m_r = "SELECT * FROM `menu_items` \n\t\t\t\t   INNER JOIN `menu_items-languages` ON `menu_items`.MI_ID=`menu_items-languages`.MI_ID \n\t\t\t       INNER JOIN `menu_groups-menu_items` ON `menu_items`.MI_ID=`menu_groups-menu_items`.MI_ID \n\t\t\t       INNER JOIN `menu_groups-languages` ON `menu_groups-languages`.MG_ID=`menu_groups-menu_items`.MG_ID \n\t\t\t\t   WHERE `menu_items-languages`.L_ID = '{$TOOLBAR_LANG}' \n\t\t\t\t   AND `menu_groups-languages`.L_ID =  '{$TOOLBAR_LANG}' \n\t\t\t       AND `menu_items`.MI_DELETED = 0\n\t\t\t\t   AND `menu_items`.MI_MOTHER = '{$id}' \n\t\t\t       ORDER BY `menu_groups-languages`.MGL_ALIAS, {$mysql_order_by} ";
    $query_m_r = mysql_query($sql_m_r);
    $rows_m_r = mysql_num_rows($query_m_r);
    if ($rows_m_r) {
        while ($result_m_r = mysql_fetch_array($query_m_r)) {
            //START:Create the links
            $edit_link = '?action=menu_items_edit&id=' . $result_m_r['MI_ID'] . $TOOLBOX_SELECTED_OPTIONS;
            $delete_link = '<a href="scripts/menu_groups_delete.php?id=' . $result_m_r['MI_ID'] . $TOOLBOX_SELECTED_OPTIONS . '" onclick="return checkfields(this);" class = "delete"><img src="images/delete.png" title="Διαγραφή" /></a>';
            $isDefault = '<a href = "scripts/menu_items_default.php?id=' . $result_m_r['MI_ID'] . $TOOLBOX_SELECTED_OPTIONS . '" class = "star" title = "Αλλαγή σε προεπιλεγμένο"><img src = "images/isDefaultGrey.png" /></a>';
            if ($result_m_r['MI_DEFAULT']) {
                $isDefault = '<a href = "javascript:;" class = "star no-link"><img src = "images/isDefaultGold.png" title = "Προεπιλεγμένο" /></a>';
            }
            //END:Create the links
            //START:Echo visibility
            $visibility_caption = "Όχι";
            if ($result_m_r['MI_VISIBLE']) {
                $visibility_caption = "Ναι";
            }
            //END:Echo visibility
            echo '<li class = "hasDefault">
						' . $isDefault . '
						<a href = "' . $edit_link . '" title = "Επεξεργασία">' . stripslashes($result_m_r['MIL_ALIAS']) . '</a>
						<span class = "details">' . $mother . stripslashes($result_m_r['MIL_ALIAS']) . '</span>
						<span class = "details">Ομάδα Μενού: ' . stripslashes($result_m_r['MGL_ALIAS']) . ', Κατάταξη: ' . $result_m_r['MI_RANK'] . ', Ορατό: ' . $visibility_caption . '</span>
						' . $delete_link . '
					</li>';
            //START:Define mothers name/title
            $mi_mother = $mother . $result_m_r['MIL_ALIAS'] . ' &raquo; ';
            //END:Define mothers name/title
            print_menu_row($result_m_r['MI_ID'], $mi_mother, $TOOLBAR_LANG);
        }
    }
}
示例#2
0
    while ($result_mi = mysql_fetch_array($query_mi)) {
        //START:Create the links
        $edit_link = '?action=menu_items_edit&id=' . $result_mi['MI_ID'] . $TOOLBOX_SELECTED_OPTIONS;
        $delete_link = '<a href="scripts/menu_items_delete.php?id=' . $result_mi['MI_ID'] . $TOOLBOX_SELECTED_OPTIONS . '" onclick="return checkfields(this);" class = "delete" title = "Διαγραφή"></a>';
        $isDefault = '<a href = "scripts/menu_items_default.php?id=' . $result_mi['MI_ID'] . $TOOLBOX_SELECTED_OPTIONS . '" class = "star" title = "Αλλαγή σε προεπιλεγμένο"><img src = "images/isDefaultGrey.png" /></a>';
        if ($result_mi['MI_DEFAULT']) {
            $isDefault = '<a href = "javascript:;" class = "star no-link"><img src = "images/isDefaultGold.png" title = "Προεπιλεγμένο" /></a>';
        }
        //END:Create the links
        //START:Echo visibility
        $visibility_caption = "Όχι";
        if ($result_mi['MI_VISIBLE']) {
            $visibility_caption = "Ναι";
        }
        //END:Echo visibility
        echo '<li class = "hasDefault">
					' . $isDefault . '
					<a href = "' . $edit_link . '" title = "Επεξεργασία">' . stripslashes($result_mi['MIL_ALIAS']) . '</a>
					<span class = "details">Ομάδα Μενού: ' . stripslashes($result_mi['MGL_ALIAS']) . ', Κατάταξη: ' . $result_mi['MI_RANK'] . ', Ορατό: ' . $visibility_caption . '</span>
					' . $delete_link . '
				  </li>';
        //START:Define mothers name/title
        $mi_mother = $result_mi['MIL_ALIAS'] . ' &raquo; ';
        //END:Define mothers name/title
        print_menu_row($result_mi['MI_ID'], $mi_mother, $TOOLBAR_LANG);
    }
    echo '</ul>';
} else {
    echo '<div class="validation_message_false">Δεν υπάρχουν καταχωρημένες εγγραφές στη βάση.</div>';
}
require "db_disconnect.php";