/[cvs]/nfo/site/htdocs/inc/cms/cms.php.inc
ViewVC logotype

Annotation of /nfo/site/htdocs/inc/cms/cms.php.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Mon Aug 30 04:03:25 2004 UTC (20 years ago) by bd
Branch: MAIN
Changes since 1.1: +1 -3 lines
U fixed sql for mysql-3.x (don't have any characters after trailing semicolon)

1 rabit 1.1 <?php
2     /*------------------------------------------------------------------------------
3     --- www.netfrag.org
4     --- Content management functions include file.
5     --------------------------------------------------------------------------------
6     --- rabit, 01:04 27.08.2004
7     --- $$id$$
8     ------------------------------------------------------------------------------*/
9    
10     //----------------------------------------------------------
11    
12     function cms_getcontent($type, $keyname, $language_id = 0) {
13    
14     $sql = "SELECT
15     contents.content, contents.description, UNIX_TIMESTAMP(contents.timestamp), languages.name, users.name
16     FROM
17     contents, languages, users
18     WHERE
19     contents.type='$type'
20     AND
21     contents.keyname='$keyname'
22     AND
23     users.id=contents.creator_id
24     AND
25     languages.id=contents.language_id
26 bd 1.2 LIMIT 0,1;";
27 rabit 1.1
28     $res = mysql_query($sql);
29     if(!$res) return false;
30    
31     $row = mysql_fetch_row($res);
32    
33     $contentdata = array(
34     'content' => $row[0],
35     'description' => $row[1],
36     'unixtime' => $row[2],
37     'language_name' => $row[3],
38     'creator_name' => $row[4]
39     );
40    
41     return $contentdata;
42    
43     }
44    
45     //------------------------------------------------------------------------------
46    
47     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed