Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!isset($_SESSION))
- {
- session_start();
- }
- ?>
- <?php
- include('../Connections/uploader.php');
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <style>
- a:link {
- text-decoration: none;
- }
- a:visited {
- text-decoration: none;
- }
- a:hover {
- text-decoration: underline;
- }
- a:active {
- text-decoration: none;
- }
- .pagecontent{
- margin-left:auto;
- margin-right:auto;
- width:500px;
- }
- </style>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Untitled Document</title>
- </head>
- <body>
- <?php require_once('http://www.domain.com/header.php'); ?>
- <div class="pagecontent">
- <h3>Your Account Stats:
- <?php
- mysql_select_db($database_uploader, $uploader);
- $query = "SELECT * FROM members WHERE uname='$loginUsername'";
- $result = mysql_query($query) or die(mysql_error());
- if (mysql_num_rows($result) > 0) {
- $row = mysql_fetch_array($result) or die(mysql_error());
- if (($row['acntStatus']) == 0) { // If account is OK
- echo "<img src='http://www.domain.com/Images/ok_checkmark_green.png' width='20' height='20' /> OK</h3>";
- mysql_close($result);
- }
- else { // If account is NOT OK
- echo "<img src='http://www.domain.com/Images/x.png' width='20' height='20' /> BAD</h3><a href='myaccount.php'>Fix this issue</a>. Contact us for more information. If your account is not fixed soon, there will be a temporary ban on it.";
- mysql_close($result);
- }
- }
- ?>
- <p>Total storage space:</p>
- <?php
- print("this is the begining");
- print("<br><TABLE border=1 cellpadding=5 cellspacing=0>\n");
- print("<TR><TH>File Name</TH><th>File Size</th><th>Delete File?</th></TR>\n");
- print("<form action=\"\" method=\"post\" id=\"deleteFiles\" name=\"deleteFiles\" >");
- if ($handle = opendir('.')) {
- while (false !== ($file = readdir($handle))) {
- if ($file != "." && $file != ".." && (!(is_dir($file)))) {
- print("<TR><TD>");
- if ((pathinfo($file, PATHINFO_EXTENSION)) == "mp4")
- {
- $_SESSION['videoFile'] = $_SESSION['user']."/".$file;
- echo "<a href=\"../../video/play.php\" target='_blank'>$file</a>\n\n"; // GOOD
- }
- else
- {
- echo "<a href=\"/$file\">$file</a>\n";
- }
- print("</td><td>");
- $fileSize = round(((filesize($file))/1024/1024),4);
- echo $fileSize." MB <br>";
- $count += 1;
- $usedStorage = $fileSize + $usedStroage;
- print("</td>");
- print ("<td align=\"center\"><input name=\"\" type=\"checkbox\" value=\"$file\" /></td>");
- }
- print("</tr>");
- }
- closedir($handle);
- print("<input name=\"submitDeletedFiles\" type=\"button\" value=\"Submit\" /></form>");
- }
- $MBAmount = 250;
- Print ("<br>You currently have uploaded $count files.<br><br>");
- $usagePercent = round($usedStorage/$MBAmount, 4);
- print("this is the end...");
- ?>
- <div id="outerPercentContainer" style="width: 500px; background-color:#FFF; border: 2px #000000 solid; position:relative;">
- <div id="actualPercentage" style="width: <?php echo $usagePercent; ?>%; background-color:#09F; font-weight:bold;">
- <div id="percentageText" style="text-align:center; width:500px;"> <?php echo $usagePercent."% of 250 MB"; ?></div>
- </div>
- </div>
- <?
- $acntstorageused = ($acntstorage / 524288000); // bytes=>MB
- $usagePercent = round($acntstorageused, 2); // round the decimal for the percentage
- $mb = number_format($acntstorage/524288000); // right now, bytes => MB
- ?>
- <br />
- <?php require_once('http://www.domain.com/footer.php'); ?></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement