Skip to content

Commit ce4676b

Browse files
author
MFScripts
committed
YetiShare File Hosting Script Free
This project is version 2.1 of the popular file hosting script - YetiShare.
1 parent a6781fc commit ce4676b

File tree

1,299 files changed

+105246
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,299 files changed

+105246
-0
lines changed

.htaccess

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# override max php upload settings. Might not work on all servers
2+
#php_value upload_max_filesize 4000M
3+
#php_value post_max_size 4000M
4+
5+
# redirect www to non-www
6+
#RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
7+
#RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
8+
9+
RewriteEngine On
10+
RewriteCond %{REQUEST_URI} ^(.+)\~s$
11+
RewriteRule ^(.*) stats.php?u=$1 [L]
12+
RewriteCond %{REQUEST_URI} ^(.+)\~d$
13+
RewriteRule ^(.*) delete_file.php?u=$1 [QSA,L]
14+
RewriteCond %{REQUEST_URI} ^(.+)\~i$
15+
RewriteRule ^(.*) share_file.php?u=$1 [QSA,L]
16+
RewriteCond %{REQUEST_URI} ^(.+)\~f$
17+
RewriteRule ^(.*) view_folder.php?f=$1 [QSA,L]
18+
19+
RewriteCond %{REQUEST_FILENAME} !-f
20+
RewriteCond %{REQUEST_FILENAME} !-d
21+
RewriteCond $1 !\.html$
22+
RewriteRule ^(.*) file_download.php?u=$1 [QSA,L]
23+
24+
RewriteRule ^(.*).html$ $1.php [L]

___INSTALLATION.txt

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
INSTALLATION:
2+
3+
- Unpack the script package.
4+
- Update "/_config.inc.php" with your site url and the full path to the root of the script. In most instances, this will be your domain name (for _CONFIG_SITE_HOST_URL & _CONFIG_SITE_FULL_URL) in the format www.mydomain.com. Don't include the http:// or the trailing forward slash.
5+
- Setup a new Mysql database on your hosting and note the connection details.
6+
- Import the database structure into your DB - located in "/offline/file_hosting.sql"
7+
- Update "/_config.inc.php" with the new database connection details. (host, user, password & db name)
8+
- Upload all files (apart from the /offline folder) via FTP onto your hosting account.
9+
- Set permissions of 777 on the following folder(s):
10+
- /files
11+
- The admin area can be accessed by adding "/admin/" onto the domain - i.e. yourdomain.com/admin/
12+
- Admin area access details:
13+
- user: admin
14+
- pass: password
15+
- Config values can be setup within the "Site Settings" section within the admin area.
16+
- You're done!
17+
18+
19+
SUPPORT:
20+
21+
- MFScripts does not provide support for this product.
22+
23+
24+
SCRIPT REQUIREMENTS:
25+
26+
- PHP5.2+
27+
- MySQL
28+
- Mod-Rewrite enabled

___LICENCE.txt

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Product licence details.
2+
3+
Full terms and conditions of MFScripts can be seen at https://mfscripts.com/terms-purchase.html.
4+
5+
The MIT License (MIT)
6+
7+
Copyright (c) 2015 MFScripts http://mfscripts.com/
8+
9+
Permission is hereby granted, free of charge, to any person obtaining a copy of
10+
this software and associated documentation files (the "Software"), to deal in
11+
the Software without restriction, including without limitation the rights to
12+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
13+
the Software, and to permit persons to whom the Software is furnished to do so,
14+
subject to the following conditions:
15+
16+
The above copyright notice and this permission notice shall be included in all
17+
copies or substantial portions of the Software.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
21+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25+

___RELEASE_HISTORY.txt

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
v2.1
2+
3+
- Added folder management.
4+
- After file upload, option set folder.
5+
- Set folder public or private.
6+
- Set password on folder.
7+
- Show files in folder listing page. (for public folders)
8+
- Added edit file details page.
9+
- Reset forgotten password pages.
10+
- Edit account email, name & password page.
11+
- Optional captcha after download counter for free users.
12+
- Improved download streaming when using remote ftp file servers.
13+
- Removed inaccurate upload progress text when using IE.
14+
- Moved homepage 'benefits' text into translations.
15+
- On homepage upload, prevented the results box from being closed when clicking any of the rows.
16+
- Added docx icon into file upload types.
17+
- Added secure phpinfo page within admin area to aid with debugging.
18+
- Removed admin area navigation if not logged in.
19+
- Improved admin login form style.
20+
- Fixed issue with editing ftp port on file server management.
21+
- Minor bug fix. In some instances, uploaded files might not be completely removed when deleted by admin.
22+
- Added check for php ftp functions within admin 'test ftp' page.
23+
- Fix on "Admin Users" & "File Servers" for the sorting of "total space used" and "total files".
24+
25+
v2.01
26+
27+
- Removed database password from displaying if there's an error with database connectivity.
28+
- Fixed filtering within admin area.
29+
- Fixed csv export within admin area.
30+
- Minor bug fix with account expiry date not updating via admin edit user.
31+
32+
v2.0
33+
34+
- View/amend account paid expiry date within admin area.
35+
- Added filesize when browsing files admin area.
36+
- Added filesize in user file manager.
37+
- More detail on file uploader. Percentage progress, filesize progress, upload speed and time remaining. (Chrome & Firefox only)
38+
- Option in admin area to show original filename on end of file url.
39+
- Option to set different download site address to main site. Set downloads from a different domain.
40+
- Support for https.
41+
- Improved countdown timer page. More information about the benefits of registering for a paid account inc estimated download time.
42+
- Support for multiple file servers via FTP.
43+
- New admin page to configure file servers.
44+
- Test file server page.
45+
- Admin area option to use a specific file server or automatically select the one with least space used.
46+
- Added 'filter by server' option on 'manage files' in admin area.
47+
- Added 'filter by user' option on 'manage files' in admin area.
48+
- Added link to 'manage users' to view user uploaded files.
49+
- Added total space used and total active files to 'manage users' in admin area.
50+
- Added link to admin area on main site if logged in as admin user.
51+
52+
v1.06
53+
54+
- Removed the ability to bypass the countdown by refreshing on the countdown timer page.
55+
- Fixed minor character issues within the admin settings page.
56+
57+
v1.05
58+
59+
- Fixed issue which could mean paid users see the countdown timer when downloading a file.
60+
- Fixed issue which meant the countdown wasn't displayed for free users when clicking on links in the 'your files' section.
61+
62+
v1.04
63+
64+
- Added the ability to specify smtp settings for sending site emails.
65+
- Fixed filesize bug using IE to upload.
66+
- Fixed issue where entries are sometimes created in the database on upload failure.
67+
- Better compatibility with Safari browser.
68+
69+
v1.03
70+
71+
- On some servers larger downloads could produce 500 errors. Resolved in this release.
72+
73+
v1.02
74+
75+
- Minor bug fix to limit maximum days value for redundant file deletion.
76+
- Missing 'unknown' translation on stats pages.
77+
- Minor bug fix to block file upload attempts without names and with zero size.
78+
- Added check for referrer on file upload script.
79+
80+
v1.01
81+
82+
- Minor XXS bug fixes to login/registration pages.
83+
- Minor spelling fixes.
84+
85+
v1.0
86+
87+
- Initial release.

_bannerRightContent.inc.php

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
// checked whether user is logged in
3+
if($Auth->loggedIn())
4+
{
5+
// load recent from account
6+
$files = file::loadAllRecentByAccount($Auth->id, true);
7+
}
8+
else
9+
{
10+
// load recent from IP
11+
$files = file::loadAllRecentByIp(getUsersIPAddress(), true);
12+
}
13+
?>
14+
15+
<div class="rightContentWrapper ui-corner-all">
16+
<div class="rightContent">
17+
<div id="pageHeader">
18+
<h2><?php echo t("your_recent_files", "Your Files"); ?> <?php echo COUNT($files)?'('.COUNT($files).')':''; ?></h2>
19+
</div>
20+
<p>
21+
<?php
22+
// load all urls for current user
23+
if(COUNT($files))
24+
{
25+
$tracker = 0;
26+
foreach($files AS $url)
27+
{
28+
$class = 'divOdd';
29+
if($tracker%2==1)
30+
{
31+
$class = 'divEven';
32+
}
33+
echo "<div class='".$class."'>";
34+
echo "<div style='padding: 3px;'>";
35+
echo " <div style='float: right; text-decoration: underline;'>";
36+
echo " <a href='".WEB_ROOT."/".$url['shortUrl']."~i?".$url['deleteHash']."'>".t("info", "info")."</a>";
37+
echo " </div>";
38+
echo " <div style='float: left; overflow: hidden; width: 170px;'>";
39+
echo " <a href='".WEB_ROOT."/".$url['shortUrl']."'>".$url['originalFilename']."</a>";
40+
echo " </div>";
41+
echo " <div class='clear'></div>";
42+
echo "</div>";
43+
echo "<div class='clear'></div>";
44+
echo "</div>";
45+
echo "<div class='clear'></div>";
46+
$tracker++;
47+
}
48+
}
49+
else
50+
{
51+
echo '- You have not uploaded any files recently. <a href="'.WEB_ROOT.'/index.'.SITE_CONFIG_PAGE_EXTENSION.'">Click here</a> to upload some now.';
52+
}
53+
?>
54+
</p>
55+
</div>
56+
</div>

_config.inc.php

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/* main configuration file for script */
4+
define("_CONFIG_SITE_HOST_URL", "yoursite"); /* site url host without the http:// and no trailing forward slash - i.e. www.mydomain.com or links.mydomain.com */
5+
define("_CONFIG_SITE_FULL_URL", "yoursite"); /* full site url without the http:// and no trailing forward slash - i.e. www.mydomain.com/links or the same as the _CONFIG_SITE_HOST_URL */
6+
7+
/* database connection details */
8+
define("_CONFIG_DB_HOST", "localhost"); /* database host name */
9+
define("_CONFIG_DB_NAME", "file_hosting"); /* database name */
10+
define("_CONFIG_DB_USER", "username"); /* database username */
11+
define("_CONFIG_DB_PASS", "password"); /* database password */
12+
13+
/* show database degug information on fail */
14+
define("_CONFIG_DB_DEBUG", true); /* this will display debug information when something fails in the DB - leave this as true if you're not sure */
15+
16+
/* toggle demo mode */
17+
define("_CONFIG_DEMO_MODE", false); /* always leave this as false */
18+
define("_CONFIG_SCRIPT_VERSION", "2.1"); /* script version */
19+
20+
/* server paths */
21+
define("_CONFIG_SCRIPT_ROOT", dirname(__FILE__));
22+
define("_CONFIG_FILE_STORAGE_PATH", _CONFIG_SCRIPT_ROOT . '/files/'); /* location on your server to store file uploads */
23+
24+
/* the url of the domain to download files from, only change if you plan on using a different domain to link to your files */
25+
define("_CONFIG_SITE_FILE_DOMAIN", _CONFIG_SITE_FULL_URL); /* url without the http:// and no trailing forward slash */
26+
27+
/* run the site as http or https, requires ssl certificate - functionality in beta */
28+
define("_CONFIG_SITE_PROTOCOL", 'http'); /* http or https */

_footer.php

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
</div>
2+
</div>
3+
4+
<!-- footer section -->
5+
<div class="footerBar">
6+
<!-- footer ads -->
7+
<div class="footerAds">
8+
<?php echo SITE_CONFIG_ADVERT_SITE_FOOTER; ?>
9+
</div>
10+
<div class="footerLinks">
11+
<div class="section1">
12+
<?php if(!$Auth->loggedIn()): ?>
13+
<strong><?php echo t('main_navigation', 'Main Navigation'); ?></strong>
14+
<ul>
15+
<li><a href="<?php echo WEB_ROOT; ?>/"><?php echo t('upload_file', 'upload file'); ?></a></li>
16+
<li><a href="<?php echo WEB_ROOT; ?>/register.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo t('register', 'register'); ?></a></li>
17+
<li><a href="<?php echo WEB_ROOT; ?>/faq.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo t('faq', 'faq'); ?></a></li>
18+
<li><a href="<?php echo WEB_ROOT; ?>/login.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo t('login', 'login'); ?></a></li>
19+
</ul>
20+
<?php else: ?>
21+
<strong><?php echo t('your_account', 'Your Account'); ?></strong>
22+
<ul>
23+
<li><a href="<?php echo WEB_ROOT; ?>/"><?php echo t('upload_file', 'upload file'); ?></a></li>
24+
<li><a href="<?php echo WEB_ROOT; ?>/account_home.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo t('your_files', 'your files'); ?></a></li>
25+
<li><a href="<?php echo WEB_ROOT; ?>/account_folders.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo t('folders', 'folders'); ?></a></li>
26+
<?php if($Auth->level != 'admin'): ?>
27+
<li><a href="<?php echo WEB_ROOT; ?>/upgrade.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo($Auth->level == 'free user')?t('uprade_account', 'upgrade account'):t('extend_account', 'extend account'); ?></a></li>
28+
<?php endif; ?>
29+
<li><a href="<?php echo WEB_ROOT; ?>/account_edit.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo t('settings', 'settings'); ?></a></li>
30+
<li><a href="<?php echo WEB_ROOT; ?>/faq.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo t('faq', 'faq'); ?></a></li>
31+
<li><a href="<?php echo WEB_ROOT; ?>/logout.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo t('logout', 'logout'); ?> (<?php echo $Auth->username; ?>)</a></li>
32+
</ul>
33+
<?php endif; ?>
34+
</div>
35+
<div class="section2">
36+
<strong><?php echo t('legal_bits', 'Legal Bits'); ?></strong>
37+
<ul>
38+
<li><a href="<?php echo WEB_ROOT; ?>/terms.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo t('term_and_conditions', 'terms and conditions'); ?></a></li>
39+
<li><a href="<?php echo WEB_ROOT; ?>/report_file.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo t('report_file', 'report file'); ?></a></li>
40+
</ul>
41+
</div>
42+
<div class="clear"><!-- --></div>
43+
44+
</div>
45+
<div class="clear"><!-- --></div>
46+
47+
<div class="footerCopyrightText">
48+
<?php
49+
if(($Auth->loggedIn() == true) && ($Auth->level == 'admin'))
50+
{
51+
echo '<strong>[ <a href="'.WEB_ROOT.'/admin/" target="_blank">'.t('admin_area', 'admin area').'</a> ]</strong><br/><br/>';
52+
}
53+
?>
54+
<?php echo t("copyright", "copyright"); ?> &copy; <?php echo date("Y"); ?> - <?php echo SITE_CONFIG_SITE_NAME; ?> - <a href="http://www.mfscripts.com/file_hosting_script.html" target="_blank">File Hosting Script</a> <?php echo t("created_by", "created by "); ?> <a href="http://www.mfscripts.com" target="_blank">MFScripts.com</a>
55+
</div>
56+
<div class="clear"><!-- --></div>
57+
58+
</div>
59+
</div>
60+
</body>
61+
</html>

0 commit comments

Comments
 (0)