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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by bd, Mon Aug 30 04:03:25 2004 UTC revision 1.3 by rabit, Mon Aug 30 04:16:24 2004 UTC
# Line 4  Line 4 
4  --- Content management functions include file.  --- Content management functions include file.
5  --------------------------------------------------------------------------------  --------------------------------------------------------------------------------
6  --- rabit, 01:04 27.08.2004  --- rabit, 01:04 27.08.2004
7  --- $$id$$  --- $Id$
8  ------------------------------------------------------------------------------*/  ------------------------------------------------------------------------------*/
9    
 //----------------------------------------------------------  
   
10  function cms_getcontent($type, $keyname, $language_id = 0) {  function cms_getcontent($type, $keyname, $language_id = 0) {
11    
12    $sql = "SELECT    $sql = "SELECT contents.content, contents.description, UNIX_TIMESTAMP(contents.timestamp), languages.name, users.name FROM contents, languages, users WHERE contents.type='$type' AND contents.keyname='$keyname'" . ($language_id ? " AND languages.id='$language_id'" : '') . " AND users.id=contents.creator_id AND languages.id=contents.language_id LIMIT 0,1;";
 contents.content, contents.description, UNIX_TIMESTAMP(contents.timestamp), languages.name, users.name  
 FROM  
 contents, languages, users  
 WHERE  
 contents.type='$type'  
 AND  
 contents.keyname='$keyname'  
 AND  
 users.id=contents.creator_id  
 AND  
 languages.id=contents.language_id  
 LIMIT 0,1;";  
13    
14    $res = mysql_query($sql);    $res = mysql_query($sql);
15    if(!$res) return false;    if(!$res) return false;
# Line 42  LIMIT 0,1;"; Line 28  LIMIT 0,1;";
28    
29  }  }
30    
31    //----------------------------------------------------------
32    
33    function cms_getlist($types, $keynames, $daterange = '', $languageids = '', $languages = '') {
34    
35      $sql = "SELECT contents.id, contents.description, UNIX_TIMESTAMP(contents.timestamp), languages.id, languages.name, users.name FROM contents, languages, users WHERE contents.type='$types' AND contents.keyname='$keynames' AND users.id=contents.creator_id AND languages.id=contents.language_id;";
36    
37      $res = mysql_query($sql);
38    
39      $rowcount = 0;
40    
41      while($row = mysql_fetch_row($res)) $rows[$rowcount++] = $row;
42    
43      return $rows;
44    
45    }
46    
47    //----------------------------------------------------------
48    
49  //------------------------------------------------------------------------------  //------------------------------------------------------------------------------
50    
51  ?>  ?>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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