<?php
/**************************************************************************
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
@Authors: Ryan Thompson(hide@address.com)
***************************************************************************/
require('../config.inc.php');
$languages = unserialize(urldecode(stripslashes($_GET['langs'])));
foreach($languages AS $key => $value)
{
$sql = "DELETE FROM o_text WHERE language='$value'";
$db->query($sql);
$sql = "UPDATE o_languages SET enabled='0' WHERE lg_id='$value'";
$db->query($sql);
}
//Now that they're deleted we need to see if the default was deleted and set a new default it so.
$sql = "SELECT value FROM o_settings WHERE setting_id='7'";
$db->query($sql);
$db->fetch_results();
if(in_array($db->record['value'], $languages))
{
header("Location: general_config.php");
}