Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

gototip.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: gototip.php,v 1.6.2.1 2002/02/27 16:51:29 master Exp $
5 //
6 // Created on: <25-Nov-2000 16:26:08 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 include_once( "ezuser/classes/ezuser.php" );
28
29 include_once( "eztip/classes/eztip.php" );
30 include_once( "eztip/classes/eztipclick.php" );
31 include_once( "ezstats/classes/ezpageview.php" );
32
33
34 if ( get_class( $GlobalPageView ) != "ezpageview" )
35 {
36 $GlobalPageView = new eZPageView();
37 $GlobalPageView->store();
38 }
39
40
41 $user =& eZUser::currentUser();
42
43 $tip = new eZTip( $TipID );
44
45 $click = new eZTipClick();
46 $click->setTip( $tip );
47 $click->setPageViewID( $GlobalPageView->id() );
48 //$click->setPrice( $tip->clickPrice() );
49 $click->store();
50
51 $gotoURL = $tip->url();
52
53 //EP: check if it is external or internal banner --------------------
54 if ( !preg_match( "/^([a-z]+:\/\/)/", $gotoURL ) )
55 {
56 $gotoURL = $GlobalSiteIni->WWWDir.$GlobalSiteIni->Index.$gotoURL;
57 }
58 //EP ----------------------------------------------------------------
59
60 Header( "Location: $gotoURL" );
61 exit();
62
63 ?>
eZPageView
Definition: ezpageview.php:47
eZTipClick
Definition: eztipclick.php:44
eZTip
Definition: eztip.php:46
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896
$GlobalSiteIni
$GlobalSiteIni
Definition: ezarticle/xmlrpc/xmlrpcserver.php:33
exit
exit
Definition: folder.php:81
$click
$click
Definition: gototip.php:45
$user
if(get_class( $GlobalPageView) !="ezpageview") $user
Definition: gototip.php:41
$tip
$tip
Definition: gototip.php:43
$gotoURL
$gotoURL
Definition: gototip.php:51
$GlobalPageView
$GlobalPageView
Definition: storestats.php:43
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.