Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

eznewsfeed/user/datasupplier.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: datasupplier.php 6304 2001-07-29 23:31:17Z kaid $
5 //
6 // Created on: <23-Oct-2000 17:53:46 bf>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27
28 $ini =& eZINI::instance( 'site.ini' );
29
30 $GlobalSectionID = $ini->variable( "site", "DefaultSection" );
31 $PageCaching = $ini->variable( "eZNewsFeedMain", "PageCaching" );
32
33 switch ( $url_array[2] )
34 {
35 case "latest":
36 {
37 $CategoryID = $url_array[3];
38 if ( !isset( $CategoryID ) || ( $CategoryID == "" ) )
39 $CategoryID = 0;
40
41 if ( $PageCaching == "enabled" )
42 {
43 $CategoryID = $url_array[3];
44 $cachedFile = "eznewsfeed/cache/latestnews," . $CategoryID . ".cache";
45
46 if ( file_exists( $cachedFile ) )
47 {
48 include( $cachedFile );
49 }
50 else
51 {
52 $GenerateStaticPage = "true";
53 include( "kernel/eznewsfeed/user/newslist.php" );
54 }
55 }
56 else
57 {
58 $GenerateStaticPage = "false";
59 include( "kernel/eznewsfeed/user/newslist.php" );
60 }
61 }
62 break;
63
64 case "allcategories" :
65 {
66 $GenerateStaticPage = "false";
67 include( "kernel/eznewsfeed/user/allcategories.php" );
68 }
69 break;
70
71 case "search":
72 {
73 include( "kernel/eznewsfeed/user/search.php" );
74 }
75 break;
76 }
77
78 ?>
$CategoryID
$CategoryID
Definition: admin/articleedit.php:53
file_exists
static file_exists( $inifilename)
Definition: eZPBINIFile.php:195
$url_array
$url_array
Definition: ezaddress/admin/datasupplier.php:34
$GlobalSectionID
$GlobalSectionID
Definition: eznewsfeed/user/datasupplier.php:30
$ini
$ini
Definition: eznewsfeed/user/datasupplier.php:28
$PageCaching
$PageCaching
Definition: eznewsfeed/user/datasupplier.php:31
$cachedFile
$cachedFile
Definition: eznewsfeed/user/headlines.php:109
$GenerateStaticPage
$GenerateStaticPage
Definition: quizscores.php:95
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.