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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Mon Aug 30 02:22:34 2004 UTC (20 years ago) by rabit
Branch: MAIN
Initial commit: Content management functions include file.

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 LIMIT 0,1;
27 ";
28
29 $res = mysql_query($sql);
30
31 if(!$res) return false;
32
33 $row = mysql_fetch_row($res);
34
35 $contentdata = array(
36 'content' => $row[0],
37 'description' => $row[1],
38 'unixtime' => $row[2],
39 'language_name' => $row[3],
40 'creator_name' => $row[4]
41 );
42
43 return $contentdata;
44
45 }
46
47 //------------------------------------------------------------------------------
48
49 ?>

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