Thread: [Openupload-svn-update] SF.net SVN: openupload:[7] trunk/www
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2008-10-15 13:56:51
|
Revision: 7
http://openupload.svn.sourceforge.net/openupload/?rev=7&view=rev
Author: tsdogs
Date: 2008-10-15 13:52:31 +0000 (Wed, 15 Oct 2008)
Log Message:
-----------
First svn commit
Added Paths:
-----------
trunk/www/config.inc.php.example
trunk/www/index.php
trunk/www/plugins/
trunk/www/plugins/captcha.php
trunk/www/templates/
trunk/www/templates/default/
trunk/www/templates/default/img/
trunk/www/templates/default/img/admin/
Added: trunk/www/config.inc.php.example
===================================================================
--- trunk/www/config.inc.php.example (rev 0)
+++ trunk/www/config.inc.php.example 2008-10-15 13:52:31 UTC (rev 7)
@@ -0,0 +1,88 @@
+<?php
+/* This is the general configuration file */
+
+/* Define the installation folder */
+$CONFIG['INSTALL_ROOT']='/usr/local/share/openupload';
+
+/* Define the web root foder (for the application) */
+$CONFIG['WEB_ROOT']='/usr/local/share/openupload/www';
+
+/* define http:// address */
+$CONFIG['WWW_SERVER']='http://yourdomain.com';
+/* define the additional web path */
+$CONFIG['WWW_ROOT']='/';
+
+/* Define where to store the uploaded files */
+$CONFIG['DATA_PATH']=$CONFIG['INSTALL_ROOT'].'/data';
+
+/* Define how long to keep the uploaded files
+ * please check the README for specification on how this works */
+$CONFIG['KEEP_FILES']=0;
+
+/* This specifies the kind of database to use:
+ * supported types are: mysql, pgsql, txt
+ * txt is a special mode where data is stored inside ascii files
+ * it can be used when no database is available
+ */
+$CONFIG['database']['type']='mysql';
+
+/* Depending on the option above... */
+
+/* MYSQL Database */
+$CONFIG['database']['host']='localhost';
+$CONFIG['database']['user']='databaseuser';
+$CONFIG['database']['password']='databasepwd';
+$CONFIG['database']['name']='openupload';
+
+/* TXT Database */
+//$CONFIG['database']['type']='txt';
+//$CONFIG['database']['rootdir']=$CONFIG['INSTALL_ROOT'].'/txtdb';
+
+$CONFIG['database']['prefix']='';
+
+/* PLUGINS: here you enable the plugins
+ * they will need to enable the functionality
+ * on a group basis
+ */
+$CONFIG['plugins'][] = 'banned';
+$CONFIG['plugins'][] = 'mimetypes';
+$CONFIG['plugins'][] = 'email';
+$CONFIG['plugins'][] = 'password';
+$CONFIG['plugins'][] = 'captcha';
+
+/* SITE TITLE */
+$CONFIG['site']['title'] = 'Open Upload';
+
+/* webmaster e-mail */
+$CONFIG['site']['webmaster'] = 'web...@yo...';
+/* email source address */
+$CONFIG['site']['email'] = 'ope...@yo...';
+
+/* REGISTRATION OPTIONS */
+$CONFIG['register']['nologingroup']='unregistered';
+/* registered user by default */
+$CONFIG['register']['default_group']='registered';
+
+
+/* SITE STYLE */
+$CONFIG['site']['template'] = 'default';
+/* ENABLE OR DISABLE SMARTY CACHING
+ * if enabled make sure a cache folder exsists
+ * and that it is writable
+ */
+$CONFIG['site']['caching']=0;
+
+/* NOTE: Depending on the template you might need to change some settings
+ * in the template configuration.
+ * The default template does not have this requirement
+ */
+
+/* SITE FOOTER STRING */
+$CONFIG['site']['footer'] = '<a href="http://openupload.sf.net">Open Upload</a> - Created by Alessandro Briosi © 2008';
+
+/* PLUGINS SPECIFIC CONFIGURATION */
+$CONFIG['mimetypes'][]='application/pdf';
+$CONFIG['mimetypes'][]='image/jpeg';
+$CONFIG['mimetypes'][]='image/png';
+
+?>
Added: trunk/www/index.php
===================================================================
--- trunk/www/index.php (rev 0)
+++ trunk/www/index.php 2008-10-15 13:52:31 UTC (rev 7)
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Project: OpenUpload
+ * File: www/index.php
+ *
+ * LICENSE:
+ *
+ * Copyright 2008 Alessandro Briosi
+ *
+ * This file is part of OpenUpload.
+ *
+ * OpenUpload is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * OpenUpload is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with OpenUpload; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * @link http://openupload.sf.net/
+ * @copyright 2008 Alessandro Briosi
+ * @author Alessandro Briosi <tsdogs at briosix dot org>
+ * @package OpenUpload
+ * @version 0.3
+ */
+
+define ('__VALID_CALLING_SCRIPT', true);
+
+require_once('config.inc.php');
+require_once($CONFIG['INSTALL_ROOT'].'/lib/general.inc.php');
+
+global $application;
+
+/* check authentication */
+if (isset($_GET['action'])) {
+ $action = $_GET['action'];
+} else if (isset($_POST['action'])) {
+ $action = $_POST['action'];
+} else {
+ $action = '';
+}
+if (isset($_GET['step'])) {
+ $step = $_GET['step'];
+} else if (isset($_POST['step'])) {
+ $step = $_POST['step'];
+} else {
+ $step = '';
+}
+
+new Application($CONFIG);
+app()->run($action,$step);
+
+?>
Added: trunk/www/plugins/captcha.php
===================================================================
--- trunk/www/plugins/captcha.php (rev 0)
+++ trunk/www/plugins/captcha.php 2008-10-15 13:52:31 UTC (rev 7)
@@ -0,0 +1,16 @@
+<?php
+
+/* this generates a chiper and sets the session relative chiper protection */
+include ('../config.inc.php');
+
+require_once($CONFIG['INSTALL_ROOT'].'/plugins/securimage/securimage.php');
+
+
+$img = new securimage();
+$img->ttf_file = $CONFIG['INSTALL_ROOT'].'/plugins/securimage/elephant.ttf';
+$img->code_length = 6;
+$img->image_width = 200;
+$img->image_type = SI_IMAGE_JPG;
+$img->show();
+
+?>
\ 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...> - 2008-10-23 10:45:27
|
Revision: 66
http://openupload.svn.sourceforge.net/openupload/?rev=66&view=rev
Author: tsdogs
Date: 2008-10-23 10:42:46 +0000 (Thu, 23 Oct 2008)
Log Message:
-----------
Add direct access restrictions to sub folders.
Added Paths:
-----------
trunk/www/plugins/index.html
trunk/www/templates/default/img/admin/index.html
trunk/www/templates/default/img/index.html
trunk/www/templates/default/index.html
trunk/www/templates/index.html
Added: trunk/www/plugins/index.html
===================================================================
--- trunk/www/plugins/index.html (rev 0)
+++ trunk/www/plugins/index.html 2008-10-23 10:42:46 UTC (rev 66)
@@ -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/www/templates/default/img/admin/index.html
===================================================================
--- trunk/www/templates/default/img/admin/index.html (rev 0)
+++ trunk/www/templates/default/img/admin/index.html 2008-10-23 10:42:46 UTC (rev 66)
@@ -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/www/templates/default/img/index.html
===================================================================
--- trunk/www/templates/default/img/index.html (rev 0)
+++ trunk/www/templates/default/img/index.html 2008-10-23 10:42:46 UTC (rev 66)
@@ -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/www/templates/default/index.html
===================================================================
--- trunk/www/templates/default/index.html (rev 0)
+++ trunk/www/templates/default/index.html 2008-10-23 10:42:46 UTC (rev 66)
@@ -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/www/templates/index.html
===================================================================
--- trunk/www/templates/index.html (rev 0)
+++ trunk/www/templates/index.html 2008-10-23 10:42:46 UTC (rev 66)
@@ -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-02-05 15:43:24
|
Revision: 231
http://openupload.svn.sourceforge.net/openupload/?rev=231&view=rev
Author: tsdogs
Date: 2009-02-05 15:43:20 +0000 (Thu, 05 Feb 2009)
Log Message:
-----------
Add shorter links handling
Add options for configuring ids length and form
Modified Paths:
--------------
trunk/www/index.php
trunk/www/setup.inc.php
Modified: trunk/www/index.php
===================================================================
--- trunk/www/index.php 2009-02-05 15:42:46 UTC (rev 230)
+++ trunk/www/index.php 2009-02-05 15:43:20 UTC (rev 231)
@@ -32,15 +32,22 @@
define ('__VALID_CALLING_SCRIPT',true);
-/* check authentication */
-if (isset($_GET['action'])) {
+/* disable notice error reporting */
+ini_set('error_reporting','E_ALL & ~E_NOTICE');
+
+/* check action */
+if (isset($_GET['a'])) {
+ $action = $_GET['a'];
+} else if (isset($_GET['action'])) {
$action = $_GET['action'];
} else if (isset($_POST['action'])) {
$action = $_POST['action'];
} else {
$action = '';
}
-if (isset($_GET['step'])) {
+if (isset($_GET['s'])) {
+ $step = $_GET['s'];
+} else if (isset($_GET['step'])) {
$step = $_GET['step'];
} else if (isset($_POST['step'])) {
$step = $_POST['step'];
Modified: trunk/www/setup.inc.php
===================================================================
--- trunk/www/setup.inc.php 2009-02-05 15:42:46 UTC (rev 230)
+++ trunk/www/setup.inc.php 2009-02-05 15:43:20 UTC (rev 231)
@@ -695,6 +695,9 @@
$CONFIG['site']['footer']=str_replace('\"','"',$_POST['sitefooter']);
$CONFIG['registration']['email_confirm']=isset($_POST['confirmregistration'])?$_POST['confirmregistration']:'no';
$CONFIG['max_upload_size']=$_POST['max_upload_size'];
+ $CONFIG['use_short_links']=isset($_POST['use_short_links'])?$_POST['use_short_links']:'no';
+ $CONFIG['id_max_length']=$_POST['id_max_length'];
+ $CONFIG['id_use_alpha']=isset($_POST['id_use_alpha'])?$_POST['id_use_alpha']:'no';
$CONFIG['max_download_time']=$_POST['max_download_time'];
$CONFIG['multiupload']=$_POST['multiupload'];
$CONFIG['progress']=$_POST['progress'];
@@ -726,6 +729,10 @@
$error = true;
msg('Please insert a maximum download time','fail');
}
+ if ($CONFIG['id_max_length']=='') {
+ $error = true;
+ msg('Please insert the IDs length','fail');
+ }
if ($CONFIG['multiupload']<1) {
$error = true;
msg('Please insert a max number of uploaded files per upload','fail');
@@ -749,6 +756,9 @@
$CONFIG['site']['template'] = 'default';
$CONFIG['registration']['email_confirm']='yes';
$CONFIG['max_upload_size']=100;
+ $CONFIG['use_short_links']='yes';
+ $CONFIG['id_max_length']=10;
+ $CONFIG['id_use_alpha']='yes';
$CONFIG['max_download_time']=120;
$CONFIG['multiupload']=1;
$CONFIG['progress']=$_SESSION['progress_values'][count($_SESSION['progress_values'])-1];
@@ -798,6 +808,9 @@
<tr><td>Maximum upload size (in MB):</td><td><input type="text" name="max_upload_size" value="<?php echo $CONFIG['max_upload_size']; ?>"></td></tr>
<tr><td>Maximum download time (in Min)<br />0 disables it:</td><td><input type="text" name="max_download_time" value="<?php echo $CONFIG['max_download_time']; ?>"></td></tr>
<tr><td>Max num. of file uploaded per upload:</td><td><input type="text" name="multiupload" value="<?php echo $CONFIG['multiupload']; ?>"></td></tr>
+<tr><td>Use Short Links?:</td><td><input type="checkbox" name="use_short_links" value="yes" <?php if ($CONFIG['use_short_links']=='yes') echo 'checked'; ?> ></td></tr>
+<tr><td>Length of IDs (suggested min 6):</td><td><input type="text" name="id_max_length" value="<?php echo $CONFIG['id_max_length']; ?>"></td></tr>
+<tr><td>Use alphanumeric IDs?:</td><td><input type="checkbox" name="id_use_alpha" value="yes" <?php if ($CONFIG['id_use_alpha']=='yes') echo 'checked'; ?> ></td></tr>
<tr><td>Upload tracking method:</td><td><select name="progress">
<?php
foreach ($_SESSION['progress_values'] as $v) {
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:28:31
|
Revision: 374
http://openupload.svn.sourceforge.net/openupload/?rev=374&view=rev
Author: tsdogs
Date: 2010-03-18 18:28:25 +0000 (Thu, 18 Mar 2010)
Log Message:
-----------
fix this, many do not see it and causes troubles
Added Paths:
-----------
trunk/www/htaccess.example
Removed Paths:
-------------
trunk/www/.htaccess
Deleted: trunk/www/.htaccess
===================================================================
--- trunk/www/.htaccess 2010-03-18 18:27:03 UTC (rev 373)
+++ trunk/www/.htaccess 2010-03-18 18:28:25 UTC (rev 374)
@@ -1,5 +0,0 @@
-# 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"
Copied: trunk/www/htaccess.example (from rev 373, trunk/www/.htaccess)
===================================================================
--- trunk/www/htaccess.example (rev 0)
+++ trunk/www/htaccess.example 2010-03-18 18:28:25 UTC (rev 374)
@@ -0,0 +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"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|