| version 1.12, 2005/11/28 23:24:29 |
version 1.13, 2006/01/21 10:37:27 |
| Line 222 function ezin_get_bind_lang_table($bind_ |
|
| Line 222 function ezin_get_bind_lang_table($bind_ |
|
| /* |
/* |
| * ezin_get_section_list() |
* ezin_get_section_list() |
| */ |
*/ |
| function ezin_get_section_list($lang = '') /* {{{ */ |
function ezin_get_section_list($lang = '', $current_section_id = null) /* {{{ */ |
| { |
{ |
| global $ezin_sys; |
global $ezin_sys; |
| global $ezin_db_handle; |
global $ezin_db_handle; |
| |
$current_section_id = intval($current_section_id); |
| $query = 'SELECT' |
$query = 'SELECT' |
| .' id section_id,' |
.' id section_id,' |
| .' type section_type,' |
.' type section_type,' |
| Line 252 function ezin_get_section_list($lang = ' |
|
| Line 253 function ezin_get_section_list($lang = ' |
|
| return $array; |
return $array; |
| } /* }}} */ |
} /* }}} */ |
| |
|
| function ezin_get_section_list_counts($lang = '') /* {{{ */ |
function ezin_get_section_list_counts($lang = '', $current_section_id = null) /* {{{ */ |
| { |
{ |
| global $ezin_sys; |
global $ezin_sys; |
| global $ezin_db_handle; |
global $ezin_db_handle; |
| $query = 'SELECT id, accesses_count, sessions_count, raw_accesses_count, raw_sessions_count' |
$current_section_id = intval($current_section_id); |
| |
$query = 'SELECT id, type, accesses_count, sessions_count, raw_accesses_count, raw_sessions_count' |
| .' FROM '.$ezin_sys['db']['tables']['sections'] |
.' FROM '.$ezin_sys['db']['tables']['sections'] |
| .' WHERE type IN ("normal", "global")'; |
.' WHERE type IN ("normal", "global")'; |
| if ($lang != '') { |
if ($lang != '') { |
| Line 272 function ezin_get_section_list_counts($l |
|
| Line 274 function ezin_get_section_list_counts($l |
|
| $array['section_sessions_count_'.$row['id']] = $row['sessions_count']; |
$array['section_sessions_count_'.$row['id']] = $row['sessions_count']; |
| $array['section_raw_accesses_count_'.$row['id']] = $row['raw_accesses_count']; |
$array['section_raw_accesses_count_'.$row['id']] = $row['raw_accesses_count']; |
| $array['section_raw_sessions_count_'.$row['id']] = $row['raw_sessions_count']; |
$array['section_raw_sessions_count_'.$row['id']] = $row['raw_sessions_count']; |
| |
if ($row['id'] == $current_section_id) { |
| |
$array['section_selected_'.$row['id']] = 1; |
| |
} else if (!$current_section_id && $row['type'] == 'global') { |
| |
$array['section_selected_'.$row['id']] = 1; |
| |
} else { |
| |
$array['section_selected_'.$row['id']] = 0; |
| |
} |
| } |
} |
| @mysql_free_result($result); |
@mysql_free_result($result); |
| return $array; |
return $array; |