| @@ 206-218 (lines=13) @@ | ||
| 203 | * @param int $career_id |
|
| 204 | * @return bool |
|
| 205 | */ |
|
| 206 | public function get_status($career_id) |
|
| 207 | { |
|
| 208 | $TBL_CAREER = Database::get_main_table(TABLE_CAREER); |
|
| 209 | $career_id = intval($career_id); |
|
| 210 | $sql = "SELECT status FROM $TBL_CAREER WHERE id = '$career_id'"; |
|
| 211 | $result = Database::query($sql); |
|
| 212 | if (Database::num_rows($result) > 0) { |
|
| 213 | $data = Database::fetch_array($result); |
|
| 214 | return $data['status']; |
|
| 215 | } else { |
|
| 216 | return false; |
|
| 217 | } |
|
| 218 | } |
|
| 219 | ||
| 220 | /** |
|
| 221 | * @param array $params |
|
| @@ 421-433 (lines=13) @@ | ||
| 418 | * Get platform language ID |
|
| 419 | * @return int The platform language ID |
|
| 420 | */ |
|
| 421 | public static function get_platform_language_id() |
|
| 422 | { |
|
| 423 | $name = api_get_setting('platformLanguage'); |
|
| 424 | $tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE); |
|
| 425 | $sql = "SELECT id FROM $tbl_admin_languages WHERE english_name ='$name'"; |
|
| 426 | $res = Database::query($sql); |
|
| 427 | if (Database::num_rows($res) < 1) { |
|
| 428 | return false; |
|
| 429 | } |
|
| 430 | $row = Database::fetch_array($res); |
|
| 431 | ||
| 432 | return $row['id']; |
|
| 433 | } |
|
| 434 | ||
| 435 | /** |
|
| 436 | * Get parent language path (or null if no parent) |
|
| @@ 3000-3014 (lines=15) @@ | ||
| 2997 | * @param string session category ID |
|
| 2998 | * @return mixed false if the session category does not exist, array if the session category exists |
|
| 2999 | */ |
|
| 3000 | public static function get_session_category($id) |
|
| 3001 | { |
|
| 3002 | $tbl_session_category = Database::get_main_table(TABLE_MAIN_SESSION_CATEGORY); |
|
| 3003 | $id = intval($id); |
|
| 3004 | $sql = "SELECT id, name, date_start, date_end |
|
| 3005 | FROM $tbl_session_category |
|
| 3006 | WHERE id= $id"; |
|
| 3007 | $result = Database::query($sql); |
|
| 3008 | $num = Database::num_rows($result); |
|
| 3009 | if ($num > 0) { |
|
| 3010 | return Database::fetch_array($result); |
|
| 3011 | } else { |
|
| 3012 | return false; |
|
| 3013 | } |
|
| 3014 | } |
|
| 3015 | ||
| 3016 | /** |
|
| 3017 | * Get all session categories (filter by access_url_id) |
|