| @@ 13-24 (lines=12) @@ | ||
| 10 | Released under the GNU General Public License |
|
| 11 | */ |
|
| 12 | ||
| 13 | function tep_get_languages_directory($code) { |
|
| 14 | global $languages_id; |
|
| 15 | ||
| 16 | $language_query = tep_db_query("select languages_id, directory from " . TABLE_LANGUAGES . " where code = '" . tep_db_input($code) . "'"); |
|
| 17 | if (tep_db_num_rows($language_query)) { |
|
| 18 | $language = tep_db_fetch_array($language_query); |
|
| 19 | $languages_id = $language['languages_id']; |
|
| 20 | return $language['directory']; |
|
| 21 | } else { |
|
| 22 | return false; |
|
| 23 | } |
|
| 24 | } |
|
| 25 | ?> |
|
| @@ 1216-1226 (lines=11) @@ | ||
| 1213 | //// |
|
| 1214 | // Checks to see if the currency code exists as a currency |
|
| 1215 | // TABLES: currencies |
|
| 1216 | function tep_currency_exists($code) { |
|
| 1217 | $code = tep_db_prepare_input($code); |
|
| 1218 | ||
| 1219 | $currency_query = tep_db_query("select code from " . TABLE_CURRENCIES . " where code = '" . tep_db_input($code) . "' limit 1"); |
|
| 1220 | if (tep_db_num_rows($currency_query)) { |
|
| 1221 | $currency = tep_db_fetch_array($currency_query); |
|
| 1222 | return $currency['code']; |
|
| 1223 | } else { |
|
| 1224 | return false; |
|
| 1225 | } |
|
| 1226 | } |
|
| 1227 | ||
| 1228 | function tep_string_to_int($string) { |
|
| 1229 | return (int)$string; |
|