| @@ 148-166 (lines=19) @@ | ||
| 145 | ||
| 146 | //// |
|
| 147 | // Break a word in a string if it is longer than a specified length ($len) |
|
| 148 | function tep_break_string($string, $len, $break_char = '-') { |
|
| 149 | $l = 0; |
|
| 150 | $output = ''; |
|
| 151 | for ($i=0, $n=strlen($string); $i<$n; $i++) { |
|
| 152 | $char = substr($string, $i, 1); |
|
| 153 | if ($char != ' ') { |
|
| 154 | $l++; |
|
| 155 | } else { |
|
| 156 | $l = 0; |
|
| 157 | } |
|
| 158 | if ($l > $len) { |
|
| 159 | $l = 1; |
|
| 160 | $output .= $break_char; |
|
| 161 | } |
|
| 162 | $output .= $char; |
|
| 163 | } |
|
| 164 | ||
| 165 | return $output; |
|
| 166 | } |
|
| 167 | ||
| 168 | //// |
|
| 169 | // Return all HTTP GET variables, except those passed as a parameter |
|
| @@ 291-309 (lines=19) @@ | ||
| 288 | return $image; |
|
| 289 | } |
|
| 290 | ||
| 291 | function tep_break_string($string, $len, $break_char = '-') { |
|
| 292 | $l = 0; |
|
| 293 | $output = ''; |
|
| 294 | for ($i=0, $n=strlen($string); $i<$n; $i++) { |
|
| 295 | $char = substr($string, $i, 1); |
|
| 296 | if ($char != ' ') { |
|
| 297 | $l++; |
|
| 298 | } else { |
|
| 299 | $l = 0; |
|
| 300 | } |
|
| 301 | if ($l > $len) { |
|
| 302 | $l = 1; |
|
| 303 | $output .= $break_char; |
|
| 304 | } |
|
| 305 | $output .= $char; |
|
| 306 | } |
|
| 307 | ||
| 308 | return $output; |
|
| 309 | } |
|
| 310 | ||
| 311 | function tep_get_country_name($country_id) { |
|
| 312 | $country_query = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$country_id . "'"); |
|