| version 1.61, 2012/05/02 12:58:15 |
version 1.62, 2012/05/02 16:13:02 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/db.inc.php,v 1.60 2011-05-31 13:04:30 igor Exp $ */ |
/* $Platon: Metafox/db.inc.php,v 1.61 2012-05-02 12:58:15 igor Exp $ */ |
| |
|
| /* |
/* |
| * updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002 |
* updates: 23/5/2001, 29/7/2001, 11/10/2001, 2/11/2001, 11/1/2002, 23/7/2002 |
| Line 246 function ezin_get_section_list($lang = ' |
|
| Line 246 function ezin_get_section_list($lang = ' |
|
| $current_section_id = intval($current_section_id); |
$current_section_id = intval($current_section_id); |
| $query = 'SELECT' |
$query = 'SELECT' |
| .' id section_id,' |
.' id section_id,' |
| .' type section_type,' |
.' type2 section_type,' |
| .' ord section_ord,' |
.' ord section_ord,' |
| .' a_limit section_limit,' |
.' a_limit section_limit,' |
| .' name section_name,' |
.' name section_name,' |
| Line 277 function ezin_get_section_list_counts($l |
|
| Line 277 function ezin_get_section_list_counts($l |
|
| $current_section_id = intval($current_section_id); |
$current_section_id = intval($current_section_id); |
| $query = 'SELECT id, type, accesses_count, sessions_count, raw_accesses_count, raw_sessions_count' |
$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 (FIND_IN_SET("in_list", display) > 0)'; |
| if ($lang != '') { |
if ($lang != '') { |
| $query .= ' AND (lang IS NULL OR lang = ""' |
$query .= ' AND (lang IS NULL OR lang = ""' |
| .' OR lang LIKE "'.ezin_db_escape($lang).'")'; |
.' OR lang LIKE "'.ezin_db_escape($lang).'")'; |
| Line 618 function ezin_get_article_list($section_ |
|
| Line 618 function ezin_get_article_list($section_ |
|
| array_multisort($sortArray[$orderby], ($ezin_cfg['order_articles_desc']) ? SORT_DESC : SORT_ASC, $array); |
array_multisort($sortArray[$orderby], ($ezin_cfg['order_articles_desc']) ? SORT_DESC : SORT_ASC, $array); |
| } |
} |
| |
|
| |
if ($limit > 0) { |
| |
$array = array_slice($array, 0, $limit); |
| |
} |
| return $array; |
return $array; |
| } /* }}} */ |
} /* }}} */ |
| |
|
| Line 1349 function ezin_get_rss_articles($source) |
|
| Line 1352 function ezin_get_rss_articles($source) |
|
| } |
} |
| |
|
| $rss_arr = xml2ary($rss_xml); |
$rss_arr = xml2ary($rss_xml); |
| |
|
| $items = $rss_arr['rss']['_c']['channel']['_c']['item']; |
$items = $rss_arr['rss']['_c']['channel']['_c']['item']; |
| |
if (count($rss_arr['rss']['_c']['channel']['_c']['item']) == 1) { |
| |
$items = array('_c' => $items); |
| |
} |
| if (!is_array($items)) { |
if (!is_array($items)) { |
| return array(); |
return array(); |
| } |
} |
| Line 1634 function ezin_get_poll($section_id, $lan |
|
| Line 1639 function ezin_get_poll($section_id, $lan |
|
| } |
} |
| } |
} |
| |
|
| $query = sprintf('SELECT id FROM %s WHERE type = "global"', $ezin_sys['db']['tables']['sections']); |
$query = sprintf('SELECT id FROM %s WHERE (FIND_IN_SET("global", type2) > 0)', $ezin_sys['db']['tables']['sections']); |
| if (strlen($lang) > 0) { |
if (strlen($lang) > 0) { |
| $query .= sprintf(' AND lang = "%s"', ezin_db_escape($lang)); |
$query .= sprintf(' AND lang = "%s"', ezin_db_escape($lang)); |
| } |
} |
| Line 1830 function ezin_get_config() /* {{{ */ |
|
| Line 1835 function ezin_get_config() /* {{{ */ |
|
| if (isset($content)) { |
if (isset($content)) { |
| $array = @unserialize($content); |
$array = @unserialize($content); |
| if (is_array($array) && count($array) > 0) { |
if (is_array($array) && count($array) > 0) { |
| |
// reload dynamic config |
| |
$query = sprintf('SELECT a_key, type, value FROM %s WHERE type = "1"', |
| |
$ezin_sys['db']['tables']['config_data']); |
| |
$result = @mysql_query($query, $ezin_db_handle) |
| |
or ezin_db_error('ezin_get_config() [v1:1]'); |
| |
while ($row = @mysql_fetch_array($result, MYSQL_ASSOC)) { |
| |
$array[$row['a_key']] = ezin_eval($row['value']); |
| |
} |
| |
@mysql_free_result($result); |
| return $array; |
return $array; |
| } else { |
} else { |
| // for case that stored content was corrupted |
// for case that stored content was corrupted |