RSS

(root)/phpwe/sWG_complete/account_pms : 1 : system/mods/account_profile/swgi_pms_via_email.php

« back to all changes in this revision

Viewing changes to system/mods/account_profile/swgi_pms_via_email.php

@4u
2009-06-17 14:06:16
Revision ID: @4u-20090617140616-nxseplsdn6zslyof
Initial commit

Show diffs side-by-side

added added

removed removed

 
1
<?php
 
2
//j// BOF
 
3
 
 
4
/*n// NOTE
 
5
----------------------------------------------------------------------------
 
6
secured WebGine
 
7
net-based application engine
 
8
----------------------------------------------------------------------------
 
9
(C) direct Netware Group - All rights reserved
 
10
http://www.direct-netware.de/redirect.php?swg
 
11
 
 
12
The following license agreement remains valid unless any additions or
 
13
changes are being made by direct Netware Group in a written form.
 
14
 
 
15
This program is free software; you can redistribute it and/or modify it
 
16
under the terms of the GNU General Public License as published by the
 
17
Free Software Foundation; either version 2 of the License, or (at your
 
18
option) any later version.
 
19
 
 
20
This program is distributed in the hope that it will be useful, but WITHOUT
 
21
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
22
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 
23
more details.
 
24
 
 
25
You should have received a copy of the GNU General Public License along with
 
26
this program; if not, write to the Free Software Foundation, Inc.,
 
27
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
 
28
----------------------------------------------------------------------------
 
29
http://www.direct-netware.de/redirect.php?licenses;gpl
 
30
----------------------------------------------------------------------------
 
31
$Id: swgi_pms_via_email.php,v 1.1 2008/12/22 14:33:50 s4u Exp $
 
32
#echo(sWGaccountPmsVersion)#
 
33
sWG/#echo(__FILEPATH__)#
 
34
----------------------------------------------------------------------------
 
35
NOTE_END //n*/
 
36
/**
 
37
* account_profile/swgi_pms_via_email.php
 
38
*
 
39
* @internal   We are using phpDocumentor to automate the documentation process
 
40
*             for creating the Developer's Manual. All sections including
 
41
*             these special comments will be removed from the release source
 
42
*             code.
 
43
*             Use the following line to ensure 76 character sizes:
 
44
* ----------------------------------------------------------------------------
 
45
* @author     direct Netware Group
 
46
* @copyright  (C) direct Netware Group - All rights reserved
 
47
* @package    sWG
 
48
* @subpackage account
 
49
* @uses       direct_product_iversion
 
50
* @since      v0.1.00
 
51
* @license    http://www.direct-netware.de/redirect.php?licenses;gpl
 
52
*             GNU General Public License 2
 
53
*/
 
54
 
 
55
/* -------------------------------------------------------------------------
 
56
All comments will be removed in the "production" packages (they will be in
 
57
all development packets)
 
58
------------------------------------------------------------------------- */
 
59
 
 
60
//j// Basic configuration
 
61
 
 
62
/* -------------------------------------------------------------------------
 
63
Direct calls will be honored with an "exit ()"
 
64
------------------------------------------------------------------------- */
 
65
 
 
66
if (!defined ("direct_product_iversion")) { exit (); }
 
67
 
 
68
//j// Functions and classes
 
69
 
 
70
//f// direct_mods_account_profile_pms_via_email_edit ($f_data)
 
71
/**
 
72
* Modification function called by:
 
73
* m = account
 
74
* s = profile
 
75
* a = edit
 
76
*
 
77
* @param  array $f_data Array containing call specific data.
 
78
* @uses   direct_basic_functions::inputfilter_number()
 
79
* @uses   direct_debug()
 
80
* @uses   direct_formbuilder::entry_add()
 
81
* @uses   direct_formbuilder::entry_add_select()
 
82
* @uses   direct_local_get()
 
83
* @uses   USE_debug_reporting
 
84
* @return boolean True on success
 
85
* @since  v0.1.00
 
86
*/
 
87
function direct_mods_account_profile_pms_via_email_edit ($f_data)
 
88
{
 
89
        global $direct_cachedata,$direct_classes,$direct_settings;
 
90
        if (USE_debug_reporting) { direct_debug (5,"sWG/#echo(__FILEPATH__)# -direct_mods_account_profile_pms_via_email_edit (+f_data)- (#echo(__LINE__)#)"); }
 
91
 
 
92
        if (isset ($f_data[1]))
 
93
        {
 
94
                $f_continue_check = $direct_settings['account_mods_profile_pms_via_email'];
 
95
                $f_return = true;
 
96
        }
 
97
        else
 
98
        {
 
99
                $f_continue_check = false;
 
100
                $f_return = false;
 
101
        }
 
102
 
 
103
        if ($f_continue_check)
 
104
        {
 
105
                if ($f_data[1]['ddbusers_pms_via_email']) { $direct_cachedata['i_apms_via_email'] = "<evars><no><value value='0' /><text><![CDATA[".(direct_local_get ("core_no"))."]]></text></no><yes><value value='1' /><selected value='1' /><text><![CDATA[".(direct_local_get ("core_yes"))."]]></text></yes></evars>"; }
 
106
                else { $direct_cachedata['i_apms_via_email'] = "<evars><no><value value='0' /><selected value='1' /><text><![CDATA[".(direct_local_get ("core_no"))."]]></text></no><yes><value value='1' /><text><![CDATA[".(direct_local_get ("core_yes"))."]]></text></yes></evars>"; }
 
107
 
 
108
                $direct_classes['formbuilder']->entry_add ("subtitle","pms_setting",(direct_local_get ("account_pms_setting")));
 
109
                $direct_classes['formbuilder']->entry_add_select ("apms_via_email",(direct_local_get ("account_pms_via_email")),false,"s");
 
110
        }
 
111
 
 
112
        return /*#ifdef(DEBUG):direct_debug (7,"sWG/#echo(__FILEPATH__)# -direct_mods_account_profile_pms_via_email_edit ()- (#echo(__LINE__)#)",:#*/$f_return/*#ifdef(DEBUG):,true):#*/;
 
113
}
 
114
 
 
115
//f// direct_mods_account_profile_pms_via_email_edit_check ($f_data)
 
116
/**
 
117
* Modification function called by:
 
118
* m = account
 
119
* s = profile
 
120
* a = edit-save
 
121
*
 
122
* @param  array $f_data Array containing call specific data.
 
123
* @uses   direct_basic_functions::inputfilter_number()
 
124
* @uses   direct_debug()
 
125
* @uses   direct_formbuilder::entry_add()
 
126
* @uses   direct_formbuilder::entry_add_select()
 
127
* @uses   direct_local_get()
 
128
* @uses   USE_debug_reporting
 
129
* @return boolean Always true
 
130
* @since  v0.1.00
 
131
*/
 
132
function direct_mods_account_profile_pms_via_email_edit_check ($f_data)
 
133
{
 
134
        global $direct_cachedata,$direct_classes,$direct_settings;
 
135
        if (USE_debug_reporting) { direct_debug (5,"sWG/#echo(__FILEPATH__)# -direct_mods_account_profile_pms_via_email_edit_check (+f_data)- (#echo(__LINE__)#)"); }
 
136
 
 
137
        if ($direct_settings['account_mods_profile_pms_via_email'])
 
138
        {
 
139
                $direct_cachedata['i_apms_via_email'] = (isset ($GLOBALS['i_apms_via_email']) ? (str_replace ("'","",$GLOBALS['i_apms_via_email'])) : "");
 
140
                $direct_cachedata['i_apms_via_email'] = str_replace ("<value value='$direct_cachedata[i_apms_via_email]' />","<value value='$direct_cachedata[i_apms_via_email]' /><selected value='1' />","<evars><no><value value='0' /><text><![CDATA[".(direct_local_get ("core_no"))."]]></text></no><yes><value value='1' /><text><![CDATA[".(direct_local_get ("core_yes"))."]]></text></yes></evars>");
 
141
 
 
142
                $direct_classes['formbuilder']->entry_add ("subtitle","pms_setting",(direct_local_get ("account_pms_setting")));
 
143
                $direct_classes['formbuilder']->entry_add_select ("apms_via_email",(direct_local_get ("account_pms_via_email")),true,"s");
 
144
        }
 
145
 
 
146
        return /*#ifdef(DEBUG):direct_debug (7,"sWG/#echo(__FILEPATH__)# -direct_mods_account_profile_pms_via_email_edit_check ()- (#echo(__LINE__)#)",:#*/true/*#ifdef(DEBUG):,true):#*/;
 
147
}
 
148
 
 
149
//f// direct_mods_account_profile_pms_via_email_edit_save ($f_data)
 
150
/**
 
151
* Modification function called by:
 
152
* m = account
 
153
* s = profile
 
154
* a = edit-save
 
155
*
 
156
* @param  array $f_data Array containing call specific data.
 
157
* @uses   direct_debug()
 
158
* @uses   USE_debug_reporting
 
159
* @return mixed Input based, edited user array or NULL on error
 
160
* @since  v0.1.00
 
161
*/
 
162
function direct_mods_account_profile_pms_via_email_edit_save ($f_data)
 
163
{
 
164
        global $direct_cachedata,$direct_settings;
 
165
        if (USE_debug_reporting) { direct_debug (5,"sWG/#echo(__FILEPATH__)# -direct_mods_account_profile_pms_via_email_edit_save (+f_data)- (#echo(__LINE__)#)"); }
 
166
 
 
167
        if (isset ($f_data[1]))
 
168
        {
 
169
                $f_continue_check = $direct_settings['account_mods_profile_pms_via_email'];
 
170
                $f_return = $f_data[1];
 
171
        }
 
172
        else
 
173
        {
 
174
                $f_continue_check = false;
 
175
                $f_return = NULL;
 
176
        }
 
177
 
 
178
        if ($f_continue_check)
 
179
        {
 
180
                if ($direct_cachedata['i_apms_via_email']) { $f_return['ddbusers_pms_via_email'] = 1; }
 
181
                else { $f_return['ddbusers_pms_via_email'] = 0; }
 
182
        }
 
183
 
 
184
        return /*#ifdef(DEBUG):direct_debug (7,"sWG/#echo(__FILEPATH__)# -direct_mods_account_profile_pms_via_email_edit_save ()- (#echo(__LINE__)#)",:#*/$f_return/*#ifdef(DEBUG):,true):#*/;
 
185
}
 
186
 
 
187
//f// direct_mods_account_profile_pms_via_email_view ($f_data)
 
188
/**
 
189
* Modification function called by:
 
190
* m = account
 
191
* s = profile
 
192
* a = view
 
193
*
 
194
* @param  array $f_data Array containing call specific data.
 
195
* @uses   direct_debug()
 
196
* @uses   USE_debug_reporting
 
197
* @return array List of modifications to view in the output
 
198
* @since  v0.1.00
 
199
*/
 
200
function direct_mods_account_profile_pms_via_email_view ($f_data)
 
201
{
 
202
        if (USE_debug_reporting) { direct_debug (5,"sWG/#echo(__FILEPATH__)# -direct_mods_account_profile_pms_via_email_view (+f_data)- (#echo(__LINE__)#)"); }
 
203
 
 
204
        if (is_array ($f_data[0])) { $f_return = $f_data[0]; }
 
205
        else { $f_return = array (); }
 
206
 
 
207
        return /*#ifdef(DEBUG):direct_debug (7,"sWG/#echo(__FILEPATH__)# -direct_mods_account_profile_pms_via_email_edit_view ()- (#echo(__LINE__)#)",:#*/$f_return/*#ifdef(DEBUG):,true):#*/;
 
208
}
 
209
 
 
210
//j// Script specific commands
 
211
 
 
212
direct_local_integration ("account_pms");
 
213
if (!isset ($direct_settings['account_mods_profile_pms_via_email'])) { $direct_settings['account_mods_profile_pms_via_email'] = true; }
 
214
 
 
215
//j// EOF
 
216
?>
 
 
'\\ No newline at end of file'

Loggerhead 1.17 is a web-based interface for Bazaar branches