openupload-svn-update Mailing List for Open Upload (Page 2)
Status: Beta
Brought to you by:
tsdogs
You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(100) |
Nov
(72) |
Dec
(44) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(7) |
Feb
(47) |
Mar
(30) |
Apr
(11) |
May
(10) |
Jun
(8) |
Jul
(1) |
Aug
(22) |
Sep
|
Oct
|
Nov
(13) |
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
(17) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
(1) |
| 2011 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ts...@us...> - 2010-03-18 18:27:09
|
Revision: 373
http://openupload.svn.sourceforge.net/openupload/?rev=373&view=rev
Author: tsdogs
Date: 2010-03-18 18:27:03 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
fix this, many do not see it and causes troubles
Modified Paths:
--------------
trunk/www/.htaccess
Modified: trunk/www/.htaccess
===================================================================
--- trunk/www/.htaccess 2010-03-18 18:25:15 UTC (rev 372)
+++ trunk/www/.htaccess 2010-03-18 18:27:03 UTC (rev 373)
@@ -1,5 +1,5 @@
# Set this accordingly to your installation
# N.B. For this to work, you'll need "AllowOvverride Options" in apache dir config
-php_value file_uploads "On"
-php_value upload_max_filesize "200M"
-php_value post_max_size "200M"
+#php_value file_uploads "On"
+#php_value upload_max_filesize "200M"
+#php_value post_max_size "200M"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2010-03-18 18:25:23
|
Revision: 372
http://openupload.svn.sourceforge.net/openupload/?rev=372&view=rev
Author: tsdogs
Date: 2010-03-18 18:25:15 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
version 0.5 modifications
Modified Paths:
--------------
trunk/plugins/captcha.inc.php
trunk/plugins/compress.inc.php
trunk/plugins/email.inc.php
trunk/plugins/expire.inc.php
trunk/plugins/filesize.inc.php
trunk/plugins/mimetypes.inc.php
trunk/plugins/password.inc.php
Modified: trunk/plugins/captcha.inc.php
===================================================================
--- trunk/plugins/captcha.inc.php 2010-03-18 18:24:44 UTC (rev 371)
+++ trunk/plugins/captcha.inc.php 2010-03-18 18:25:15 UTC (rev 372)
@@ -5,35 +5,36 @@
function CaptchaPlugin() {
$this->fields = array('captcha');
$this->description = tr('Add captcha protection to file download and user registration');
+ $this->category = 'protection';
}
- function uploadOptions(&$finfo,$acl) {
+ function uploadDisplayUploadOptions(&$upload,$acl) {
if ($acl!='enable') return true;
$this->display('uploadOptions');
return true;
}
- function uploadConfirm(&$finfo,$acl) {
+ function uploadValidateUploadOptions(&$upload,$acl) {
global $_POST;
if ($acl!='enable') return true;
- $finfo[0]['captcha'] = $_POST['captcha'];
+ $upload['captcha'] = $_POST['captcha'];
return true;
}
- function downloadRequest($finfo,$acl) {
- if ($finfo[0]['captcha']==1) {
+ function uploadDisplayDownloadOptions($upload,$acl) {
+ if ($upload['captcha']==1) {
$this->assign('captcha_img',app()->config['WWW_ROOT'].'/plugins/captcha.php');
- $this->display('downloadRequest');
+ $this->display('downloadOptions');
return false;
}
return true;
}
- function downloadConfirm($finfo,$acl) {
+ function uploadValidateDownloadOptions($upload,$acl) {
global $_POST;
- if ($finfo[0]['captcha']==1) {
+ if ($upload['captcha']==1) {
require_once(app()->config['INSTALL_ROOT'].'/plugins/securimage/securimage.php');
$securimage = new Securimage();
$result = $securimage->check($_POST['captcha_code']);
@@ -43,13 +44,13 @@
return true;
}
- function registerForm($uinfo,$acl) {
+ function registerForm($upload,$acl) {
$this->assign('captcha_img',app()->config['WWW_ROOT'].'/plugins/captcha.php');
$this->display('registerForm');
return true;
}
- function registerConfirm(&$uinfo,$acl) {
+ function registerConfirm(&$upload,$acl) {
global $_POST;
require_once(app()->config['INSTALL_ROOT'].'/plugins/securimage/securimage.php');
@@ -59,8 +60,8 @@
return $result;
}
- function removeRequest($finfo,$acl) {
- if ($finfo[0]['captcha']==1) {
+ function uploadDisplayRemoveForm(&$upload,$acl) {
+ if ($upload['captcha']==1) {
$this->assign('captcha_img',app()->config['WWW_ROOT'].'/plugins/captcha.php');
$this->display('removeRequest');
return false;
@@ -68,15 +69,71 @@
return true;
}
- function removeConfirm($finfo,$acl) {
- return $this->downloadConfirm($finfo,$acl);
+ function uploadValidateRemoveRequest(&$upload,$acl) {
+ return $this->uploadValidateDownloadOptions($upload,$acl);
}
- function fileDetail(&$finfo,$acl) {
- if ($finfo[0]['captcha']!='')
- $this->display('fileDetail');
+ function uploadDisplayElementDetail(&$upload,$acl) {
+ if ($upload['captcha']!='')
+ $this->display('uploadDetail');
return true;
}
+
+ function invitationDisplayCreateForm(&$invitation,$acl) {
+ if ($acl!='enable') return true;
+ $this->display('invitationForm');
+ return true;
+ }
+
+ function invitationValidateCreateForm(&$invitation,$acl) {
+ global $_POST;
+
+ if ($acl!='enable') return true;
+ $invitation['captcha'] = $_POST['captcha'];
+ return true;
+ }
+
+ function invitationDisplayCreateOptions(&$invitation,$acl) {
+ if ($acl!='enable') return true;
+ $this->display('invitationOptions');
+ return true;
+ }
+
+ function invitationValidateCreateOptions(&$invitation,$acl) {
+ global $_POST;
+
+ if ($acl!='enable') return true;
+ $invitation['u']['captcha'] = $_POST['captcha'];
+ return true;
+ }
+
+ function invitationDisplayUploadForm(&$invitation,$acl) {
+ if ($invitation['captcha']==1) {
+ $this->assign('captcha_img',app()->config['WWW_ROOT'].'/plugins/captcha.php');
+ $this->display('downloadOptions');
+ return false;
+ }
+ return true;
+ }
+
+ function invitationValidateUploadForm($invitation,$acl) {
+ global $_POST;
+
+ if ($invitation['captcha']==1) {
+ require_once(app()->config['INSTALL_ROOT'].'/plugins/securimage/securimage.php');
+ $securimage = new Securimage();
+ $result = $securimage->check($_POST['captcha_code']);
+ if (!$result) app()->error(tr('Wrong captcha code! please try again.'));
+ return $result;
+ } else
+ return true;
+ }
+
+ function invitationDisplayElementDetail(&$invitation,$acl) {
+ $this->display('invitationDetail');
+ return true;
+ }
+
}
?>
\ No newline at end of file
Modified: trunk/plugins/compress.inc.php
===================================================================
--- trunk/plugins/compress.inc.php 2010-03-18 18:24:44 UTC (rev 371)
+++ trunk/plugins/compress.inc.php 2010-03-18 18:25:15 UTC (rev 372)
@@ -9,9 +9,10 @@
array('name' => 'extension', 'description' => tr('Extensions corresponding to commands.'), 'type' => 'list'),
array('name' => 'compression', 'description' => tr('Name of compression commands'), 'type' => 'list'),
);
+ $this->category = 'advanced';
}
- function uploadOptions(&$finfo, $acl) {
+ function uploadDisplayUploadOptions(&$upload, $acl) {
if ($acl != 'enable') return true;
$group = $this->getGroup('command');
if (count($this->config['command'][$group])==0 and count($this->config['command']['*'])>0) {
@@ -26,11 +27,11 @@
return true;
}
- function uploadConfirm(&$finfo, $acl) {
+ function uploadValidateUploadOptions(&$upload, $acl) {
global $_POST;
if ($acl != 'enable') return true;
if ($_POST['compress']!='') {
- if ($finfo[0]['compress']==1) return true; /* file already compressed */
+ if ($upload['compress']==1) return true; /* file already compressed */
$group = $this->getGroup('command');
if (count($this->config['command'][$group])==0 and count($this->config['command']['*'])>0) {
$this->config['command'][$group]=$this->config['command']['*'];
@@ -43,14 +44,14 @@
$tmpdir = randomName(20,20);
$res = mkdir(app()->config['DATA_PATH'].'/tmp/'.$tmpdir);
/* move the uploaded files to that folder with the original name */
- foreach ($finfo as $f) {
+ foreach ($upload['files'] as $f) {
rename($f['tmp'],app()->config['DATA_PATH'].'/tmp/'.$tmpdir.'/'.$f['name']);
$files .= ' "'.chop($f['name']).'"';
$lfiles .= ' "'.app()->config['DATA_PATH'].'/tmp/'.$tmpdir.'/'.chop($f['name']).'"';
}
/* execute the compress command */
$cmd=$this->config['command'][$group][$_POST['compress']];
- $params['%1']=$finfo[0]['tmp'];
+ $params['%1']=$upload['files'][0]['tmp'];
$params['%2']=$files;
$params['%3']=$lfiles;
$params['%4']=app()->config['DATA_PATH'].'/tmp/'.$tmpdir;
@@ -60,19 +61,20 @@
exec($cmd,$output);
chdir($pwd);
/* remove the files */
- foreach ($finfo as $f) {
+ foreach ($upload['files'] as $f) {
unlink(app()->config['DATA_PATH'].'/tmp/'.$tmpdir.'/'.$f['name']);
}
rmdir(app()->config['DATA_PATH'].'/tmp/'.$tmpdir);
/* update the file information with the compressed one */
- $finfo[0]['mime']='binary/octet-stream';
- $finfo[0]['name']=$tmpdir.'.'.$this->config['extension'][$group][$_POST['compress']];
- $finfo[0]['size']=filesize($finfo[0]['tmp'].'.'.$this->config['extension'][$group][$_POST['compress']]);
- $finfo[0]['tmp']=$finfo[0]['tmp'].'.'.$this->config['extension'][$group][$_POST['compress']];
- for ($i=1; $i<count($finfo); $i++)
- unset($finfo[$i]);
+ $upload['files'][0]['mime']='binary/octet-stream';
+ $upload['files'][0]['name']=$tmpdir.'.'.$this->config['extension'][$group][$_POST['compress']];
+ $upload['files'][0]['size']=filesize($upload['files'][0]['tmp'].'.'.$this->config['extension'][$group][$_POST['compress']]);
+ $upload['files'][0]['tmp']=$upload['files'][0]['tmp'].'.'.$this->config['extension'][$group][$_POST['compress']];
+ $upload['size']=$upload['files'][0]['size'];
+ for ($i=1; $i<count($upload['files']); $i++)
+ unset($upload['files'][$i]);
/* tell the program that the file is already compressed, so not to run it again */
- $finfo[0]['compress']=1;
+ $upload['compress']=1;
}
}
return true;
Modified: trunk/plugins/email.inc.php
===================================================================
--- trunk/plugins/email.inc.php 2010-03-18 18:24:44 UTC (rev 371)
+++ trunk/plugins/email.inc.php 2010-03-18 18:25:15 UTC (rev 372)
@@ -7,43 +7,42 @@
$this->options = array(
array('name' => 'multirecipients', 'description' => tr('allow multiple recipients (1 = enable)'), 'type' => 'text'),
);
-
}
- function uploadOptions(&$finfo,$acl) {
+ function uploadDisplayUploadOptions(&$upload,$acl) {
if ($acl!='enable') return true;
$this->display('uploadOptions');
return true;
}
- function uploadConfirm(&$finfo,$acl) {
+ function uploadValidateUploadOptions(&$upload,$acl) {
global $_POST;
if ($acl!='enable') return true;
+
/* do e-mail checking and so */
-/* $this->display('upload'); */
$group = $this->getGroup('maxrecipients');
- $finfo[0]['emailme']=$_POST['emailme'];
- $finfo[0]['emailfrom']=app()->config['site']['email'];
- $finfo[0]['emailto']=$_POST['emailto'];
- $finfo[0]['email_removelink']=$_POST['removelink'];
- $finfo[0]['subject']=$_POST['subject'];
- $finfo[0]['message']=$_POST['message'];
- if ($finfo[0]['emailme']=="yes") {
+ $upload['emailme']=$_POST['emailme'];
+ $upload['emailfrom']=app()->config['site']['email'];
+ $upload['emailto']=$_POST['emailto'];
+ $upload['email_removelink']=$_POST['removelink'];
+ $upload['subject']=$_POST['subject'];
+ $upload['message']=$_POST['message'];
+ if ($upload['emailme']=="yes") {
if ($_SESSION['user']['email']=='') {
/* check valid e-mail */
if (!validEmail($_POST['email'])) {
app()->error(tr('Your e-mail address isn\'t valid!'));
return false;
}
- $finfo[0]['emailfrom']=$_POST['email'];
+ $upload['emailfrom']=$_POST['email'];
} else {
- $finfo[0]['emailfrom']=$_SESSION['user']['email'];
+ $upload['emailfrom']=$_SESSION['user']['email'];
}
}
if (!isset($this->config['multirecipients'][$group]) and isset($this->config['multirecipients']['*'])) {
$this->config['multirecipients'][$group]=$this->config['multirecipients']['*'];
}
- if ($finfo[0]['emailto']!='') {
+ if ($upload['emailto']!='') {
if ($this->config['multirecipients'][$group]=='1') {
$emailto = split(';',$_POST['emailto']);
} else {
@@ -52,64 +51,132 @@
foreach ($emailto as $destination) {
if (!validEmail($destination)) {
app()->error(tr('Destination e-mail address "%1" isn\'t valid!',$destination));
+ /* maybe I should not fail here, just report the error. */
return false;
}
}
}
-
return true;
}
- function uploadFileInfo(&$finfo,$acl) {
+ function uploadExecuteUploadActions(&$upload,$acl,$template = 'uploadNotify', $notify = true) {
global $_SESSION;
if ($acl!='enable') return true;
/* send the e-mails */
- app()->tpl->assign('finfo',$finfo);
- if ($finfo[0]['emailme']=="yes") {
+ app()->tpl->assign('upload',$upload);
+ if ($upload['emailme']=="yes") {
app()->tpl->assign('remove','yes');
- $subject = app()->config['site']['title'].': '.tr("Information about your uploaded file: %1",$finfo[0]['description']);
- sendMail(app()->config['site']['email'],'noreply',$finfo[0]['emailfrom'],$subject,'plugins/email/notify');
+ $subject = app()->config['site']['title'].': '.tr("Information about your uploaded file: %1",$upload['description']);
+ $r = sendMail(app()->config['site']['email'],$upload['emailfrom'],$subject,'plugins/email/'.$template);
+ if ($notify)
+ if ($r)
+ app()->message(tr('E-mail was sent to: %1!',$upload['emailfrom']));
+ else
+ app()->error(tr('E-mail was NOT sent to: %1!',$upload['emailfrom']));
}
- if ($finfo[0]['emailto']!='') {
- $subject = $finfo[0]['subject']!=''?$finfo[0]['subject']:tr("An upload was delivered to you");
+ if ($upload['emailto']!='') {
+ $subject = $upload['subject']!=''?$upload['subject']:tr("An upload was delivered to you");
$subject = app()->config['site']['title'].': '.$subject;
- app()->tpl->assign('remove',$finfo[0]['email_removelink']);
- sendMail($finfo[0]['emailfrom'],$finfo[0]['emailfrom'],$finfo[0]['emailto'],$subject,'plugins/email/notify');
+ app()->tpl->assign('remove',$upload['email_removelink']);
+ $r = sendMail($upload['emailfrom'],$upload['emailto'],$subject,'plugins/email/'.$template);
+ if ($notify)
+ if ($r)
+ app()->message(tr('E-mail was sent to: %1!',$upload['emailto']));
+ else
+ app()->error(tr('E-mail was NOT sent to: %1!',$upload['emailto']));
}
/* don't send it twice */
- $finfo[0]['emailme']=='';
- $finfo[0]['emailto']=='';
+ $upload['emailme']=='';
+ $upload['emailto']=='';
return true;
}
- function fileDetail(&$finfo,$acl) {
+ function uploadDisplayElementDetail(&$upload,$acl) {
global $_GET;
if ($acl!='enable') return true;
if (isset($_GET['emailme'])) {
app()->tpl->assign('remove','yes');
- $subject = app()->config['site']['title'].': '.tr("Information about your uploaded file: %1",$finfo[0]['description']);
- app()->tpl->assign('finfo',$finfo);
- sendMail(app()->config['site']['email'],'noreply',$_SESSION['user']['email'],$subject,'plugins/email/notify');
- app()->message(tr('E-mail was sent!'));
+ $subject = app()->config['site']['title'].': '.tr("Information about your uploaded file: %1",$upload['description']);
+ app()->tpl->assign('upload',$upload);
+ $r = sendMail(app()->config['site']['email'],$_SESSION['user']['email'],$subject,'plugins/email/uploadNotify');
+ if ($r)
+ app()->message(tr('E-mail was sent to: %1!',$_SESSION['user']['email']));
+ else
+ app()->error(tr('E-mail was NOT sent to: %1!',$_SESSION['user']['email']));
redirect('?action=l&step=2&id='.$_GET['id']);
- return false;
+ return false; /* force redirect */
} else if (isset($_GET['sendemail']) and isset($_GET['emailto']) and ($_GET['emailto']!='')) {
$subject = $_GET['subject']!=''?$_GET['subject']:tr("An upload was delivered to you");
$subject = app()->config['site']['title'].': '.$subject;
- $finfo[0]['subject']=$_GET['subject'];
- $finfo[0]['message']=$_GET['message'];
- app()->tpl->assign('finfo',$finfo);
+ $emailto = split(';',$_GET['emailto']);
+
+ app()->tpl->assign('upload',$upload);
app()->tpl->assign('remove',$_GET['removelink']);
- sendMail($_SESSION['user']['email'],$_SESSION['user']['email'],$_GET['emailto'],$subject,'plugins/email/notify');
- app()->message(tr('E-mail was sent to: %1!',$_GET['emailto']));
+ foreach ($emailto as $to) {
+ $to = trim($to);
+ if (!validEmail($to)) {
+ app()->error(tr('Invalid e-mail address: %1!',$to));
+ } else {
+ $r = sendMail($_SESSION['user']['email'],$to,$subject,'plugins/email/uploadNotify');
+ if ($r)
+ app()->message(tr('E-mail was sent to: %1!',$to));
+ else
+ app()->error(tr('E-mail was NOT sent to: %1!',$to));
+ }
+ }
redirect('?action=l&step=2&id='.$_GET['id']);
- return false;
+ return false; /* force redirect */
} else {
- app()->tpl->assign('finfo',$finfo);
- $this->display('fileDetail');
+ app()->tpl->assign('upload',$upload);
+ $this->display('uploadDetail');
return true;
}
}
+
+
+ function invitationDisplayCreateForm(&$invitation,$acl) {
+ if ($acl!='enable') return true;
+ $this->display('uploadOptions');
+ return true;
+ }
+
+ function invitationValidateCreateForm(&$invitation,$acl) {
+ if ($acl != 'enable') return true;
+
+ return $this->uploadValidateUploadOptions($invitation,$acl);
+ }
+
+ function invitationDisplayCreateOptions(&$invitation,$acl) {
+ if ($acl!='enable') return true;
+ $this->display('uploadOptions');
+ return true;
+ }
+
+ function invitationValidateCreateOptions(&$invitation,$acl) {
+ if ($acl != 'enable') return true;
+
+ /* let the invitation save info about the upload */
+ $this->fields = array ( 'emailme','emailfrom','emailto','email_removelink','subject','message' );
+ return $this->uploadValidateUploadOptions($invitation['u'],$acl);
+ }
+
+ function invitationDisplayElementDetail(&$invitation,$acl) {
+ if ($acl!='enable') return true;
+ if ($acl != 'enable') return true;
+
+ return $this->uploadDisplayElementDetail($invitation,$acl);
+ }
+
+
+ function invitationExecuteCreateActions(&$invitation,$acl) {
+ if ($acl != 'enable') return true;
+ return $this->uploadExecuteUploadActions($invitation,$acl,'invitationNotify',true);
+ }
+
+ function invitationExecuteUploadActions($invitation,$acl) {
+ if ($acl != 'enable') return true;
+ return $this->uploadExecuteUploadActions($invitation['u'],$acl,'uploadNotify',false);
+ }
}
Modified: trunk/plugins/expire.inc.php
===================================================================
--- trunk/plugins/expire.inc.php 2010-03-18 18:24:44 UTC (rev 371)
+++ trunk/plugins/expire.inc.php 2010-03-18 18:25:15 UTC (rev 372)
@@ -7,10 +7,11 @@
$this->options = array(
array('name' => 'days', 'description' => tr('N. Of Days'), 'type' => 'text'),
);
- $this->fields = array('expire');
+ //$this->fields = array('expire');
+ $this->category = 'advanced';
}
- function uploadForm(&$finfo,$acl) {
+ function uploadDisplayUploadForm(&$upload,$acl) {
if ($acl!='enable') return true;
$group = $this->getGroup('days');
/* now set */
@@ -18,13 +19,13 @@
$this->config['days'][$group]=$this->config['days']['*'];
}
if ($this->config['days'][$group]>0) {
- $this->assign('msg',tr('Files will be kept on our server for %1 days',$this->config['days'][$group]));
+ app()->tpl->assign('days',$this->config['days'][$group]);
$this->display('uploadForm');
}
return true;
}
- function calculateExpireDate() {
+ function _calculateExpireDate() {
$group = $this->getGroup('days');
/* now set */
@@ -32,43 +33,44 @@
$this->config['days'][$group]=$this->config['days']['*'];
}
if ($this->config['days'][$group]>0) {
- $expire=date('Y-m-d',time()+($this->config['days'][$group]*24*60*60));
+ $expire=date('Y-m-d H:i:s',time()+($this->config['days'][$group]*24*60*60));
} else {
$expire='9999-12-31';
}
return $expire;
}
- function uploadOptions(&$finfo,$acl) {
+ function uploadValidateUploadOptions(&$upload,$acl) {
if ($acl!='enable') return true;
- $expire = $this->calculateExpireDate();
+ $expire = $this->_calculateExpireDate();
if ($expire!='') {
if ($expire == '9999-12-31')
- app()->tpl->assign('expire',tr('Never'));
+ app()->tpl->assign('expire_date',tr('Never'));
else
- app()->tpl->assign('expire',$expire);
- $this->display('uploadOptions');
+ app()->tpl->assign('expire_date',$expire);
+ //$this->display('uploadOptions');
}
+ $upload['expire_date']=$expire;
return true;
}
- function uploadConfirm(&$finfo,$acl) {
+ function uploadDisplayUploadResult(&$upload,$acl) {
if ($acl!='enable') return true;
- $finfo[0]['expire']=$this->calculateExpireDate();
return true;
}
- function fileDetail(&$finfo, $acl) {
+ function uploadDisplayElementDetail(&$upload, $acl) {
if ($acl != 'enable') return true;
- if ($finfo[0]['expire']!='') {
- app()->tpl->assign('expire',$finfo[0]['expire']);
- $this->display('fileDetail');
+ if ($upload['expire_date']!='') {
+ app()->tpl->assign('expire_date',$upload['expire']);
+ $this->display('uploadDetail');
}
return true;
}
+
}
?>
\ No newline at end of file
Modified: trunk/plugins/filesize.inc.php
===================================================================
--- trunk/plugins/filesize.inc.php 2010-03-18 18:24:44 UTC (rev 371)
+++ trunk/plugins/filesize.inc.php 2010-03-18 18:25:15 UTC (rev 372)
@@ -9,30 +9,29 @@
$this->options = array(
array('name' => 'maxsize', 'description' => tr('Maximum File Size'), 'type' => 'text'),
);
+ $this->category = 'protection';
}
- function init() {
+ function setupUpload(&$upload,$acl) {
+
/* check if it's enabled */
$group = $this->getGroup('maxsize');
- $acl = 'disable'; /* disabled by default */
+ /*$acl = 'disable';
if (isset(app()->pluginAcl[$this->name])) {
$acl = app()->pluginAcl[$this->name]['access'];
- }
- if ($acl!='enable') {
- /* reset to default */
- app()->user->setInfo('max_upload_size',app()->config['max_upload_size']*1024*1024);
- } else {
+ }*/
+ if ($acl=='enable') {
$this->loadConfig();
if (!isset($this->config['maxsize'][$group]) and isset($this->config['maxsize']['*'])>0) {
$this->config['maxsize'][$group]=$this->config['maxsize']['*'];
}
if ($this->config['maxsize'][$group]>0) {
- app()->user->setInfo('max_upload_size',$this->config['maxsize'][$group]*1024*1024);
+ $upload['max_upload_size']=$this->config['maxsize'][$group]*1024*1024;
}
}
- ini_set('max_upload_size',app()->user->info('max_upload_size'));
- ini_set('post_max_size',app()->user->info('max_upload_size'));
+ return true;
}
+
}
?>
\ No newline at end of file
Modified: trunk/plugins/mimetypes.inc.php
===================================================================
--- trunk/plugins/mimetypes.inc.php 2010-03-18 18:24:44 UTC (rev 371)
+++ trunk/plugins/mimetypes.inc.php 2010-03-18 18:25:15 UTC (rev 372)
@@ -8,10 +8,11 @@
array('name' => 'allowed', 'description' => tr('Allowed mime types'), 'type' => 'list'),
array('name' => 'message', 'description' => tr('Types in message'), 'type' => 'text'),
);
- /* load the plugin configuration */
+ $this->category = 'protection';
+ /* load the plugin configuration */
}
- function uploadForm(&$finfo,$acl) {
+ function uploadDisplayUploadForm(&$upload,$acl) {
if ($acl!='enable') return true;
$group = $this->getGroup('allowed');
if (count($this->config['allowed'][$group])==0 and count($this->config['allowed']['*'])>0) {
@@ -28,7 +29,7 @@
return true;
}
- function uploadComplete(&$finfo,$acl) {
+ function uploadValidateUploadForm(&$upload,$acl) {
if ($acl!='enable') return true;
$group = $this->getGroup('allowed');
if (count($this->config['allowed'][$group])==0 and count($this->config['allowed']['*'])>0) {
@@ -39,9 +40,9 @@
app()->error(tr('WARNING: no mime types defined. Plugin has been disabled!'));
} else {
$result = true;
- foreach ($finfo as $f) {
+ foreach ($upload['files'] as $f) {
if (array_search($f['mime'],$this->config['allowed'][$group])===FALSE) {
- app()->error(tr('This file type (%1) is not allowed on this site!',$f['mime']));
+ app()->error(tr('This file type (%1) is not allowed on this site! [ %2 ]',$f['mime'],$f['name']));
$result = false;
}
}
@@ -49,5 +50,14 @@
}
return true;
}
+
+ function invitationDisplayUploadFiles(&$upload,$acl) {
+ return $this->uploadDisplayUploadForm($upload['u'],$acl);
+ }
+
+ function invitationValidateUploadFiles(&$upload,$acl) {
+ return $this->uploadValidateUploadForm($upload['u'],$acl);
+ }
+
}
?>
\ No newline at end of file
Modified: trunk/plugins/password.inc.php
===================================================================
--- trunk/plugins/password.inc.php 2010-03-18 18:24:44 UTC (rev 371)
+++ trunk/plugins/password.inc.php 2010-03-18 18:25:15 UTC (rev 372)
@@ -5,9 +5,10 @@
function PasswordPlugin() {
$this->fields = array('password');
$this->description = tr('Option to add password protection for file download');
+ $this->category = 'protection';
}
- function uploadOptions(&$finfo,$acl) {
+ function uploadDisplayUploadOptions(&$upload,$acl) {
if ($acl!='enable') return true;
if (isset(app()->plugins['email']) and
isset(app()->pluginAcl['email']) and
@@ -20,36 +21,36 @@
return true;
}
- function uploadConfirm(&$finfo,$acl) {
+ function uploadValidateUploadOptions(&$upload,$acl) {
global $_POST;
if (isset($_POST['protect']) and $acl=='enable') {
- $finfo[0]['password'] = crypt($_POST['protect']);
+ $upload['password'] = crypt($_POST['protect']);
if (isset($_POST['protect_notify'])) { /* want the e-mail to include the password? */
- $finfo[0]['plainpassword'] = $_POST['protect'];
+ $upload['plainpassword'] = $_POST['protect'];
} else {
- $finfo[0]['plainpassword']='';
+ $upload['plainpassword']='';
}
} else {
- $finfo[0]['password'] = crypt("");
- $finfo[0]['plainpassword'] = "";
+ $upload['password'] = crypt("");
+ $upload['plainpassword'] = "";
}
return true;
}
- function downloadRequest($finfo,$acl) {
- if (($finfo[0]['password']!='') and ($finfo[0]['password']!=crypt("",$finfo[0]['password'])) ) {
- $this->display('downloadRequest');
+ function uploadDisplayDownloadOptions($upload,$acl) {
+ if (($upload['password']!='') and ($upload['password']!=crypt("",$upload['password'])) ) {
+ $this->display('downloadOptions');
return false;
}
return true;
}
- function downloadConfirm($finfo,$acl) {
+ function uploadValidateDownloadOptions($upload,$acl) {
global $_POST;
- if (($finfo[0]['password']!='') and ($finfo[0]['password']!=crypt("",$finfo[0]['password'])) ) {
- $result = $finfo[0]['password']==crypt($_POST['protect'],$finfo[0]['password']);
+ if (($upload['password']!='') and ($upload['password']!=crypt("",$upload['password'])) ) {
+ $result = $upload['password']==crypt($_POST['protect'],$upload['password']);
if (!$result) app()->error(tr('Wrong password!'));
return $result;
} else {
@@ -57,19 +58,91 @@
}
}
- function removeRequest($finfo,$acl) {
- return $this->downloadRequest($finfo,$acl);
+ function uploadDisplayRemoveForm($upload,$acl) {
+ return $this->uploadDisplayDownloadOptions($upload,$acl);
}
- function removeConfirm($finfo,$acl) {
- return $this->downloadConfirm($finfo,$acl);
+ function uploadValidateRemoveForm($upload,$acl) {
+ return $this->uploadValidateDownloadOptions($upload,$acl);
}
- function fileDetail(&$finfo,$acl) {
- if (($finfo[0]['password']!='') and ($finfo[0]['password']!=crypt("",$finfo[0]['password'])) )
- $this->display('fileDetail');
+ function uploadDisplayElementDetail(&$upload,$acl) {
+ if (($upload['password']!='') and ($upload['password']!=crypt("",$upload['password'])) )
+ app()->tpl->assign('password','yes');
+
+ $this->display('uploadDetail');
return true;
}
+
+
+ function invitationDisplayElementDetail(&$invitation,$acl) {
+ if (($invitation['password']!='') and ($invitation['password']!=crypt("",$invitation['password'])) )
+ app()->tpl->assign('invitation_password','yes');
+ if (($invitation['u']['password']!='') and ($invitation['u']['password']!=crypt("",$invitation['u']['password'])) )
+ app()->tpl->assign('upload_password','yes');
+
+ $this->display('invitationDetail');
+ return true;
+ }
+
+
+ function invitationDisplayCreateForm(&$invitation,$acl) {
+ if ($acl!='enable') return true;
+ if (isset(app()->plugins['email']) and
+ isset(app()->pluginAcl['email']) and
+ app()->pluginAcl['email']['access']=='enable') {
+ app()->tpl->assign('emailplugin',true);
+ } else {
+ app()->tpl->assign('emailplugin',false);
+ }
+ $this->display('invitationForm');
+ return true;
+ }
+
+ function invitationValidateCreateForm(&$invitation,$acl) {
+ global $_POST;
+
+ if (isset($_POST['protect']) and $acl=='enable') {
+ $invitation['password'] = crypt($_POST['protect']);
+ if (isset($_POST['protect_notify'])) { /* want the e-mail to include the password? */
+ $invitation['plainpassword'] = $_POST['protect'];
+ } else {
+ $invitation['plainpassword']='';
+ }
+ } else {
+ $invitation['password'] = crypt("");
+ $invitation['plainpassword'] = "";
+ }
+ return true;
+ }
+
+ function invitationDisplayCreateOptions(&$invitation,$acl) {
+ if ($acl!='enable') return true;
+ $this->display('invitationOptions');
+ return true;
+ }
+
+ function invitationValidateCreateOptions(&$invitation,$acl) {
+ global $_POST;
+
+ if (isset($_POST['protect']) and $acl=='enable') {
+ $invitation['u']['password'] = crypt($_POST['protect']);
+ $invitation['u']['plainpassword']='';
+ } else {
+ $invitation['u']['password'] = crypt("");
+ $invitation['u']['plainpassword'] = "";
+ }
+ return true;
+ }
+
+ function invitationDisplayUploadForm(&$invitation,$acl) {
+ return $this->uploadDisplayDownloadOptions($invitation,$acl);
+ }
+
+ function invitationValidateUploadForm($invitation,$acl) {
+ return $this->uploadValidateDownloadOptions($invitation,$acl);
+ }
+
}
?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2010-03-18 18:24:50
|
Revision: 371
http://openupload.svn.sourceforge.net/openupload/?rev=371&view=rev
Author: tsdogs
Date: 2010-03-18 18:24:44 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
version 0.5 modifications
Modified Paths:
--------------
trunk/TODO
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2010-03-18 18:24:11 UTC (rev 370)
+++ trunk/TODO 2010-03-18 18:24:44 UTC (rev 371)
@@ -2,57 +2,45 @@
******* TARGETED FOR RELEASE 0.5 *******
-Administration
- - Move the logic of administration inside the modules (where possibile)
- - A way to add / remove plugins and a way to sort them out
-
-Users
- - Add paging to new "My Files" feature
- - Add more personal options (defaults)
-
-Setup
+- New upload method with perl cgi
+- Remove prototype and use jquery
+- Add a single click upload
+ - options can be set before upload (and must be, as long as possible, checked before the upload)
+ - add option to logout after the upload
+ - add option to notify the user if something goes wrong
+- Move administration options inside modules/plugins
+- review the "step" functionality
+- New GUI (multi file selection, options, administration,etc)
+- Add invitation logic
+- Separate LDAP from AD authentication (they differ too much, use ADLdap)
+- TXTdb migration to gladiusDB
+- Create a new setup script which uses the single plugins and modules for the configuration
+ - first thing, paths then everything else.
- Check for required paths to be writable...
- - Check for zip/tar ?
- - Enable TXTDB initialization
+ - checks and configuration options moved into the modules/plugins
+- Upgrade/Migration script
+- Plugin sorting should not impact gui
+- SQL backend should be more versatile (joins and so on, probably using some direct sql templates would help)
+- Add user options (defaults for options/plugins)
+- Users may be part of more than one group in the db auth.
+- Files can be assigned to other users/groups
+- Expiration can be decided by the user
+- cron job script that allows to do the cleanup of expired files
+- Email templating
+- Files can be imported from the FS
+- User accounts can expire
+- Better urls/admin, maybe mod_rewrite could be used
+- mime types handled on the server side
+- a file can be edited after the upload is complete
+- data tables for files users, etc.
+- api to upload/download from outside the application
-Templates
- - Review the template (and maybe add a new one)
- - Better multifile selection
+Other things which probably will be postponed
+- Antivirus plugin
+- Encryption plugin
+- (?) use apache authentication so can be integrated with the system users
-Database
- - Change the txtdb to something like gladius
- - Add the join function
- - Review the database structure
- - Add a way to upgrade the structure/data
-LDAP
- - AD and LDAP behave too much different, separate the module (or at least the differences)
- - use ADLdap ?
-
-New features
- - Files visible to groups, could also add the possibility to decide wether the file is "public" or "private"
- - API
- - "guest" functionality
- - User might decide duration of a file
- - Cronjob for removal/maintainence
- - Add perl CGI for upload
- - Email personalization (templating)
- - Add possibility to select a file already on the server FS.
- - Possibility to add personalized fields to be completed (on registration, file upload, etc)
- - User account expiration
-
-Things to modify
- - Change upload tracking technology (no prototype.js)
- - Don't like all that step etc.
- - review the ACL/function names to be more self explaining
- - Edit file properties
- - Maybe a single step upload, change/add properties
- - Mime types must be handled on the server (not from the browser)
- - directory structure for "volatile" data
-
-Plugins
- - Review the plugins as to permit to extend all the app functionality
-
Documentation
- Will this ever be done :) ?
@@ -97,14 +85,14 @@
- Authentication with NTLM (mainly on LDAP module)
-Plugins
+Plugins
- (Following are some ideas)
Download bandwith limiting depending on group (of upload user probably better)
Download wait time (is this really needed?)
User additional fields for registration request.
Antivirus on upload
-Translation
+Translation
- Add a database translator? not until base isn't complete.
Template
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2010-03-18 18:24:21
|
Revision: 370
http://openupload.svn.sourceforge.net/openupload/?rev=370&view=rev
Author: tsdogs
Date: 2010-03-18 18:24:11 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
version 0.5 modifications
Modified Paths:
--------------
trunk/lib/modules/default/admin.inc.php
trunk/lib/modules/default/auth.inc.php
Added Paths:
-----------
trunk/lib/modules/default/invitation.inc.php
trunk/lib/modules/default/upload.inc.php
Removed Paths:
-------------
trunk/lib/modules/default/files.inc.php
Modified: trunk/lib/modules/default/admin.inc.php
===================================================================
--- trunk/lib/modules/default/admin.inc.php 2010-03-18 18:22:36 UTC (rev 369)
+++ trunk/lib/modules/default/admin.inc.php 2010-03-18 18:24:11 UTC (rev 370)
@@ -26,11 +26,11 @@
4 => "pluginoptionedit",
5 => "pluginoptiondelete",
),
- "adminfiles" => array (
- 1 => "files",
- 2 => "filedel",
- 3 => "filesplugin",
- 4 => "filemultidel",
+ "adminuploads" => array (
+ 1 => "uploads",
+ 2 => "uploaddel",
+ 3 => "uploadplugin",
+ 4 => "uploadmultidel",
),
"adminmaintenance" => array (
1 => "maintenance",
@@ -410,57 +410,61 @@
$this->tpl->assign('defaultgroup',app()->config['nologingroup']);
}
- function files() {
- $NUM = 50;
+ function uploads() {
+ global $_GET;
- $page = 1;
- if (isset($_GET['page'])) {
- $page=$_GET['page'];
- }
- $limit = ($NUM*($page-1)).','.$NUM;
- $count = app()->db->count('files');
- $this->tpl->assign('pages',ceil($count / $NUM)+1);
+ $rows = isset($_GET['limit'])?$_GET['limit']:20;
+ $page = isset($_GET['page'])?$_GET['page']:1;
+ $count = app()->db->count('uploads');
+ $pages = ceil($count / $rows)+1;
+ if ($page>$pages-1) { $page = $pages-1; }
+ if ($page<1) { $page = 1; }
+ $offset = ($page -1)*$rows;
$this->tpl->assign('pagen',$page);
- $files = app()->db->read('files',array(),array('upload_date desc'),$limit);
+ $this->tpl->assign('pages',$pages);
+ $this->tpl->assign('limit',$rows);
+ $this->tpl->assign('uploads',$uploads);
+ $files = app()->db->read('uploads',array(),array('upload_date desc'),$offset.','.$rows);
$this->tpl->assign('files',$files);
}
- function filedelete($id) {
- app()->db->delete('files',array('id' => $id));
- app()->db->delete('file_options',array('file_id' => $id));
- unlink(app()->config['DATA_PATH'].'/'.$id);
+ function uploaddelete($id) {
+
+ app()->db->delete('uploads',array('id' => $id));
+ /* delete the files from filesystem */
+ $files = app()->db->read('upload_files',array('upload_id' => $id));
+ foreach ($files as $k => $f) {
+ $file = app()->config['DATA_PATH'].'/files/'.$id.'_'.$k;
+ @unlink($file);
+ }
+ app()->db->delete('upload_files',array('upload_id' => $id));
+ app()->db->delete('upload_options',array('upload_id' => $id));
}
- function filedel() {
- global $_GET;
-
+ function uploaddel() {
if ($_GET['id']!='') {
- $f = app()->db->read('files',array('id'=>$_GET['id']));
+ $f = app()->db->read('uploads',array('id'=>$_GET['id']));
if ($f[0]['id']==$_GET['id']) {
- $this->filedelete($_GET['id']);
+ $this->uploaddelete($_GET['id']);
}
}
$this->nextStep(1);
}
- function filemultidel() {
+
+ function uploadmultidel() {
global $_POST;
foreach ($_POST as $k => $v) {
if (($v == 1) and (strpos($k,'file_'))!==FALSE) {
$fid = substr($k,5,strlen($k)-5);
- $f = app()->db->read('files',array('id'=>$fid));
- if ($f[0]['id']==$fid) {
- app()->db->delete('files',array('id' => $fid));
- app()->db->delete('file_options',array('file_id' => $fid));
- unlink(app()->config['DATA_PATH'].'/'.$fid);
- }
+ $this->uploaddelete($fid);
}
}
$this->nextStep(1);
}
- function filesplugin() {
+ function uploadplugin() {
global $_GET;
if (isset($_GET['plugin'])) {
if (isset(app()->plugins[$_GET['plugin']])) {
@@ -887,8 +891,8 @@
$ban['access']='deny';
app()->db->insert('banned',$ban);
app()->message(tr('IP %1 has been banned!',$ip));
- if (isset($_GET['nextaction']))
- $this->nextStep(1,$_GET['nextaction']);
+ if (isset($_GET['newaction']))
+ $this->nextStep(1,$_GET['newaction']);
} else {
app()->error(tr('IP %1 was already in state: %2!',$ip,$ban['access']));
if (isset($_GET['newaction']))
@@ -1070,24 +1074,25 @@
function logs() {
global $_GET;
- $NUM = 50;
- $page = 1;
- if (isset($_GET['page'])) {
- $page=$_GET['page'];
- }
$filter = array();
if (isset($_GET['level'])) {
if ($_GET['level']!='') {
$filter = array('level' => $_GET['level']);
}
}
- $limit = ($NUM*($page-1)).','.$NUM;
+ $rows = isset($_GET['limit'])?$_GET['limit']:20;
+ $page = isset($_GET['page'])?$_GET['page']:1;
$count = app()->db->count('activitylog',$filter);
- $this->tpl->assign('pages',ceil($count / $NUM)+1);
+ $pages = ceil($count / $rows)+1;
+ if ($page>$pages-1) { $page = $pages-1; }
+ if ($page<1) { $page = 1; }
+ $offset = ($page -1)*$rows;
$this->tpl->assign('pagen',$page);
+ $this->tpl->assign('pages',$pages);
+ $this->tpl->assign('limit',$rows);
$this->tpl->assign('level',$_GET['level']);
- $logs = app()->db->read('activitylog',$filter,array('log_time desc'),$limit);
+ $logs = app()->db->read('activitylog',$filter,array('log_time desc'),$offset.','.$rows);
$this->tpl->assign('logs',$logs);
}
Modified: trunk/lib/modules/default/auth.inc.php
===================================================================
--- trunk/lib/modules/default/auth.inc.php 2010-03-18 18:22:36 UTC (rev 369)
+++ trunk/lib/modules/default/auth.inc.php 2010-03-18 18:24:11 UTC (rev 370)
@@ -39,8 +39,8 @@
if (!app()->user->loggedin()) {
$this->menu['login']=tr('Login');
} else {
- if (app()->auth->features['useradmin']=='yes')
- $this->menu['profile']=tr('Preferences');
+ /*if (app()->auth->features['useradmin']=='yes')
+ $this->mainmenu['profile']=tr('Preferences');*/
$this->menu['logout']=tr('Logout');
}
if (app()->auth->features['useradmin']=='yes')
@@ -89,7 +89,7 @@
global $_POST;
if (app()->auth->features['useradmin']!='yes') {
- app()->log('error','registerForm','','ERROR','Registration not supporte by Auth Module');
+ app()->log('error','registerForm','','ERROR','Registration not supported by Auth Module');
app()->error(tr('Registration is not supported by Auth Module'));
redirect();
}
@@ -170,7 +170,7 @@
$subject = tr('[%1] User registration confirmation e-mail',app()->config['site']['title']);
$this->tpl->assign('reguser',$user);
$this->tpl->assign('reglink',app()->config['WWW_SERVER'].app()->config['WWW_ROOT'].'/?action=register®id='.$user['regid']);
- sendMail(app()->config['site']['email'],'noreply',$user['email'],$subject,'modules/auth/emailconfirm');
+ sendMail(app()->config['site']['email'],$user['email'],$subject,'modules/auth/emailconfirm');
} else {
$user['active'] = 1;
}
Deleted: trunk/lib/modules/default/files.inc.php
===================================================================
--- trunk/lib/modules/default/files.inc.php 2010-03-18 18:22:36 UTC (rev 369)
+++ trunk/lib/modules/default/files.inc.php 2010-03-18 18:24:11 UTC (rev 370)
@@ -1,608 +0,0 @@
-<?php
-
-
-function cgiupload_get_info($fid) {
- return array();
-}
-
-class FilesModule extends OpenUploadModule {
-var $actions = array (
- "u" => array (
- 1 => "uploadForm",
- 2 => "uploadOptions",
- 3 => "uploadConfirm",
- 4 => "uploadFileInfo",
- 99 => "uploadProgress",
- ),
- "d" => array (
- 1 => "downloadForm",
- 2 => "downloadRequest",
- 3 => "downloadConfirm",
- ),
- "g" => array (
- 1 => "serveFile",
- ),
- "r" => array (
- 1 => "removeRequest",
- 2 => "removeConfirm",
- 3 => "removeResult",
- ),
- "l" => array (
- 1 => "fileList",
- 2 => "fileDetail",
- ),
- );
-var $page;
-var $menu;
-
- function FilesModule() {
- if (app()->user->info('login')!='')
- $files = tr("My Files");
- else
- $files = tr("Public Files");
- $this->page = array (
- "u" => array (
- "title" => tr("File upload"),
- ),
- "d" => array (
- "title" => tr("File download"),
- ),
- "r" => array (
- "title" => tr("File Removal"),
- ),
- "l" => array (
- "title" => $files,
- ),
- );
- $this->menu = array (
- "u" => tr("File Upload"),
- "l" => $files,
- //"d" => tr("File Download"),
- //"r" => tr("File Removal"),
- );
- }
-
- function init() {
- /* initialize */
- }
-
- /* real implementation */
-
- function uploadForm() {
- global $_SESSION;
-
- unset($_SESSION['user']['u']);
- $_SESSION['user']['identifier']=randomName(40,40);
- $this->tpl->assign('uploadscript',$_SERVER['PHP_SELF']);
- switch (app()->config['progress']) {
- case 'uploadprogress':
- $this->tpl->assign('identifiername','UPLOAD_IDENTIFIER');
- break;
- case 'apc':
- $this->tpl->assign('identifiername',ini_get('apc.rfc1867_name'));
- break;
- case 'cgi':
- $_SESSION['user']['identifier']=randomName(32,32);
- $this->tpl->assign('uploadscript',app()->config['progress_cgi'].'?upload_id='.session_id());
- /* update information on the file */
-$_CGI['temp_dir'] = '/tmp/';
-$_CGI['upload_id'] = $_SESSION['user']['identifier'];
-$_CGI['upload_dir'] = '/tmp/';
-$_CGI['path_to_link_file'] = '/tmp/'.session_id().'.link';
-$_CGI['embedded_upload_results'] = 0;
-$_CGI['redirect_method'] = 1;
-$_CGI['redirect_url'] = app()->config['WWW_SERVER'].app()->config['WWW_ROOT'].'/';
-$_CGI['cgi_upload_hook'] = 0;
-$_CGI['debug_upload'] = 0;
-$_CGI['delete_link_file'] = 0;
-$_CGI['purge_temp_dirs'] = 1;
-$_CGI['purge_temp_dirs_limit'] = 1;
-$_CGI['max_upload_size'] = $_SESSION['user']['max_upload_size'];
-$c = '';
-foreach ($_CGI as $k => $value) {
- $c .= $k.'<=>'.$value."\n";
-}
- file_put_contents('/tmp/'.session_id().'.link',$c);
- $this->tpl->assign('identifiername','UPLOAD_IDENTIFIER');
- break;
- default:
- $this->tpl->assign('identifiername','UPLOAD_IDENTIFIER');
- break;
- }
- app()->tpl->assign('identifier',$_SESSION['user']['identifier']);
- $result = app()->pluginAction('uploadForm',$finfo);
- }
-
- function uploadProgress() {
- global $_SESSION;
-
- if (isset($_SESSION['user']['identifier'])) {
- ob_clean();
- header("Cache-Control: no-cache, must-revalidate");
- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
- // need this 'cause of IE problems
- header('Content-Type: text/html; Charset=utf-8');
-
- $progress = array('complete' => 0, 'total' => 0, 'percentage' => 0, 'files' => 0);
- switch (app()->config['progress']) {
- case 'uploadprogress':
- $res = uploadprogress_get_info($_SESSION['user']['identifier']);
- if (isset($res['bytes_uploaded'])) {
- $progress['complete'] = $res['bytes_uploaded'];
- if ($res['bytes_total']>0) {
- $progress['total'] = $res['bytes_total'];
- $progress['percentage'] = floor(($res['bytes_uploaded'] / $res['bytes_total'])*100);
- }
- $progress['files'] = $res['files_uploaded'];
- }
- break;
- case 'apc':
- $res = apc_fetch(ini_get('apc.rfc1867_prefix').$_SESSION['user']['identifier']);
- if ($res) {
- $progress['complete'] = $res['current'];
- $progress['total'] = $res['total'];
- if ($res['total']>0)
- $progress['percentage'] = floor(($res['current'] / $res['total'])*100);
- $progress['files'] = 0;
- }
- break;
- case 'cgixyz':
- $res = cgiupload_get_info($_SESSION['user']['identifier']);
- if (isset($res['bytes_uploaded'])) {
- $progress['complete'] = $res['bytes_uploaded'];
- if ($res['bytes_total']>0) {
- $progress['total'] = $res['bytes_total'];
- $progress['percentage'] = floor(($res['bytes_uploaded'] / $res['bytes_total'])*100);
- }
- $progress['files'] = $res['files_uploaded'];
- }
- break;
- }
- app()->tpl->assign('progress',$progress);
- app()->display('modules/files/uploadProgress');
- exit;
- }
- echo 'user not allowed';
- exit;
- }
-
- function uploadOptions() {
- global $_SESSION;
- global $_FILES;
- global $_SERVER;
-
- switch (app()->config['progress']) {
- case 'cgi':
- /* populate the variables so that it will be available to the following code */
-
- break;
- }
- if (isset($_FILES['upload'])) {
- if ($_FILES['upload']['error']>0) {
- switch ($_FILES['upload']['error']) { /* taken from here: http://it.php.net/manual/en/features.file-upload.errors.php */
- case 1: $msg = 'Maximum upload size for site wide configuration reached'; break;
- case 2: $msg = 'Maximum file size exceeded!'; break;
- case 3: $msg = 'Partial file transfer error!'; break;
- case 4: $msg = 'No file was uploaded!'; break;
- case 6: $msg = 'Missing temporary directory'; break;
- case 7: $msg = 'Can\'t write to temporary diretory!'; break;
- case 8: $msg = 'Upload blocked by extension!'; break;
- default:
- $msg = tr('Upload failed for Unknown error code: %1',$_FILES['upload']['error']); break;
- }
- app()->log('warning','uploadOptions','','DENY','Upload error: '.$msg);
- app()->error(tr($msg));
- $this->nextStep(1);
- } else if ($_FILES['upload']['size']>app()->user->info('max_upload_size')) {
- app()->log('warning','uploadOptions','','DENY','Maximum file size exceeded!');
- app()->error(tr('Maximum file size exceeded!'));
- break;
- } else {
- /* prepare the file */
- $tmpname = app()->config['DATA_PATH'].'/tmp/'.randomName();
- for ($i = 0; $i<app()->config['multiupload']; $i++) {
- $u = 'upload';
- $tmpnamex = $tmpname;
- if ($i>0) {
- $u = 'upload_'.$i;
- $tmpnamex = $tmpname.'_'.$i;
- }
- if (isset($_FILES[$u]) and $_FILES[$u]['tmp_name']!='') {
- move_uploaded_file($_FILES[$u]['tmp_name'],$tmpnamex);
- $_SESSION['user']['u'][$i]['tmp']=$tmpnamex;
- $_SESSION['user']['u'][$i]['mime']=$_FILES[$u]['type'];
- $_SESSION['user']['u'][$i]['name']=$_FILES[$u]['name'];
- $_SESSION['user']['u'][$i]['size']=$_FILES[$u]['size'];
- $_SESSION['user']['u'][$i]['ip']=$_SERVER['REMOTE_ADDR'];
- $_SESSION['user']['u'][$i]['user_login']=app()->user->info('login');
- }
- }
- $result = app()->pluginAction('uploadComplete',$_SESSION['user']['u']);
- if (!$result) { /* some plugin blocked the upload */
- /* remove the file */
- foreach ($_SESSION['user']['u'] as $f) {
- @unlink($f['tmp']);
- }
- unset($_SESSION['user']['u']);
- redirect();
- }
- $this->nextStep(app()->step);
- }
- } else if (!isset($_SESSION['user']['u'][0])) {
- redirect();
- }
- if (!$result) { /* some plugin blocked the upload */
- /* remove the files */
- unset($_SESSION['user']['u']);
- redirect();
- }
- $this->tpl->assign('finfo',$_SESSION['user']['u'][0]);
- $this->tpl->assign('files',$_SESSION['user']['u']);
- /* ask for information on the file */
- }
-
- function uploadConfirm() {
- global $_POST;
- global $_SESSION;
-
- /* save the file */
- /* send an e-mail if requested */
- /* display the information on the upload */
- if (isset($_POST['description'])) {
- /* now check plugins and if ok add file otherwise redirect */
- $result = app()->pluginAction('uploadConfirm',$_SESSION['user']['u']);
- if (!$result)
- $this->prevStep();
- for ($i = 0; $i<count($_SESSION['user']['u']); $i++) {
- $finfo = $_SESSION['user']['u'][$i];
- $finfo['description'] = $_POST['description'];
- if ($i==0) {
- $s = isset(app()->config['id_max_length'])?app()->config['id_max_length']:30;
- $a = isset(app()->config['id_use_alpha'])?app()->config['id_use_alpha']=='yes':false;
- $finfo['id']= app()->db->newRandomId('files','id',$s,$a);
- $mainid = $finfo['id'];
- $remove = app()->db->newRandomId('files','remove',$s,$a);
- $date = date('Y-m-d H:i:s');
- } else {
- $finfo['id']=$mainid.'_'.$i;
- }
- /* everything ok then add the file */
- $finfo['remove']= $remove;
- $finfo['upload_date'] = $date;
- app()->db->insert('files',$finfo,array('id','name','mime','description','size','remove','user_login','ip','upload_date'));
- if ($i==0) {
- foreach (app()->plugins as $plugin) {
- if (count($plugin->fields)>0) {
- foreach ($plugin->fields as $f) {
- if (isset($finfo[$f])) {
- $pinfo['file_id'] = $finfo['id'];
- $pinfo['module'] = $plugin->name;
- $pinfo['name']=$f;
- $pinfo['value']=$finfo[$f];
- app()->db->insert('file_options',$pinfo,array('file_id','module','name','value'));
- }
- }
- }
- }
- } else {
- $pinfo['file_id'] = $finfo['id'];
- $pinfo['module'] = 'files';
- $pinfo['name']='group';
- $pinfo['value']=$mainid;
- app()->db->insert('file_options',$pinfo,array('file_id','module','name','value'));
- }
- /* move the file to the actual location */
- rename($_SESSION['user']['u'][$i]['tmp'],app()->config['DATA_PATH'].'/'.$finfo['id']);
- $_SESSION['user']['u'][$i]=$finfo;
- }
- app()->log('notice','uploadConfirm','','ALLOW',$mainid);
- $this->nextStep();
- }
- }
-
- function setupLinks(&$finfo) {
- /* get the file info */
- $a = 'action'; $i = 'id'; $r = 'removeid';
- if (app()->config['use_short_links']=='yes') {
- $a = 'a'; $i = 'i'; $r = 'r';
- }
- $finfo[0]['downloadlink']= app()->config['WWW_SERVER'].app()->config['WWW_ROOT'].'/?'.$a.'=d&'.$i.'='.$finfo[0]['id'];
- $finfo[0]['removelink']=app()->config['WWW_SERVER'].app()->config['WWW_ROOT'].
- '/?'.$a.'=r&'.$i.'='.$finfo[0]['id'].'&'.$r.'='.$finfo[0]['remove'];
- }
-
- function uploadFileInfo() {
- if (isset($_SESSION['user']['u'][0]['id'])) {
- $finfo = $_SESSION['user']['u'];
- $this->setupLinks($finfo);
- $result = app()->pluginAction('uploadFileInfo',$finfo,false);
- $this->tpl->assign('finfo',$finfo[0]);
- $this->tpl->assign('files',$finfo);
- $this->tpl->assign('webbase',app()->config['WWW_SERVER'].app()->config['WWW_ROOT']);
- } else {
- redirect();
- }
- }
-/**/
- function loadFile($id) {
- $finfo = app()->db->read('files',array('id'=>$id));
- $pinfo = app()->db->read('file_options',array('file_id' => $id));
- foreach ($pinfo as $v) {
- $finfo[0][$v['name']]=$v['value'];
- }
- $afiles = app()->db->read('file_options',array('module' => 'files', 'name' => 'group', 'value' => $id));
- if (count($afiles)>0) {
- foreach ($afiles as $k => $a) {
- $afile = app()->db->read('files',array('id'=>$a['file_id']));
- $finfo[$k+1]=$afile[0];
- }
- }
-//print_r($finfo); exit();
- return $finfo;
- }
-
- function downloadForm() {
- global $_SESSION;
- global $_GET;
-
- unset($_SESSION['user']['d']);
- if (isset($_GET['id']) or isset($_GET['i'])) {
- $_SESSION['user']['d'][0]['id'] = isset($_GET['id'])?$_GET['id']:$_GET['i'];
- $this->nextStep();
- }
- $finfo = array();
- app()->pluginAction('downloadForm',$finfo,false);
- }
-
- function downloadRequest() {
- global $_GET;
- global $_POST;
- global $_SESSION;
-
- $id = '';
- if (isset($_POST['id'])) {
- $id = $_POST['id'];
- } else if (isset($_SESSION['user']['d'][0]['id'])) {
- $id = $_SESSION['user']['d'][0]['id'];
- }
- /* check if download exists, and what are the properties */
- if ($id != '') {
- $finfo = $this->loadFile($id);
- if ($finfo[0]['id']!=$id or isset($finfo[0]['group'])) {
- app()->log('warning','downloadRequest','','DENY','File does not exist: ID:'.$id);
- app()->error(tr('Requested file does not exist!'));
- $this->prevStep();
- } else {
- $_SESSION['user']['d']=$finfo;
- $_SESSION['user']['d'][0]['protected'] = true;
- $this->tpl->assign('finfo',$finfo[0]);
- $this->tpl->assign('files',$finfo);
- $result = app()->pluginAction('downloadRequest',$finfo,false);
- if ($result) {
- app()->log('info','downloadRequest','','ALLOW',$id);
- $_SESSION['user']['d'][0]['protected']=false;
- $this->nextStep();
- }
- }
- }
- }
-
- function downloadConfirm() {
-
- /* here we do the actual download of the file */
- if (!isset($_SESSION['user']['d'])) {
- redirect();
- } else if ($_SESSION['user']['d'][0]['candownload']=='ok') {
- $finfo = $_SESSION['user']['d'];
- $this->tpl->assign('finfo',$finfo[0]);
- $this->tpl->assign('files',$finfo);
- /* download is allowed */
- } else {
- $finfo = $_SESSION['user']['d'];
- /* check wether the plugins are ok */
- $result = app()->pluginAction('downloadConfirm',$finfo);
- if (!$result)
- $this->prevStep();
- for ($i = 0; $i<count($finfo); $i++)
- $finfo[$i]['candownload']='ok';
- $_SESSION['user']['d']=$finfo;
- /* now the user can download it */
- $this->nextStep(app()->step);
- }
- }
-
- function serveFile() {
- global $_SESSION;
- global $_POST;
- global $_GET;
-
- $num = 0;
- if (isset($_GET['fid'])) {
- $num = $_GET['fid'];
- }
- /* here we do the actual download of the file */
- if (!isset($_SESSION['user']['d'])) {
- redirect();
- } else if ($_SESSION['user']['d'][$num]['candownload']!='ok') {
- $this->nextStep(2,'d');
- } else {
- $finfo = $_SESSION['user']['d'];
- /* check wether the plugins are ok */
- $result = app()->pluginAction('serveFile',$finfo);
- if (!$result)
- $this->nextStep(3,'d');
- //$_SESSION['user']['d'][$num]['candownload']='ok';
- /* if we got this far the download should begin serving */
- $file = app()->config['DATA_PATH'].'/'.$finfo[$num]['id'];
- $filesize = filesize($file);
- /* set to not timeout within default setting */
- if (isset(app()->config['max_download_time'])) {
- set_time_limit(app()->config['max_download_time']*60);
- } else {
- set_time_limit(7200); /* 2 hours should be enough */
- }
- app()->log('notice','serveFile','','ALLOW',$finfo[$num]['id']);
- /* disable and clean output buffer so it won't reach memory limit */
- ob_end_clean();
- header('Content-Description: File Transfer');
- header('Content-Type: '.$finfo[$num]['mime']);
- header('Content-Length: '.$filesize);
- header('Content-Disposition: attachment; filename="'.$finfo[$num]['name'].'"');
- header('Content-Transfer-Encoding: binary');
- header('Expires: 0');
- header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
- header('Pragma: public');
-
- readfile($file);
- /* file should have been sent now let's reset the download info */
- if (!$_SESSION['user']['d'][0]['protected'])
- $_SESSION['user']['d'][$num]['candownload']='ok';
- else
- $_SESSION['user']['d'][$num]['candownload']='ko';
- exit(0);
- }
- }
-
- function removeRequest() {
- global $_GET;
- global $_SESSION;
-
- $id = '';
- if (isset($_GET['id']) or isset($_GET['i'])) {
- $id = isset($_GET['id'])?$_GET['id']:$_GET['i'];
- $r = isset($_GET['removeid'])?$_GET['removeid']:$_GET['r'];
- } else if (isset($_SESSION['user']['r'][0]['id'])) {
- $id = $_SESSION['user']['r'][0]['id'];
- $r = $_SESSION['user']['r'][0]['remove'];
- }
- /* check if file exists, and what are the properties */
- if ($id != '') {
- $finfo = $this->loadFile($id);
- if ($finfo[0]['id']!=$id or isset($finfo[0]['group'])) {
- app()->error(tr('Wrong file id!'));
- redirect();
- } else if ($r!=$finfo[0]['remove']) {
- app()->error(tr('Wrong file id!')); /* don't give the user much info on this */
- redirect();
- } else {
- $_SESSION['user']['r']=$finfo;
- $this->tpl->assign('files',$finfo);
- $this->tpl->assign('finfo',$finfo[0]);
- if (app()->config['allow_unprotected_removal']=='yes')
- $result = true;
- else
- $result = app()->pluginAction('removeRequest',$finfo,false);
- if ($result) {
- app()->log('info','removeRequest','','ALLOW',$id);
- $_SESSION['user']['r'][0]['canremove']='ok'; /* file has no protection */
- $this->nextStep();
- }
- }
- } else {
- app()->error(tr('Wrong file id!'));
- redirect();
- }
- }
-
- function removeConfirm() {
- $finfo = $_SESSION['user']['r'];
-
- /* here we do the actual remove of the file */
- if (!isset($_SESSION['user']['r'])) {
- redirect();
- } else if ($_SESSION['user']['r'][0]['canremove']=='ok') {
- $finfo = $_SESSION['user']['r'];
- $this->tpl->assign('finfo',$finfo[0]);
- $this->tpl->assign('files',$finfo);
- /* removal is allowed */
- } else {
- $finfo = $_SESSION['user']['r'];
- /* check wether the plugins are ok */
- if (app()->config['allow_unprotected_removal']=='yes')
- $result = true;
- else
- $result = app()->pluginAction('removeConfirm',$finfo);
- if (!$result)
- $this->prevStep();
- /* now we can remove the file */
- $_SESSION['user']['r'][0]['canremove']='ok';
- $this->tpl->assign('finfo',$finfo[0]);
- $this->tpl->assign('files',$finfo);
- }
- }
-
- function removeResult() {
- global $_POST;
-
- if (!isset($_SESSION['user']['r'])) {
- redirect();
- } else if (isset($_POST['confirmremove']) and ($_SESSION['user']['r'][0]['canremove']=='ok')) {
- $finfo = $_SESSION['user']['r'];
- $result = app()->pluginAction('removeResult',$finfo,false);
- if (!$result)
- $this->prevStep();
- foreach ($finfo as $f) {
- app()->db->delete('files',array('id' => $f['id']));
- app()->db->delete('file_options',array('file_id' => $f['id']));
- $file = app()->config['DATA_PATH'].'/'.$f['id'];
- @unlink($file);
- }
- app()->log('notice','removeResult','','ALLOW',$finfo[0]['id']);
- unset($_SESSION['user']['r']); /* remove any file reference */
- $this->tpl->assign('files',$finfo);
- $this->tpl->assign('finfo',$finfo[0]);
- } else {
- $this->prevStep();
- }
- }
-
- function fileList() {
- global $_GET;
- /* TODO: need paging ... */
- $rows = 20;
- $page = isset($_GET['page'])?$_GET['page']:1;
- $offset = ($page -1)*$rows;
- $count = app()->db->count('files',array('user_login'=>app()->user->info('login')));
- $pages = ceil($count / $rows)+1;
- $files = app()->db->read('files',array('user_login'=>app()->user->info('login')),array('upload_date desc'),$offset.','.$rows);
- $result = app()->pluginAction('fileList',$files,false);
- if (!$result)
- redirect();
- $this->tpl->assign('pagen',$page);
- $this->tpl->assign('pages',$pages);
- $this->tpl->assign('files',$files);
- }
-
- function fileDetail() {
- global $_GET;
-
- if (!isset($_GET['id'])) {
- $this->nextStep(1);
- }
- $finfo = $this->loadFile($_GET['id']);
- if (count($finfo)==0) {
- app()->error(tr('Wrong file id!'));
- $this->nextStep(1);
- } else if ($finfo[0]['user_login']!=app()->user->info('login')) {
- /* the user has no right to access this file !!! */
- app()->error(tr('Wrong file id!'));
- $this->nextStep(1);
- } else if (isset($finfo[0]['group'])) {
- /* it's a group file */
- app()->error(tr('Wrong file id!'));
- $this->nextStep(1);
- }
- $this->setupLinks($finfo);
- if (app()->user->info('login')=='') {
- unset($finfo[0]['removelink']);
- }
- $result = app()->pluginAction('fileDetail',$finfo,false);
- if (!$result) {
- $this->nextStep(1);
- }
- $this->tpl->assign('finfo',$finfo[0]);
- $this->tpl->assign('files',$finfo);
- }
-}
-
-?>
\ No newline at end of file
Added: trunk/lib/modules/default/invitation.inc.php
===================================================================
--- trunk/lib/modules/default/invitation.inc.php (rev 0)
+++ trunk/lib/modules/default/invitation.inc.php 2010-03-18 18:24:11 UTC (rev 370)
@@ -0,0 +1,488 @@
+
+<?php
+
+class InvitationModule extends BaseUploadModule {
+var $actions = array (
+ "i" => array ( /* handle invitation creation */
+ 1 => "createForm",
+ 2 => "createOptions",
+ 3 => "createInfo",
+ ),
+ "s" => array ( /* handle invitation uploads */
+ 1 => "uploadRequest",
+ 2 => "uploadForm",
+ 3 => "uploadFiles",
+ 4 => "uploadResult",
+ 99 => "uploadProgress",
+ ),
+ "x" => array ( /* handle invitation removal */
+ 1 => "removeRequest",
+ 2 => "removeConfirm",
+ 3 => "removeResult",
+ ),
+ "n" => array ( /* list invitations */
+ 1 => "elementList",
+ 2 => "elementDetail",
+ ),
+ );
+var $page;
+var $menu;
+
+ function InvitationModule() {
+ if (app()->user->info('login')!='')
+ $inv = tr("My Invitations");
+ else
+ $inv = tr("Public Invitations");
+ $this->page = array (
+ "i" => array (
+ "title" => tr("Invitation Creation"),
+ ),
+ "s" => array (
+ "title" => tr("Invitation Upload"),
+ ),
+ "x" => array (
+ "title" => tr("Invitation Removal"),
+ ),
+ "n" => array (
+ "title" => tr("Invitation List"),
+ ),
+ );
+ $this->menu = array (
+ "i" => tr('Create Invitation'),
+ "n" => $inv,
+ );
+ }
+
+ function _loadInvitation($id) {
+ $invitation = app()->db->read('invitations',array('id'=>$id));
+ $invitation = $invitation[0];
+ $info = app()->db->read('invitation_options',array('invitation_id' => $id));
+ foreach ($info as $v) {
+ $invitation[$v['name']]=$v['value'];
+ }
+ $pinfo = app()->db->read('invitation_upload_options',array('invitation_id' => $id));
+ foreach ($pinfo as $v) {
+ $invitation['u'][$v['name']]=$v['value'];
+ }
+ return $invitation;
+ }
+
+
+ // display the invitation options
+ function createForm() {
+ global $_SESSION;
+ global $_POST;
+
+ $invitation = array();
+
+ if (isset($_POST['description'])) { /* post the values */
+ $invitation = $_SESSION['i'];
+ $invitation['description']=$_POST['description'];
+ $result = app()->pluginAction('invitationValidateCreateForm',$invitation);
+ if ($result) {
+ $_SESSION['i']=$invitation;
+ $this->nextStep(2);
+ }
+ }
+ unset($_SESSION['i']);
+ $result = app()->pluginAction('invitationDisplayCreateForm', $invitation, false);
+ $_SESSION['i']=$invitation;
+ $this->tpl->assign('invitation',$invitation);
+ }
+
+ // display the uploaded files options to assign
+ function createOptions() {
+ global $_SESSION;
+ global $_POST;
+
+ if (isset($_SESSION['i'])) {
+ $invitation = $_SESSION['i'];
+ if (isset($_POST['step']) and ($_POST['step']==2)) {
+ /* create the invitation */
+ $result = app()->pluginAction('invitationValidateCreateOptions',$invitation);
+ if ($result) {
+ $s = isset(app()->config['id_max_length'])?app()->config['id_max_length']:30;
+ $a = isset(app()->config['id_use_alpha'])?app()->config['id_use_alpha']=='yes':false;
+ $invitation['id']= app()->db->newRandomId('invitations','id',$s,$a);
+ $remove = app()->db->newRandomId('invitations','remove',$s,$a);
+ $date = date('Y-m-d H:i:s');
+ $invitation['remove']= $remove;
+ $invitation['create_date'] = $date;
+ $invitation['expire_date'] = $date;
+ $invitation['ip']=$_SERVER['REMOTE_ADDR'];
+ $invitation['user']=app()->user->info('login');
+ $invitation['group']=app()->user->group();
+ app()->db->insert('invitations',$invitation,array('id','remove','create_date','expire_date','description','user','group','ip'));
+ /* save plugin values */
+ foreach (app()->plugins as $plugin) {
+ if (count($plugin->fields)>0) {
+ foreach ($plugin->fields as $f) {
+ if (isset($invitation[$f])) {
+ $pinfo['invitation_id'] = $invitation['id'];
+ $pinfo['module'] = $plugin->name;
+ $pinfo['name']=$f;
+ $pinfo['value']=$invitation[$f];
+ app()->db->insert('invitation_options',$pinfo,array('invitation_id','module','name','value'));
+ }
+ if (isset($invitation['u'][$f])) {
+ $pinfo['invitation_id'] = $invitation['id'];
+ $pinfo['module'] = $plugin->name;
+ $pinfo['name']=$f;
+ $pinfo['value']=$invitation['u'][$f];
+ app()->db->insert('invitation_upload_options',$pinfo,array('invitation_id','module','name','value'));
+ }
+ }
+ }
+ }
+ /* invitation has been created */
+ $this->setupLinks($invitation,'s','x');
+ $result = app()->pluginAction('invitationExecuteCreateActions',$invitation,false);
+
+ $_SESSION['i']=$invitation;
+ $this->nextStep(3);
+ } else {
+ $this->nextStep(2);
+ }
+ }
+ } else {
+ $this->prevStep();
+ }
+ $result = app()->pluginAction('invitationDisplayCreateOptions', $invitation, false);
+ $_SESSION['i']=$invitation;
+ $this->tpl->assign('invitation',$invitation);
+ }
+
+ // display invitation links and options
+ function createInfo() {
+ global $_SESSION;
+
+ if (isset($_SESSION['i']['id'])) {
+ if (app()->checkACL(app()->user->group(),$this->name,'n') == 'allow') { /* redirect to the invitation detail page */
+ //app()->display('upload/uploadResult');
+ redirect('?a=n&s=2&id='.$_SESSION['i']['id']);
+ } else {
+ $invitation = $_SESSION['i'];
+ $this->setupLinks($invitation,'s','x');
+ $result = app()->pluginAction('invitationDisplayCreateInfo', $invitation, false);
+ $this->tpl->assign('invitation',$invitation);
+ }
+ } else {
+ redirect();
+ }
+ }
+
+ // handle to see if the invitation request is valid
+ function uploadRequest() {
+ global $_SESSION;
+ global $_POST;
+ global $_GET;
+
+ /* reset the upload */
+ unset($_SESSION['s']);
+ $invitation = array();
+
+ $id = '';
+ if (isset($_POST['id'])) {
+ $id = $_POST['id'];
+ } else if (isset($_GET['id']) or isset($_GET['i'])) {
+ $id = isset($_GET['id'])?$_GET['id']:$_GET['i'];
+ } else if (isset($_SESSION['s']['id'])) {
+ $id = $_SESSION['s']['id'];
+ }
+ /* check if invitation exists, and what are the properties */
+ if ($id != '') {
+ $_SESSION['s']['id'] = $id;
+ $invitation = $this->_loadInvitation($id);
+ if ($invitation['id']!=$id) {
+ app()->log('warning','sendForm','','DENY','Invitation does not exist: ID:'.$id);
+ app()->error(tr('Requested invitation does not exist!'));
+ } else {
+ /* load information based on the user which created the invitation */
+ $_SESSION['s']=$invitation;
+ $this->nextStep();
+ }
+ }
+ app()->pluginAction('invitationDisplayUploadRequest',$invitation,false);
+ }
+
+ function uploadForm() {
+ global $_GET;
+ global $_POST;
+ global $_SESSION;
+
+
+ if (isset($_SESSION['s']['id'])) {
+ $invitation = $_SESSION['s'];
+ if (isset($_POST['confirm']) and ($_POST['confirm']=='yes')) {
+ $invitation['protected'] = true;
+ $this->tpl->assign('invitation',$invitation);
+ /* check if plugins need to protect the download */
+ $result = app()->pluginAction('invitationValidateUploadForm',$invitation,false);
+ if ($result) {
+ app()->log('info','sendRequest','','ALLOW',$id);
+ $invitation['canupload']='ok';
+ $_SESSION['s']=$invitation;
+ $this->nextStep();
+ }
+ }
+ $invitation['protected'] = true;
+ $this->tpl->assign('invitation',$invitation);
+ /* check if plugins need to protect the download */
+ $result = app()->pluginAction('invitationDisplayUploadForm',$invitation,false);
+ if ($result) {
+ app()->log('info','sendRequest','','ALLOW',$id);
+ $invitation['protected']=false;
+ $invitation['canupload']='ok';
+ $_SESSION['s']=$invitation;
+ $this->nextStep();
+ }
+ $_SESSION['s']=$invitation;
+ } else {
+ app()->error(tr('Invitation ID missing!'));
+ $this->nextStep(1);
+ }
+ }
+
+ // check for protection
+ function uploadFiles() {
+ global $_FILES;
+ global $_SERVER;
+ global $_SESSION;
+
+ if (!isset($_SESSION['s'])) {
+ redirect();
+ } else if ($_SESSION['s']['canupload']=='ok') {
+ $invitation = $_SESSION['s'];
+
+ app()->pluginSetGroup($invitation['group']);
+
+ $this->setupCGIFiles();
+
+ if (count($_FILES)>0) {
+ if ($this->validateUploadedFiles($invitation['u'])) {
+ $invitation['u']['ip']=$_SERVER['REMOTE_ADDR'];
+ $invitation['u']['user']=$invitation['user'];
+ $invitation['u']['group']=$invitation['group'];
+ $description = (isset($_POST['description']) and trim($_POST['description']!=''))?$_POST['description'].' | ':'';
+ $description .= tr('Uploaded via Invitation: %1',$invitation['description']!=''?$invitation['description']:$invitation['id']);
+ $invitation['u']['description']=$description;
+ $result = app()->pluginAction('invitationValidateUploadFiles',$invitation);
+ if (!$result) { /* some plugin blocked the upload */
+ /* remove the file */
+ foreach ($invitation['u']['files'] as $f) {
+ @unlink($f['tmp']);
+ }
+ unset($invitation['u']);
+ $_SESSION['s']=$invitation;
+ $this->prevStep(3);
+ }
+ /* execute the actions for the upload */
+ $s = isset(app()->config['id_max_length'])?app()->config['id_max_length']:30;
+ $a = isset(app()->config['id_use_alpha'])?app()->config['id_use_alpha']=='yes':false;
+ $upload = $invitation['u'];
+ $upload['id']= app()->db->newRandomId('uploads','id',$s,$a);
+ $remove = app()->db->newRandomId('uploads','remove',$s,$a);
+ $date = date('Y-m-d H:i:s');
+ $upload['remove']= $remove;
+ $upload['upload_date'] = $date;
+ app()->db->insert('uploads',$upload,array('id','remove','upload_date','expire_date','description','user','group','ip','size'));
+ foreach ($upload['files'] as $k => $f) {
+ $f['upload_id']=$upload['id'];
+ /* everything ok then add the file */
+ app()->db->insert('upload_files',$f,array('upload_id','name','mime','size'));
+ /* move the file to the actual location */
+ rename($f['tmp'],app()->config['DATA_PATH'].'/files/'.$upload['id'].'_'.$k);
+ }
+ /* save plugin values */
+ foreach (app()->plugins as $plugin) {
+ if (count($plugin->fields)>0) {
+ foreach ($plugin->fields as $f) {
+ if (isset($invitation['u'][$f])) {
+ $pinfo['upload_id'] = $upload['id'];
+ $pinfo['module'] = $plugin->name;
+ $pinfo['name']=$f;
+ $pinfo['value']=$invitation['u'][$f];
+ app()->db->insert('upload_options',$pinfo,array('upload_id','module','name','value'));
+ }
+ }
+ }
+ }
+ /* everthing went fine create the upload and display next screen */
+ $this->setupLinks($upload);
+ $invitation['u']=$upload;
+ $result = app()->pluginAction('invitationExecuteUploadActions',$invitation,false);
+ unset($_SESSION['i']);
+ $_SESSION['ix']=true;
+ $this->nextStep();
+ }
+ } else {
+ /* this is dumb but it's how php works */
+ if (($_SERVER['REQUEST_METHOD']=='POST') and (ini_get('post_max_size')<$_SERVER['CONTENT_LENGTH'])) {
+ app()->log('warning','uploadFiles','','DENY','Maximum file size exceeded!');
+ app()->error(tr('Maximum file size exceeded!'));
+ $this->prevStep(3);
+ }
+ $this->tpl->assign('invitation',$invitation);
+ $upload = $this->setupUpload();
+ if (is_array($invitation['u']))
+ $upload = $invitation['u'] + $upload;
+ $invitation['u'] = $upload;
+ $this->tpl->assign('upload',$upload);
+ $_SESSION['s']=$invitation;
+ $result = app()->pluginAction('invitationDisplayUploadFiles',$invitation);
+ }
+ } else {
+ /* somebody got here not passing from the upload form (?)*/
+ $this->prevStep(2);
+ }
+ }
+
+ // display the ok
+ function uploadResult() {
+ if (!isset($_SESSION['ix'])) {
+ redirect();
+ }
+ $result = app()->pluginAction('displayInvitationUploadResult',$invitation);
+ }
+
+
+ function removeRequest() {
+ global $_GET;
+ global $_SESSION;
+
+ $id = '';
+ if (isset($_GET['id']) or isset($_GET['i'])) {
+ $id = isset($_GET['id'])?$_GET['id']:$_GET['i'];
+ $r = isset($_GET['removeid'])?$_GET['removeid']:$_GET['r'];
+ } else if (isset($_SESSION['x']['id'])) {
+ $id = $_SESSION['x']['id'];
+ $r = $_SESSION['x']['remove'];
+ }
+ /* check if invitation exists, and what are the properties */
+ if ($id != '') {
+ $invitation = $this->_loadInvitation($id);
+ if ($invitation['id']!=$id) {
+ app()->error(tr('Wrong invitation id!'));
+ redirect();
+ } else if ($r!=$invitation['remove']) {
+ app()->error(tr('Wrong invitation id!')); /* don't give the user much info on this */
+ redirect();
+ } else {
+ $_SESSION['x']=$invitation;
+ $this->tpl->assign('invitation',$invitation);
+ if (app()->config['allow_unprotected_removal']=='yes')
+ $result = true;
+ else
+ $result = app()->pluginAction('InvitationDisplayRemoveRequest',$invitation,false);
+ if ($result) {
+ app()->log('info','removeRequest','','ALLOW',$id);
+ $_SESSION['x']['canremove']='ok'; /* filne has no protection */
+ $this->nextStep();
+ }
+ return $result;
+ }
+ } else {
+ app()->error(tr('Wrong invitation id!'));
+ redirect();
+ }
+ }
+
+ function removeConfirm() {
+ $upload = $_SESSION['r'];
+
+ /* here we do the actual remove of the invitation */
+ if (!isset($_SESSION['x'])) {
+ redirect();
+ } else if ($_SESSION['x']['canremove']=='ok') {
+ $invitation = $_SESSION['x'];
+ $this->tpl->assign('invitation',$invitation);
+ /* removal is allowed */
+ } else {
+ $invitation = $_SESSION['x'];
+ /* check wether the plugins are ok */
+ if (app()->config['allow_unprotected_removal']=='yes')
+ $result = true;
+ else
+ $result = app()->pluginAction('invitationValidateRemoveConfirm',$invitation);
+ if (!$result)
+ $this->prevStep();
+ /* now we can remove the invitation */
+ $_SESSION['x']['canremove']='ok';
+ $this->tpl->assign('invitation',$invitation);
+ redirect();
+ }
+ }
+
+ function removeResult() {
+ global $_POST;
+ if (!isset($_SESSION['x'])) {
+ redirect();
+ } else if (isset($_POST['confirmremove']) and ($_SESSION['x']['canremove']=='ok')) {
+ $invitation = $_SESSION['x'];
+ $result = app()->pluginAction('invitationDisplayRemoveResult',$invitation,false);
+ if (!$result)
+ $this->prevStep();
+
+ app()->db->delete('invitations',array('id' => $invitation['id']));
+ app()->db->delete('inviation_options',array('invitation_id' => $invitation['id']));
+ app()->db->delete('invitation_upload_options',array('invitation_id' => $invitation['id']));
+ app()->log('notice','removeResult','','ALLOW',$upload['id']);
+ unset($_SESSION['x']); /* remove any file reference */
+ $this->tpl->assign('invitation',$invitation);
+ } else {
+ $this->prevStep();
+ }
+ }
+
+ function elementList() {
+ global $_GET;
+ /* TODO: need paging ... */
+ $rows = isset($_GET['limit'])?$_GET['limit']:20;
+ $page = isset($_GET['page'])?$_GET['page']:1;
+ $count = app()->db->count('invitations',array('user'=>app()->user->info('login')));
+ $pages = ceil($count / $rows)+1;
+ if ($page>$pages-1) { $page = $pages-1; }
+ if ($page<1) { $page = 1; }
+ $offset = ($page -1)*$rows;
+ $invitations = app()->db->read('invitations',array('user'=>app()->user->info('login')),array('create_date desc'),$offset.','.$rows);
+ $result = app()->pluginAction('invitationDisplayElementList',$invitations,false);
+ if (!$result)
+ redirect();
+ $this->tpl->assign('pagen',$page);
+ $this->tpl->assign('pages',$pages);
+ $this->tpl->assign('limit',$rows);
+ $this->tpl->assign('invitations',$invitations);
+ }
+
+ function elementDetail() {
+ global $_GET;
+
+ if (!isset($_GET['id'])) {
+ $this->nextStep(1);
+ }
+ $invitation = $this->_loadInvitation($_GET['id']);
+ if ($invitation['id']!=$_GET['id']) {
+ app()->error(tr('Wrong invitation id!'));
+ $this->nextStep(1);
+ } else if ($invitation['user']!=app()->user->info('login')) {
+ /* the user has no right to access this file !!! */
+ app()->error(tr('Wrong invitation id!'));
+ $this->nextStep(1);
+ } else if ($invitation['group']!=app()->user->group()) {
+ /* it's a group file */
+ app()->error(tr('Wrong invitation id!'));
+ $this->nextStep(1);
+ }
+ $this->setupLinks($invitation,'s','x');
+ if (app()->user->info('login')=='') { /* do not allow unregistere users to see remove linke */
+ unset($invitation['removelink']);
+ }
+ $this->tpl->assign('invitation',$invitation);
+ $result = app()->pluginAction('invitationDisplayElementDetail',$invitation,false);
+ if (!$result) {
+ $this->nextStep(1);
+ }
+ }
+
+}
+?>
\ No newline at end of file
Added: trunk/lib/modules/default/upload.inc.php
===================================================================
--- trunk/lib/modules/default/upload.inc.php (rev 0)
+++ trunk/lib/modules/default/upload.inc.php 2010-03-18 18:24:11 UTC (rev 370)
@@ -0,0 +1,550 @@
+<?php
+
+class UploadModule extends BaseUploadModule {
+var $actions = array (
+ "u" => array ( /* handle uploads */
+ 1 => "uploadForm",
+ 2 => "uploadOptions",
+ 3 => "uploadResult",
+ 99 => "uploadProgress",
+ ),
+ "d" => array ( /* handle file downloads */
+ 1 => "downloadForm",
+ 2 => "downloadOptions",
+ 3 => "downloadResult",
+ 99 => "downloadFile",
+ ),
+ "r" => array ( /* handle upload removal */
+ 1 => "removeForm",
+ 1 => "removeRequest",
+ 2 => "removeConfirm",
+ 3 => "removeResult",
+ ),
+ "l" => array ( /* handle uploads listing */
+ 1 => "elementList",
+ 2 => "elementDetail",
+ ),
+ );
+var $page;
+var $menu;
+
+ function UploadModule() {
+ if (app()->user->info('login')!='')
+ $files = tr("My Uploads");
+ else
+ $files = tr("Public Uploads");
+ $this->page = array (
+ "u" => array (
+ "title" => tr("File upload"),
+ ),
+ "d" => array (
+ "title" => tr("File download"),
+ ),
+ "r" => array (
+ "title" => tr("File Removal"),
+ ),
+ "l" => array (
+ "title" => $files,
+ ),
+ );
+ $this->menu = array (
+ "u" => tr("File Upload"),
+ "i" => tr('Upload Request'),
+ "l" => $files,
+ );
+ }
+
+ function init() {
+ /* initialize */
+ }
+
+
+ function _displayUploadForm() {
+ global $_SESSION;
+
+ /* setup the upload */
+ $upload = $this->setupUpload();
+ app()->tpl->assign('upload',$upload);
+ $result = app()->pluginAction('uploadDisplayUploadForm',$upload,false);
+ $_SESSION['u']=$upload;
+ }
+
+ function _validateUploadForm() {
+ global $_SESSION;
+ global $_SERVER;
+ global $_FILES;
+
+ if (count($_FILES)>0) {
+ if ($this->validateUploadedFiles($_SESSION['u'])) {
+ $_SESSION['u']['ip']=$_SERVER['REMOTE_ADDR'];
+ $_SESSION['u']['user']=app()->user->info('login');
+ $_SESSION['u']['group']=app()->user->group();
+ $result = app()->pluginAction('uploadValidateUploadForm',$_SESSION['u']);
+ if (!$result) { /* some plugin blocked the upload */
+ /* remove the file */
+ foreach ($_SESSION['u']['files'] as $f) {
+ @unlink($f['tmp']);
+ }
+ unset($_SESSION['u']);
+ return false;
+ }
+ return true;
+ } else {
+ return false;
+ }
+ } else if (!isset($_SESSION['u']['files'][0])) {
+ /* somebody got here not passing from the upload form (?)*/
+ return false;
+ }
+ return true;
+ }
+
+ function uploadForm() {
+ global $_POST;
+ global $_FILES;
+ global $_SERVER;
+
+ $this->setupCGIFiles();
+
+ if (count($_FILES)>0) {
+ $result = $this->_validateUploadForm();
+ if ($result) {
+ if (app()->config['twoclickupload'] != 'yes') {
+ $this->uploadOptions();
+ } else {
+ /* let's go with next step and ask information */
+ $this->nextStep();
+ }
+ } else {
+ /* something went wrong */
+ $this->nextStep(1);
+ }
+ } else {
+ /* this is dumb but it's how php works */
+ if (ini_get('post_max_size')<$_SERVER['CONTENT_LENGTH']) {
+ app()->log('warning','uploadFiles','','DENY','Maximum file size exceeded!');
+ app()->error(tr('Maximum file size exceeded!'));
+ redirect();
+ }
+ $result = $this->_displayUploadForm();
+ if (app()->config['twoclickupload'] != 'yes') {
+ $this->uploadOptions();
+ }
+ }
+ return $result;
+ }
+
+
+ function _displayUploadOptions() {
+ /* ask for information on the file */
+ $this->tpl->assign('upload',$_SESSION['u']);
+ $result = app()->pluginAction('uploadDisplayUploadOptions',$_SESSION['u']);
+ if (!$result) { /* some plugin blocked the upload here, strange but can be used. */
+ foreach ($_SESSION['u']['files'] as $f) {
+ @unlink($f['tmp']);
+ }
+ unset($_SESSION['u']);
+ $this->nextStep(1);
+ }
+ }
+
+
+ function _validateUploadOptions() {
+ global $_POST;
+ global $_SESSION;
+
+ if (isset($_POST['description'])) {
+ /* now check plugins and if ok add file otherwise request the data again */
+ $upload = $_SESSION['u'];
+ $upload['description'] = $_POST['description'];
+ $upload['expire_date'] = '9999-31-12';
+ $s = isset(app()->config['id_max_length'])?app()->config['id_max_length']:30;
+ $a = isset(app()->config['id_use_alpha'])?app()->config['id_use_alpha']=='yes':false;
+ $upload['id']= app()->db->newRandomId('uploads','id',$s,$a);
+ $remove = app()->db->newRandomId('uploads','remove',$s,$a);
+ $upload['remove'] = $remove;
+ $upload['upload_date'] = date('Y-m-d H:i:s');
+ if (Trim($upload['description'])=='') {
+ foreach ($upload['files'] as $f) {
+ if ($description!='') $description .= ', ';
+ $description .= $f['name'];
+ }
+ $upload['description'] = $description;
+ }
+ $result = app()->pluginAction('uploadValidateUploadOptions',$upload, false);
+ if (!$result) {
+ $_SESSION['u']=$upload;
+ $this->nextStep(2);
+ }
+ /* add the upload */
+
+ app()->db->insert('uploads',$upload,array('id','remove','upload_date','expire_date','description','user','group','ip','size'));
+ foreach ($upload['files'] as $k => $f) {
+ $f['upload_id']=$upload['id'];
+ /* everything ok then add the file */
+ app()->db->insert('upload_files',$f,array('upload_id','name','mime','size'));
+ /* move the file to the actual location */
+ rename($f['tmp'],app()->config['DATA_PATH'].'/files/'.$upload['id'].'_'.$k);
+ }
+ /* save plugin values */
+ foreach (app()->plugins as $plugin) {
+ if (count($plugin->fields)>0) {
+ foreach ($plugin->fields as $f) {
+ if (isset($upload[$f])) {
+ $pinfo['upload_id'] = $upload['id'];
+ $pinfo['module'] = $plugin->name;
+ $pinfo['name']=$f;
+ $pinfo['value']=$upload[$f];
+ app()->db->insert('upload_options',$pinfo,array('upload_id','module','name','value'));
+ }
+ }
+ }
+ }
+ app()->message(tr('Files where successfully uploaded!'));
+ $this->setupLinks($upload);
+ $result = app()->pluginAction('uploadExecuteUploadActions',$upload, false);
+ $_SESSION['u']=$upload;
+ app()->log('notice','uploadOptions','','ALLOW',$upload['id']);
+ $this->nextStep(3);
+ }
+ }
+
+
+ function uploadOptions() {
+ global $_SESSION;
+ global $_POST;
+
+ if (isset($_SESSION['u']) and
+ ((isset($_SESSION['u']['files'])) or
+ (app()->config['twoclickupload']!='yes')) ) {
+ if (isset($_POST['description'])) {
+ $this->_validateUploadOptions();
+ } else {
+ $this->_displayUploadOptions();
+ }
+ } else {
+ $this->nextStep(1);
+ }
+ }
+
+
+
+ function uploadResult() {
+ if (isset($_SESSION['u']['id'])) {
+ if (app()->checkACL(app()->user->group(),$this->name,'l') == 'allow') { /* redirect to the file detail page */
+ //app()->display('upload/uploadResult');
+ redirect('?a=l&s=2&id='.$_SESSION['u']['id']);
+ } else {
+ $upload = $_SESSION['u'];
+ $this->setupLinks($upload);
+ $result = app()->pluginAction('uploadDisplayUploadResult',$upload,false);
+ $this->tpl->assign('upload',$upload);
+ $this->tpl->assign('webbase',app()->config['WWW_SERVER'].app()->config['WWW_ROOT']);
+ }
+ } else {
+ redirect();
+ }
+ }
+
+
+
+/**/
+ function _loadFile($id) {
+ $upload = app()->db->read('uploads',array('id'=>$id));
+ $upload = $upload[0];
+ $pinfo = app()->db->read('upload_options',array('upload_id' => $id));
+ foreach ($pinfo as $v) {
+ $upload[$v['name']]=$v['value'];
+ }
+ $files = app()->db->read('upload_files', array('upload_id' => $id));
+ $upload['files']= $files;
+ return $upload;
+ }
+
+
+ function downloadForm() {
+ global $_SESSION;
+ global $_POST;
+ global $_GET;
+
+ /* reset the download */
+ unset($_SESSION['d']);
+
+ $id = '';
+ if (isset($_POST['id'])) {
+ $id = $_POST['id'];
+ } else if (isset($_GET['id']) or isset($_GET['i'])) {
+ $id = isset($_GET['id'])?$_GET['id']:$_GET['i'];
+ } else if (isset($_SESSION['d']['id'])) {
+ $id = $_SESSION['d']['id'];
+ }
+ /* check if download exists, and what are the properties */
+ if ($id != '') {
+ $_SESSION['d']['id'] = $id;
+ $upload = $this->_loadFile($id);
+ if ($upload['id']!=$id) {
+ app()->log('warning','downloadForm','','DENY','File does not exist: ID:'.$id);
+ app()->error(tr('Requested file does not exist!'));
+ } else if (($upload['expire_date']!='0000-00-00 00:00:00') and $upload['expire_date']<date('Y-m-d H:i:s')) {
+ app()->log('warning','downloadForm','','DENY','File has expired: ID:'.$id);
+ app()->error(tr('File has expired, it cannot be downloaded anymore.'));
+ $this->nextStep(1);
+ } else {
+ $this->nextStep();
+ }
+ }
+ $upload = array();
+ app()->pluginAction('uploadDisplayDownloadForm',$upload,false);
+ }
+
+ function downloadOptions() {
+ global $_GET;
+ global $_POST;
+ global $_SESSION;
+
+ if (isset($_SESSION['d']['id'])) {
+ if (isset($_POST['confirm']) and ($_POST['confirm']=='yes')) {
+ $upload = $this->_loadFile($_SESSION['d']['id']);
+ $_SESSION['d']=$upload;
+ $_SESSION['d']['protected'] = true;
+ $this->tpl->assign('upload',$upload);
+ /* check if plugins need to protect the download */
+ $result = app()->pluginAction('uploadValidateDownloadOptions',$upload,false);
+ if ($result) {
+ app()->log('info','downloadOptions','','ALLOW',$id);
+ for ($i = 0; $i<count($_SESSION['d']['files']); $i++)
+ $_SESSION['d']['files'][$i]['downloaded']=false;
+ $_SESSION['d']['candownload']='ok';
+ $this->nextStep();
+ }
+ }
+ $upload = $this->_loadFile($_SESSION['d']['id']);
+ $_SESSION['d']=$upload;
+ $_SESSION['d']['protected'] = true;
+ $this->tpl->assign('upload',$upload);
+ /* check if plugins need to protect the download */
+ $result = app()->pluginAction('uploadDisplayDownloadOptions',$upload,false);
+ if ($result) {
+ app()->log('info','downloadOptions','','ALLOW',$id);
+ $_SESSION['d']['protected']=false;
+ $_SESSION['d']['candownload']='ok';
+ for ($i = 0; $i<count($_SESSION['d']['files']); $i++)
+ $_SESSION['d']['files'][$i]['downloaded']=false;
+ $this->nextStep();
+ }
+ } else {
+ app()->error(tr('Requested file does not exist!'));
+ $this->prevStep();
+ }
+ }
+
+ function downloadResult() {
+
+ /* here we do the actual download of the file */
+ if (!isset($_SESSION['d'])) {
+ redirect();
+ } else if ($_SESSION['d']['candownload']=='ok') {
+ /* download is allowed, display the files */
+ $upload = $_SESSION['d'];
+ $this->tpl->assign('upload',$upload);
+ } else { /* download needs the user to fill in some info before re-downloading */
+ $this->prevStep(2);
+ }
+ }
+
+ function downloadFile() {
+ global $_SESSION;
+ global $_POST;
+ global $_GET;
+
+ $num = 0;
+ if (isset($_GET['fid'])) {
+ $num = $_GET['fid'];
+ }
+ /* here we do the actual download of the file */
+ if (!isset($_SESSION['d'])) {
+ redirect();
+ } else if ($_SESSION['d']['protected'] and $_SESSION['d']['files'][$num]['downloaded']) {
+ $_SESSION['d']['candownload']='ko';
+ $this->nextStep(2,'d');
+ } else {
+ $upload = $_SESSION['d'];
+ /* check wether the plugins are ok */
+ $result = app()->pluginAction('serveFile',$upload);
+ if (!$result)
+ $this->nextStep(3,'d');
+ /* if we got this far the download should be served */
+ $file = app()->config['DATA_PATH'].'/files/'.$upload['id'].'_'.$num;
+ $filesize = filesize($file);
+ /* set to not timeout within default setting */
+ if (isset(app()->config['max_download_time'])) {
+ set_time_limit(app()->config['max_download_time']*60);
+ } else {
+ set_time_limit(7200); /* 2 hours should be enough */
+ }
+ app()->log('notice','serveFile','','ALLOW',$upload['id']);
+ /* let's set that the file has been downloaded */
+ $_SESSION['d']['files'][$num]['downloaded']=true;
+ /* let's free so multiple downloads should be available */
+ session_write_close();
+ /* disable and clean output buffer so it won't reach memory limit */
+ ob_end_clean();
+ header('Content-Description: File Transfer');
+ header('Content-Type: '.$upload['files'][$nu...
[truncated message content] |
|
From: <ts...@us...> - 2010-03-18 18:22:42
|
Revision: 369
http://openupload.svn.sourceforge.net/openupload/?rev=369&view=rev
Author: tsdogs
Date: 2010-03-18 18:22:36 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
add swift mailer library
Added Paths:
-----------
trunk/lib/swift/CHANGES
trunk/lib/swift/LICENSE
trunk/lib/swift/README
trunk/lib/swift/VERSION
Added: trunk/lib/swift/CHANGES
===================================================================
--- trunk/lib/swift/CHANGES (rev 0)
+++ trunk/lib/swift/CHANGES 2010-03-18 18:22:36 UTC (rev 369)
@@ -0,0 +1,61 @@
+Changelog for Swift Mailer, since Version 4.x
+---------------------------------------------
+
+09 March 2009: 4.0.0
+--------------------
+
+ * Complete rewrite of Version 3.x with lots of breaking changes at the interface
+ level, but for the best in the long run.
+ * Changed Connections to Transports
+ * Made sending more robust (less error prone)
+ * Simplified Swift_Message interface (removed need for separate RecipientList)
+ * Improved Plugin API (better event management)
+ * Changed all MIME generated content to be full RFC 2822 (and friends) compliant
+
+11 March 2009: 4.0.1
+--------------------
+
+ * Fixed regression with cache clearing logic in setBody(), setEncoder() and
+ setCharset()
+
+13 March 2009: 4.0.2
+--------------------
+
+ * Added addTo(), addCc() etc methods.
+ * Allowed setTo(), setCc() etc to accept a $name parameters.
+ * Patched a bug in MailTransport where failed recipients were not being merged.
+ * Added Swift::VERSION constant
+ * Allowed custom autoloaders to be used
+
+20 March 2009: 4.0.3
+--------------------
+
+ * Fixed Bug where base64 encoded content could exceed 76 chars per line
+ * Allowed Decorator plugin to accept a custom Replacements object
+
+12 August 2009: 4.0.4
+--------------------
+
+ * Bugfixes for operating under safe mode and using the MailTransport
+ * Compatibility for PHP 5.3
+ * Optimizations for addTo(), addCc() etc operations
+ * Bugfix for double-escaping issue in batch sending
+
+27 September 2009: 4.0.5
+------------------------
+
+ * Fixed a warning (#78)
+ * Clarified license and updated the file headers accordingly
+ * Added __toString() methods where toString() methods already exists
+ * Removed constants (SWIFT_LIB_DIRECTORY, SWIFT_MAP_DIRECTORY, SWIFT_CLASS_DIRECTORY)
+ * Simplified autoloading
+ * Added a setAuthMode() method to AuthHandler (#54)
+
+20 January 2010: 4.0.6
+----------------------
+
+ * added a PEAR package and a script to generate PEAR packages
+ * fixed Swift_Transport_TransportException for SMTP connection not thrown (#109)
+ * fixed Message-IDs are not updated properly (#118)
+
+-- End of Changes --
Added: trunk/lib/swift/LICENSE
===================================================================
--- trunk/lib/swift/LICENSE (rev 0)
+++ trunk/lib/swift/LICENSE 2010-03-18 18:22:36 UTC (rev 369)
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
Added: trunk/lib/swift/README
===================================================================
--- trunk/lib/swift/README (rev 0)
+++ trunk/lib/swift/README 2010-03-18 18:22:36 UTC (rev 369)
@@ -0,0 +1,30 @@
+Swift Mailer, by Chris Corbyn
+-----------------------------
+
+Swift Mailer is a component based mailing solution for PHP 5.
+It is released under the LGPL license.
+
+Homepage: http://swiftmailer.org
+Documentation: http://swiftmailer.org/docs
+Mailing List: http://groups.google.com/group/swiftmailer
+Bugs: http://swiftmailer.lighthouseapp.com/
+Repository: http://github.com/swiftmailer/swiftmailer
+
+Swift Mailer is highly object-oriented by design and lends itself
+to use in complex web application with a great deal of flexibility.
+
+For full details on usage, see the documentation.
+
+IMPORTANT: Users upgrading from version 3.x or earlier absolutely
+ MUST read the documentation. In short, the API is considerably
+ different so your old code won't "just work".
+
+If you'd like to make a donation, we are working on a system where
+donations are taken on a per-feature-request basis via the website
+with target amounts for each feature. In the meantime however you
+may donate directly to the author via PayPal:
+
+ PayPal: ch...@w3...
+
+Donations are certainly voluntary, but seriously, you donors are
+complete legends and drive this project! :)
Added: trunk/lib/swift/VERSION
===================================================================
--- trunk/lib/swift/VERSION (rev 0)
+++ trunk/lib/swift/VERSION 2010-03-18 18:22:36 UTC (rev 369)
@@ -0,0 +1 @@
+Swift-4.0.6
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2010-03-18 18:15:29
|
Revision: 367
http://openupload.svn.sourceforge.net/openupload/?rev=367&view=rev
Author: tsdogs
Date: 2010-03-18 18:15:22 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
version 0.5 modifications
Modified Paths:
--------------
trunk/lib/base.inc.php
trunk/lib/classes.inc.php
trunk/lib/general.inc.php
trunk/lib/main.inc.php
Modified: trunk/lib/base.inc.php
===================================================================
--- trunk/lib/base.inc.php 2010-03-18 18:13:47 UTC (rev 366)
+++ trunk/lib/base.inc.php 2010-03-18 18:15:22 UTC (rev 367)
@@ -15,10 +15,12 @@
function baseApplication($CONFIG) {
global $application;
global $_GET;
+ global $_SESSION;
$application = $this;
$this->config = $CONFIG;
+
/* initialize template engine */
$this->tpl = new Smarty();
if (isset($this->config['TEMPLATES_PATH']))
@@ -88,6 +90,8 @@
$this->auth->init();
$this->user->init();
+ /* uploaded files go into my tmp folder */
+ ini_set('upload_tmp_dir',app()->config['DATA_PATH'].'/tmp/');
}
/* gets the best language match based on browser info */
@@ -116,14 +120,6 @@
return $this->config['defaultlang'];
}
- /* returns the output from the template engine */
- function fetch($tname) {
- if (file_exists($this->tpl->template_dir.'/'.$this->config['site']['template'].'/'.$tname.'.tpl')) {
- return $this->tpl->fetch($this->config['site']['template'].'/'.$tname.'.tpl');
- } else {
- return $this->tpl->fetch('default/'.$tname.'.tpl');
- }
- }
function exists($tname) {
if (file_exists($this->tpl->template_dir.'/'.$this->config['site']['template'].'/'.$tname.'.tpl')) {
@@ -133,6 +129,7 @@
}
return false;
}
+
/* displays the output from the template engine */
function display($tname) {
if (file_exists($this->tpl->template_dir.'/'.$this->config['site']['template'].'/'.$tname.'.tpl')) {
@@ -142,6 +139,15 @@
}
}
+ /* returns the output from the template engine */
+ function fetch($tname) {
+ if (file_exists($this->tpl->template_dir.'/'.$this->config['site']['template'].'/'.$tname.'.tpl')) {
+ return $this->tpl->fetch($this->config['site']['template'].'/'.$tname.'.tpl');
+ } else {
+ return $this->tpl->fetch('default/'.$tname.'.tpl');
+ }
+ }
+
function initModules() {
/* initialize configured modules */
foreach ($this->config['modules'] as $module) {
@@ -165,11 +171,11 @@
$this->menu['main'] = array();
foreach ($this->modules as $m) {
- if (isset($m->mainmenu)) {
+ if (isset($m->menu)) {
foreach ($m->actions as $k => $v) {
if ($this->checkACL($group,$m->name,$k) == 'allow') {
- if (isset($m->mainmenu[$k])) {
- $this->menu['main'][$k]=$m->mainmenu[$k];
+ if (isset($m->menu[$k])) {
+ $this->menu['main'][$k]=$m->menu[$k];
}
}
}
@@ -231,7 +237,7 @@
function initPlugins() {
/* initialize plugin system */
- $this->pluginOutput = '';
+ $this->pluginOutput = array();
$this->plugins = array();
/* load the plugins */
@@ -252,8 +258,13 @@
}
}
- function pluginAction($action,&$finfo,$stop = true) {
- //$this->pluginHTML = '';
+ function pluginSetGroup($group) {
+ foreach ($this->plugins as $plugin) {
+ $plugin->group = $group;
+ }
+ }
+
+ function pluginAction($action,&$info,$stop = true) {
$result = true;
if (!is_array($this->plugins))
@@ -261,12 +272,14 @@
foreach ($this->plugins as $plugin) {
if (method_exists($plugin,$action)) {
/* check plugin acl */
+ if ($plugin->group=='') $plugin->group = app()->user->group();
+
$acl = 'disable'; /* disabled by default */
- if (isset($this->pluginAcl[$plugin->name])) {
- $acl = $this->pluginAcl[$plugin->name]['access'];
+ if (isset($this->pluginAcl[$plugin->name]) and isset($this->pluginAcl[$plugin->name][$plugin->group])) {
+ $acl = $this->pluginAcl[$plugin->name][$plugin->group]['access'];
}
- $plugin->pluginHTML = '';
- if (!$plugin->$action($finfo,$acl)) {
+ $plugin->pluginHTML = array();
+ if (!$plugin->$action($info,$acl)) {
if ($stop) {
app()->log('security',$action,$plugin->name,'DENY','');
return false;
@@ -274,7 +287,7 @@
app()->log('info',$action,$plugin->name,'DENY','non blocking');
$result = false;
}
- $this->pluginOutput .= $plugin->pluginHTML;
+ $this->pluginOutput = array_merge($this->pluginOutput, $plugin->pluginHTML);
}
}
return $result;
@@ -363,4 +376,247 @@
}
+
+class BaseUploadModule extends OpenUploadModule {
+
+ function BaseUploadModule() {
+ }
+
+ function setupUpload() {
+
+ /* reset any previous upload setting */
+ $upload = array();
+
+ if (isset(app()->config['multiupload'])) {
+ if (app()->config['multiupload']<=0) {
+ $upload['multiupload']=1;
+ } else {
+ $upload['multiupload']=app()->config['multiupload'];
+ }
+ } else {
+ $upload['multiupload']=1;
+ app()->config['multiupload']=1;
+ }
+
+ /* reset to default */
+ $upload['max_upload_size']=app()->config['max_upload_size']*1024*1024;
+ $result = app()->pluginAction('setupUpload',$upload);
+
+ /* now check if it's allowed by php */
+ if (app()->config['progress']!='cgi') {
+ $upl_size = return_bytes(ini_get('upload_max_filesize'));
+ $post_size = return_bytes(ini_get('post_max_size'));
+ if ($upload['max_upload_size']>$upl_size) {
+ app()->warning(tr('WARNING: upload_max_filesize is lower than the allowed size for the user! [%1M < %2M]',
+ ($upl_size/1024/1024),($upload['max_upload_size']/1024/1024)));
+ $upload['max_upload_size']=$upl_size;
+ }
+ if ($upload['max_upload_size']>$post_size) {
+ app()->warning(tr('WARNING: post_max_size is lower than the allowed size for the user! [%1M < %2M]',
+ ($post_size/1024/1024),($upload['max_upload_size']/1024/1024)));
+ if ($post_size<$upl_size) {
+ $upload['max_upload_size']=$post_size;
+ }
+ }
+ }
+ app()->message(tr('Maximum allowed upload size is %1',number_format($upload['max_upload_size'] / 1048576,0).' MB'));
+ app()->message(tr('Maximum allowed number of files per upload is %1',$upload['multiupload']));
+ $upload['identifier']=randomName(40,40);
+ app()->tpl->assign('uploadscript',$_SERVER['PHP_SELF']);
+ switch (app()->config['progress']) {
+ case 'uploadprogress':
+ $upload['identifiername']='UPLOAD_IDENTIFIER';
+ break;
+ case 'apc':
+ $upload['identifiername']=ini_get('apc.rfc1867_name');
+ break;
+ case 'cgi':
+ $upload['identifier']=randomName(32,32);
+ $this->tpl->assign('uploadscript',app()->config['progress_cgi'].'?upload_id='.session_id());
+ /* update information on the file */
+ $_CGI['temp_dir'] = app()->config['DATA_PATH'].'/tmp/';
+ $_CGI['upload_id'] = $upload['identifier'];
+ $_CGI['upload_dir'] = app()->config['DATA_PATH'].'/tmp/';
+ $_CGI['path_to_link_file'] = '/tmp/'.session_id().'.link';
+ $_CGI['embedded_upload_results'] = 1;
+ $_CGI['redirect_method'] = 1;
+ $_CGI['redirect_url'] = app()->config['WWW_SERVER'].app()->config['WWW_ROOT'].'/index.php?a='.app()->action.'&s='.app()->step;
+ $_CGI['cgi_upload_hook'] = 0;
+ $_CGI['debug_upload'] = 0;
+ $_CGI['delete_link_file'] = 0;
+ $_CGI['purge_temp_dirs'] = 1;
+ $_CGI['report_errors'] = 0;
+ $_CGI['purge_temp_dirs_limit'] = 1;
+ $_CGI['max_upload_size'] = $upload['max_upload_size'];
+ $c = '';
+ foreach ($_CGI as $k => $value) {
+ $c .= $k.'<=>'.$value."\n";
+ }
+ file_put_contents('/tmp/'.session_id().'.link',$c);
+ $upload['identifiername']='UPLOAD_IDENTIFIER';
+ break;
+ default:
+ $upload['identifiername']='UPLOAD_IDENTIFIER';
+ break;
+ }
+ return $upload;
+ }
+
+
+ function uploadProgress() {
+ global $_SESSION;
+
+ if (isset($_SESSION[app()->action]['identifier'])) {
+ $upload = $_SESSION[app()->action];
+ //ob_clean();
+ header("Cache-Control: no-cache, must-revalidate");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ // need this 'cause of IE problems
+ header('Content-Type: text/html; Charset=utf-8');
+
+ $progress = array('complete' => 0, 'total' => 0, 'percentage' => 0, 'files' => 0);
+ switch (app()->config['progress']) {
+ case 'uploadprogress':
+ $res = uploadprogress_get_info($upload['identifier']);
+ if (isset($res['bytes_uploaded'])) {
+ $progress['complete'] = $res['bytes_uploaded'];
+ if ($res['bytes_total']>0) {
+ $progress['total'] = $res['bytes_total'];
+ $progress['percentage'] = floor(($res['bytes_uploaded'] / $res['bytes_total'])*100);
+ }
+ $progress['files'] = $res['files_uploaded'];
+ }
+ break;
+ case 'apc':
+ $res = apc_fetch(ini_get('apc.rfc1867_prefix').$$upload['identifier']);
+ if ($res) {
+ $progress['complete'] = $res['current'];
+ $progress['total'] = $res['total'];
+ if ($res['total']>0)
+ $progress['percentage'] = floor(($res['current'] / $res['total'])*100);
+ $progress['files'] = 0;
+ }
+ break;
+ case 'cgixxx':
+ $res = cgiupload_get_info($$upload['identifier']);
+ if (isset($res['bytes_uploaded'])) {
+ $progress['complete'] = $res['bytes_uploaded'];
+ if ($res['bytes_total']>0) {
+ $progress['total'] = $res['bytes_total'];
+ $progress['percentage'] = floor(($res['bytes_uploaded'] / $res['bytes_total'])*100);
+ }
+ $progress['files'] = $res['files_uploaded'];
+ }
+ break;
+ }
+ app()->tpl->assign('progress',$progress);
+ return;
+ }
+ }
+
+ function setupCGIFiles() {
+ global $_FILES;
+
+ switch (app()->config['progress']) {
+ case 'cgi':
+ /* populate the variables so that it will be available to the following code */
+ if (file_exists('/tmp/'.session_id().'.redirect')) {
+ $hook = file_get_contents('/tmp/'.session_id().'.redirect');
+ $p = new CGIParser();
+ $parsed = $p->parseCGI($hook);
+ $_POST = $parsed['post'];
+ $_FILES = $parsed['files'];
+ if (count($parsed['errors'])>0) {
+ foreach ($parsed['errors'] as $v) {
+ app()->error(tr($v));
+ }
+ }
+ @unlink('/tmp/'.session_id().'.redirect');
+ @unlink('/tmp/'.session_id().'.link');
+ break;
+ }
+ }
+ }
+
+ function validateUploadedFiles(&$upload) {
+ global $_SESSION;
+ global $_SERVER;
+ global $_FILES;
+
+ if (count($_FILES)>0) {
+ if (count($_FILES)>app()->config['multiupload']) {
+ app()->log('warning','uploadForm','','DENY','Too many files!');
+ app()->error(tr('Too many files uploaded! %1',count($_FILES)));
+ return false;
+ }
+ /* check if any upload error occurred */
+ $error = false;
+ $totalsize = 0;
+ foreach ($_FILES as $k => $f) {
+ if ($f['name']!='' and $f['error']>0) {
+ switch ($f['error']) { /* taken from here: http://it.php.net/manual/en/features.file-upload.errors.php */
+ case 1: $msg = tr('Maximum upload size for site wide configuration reached! [%1]', $f['name']); break;
+ case 2: $msg = tr('Maximum file size exceeded! [%1]', $f['name']); break;
+ case 3: $msg = tr('Partial file transfer error! [%1]', $f['name']); break;
+ case 4: $msg = tr('No file was uploaded! [%1]', $f['name']); break;
+ case 6: $msg = tr('Missing temporary directory! [%1]', $f['name']); break;
+ case 7: $msg = tr('Can\'t write to temporary diretory! [%1]', $f['name']); break;
+ case 8: $msg = tr('Upload blocked by extension! [%1]', $f['name']); break;
+ default:
+ $msg = tr('Upload failed for Unknown error code: [%1] ! [%2]',$f['error'], $f['name']); break;
+ }
+ app()->log('warning','uploadForm','','DENY','Upload error: '.$msg);
+ app()->error($msg);
+ $error = true;
+ }
+ $totalsize += $f['size'];
+ }
+ if ($totalsize > $upload['max_upload_size']) {
+ app()->log('warning','uploadFiles','','DENY','Maximum file size exceeded!');
+ app()->error(tr('Maximum file size exceeded!'));
+ $error = true;
+ }
+ if ($error) { return false; }
+ /* no error so far */
+ $tmpname = app()->config['DATA_PATH'].'/tmp/'.randomName();
+ $x = 0;
+ foreach ($_FILES as $k => $f) {
+ /* prepare the file */
+ $tmpnamex = $tmpname;
+ if ($x>0) { $tmpnamex = $tmpname.'_'.$x; }
+ if ($f['tmp_name']!='') {
+ if (app()->config['progress']=='cgi') {
+ $tmpnamex = $f['tmp_name'];
+ } else {
+ // TODO: check if move fails for some reason
+ move_uploaded_file($f['tmp_name'],$tmpnamex);
+ }
+ $files[$x]['tmp']=$tmpnamex;
+ /* get the file mime type, and do not rely on what the browser sends */
+ $mime = get_mime_type($tmpnamex,$f['type']);
+ $files[$x]['mime']=$mime;
+ $files[$x]['name']=$f['name'];
+ $files[$x]['size']=$f['size'];
+ $x++;
+ }
+ }
+ $upload['size']=$totalsize;
+ $upload['files']=$files;
+ return true;
+ }
+ return false;
+ }
+
+ function setupLinks(&$upload,$a1 = 'd', $a2 = 'r') {
+ /* get the file info */
+ $a = 'action'; $i = 'id'; $r = 'removeid';
+ if (app()->config['use_short_links']=='yes') {
+ $a = 'a'; $i = 'i'; $r = 'r';
+ }
+ $upload['downloadlink']= app()->config['WWW_SERVER'].app()->config['WWW_ROOT'].'/?'.$a.'='.$a1.'&'.$i.'='.$upload['id'];
+ $upload['removelink']=app()->config['WWW_SERVER'].app()->config['WWW_ROOT'].
+ '/?'.$a.'='.$a2.'&'.$i.'='.$upload['id'].'&'.$r.'='.$upload['remove'];
+ }
+
+}
?>
Modified: trunk/lib/classes.inc.php
===================================================================
--- trunk/lib/classes.inc.php 2010-03-18 18:13:47 UTC (rev 366)
+++ trunk/lib/classes.inc.php 2010-03-18 18:15:22 UTC (rev 367)
@@ -112,22 +112,18 @@
redirect('?action='.$action.'&step='.$step);
}
- function fileaction() {
- }
-
function init() {
}
}
class OpenUploadPlugin {
- var $pluginHTML = '';
- var $messageHTML;
+ var $pluginHTML = array();
var $name;
var $fields = array();
var $options = array();
var $config = array();
- var $category = 'general';
+ var $group = '';
function OpenUploadPlugin() {
}
@@ -137,9 +133,10 @@
}
function display($tpl) {
- $this->pluginHTML .= app()->fetch('plugins/'.$this->name.'/'.$tpl);
+ $this->pluginHTML[] = 'plugins/'.$this->name.'/'.$tpl;
}
+ /* not really used */
function fetch($tpl) {
return app()->fetch('plugins/'.$this->name.'/'.$tpl);
}
@@ -173,7 +170,11 @@
}
function getGroup($option) {
- $group = app()->user->group();
+ if ($this->group=='') {
+ $group = app()->user->group();
+ } else {
+ $group = $this->group;
+ }
if (is_array($group)) {
/* check for which group there is a configuration */
foreach ($group as $g) {
@@ -206,4 +207,117 @@
}
+
+class CGIParser {
+ var $files;
+ var $post;
+ var $errors;
+ var $element;
+ var $elementname;
+
+ var $state;
+
+ function cgiupload_get_info($fid) {
+ return array();
+ }
+
+ function startElement($parser, $name, $attribs){
+ if ($name == 'post') {
+ $this->state = 0;
+ } else if ($name == 'errors') {
+ $this->state = 1;
+ } else if ($name == 'files') {
+ $this->state = 2;
+ } else if (($this->state==2) and ($name == 'file')) {
+ $this->element=array(); // initialize file
+ $this->elementname='';
+ $this->state=3;
+ }
+ if ($this->tag != '')
+ $this->tags[]=$this->tag;
+ $this->tag = $name;
+ }
+
+ function characterData($parser, $data){
+ switch ($this->state) {
+ case 0:
+ if ($this->tag != 'post')
+ $this->post[$this->tag]=$data;
+ break;
+ case 1:
+ if ($this->tag == 'error') {
+ $this->errors[]=$data;
+ }
+ break;
+ case 2:
+ // ignore files data
+ break;
+ case 3:
+ // inside a file
+ if ($this->tag == 'slot') {
+ $this->elementname = $data;
+ }
+ // ignore file content
+ if ($this->tag != 'file')
+ $this->element[$this->tag]=$data;
+ break;
+ }
+ }
+
+ function endElement($parser, $name){
+ switch ($this->state) {
+ case 0:
+ if ($name == 'post') {
+ $this->state = -1;
+ } else if (!isset($this->post[$this->tag])) {
+ $this->post[$this->tag] = '';
+ }
+ $this->tag = '';
+ break;
+ case 1:
+ if ($name == 'errors') {
+ $this->state = -1;
+ }
+ $this->tag = '';
+ break;
+ case 2:
+ if ($name == 'files') {
+ $this->state = -1;
+ }
+ $this->tag = '';
+ break;
+ case 3:
+ // save the file
+ if ($name == 'file') {
+ if ($this->elementname!='') {
+ $this->files[$this->elementname] = $this->element;
+ } else {
+ /* error parsing files ? */
+ }
+ $this->state = 2;
+ }
+ break;
+ }
+ $this->tag =array_pop($this->tags);
+ }
+
+ function parseCGI($xml) {
+ $this->state = -1;
+ $this->element=array();
+ $this->elementname='';
+ $this->post = array();
+ $this->errors = array();
+ $this->files = array();
+
+ $xml_parser = xml_parser_create();
+ xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, false);
+ xml_set_element_handler($xml_parser, array($this,"startElement"), array($this,"endElement"));
+ xml_set_character_data_handler($xml_parser, array($this,"characterData"));
+ xml_parse($xml_parser,$xml);
+ $result = array('post' => $this->post, 'files' => $this->files, 'errors' => $this->errors);
+ return $result;
+ }
+
+}
+
?>
\ No newline at end of file
Modified: trunk/lib/general.inc.php
===================================================================
--- trunk/lib/general.inc.php 2010-03-18 18:13:47 UTC (rev 366)
+++ trunk/lib/general.inc.php 2010-03-18 18:15:22 UTC (rev 367)
@@ -11,8 +11,8 @@
else
define('SMARTY_DIR', $CONFIG['INSTALL_ROOT'].'/lib/smarty/');
require(SMARTY_DIR . 'Smarty.class.php');
+require_once($CONFIG['INSTALL_ROOT'].'/lib/classes.inc.php');
require_once($CONFIG['INSTALL_ROOT'].'/lib/base.inc.php');
-require_once($CONFIG['INSTALL_ROOT'].'/lib/classes.inc.php');
require_once($CONFIG['INSTALL_ROOT'].'/lib/user.inc.php');
require_once($CONFIG['INSTALL_ROOT'].'/lib/main.inc.php');
@@ -165,7 +165,7 @@
// otherwise there was no mail handler for the domain
return false;
}
- return false;
+ return false;
}
}
// End Bug Fix
@@ -232,42 +232,61 @@
return $isValid;
}
-/* this function generates a mail from a template */
-function sendmail($from,$reply,$to,$subject,$template, $attach = array()) {
- $tpl = &app()->tpl;
- $tpl->assign('subject',$subject);
- $tpl->assign('from',$from);
- $tpl->assign('to',$to);
- /* generate a boundary */
- $bound1 = "==Multipart_Bounday_x".md5(time())."x";
- /* generate a second boundary for the alternative */
- $header = "From: ".$from."\nReply-To: ".$reply."\n";
- $header .= "Mime-Version: 1.0\n";
- if (count($attach)>0) {
- $bound2 = "==Multipart_Bounday_z".md5(time())."z";
- $header .= "Content-Type: multipart/mixed;\n boundary=\"".$bound1."\"";
- } else {
- $bound2 = $bound1;
- $header .= "Content-Type: multipart/alternative;\n boundary=\"".$bound1."\"";
+function sendMail($from,$to,$subject,$template,$attach = array() ) {
+ global $CONFIG;
+
+ require_once($CONFIG['INSTALL_ROOT'].'/lib/swift/lib/swift_required.php');
+
+ // multiple recipients
+ $to = split(';',$to);
+
+ $message = Swift_Message::newInstance($subject);
+ $message->setFrom($from);
+ $message->setTo($to);
+ if (app()->exists($template.'Text')) {
+ $message->setBody(app()->fetch($template.'Text'),'text/plain');
+ if (app()->exists($template.'Html')) {
+ $message->addPart(app()->fetch($template.'Html'),'text/html');
+ }
+ } else if (app()->exists($template.'Html')) { /* send only html */
+ $message->setBody(app()->fetch($template.'Html'),'text/html');
+ } else { /* Let's force it to be text/plain */
+ $message->setBody(app()->fetch($template),'text/plain');
}
- $tpl->assign('boudary',$bound2);
- $msg = app()->fetch($template);
- /* now add the attachements */
- if (count($attach)>0) {
+ if (count(attach)>0) {
foreach ($attach as $a) {
- $msg .="--".$bound1."\n";
- $msg .="Content-Type: ".$a['mime'].";\n name=\"".$a['name']."\"\n";
- $msg .="Content-Disposition: attachment; filename=\"".$a['name']."\"\n";
- $msg .="Content-Transfer-Encoding: base64\n\n";
- $msg .=chunk_split(base64_encode(file_get_contents($a['file'])));
+ $message->attach(Swift_Attachment::fromPath($a));
}
- $msg .="\n--".$bound1."--\n";
- $msg .="\n--".$bound2."--\n";
- } else {
- $msg .="\n--".$bound1."--\n";
}
- return mail($to,$subject,$msg,$header,'-f "'.$from.'"');
+ switch ($CONFIG['mail']['transport']) {
+ case 'smtp': /* should be the preferred */
+ $transport = Swift_SmtpTransport::newInstance($CONFIG['mail']['server'],
+ isset($CONFIG['mail']['port'])?$CONFIG['mail']['port']:25);
+ if ($CONFIG['mail']['authrequired']) {
+ $transport->setUsername($CONFIG['mail']['authuser']);
+ $transport->setPassword($CONFIG['mail']['authpassword']);
+ }
+ if (isset($CONFIG['mail']['encrypt'])) {
+ // TODO: check for stream_get_transports()
+ $transport->setEncryption($CONFIG['mail']['encrypt']);
+ }
+ break;
+ case 'sendmail':
+ $transport = Swift_SendmailTransport::newInstance(
+ isset($CONFIG['mail']['sendmail'])?
+ $CONFIG['mail']['sendmail']:'/usr/sbin/sendmail -bs');
+ break;
+ case 'mail':
+ default:
+ $transport = Swift_MailTransport::newInstance();
+ break;
+ }
+
+ $mailer = Swift_Mailer::newInstance($transport);
+
+ $result = $mailer->send($message);
+ return $result;
}
/* from php manual page */
Modified: trunk/lib/main.inc.php
===================================================================
--- trunk/lib/main.inc.php 2010-03-18 18:13:47 UTC (rev 366)
+++ trunk/lib/main.inc.php 2010-03-18 18:15:22 UTC (rev 367)
@@ -1,12 +1,5 @@
<?php
-function sortTabs($a, $b) {
- if ($a['priority'] == $b['priority'])
- return 0;
- else
- return ($a['priority'] < $b['priority'])? -1 : 1;
-}
-
class Application extends baseApplication {
var $db; /* database */
var $auth; /* authentication */
@@ -27,7 +20,8 @@
$application = $this;
baseApplication::baseApplication($CONFIG);
- $this->config['modules'][]='files';
+ $this->config['modules'][]='upload';
+ $this->config['modules'][]='invitation';
$this->config['modules'][]='admin';
$this->config['modules'][]='auth';
@@ -45,16 +39,32 @@
function message($msg) {
global $_SESSION;
- $_SESSION['user']['messages'][] = $msg;
- $this->log('info','','','MESSAGE',$msg);
+
+ /* add the message if not already in the stack */
+ if (!is_array($_SESSION['user']['messages']) or
+ array_search($msg,$_SESSION['user']['messages'])===FALSE) {
+ $_SESSION['user']['messages'][] = $msg;
+ $this->log('info','','','MESSAGE',$msg);
+ }
}
function error($msg) {
global $_SESSION;
- $_SESSION['user']['errors'][] = $msg;
- $this->log('info','','','ERROR',$msg);
+
+ /* add the error if not already in the stack */
+ if (!is_array($_SESSION['user']['errors']) or
+ array_search($msg,$_SESSION['user']['errors'])===FALSE) {
+ $_SESSION['user']['errors'][] = $msg;
+ $this->log('info','','','ERROR',$msg);
+ }
}
+ function warning($msg) {
+ global $_SESSION;
+ $_SESSION['user']['warnings'][] = $msg;
+ $this->log('info','','','WARNING',$msg);
+ }
+
function log($level,$realaction,$plugin,$result,$moreinfo) {
global $_SERVER;
@@ -92,6 +102,12 @@
}
+ function _sortTabs($a, $b) {
+ if ($a['priority'] == $b['priority'])
+ return 0;
+ else
+ return ($a['priority'] < $b['priority'])? -1 : 1;
+ }
function loadACL() {
/* loads the acl from the db */
@@ -99,14 +115,16 @@
if (is_array($group)) {
$this->acl = $this->db->read('acl',array(),array('group_name','module','action'),'',
array('group_name','module','action'));
- $this->pluginAcl = $this->db->read('plugin_acl',array(),array('plugin'),'',array('plugin'));
+// $this->pluginAcl = $this->db->read('plugin_acl',array(),array('plugin'),'',array('plugin'));
} else {
$this->acl = array_merge($this->db->read('acl',array('group_name' => $group),array('module','action'),'',
array('group_name','module','action')),
$this->db->read('acl',array('group_name' => '*'),array('module','action'),'',
array('group_name','module','action')));
- $this->pluginAcl = $this->db->read('plugin_acl',array('group_name' => $group),array('plugin'),'',array('plugin'));
+// $this->pluginAcl = $this->db->read('plugin_acl',array('group_name' => $group),array('plugin'),'',array('plugin'));
}
+ // need to load all the plugin acl as group can change on the actions
+ $this->pluginAcl = $this->db->read('plugin_acl',array(),array('plugin','group_name'),'',array('plugin','group_name'));
}
function tab($content,$name = 'default', $priority = 0 ) {
@@ -118,6 +136,25 @@
}
}
+ function addContent($content, $name = 'page', $priority = 0) {
+ $this->contents[$name]['html'][] = $content;
+ if ($priority<999)
+ $this->contents[$name]['priority']=$priority;
+ else if (!isset($this->contents[$name]['priority'])) {
+ $this->contents[$name]['priority']=999;
+ }
+ }
+
+ function getContent($name) {
+ $result = '';
+ if (isset($this->contents[$name])) {
+ foreach ($this->contents[$name]['html'] as $c) {
+ $result .= $c;
+ }
+ }
+ return $result;
+ }
+
function banned() {
global $_SERVER;
@@ -138,6 +175,7 @@
global $_GET;
$this->tabs = array();
+ $this->contents = array();
$this->setupRun($action,$step);
/* check for banned IP */
@@ -145,6 +183,7 @@
$this->log('security','banned','','DENY','');
$this->page['content'] = $this->fetch('banned');
$this->page['title']= tr('IP Banned');
+ $this->addContent($this->page['content']);
$this->tpl->assign('page',app()->page);
$this->display($this->mainPage);
$this->db->free();
@@ -174,19 +213,21 @@
unset($_SESSION['user']['messages']);
unset($_SESSION['user']['errors']);
$this->page['content']=tr('THERE HAS BEEN A PERMISSION ERROR. PLEASE TRY ONE OF THE ALLOWED OPTIONS!');
+ $this->addContent($this->page['content'],'page');
$this->tpl->assign('page',$this->page);
$this->display($this->mainPage);
$this->db->free();
exit(0);
} else {
/* save the requested url */
- redirect('?action=login');
+ redirect('?a=login');
}
}
if ($_SERVER['QUERY_STRING']!='')
$_SESSION['requested_url']='?'.$_SERVER['QUERY_STRING'];
redirect();
}
+
$this->initPlugins();
$this->initMenu($this->user->group(),$m->name);
@@ -202,28 +243,47 @@
$this->page[$k] = $v;
}
}
+ $this->tpl->assign('langs',$this->langs);
$this->tpl->assign('user',$_SESSION['user']);
$this->tpl->assign('config',$this->config);
+
$m->$fun();
+
+
+ /* now populate the plugin html */
+ if (count($this->pluginOutput)>0) {
+ foreach ($this->pluginOutput as $t) {
+ $this->addContent($this->fetch($t),'plugins');
+ }
+ }
+
+ /* if for some reason we want to have the content relocated in the page we need this (i.e. in the tabs)*/
+ if ($this->exists('modules/'.$m->name.'/'.$fun.'.pre')) {
+ $this->addContent($this->fetch('modules/'.$m->name.'/'.$fun.'.pre'),'page',1);
+ }
+
if (count($this->tabs)>0) {
/* sort based on the priority flag */
- uasort($this->tabs,'sortTabs');
+ uasort($this->tabs,array($this, '_sortTabs'));
$this->tpl->assign('tabs',$this->tabs);
- $this->pluginOutput .= $this->fetch('tabs');
+ $this->addContent($this->fetch('tabs'),'plugins');
}
- $this->tpl->assign('plugins',$this->pluginOutput);
- $this->page['content']=$this->fetch('modules/'.$m->name.'/'.$fun);
+ $this->tpl->assign('plugins',$this->getContent('plugins'));
+ $this->addContent($this->fetch('modules/'.$m->name.'/'.$fun),'page',1);
+
if ($_GET['type']=='ajax') {
- echo $this->page['content'];
- session_weite_close;
+ echo $this->getContent('page');
+ session_write_close();
exit;
}
+ /* backward compatibility */
+ $this->page['content']=$this->getContent('page');
/* now display the final page */
$this->tpl->assign('user',$_SESSION['user']);
- $this->tpl->assign('langs',$this->langs);
unset($_SESSION['user']['messages']);
+ unset($_SESSION['user']['warnings']);
unset($_SESSION['user']['errors']);
$this->tpl->assign('page',$this->page);
$this->display($this->mainPage);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2010-03-18 18:13:54
|
Revision: 366
http://openupload.svn.sourceforge.net/openupload/?rev=366&view=rev
Author: tsdogs
Date: 2010-03-18 18:13:47 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
Add content handling plugins
Added Paths:
-----------
trunk/lib/smarty_plugins/block.addcontent.php
trunk/lib/smarty_plugins/function.content.php
Added: trunk/lib/smarty_plugins/block.addcontent.php
===================================================================
--- trunk/lib/smarty_plugins/block.addcontent.php (rev 0)
+++ trunk/lib/smarty_plugins/block.addcontent.php 2010-03-18 18:13:47 UTC (rev 366)
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Smarty plugin
+ * @package OpenUpload
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {addcontent} block plugin
+ *
+ * Type: block
+ * Name: addcontent
+ * Purpose: Adds the content to the corresponding section
+ * @author Alessandro Briosi
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses app()->addContent();
+ */
+
+function smarty_block_addcontent($params, $content = null, &$smarty, &$repeat) {
+
+ if(!$repeat){
+ if (isset($content)) {
+ $name = 'page';
+ $priority = 999;
+ if (isset($params['name']))
+ $name = $params['name'];
+ if (isset($params['priority']))
+ $priority = $params['priority'];
+ return app()->addContent($content,$name,$priority);
+ }
+ }
+ return '';
+}
\ No newline at end of file
Added: trunk/lib/smarty_plugins/function.content.php
===================================================================
--- trunk/lib/smarty_plugins/function.content.php (rev 0)
+++ trunk/lib/smarty_plugins/function.content.php 2010-03-18 18:13:47 UTC (rev 366)
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Smarty plugin
+ * @package OpenUpload
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {content} function plugin
+ *
+ * Type: function
+ * Name: content
+ * Purpose: Display the content previously populated by the application
+ * @author Alessandro Briosi
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses app()->addContent();
+ */
+
+function smarty_function_content($params, &$smarty) {
+
+ $name = 'page';
+ if (isset($params['name']))
+ $name = $params['name'];
+ return app()->getContent($name);
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2010-03-18 18:13:01
|
Revision: 365
http://openupload.svn.sourceforge.net/openupload/?rev=365&view=rev
Author: tsdogs
Date: 2010-03-18 18:12:52 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
minor changes
Modified Paths:
--------------
trunk/lib/smarty_plugins/block.tr.php
trunk/lib/smarty_plugins/function.db_table.php
Modified: trunk/lib/smarty_plugins/block.tr.php
===================================================================
--- trunk/lib/smarty_plugins/block.tr.php 2009-11-07 23:54:47 UTC (rev 364)
+++ trunk/lib/smarty_plugins/block.tr.php 2010-03-18 18:12:52 UTC (rev 365)
@@ -23,7 +23,7 @@
if(!$repeat){
if (isset($content)) {
- return translate($content, 'template',$params);
+ return translate($content, 'template', $params);
} else {
return '';
}
Modified: trunk/lib/smarty_plugins/function.db_table.php
===================================================================
--- trunk/lib/smarty_plugins/function.db_table.php 2009-11-07 23:54:47 UTC (rev 364)
+++ trunk/lib/smarty_plugins/function.db_table.php 2010-03-18 18:12:52 UTC (rev 365)
@@ -1,7 +1,5 @@
<?php
-
-
function smarty_function_db_table($params, &$smarty){
$data = $params['data'];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 23:54:53
|
Revision: 364
http://openupload.svn.sourceforge.net/openupload/?rev=364&view=rev
Author: tsdogs
Date: 2009-11-07 23:54:47 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
OUSESSSION now
Modified Paths:
--------------
trunk/www/plugins/captcha.php
Modified: trunk/www/plugins/captcha.php
===================================================================
--- trunk/www/plugins/captcha.php 2009-11-07 23:51:49 UTC (rev 363)
+++ trunk/www/plugins/captcha.php 2009-11-07 23:54:47 UTC (rev 364)
@@ -1,5 +1,7 @@
<?php
ob_start();
+session_name('OUSESSION');
+session_start();
/* disable error reporting to the browser */
ini_set('display_errors',0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 23:51:57
|
Revision: 363
http://openupload.svn.sourceforge.net/openupload/?rev=363&view=rev
Author: tsdogs
Date: 2009-11-07 23:51:49 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
rename default theme to classic
Added Paths:
-----------
trunk/www/templates/classic/
Removed Paths:
-------------
trunk/www/templates/default/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 23:47:41
|
Revision: 362
http://openupload.svn.sourceforge.net/openupload/?rev=362&view=rev
Author: tsdogs
Date: 2009-11-07 23:47:29 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
re-add classic template
Added Paths:
-----------
trunk/templates/classic/locale/de/
trunk/templates/classic/locale/de/LC_MESSAGES/
trunk/templates/classic/locale/de/LC_MESSAGES/index.html
trunk/templates/classic/locale/de/LC_MESSAGES/template.mo
trunk/templates/classic/locale/de/LC_MESSAGES/template.po
trunk/templates/classic/locale/de/index.html
trunk/templates/classic/locale/de.inc.php
trunk/templates/classic/locale/en.inc.php
trunk/templates/classic/locale/fr/
trunk/templates/classic/locale/fr/LC_MESSAGES/
trunk/templates/classic/locale/fr/LC_MESSAGES/index.html
trunk/templates/classic/locale/fr/LC_MESSAGES/template.mo
trunk/templates/classic/locale/fr/LC_MESSAGES/template.po
trunk/templates/classic/locale/fr/index.html
trunk/templates/classic/locale/fr.inc.php
trunk/templates/classic/locale/index.html
trunk/templates/classic/locale/it/
trunk/templates/classic/locale/it/LC_MESSAGES/
trunk/templates/classic/locale/it/LC_MESSAGES/index.html
trunk/templates/classic/locale/it/LC_MESSAGES/template.mo
trunk/templates/classic/locale/it/LC_MESSAGES/template.po
trunk/templates/classic/locale/it/index.html
trunk/templates/classic/locale/it.inc.php
trunk/templates/classic/locale/zh_CN.GBK/
trunk/templates/classic/locale/zh_CN.GBK/LC_MESSAGES/
trunk/templates/classic/locale/zh_CN.GBK/LC_MESSAGES/index.html
trunk/templates/classic/locale/zh_CN.GBK/LC_MESSAGES/template.mo
trunk/templates/classic/locale/zh_CN.GBK/LC_MESSAGES/template.po
trunk/templates/classic/locale/zh_CN.GBK/index.html
trunk/templates/classic/locale/zh_CN.inc.php
trunk/templates/classic/modules/admin/
trunk/templates/classic/modules/admin/admin.tpl
trunk/templates/classic/modules/admin/adminmenu.tpl
trunk/templates/classic/modules/admin/banned.tpl
trunk/templates/classic/modules/admin/bannedadd.tpl
trunk/templates/classic/modules/admin/bannededit.tpl
trunk/templates/classic/modules/admin/deletescript.tpl
trunk/templates/classic/modules/admin/files.tpl
trunk/templates/classic/modules/admin/filesmenu.tpl
trunk/templates/classic/modules/admin/groupadd.tpl
trunk/templates/classic/modules/admin/groupedit.tpl
trunk/templates/classic/modules/admin/groups.tpl
trunk/templates/classic/modules/admin/index.html
trunk/templates/classic/modules/admin/langadd.tpl
trunk/templates/classic/modules/admin/langedit.tpl
trunk/templates/classic/modules/admin/langs.tpl
trunk/templates/classic/modules/admin/logs.tpl
trunk/templates/classic/modules/admin/maintenance.tpl
trunk/templates/classic/modules/admin/maintenancerun.tpl
trunk/templates/classic/modules/admin/options.tpl
trunk/templates/classic/modules/admin/pluginadd.tpl
trunk/templates/classic/modules/admin/pluginedit.tpl
trunk/templates/classic/modules/admin/pluginoptionadd.tpl
trunk/templates/classic/modules/admin/pluginoptiondetail.tpl
trunk/templates/classic/modules/admin/pluginoptionedit.tpl
trunk/templates/classic/modules/admin/pluginoptions.tpl
trunk/templates/classic/modules/admin/plugins.tpl
trunk/templates/classic/modules/admin/pluginsacl.tpl
trunk/templates/classic/modules/admin/rightedit.tpl
trunk/templates/classic/modules/admin/rights.tpl
trunk/templates/classic/modules/admin/settings.tpl
trunk/templates/classic/modules/admin/settingsmenu.tpl
trunk/templates/classic/modules/admin/useradd.tpl
trunk/templates/classic/modules/admin/useredit.tpl
trunk/templates/classic/modules/admin/users.tpl
trunk/templates/classic/modules/auth/
trunk/templates/classic/modules/auth/emailconfirm.tpl
trunk/templates/classic/modules/auth/index.html
trunk/templates/classic/modules/auth/loginForm.tpl
trunk/templates/classic/modules/auth/profile.tpl
trunk/templates/classic/modules/auth/profileedit.tpl
trunk/templates/classic/modules/auth/registerConfirm.tpl
trunk/templates/classic/modules/auth/registerEnable.tpl
trunk/templates/classic/modules/auth/registerForm.tpl
trunk/templates/classic/modules/auth/registerlink.tpl
trunk/templates/classic/modules/files/
trunk/templates/classic/modules/files/downloadConfirm.tpl
trunk/templates/classic/modules/files/downloadForm.tpl
trunk/templates/classic/modules/files/downloadRequest.tpl
trunk/templates/classic/modules/files/fileDetail.tpl
trunk/templates/classic/modules/files/fileList.tpl
trunk/templates/classic/modules/files/index.html
trunk/templates/classic/modules/files/removeConfirm.tpl
trunk/templates/classic/modules/files/removeRequest.tpl
trunk/templates/classic/modules/files/removeResult.tpl
trunk/templates/classic/modules/files/uploadFileInfo.tpl
trunk/templates/classic/modules/files/uploadForm.tpl
trunk/templates/classic/modules/files/uploadOptions.tpl
trunk/templates/classic/modules/files/uploadProgress.tpl
trunk/templates/classic/modules/index.html
trunk/templates/classic/plugins/captcha/
trunk/templates/classic/plugins/captcha/downloadRequest.tpl
trunk/templates/classic/plugins/captcha/fileDetail.tpl
trunk/templates/classic/plugins/captcha/index.html
trunk/templates/classic/plugins/captcha/registerForm.tpl
trunk/templates/classic/plugins/captcha/removeRequest.tpl
trunk/templates/classic/plugins/captcha/uploadOptions.tpl
trunk/templates/classic/plugins/compress/
trunk/templates/classic/plugins/compress/index.html
trunk/templates/classic/plugins/compress/uploadOptions.tpl
trunk/templates/classic/plugins/email/
trunk/templates/classic/plugins/email/fileDetail.tpl
trunk/templates/classic/plugins/email/index.html
trunk/templates/classic/plugins/email/notify.tpl
trunk/templates/classic/plugins/email/uploadOptions.tpl
trunk/templates/classic/plugins/expire/
trunk/templates/classic/plugins/expire/fileDetail.tpl
trunk/templates/classic/plugins/expire/index.html
trunk/templates/classic/plugins/expire/uploadForm.tpl
trunk/templates/classic/plugins/expire/uploadOptions.tpl
trunk/templates/classic/plugins/index.html
trunk/templates/classic/plugins/mimetypes/
trunk/templates/classic/plugins/mimetypes/index.html
trunk/templates/classic/plugins/mimetypes/uploadForm.tpl
trunk/templates/classic/plugins/password/
trunk/templates/classic/plugins/password/downloadRequest.tpl
trunk/templates/classic/plugins/password/fileDetail.tpl
trunk/templates/classic/plugins/password/index.html
trunk/templates/classic/plugins/password/uploadOptions.tpl
Added: trunk/templates/classic/locale/de/LC_MESSAGES/index.html
===================================================================
--- trunk/templates/classic/locale/de/LC_MESSAGES/index.html (rev 0)
+++ trunk/templates/classic/locale/de/LC_MESSAGES/index.html 2009-11-07 23:47:29 UTC (rev 362)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/classic/locale/de/LC_MESSAGES/template.mo
===================================================================
(Binary files differ)
Property changes on: trunk/templates/classic/locale/de/LC_MESSAGES/template.mo
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/templates/classic/locale/de/LC_MESSAGES/template.po
===================================================================
--- trunk/templates/classic/locale/de/LC_MESSAGES/template.po (rev 0)
+++ trunk/templates/classic/locale/de/LC_MESSAGES/template.po 2009-11-07 23:47:29 UTC (rev 362)
@@ -0,0 +1,982 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenUpload default template\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-03-03 16:31+0100\n"
+"PO-Revision-Date: 2009-03-06 22:44+0100\n"
+"Last-Translator: Alessandro Briosi <ts...@br...>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: German\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-SearchPath-0: /home/alex/devel/php/openupload/trunk/templates/default\n"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:2
+msgid "Your IP has been blocked!"
+msgstr "Ihre IP wurde geblockt!"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:5
+msgid "You cannot use this site."
+msgstr "Sie dürfen diesen Dienst nicht nutzen."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:8
+msgid "If you think this is a misconfiguration please send an email to the site owner"
+msgstr "Wenn Sie Probleme mit unserem Dienst haben, senden Sie bitte eine E-Mail an den Websitebetreiber"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:11
+msgid "Captcha code"
+msgstr "Captcha code"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:14
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:20
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:32
+msgid "Reload Image"
+msgstr "Neues Captcha"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:17
+msgid "Please enter the following captcha to proceed for the removal"
+msgstr "Geben Sie bitte folgende Zeichenfolge (Captcha) ein um mit dem Entfernen fortzufahren"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:23
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:44
+msgid "Protection"
+msgstr "Schutz"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:26
+msgid "Captcha"
+msgstr "Captcha benutzen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:29
+msgid "Please enter the following captcha to proceed for the download"
+msgstr "Geben Sie bitte folgende Zeichenfolge (Captcha) ein, um zum Download zu gelangen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:35
+msgid "Use Captcha"
+msgstr "Captcha benutzen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:38
+msgid "Compress the files"
+msgstr "Dateien komprimieren"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:41
+msgid "No compression"
+msgstr "Keine Komprimierung"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:47
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:53
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:68
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:89
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:245
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:737
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:941
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:992
+msgid "Password"
+msgstr "Passwort"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:50
+msgid "The download is password protected."
+msgstr "Der Download ist mit einem Passwort geschützt."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:56
+msgid "Password protect"
+msgstr "Passwort-Schutz"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:59
+msgid "Send password in e-mail"
+msgstr "Passwort per E-Mail zuschicken"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:62
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:83
+msgid "You are receiving this message because someone uploaded a file on our OpenUpload server for you."
+msgstr "Auf unserem Dateiserver wurde eine Datei für Sie bereitgestellt."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:65
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:86
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:206
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:215
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:293
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:644
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:791
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:887
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:911
+msgid "Description"
+msgstr "Beschreibung"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:71
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:92
+msgid "User message"
+msgstr "Nachrichtentext"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:74
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:95
+msgid "To download the file open the following link in a browser"
+msgstr "Zum Download der bereitgestellten Datei öffnen Sie bitte folgenden Link in Ihrem Browser"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:77
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:98
+msgid "To remove the file from our server open the following link in a browser"
+msgstr "Zum Entfernen der bereitgestellten Datei von unserem Server öffnen Sie bitte folgenden Link in Ihrem Browser"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:80
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:101
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:968
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:983
+msgid "For complains please send an email to"
+msgstr "Bei Reklamationen senden sie bitte eine E-mail an"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:104
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:125
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:131
+msgid "Send me an e-mail"
+msgstr "Sende mir eine E-Mail"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:107
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:122
+msgid "Send"
+msgstr "Senden"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:110
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:134
+msgid "Send e-mail to"
+msgstr "Sende E-Mail an"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:113
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:137
+msgid "Send remove link"
+msgstr "Sende Entfernen Link"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:116
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:140
+msgid "e-mail Subject"
+msgstr "E-Mail Betreff"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:119
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:143
+msgid "e-mail Message"
+msgstr "E-Mail Nachricht"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:128
+msgid "Your e-mail address"
+msgstr "Ihre E-Mailadresse"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:146
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:149
+msgid "Expires on"
+msgstr "Läuft ab am"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:152
+msgid "Only the following mime types are allowed"
+msgstr "Nur die folgenden Dateitypen sind zugelassen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:155
+msgid "Are you sure you want to delete the selected plugins?"
+msgstr "Sind Sie sicher, dass Sie die gewählten Plugins entfernen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:158
+msgid "Are you sure you want to delete the selected plugin?"
+msgstr "Sind Sie sicher, dass Sie das gewählte Plugin entfernen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:161
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:275
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:767
+msgid "S"
+msgstr "S"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:164
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:302
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:323
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:437
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:827
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:905
+msgid "ID"
+msgstr "ID"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:167
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:179
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:290
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:497
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:623
+msgid "Plugin"
+msgstr "Plugin"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:170
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:182
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:257
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:317
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:347
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:554
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:626
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:707
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:728
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:749
+msgid "Group"
+msgstr "Gruppe"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:173
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:185
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:194
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:281
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:614
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:629
+msgid "Access"
+msgstr "Zugriff"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:176
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:287
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:314
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:350
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:563
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:647
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:785
+msgid "Actions"
+msgstr "Aktion"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:188
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:620
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:758
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:794
+msgid "Add"
+msgstr "Hinzufügen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:191
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:278
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:611
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:779
+msgid "IP"
+msgstr "IP"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:197
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:284
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:617
+msgid "Priority"
+msgstr "Priorität"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:200
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:209
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:266
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:320
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:341
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:455
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:632
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:731
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1061
+msgid "Confirm"
+msgstr "Übernehmen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:203
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:305
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:326
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:440
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:551
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:773
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:788
+msgid "Name"
+msgstr "Name"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:218
+msgid "Rights set?"
+msgstr "Rechte gesetzt?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:221
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:686
+msgid "Any"
+msgstr "Alle"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:224
+msgid "Yes"
+msgstr "Ja"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:227
+msgid "No"
+msgstr "Nein"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:230
+msgid "Plugins ACL"
+msgstr "ACL Plugins"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:233
+msgid "Plugins Options"
+msgstr "Plugin-Optionen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:236
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:566
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:653
+msgid "Settings"
+msgstr "Einstellungen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:239
+msgid "Options"
+msgstr "Optionen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:242
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:734
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:938
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1010
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1037
+msgid "Login name"
+msgstr "Benutzername"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:248
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:740
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:944
+msgid "Retype Password"
+msgstr "Passwort wiederholen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:251
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:743
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:947
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1013
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1040
+msgid "Full Name"
+msgstr "Vollständiger Name"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:254
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:746
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:950
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1016
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1043
+msgid "e-mail"
+msgstr "E-Mail-Adresse"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:260
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:752
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:953
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1046
+msgid "Preferred language"
+msgstr "Bevorzugte Sprache"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:263
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:311
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:338
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:452
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:560
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:755
+msgid "Active"
+msgstr "Aktiv"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:269
+msgid "Are you sure you want to delete the selected banned ips?"
+msgstr "Sind Sie sicher, dass Sie die gewählten IP-Sperren entfernen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:272
+msgid "Are you sure you want to delete the selected banned ip?"
+msgstr "Sind Sie sicher, dass Sie die gewählte IP-Sperre entfernen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:296
+msgid "Are you sure you want to delete the selected languages?"
+msgstr "Sind Sie sicher, dass Sie die gewählten Sprachen löschen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:299
+msgid "Are you sure you want to delete the selected language?"
+msgstr "Sind Sie sicher, dass Sie die gewählte Sprache löschen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:308
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:329
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:443
+msgid "Locale"
+msgstr "Locale"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:332
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:446
+msgid "Browser recon"
+msgstr "Browser recon"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:335
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:449
+msgid "Charset"
+msgstr "Zeichensatz"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:344
+msgid "Plugin does not have any option to be configured"
+msgstr "Plugin hat keine konfigurierbaren Optionen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:353
+msgid "Translation module"
+msgstr "Übersetzungsmodul"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:356
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:368
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:386
+msgid "Select one"
+msgstr "Wähle einen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:359
+msgid "Default language"
+msgstr "Standardsprache"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:362
+msgid "Authentication module"
+msgstr "Authentifikationsmodul"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:365
+msgid "(LDAP Configuration needs to be done<br /> by hand for now)"
+msgstr "(LDAP kann zur Zeit nur manuell<br />konfiguriert werden)"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:371
+msgid "Site title"
+msgstr "Website-Titel"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:374
+msgid "WebMaster E-mail"
+msgstr "Webmaster E-Mail"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:377
+msgid "Site E-mail"
+msgstr "Website E-Mail"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:380
+msgid "Confirm registration with e-mail"
+msgstr "Registrierung per E-Mail bestätigen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:383
+msgid "Template"
+msgstr "Vorlage"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:389
+msgid "Template Footer"
+msgstr "Vorlage für Fußzeile"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:392
+msgid "Maximum upload size (in MB)"
+msgstr "Maximale Dateigröße (MB)"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:395
+msgid "Maximum download time (in Min)"
+msgstr "Maximale Downloadzeit (in Min)"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:398
+msgid "0 disables it"
+msgstr "0 deaktiviert"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:401
+msgid "Max num. of file uploaded per upload"
+msgstr "Anzahl gleichzeitig hochladbarer Dateien"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:404
+msgid "Use shorter links?"
+msgstr "Kürzere Links nutzen?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:407
+msgid "Length of IDs (suggested min 6)"
+msgstr "Länge der IDs (mindestens 6 empfohlen)"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:410
+msgid "Use alphanumerical IDs?"
+msgstr "Alphnumerische IDs benutzen?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:413
+msgid "Allow unprotected file removal?"
+msgstr "Dateientfernung ohne Schutz zulassen?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:416
+msgid "Upload tracking method"
+msgstr "Uploadverfolgungs-Methode"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:419
+msgid "Enable activity logging?"
+msgstr "Protokollierung einschalten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:422
+msgid "Database logging level"
+msgstr "Loglevel Datenbank"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:425
+msgid "Syslog logging level"
+msgstr "Loglevel Syslog"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:428
+msgid "Save Changes"
+msgstr "Änderungen sichern"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:431
+msgid "Download config file"
+msgstr "Konfigurationsdatei herunterladen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:434
+msgid "This are the configured settings for a review"
+msgstr "Übersicht über die aktuellen Einstellungen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:458
+msgid "Filter"
+msgstr "Filter"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:461
+msgid "All"
+msgstr "Alle"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:464
+msgid "Errors"
+msgstr "Fehler"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:467
+msgid "Security"
+msgstr "Sicherheit"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:470
+msgid "Warnings"
+msgstr "Warnungen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:473
+msgid "Notice"
+msgstr "Hinweis"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:476
+msgid "Info"
+msgstr "Info"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:479
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:833
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:914
+msgid "Date"
+msgstr "Datum"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:482
+msgid "Type"
+msgstr "Typ"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:485
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:776
+msgid "User"
+msgstr "Benutzer"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:488
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:689
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:710
+msgid "Module"
+msgstr "Modul"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:491
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:692
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:713
+msgid "Action"
+msgstr "Aktion"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:494
+msgid "Real Action"
+msgstr "Tatsächliche Aktion"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:500
+msgid "Result"
+msgstr "Ergebnis"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:503
+msgid "Additional Info"
+msgstr "Zusätz. Info"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:506
+msgid "Maintenence"
+msgstr "Wartung"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:509
+msgid "This options let you delete files based on some options."
+msgstr "Hier stellen Sie die Kriterien für die Löschung von Dateien ein."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:512
+msgid "Please select one or more criteria for file deletion"
+msgstr "Bitte wählen Sie die Kriterien für das Datei-Löschen aus"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:515
+msgid "Delete files older than"
+msgstr "Lösche Dateien älter als"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:518
+msgid "days"
+msgstr "Tage"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:521
+msgid "Which user name is"
+msgstr "deren Benutzername entspricht"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:524
+msgid "Which upload day is"
+msgstr "Die hochegalden wurden am"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:527
+msgid "Which size is bigger than"
+msgstr "Die größer sind als"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:530
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:800
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:824
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:860
+msgid "Proceed"
+msgstr "Weiter"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:533
+msgid "Expiration plugin"
+msgstr "Ablauf Plugin"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:536
+msgid "To delete files marked as expired by the expire plugin press the \"Delete expired\" button."
+msgstr "Um abgelaufene Dateien zu löschen, klicken Sie auf den \"Lösche abgelaufene\" Button."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:539
+msgid "Delete expired"
+msgstr "Lösche abgelaufene"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:542
+msgid "Are you sure you want to delete the selected users?"
+msgstr "Sind Sie sicher, dass Sie die gewählten Nutzer löschen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:545
+msgid "Are you sure you want to delete the selected user?"
+msgstr "Sind Sie sicher, dass Sie den gewählten Nutzer löschen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:548
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:995
+msgid "Login"
+msgstr "Anmelden"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:557
+msgid "E-mail"
+msgstr "E-Mail"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:569
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:656
+msgid "Plugins"
+msgstr "Plugins"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:572
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:659
+msgid "Files"
+msgstr "Dateien"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:575
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:662
+msgid "Users"
+msgstr "Benutzer"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:578
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:665
+msgid "Groups"
+msgstr "Gruppen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:581
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:668
+msgid "Rights"
+msgstr "Rechte"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:584
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:671
+msgid "Languages"
+msgstr "Sprachen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:587
+msgid "Banned"
+msgstr "Geblockt"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:590
+msgid "Logs"
+msgstr "Protokolle"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:593
+msgid "Deletion Result"
+msgstr "Löschergebnis"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:596
+msgid "The following files have been deleted."
+msgstr "Folgenden Dateien wurden gelöscht"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:599
+msgid "The following files will be deleted, proceed?"
+msgstr "Folgende Dateien werden gelöscht - fortfahren?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:602
+msgid "Yes, delete all"
+msgstr "Ja, alle löschen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:605
+msgid "No files matched the criteria"
+msgstr "Keine passenden Dateien gefunden"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:608
+msgid "Back to Maintenance"
+msgstr "Zurück zur Wartung"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:635
+msgid "Are you sure you want to delete the selected groups?"
+msgstr "Sind Sie sicher, dass Sie die gewählten Gruppen löschen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:638
+msgid "Are you sure you want to delete the selected group?"
+msgstr "Sind Sie sicher, dass Sie die gewählte Gruppe löschen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:641
+msgid "Group Name"
+msgstr "Gruppenname"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:650
+msgid "Here you can administer"
+msgstr "Administrative Einstellungen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:674
+msgid "Banned IPs"
+msgstr "Geblockte IPs"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:677
+msgid "Logs / Statistics"
+msgstr "Protokolle / Statistiken"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:680
+msgid "PLEASE BE CAREFULL WHEN MODIFING THE RIGHTS!"
+msgstr "BITTE SEIEN SIE BEIM ÄNDERN der RECHTE VORSICHTIG!"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:683
+msgid "Editing rights for group"
+msgstr "Ändern von Gruppenrechten"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:695
+msgid "Right"
+msgstr "Rechte"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:698
+msgid "Resulting ACL"
+msgstr "Resultierende ACL"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:701
+msgid "From ACL"
+msgstr "Von ACL"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:704
+msgid "default"
+msgstr "Standard"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:716
+msgid "<< Back"
+msgstr "<< Zurück"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:719
+msgid "Apply changes"
+msgstr "Änderungen übernehmen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:722
+msgid "Files List"
+msgstr "Dateiliste"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:725
+msgid "Maintenance"
+msgstr "Wartung"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:761
+msgid "Are you sure you want to delete the selected files?"
+msgstr "Sind Sie sicher, dass Sie die gewählten Dateien löschen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:764
+msgid "Are you sure you want to delete the selected file?"
+msgstr "Sind Sie sicher, dass Sie die gewählte Datei löschen möchten?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:770
+msgid "Id"
+msgstr "ID"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:782
+msgid "Upload Date"
+msgstr "Upload Datum"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:797
+msgid "The file you requested the removal needs some input before you can proceed"
+msgstr "Vor dem Löschen der Datei müssen Sie die geforderten Felder ausfüllen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:803
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:842
+msgid "Download link"
+msgstr "Download Link"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:806
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:845
+msgid "Remove link"
+msgstr "Entfernen Link"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:809
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:902
+msgid "Upload a new file"
+msgstr "Einen neue Datei hochladen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:812
+msgid "Uploading"
+msgstr "Hochladen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:815
+msgid "please wait ..."
+msgstr "Bitte warten ..."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:818
+msgid "Please enter the File Information requested"
+msgstr "Bitte vervolständigen Sie die Datei-Infos"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:821
+msgid "File code"
+msgstr "Dateicode"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:830
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:866
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:896
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:923
+msgid "File description"
+msgstr "Dateibeschreibung"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:836
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:872
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:881
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:908
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:926
+msgid "File name"
+msgstr "Dateiname"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:839
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:875
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:884
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:917
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:929
+msgid "File size"
+msgstr "Dateigröße"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:848
+msgid "Select the file to be uploaded"
+msgstr "Wählen Sie die hochzuladenden Dateien"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:851
+msgid "Maximum allowed upload size"
+msgstr "Maximal zulässige Dateigröße"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:854
+msgid "Upload"
+msgstr "Upload"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:857
+msgid "The file you requested the download needs some input before you can proceed"
+msgstr "Vor dem Herunterladen der Datei müssen Sie die geforderten Felder ausfüllen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:863
+msgid "You can now proceed downloading the file"
+msgstr "Sie können jetzt mit dem Datei-Download fortfahren"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:869
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:899
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:932
+msgid "Uploaded on"
+msgstr "Hochgeladen am"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:878
+msgid "Download file"
+msgstr "Download Datei"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:890
+msgid "Complete upload"
+msgstr "Vollständiger Upload"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:893
+msgid "FILE HAS BEEN SUCCESSFULLY REMOVED"
+msgstr "DIE DATEI WURDE ERFOLGREICH GELÖSCHT"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:920
+msgid "You requested to remove the following file"
+msgstr "Sie haben die Entfernung der folgenden Datei angefordert"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:935
+msgid "Confirm removal"
+msgstr "Bestätigen Sie die Löschung"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:956
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:971
+msgid "Dear "
+msgstr "Hallo"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:959
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:974
+msgid "This e-mail message is sent to you to confirm your account registration has a valid e-mail address."
+msgstr "Diese E-Mail stellt sicher, dass Sie für die Registrierung eine gültige E-Mail Adresse angegeben haben."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:962
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:977
+msgid "Open the following link in a browser to confirm your account."
+msgstr "Zum Abschluss der Registrierung öffnen Sie bitte den folgenden Link in Ihrem Browser."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:965
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:980
+msgid "Best regards"
+msgstr "Mit freundlichen Grüßen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:986
+msgid "User login"
+msgstr "Anmeldung"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:989
+msgid "User name"
+msgstr "Benutzername"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:998
+msgid "You don't have an account?"
+msgstr "Sie haben kein Konto?"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1001
+msgid "Register here"
+msgstr "Registrieren Sie sich hier"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1004
+msgid "or you can"
+msgstr "oder Sie können sich"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1007
+msgid "Login here"
+msgstr "hier Anmelden"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1019
+msgid "Language"
+msgstr "Bevorzugte Sprache"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1022
+msgid "Change"
+msgstr "Ändern"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1025
+msgid "Registration succeeded"
+msgstr "Registrierung erfolgreich"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1028
+msgid "An e-mail has been sent for the account activation"
+msgstr "Zur Aktivierung Ihres Konto wurde Ihnen eine E-Mail gesendet."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1031
+msgid "Please follow the e-mail instructions to activate your account."
+msgstr "Bitte folgen Sie den Anweisungen in der E-Mail um Ihr Konto zu aktivieren."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1034
+msgid "back to home"
+msgstr "Zurück zur Start-Seite"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1049
+msgid "Old password"
+msgstr "Altes Passwort"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1052
+msgid "New password"
+msgstr "Neues Passwort"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1055
+msgid "Retype password"
+msgstr "Neues Passwort wiederholen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1058
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1064
+msgid "Your account registration has been confirmed."
+msgstr "Die Registrierung ist abgeschlossen."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1067
+msgid "You can now proceed with the login"
+msgstr "Nun können Sie sich anmelden."
+
+#: /home/alex/devel/php/openupload/trunk/templates/default/default.c:1070
+msgid "here"
+msgstr "hier"
+
+#~ msgid "Additional file upload"
+#~ msgstr "File aggiuntivo"
+#~ msgid "File ID"
+#~ msgstr "ID File"
+
Added: trunk/templates/classic/locale/de/index.html
===================================================================
--- trunk/templates/classic/locale/de/index.html (rev 0)
+++ trunk/templates/classic/locale/de/index.html 2009-11-07 23:47:29 UTC (rev 362)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/classic/locale/de.inc.php
===================================================================
--- trunk/templates/classic/locale/de.inc.php (rev 0)
+++ trunk/templates/classic/locale/de.inc.php 2009-11-07 23:47:29 UTC (rev 362)
@@ -0,0 +1,204 @@
+<?php
+$tr["Your IP has been blocked!"] = "Ihre IP wurde geblockt!";
+$tr["You cannot use this site."] = "Sie dürfen diesen Dienst nicht nutzen.";
+$tr["If you think this is a misconfiguration please send an email to the site owner"] = "Wenn Sie Probleme mit unserem Dienst haben, senden Sie bitte eine E-Mail an den Websitebetreiber";
+$tr["Captcha code"] = "Captcha code";
+$tr["Reload Image"] = "Neues Captcha";
+$tr["Please enter the following captcha to proceed for the removal"] = "Geben Sie bitte folgende Zeichenfolge (Captcha) ein um mit dem Entfernen fortzufahren";
+$tr["Protection"] = "Schutz";
+$tr["Captcha"] = "Captcha benutzen";
+$tr["Please enter the following captcha to proceed for the download"] = "Geben Sie bitte folgende Zeichenfolge (Captcha) ein, um zum Download zu gelangen";
+$tr["Use Captcha"] = "Captcha benutzen";
+$tr["Compress the files"] = "Dateien komprimieren";
+$tr["No compression"] = "Keine Komprimierung";
+$tr["Password"] = "Passwort";
+$tr["The download is password protected."] = "Der Download ist mit einem Passwort geschützt.";
+$tr["Password protect"] = "Passwort-Schutz";
+$tr["Send password in e-mail"] = "Passwort per E-Mail zuschicken";
+$tr["You are receiving this message because someone uploaded a file on our OpenUpload server for you."] = "Auf unserem Dateiserver wurde eine Datei für Sie bereitgestellt.";
+$tr["Description"] = "Beschreibung";
+$tr["User message"] = "Nachrichtentext";
+$tr["To download the file open the following link in a browser"] = "Zum Download der bereitgestellten Datei öffnen Sie bitte folgenden Link in Ihrem Browser";
+$tr["To remove the file from our server open the following link in a browser"] = "Zum Entfernen der bereitgestellten Datei von unserem Server öffnen Sie bitte folgenden Link in Ihrem Browser";
+$tr["For complains please send an email to"] = "Bei Reklamationen senden sie bitte eine E-mail an";
+$tr["Send me an e-mail"] = "Sende mir eine E-Mail";
+$tr["Send"] = "Senden";
+$tr["Send e-mail to"] = "Sende E-Mail an";
+$tr["Send remove link"] = "Sende Entfernen Link";
+$tr["e-mail Subject"] = "E-Mail Betreff";
+$tr["e-mail Message"] = "E-Mail Nachricht";
+$tr["Your e-mail address"] = "Ihre E-Mailadresse";
+$tr["Expires on"] = "Läuft ab am";
+$tr["Only the following mime types are allowed"] = "Nur die folgenden Dateitypen sind zugelassen";
+$tr["Are you sure you want to delete the selected plugins?"] = "Sind Sie sicher, dass Sie die gewählten Plugins entfernen möchten?";
+$tr["Are you sure you want to delete the selected plugin?"] = "Sind Sie sicher, dass Sie das gewählte Plugin entfernen möchten?";
+$tr["S"] = "S";
+$tr["ID"] = "ID";
+$tr["Plugin"] = "Plugin";
+$tr["Group"] = "Gruppe";
+$tr["Access"] = "Zugriff";
+$tr["Actions"] = "Aktion";
+$tr["Add"] = "Hinzufügen";
+$tr["IP"] = "IP";
+$tr["Priority"] = "Priorität";
+$tr["Confirm"] = "Übernehmen";
+$tr["Name"] = "Name";
+$tr["Rights set?"] = "Rechte gesetzt?";
+$tr["Any"] = "Alle";
+$tr["Yes"] = "Ja";
+$tr["No"] = "Nein";
+$tr["Plugins ACL"] = "ACL Plugins";
+$tr["Plugins Options"] = "Plugin-Optionen";
+$tr["Settings"] = "Einstellungen";
+$tr["Options"] = "Optionen";
+$tr["Login name"] = "Benutzername";
+$tr["Retype Password"] = "Passwort wiederholen";
+$tr["Full Name"] = "Vollständiger Name";
+$tr["e-mail"] = "E-Mail-Adresse";
+$tr["Preferred language"] = "Bevorzugte Sprache";
+$tr["Active"] = "Aktiv";
+$tr["Are you sure you want to delete the selected banned ips?"] = "Sind Sie sicher, dass Sie die gewählten IP-Sperren entfernen möchten?";
+$tr["Are you sure you want to delete the selected banned ip?"] = "Sind Sie sicher, dass Sie die gewählte IP-Sperre entfernen möchten?";
+$tr["Are you sure you want to delete the selected languages?"] = "Sind Sie sicher, dass Sie die gewählten Sprachen löschen möchten?";
+$tr["Are you sure you want to delete the selected language?"] = "Sind Sie sicher, dass Sie die gewählte Sprache löschen möchten?";
+$tr["Locale"] = "Locale";
+$tr["Browser recon"] = "Browser recon";
+$tr["Charset"] = "Zeichensatz";
+$tr["Plugin does not have any option to be configured"] = "Plugin hat keine konfigurierbaren Optionen";
+$tr["Translation module"] = "Übersetzungsmodul";
+$tr["Select one"] = "Wähle einen";
+$tr["Default language"] = "Standardsprache";
+$tr["Authentication module"] = "Authentifikationsmodul";
+$tr["(LDAP Configuration needs to be done<br /> by hand for now)"] = "(LDAP kann zur Zeit nur manuell<br />konfiguriert werden)";
+$tr["Site title"] = "Website-Titel";
+$tr["WebMaster E-mail"] = "Webmaster E-Mail";
+$tr["Site E-mail"] = "Website E-Mail";
+$tr["Confirm registration with e-mail"] = "Registrierung per E-Mail bestätigen";
+$tr["Template"] = "Vorlage";
+$tr["Template Footer"] = "Vorlage für Fußzeile";
+$tr["Maximum upload size (in MB)"] = "Maximale Dateigröße (MB)";
+$tr["Maximum download time (in Min)"] = "Maximale Downloadzeit (in Min)";
+$tr["0 disables it"] = "0 deaktiviert";
+$tr["Max num. of file uploaded per upload"] = "Anzahl gleichzeitig hochladbarer Dateien";
+$tr["Use shorter links?"] = "Kürzere Links nutzen?";
+$tr["Length of IDs (suggested min 6)"] = "Länge der IDs (mindestens 6 empfohlen)";
+$tr["Use alphanumerical IDs?"] = "Alphnumerische IDs benutzen?";
+$tr["Allow unprotected file removal?"] = "Dateientfernung ohne Schutz zulassen?";
+$tr["Upload tracking method"] = "Uploadverfolgungs-Methode";
+$tr["Enable activity logging?"] = "Protokollierung einschalten?";
+$tr["Database logging level"] = "Loglevel Datenbank";
+$tr["Syslog logging level"] = "Loglevel Syslog";
+$tr["Save Changes"] = "Änderungen sichern";
+$tr["Download config file"] = "Konfigurationsdatei herunterladen";
+$tr["This are the configured settings for a review"] = "Übersicht über die aktuellen Einstellungen";
+$tr["Filter"] = "Filter";
+$tr["All"] = "Alle";
+$tr["Errors"] = "Fehler";
+$tr["Security"] = "Sicherheit";
+$tr["Warnings"] = "Warnungen";
+$tr["Notice"] = "Hinweis";
+$tr["Info"] = "Info";
+$tr["Date"] = "Datum";
+$tr["Type"] = "Typ";
+$tr["User"] = "Benutzer";
+$tr["Module"] = "Modul";
+$tr["Action"] = "Aktion";
+$tr["Real Action"] = "Tatsächliche Aktion";
+$tr["Result"] = "Ergebnis";
+$tr["Additional Info"] = "Zusätz. Info";
+$tr["Maintenence"] = "Wartung";
+$tr["This options let you delete files based on some options."] = "Hier stellen Sie die Kriterien für die Löschung von Dateien ein.";
+$tr["Please select one or more criteria for file deletion"] = "Bitte wählen Sie die Kriterien für das Datei-Löschen aus";
+$tr["Delete files older than"] = "Lösche Dateien älter als";
+$tr["days"] = "Tage";
+$tr["Which user name is"] = "deren Benutzername entspricht";
+$tr["Which upload day is"] = "Die hochegalden wurden am";
+$tr["Which size is bigger than"] = "Die größer sind als";
+$tr["Proceed"] = "Weiter";
+$tr["Expiration plugin"] = "Ablauf Plugin";
+$tr["To delete files marked as expired by the expire plugin press the \"Delete expired\" button."] = "Um abgelaufene Dateien zu löschen, klicken Sie auf den \"Lösche abgelaufene\" Button.";
+$tr["Delete expired"] = "Lösche abgelaufene";
+$tr["Are you sure you want to delete the selected users?"] = "Sind Sie sicher, dass Sie die gewählten Nutzer löschen möchten?";
+$tr["Are you sure you want to delete the selected user?"] = "Sind Sie sicher, dass Sie den gewählten Nutzer löschen möchten?";
+$tr["Login"] = "Anmelden";
+$tr["E-mail"] = "E-Mail";
+$tr["Plugins"] = "Plugins";
+$tr["Files"] = "Dateien";
+$tr["Users"] = "Benutzer";
+$tr["Groups"] = "Gruppen";
+$tr["Rights"] = "Rechte";
+$tr["Languages"] = "Sprachen";
+$tr["Banned"] = "Geblockt";
+$tr["Logs"] = "Protokolle";
+$tr["Deletion Result"] = "Löschergebnis";
+$tr["The following files have been deleted."] = "Folgenden Dateien wurden gelöscht";
+$tr["The following files will be deleted, proceed?"] = "Folgende Dateien werden gelöscht - fortfahren?";
+$tr["Yes, delete all"] = "Ja, alle löschen";
+$tr["No files matched the criteria"] = "Keine passenden Dateien gefunden";
+$tr["Back to Maintenance"] = "Zurück zur Wartung";
+$tr["Are you sure you want to delete the selected groups?"] = "Sind Sie sicher, dass Sie die gewählten Gruppen löschen möchten?";
+$tr["Are you sure you want to delete the selected group?"] = "Sind Sie sicher, dass Sie die gewählte Gruppe löschen möchten?";
+$tr["Group Name"] = "Gruppenname";
+$tr["Here you can administer"] = "Administrative Einstellungen";
+$tr["Banned IPs"] = "Geblockte IPs";
+$tr["Logs / Statistics"] = "Protokolle / Statistiken";
+$tr["PLEASE BE CAREFULL WHEN MODIFING THE RIGHTS!"] = "BITTE SEIEN SIE BEIM ÄNDERN der RECHTE VORSICHTIG!";
+$tr["Editing rights for group"] = "Ändern von Gruppenrechten";
+$tr["Right"] = "Rechte";
+$tr["Resulting ACL"] = "Resultierende ACL";
+$tr["From ACL"] = "Von ACL";
+$tr["default"] = "Standard";
+$tr["<< Back"] = "<< Zurück";
+$tr["Apply changes"] = "Änderungen übernehmen";
+$tr["Files List"] = "Dateiliste";
+$tr["Maintenance"] = "Wartung";
+$tr["Are you sure you want to delete the selected files?"] = "Sind Sie sicher, dass Sie die gewählten Dateien löschen möchten?";
+$tr["Are you sure you want to delete the selected file?"] = "Sind Sie sicher, dass Sie die gewählte Datei löschen möchten?";
+$tr["Id"] = "ID";
+$tr["Upload Date"] = "Upload Datum";
+$tr["The file you requested the removal needs some input before you can proceed"] = "Vor dem Löschen der Datei müssen Sie die geforderten Felder ausfüllen";
+$tr["Download link"] = "Download Link";
+$tr["Remove link"] = "Entfernen Link";
+$tr["Upload a new file"] = "Einen neue Datei hochladen";
+$tr["Uploading"] = "Hochladen";
+$tr["please wait ..."] = "Bitte warten ...";
+$tr["Please enter the File Information requested"] = "Bitte vervolständigen Sie die Datei-Infos";
+$tr["File code"] = "Dateicode";
+$tr["File description"] = "Dateibeschreibung";
+$tr["File name"] = "Dateiname";
+$tr["File size"] = "Dateigröße";
+$tr["Select the file to be uploaded"] = "Wählen Sie die hochzuladenden Dateien";
+$tr["Maximum allowed upload size"] = "Maximal zulässige Dateigröße";
+$tr["Upload"] = "Upload";
+$tr["The file you requested the download needs some input before you can proceed"] = "Vor dem Herunterladen der Datei müssen Sie die geforderten Felder ausfüllen";
+$tr["You can now proceed downloading the file"] = "Sie können jetzt mit dem Datei-Download fortfahren";
+$tr["Uploaded on"] = "Hochgeladen am";
+$tr["Download file"] = "Download Datei";
+$tr["Complete upload"] = "Vollständiger Upload";
+$tr["FILE HAS BEEN SUCCESSFULLY REMOVED"] = "DIE DATEI WURDE ERFOLGREICH GELÖSCHT";
+$tr["You requested to remove the following file"] = "Sie haben die Entfernung der folgenden Datei angefordert";
+$tr["Confirm removal"] = "Bestätigen Sie die Löschung";
+$tr["Dear "] = "Hallo";
+$tr["This e-mail message is sent to you to confirm your account registration has a valid e-mail address."] = "Diese E-Mail stellt sicher, dass Sie für die Registrierung eine gültige E-Mail Adresse angegeben haben.";
+$tr["Open...
[truncated message content] |
|
From: <ts...@us...> - 2009-11-07 23:43:05
|
Revision: 361
http://openupload.svn.sourceforge.net/openupload/?rev=361&view=rev
Author: tsdogs
Date: 2009-11-07 23:42:52 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
re-add classic template
Added Paths:
-----------
trunk/templates/classic/
trunk/templates/classic/banned.tpl
trunk/templates/classic/index.html
trunk/templates/classic/index.tpl
trunk/templates/classic/locale/
trunk/templates/classic/modules/
trunk/templates/classic/plugins/
Added: trunk/templates/classic/banned.tpl
===================================================================
--- trunk/templates/classic/banned.tpl (rev 0)
+++ trunk/templates/classic/banned.tpl 2009-11-07 23:42:52 UTC (rev 361)
@@ -0,0 +1,3 @@
+{tr}Your IP has been blocked!{/tr}<br />
+{tr}You cannot use this site.{/tr}<br />
+{tr}If you think this is a misconfiguration please send an email to the site owner{/tr}
\ No newline at end of file
Added: trunk/templates/classic/index.html
===================================================================
--- trunk/templates/classic/index.html (rev 0)
+++ trunk/templates/classic/index.html 2009-11-07 23:42:52 UTC (rev 361)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/classic/index.tpl
===================================================================
--- trunk/templates/classic/index.tpl (rev 0)
+++ trunk/templates/classic/index.tpl 2009-11-07 23:42:52 UTC (rev 361)
@@ -0,0 +1,51 @@
+<html>
+<head>
+<title>{$site.title} - {tr}{$page.title}{/tr}</title>
+<meta http-equiv="Content-Type" content="text/html; charset={$charset}">
+<link rel="SHORTCUT ICON" href="{tpl file=img/openupload.ico}">
+<link rel="stylesheet" type="text/css" href="{tpl file=/main.css}">
+<script language="javascript" type="text/javascript" src="{tpl file=/js/prototype.js}"></script>
+</head>
+<body>
+<!-- header -->
+<div id="header">
+<div id="logo"><img src="{tpl file=/img/openupload.jpg}" border="0"></div>
+<div id="langs">
+{if count($langs)>1}
+<ul>
+{foreach from=$langs item=l name=c}
+<li {if $smarty.foreach.c.last} style="border: 0px"{/if}><a href="{$script}?lang={$l.id}&action={$action}&step={$step}">{$l.name}</a></li>
+{/foreach}
+</ul>
+{/if}
+</div>
+<div id="userinfo">
+{$user.name}
+</div>
+<div id="title">{tr}{$page.title}{/tr}</div>
+<div id="menu">
+<ul>
+{foreach from=$menu item=m key=k name=c}
+<li {if $smarty.foreach.c.last} style="border: 0px"{/if}><a href="{$script}?action={$k}">{$m}</a></li>
+{/foreach}
+</ul>
+</div> <!-- menu end -->
+</div> <!-- header end -->
+<!-- menu -->
+<!-- content -->
+<div id="wrapper"><br />
+{foreach from=$user.messages item=m}
+<div id="message">{$m}</div>
+{/foreach}
+{foreach from=$user.errors item=e}
+<div id="error">{$e}</div>
+{/foreach}
+<div id="content" align="center">
+{$page.content}
+</div> <!-- content end -->
+</div> <!-- wrapper -->
+<br /> <br />
+<!-- footer -->
+<div id="footer">{$site.footer}</div>
+</body>
+</html>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 23:38:42
|
Revision: 360
http://openupload.svn.sourceforge.net/openupload/?rev=360&view=rev
Author: tsdogs
Date: 2009-11-07 23:38:35 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
remove cause of conflicts in svn, will restore later
Removed Paths:
-------------
trunk/templates/classic/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 23:00:23
|
Revision: 359
http://openupload.svn.sourceforge.net/openupload/?rev=359&view=rev
Author: tsdogs
Date: 2009-11-07 23:00:12 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
index.html added
Added Paths:
-----------
trunk/templates/classic/
trunk/templates/classic/index.html
trunk/templates/classic/locale/index.html
Copied: trunk/templates/classic/index.html (from rev 357, trunk/templates/default/index.html)
===================================================================
--- trunk/templates/classic/index.html (rev 0)
+++ trunk/templates/classic/index.html 2009-11-07 23:00:12 UTC (rev 359)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/classic/locale/index.html
===================================================================
--- trunk/templates/classic/locale/index.html (rev 0)
+++ trunk/templates/classic/locale/index.html 2009-11-07 23:00:12 UTC (rev 359)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 22:59:31
|
Revision: 358
http://openupload.svn.sourceforge.net/openupload/?rev=358&view=rev
Author: tsdogs
Date: 2009-11-07 22:59:21 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
rename default theme to classic
Removed Paths:
-------------
trunk/templates/default/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 22:48:09
|
Revision: 357
http://openupload.svn.sourceforge.net/openupload/?rev=357&view=rev
Author: tsdogs
Date: 2009-11-07 22:48:01 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
new smarty plugins for new version
Added Paths:
-----------
trunk/lib/smarty_plugins/block.message.php
trunk/lib/smarty_plugins/block.tab.php
Added: trunk/lib/smarty_plugins/block.message.php
===================================================================
--- trunk/lib/smarty_plugins/block.message.php (rev 0)
+++ trunk/lib/smarty_plugins/block.message.php 2009-11-07 22:48:01 UTC (rev 357)
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Smarty plugin
+ * @package OpenUpload
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {message} block plugin
+ *
+ * Type: block
+ * Name: message
+ * Purpose: Add a global message to the user
+ * @author Alessandro Briosi
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses app()->message
+ */
+
+function smarty_block_message($params, $content = null, &$smarty, &$repeat) {
+
+ if(!$repeat){
+ if (isset($content)) {
+ app()->message($content);
+ }
+ }
+ return '';
+}
\ No newline at end of file
Added: trunk/lib/smarty_plugins/block.tab.php
===================================================================
--- trunk/lib/smarty_plugins/block.tab.php (rev 0)
+++ trunk/lib/smarty_plugins/block.tab.php 2009-11-07 22:48:01 UTC (rev 357)
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Smarty plugin
+ * @package OpenUpload
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty {tab} block plugin
+ *
+ * Type: block
+ * Name: tab
+ * Purpose: Display the content within a tab element
+ * @author Alessandro Briosi
+ * @param array
+ * @param Smarty
+ * @return string
+ * @uses app->tab();
+ */
+
+function smarty_block_tab($params, $content = null, &$smarty, &$repeat) {
+
+ if(!$repeat){
+ if (isset($content)) {
+ $name = 'default';
+ $priority = 999;
+ if (isset($params['name']))
+ $name = $params['name'];
+ if (isset($params['priority']))
+ $priority = $params['priority'];
+ app()->tab($content, $name, $priority);
+ }
+ }
+ return '';
+}
+
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 22:47:38
|
Revision: 356
http://openupload.svn.sourceforge.net/openupload/?rev=356&view=rev
Author: tsdogs
Date: 2009-11-07 22:47:23 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
remove comment
Modified Paths:
--------------
trunk/lib/smarty_plugins/block.tr.php
Modified: trunk/lib/smarty_plugins/block.tr.php
===================================================================
--- trunk/lib/smarty_plugins/block.tr.php 2009-11-07 22:46:58 UTC (rev 355)
+++ trunk/lib/smarty_plugins/block.tr.php 2009-11-07 22:47:23 UTC (rev 356)
@@ -23,7 +23,6 @@
if(!$repeat){
if (isset($content)) {
-// return htmlentities(translate($content,'template',$params));
return translate($content, 'template',$params);
} else {
return '';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 22:47:05
|
Revision: 355
http://openupload.svn.sourceforge.net/openupload/?rev=355&view=rev
Author: tsdogs
Date: 2009-11-07 22:46:58 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
change plugins for uses in new version
Modified Paths:
--------------
trunk/lib/classes.inc.php
Modified: trunk/lib/classes.inc.php
===================================================================
--- trunk/lib/classes.inc.php 2009-11-07 22:46:21 UTC (rev 354)
+++ trunk/lib/classes.inc.php 2009-11-07 22:46:58 UTC (rev 355)
@@ -3,7 +3,10 @@
class translatorBase {
function translatorBase() {}
- function init() {}
+ function init() {
+ global $_SESSION;
+ setlocale(LC_ALL,$_SESSION['user']['locale']);
+ }
function translate($txt) {
return $txt;
@@ -124,6 +127,7 @@
var $fields = array();
var $options = array();
var $config = array();
+ var $category = 'general';
function OpenUploadPlugin() {
}
@@ -136,6 +140,10 @@
$this->pluginHTML .= app()->fetch('plugins/'.$this->name.'/'.$tpl);
}
+ function fetch($tpl) {
+ return app()->fetch('plugins/'.$this->name.'/'.$tpl);
+ }
+
function loadConfig() {
if (count($this->options)>0) {
$opt = app()->db->read('plugin_options',array('plugin' => $this->name),array(),'',array('name','group_name'));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 22:46:28
|
Revision: 354
http://openupload.svn.sourceforge.net/openupload/?rev=354&view=rev
Author: tsdogs
Date: 2009-11-07 22:46:21 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
OUSESSION name
couple of new useful functions
Modified Paths:
--------------
trunk/lib/general.inc.php
Modified: trunk/lib/general.inc.php
===================================================================
--- trunk/lib/general.inc.php 2009-11-07 22:45:26 UTC (rev 353)
+++ trunk/lib/general.inc.php 2009-11-07 22:46:21 UTC (rev 354)
@@ -2,6 +2,8 @@
/* Main library containing the general code for the application */
ob_start();
+/* so it should only affect open upload */
+session_name('OUSESSION');
session_start();
if (isset($CONFIG['SMARTY_DIR']))
@@ -9,6 +11,7 @@
else
define('SMARTY_DIR', $CONFIG['INSTALL_ROOT'].'/lib/smarty/');
require(SMARTY_DIR . 'Smarty.class.php');
+require_once($CONFIG['INSTALL_ROOT'].'/lib/base.inc.php');
require_once($CONFIG['INSTALL_ROOT'].'/lib/classes.inc.php');
require_once($CONFIG['INSTALL_ROOT'].'/lib/user.inc.php');
require_once($CONFIG['INSTALL_ROOT'].'/lib/main.inc.php');
@@ -60,7 +63,6 @@
for ($i = 0; $i<$rmax; $i++) {
if ($alpha) {
$x = rand(0,58);
- echo $x;
if ($x<25) {
$x = chr(ord('a') + $x);
} else if ($x < 35 ) {
@@ -68,7 +70,6 @@
} else {
$x = chr(ord('A') + ($x - 35));
}
- echo '='.$x.'<br>';
$result .= $x;
} else {
$result.= rand(0,9);
@@ -269,7 +270,45 @@
return mail($to,$subject,$msg,$header,'-f "'.$from.'"');
}
+/* from php manual page */
+function return_bytes($val) {
+ $val = trim($val);
+ $last = strtolower($val[strlen($val)-1]);
+ switch($last) {
+ // The 'G' modifier is available since PHP 5.1.0
+ case 'g':
+ $val *= 1024;
+ case 'm':
+ $val *= 1024;
+ case 'k':
+ $val *= 1024;
+ }
+ return $val;
+}
+/* tries to use all available methods to determine a file mime type */
+function get_mime_type($file,$type) {
+ global $CONFIG;
+ $mime = $type;
+ if (function_exists('finfo_open')) {
+ if ($CONFIG['mime_magic_file']!='')
+ $finfo = finfo_open(FILEINFO_MIME, $CONFIG['mime_magic_file']);
+ else
+ $finfo = finfo_open(FILEINFO_MIME);
+ $mime = finfo_file($finfo,$file);
+ if (strpos($mime,';')) { /* remove the charset */
+ $mime = substr($mime,0,strpos($mime,';'));
+ }
+ if (strpos($mime,' ')) { /* remove the charset */
+ $mime = substr($mime,0,strpos($mime,' '));
+ }
+ finfo_close($finfo);
+ } else if (function_exists('mime_content_type')) {
+ $mime = mime_content_type($file);
+ } else { /* TODO: try to do it internally ??? */
+ }
+ return $mime;
+}
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 22:45:34
|
Revision: 353
http://openupload.svn.sourceforge.net/openupload/?rev=353&view=rev
Author: tsdogs
Date: 2009-11-07 22:45:26 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
split base from main application
Modified Paths:
--------------
trunk/lib/main.inc.php
Added Paths:
-----------
trunk/lib/base.inc.php
Added: trunk/lib/base.inc.php
===================================================================
--- trunk/lib/base.inc.php (rev 0)
+++ trunk/lib/base.inc.php 2009-11-07 22:45:26 UTC (rev 353)
@@ -0,0 +1,366 @@
+<?php
+
+/* Base application */
+class baseApplication
+{
+ var $config; /* condifuration */
+ var $modules; /* modules */
+ var $actions; /* actions related to modules */
+ var $page; /* page global config */
+ var $langs; /* contains the languages list */
+ var $acl; /* module acl */
+ var $tr; /* trasnlation */
+ var $name; /* application name */
+
+ function baseApplication($CONFIG) {
+ global $application;
+ global $_GET;
+
+ $application = $this;
+ $this->config = $CONFIG;
+
+ /* initialize template engine */
+ $this->tpl = new Smarty();
+ if (isset($this->config['TEMPLATES_PATH']))
+ $this->tpl->template_dir = $this->config['TEMPLATES_PATH'];
+ else
+ $this->tpl->template_dir = $this->config['INSTALL_ROOT'].'/templates';
+ if (isset($this->config['SMARTY_DATA'])) {
+ $this->tpl->compile_dir = $this->config['SMARTY_DATA'].'/templates_c/';
+ $this->tpl->cache_dir = $this->config['SMARTY_DATA'].'/cache';
+ } else {
+ $this->tpl->compile_dir = $this->config['DATA_PATH'].'/templates_c/';
+ $this->tpl->cache_dir = $this->config['DATA_PATH'].'/cache';
+ }
+ $this->tpl->config_dir = SMARTY_DIR.'/configs';
+ $this->tpl->plugins_dir[] = $this->config['INSTALL_ROOT'].'/lib/smarty_plugins';
+ $this->tpl->caching = $this->config['site']['caching'];
+
+ $this->page['template'] = $this->config['WWW_ROOT'].'/templates/'.$this->config['site']['template'];
+ $this->tpl->assign('template',$this->config['site']['template']);
+
+ /* database module */
+ $dbtype = $this->config['database']['type'];
+ require_once($this->config['INSTALL_ROOT'].'/lib/modules/db/'.$dbtype.'.inc.php');
+ $dbmname = $dbtype.'DB';
+ $this->db = new $dbmname($this->config['database']);
+ $this->db->init(); /* open db connection */
+
+ /* authentication module */
+ if (isset($this->config['auth'])) {
+ $authmname = $this->config['auth'];
+ } else {
+ $authmname = 'default';
+ }
+ require_once($this->config['INSTALL_ROOT'].'/lib/modules/auth/'.$authmname.'.inc.php');
+ $auth = $authmname.'Auth';
+ $this->auth = new $auth();
+
+ $this->user = new OpenUploadUser();
+ $this->user->auth = &$this->auth;
+
+ /* translation module */
+ if (isset($this->config['translator'])) {
+ $trname = $this->config['translator'];
+ } else {
+ $trname = 'null';
+ }
+ require_once($this->config['INSTALL_ROOT'].'/lib/modules/tr/'.$trname.'.inc.php');
+ $tr = $trname.'Translator';
+ $this->tr = new $tr();
+
+ $this->langs = $this->db->read('langs',array('active' => '1'),array('id'),'',array('id'));
+
+ /* check if it was forced */
+ if (isset($_GET['lang'])) {
+ $user = $this->user->info();
+ $user['lang']=$_GET['lang'];
+ $this->user->setInfo('lang',$_GET['lang']);
+ }
+
+ /* configure the language */
+ if ($this->user->info('lang')=='') {
+ $lang = $this->getBrowserLang();
+ $user = $this->user->info();
+ $this->user->setInfo('lang',$lang);
+ }
+ $this->tr->init();
+ $this->auth->init();
+ $this->user->init();
+
+ }
+
+ /* gets the best language match based on browser info */
+ function getBrowserLang() {
+ global $_SERVER;
+
+ /* calculate preferred language */
+ $langs = str_replace(' ','',strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
+ $langs = explode(',',$langs);
+ foreach ($langs as $ls) {
+ $language = explode(';',$ls);
+ foreach ($language as $l) {
+ foreach ($this->langs as $ml) {
+ if (strpos(strtolower($ml['browser']),'['.$l.']')!==FALSE) {
+ return $ml['id'];
+ }
+ if (strpos($l,'-')) {
+ $x = explode('-',$l);
+ if (strpos(strtolower($ml['browser']),'['.$x[0].']')!==FALSE) {
+ return $ml['id'];
+ }
+ }
+ }
+ }
+ }
+ return $this->config['defaultlang'];
+ }
+
+ /* returns the output from the template engine */
+ function fetch($tname) {
+ if (file_exists($this->tpl->template_dir.'/'.$this->config['site']['template'].'/'.$tname.'.tpl')) {
+ return $this->tpl->fetch($this->config['site']['template'].'/'.$tname.'.tpl');
+ } else {
+ return $this->tpl->fetch('default/'.$tname.'.tpl');
+ }
+ }
+
+ function exists($tname) {
+ if (file_exists($this->tpl->template_dir.'/'.$this->config['site']['template'].'/'.$tname.'.tpl')) {
+ return true;
+ } else if (file_exists($this->tpl->template_dir.'/default/'.$tname.'.tpl')){
+ return true;
+ }
+ return false;
+ }
+ /* displays the output from the template engine */
+ function display($tname) {
+ if (file_exists($this->tpl->template_dir.'/'.$this->config['site']['template'].'/'.$tname.'.tpl')) {
+ $this->tpl->display($this->config['site']['template'].'/'.$tname.'.tpl');
+ } else {
+ $this->tpl->display('default/'.$tname.'.tpl');
+ }
+ }
+
+ function initModules() {
+ /* initialize configured modules */
+ foreach ($this->config['modules'] as $module) {
+ /* create and initialize the module */
+ require_once($this->config['INSTALL_ROOT'].'/lib/modules/default/'.$module.'.inc.php');
+ $m = $module.'Module';
+ $m = new $m();
+ $m->name = $module;
+ $m->tpl = &$this->tpl;
+ foreach ($m->actions as $k => $l) {
+ $this->actions[$k] = $m->name;
+ $this->modules[$module] = $m;
+ }
+ }
+ foreach ($this->modules as $m) {
+ $m->init();
+ }
+ }
+
+ function initMenu($group = '',$module) {
+
+ $this->menu['main'] = array();
+ foreach ($this->modules as $m) {
+ if (isset($m->mainmenu)) {
+ foreach ($m->actions as $k => $v) {
+ if ($this->checkACL($group,$m->name,$k) == 'allow') {
+ if (isset($m->mainmenu[$k])) {
+ $this->menu['main'][$k]=$m->mainmenu[$k];
+ }
+ }
+ }
+ }
+ }
+ $this->tpl->assign('menu',$this->menu);
+ }
+
+ function loadACL() {
+ $this->acl = array();
+ }
+
+ function checkSingleACL($group,$module,$action) {
+
+ $result = 'deny'; /* not defined are denyed by default */
+ if (isset($this->acl[$group][$module][$action])) {
+ $result = $this->acl[$group][$module][$action]['access'];
+ } else if (isset($this->acl[$group][$module]['*'])) {
+ $result = $this->acl[$group][$module]['*']['access'];
+ } else if (isset($this->acl[$group]['*']['*'])) {
+ $result = $this->acl[$group]['*']['*']['access'];
+ } else if (isset($this->acl['*'][$module][$action])) {
+ $result = $this->acl['*'][$module][$action];
+ } else if (isset($this->acl['*'][$module]['*'])) {
+ $result = $this->acl['*'][$module]['*']['access'];
+ } else if (isset($this->acl['*']['*']['*'])) {
+ $result = $this->acl['*']['*']['*']['access']; /* this should be avoided imho */
+ }
+ return $result;
+ }
+
+ function checkACL($group,$module,$action) {
+ if (count($this->acl) == 0)
+ return 'allow';
+ if (is_array($group)) {
+ foreach ($group as $g) {
+ $result = $this->checkSingleACL($g,$module,$action);
+ if ($result == 'allow') {
+ return $result;
+ }
+ }
+ } else {
+ $result = $this->checkSingleACL($group,$module,$action);
+ }
+
+ if (isset($this->config['debug_acl']) and $this->config['debug_acl'] and $result == 'deny') {
+ echo '<pre>ACL: '.$result.' - group: '.$group.', module: '.$module.', action: '.$action."\n";
+ print_r($this->acl);
+ echo '</pre>';
+ $result = 'allow';
+ }
+
+ return $result;
+ }
+
+ function log($level,$realaction,$plugin,$result,$moreinfo) {
+
+ }
+
+ function initPlugins() {
+ /* initialize plugin system */
+ $this->pluginOutput = '';
+
+ $this->plugins = array();
+ /* load the plugins */
+ foreach ($this->config['plugins'] as $plugin) {
+ /* include the file */
+ if (file_exists($this->config['INSTALL_ROOT'].'/plugins/'.$plugin.'.inc.php')) {
+ require_once($this->config['INSTALL_ROOT'].'/plugins/'.$plugin.'.inc.php');
+ $pname = $plugin."Plugin";
+ $newp = new $pname();
+ $newp->name = $plugin;
+ $this->plugins[$plugin] = $newp;
+ } else {
+ $this->error(tr('plugin include file not found: %1',$plugin));
+ }
+ }
+ foreach ($this->plugins as $plugin) {
+ $plugin->init();
+ }
+ }
+
+ function pluginAction($action,&$finfo,$stop = true) {
+ //$this->pluginHTML = '';
+ $result = true;
+
+ if (!is_array($this->plugins))
+ return true;
+ foreach ($this->plugins as $plugin) {
+ if (method_exists($plugin,$action)) {
+ /* check plugin acl */
+ $acl = 'disable'; /* disabled by default */
+ if (isset($this->pluginAcl[$plugin->name])) {
+ $acl = $this->pluginAcl[$plugin->name]['access'];
+ }
+ $plugin->pluginHTML = '';
+ if (!$plugin->$action($finfo,$acl)) {
+ if ($stop) {
+ app()->log('security',$action,$plugin->name,'DENY','');
+ return false;
+ }
+ app()->log('info',$action,$plugin->name,'DENY','non blocking');
+ $result = false;
+ }
+ $this->pluginOutput .= $plugin->pluginHTML;
+ }
+ }
+ return $result;
+ }
+
+ function convertSubnet($val) {
+ $sub = array();
+ if ($val<0) $val = 0;
+ if ($val>32) $val = 32;
+ for ($i=0; $i<4; $i++) {
+ $x = 0; /* could be done with a for... */
+ if ($val>0) $x += 128;
+ if ($val>1) $x += 64;
+ if ($val>2) $x += 32;
+ if ($val>3) $x += 16;
+ if ($val>4) $x += 8;
+ if ($val>5) $x += 4;
+ if ($val>6) $x += 2;
+ if ($val>7) $x += 1;
+ $sub[$i] = $x;
+ $val = $val - 8;
+ }
+ return $sub;
+ }
+
+ function matchIP($sip,$exp) {
+ if (strpos($exp,'/')!==FALSE) {
+ $x = explode('/',$exp);
+ $net = $x[0];
+ $sub = $x[1];
+ if (strpos($sub,'.')===FALSE) {
+ /* it's a single number convert to subnet mask*/
+ $sub = $this->convertSubnet($sub);
+ } else {
+ $sub = explode('.',$sub);
+ }
+ } else { /* single ip */
+ $net = $exp;
+ $sub = array(255,255,255,255);
+ }
+ $ip = explode('.',$sip);
+ $net = explode('.',$net);
+
+ /* now do the match */
+ $mip[0] = $ip[0] & $sub[0];
+ $mip[1] = $ip[1] & $sub[1];
+ $mip[2] = $ip[2] & $sub[2];
+ $mip[3] = $ip[3] & $sub[3];
+ $dip[0] = $net[0] & $sub[0];
+ $dip[1] = $net[1] & $sub[1];
+ $dip[2] = $net[2] & $sub[2];
+ $dip[3] = $net[3] & $sub[3];
+ if (($mip[0] == $dip[0]) and ($mip[1] == $dip[1]) and
+ ($mip[2] == $dip[2]) and ($mip[3] == $dip[3]))
+ return true;
+ else
+ return false;
+ }
+
+ /* initialize the run */
+ function setupRun($action,$step) {
+ global $_SERVER;
+
+ $this->mainPage = 'index';
+
+ /* setup the template variable */
+ if (!isset($this->config['defaultaction'])) $this->config['defaultaction']='u';
+
+ $this->action= $action=='' ? $this->config['defaultaction']:$action;
+ $this->step= $step==0 ?1:$step;
+
+ $this->tpl->assign('action',$this->action);
+ $this->tpl->assign('step',$this->step);
+ $this->tpl->assign('nextstep',$this->step+1);
+ $this->tpl->assign('site',$this->config['site']);
+ $this->tpl->assign('script',$_SERVER['PHP_SELF']);
+ $this->tpl->assign('page',$this->page);
+ }
+
+ /* this is the main application function which should be overridden */
+ function run($action = '',$step = 0) {
+ echo 'PLEASE REIMPLEMENT THE BaseApplication::run() FUNCTION!';
+ exit(-1);
+ }
+
+
+}
+
+?>
Modified: trunk/lib/main.inc.php
===================================================================
--- trunk/lib/main.inc.php 2009-11-07 22:44:44 UTC (rev 352)
+++ trunk/lib/main.inc.php 2009-11-07 22:45:26 UTC (rev 353)
@@ -1,6 +1,13 @@
<?php
-class Application {
+function sortTabs($a, $b) {
+ if ($a['priority'] == $b['priority'])
+ return 0;
+ else
+ return ($a['priority'] < $b['priority'])? -1 : 1;
+}
+
+class Application extends baseApplication {
var $db; /* database */
var $auth; /* authentication */
var $tr; /* trasnlation */
@@ -16,84 +23,16 @@
function Application($CONFIG) {
global $application;
+ $this->name = 'Open Upload';
$application = $this;
- $this->config = $CONFIG;
-
- /* initialize template engine */
- $this->tpl = new Smarty();
- $this->tpl->template_dir = $this->config['INSTALL_ROOT'].'/templates';
- if (isset($this->config['SMARTY_DATA'])) {
- $this->tpl->compile_dir = $this->config['SMARTY_DATA'].'/templates_c/';
- $this->tpl->cache_dir = $this->config['SMARTY_DATA'].'/cache';
- } else {
- $this->tpl->compile_dir = $this->config['INSTALL_ROOT'].'/templates_c/';
- $this->tpl->cache_dir = $this->config['INSTALL_ROOT'].'/cache';
- }
- $this->tpl->config_dir = SMARTY_DIR.'/configs';
- $this->tpl->caching = $this->config['site']['caching'];
+ baseApplication::baseApplication($CONFIG);
- $this->page['template']= $this->config['WWW_ROOT'].'/templates/'.$this->config['site']['template'];
-
- /* include the class first */
- $dbtype = $this->config['database']['type'];
- require_once($this->config['INSTALL_ROOT'].'/lib/modules/db/'.$dbtype.'.inc.php');
- $dbmname = $dbtype.'DB';
- $this->db = new $dbmname($this->config['database']);
- $this->db->init(); /* open db connection */
-
- /* authentication module */
- if (isset($this->config['auth'])) {
- $authmname = $this->config['auth'];
- } else {
- $authmname = 'default';
- }
- require_once($this->config['INSTALL_ROOT'].'/lib/modules/auth/'.$authmname.'.inc.php');
- $auth = $authmname.'Auth';
- $this->auth = new $auth();
-
- $this->user = new OpenUploadUser();
- $this->user->auth = &$this->auth;
-
- /* translation module */
- if (isset($this->config['translator'])) {
- $trname = $this->config['translator'];
- } else {
- $trname = 'null';
- }
- require_once($this->config['INSTALL_ROOT'].'/lib/modules/tr/'.$trname.'.inc.php');
- $tr = $trname.'Translator';
- $this->tr = new $tr();
-
- $this->langs = $this->db->read('langs',array('active' => '1'),array('id'),'',array('id'));
-
- /* check if it was forced */
- if (isset($_GET['lang'])) {
- $user = $this->user->info();
- $user['lang']=$_GET['lang'];
- $this->user->setInfo('lang',$_GET['lang']);
- }
-
- /* configure the language */
- if ($this->user->info('lang')=='') {
- $lang = $this->getBrowserLang();
- $user = $this->user->info();
- $this->user->setInfo('lang',$lang);
- }
- $this->tr->init();
- $this->auth->init();
- $this->user->init();
- if ($this->user->info('max_upload_size')==0)
- $this->user->setInfo('max_upload_size',$this->config['max_upload_size']*1024*1024);
- ini_set('max_upload_size',$this->user->info('max_upload_size'));
- ini_set('post_max_size',$this->user->info('max_upload_size'));
-// TODO: should check if this value has been really set or if it was blocked by the PHP
-
$this->config['modules'][]='files';
$this->config['modules'][]='admin';
$this->config['modules'][]='auth';
- $this->loadACL();
$this->initModules();
+ $this->loadACL();
$this->loglevels['error'] = array('id' => 1, 'syslog' => LOG_ERR );
$this->loglevels['security'] = array('id' => 2, 'syslog' => LOG_WARNING );
@@ -101,49 +40,9 @@
$this->loglevels['notice'] = array('id' => 4, 'syslog' => LOG_NOTICE );
$this->loglevels['info'] = array('id' => 5, 'syslog' => LOG_INFO );
$this->loglevels['debug'] = array('id' => 9, 'syslog' => LOG_DEBUG );
- }
- function getBrowserLang() {
- global $_SERVER;
-
- /* calculate preferred language */
- $langs = str_replace(' ','',strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
- $langs = explode(',',$langs);
- foreach ($langs as $ls) {
- $language = explode(';',$ls);
- foreach ($language as $l) {
- foreach ($this->langs as $ml) {
- if (strpos(strtolower($ml['browser']),'['.$l.']')!==FALSE) {
- return $ml['id'];
- }
- if (strpos($l,'-')) {
- $x = explode('-',$l);
- if (strpos(strtolower($ml['browser']),'['.$x[0].']')!==FALSE) {
- return $ml['id'];
- }
- }
- }
- }
- }
- return $this->config['defaultlang'];
}
- function fetch($tname) {
- if (file_exists($this->tpl->template_dir.'/'.$this->config['site']['template'].'/'.$tname.'.tpl')) {
- return $this->tpl->fetch($this->config['site']['template'].'/'.$tname.'.tpl');
- } else {
- return $this->tpl->fetch('default/'.$tname.'.tpl');
- }
- }
-
- function display($tname) {
- if (file_exists($this->tpl->template_dir.'/'.$this->config['site']['template'].'/'.$tname.'.tpl')) {
- $this->tpl->display($this->config['site']['template'].'/'.$tname.'.tpl');
- } else {
- $this->tpl->display('default/'.$tname.'.tpl');
- }
- }
-
function message($msg) {
global $_SESSION;
$_SESSION['user']['messages'][] = $msg;
@@ -192,90 +91,8 @@
}
}
- function initModules() {
- /* initialize configured modules */
- foreach ($this->config['modules'] as $module) {
- /* create and initialize the module */
- require_once($this->config['INSTALL_ROOT'].'/lib/modules/default/'.$module.'.inc.php');
- $m = $module.'Module';
- $m = new $m();
- $m->name = $module;
- $m->tpl = &$this->tpl;
- foreach ($m->actions as $k => $l) {
- $this->actions[$k] = $m->name;
- $this->modules[$module] = $m;
- }
- }
- foreach ($this->modules as $m) {
- $m->init();
- }
- }
- function initMenu($auth = false) {
-
- $this->menu = array();
- foreach ($this->modules as $m) {
- foreach ($m->actions as $k => $a) {
- if (isset($m->menu[$k])) {
- $group = app()->user->group();
- if ($this->checkACL($group,$m->name,$k) == 'allow') {
- $this->menu[$k]=$m->menu[$k];
- }
- }
- }
- }
- $this->tpl->assign('menu',$this->menu);
- }
- function initPlugins() {
- /* initialize plugin system */
-
- $this->plugins = array();
- /* load the plugins */
- foreach ($this->config['plugins'] as $plugin) {
- /* include the file */
- if (file_exists($this->config['INSTALL_ROOT'].'/plugins/'.$plugin.'.inc.php')) {
- require_once($this->config['INSTALL_ROOT'].'/plugins/'.$plugin.'.inc.php');
- $pname = $plugin."Plugin";
- $newp = new $pname();
- $newp->name = $plugin;
- $this->plugins[$plugin] = $newp;
- } else {
- $this->error(tr('plugin include file not found: %1',$plugin));
- }
- }
- foreach ($this->plugins as $plugin) {
- $plugin->init();
- }
- }
-
- function pluginAction($action,&$finfo,$stop = true) {
- $this->pluginHTML = '';
- $result = true;
-
- if (!is_array($this->plugins))
- return true;
- foreach ($this->plugins as $plugin) {
- if (method_exists($plugin,$action)) {
- /* check plugin acl */
- $acl = 'disable'; /* disabled by default */
- if (isset($this->pluginAcl[$plugin->name])) {
- $acl = $this->pluginAcl[$plugin->name]['access'];
- }
- if (!$plugin->$action($finfo,$acl)) {
- if ($stop) {
- app()->log('security',$action,$plugin->name,'DENY','');
- return false;
- }
- app()->log('info',$action,$plugin->name,'DENY','non blocking');
- $result = false;
- }
- $this->pluginHTML .= $plugin->pluginHTML;
- }
- }
- return $result;
- }
-
function loadACL() {
/* loads the acl from the db */
$group = $this->user->group();
@@ -292,102 +109,15 @@
}
}
-
- function checkSingleACL($group,$module,$action) {
-
- $result = 'deny'; /* not defined are denyed by default */
- if (isset($this->acl[$group][$module][$action])) {
- $result = $this->acl[$group][$module][$action]['access'];
- } else if (isset($this->acl[$group][$module]['*'])) {
- $result = $this->acl[$group][$module]['*']['access'];
- } else if (isset($this->acl[$group]['*']['*'])) {
- $result = $this->acl[$group]['*']['*']['access'];
- } else if (isset($this->acl['*'][$module][$action])) {
- $result = $this->acl['*'][$module][$action];
- } else if (isset($this->acl['*'][$module]['*'])) {
- $result = $this->acl['*'][$module]['*']['access'];
- } else if (isset($this->acl['*']['*']['*'])) {
- $result = $this->acl['*']['*']['*']['access']; /* this should be avoided imho */
+ function tab($content,$name = 'default', $priority = 0 ) {
+ $this->tabs[$name]['html'][] = $content;
+ if ($priority<999)
+ $this->tabs[$name]['priority']=$priority;
+ else if (!isset($this->tabs[$name]['priority'])) {
+ $this->tabs[$name]['priority']=999;
}
- return $result;
}
- function checkACL($group,$module,$action) {
- if (is_array($group)) {
- foreach ($group as $g) {
- $result = $this->checkSingleACL($g,$module,$action);
- if ($result == 'allow') {
- return $result;
- }
- }
- } else {
- $result = $this->checkSingleACL($group,$module,$action);
- }
-
- if (isset($this->config['debug_acl']) and $this->config['debug_acl'] and $result == 'deny') {
- echo '<pre>ACL: '.$result.' - group: '.$group.', module: '.$module.', action: '.$action."\n";
- print_r($this->acl);
- echo '</pre>';
- $result = 'allow';
- }
-
- return $result;
- }
-
- function convertSubnet($val) {
- $sub = array();
- if ($val<0) $val = 0;
- if ($val>32) $val = 32;
- for ($i=0; $i<4; $i++) {
- $x = 0; /* could be done with a for... */
- if ($val>0) $x += 128;
- if ($val>1) $x += 64;
- if ($val>2) $x += 32;
- if ($val>3) $x += 16;
- if ($val>4) $x += 8;
- if ($val>5) $x += 4;
- if ($val>6) $x += 2;
- if ($val>7) $x += 1;
- $sub[$i] = $x;
- $val = $val - 8;
- }
- return $sub;
- }
-
- function matchIP($sip,$exp) {
- if (strpos($exp,'/')!==FALSE) {
- $x = explode('/',$exp);
- $net = $x[0];
- $sub = $x[1];
- if (strpos($sub,'.')===FALSE) {
- /* it's a single number convert to subnet mask*/
- $sub = $this->convertSubnet($sub);
- } else {
- $sub = explode('.',$sub);
- }
- } else { /* single ip */
- $net = $exp;
- $sub = array(255,255,255,255);
- }
- $ip = explode('.',$sip);
- $net = explode('.',$net);
-
- /* now do the match */
- $mip[0] = $ip[0] & $sub[0];
- $mip[1] = $ip[1] & $sub[1];
- $mip[2] = $ip[2] & $sub[2];
- $mip[3] = $ip[3] & $sub[3];
- $dip[0] = $net[0] & $sub[0];
- $dip[1] = $net[1] & $sub[1];
- $dip[2] = $net[2] & $sub[2];
- $dip[3] = $net[3] & $sub[3];
- if (($mip[0] == $dip[0]) and ($mip[1] == $dip[1]) and
- ($mip[2] == $dip[2]) and ($mip[3] == $dip[3]))
- return true;
- else
- return false;
- }
-
function banned() {
global $_SERVER;
@@ -407,28 +137,9 @@
global $_SESSION;
global $_GET;
- $this->mainPage = 'index';
+ $this->tabs = array();
+ $this->setupRun($action,$step);
- /* setup the template variable */
- if (!isset($this->config['defaultaction'])) $this->config['defaultaction']='u';
-
- $this->action= $action=='' ? $this->config['defaultaction']:$action;
- $this->step= $step==0 ?1:$step;
-
- $this->tpl->assign('action',$this->action);
- $this->tpl->assign('step',$this->step);
- $this->tpl->assign('nextstep',$this->step+1);
- $this->tpl->assign('site',$this->config['site']);
- $this->tpl->assign('script',$_SERVER['PHP_SELF']);
- $this->tpl->assign('page',$this->page);
-
- if (isset($this->config['multiupload'])) {
- if ($this->config['multiupload']<=0)
- $this->config['multiupload']=1;
- $this->tpl->assign('multiupload',$this->config['multiupload']);
- } else {
- $this->config['multiupload']=1;
- }
/* check for banned IP */
if ($this->banned() != 'allow') {
$this->log('security','banned','','DENY','');
@@ -439,6 +150,7 @@
$this->db->free();
exit;
}
+
/* depending on the acl some actions need authentication others don't */
if (!isset($this->actions[$this->action])) {
/* no module can handle this action */
@@ -477,7 +189,7 @@
}
$this->initPlugins();
- $this->initMenu($this->user->loggedin());
+ $this->initMenu($this->user->group(),$m->name);
/* now run the module */
if (isset($m->actions[$this->action][$this->step])) {
@@ -491,17 +203,28 @@
}
}
$this->tpl->assign('user',$_SESSION['user']);
+ $this->tpl->assign('config',$this->config);
$m->$fun();
+ if (count($this->tabs)>0) {
+ /* sort based on the priority flag */
+ uasort($this->tabs,'sortTabs');
+ $this->tpl->assign('tabs',$this->tabs);
+ $this->pluginOutput .= $this->fetch('tabs');
+ }
+ $this->tpl->assign('plugins',$this->pluginOutput);
+ $this->page['content']=$this->fetch('modules/'.$m->name.'/'.$fun);
- if ($_GET['type']=='ajax') return;
+ if ($_GET['type']=='ajax') {
+ echo $this->page['content'];
+ session_weite_close;
+ exit;
+ }
/* now display the final page */
- $this->tpl->assign('user',$this->user->info());
+ $this->tpl->assign('user',$_SESSION['user']);
$this->tpl->assign('langs',$this->langs);
unset($_SESSION['user']['messages']);
unset($_SESSION['user']['errors']);
- $this->tpl->assign('plugins',$this->pluginHTML);
- $this->page['content']=$this->fetch('modules/'.$m->name.'/'.$fun);
$this->tpl->assign('page',$this->page);
$this->display($this->mainPage);
$this->log('info',$fun,'','ALLOW','');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-11-07 22:44:53
|
Revision: 352
http://openupload.svn.sourceforge.net/openupload/?rev=352&view=rev
Author: tsdogs
Date: 2009-11-07 22:44:44 +0000 (Sat, 07 Nov 2009)
Log Message:
-----------
add session to functions
Modified Paths:
--------------
trunk/lib/user.inc.php
Modified: trunk/lib/user.inc.php
===================================================================
--- trunk/lib/user.inc.php 2009-08-29 11:04:36 UTC (rev 351)
+++ trunk/lib/user.inc.php 2009-11-07 22:44:44 UTC (rev 352)
@@ -31,6 +31,8 @@
}
function info($field = '') {
+ global $_SESSION;
+
if ($field != '') {
return $_SESSION['user'][$field];
} else {
@@ -47,10 +49,14 @@
}
function setInfo($name,$value) {
+ global $_SESSION;
+
$_SESSION['user'][$name]=$value;
}
function set($user) {
+ global $_SESSION;
+
$_SESSION['user']=$user;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-08-29 11:04:42
|
Revision: 351
http://openupload.svn.sourceforge.net/openupload/?rev=351&view=rev
Author: tsdogs
Date: 2009-08-29 11:04:36 +0000 (Sat, 29 Aug 2009)
Log Message:
-----------
fix default translation module
Modified Paths:
--------------
trunk/www/config.inc.php.example
Modified: trunk/www/config.inc.php.example
===================================================================
--- trunk/www/config.inc.php.example 2009-08-29 11:02:54 UTC (rev 350)
+++ trunk/www/config.inc.php.example 2009-08-29 11:04:36 UTC (rev 351)
@@ -46,7 +46,7 @@
/* TRANSLATION MODULE */
-#$CONFIG['translator']='none';
+#$CONFIG['translator']='null';
#$CONFIG['translator']='gettext';
$CONFIG['translator']='phparray';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-08-29 11:03:02
|
Revision: 350
http://openupload.svn.sourceforge.net/openupload/?rev=350&view=rev
Author: tsdogs
Date: 2009-08-29 11:02:54 +0000 (Sat, 29 Aug 2009)
Log Message:
-----------
Add index.html for control to directory listing.
Added Paths:
-----------
trunk/templates/index.html
Added: trunk/templates/index.html
===================================================================
--- trunk/templates/index.html (rev 0)
+++ trunk/templates/index.html 2009-08-29 11:02:54 UTC (rev 350)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-08-29 11:01:08
|
Revision: 349
http://openupload.svn.sourceforge.net/openupload/?rev=349&view=rev
Author: tsdogs
Date: 2009-08-29 11:00:58 +0000 (Sat, 29 Aug 2009)
Log Message:
-----------
Add index.html for control to directory listing.
Added Paths:
-----------
trunk/templates/default/index.html
trunk/templates/default/locale/de/LC_MESSAGES/index.html
trunk/templates/default/locale/de/index.html
trunk/templates/default/locale/fr/LC_MESSAGES/index.html
trunk/templates/default/locale/fr/index.html
trunk/templates/default/locale/index.html
trunk/templates/default/locale/it/LC_MESSAGES/index.html
trunk/templates/default/locale/it/index.html
trunk/templates/default/locale/pt_BR/LC_MESSAGES/index.html
trunk/templates/default/locale/pt_BR/index.html
trunk/templates/default/locale/zh_CN.GBK/LC_MESSAGES/index.html
trunk/templates/default/locale/zh_CN.GBK/index.html
trunk/templates/default/modules/admin/index.html
trunk/templates/default/modules/auth/index.html
trunk/templates/default/modules/files/index.html
trunk/templates/default/modules/index.html
trunk/templates/default/plugins/captcha/index.html
trunk/templates/default/plugins/compress/index.html
trunk/templates/default/plugins/email/index.html
trunk/templates/default/plugins/expire/index.html
trunk/templates/default/plugins/index.html
trunk/templates/default/plugins/mimetypes/index.html
trunk/templates/default/plugins/password/index.html
Added: trunk/templates/default/index.html
===================================================================
--- trunk/templates/default/index.html (rev 0)
+++ trunk/templates/default/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/locale/de/LC_MESSAGES/index.html
===================================================================
--- trunk/templates/default/locale/de/LC_MESSAGES/index.html (rev 0)
+++ trunk/templates/default/locale/de/LC_MESSAGES/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/locale/de/index.html
===================================================================
--- trunk/templates/default/locale/de/index.html (rev 0)
+++ trunk/templates/default/locale/de/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/locale/fr/LC_MESSAGES/index.html
===================================================================
--- trunk/templates/default/locale/fr/LC_MESSAGES/index.html (rev 0)
+++ trunk/templates/default/locale/fr/LC_MESSAGES/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/locale/fr/index.html
===================================================================
--- trunk/templates/default/locale/fr/index.html (rev 0)
+++ trunk/templates/default/locale/fr/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/locale/index.html
===================================================================
--- trunk/templates/default/locale/index.html (rev 0)
+++ trunk/templates/default/locale/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/locale/it/LC_MESSAGES/index.html
===================================================================
--- trunk/templates/default/locale/it/LC_MESSAGES/index.html (rev 0)
+++ trunk/templates/default/locale/it/LC_MESSAGES/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/locale/it/index.html
===================================================================
--- trunk/templates/default/locale/it/index.html (rev 0)
+++ trunk/templates/default/locale/it/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/locale/pt_BR/LC_MESSAGES/index.html
===================================================================
--- trunk/templates/default/locale/pt_BR/LC_MESSAGES/index.html (rev 0)
+++ trunk/templates/default/locale/pt_BR/LC_MESSAGES/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/locale/pt_BR/index.html
===================================================================
--- trunk/templates/default/locale/pt_BR/index.html (rev 0)
+++ trunk/templates/default/locale/pt_BR/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/locale/zh_CN.GBK/LC_MESSAGES/index.html
===================================================================
--- trunk/templates/default/locale/zh_CN.GBK/LC_MESSAGES/index.html (rev 0)
+++ trunk/templates/default/locale/zh_CN.GBK/LC_MESSAGES/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/locale/zh_CN.GBK/index.html
===================================================================
--- trunk/templates/default/locale/zh_CN.GBK/index.html (rev 0)
+++ trunk/templates/default/locale/zh_CN.GBK/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/modules/admin/index.html
===================================================================
--- trunk/templates/default/modules/admin/index.html (rev 0)
+++ trunk/templates/default/modules/admin/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/modules/auth/index.html
===================================================================
--- trunk/templates/default/modules/auth/index.html (rev 0)
+++ trunk/templates/default/modules/auth/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/modules/files/index.html
===================================================================
--- trunk/templates/default/modules/files/index.html (rev 0)
+++ trunk/templates/default/modules/files/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/modules/index.html
===================================================================
--- trunk/templates/default/modules/index.html (rev 0)
+++ trunk/templates/default/modules/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/plugins/captcha/index.html
===================================================================
--- trunk/templates/default/plugins/captcha/index.html (rev 0)
+++ trunk/templates/default/plugins/captcha/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/plugins/compress/index.html
===================================================================
--- trunk/templates/default/plugins/compress/index.html (rev 0)
+++ trunk/templates/default/plugins/compress/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/plugins/email/index.html
===================================================================
--- trunk/templates/default/plugins/email/index.html (rev 0)
+++ trunk/templates/default/plugins/email/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/plugins/expire/index.html
===================================================================
--- trunk/templates/default/plugins/expire/index.html (rev 0)
+++ trunk/templates/default/plugins/expire/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/plugins/index.html
===================================================================
--- trunk/templates/default/plugins/index.html (rev 0)
+++ trunk/templates/default/plugins/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/plugins/mimetypes/index.html
===================================================================
--- trunk/templates/default/plugins/mimetypes/index.html (rev 0)
+++ trunk/templates/default/plugins/mimetypes/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/templates/default/plugins/password/index.html
===================================================================
--- trunk/templates/default/plugins/password/index.html (rev 0)
+++ trunk/templates/default/plugins/password/index.html 2009-08-29 11:00:58 UTC (rev 349)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2009-08-29 10:59:21
|
Revision: 348
http://openupload.svn.sourceforge.net/openupload/?rev=348&view=rev
Author: tsdogs
Date: 2009-08-29 10:59:13 +0000 (Sat, 29 Aug 2009)
Log Message:
-----------
Add index.html for control to directory listing.
Added Paths:
-----------
trunk/locale/de/LC_MESSAGES/index.html
trunk/locale/de/index.html
trunk/locale/fr/LC_MESSAGES/index.html
trunk/locale/fr/index.html
trunk/locale/index.html
trunk/locale/it/LC_MESSAGES/index.html
trunk/locale/it/index.html
trunk/locale/pt_BR/LC_MESSAGES/index.html
trunk/locale/pt_BR/index.html
trunk/locale/tools/index.html
trunk/locale/tools/php2po.php
trunk/locale/zh_CN.GBK/LC_MESSAGES/index.html
trunk/locale/zh_CN.GBK/index.html
Added: trunk/locale/de/LC_MESSAGES/index.html
===================================================================
--- trunk/locale/de/LC_MESSAGES/index.html (rev 0)
+++ trunk/locale/de/LC_MESSAGES/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/locale/de/index.html
===================================================================
--- trunk/locale/de/index.html (rev 0)
+++ trunk/locale/de/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/locale/fr/LC_MESSAGES/index.html
===================================================================
--- trunk/locale/fr/LC_MESSAGES/index.html (rev 0)
+++ trunk/locale/fr/LC_MESSAGES/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/locale/fr/index.html
===================================================================
--- trunk/locale/fr/index.html (rev 0)
+++ trunk/locale/fr/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/locale/index.html
===================================================================
--- trunk/locale/index.html (rev 0)
+++ trunk/locale/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/locale/it/LC_MESSAGES/index.html
===================================================================
--- trunk/locale/it/LC_MESSAGES/index.html (rev 0)
+++ trunk/locale/it/LC_MESSAGES/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/locale/it/index.html
===================================================================
--- trunk/locale/it/index.html (rev 0)
+++ trunk/locale/it/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/locale/pt_BR/LC_MESSAGES/index.html
===================================================================
--- trunk/locale/pt_BR/LC_MESSAGES/index.html (rev 0)
+++ trunk/locale/pt_BR/LC_MESSAGES/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/locale/pt_BR/index.html
===================================================================
--- trunk/locale/pt_BR/index.html (rev 0)
+++ trunk/locale/pt_BR/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/locale/tools/index.html
===================================================================
--- trunk/locale/tools/index.html (rev 0)
+++ trunk/locale/tools/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/locale/tools/php2po.php
===================================================================
--- trunk/locale/tools/php2po.php (rev 0)
+++ trunk/locale/tools/php2po.php 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,38 @@
+#!/usr/bin/env php
+<?php
+
+$header = 'msgid ""
+msgstr ""
+"Project-Id-Version: OpenUpload\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"';
+
+
+if ($_SERVER['argc'] != 3) {
+ echo "Usage: php2po.php <phpfile> <pofile>\n";
+ exit (-1);
+}
+
+$src = $_SERVER['argv'][1];
+$out = $_SERVER['argv'][2];
+
+require_once($src);
+
+$outlines = '';
+
+foreach ($tr as $k => $v) {
+ $outlines .= 'msgid "'.str_replace('"','\"',$k).'"'."\n";
+ $outlines .= 'msgstr "'.str_replace('"','\"',$v).'"'."\n\n";
+}
+
+$outlines = $header."\n\n".$outlines;
+
+file_put_contents($out,$outlines);
+
+?>
+
+
Property changes on: trunk/locale/tools/php2po.php
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/locale/zh_CN.GBK/LC_MESSAGES/index.html
===================================================================
--- trunk/locale/zh_CN.GBK/LC_MESSAGES/index.html (rev 0)
+++ trunk/locale/zh_CN.GBK/LC_MESSAGES/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/locale/zh_CN.GBK/index.html
===================================================================
--- trunk/locale/zh_CN.GBK/index.html (rev 0)
+++ trunk/locale/zh_CN.GBK/index.html 2009-08-29 10:59:13 UTC (rev 348)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>NO ACCESS</title>
+<meta http-equiv="REFRESH" content="0;url=../"></HEAD>
+<BODY>
+No direct access is allowed on this folder.
+</BODY>
+</HTML>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|