Add files via upload
This commit is contained in:
parent
dce2755b05
commit
e9b433cd2a
7 changed files with 572 additions and 0 deletions
21
cloud/confirm-to-terms.php
Normal file
21
cloud/confirm-to-terms.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
$this_page = "cloud";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$gettoken = safe($_GET['vkey']);
|
||||
if($u_cloudterms == 'yes') {
|
||||
echo "<h1>You have already accepted the <a href=\"https://misdew.com/cloud/file-terms.html\">terms</a> for your acccount. This cannot be undone. Please email <b>me@justa.us</b> for options</h1>";
|
||||
exit();
|
||||
}
|
||||
if($gettoken == $u_token && $u_cloudterms == 'no') {
|
||||
mysqli_query($conx, "UPDATE accounts SET cloudterms='yes' WHERE uid='$u_uid'");
|
||||
header("location: https://misdew.com/cloud");
|
||||
}
|
||||
else {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
5
cloud/file-terms-accept.html
Normal file
5
cloud/file-terms-accept.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<h1>Are You Sure?</h1>
|
||||
You are about to agree to the <a href="https://www.misdew.com/cloud/file-terms.html">terms</a>. This will log your choice to your Misdew.com account. This cannot be undone. <br><br>
|
||||
If you change your mind, you must stop using the site completely. <br><br>
|
||||
Please email <b>me@justa.us</b> with any questions or options.<br><br>
|
||||
<a style="font-size: 40px; font-weight: bold;" onclick="return confirm('Are you sure? By continuing, you awknowledge, consent, and agree to the terms from the previous page. They are also linked at the top of this page. You understand that your choice cannot be undone. If you change your mind, you must stop using the site completely. You can also email me@justa.us for options. \n Are you sure? \n Do you agree? \n I agree to the terms.')" href="confirm-to-terms.php">This is a link taking me to a web page where my choice to confirm that I awknowledge, consent, and agree to the terms from the previous page is logged and stored for my account. The terms are also linked at the top of this page. This cannot be undone. I understand. If I change my mind, I must stop using the site completely. I can also send an email to me@justa.us for options.</a> <br><br>
|
||||
84
cloud/file-terms.html
Normal file
84
cloud/file-terms.html
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
Effective date: February 15, 2021 <br>
|
||||
Updated Date: March 28, 2021
|
||||
<br><br>
|
||||
The website <a href="https://www.misdew.com/privacy-policy.html">Privacy Policy</a> still applies.
|
||||
<br><br>
|
||||
This is an additional policy / extra terms on top of that. <br><br>
|
||||
Misdew ("us", "we", or "our") operates the misdew.com website as well as the upl.justa.us / justa.us / misdew-ds.com website (the "Service").
|
||||
<br><br>
|
||||
This page informs you of our policies regarding the collection, use, and disclosure of personal data when you use our Service and the choices you have associated with that data.
|
||||
<br><br>
|
||||
We use your data to provide and improve the Service. By using the Service, you agree to the collection and use of information in accordance with this policy. Unless otherwise defined in this Privacy Policy, terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, accessible from misdew.com
|
||||
|
||||
<h1>File Upload Availability</h1>
|
||||
You must read and agree to these terms in order to upload files to Misdew / Misdew.com / upl.justa.us / justa.us / misdew-ds.com
|
||||
<br><br>
|
||||
By uploading files, you agree to these terms.
|
||||
<br><br>
|
||||
You are not required to agree to these terms if you do not want to upload files. Agreeing to these terms are optional if you do not want to use the file upload service. You do not have to use file uploads on our service.
|
||||
|
||||
<h1>File Storage Location / Transfer of Data</h1>
|
||||
Files uploaded to Misdew / Misdew.com / upl.justa.us / justa.us / misdew-ds.com are stored on a server located in Indiana, United States. <br><br>
|
||||
The files are not encrypted or secure. <br><br>
|
||||
Your information, including Personal Data, may be transferred to — and maintained on — computers located outside of your state, province, country or other governmental jurisdiction where the data protection laws may differ than those from your jurisdiction.
|
||||
<br><br>
|
||||
If you are located outside United States and choose to provide information to us, please note that we transfer the data, including Personal Data, to United States and process it there.
|
||||
<br><br>
|
||||
Your consent to this Privacy Policy / Terms followed by your submission of such information represents your agreement to that transfer.
|
||||
|
||||
<h1>Cloud Disclaimer</h1>
|
||||
All of the files that you upload to Misdew are stored on a server shared by Misdew.com / upl.justa.us / justa.us / misdew-ds.com <br><br>
|
||||
You can view and manage your files in the Cloud app on Misdew.com<br><br>
|
||||
If your account on Misdew is ever banned, jailed, blocked, or you are unable to access your Misdew.com account for some reason, contact the email me@justa.us if you would like to view or delete your files. We may request verification to prove you are the original owner of the files.<br><br>
|
||||
We recommend that you bookmark this page / save the <b>me@justa.us</b> email just in case<br><br>
|
||||
By uploading files to Misdew.com / upl.justa.us / justa.us / misdew-ds.com, you agree to these terms.<br><br>
|
||||
You must agree to these terms to upload files.<br><br>
|
||||
File uploads to Misdew / Misdew.com / upl.justa.us / justa.us / misdew-ds.com are not encrypted or secure.<br><br>
|
||||
Metadata is not removed from uploaded files (such as location/device info). Please be aware of this.<br><br>
|
||||
Update: March 24, 2021: We now have a system in place to remove metadata from JPG and JPEG files. It isn't perfect but works for the most part.<br><br>
|
||||
Anyone can access a file if they have or find its link. If anyone gains access to the storage media or server, be it remotely or physically, they can access / view your files.<br><br>
|
||||
All files uploaded are linked to a Misdew / Misdew.com / misdew-ds.com account.<br><br>
|
||||
Files can become corrupt, broken, or deleted at any time.<br><br>
|
||||
You are responsible for your files- not Misdew / upl.justa.us / justa.us / misdew-ds.com or the webmaster. <br><br>
|
||||
Your access to this service can be restricted or disabled at any time, with or without notice.
|
||||
|
||||
<h1>Tracking</h1>
|
||||
Metadata is not removed from uploaded files. Any identifiable information in file metadata will be accessible to anyone who accesses / views your files. For example, some devices log your GPS location when you take a photo. This information is NOT removed when you upload files using our service. <br><br>
|
||||
Update: March 24, 2021: We now have a system in place to remove metadata from JPG and JPEG files. It isn't perfect but works for the most part.<br><br>
|
||||
|
||||
<h1>Uploaded Content</h1>
|
||||
You agree to not upload any illegal content / files. <br><br>
|
||||
You agree to not upload any malicious content / files. <br><br>
|
||||
You agree to not upload any viruses/trojans/etc. <br><br>
|
||||
You are liable and responsible for the content / files that you upload. <br><br>
|
||||
Misdew / Misdew.com / upl.justa.us / justa.us / misdew-ds.com is not responsible for file uploads- the person uploading them originally is.
|
||||
|
||||
<h1>Privacy of Files</h1>
|
||||
Your files/content are not private. <br><br>
|
||||
The webmaster and anyone of their choice (i.e. chosen moderators on Misdew.com) may view / modify / delete uploaded files/content at any time. <br><br>
|
||||
This is to ensure that the terms are being followed. <br><br>
|
||||
We are not responsible for any files accessed, breached, downloaded, copied, saved, transferred, modified, viewed, or deleted by anyone.
|
||||
|
||||
<h1>File Sharing</h1>
|
||||
Uploaded files are shared with misdew-ds.com, a separate version of Misdew.com that is connected to the main site. <br><br>
|
||||
Files there are served without encryption - meaning that by default they are using http:// instead of https:// (SSL) <br><br>
|
||||
misdew-ds.com is hosted on the same server as Misdew.com - it just has a different domain name and lacks enforcement of https:// (SSL)
|
||||
|
||||
<h1>Changes To This Privacy Policy / Terms</h1>
|
||||
We may update our Privacy Policy / Terms from time to time. We will notify you of any changes by posting the new Privacy Policy / Terms on this page. <br><br>
|
||||
These terms can change at any time, with or without notice.
|
||||
<br><br>
|
||||
We will let you know via a prominent notice on our Service, prior to the change becoming effective and update the "effective date" at the top of this Privacy Policy.
|
||||
<br><br>
|
||||
You are advised to review this Privacy Policy / Terms periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page.
|
||||
<br><br>
|
||||
<h1>Contact Us</h1>
|
||||
If you have any questions about this Privacy Policy, please contact us by email: me@justa.us
|
||||
<h1>These Terms & You</h1>
|
||||
By clicking the link below, I awknowledge and agree to these terms. I understand that my files are not private. My files are not secure. I agree to not upload any illegal or malicious content/files.
|
||||
I understand that my content may be periodically reviewed/modified/removed at any time by the webmaster and anyone else of their choice. I agree and understand that metadata with personal identifiable information will not be removed when I upload content/files.
|
||||
I understand and agree that I am solely responsible for the files/content that I upload. I understand that these terms can change at any time, with or without notice. <br><br>
|
||||
I agree to these terms in their entirety. I understand. <br><br>
|
||||
By clicking the link below, I awknowledge, consent, and agree to these terms. <br><br><br>
|
||||
|
||||
<a onclick="return confirm('Are you sure? By continuing, you awknowledge, consent, and agree to the terms on this page. You understand that your choice cannot be undone. If you change your mind, you must stop using the site completely. You can also email me@justa.us for options. \n Are you sure?')" href="files-terms-accept.php">This is a link taking me to a web page where I confirm that I awknowledge, consent, and agree to these terms. This cannot be undone. I understand. If I change my mind, I must stop using the site completely. I can also send an email to me@justa.us for options.</a> <br><br>
|
||||
133
cloud/file_prev.php
Normal file
133
cloud/file_prev.php
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
<?php
|
||||
$conx = mysqli_connect("127.0.0.1","uploads","ur own password here","uploads");
|
||||
if(mysqli_connect_errno($conx)) {
|
||||
exit();
|
||||
}
|
||||
|
||||
function formatSizeUnits($bytes)
|
||||
{
|
||||
if ($bytes >= 1073741824)
|
||||
{
|
||||
$bytes = number_format($bytes / 1073741824, 2) . ' GB';
|
||||
}
|
||||
elseif ($bytes >= 1048576)
|
||||
{
|
||||
$bytes = number_format($bytes / 1048576, 2) . ' MB';
|
||||
}
|
||||
elseif ($bytes >= 1024)
|
||||
{
|
||||
$bytes = number_format($bytes / 1024, 2) . ' KB';
|
||||
}
|
||||
elseif ($bytes > 1)
|
||||
{
|
||||
$bytes = $bytes . ' bytes';
|
||||
}
|
||||
elseif ($bytes == 1)
|
||||
{
|
||||
$bytes = $bytes . ' byte';
|
||||
}
|
||||
else
|
||||
{
|
||||
$bytes = '0 bytes';
|
||||
}
|
||||
|
||||
return $bytes;
|
||||
}
|
||||
|
||||
|
||||
$file_alias = $_GET['i'];
|
||||
$fileeee_uid = $_GET['z'];
|
||||
if(mysqli_num_rows($query = mysqli_query($conx, "SELECT cloud_size,file_name,filetype FROM image_uploads WHERE file_alias='$file_alias' && uid_doublecheck='$fileeee_uid'")) == '0') {
|
||||
echo "error";
|
||||
}
|
||||
$fetch = mysqli_fetch_assoc($query);
|
||||
$file_name = $fetch['file_name'];
|
||||
$file_type = $fetch['filetype'];
|
||||
$file_cloudsz = $fetch['cloud_size'];
|
||||
if($file_type == 'Video') {
|
||||
$file_location = "https://misdew.com/img/uploads/v/$file_name";
|
||||
echo "<video playsinline preload=\"metadata\" style=\"background-color: #000;width: 50%; height: auto;\" src=\"$file_location\" controls preload=\"metadata\"> </video>";
|
||||
echo "<br>";
|
||||
$vidend = "[/video]";
|
||||
echo "<textarea rows=\"4\">[video]$file_location$vidend</textarea>";
|
||||
$video_file = "../img/uploads/v/$file_name";
|
||||
$file_sizee = filesize($video_file);
|
||||
$file_sizee = formatSizeUnits($file_sizee);
|
||||
if($file_cloudsz != '') {
|
||||
echo "<span style=\"color: #808080; font-size: 12px;\"><br>This file takes up <b>~$file_sizee</b> of your Cloud storage.</span>";
|
||||
}}
|
||||
if($file_type == 'Image') {
|
||||
$file_location = "https://misdew.com/img/uploads/$file_name";
|
||||
echo "<img src=\"$file_location\" style=\"width: 50%;\">";
|
||||
echo "<br>";
|
||||
$imgend = "[/img]";
|
||||
echo "<textarea rows=\"4\">[img]$file_location$imgend</textarea>";
|
||||
$image_file = "../img/uploads/$file_name";
|
||||
$file_sizee = filesize($image_file);
|
||||
$file_sizee = formatSizeUnits($file_sizee);
|
||||
if($file_cloudsz != '') {
|
||||
echo "<span style=\"color: #808080; font-size: 12px;\"><br>This file takes up <b>~$file_sizee</b> of your Cloud storage.</span>";
|
||||
}
|
||||
$exif = @exif_read_data($image_file, 0, true);
|
||||
$brand = $exif["IFD0"]["Make"];
|
||||
$camera = $exif["IFD0"]["Model"];
|
||||
$software = $exif["IFD0"]["Software"];
|
||||
$filesize = $exif["FILE"]["FileSize"];
|
||||
$date_time = $exif["IFD0"]["DateTime"];
|
||||
$width = $exif["COMPUTED"]["Width"];
|
||||
$height = $exif["COMPUTED"]["Height"];
|
||||
$aperture = $exif["COMPUTED"]["ApertureFNumber"];
|
||||
$shutter_speed = $exif["EXIF"]["ExposureTime"];
|
||||
$iso = $exif["EXIF"]["ISOSpeedRatings"];
|
||||
$focal_length = $exif["EXIF"]["FocalLength"];
|
||||
$lens = $exif["EXIF"]["UndefinedTag:0xA434"];
|
||||
$fl_calc = eval('return ' . $focal_length . ';');
|
||||
$focal_length_mm = "$fl_calc";
|
||||
|
||||
$exiiif = @exif_read_data($image_file);
|
||||
$lat = $exiiif["GPSLatitude"];
|
||||
|
||||
if($brand != '') {
|
||||
$brand = "<br> <b>Device:</b> $brand <br>";
|
||||
}
|
||||
if($camera != '') {
|
||||
$camera = "<b>Model:</b> $camera <br>";
|
||||
}
|
||||
if($software != '') {
|
||||
$software = "<b>Software:</b> $software <br>";
|
||||
}
|
||||
if($width != '') {
|
||||
$size = "<br> <b>Resolution:</b> $height x $width<br>";
|
||||
}
|
||||
if($filesize != '') {
|
||||
$filesize = "<b>File Size:</b> $filesize<br>";
|
||||
}
|
||||
if($date_time != '') {
|
||||
$date_time = "<b>Date / Time:</b> $date_time <br>";
|
||||
}
|
||||
if($aperture != '') {
|
||||
$aperture = "<b>Aperture:</b> $aperture <br>";
|
||||
}
|
||||
if($shutter_speed != '') {
|
||||
$shutter_speed = "<b>Shutter Speed:</b> $shutter_speed <br>";
|
||||
}
|
||||
if($iso != '') {
|
||||
$iso = "<b>ISO:</b> $iso <br>";
|
||||
}
|
||||
if($focal_length != '') {
|
||||
$focal_length = "<b>Focal Length:</b> $focal_length <br>";
|
||||
}
|
||||
if($focal_length_mm != 0) {
|
||||
$focal_length_mm = "<b>Focal Length (mm):</b> $focal_length_mm mm <br>";
|
||||
}
|
||||
if($lens != '') {
|
||||
$lens = "<b>Lens:</b> $lens <br>";
|
||||
}
|
||||
if($lat != '') {
|
||||
$lat = "<br><br> <b><i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i><i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i> There are GPS location coordinates attached to this file. <i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i><i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i><br>
|
||||
<i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i><i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i> Anyone with access to this file can see the GPS coordinates. <i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i><i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i><br>
|
||||
<i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i><i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i> We highly advise that you delete this photo for your privacy. <i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i><i class=\"fa fa-exclamation fa-lg\" aria-hidden=\"true\"></i><br></b>";
|
||||
}
|
||||
echo "<span style=\"color: #808080; font-size: 12px;\"><br>If there is any EXIF/metadata for this image, it will be shown below. $lat$brand$camera$software$size$filesize$date_time$aperture$shutter_speed$iso$focal_length$focal_length_mm$lens</span>";
|
||||
}
|
||||
?>
|
||||
8
cloud/files-terms-accept.php
Normal file
8
cloud/files-terms-accept.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
?>
|
||||
<h1>Are You Sure?</h1>
|
||||
You are about to agree to the <a href="https://www.misdew.com/cloud/file-terms.html">terms</a>. This will log your choice to your Misdew.com account. This cannot be undone. <br><br>
|
||||
If you change your mind, you must stop using the site completely. <br><br>
|
||||
Please email <b>me@justa.us</b> with any questions or options.<br><br>
|
||||
<a style="font-size: 40px; font-weight: bold;" onclick="return confirm('Are you sure? By continuing, you awknowledge, consent, and agree to the terms from the previous page. They are also linked at the top of this page. You understand that your choice cannot be undone. If you change your mind, you must stop using the site completely. You can also email me@justa.us for options. \n Are you sure? \n Do you agree? \n I agree to the terms.')" href="confirm-to-terms.php?vkey=<?php echo $u_token; ?>">This is a link taking me to a web page where my choice to confirm that I awknowledge, consent, and agree to the terms from the previous page is logged and stored for my account. The terms are also linked at the top of this page. This cannot be undone. I understand. If I change my mind, I must stop using the site completely. I can also send an email to me@justa.us for options.</a> <br><br>
|
||||
299
cloud/index.php
299
cloud/index.php
|
|
@ -1 +1,300 @@
|
|||
<?php
|
||||
$this_page = "cloud";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
# # # # # # #
|
||||
# WEBSITE LOCATION #
|
||||
# # # # # # #
|
||||
if($u_siteloc != '/cloud') {
|
||||
$loc_desc = "floatin\' in the cloud";
|
||||
mysqli_query($conx, "UPDATE accounts SET site_locdesc='$loc_desc' WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE accounts SET site_locurl='/cloud' WHERE uid='$u_uid'");
|
||||
}
|
||||
function formatSizeUnits($bytes)
|
||||
{
|
||||
if ($bytes >= 1073741824)
|
||||
{
|
||||
$bytes = number_format($bytes / 1073741824, 2) . ' GB';
|
||||
}
|
||||
elseif ($bytes >= 1048576)
|
||||
{
|
||||
$bytes = number_format($bytes / 1048576, 2) . ' MB';
|
||||
}
|
||||
elseif ($bytes >= 1024)
|
||||
{
|
||||
$bytes = number_format($bytes / 1024, 2) . ' KB';
|
||||
}
|
||||
elseif ($bytes > 1)
|
||||
{
|
||||
$bytes = $bytes . ' bytes';
|
||||
}
|
||||
elseif ($bytes == 1)
|
||||
{
|
||||
$bytes = $bytes . ' byte';
|
||||
}
|
||||
else
|
||||
{
|
||||
$bytes = '0 bytes';
|
||||
}
|
||||
|
||||
return $bytes;
|
||||
}
|
||||
$cloudx_storage = formatSizeUnits($u_cloud_storage);
|
||||
$cloudx_usage = formatSizeUnits($u_cloud_usage);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Cloud - Misdew</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="We are a fairly cool social network.">
|
||||
<meta name="keywords" content="Misdew, MD, Social, Network, Communication, 3DS, DSi, Nintendo">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="google" value="notranslate">
|
||||
<meta name="theme-color" content="<?php echo $meta_theme_color; ?>">
|
||||
<?php
|
||||
if($css_type == "sheet") {
|
||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$g_sheet\">";
|
||||
}
|
||||
if($css_type == "raw") {
|
||||
echo "<style type=\"text/css\">$g_raw</style>";
|
||||
}
|
||||
$cloudxx = mysqli_connect("127.0.0.1","uploads","ur own pw","uploads");
|
||||
if(mysqli_connect_errno($cloudxx)) {
|
||||
exit();
|
||||
}
|
||||
$flecnt = mysqli_query($cloudxx, "SELECT * FROM image_uploads WHERE uid='$u_uid' && uid_doublecheck='$u_uid' ORDER BY id DESC");
|
||||
$cloud_count = mysqli_num_rows($flecnt);
|
||||
$cloud_count = number_format($cloud_count);
|
||||
// image count
|
||||
$imgflecnt = mysqli_query($cloudxx, "SELECT * FROM image_uploads WHERE uid='$u_uid' && uid_doublecheck='$u_uid' && filetype='Image' ORDER BY id DESC");
|
||||
$imgcloud_count = mysqli_num_rows($imgflecnt);
|
||||
$imgcloud_count = number_format($imgcloud_count);
|
||||
// video count
|
||||
$vidflecnt = mysqli_query($cloudxx, "SELECT * FROM image_uploads WHERE uid='$u_uid' && uid_doublecheck='$u_uid' && filetype='Video' ORDER BY id DESC");
|
||||
$vidcloud_count = mysqli_num_rows($vidflecnt);
|
||||
$vidcloud_count = number_format($vidcloud_count);
|
||||
?>
|
||||
<link rel="icon" type="image/png" href="/img/favicon.png">
|
||||
<link rel="apple-touch-icon" href="/img/logo.png">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<body>
|
||||
<center>
|
||||
<?php
|
||||
$back_button = true;
|
||||
$linebreak = false;
|
||||
$alerts = true;
|
||||
require_once("../inc/header.php");
|
||||
?>
|
||||
<?php
|
||||
//require_once("../inc/load_alerts.php");
|
||||
?><br>
|
||||
<div class="settings_cont" style="display: visible;">
|
||||
<span style="font-size: 12px; color: #808080;"> MD Cloud v2.8</span>
|
||||
<table style="width: 100%; padding: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
Cloud Disclaimer
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
All of the files that you upload to Misdew are stored here. <br>
|
||||
You can view and manage your files in the Cloud. <br>
|
||||
By uploading files to Misdew, you agree to the <a href="file-terms.html" style="color: #0000FF;">terms.</a> <br>
|
||||
You must agree to the <a href="file-terms.html" style="color: #0000FF;">terms</a> to upload files. <br>
|
||||
File uploads to Misdew are not encrypted or secure. <br>
|
||||
Metadata is removed from JPG and JPEG files (such as location/device info). <br>
|
||||
Anyone can access a file if they have or find its link. <br>
|
||||
All files uploaded are linked to a Misdew account. <br>
|
||||
Files can become corrupt, broken, or deleted at any time. <br>
|
||||
You are responsible for your files- not Misdew. <br>
|
||||
Your files can be reviewed at any time- they are not private. <br>
|
||||
<?php
|
||||
if($u_cloudterms == "no") {
|
||||
echo "<span style=\"font-weight: bold; color: #FF0000;\">-- You have NOT accepted the terms for your account -- <br> -- Accepting cannot be undone; email me@justa.us for info --</span>";
|
||||
}
|
||||
else {
|
||||
echo "<span style=\"font-weight: bold; color: #4CA64C;\">-- You have accepted the terms for your account -- <br> -- This cannot be undone; email me@justa.us for info --</span> <br>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="settings_cont">
|
||||
<table style="width: 100%; padding: 8px;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_title">
|
||||
My Cloud
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="settings_desc">
|
||||
View and manage your files below. <br>
|
||||
Deleting a file may not erase it permanently (i.e., cache). <br>
|
||||
Your Cloud has <?php echo $imgcloud_count; ?> image files and <?php echo $vidcloud_count; ?> video files. <br>
|
||||
There are <?php echo $cloud_count; ?> total files in your Cloud. <br>
|
||||
You are using ~<?php echo $cloudx_usage; ?> of your <?php echo $cloudx_storage; ?> Cloud storage.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if($u_cloudterms == "no") {
|
||||
echo "
|
||||
<tr>
|
||||
<td>
|
||||
<span style=\"font-weight: bold; color: #FF0000;\" onclick=\"window.location='https://misdew.com/cloud/file-terms.html'\">
|
||||
<br>YOU MUST AGREE TO THE TERMS IN ORDER TO UPLOAD AND MANAGE FILES. THIS CANNOT BE UNDONE. PLEASE CLICK HERE TO VIEW THE TERMS.
|
||||
</span>
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
|
||||
<?php
|
||||
if($u_cloudterms == "yes") {
|
||||
//echo "<div style=\"font-family: 'Dosis', sans-serif;padding: 8px; color: #808080;\">";
|
||||
//echo "<i class=\"fa fa-list\"></i> list view</div>";
|
||||
$cloudx = mysqli_connect("127.0.0.1","uploads","ur own pw","uploads");
|
||||
if(mysqli_connect_errno($cloudx)) {
|
||||
exit();
|
||||
}
|
||||
$cloudq = mysqli_query($cloudx, "SELECT * FROM image_uploads WHERE uid='$u_uid' && uid_doublecheck='$u_uid' ORDER BY id DESC");
|
||||
while($cloudr = mysqli_fetch_assoc($cloudq)) {
|
||||
$fileid = $cloudr['id'];
|
||||
$filelocation = $cloudr['file_location'];
|
||||
$filename = $cloudr['file_alias'];
|
||||
$vfilename = $cloudr['file_name'];
|
||||
$filestamp = $cloudr['tstamp'];
|
||||
$cloud_nickname = $cloudr['nickname'];
|
||||
$upl_via = $cloudr['upl_from'];
|
||||
$upl_type = $cloudr['filetype'];
|
||||
if($upl_type == 'Video') {
|
||||
$filelocation = "https://misdew.com/img/uploads/v/$vfilename";
|
||||
$upl_icon = "<i class=\"fa fa-film\" aria-hidden=\"true\"></i>";
|
||||
$video_file = "../img/uploads/v/$file_name";
|
||||
$file_sizee = filesize($video_file);
|
||||
//$file_sizee = formatSizeUnits($file_sizee);
|
||||
}
|
||||
if($upl_type == 'Image') {
|
||||
$filelocation = "https://misdew.com/img/uploads/$vfilename";
|
||||
$upl_icon = "<i class=\"fa fa-image\" aria-hidden=\"true\"></i>";
|
||||
$image_file = "../img/uploads/$file_name";
|
||||
$file_sizee = filesize($image_file);
|
||||
//$file_sizee = formatSizeUnits($file_sizee);
|
||||
}
|
||||
echo "<table style=\"padding: 4px; padding-left: 8px; padding-right: 8px; width: 100%; border-bottom: 1px solid #ececec;\"><tr><td style=\"width: 85%;\">";
|
||||
echo "<span style=\"font-weight: bold; color: $u_ucolor\">
|
||||
$upl_icon $cloud_nickname</span>
|
||||
<br>
|
||||
<span style=\"color: #808080; font-size: 12px;\">
|
||||
uploaded via $upl_via";
|
||||
echo " • ";
|
||||
echo timeago($filestamp);
|
||||
echo " ago</span>";
|
||||
echo "</td>";
|
||||
echo "<td><i class=\"fa fa-star-o\" aria-hidden=\"true\" onclick=\"alert('Favorite Cloud files soon.');\"></i></td>";
|
||||
echo "<td></td>";
|
||||
echo "<td></td>";
|
||||
echo "<td><i class=\"fa fa-eye\" aria-hidden=\"true\" onclick=\"showPrev('$filename');\"></i></td>";
|
||||
echo "<td></td>";
|
||||
echo "<td></td>";
|
||||
echo "<td><i class=\"fa fa-expand\" aria-hidden=\"true\" onclick=\"window.open('$filelocation');\"></i></td>";
|
||||
echo "<td></td>";
|
||||
echo "<td></td>";
|
||||
echo "<td><i class=\"fa fa-trash\" aria-hidden=\"true\" id=\"pdel_$fileid\"></i></td>";
|
||||
echo "</tr></table>";
|
||||
|
||||
|
||||
echo "<table id=\"cloud_$filename\" style=\"display: none; padding: 8px; width: 100%; border-bottom: 1px solid #808080;\"><tr><td style=\"width: 85%;\">";
|
||||
echo "<div id=\"cloudprev_$filename\"></div>";
|
||||
echo "</td></tr></table>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
require_once("../inc/footer.php");
|
||||
?>
|
||||
</center>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var Del = document.querySelectorAll("i[id^=pdel_]");
|
||||
[].forEach.call(Del, function(dt){
|
||||
dt.onclick = function(e){
|
||||
if (confirm("Delete this file? \n Deleting a file may not erase it permanently (i.e., cache). \n There may still be a cached version of this file available.")) {
|
||||
var dto = new XMLHttpRequest();
|
||||
dto.open("GET", "https://misdew.com/img/rm.php?id=" + dt.id.match(/([0-9]*)$/)[0] + "&u=<?php echo "$u_uid&upld=$u_username"; ?>", true);
|
||||
dto.onreadystatechange = function(){
|
||||
if (dto.readyState == 4)
|
||||
if(dto.status == 200) {
|
||||
alert("deleted, please refresh to verify");
|
||||
}
|
||||
else {
|
||||
alert("deleted, please refresh to verify");
|
||||
}
|
||||
};
|
||||
dto.send();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
});
|
||||
function more(id) {
|
||||
var e = document.getElementById(id);
|
||||
if(e.style.display == '') {
|
||||
e.style.display = 'none';
|
||||
}
|
||||
else {
|
||||
e.style.display = '';
|
||||
}
|
||||
}
|
||||
function showPrev(fileprev) {
|
||||
var rstr = fileprev;
|
||||
var rstt = <?php echo $u_uid; ?>;
|
||||
var e = "cloudprev_" + rstr;
|
||||
var fp = "cloud_" + fileprev;
|
||||
var e = document.getElementById(e);
|
||||
var fp = document.getElementById(fp);
|
||||
// Fetch comments for the post
|
||||
var getcmts = new XMLHttpRequest();
|
||||
getcmts.open("GET", "file_prev.php?i=" + rstr + "&&z=" + rstt, true);
|
||||
getcmts.onreadystatechange = function(){
|
||||
if(getcmts.readyState == 4)
|
||||
if(getcmts.status == 200) {
|
||||
var inn_prev = getcmts.responseText;
|
||||
document.getElementById("cloudprev_" + rstr).innerHTML = inn_prev;
|
||||
if(fp.style.display == '')
|
||||
fp.style.display = 'none';
|
||||
else
|
||||
fp.style.display = '';
|
||||
}
|
||||
else {
|
||||
alert("error getting preview");
|
||||
}
|
||||
};
|
||||
getcmts.send();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
22
cloud/rm.php
Normal file
22
cloud/rm.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
$cloudx = mysqli_connect("127.0.0.1","uploads","YOUR OWN PASSWORD HERE","uploads");
|
||||
if(mysqli_connect_errno($cloudx)) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$id = safe($_GET['id']);
|
||||
|
||||
$cloudq = mysqli_query($cloudx, "SELECT * FROM image_uploads WHERE id='$id'");
|
||||
$cloudr = mysqli_fetch_assoc($cloudq);
|
||||
$file_location = $cloudr['file_location'];
|
||||
|
||||
|
||||
//mysqli_query($conx, "DELETE FROM image_uploads WHERE id='$id'");
|
||||
|
||||
if (!unlink($file_location)) {
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue