Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezmail/user/datasupplier.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: datasupplier.php 8870 2002-01-04 09:26:57Z jhe $
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 // include_once( "classes/ezhttptool.php" );
28 // include_once( "ezmail/classes/ezmailaccount.php" );
29 // include_once( "ezmail/classes/ezmailfolder.php" );
30 // include_once( "ezuser/classes/ezuser.php" );
31
32 $ini =& eZINI::instance( 'site.ini' );
33 $GlobalSectionID = $ini->variable( "eZMailMain", "DefaultSection" );
34 $SiteDesign = $ini->variable( "site", "SiteDesign" );
35
36 switch ( $url_array[2] )
37 {
38 case "foldersort" : // change the sort mode of the folder list
39 {
40 $FolderID = $url_array[3];
41 $SortMethod = $url_array[4];
42 $Offset = 0;
43 include( "kernel/ezmail/user/maillist.php" );
44 }
45 break;
46
47 case "folder" :
48 {
49 $FolderID = $url_array[3];
50 $Offset = $url_array[4];
51 if ( $Offset == "" )
52 $Offset = 0;
53 // if ( $FolderID == "" )
54 // $FolderID = get INBOX.
55
56 include( "kernel/ezmail/user/maillist.php" );
57 }
58 break;
59
60 case "view" :
61 {
62 $MailID = $url_array[3];
63 include( "kernel/ezmail/user/mailview.php" );
64 }
65 break;
66
67 case "folderedit" :
68 {
69 $FolderID = $url_array[3];
70 if ( $FolderID == "" )
71 $FolderID = 0;
72 include( "kernel/ezmail/user/folderedit.php" );
73 }
74 break;
75
76 case "folderlist" :
77 {
78 include( "kernel/ezmail/user/folderlist.php" );
79 }
80 break;
81
82 case "mailedit" :
83 {
84 $MailID = $url_array[3];
85 if ( $MailID == "" )
86 $MailID = 0;
87 include( "kernel/ezmail/user/mailedit.php" );
88 }
89 break;
90
91 case "fileedit" :
92 {
93 $MailID = $url_array[3];
94 if ( $MailID == "" )
95 $MailID = 0;
96 include( "kernel/ezmail/user/fileedit.php" );
97 }
98 break;
99
100 case "config" :
101 {
102 include( "kernel/ezmail/user/configure.php" );
103 }
104 break;
105
106 case "accountedit" :
107 {
108 $AccountID = $url_array[3];
109 if ( $AccountID == "" )
110 $AccountID = 0;
111 include( "kernel/ezmail/user/accountedit.php" );
112 }
113 break;
114
115 case "check" : // check the mail for this user!
116 {
117 $user =& eZUser::currentUser();
118 $accounts = eZMailAccount::getByUser( $user->id() );
119
120 foreach ( $accounts as $account )
121 {
122 if ( $account->isActive() )
123 $account->checkMail();
124 }
125
126 eZHTTPTool::header( "Location: /mail/folderlist/" );
127 exit();
128 // $server = "{" . "zap.ez.no" . "/pop3:" . "110" ."}";
129 // $mbox = imap_open( $server, "larson", "AcRXYJJA", OP_HALFOPEN)
130 // or die("can't connect: ".imap_last_error());
131
132 // $structure = imap_fetchstructure( $mbox, 1 );
133 // echo "<pre>"; print_r( $structure ); echo "</pre>";
134 // print( imap_fetchbody( $mbox, 1, 2 ) );
135 // imap_close( $mbox );
136 }
137 break;
138
139 case "filteredit" :
140 {
141 $FilterID = $url_array[3];
142 if ( $FilterID == "" )
143 $FilterID = 0;
144 include( "kernel/ezmail/user/filteredit.php" );
145 }
146 break;
147
148 case "search" :
149 {
150 include( "kernel/ezmail/user/search.php" );
151 }
152 break;
153
154 case "link" :
155 {
156 $MailID = $url_array[3];
157 include( "kernel/ezmail/user/link.php" );
158 }
159 break;
160
161 default:
162 {
163 eZHTTPTool::header( "Location: /error/404/" );
164 exit();
165 }
166 break;
167 }
168
169 ?>
eZHTTPTool\header
static header( $string)
Definition: ezhttptool.php:96
eZMailAccount\getByUser
static getByUser( $user)
Definition: ezmailaccount.php:372
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896
$accounts
if( $user) $accounts
Definition: configure.php:161
$url_array
$url_array
Definition: ezaddress/admin/datasupplier.php:34
$Offset
$Offset
Definition: ezarticle/user/search.php:110
$GlobalSectionID
$GlobalSectionID
Definition: ezmail/user/datasupplier.php:33
$ini
$ini
Definition: ezmail/user/datasupplier.php:32
$SiteDesign
$SiteDesign
Definition: ezmail/user/datasupplier.php:34
exit
exit
Definition: folder.php:81
$user
$user
Definition: user/adlist.php:39
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.