query_fetchDB(" SELECT post_status FROM ot_posts WHERE id = '" . $_GET['archive'] . "' LIMIT 1 "); if($Archive) { if($Archive['0']['post_status'] == "gepubliceerd") { $DB->query_execDB(" UPDATE ot_posts SET post_status = 'klad' WHERE id = '" . $_GET['archive'] . "' LIMIT 1 "); echo 'Klad'; } else { $DB->query_execDB(" UPDATE ot_posts SET post_status = 'gepubliceerd' WHERE id = '" . $_GET['archive'] . "' LIMIT 1 "); echo 'Gepubliceerd'; } } } else { echo "Fout"; } } else { echo "Er is een onherstelbare fout opgetreden."; } } else { echo "Er is een onherstelbare fout opgetreden."; } ?>