Exemple #1
0
                // first check whether combination already exists
                $checkforcombination = $database->executeQuery("SELECT COUNT(*) AS count FROM photoalbumsforarticle WHERE articleid = " . $_GET['s'] . " AND photoalbumid = " . $photoalbums[$i]['id'], 1);
                if ($checkforcombination[0]['count'] == 1) {
                    $database->executeQuery("DELETE FROM photoalbumsforarticle WHERE articleid = " . $_GET['s'] . " AND photoalbumid = " . $photoalbums[$i]['id'], 0);
                }
            }
        }
    }
    $database->closeConnection();
    header('Location: ?p=' . $_GET['p'] . '&a=es&s=' . $_GET['s']);
}
?>
<div id="language_bar">
	<?php 
$language = new languages($currentLanguage, isset($_GET['langType']) ? $_GET['langType'] : 0);
$language->makeLanguageBar($arr);
?>
</div>

<div id="menuitems">
	<?php 
//$menu = new menu( $arr, $currentLanguage );
//$menuitems = $menu->getMenuItems();
$database1 = new database($arr);
$menuitems = $database1->executeQuery("SELECT * FROM menuitems WHERE languageid = " . $currentLanguage . " ORDER BY sortorder");
for ($i = 0; $i < count($menuitems); $i++) {
    echo "<div class=\"item\">";
    echo "<div class=\"hoofditem\">";
    if (isset($_GET['a']) && $_GET['a'] == 'ai' && $_GET['m'] == $menuitems[$i]['id']) {
        ?>
						<form name="editmenuitem" method="post" action="<?php