| version 1.25, 2006/08/06 09:33:14 |
version 1.26, 2006/08/06 10:14:02 |
| Line 394 function ezin_get_article_list($section_ |
|
| Line 394 function ezin_get_article_list($section_ |
|
| .' sections.link article_section_link' |
.' sections.link article_section_link' |
| //.' sections.ord article_section_ord,' |
//.' sections.ord article_section_ord,' |
| //.' sections.a_limit article_section_limit' |
//.' sections.a_limit article_section_limit' |
| .' FROM '.$ezin_sys['db']['tables']['articles'].' AS articles,' |
.' FROM '.$ezin_sys['db']['tables']['articles'].' AS articles' |
| .' '.$ezin_sys['db']['tables']['authors'].' AS authors,' |
.' LEFT JOIN '.$ezin_sys['db']['tables']['authors'].' AS authors' |
| |
.' ON articles.author_id = authors.id,' |
| .' '.$ezin_sys['db']['tables']['sections'].' AS sections'; |
.' '.$ezin_sys['db']['tables']['sections'].' AS sections'; |
| $query .= |
$query .= |
| ' WHERE articles.section_id = sections.id' |
' WHERE articles.section_id = sections.id' |
| .' AND articles.author_id = authors.id' |
|
| .' AND articles.datetime <= SYSDATE() - 3600' |
.' AND articles.datetime <= SYSDATE() - 3600' |
| .' AND UNIX_TIMESTAMP(articles.datetime) > 0' |
.' AND UNIX_TIMESTAMP(articles.datetime) > 0' |
| .' AND articles.status NOT IN ("", "disabled")' |
.' AND articles.status NOT IN ("", "disabled")' |
| Line 451 function ezin_get_article_list_counts($s |
|
| Line 451 function ezin_get_article_list_counts($s |
|
| $limit = intval($limit); |
$limit = intval($limit); |
| $query = 'SELECT articles.id,' |
$query = 'SELECT articles.id,' |
| .' articles.accesses_count, articles.sessions_count, articles.message_count' |
.' articles.accesses_count, articles.sessions_count, articles.message_count' |
| .' FROM '.$ezin_sys['db']['tables']['articles'].' AS articles,' |
.' FROM '.$ezin_sys['db']['tables']['articles'].' AS articles' |
| .' '.$ezin_sys['db']['tables']['authors'].' AS authors,' |
.' LEFT JOIN '.$ezin_sys['db']['tables']['authors'].' AS authors' |
| |
.' ON articles.author_id = authors.id,' |
| .' '.$ezin_sys['db']['tables']['sections'].' AS sections'; |
.' '.$ezin_sys['db']['tables']['sections'].' AS sections'; |
| $query .= |
$query .= |
| ' WHERE articles.section_id = sections.id' |
' WHERE articles.section_id = sections.id' |
| .' AND articles.author_id = authors.id' |
|
| .' AND articles.datetime <= SYSDATE() - 3600' |
.' AND articles.datetime <= SYSDATE() - 3600' |
| .' AND UNIX_TIMESTAMP(articles.datetime) > 0' |
.' AND UNIX_TIMESTAMP(articles.datetime) > 0' |
| .' AND articles.status NOT IN ("", "disabled")' |
.' AND articles.status NOT IN ("", "disabled")' |
| Line 542 function ezin_get_article($article_id) / |
|
| Line 542 function ezin_get_article($article_id) / |
|
| .' sections.link article_section_link' |
.' sections.link article_section_link' |
| //.' sections.ord article_section_ord,' |
//.' sections.ord article_section_ord,' |
| //.' sections.a_limit article_section_limit' |
//.' sections.a_limit article_section_limit' |
| .' FROM '.$ezin_sys['db']['tables']['articles'].' AS articles,' |
.' FROM '.$ezin_sys['db']['tables']['articles'].' AS articles' |
| .' '.$ezin_sys['db']['tables']['authors'].' AS authors,' |
.' LEFT JOIN '.$ezin_sys['db']['tables']['authors'].' AS authors' |
| |
.' ON articles.author_id = authors.id,' |
| .' '.$ezin_sys['db']['tables']['sections'].' AS sections' |
.' '.$ezin_sys['db']['tables']['sections'].' AS sections' |
| .' WHERE articles.author_id = authors.id ' |
.' WHERE articles.section_id = sections.id ' |
| .' AND articles.section_id = sections.id ' |
|
| .' AND articles.id = '.$article_id |
.' AND articles.id = '.$article_id |
| .' ORDER BY articles.datetime ' |
.' ORDER BY articles.datetime ' |
| .($ezin_cfg['order_articles_desc'] ? 'DESC' : 'ASC') |
.($ezin_cfg['order_articles_desc'] ? 'DESC' : 'ASC') |
| .', articles.id ASC'; |
.', articles.id ASC'; |
| |
|
| //print "$query<hr>\n"; |
print "$query<hr>\n"; |
| |
|
| $result = @mysql_query($query, $ezin_db_handle) |
$result = @mysql_query($query, $ezin_db_handle) |
| or ezin_db_error('ezin_get_article()'); |
or ezin_db_error('ezin_get_article()'); |