2 /************************************************************************/
\r
4 /************************************************************************/
\r
5 /* Copyright (c) 2010 */
\r
6 /* Inclusive Design Institute */
\r
8 /* This program is free software. You can redistribute it and/or */
\r
9 /* modify it under the terms of the GNU General Public License */
\r
10 /* as published by the Free Software Foundation. */
\r
11 /************************************************************************/
\r
13 define('TR_INCLUDE_PATH', '../include/');
\r
15 include(TR_INCLUDE_PATH.'vitals.inc.php');
\r
16 include_once(TR_INCLUDE_PATH.'classes/DAO/LanguagesDAO.class.php');
\r
18 if (isset($_REQUEST['id']))
\r
20 $pieces = explode('_', $_REQUEST['id'], 2);
\r
21 $lang_code = $pieces[0];
\r
22 $charset = $pieces[1];
\r
25 $languagesDAO = new LanguagesDAO();
\r
27 if (isset($_POST['submit_no']))
\r
29 $msg->addFeedback('CANCELLED');
\r
30 header('Location: index.php');
\r
33 else if (isset($_POST['submit_yes']))
\r
35 if ($languagesDAO->Delete($lang_code))
\r
37 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
\r
38 header('Location: index.php');
\r
43 $row = $languagesDAO->getByLangCodeAndCharset($lang_code, $charset);
\r
45 unset($hidden_vars);
\r
46 $hidden_vars['id'] = $_REQUEST['id'];
\r
48 require(TR_INCLUDE_PATH.'header.inc.php');
\r
50 $msg->addConfirm(array('DELETE_LANG', $row['native_name']), $hidden_vars);
\r
51 $msg->printConfirm();
\r
53 require(TR_INCLUDE_PATH.'footer.inc.php');
\r