|
ZenCart_Documentation
1.5.0
http://www.collinsharper.com
|
00001 <?php 00002 // 00003 // +----------------------------------------------------------------------+ 00004 // |zen-cart Open Source E-commerce | 00005 // +----------------------------------------------------------------------+ 00006 // | Copyright (c) 2003 The zen-cart developers | 00007 // | | 00008 // | http://www.zen-cart.com/index.php | 00009 // | | 00010 // | Portions Copyright (c) 2003 osCommerce | 00011 // +----------------------------------------------------------------------+ 00012 // | This source file is subject to version 2.0 of the GPL license, | 00013 // | that is bundled with this package in the file LICENSE, and is | 00014 // | available through the world-wide-web at the following url: | 00015 // | http://www.zen-cart.com/license/2_0.txt. | 00016 // | If you did not receive a copy of the zen-cart license and are unable | 00017 // | to obtain it through the world-wide-web, please send a note to | 00018 // | [email protected] so we can mail you a copy immediately. | 00019 // +----------------------------------------------------------------------+ 00020 // $Id: languages.php 1969 2005-09-13 06:57:21Z drbyte $ 00021 // 00022 00023 function zen_get_languages_directory($code) { 00024 global $db; 00025 $language = $db->Execute("select languages_id, directory 00026 from " . TABLE_LANGUAGES . " 00027 where code = '" . zen_db_input($code) . "'"); 00028 00029 if ($language->RecordCount() > 0) { 00030 $_SESSION['languages_id'] = $language->fields['languages_id']; 00031 return $language->fields['directory']; 00032 } else { 00033 return false; 00034 } 00035 } 00036 ?>