-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.importusers.html.php
More file actions
executable file
·140 lines (122 loc) · 4.09 KB
/
admin.importusers.html.php
File metadata and controls
executable file
·140 lines (122 loc) · 4.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php
/*
* Created on 3 Ïêô 2005
* @mamboversion 4.5.2
* @version 0.3
* @package ImportUsers
* @copyright (C) 2005 Nikos Anagnostou
* @copyright (C) for the import part of the code Wayne Stewart
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or
die( 'Direct Access to this location is not allowed.' );
/* ensure user has access to this function*/
if (!($acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'all') || $acl->acl_check('administration', 'edit', 'users', $my->usertype, 'components', 'com_dailymessage')))
mosRedirect('index2.php', _NOT_AUTH);
/*
*
*
*/
class importScreens {
/*
*
*/
function init($task)
{
// if(UserImport::getPath2Csv()==null)
echo '<form method="POST" action="index2.php" name="adminForm">' .
'<input type="hidden" name="boxchecked" value="1" />' .
'<input type="hidden" name="option" value="com_importusers" />' .
'<input type="hidden" name="task" value="'.$task.'"/></form>';
}
/**
*
*/
function importUsers($task) {
$csv=UserImport::getPath2Csv();
if(empty($csv))
{
echo '<form enctype="multipart/form-data" ' .
'action="index2.php" method="POST" ' .
'name="adminForm"><input type="hidden" ' .
'name="MAX_FILE_SIZE" value="3000000"/>' .
'<input name="csvfile" type="file" ' .
'title="CSV File to import"/><input type="hidden" ' .
'name="option" value="com_importusers" />' .
'<input type="hidden" name="task" value="'.$task.'" />' .
'<input type="submit" value="Upload+Process"/></form>';
}
else
{
echo "Using csv uploaded before: $csv"."<br/>";
echo '<form ' .
'action="index2.php" method="POST" ' .
'name="adminForm"><input type="hidden" ' .
'name="option" value="com_importusers" />' .
'<input type="hidden" name="task" value="'.$task.'" />' ;
}
}
/*
*
*/
function notification()
{
global $mosConfig_absolute_path;
$file = $mosConfig_absolute_path .'/administrator/components/com_importusers/tmpl/mail.html';
if ( $fp = fopen( $file, 'r' ) ) {
$content = fread( $fp, filesize( $file ) );
}
else
echo "Mail template not found or could not be opened <br/>";
fclose($fp);
return $content;
}
/**
*
*/
function editHTML( $file , $content)
{
global $mosConfig_absolute_path;
$template_path = $file;
?>
<form action="index2.php" method="post" name="adminForm">
<table cellpadding="1" cellspacing="1" border="0" width="100%">
<tr>
<td width="290"><table class="adminheading"><tr><th class="templates">Mail HTML Editor</th></tr></table></td>
</tr>
</table>
<table class="adminform">
<tr><th><?php echo $template_path; ?></th></tr>
<tr><td><textarea style="width:100%;height:500px" cols="110" rows="25" name="filecontent" class="inputbox"><?php echo $content; ?></textarea></td></tr>
</table>
<input type="hidden" name="option" value="com_importusers" />
<input type="hidden" name="task" value="new" />
</form>
<?php
}
/*
*
*/
function editPHP( $file , $content)
{
global $mosConfig_absolute_path;
$config_path = $file;
?>
<form action="index2.php" method="post" name="adminForm">
<table cellpadding="1" cellspacing="1" border="0" width="100%">
<tr>
<td width="290"><table class="adminheading"><tr><th class="templates">Configuration Editor</th></tr></table></td>
</tr>
</table>
<table class="adminform">
<tr><th><?php echo $config_path; ?></th></tr>
<tr><td><textarea style="width:100%;height:500px" cols="110" rows="25" name="filecontent" class="inputbox"><?php echo $content; ?></textarea></td></tr>
</table>
<input type="hidden" name="option" value="com_importusers" />
<input type="hidden" name="task" value="new" />
</form>
<?php
}
}
?>