location.href='index.php';"; } // DEFINE FUNCTIONS function get_random_string($valid_chars, $length) { $random_string = ""; $num_valid_chars = strlen($valid_chars); for ($i = 0; $i < $length; $i++) { $random_pick = mt_rand(1, $num_valid_chars); $random_char = $valid_chars[$random_pick - 1]; $random_string .= $random_char; } return $random_string; } function filesize_format($size, $sizes = array('Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB')) { if ($size == 0) return (''); return (round($size / pow(1024, ($i = floor(log($size, 1024)))), 2) . ' ' . $sizes[$i]); } $username = $_SESSION['username']; $query = mysql_query("select * from `users` where username = '$username'") or die("Error: " . mysql_error()); $row = mysql_fetch_array($query); if (!isset($row['keepit_dir']) || strlen($row['keepit_dir']) < 51) { $k = get_random_string("ABCDEFGHIJKLMNOPQRSTUVWYZabcdefghijklmnopqrstuvwyz0123456789", 51); mysql_query("update `users` set keepit_dir = '" . $k . "' where username = '$username'") or die("Error: " . mysql_error()); } if (!isset($_SESSION['keepit_view'])) { $_SESSION['keepit_view'] = "icon"; } ?> Keepit Cloud Office
My Cloud"; } else { /* $nowdir = "[unknown directory]"; $upperDirectory = ""; $upperName = ""; $fquery = mysql_query("select * from `keepit_docbank`") or die("Error: " . mysql_error()); while ($frow = mysql_fetch_array($fquery)) { if ($frow['id'] == $_SESSION['current_dir']) { $nowdir = $frow['title']; $upperDirectory = $frow['container']; } } if ($upperDirectory == $row['keepit_dir']) { $upperName = "My Cloud"; } else { $fquery = mysql_query("select * from `keepit_docbank`") or die("Error: " . mysql_error()); while ($frow = mysql_fetch_array($fquery)) { if ($frow['id'] == $upperDirectory) { $upperName = $frow['title']; } } } $cDir = (($upperDirectory != $row['keepit_dir'])?"... ":"") . "" . $upperName . " » " . $nowdir . ""; */ $nowdir = "[unknown directory]"; $fquery = mysql_query("select * from `keepit_docbank` where id='".$_SESSION['current_dir']."'") or die("Error: " . mysql_error()); while ($frow = mysql_fetch_array($fquery)) { $nowdir = $frow['title']; } if ($_SESSION['current_dir']==$row['keepit_dir']) { $cDir = "My Cloud"; } else { $cur = $_SESSION['current_dir']; $cDir = "" . $nowdir . ""; $upperDirectory = ""; $upperName = ""; $cName = ""; while ($cur != $row['keepit_dir']) { $fquery = mysql_query("select * from `keepit_docbank` where id='".$cur."'") or die("Error: " . mysql_error()); $frow = mysql_fetch_array($fquery); $cName = $frow['title']; $upperDirectory = $frow['container']; $fquery = mysql_query("select * from `keepit_docbank` where id='".$upperDirectory."'") or die("Error: " . mysql_error()); $frow = mysql_fetch_array($fquery); $upperName = $frow['title']; $cDir = "" . $upperName . " » " . $cDir; $cur = $upperDirectory; } $cDir = "My Cloud " . $cDir; } // echo "Current directory: " . $nowdir . " (Back to " . $upperName . ")"; } echo "
"; function getLink($id, $ext) { if ($ext == "scribe") { return "apps/scribe.php?doc=open&id=".$id; } else if ($ext == "cascade") { return "apps/cascade.php?doc=open&id=".$id; } else { return "files/".$id.".".$ext; } return ""; } ?>
File Actions View    
"; for ($i = 0; $i < count($files); $i++) { if ($types[$i] == "keepit_directory") { // echo "var node".$count." = new node('".$ids[$i]."','".$titles[$i]."','".$types[$i]."','".$sizes[$i]."');"; $t = ""; $t .= ""; //href='index.php?switchDir=".$ids[$i]."'>"; $t .= "
".$titles[$i]."Directory
"; $t .= "
\n"; echo $t; $count++; } echo "\r\n"; } for ($i = 0; $i < count($files); $i++) { if ($types[$i] != "keepit_directory") { // echo "var node".$count." = new node('".$ids[$i]."','".$titles[$i]."','".$types[$i]."','".$sizes[$i]."');"; $t = ""; $t .= ""; //href='".getLink($ids[$i],$types[$i])."' target='_blank'>"; $t .= "
".$titles[$i]."" . strtoupper($types[$i]) . " file
".filesize_format($sizes[$i])."
"; $t .= "
\n"; echo $t; $count++; } echo "\r\n"; } ?>
"; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "\r\n"; } for ($i = 0; $i < count($files); $i++) { if ($types[$i] != "keepit_directory") { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "\r\n"; } ?>
Name Size Type
Folder" . $titles[$i] . "Directory
File" . $titles[$i] . "" . filesize_format($sizes[$i]) . "" . strtoupper($types[$i]) . " file
 

Upload FileClose

Upload

Create FileClose

Choose the type of file you want to create.

Directory (folder) Scribe Document Cascade Spreadsheet (EXPERIMENTAL)

Create DirectoryClose

Give your new folder a name.

You have to be signed in to use Keepit!