commit df33b79437094ea1272db6c55bc74871826b6eda Author: Michael Zhang Date: Sun Nov 9 12:30:55 2014 -0600 added shit diff --git a/LexisSync.exe b/LexisSync.exe new file mode 100644 index 0000000..6c006c1 Binary files /dev/null and b/LexisSync.exe differ diff --git a/LexisSync.jar b/LexisSync.jar new file mode 100644 index 0000000..2ff9bae Binary files /dev/null and b/LexisSync.jar differ diff --git a/about.php b/about.php new file mode 100644 index 0000000..6be479b --- /dev/null +++ b/about.php @@ -0,0 +1,157 @@ + + + + + + + +About LEXIS + + + + +
+ +
LEXIS Cloud Office +A new dimension of cloud computing.
+ + + + + + + + + + + + + + + + + +
+ Take your files with you ... everywhere.

+ With the new cloud computing technology of now, you can carry your files from one place to another with great ease. With a click of a button, your files will be saved not only on your work computer, but also your home computer, your phone, your tablet, or whatever other device you use. All your files are saved on our servers safely, you can access them whenever you want... wherever you want. +
+ Accidents happen, and you lose your files ... or not?

+ Your files are always safe. Don't ever worry about losing your files again when you have an accident. When you get a new device, simply install the new LEXIS app, and then all your files are back! +
+ Easy-to-use, intuitive, built-in apps!

+ At this point, you must be thinking "Office apps? In your browser? You must be kidding!" Nope, we're not. We're totally serious about this. You get the full features of apps like Microsoft Word, PowerPoint, Excel, etc. all in the convenience of your browser. Never have to worry about buying office apps again! +
+ Free ... ? It can't be!

+ It's true. Once you sign up for an ANIXO account, you get 10 gigabytes of free storage. You can use this storage however you want, and you can also expand this space! Simply buy another LEXIS Office Floorplan and you'll have more space in no time! +
+ Stats? Just for curious people.

+ So far, we are storing a total of . We started this project close to the start of ANIXO Specifications, estimated to be around August 28, 2012 ( days ago). +
+
+ LEXIS © 2012- by Michael Zhang, ANIXO Specifications. +
+
+ + +
+ + \ No newline at end of file diff --git a/ajax/deleteFile.php b/ajax/deleteFile.php new file mode 100644 index 0000000..33ad517 --- /dev/null +++ b/ajax/deleteFile.php @@ -0,0 +1,9 @@ + +hai \ No newline at end of file diff --git a/ajax/getTitleForID.php b/ajax/getTitleForID.php new file mode 100644 index 0000000..dc00716 --- /dev/null +++ b/ajax/getTitleForID.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/ajax/previewPane.php b/ajax/previewPane.php new file mode 100644 index 0000000..8387b4e --- /dev/null +++ b/ajax/previewPane.php @@ -0,0 +1,200 @@ + + + + + + + +1) { + + if ($row['type'] != "lexis_directory") { + $filesize = filesize("../files/".$id.".".$row['type']); + } else { + $filesize = filesize_of_folder($row['id']); + } + + 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 ""; + } + function getIconURL($ext) { + if ($ext=="lexis_directory") { + return "images/folder.png"; + } else { + $x = scandir("../icons/"); + if (in_array($ext.".png",$x)) { + return "icons/".$ext.".png"; + } else { + return "images/file.png"; + } + } + } + function filesize_format($size) { + $i = -1; + $byteUnits = array(' KB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB'); + do { + $size = $size / 1024; + $i++; + } while ($size > 1024); + return round(max($size, 0.1),1) ." ". $byteUnits[$i]; + }; + + ?> + + + + + +
+ + + +
+ + + + ".$row['type'].""; ?> +
+ + + + Type: + Size: +
+ +

 

+ +
+ Rename
Download
Delete +
+ +

 

+ +
+ + Folder contents: + + + Zipped folder contents: +
+
    + open("../files/".$row['id'].".zip"); + if ($res == TRUE) { + $zip->extractTo('../temp/'.$row['id'].'/'); + $zip->close(); + $contents = scandir("../temp/".$row['id']."/",0); + foreach ($contents as $item) { + echo "
  •  ".$item."
  • "; + } + } else { + echo 'Failed to open contents.'; + } ?> +
+
+ + No preview available. + +
+ + + + + + Something went wrong... sorry!] + + \ No newline at end of file diff --git a/ajax/searchAjax.php b/ajax/searchAjax.php new file mode 100644 index 0000000..4931dc8 --- /dev/null +++ b/ajax/searchAjax.php @@ -0,0 +1,118 @@ + + + 15) { + return substr($text,0,15)."..."; + } else { + return $text; + } +} + +if ($_SESSION['logged']==1) { + $words = $_POST['words']; + $words = strtolower(trim($words)); + if (isset($words) && strlen($words)>0) { + $not_allowed = array("\"","\'","\\",";","(",")","-"); + foreach ($not_allowed as $char) { + $words = str_replace($char,"",$words); + } + echo "

Your search query: ".$words."

"; + + /* + PROCEDURE: + 1. GET ALL THE FILES WITH THE SEARCH QUERY IN FILENAME + 2. GET ALL THE FILES WITH THE SEARCH QUERY IN CONTENTS + */ + $locus = array(); + $terms = explode(" ",$words); + + include ("../../auth.inc.php"); + $fquery = mysql_query("select * from `lexis_docbank` where owner='".$_SESSION['username']."'") or die("Error: " . mysql_error()); + $allFiles = array(); + while($file= mysql_fetch_array($fquery)) { + array_push($allFiles,$file); + } + + foreach ($allFiles as $file) { + $title = strtolower($file['title']); + $b = FALSE; + foreach ($terms as $term) { + if (strlen($term)>0) { + if (strpos($title,$term)!==FALSE) { + $b = TRUE; + } + } else { + $b = FALSE; + } + } + if ($b) { + array_push($locus,$file); + } + } + + if (count($locus)>0) { + echo ""; + } else { + echo "No files found. Sorry :("; + } + } + else { + echo "

You must enter a search string.

"; + } +} else { + echo "

You must be logged in.

"; +} + +?> \ No newline at end of file diff --git a/ajax/switchView.php b/ajax/switchView.php new file mode 100644 index 0000000..b8b008e --- /dev/null +++ b/ajax/switchView.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/apps/cascade.php b/apps/cascade.php new file mode 100644 index 0000000..10fe361 --- /dev/null +++ b/apps/cascade.php @@ -0,0 +1,487 @@ +" . $nowdir . " (Back to " . $upperName . ")"; +} + +?> + + + + + + + + by ANIXO Specifications." /> + Cascade Spreadsheet + + + + + + + + + + + +
+
CASCADE
+
Untitled Spreadsheet
    +
+ Ready. +
+
+ Home + Insert + View + Design + Page Layout + Review +
+
+
+ + +
+
+
+

Retitle SpreadsheetClose

+ +

Rename

+ +
+
+ + + + +

You must be signed in to use the LEXIS Cloud Office.

+

Hover over to the right to reveal the sign in page!

+ + + + \ No newline at end of file diff --git a/apps/cascadeSave.php b/apps/cascadeSave.php new file mode 100644 index 0000000..349ca15 --- /dev/null +++ b/apps/cascadeSave.php @@ -0,0 +1,41 @@ +alert('".$file."');"; + +if (file_exists($file)) { + unlink($file); + file_put_contents($file, $contents) or die ("Error"); + mysql_query("update lexis_docbank set title='$title' where id='$id' and owner='$owner'") or die(mysql_error()); +} else { + $query = mysql_query("insert into lexis_docbank (id,title,container,owner,type) values('$id','$title','$dir','$owner','cascade')") or die("Can't connect: ".mysql_error()); + file_put_contents($file, $contents) or die ("Error"); +} + +/*$fh = fopen($file, 'w'); +fwrite($fh, $contents); +fclose($fh);*/ + + +echo "All changes saved!"; + +?> \ No newline at end of file diff --git a/apps/images/close.png b/apps/images/close.png new file mode 100644 index 0000000..c6f5773 Binary files /dev/null and b/apps/images/close.png differ diff --git a/apps/images/copy.png b/apps/images/copy.png new file mode 100644 index 0000000..ade0dab Binary files /dev/null and b/apps/images/copy.png differ diff --git a/apps/images/cut.png b/apps/images/cut.png new file mode 100644 index 0000000..c9beaf0 Binary files /dev/null and b/apps/images/cut.png differ diff --git a/apps/images/new.png b/apps/images/new.png new file mode 100644 index 0000000..8c16926 Binary files /dev/null and b/apps/images/new.png differ diff --git a/apps/images/paste.png b/apps/images/paste.png new file mode 100644 index 0000000..21e7165 Binary files /dev/null and b/apps/images/paste.png differ diff --git a/apps/images/save.png b/apps/images/save.png new file mode 100644 index 0000000..bcf5405 Binary files /dev/null and b/apps/images/save.png differ diff --git a/apps/scribe.php b/apps/scribe.php new file mode 100644 index 0000000..996746b --- /dev/null +++ b/apps/scribe.php @@ -0,0 +1,575 @@ +" . $nowdir . " (Back to " . $upperName . ")"; +} + +?> + + + + + + + + by ANIXO Specifications." /> + Scribe Word Editor + + + + + + + +
+ + + +
+
SCRIBE
+
    +
+ Ready. +
+ +
+
+
+ + + +
+
+
+

Retitle DocumentClose

+ +

Rename

+ +
+
+ + + + +

You must be signed in to use the LEXIS Cloud Office.

+

Hover over to the right to reveal the sign in page!

+ + + + + \ No newline at end of file diff --git a/apps/scribeSave.php b/apps/scribeSave.php new file mode 100644 index 0000000..9578905 --- /dev/null +++ b/apps/scribeSave.php @@ -0,0 +1,41 @@ +alert('".$file."');"; + +if (file_exists($file)) { + unlink($file); + file_put_contents($file, $contents) or die ("Error"); + mysql_query("update lexis_docbank set title='$title' and dateMod=NOW() where id='$id' and owner='$owner'") or die(mysql_error()); +} else { + $query = mysql_query("insert into lexis_docbank (id,title,container,owner,type,dateMod) values('$id','$title','$dir','$owner','scribe',NOW())") or die("Can't connect: ".mysql_error()); + file_put_contents($file, $contents) or die ("Error"); +} + +/*$fh = fopen($file, 'w'); +fwrite($fh, $contents); +fclose($fh);*/ + + +echo "All changes saved!"; + +?> \ No newline at end of file diff --git a/apps/scribeSlideMenuAjax.php b/apps/scribeSlideMenuAjax.php new file mode 100644 index 0000000..0bd6d7e --- /dev/null +++ b/apps/scribeSlideMenuAjax.php @@ -0,0 +1,92 @@ + + + +
+ + + + + + + + + + +
New SCRIBE DocumentNewSave this DocumentSaveClose this DocumentClose
Cut Selected TextCutCopy Selected TextCopyPaste Clipboard TextPaste
+
+
+
+ + +
+ +
+
+ + +
+ + + \ No newline at end of file diff --git a/apps/shortcut.js b/apps/shortcut.js new file mode 100644 index 0000000..e569a96 --- /dev/null +++ b/apps/shortcut.js @@ -0,0 +1,223 @@ +/** + * http://www.openjs.com/scripts/events/keyboard_shortcuts/ + * Version : 2.01.B + * By Binny V A + * License : BSD + */ +shortcut = { + 'all_shortcuts':{},//All the shortcuts are stored in this array + 'add': function(shortcut_combination,callback,opt) { + //Provide a set of default options + var default_options = { + 'type':'keydown', + 'propagate':false, + 'disable_in_input':false, + 'target':document, + 'keycode':false + } + if(!opt) opt = default_options; + else { + for(var dfo in default_options) { + if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo]; + } + } + + var ele = opt.target; + if(typeof opt.target == 'string') ele = document.getElementById(opt.target); + var ths = this; + shortcut_combination = shortcut_combination.toLowerCase(); + + //The function to be called at keypress + var func = function(e) { + e = e || window.event; + + if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields + var element; + if(e.target) element=e.target; + else if(e.srcElement) element=e.srcElement; + if(element.nodeType==3) element=element.parentNode; + + if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; + } + + //Find Which key is pressed + if (e.keyCode) code = e.keyCode; + else if (e.which) code = e.which; + var character = String.fromCharCode(code).toLowerCase(); + + if(code == 188) character=","; //If the user presses , when the type is onkeydown + if(code == 190) character="."; //If the user presses , when the type is onkeydown + + var keys = shortcut_combination.split("+"); + //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked + var kp = 0; + + //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken + var shift_nums = { + "`":"~", + "1":"!", + "2":"@", + "3":"#", + "4":"$", + "5":"%", + "6":"^", + "7":"&", + "8":"*", + "9":"(", + "0":")", + "-":"_", + "=":"+", + ";":":", + "'":"\"", + ",":"<", + ".":">", + "/":"?", + "\\":"|" + } + //Special Keys - and their codes + var special_keys = { + 'esc':27, + 'escape':27, + 'tab':9, + 'space':32, + 'return':13, + 'enter':13, + 'backspace':8, + + 'scrolllock':145, + 'scroll_lock':145, + 'scroll':145, + 'capslock':20, + 'caps_lock':20, + 'caps':20, + 'numlock':144, + 'num_lock':144, + 'num':144, + + 'pause':19, + 'break':19, + + 'insert':45, + 'home':36, + 'delete':46, + 'end':35, + + 'pageup':33, + 'page_up':33, + 'pu':33, + + 'pagedown':34, + 'page_down':34, + 'pd':34, + + 'left':37, + 'up':38, + 'right':39, + 'down':40, + + 'f1':112, + 'f2':113, + 'f3':114, + 'f4':115, + 'f5':116, + 'f6':117, + 'f7':118, + 'f8':119, + 'f9':120, + 'f10':121, + 'f11':122, + 'f12':123 + } + + var modifiers = { + shift: { wanted:false, pressed:false}, + ctrl : { wanted:false, pressed:false}, + alt : { wanted:false, pressed:false}, + meta : { wanted:false, pressed:false} //Meta is Mac specific + }; + + if(e.ctrlKey) modifiers.ctrl.pressed = true; + if(e.shiftKey) modifiers.shift.pressed = true; + if(e.altKey) modifiers.alt.pressed = true; + if(e.metaKey) modifiers.meta.pressed = true; + + for(var i=0; k=keys[i],i 1) { //If it is a special key + if(special_keys[k] == code) kp++; + + } else if(opt['keycode']) { + if(opt['keycode'] == code) kp++; + + } else { //The special keys did not match + if(character == k) kp++; + else { + if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase + character = shift_nums[character]; + if(character == k) kp++; + } + } + } + } + + if(kp == keys.length && + modifiers.ctrl.pressed == modifiers.ctrl.wanted && + modifiers.shift.pressed == modifiers.shift.wanted && + modifiers.alt.pressed == modifiers.alt.wanted && + modifiers.meta.pressed == modifiers.meta.wanted) { + callback(e); + + if(!opt['propagate']) { //Stop the event + //e.cancelBubble is supported by IE - this will kill the bubbling process. + e.cancelBubble = true; + e.returnValue = false; + + //e.stopPropagation works in Firefox. + if (e.stopPropagation) { + e.stopPropagation(); + e.preventDefault(); + } + return false; + } + } + } + this.all_shortcuts[shortcut_combination] = { + 'callback':func, + 'target':ele, + 'event': opt['type'] + }; + //Attach the function with the event + if(ele.addEventListener) ele.addEventListener(opt['type'], func, false); + else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func); + else ele['on'+opt['type']] = func; + }, + + //Remove the shortcut - just specify the shortcut and I will remove the binding + 'remove':function(shortcut_combination) { + shortcut_combination = shortcut_combination.toLowerCase(); + var binding = this.all_shortcuts[shortcut_combination]; + delete(this.all_shortcuts[shortcut_combination]) + if(!binding) return; + var type = binding['event']; + var ele = binding['target']; + var callback = binding['callback']; + + if(ele.detachEvent) ele.detachEvent('on'+type, callback); + else if(ele.removeEventListener) ele.removeEventListener(type, callback, false); + else ele['on'+type] = false; + } +} \ No newline at end of file diff --git a/apps/template.php b/apps/template.php new file mode 100644 index 0000000..787e0bf --- /dev/null +++ b/apps/template.php @@ -0,0 +1,16 @@ + + + + + by ANIXO Specifications." /> + + + + + + + + + + + \ No newline at end of file diff --git a/downloadFile.php b/downloadFile.php new file mode 100644 index 0000000..fbf3012 --- /dev/null +++ b/downloadFile.php @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/dtree.css b/dtree.css new file mode 100644 index 0000000..58147cc --- /dev/null +++ b/dtree.css @@ -0,0 +1,31 @@ +/*--------------------------------------------------| +| dTree 2.05 | www.destroydrop.com/javascript/tree/ | +|---------------------------------------------------| +| Copyright (c) 2002-2003 Geir Landrö | +|--------------------------------------------------*/ + +.dtree { + white-space: nowrap; +} +.dtree img { + border: 0px; + vertical-align: middle; +} +.dtree a { + color: #333; + text-decoration: none; +} +.dtree a.node, .dtree a.nodeSel { + white-space: nowrap; + padding: 1px 2px 1px 2px; +} +.dtree a.node:hover, .dtree a.nodeSel:hover { + color: #333; + text-decoration: underline; +} +.dtree a.nodeSel { + background-color: #c0d2ec; +} +.dtree .clip { + overflow: hidden; +} \ No newline at end of file diff --git a/dtree.js b/dtree.js new file mode 100644 index 0000000..3485282 --- /dev/null +++ b/dtree.js @@ -0,0 +1,349 @@ +/*--------------------------------------------------| +| dTree 2.05 | www.destroydrop.com/javascript/tree/ | +|---------------------------------------------------| +| Copyright (c) 2002-2003 Geir Landrö | +| | +| This script can be used freely as long as all | +| copyright messages are intact. | +| | +| Updated: 17.04.2003 | +|--------------------------------------------------*/ + +// Node object +function Node(id, pid, name, url, title, target, icon, iconOpen, open) { + this.id = id; + this.pid = pid; + this.name = name; + this.url = url; + this.title = title; + this.target = target; + this.icon = icon; + this.iconOpen = iconOpen; + this._io = open || false; + this._is = false; + this._ls = false; + this._hc = false; + this._ai = 0; + this._p; +}; + +// Tree object +function dTree(objName) { + this.config = { + target : null, + folderLinks : true, + useSelection : true, + useCookies : true, + useLines : true, + useIcons : true, + useStatusText : false, + closeSameLevel : false, + inOrder : false + } + this.icon = { + root : 'images/dTree/base.png', + folder : 'images/dTree/folder.png', + folderOpen : 'images/dTree/folderopen.png', + node : 'images/dTree/page.png', + empty : 'images/dTree/empty.png', + line : 'images/dTree/line.png', + join : 'images/dTree/join.png', + joinBottom : 'images/dTree/joinbottom.png', + plus : 'images/dTree/plus.png', + plusBottom : 'images/dTree/plusbottom.png', + minus : 'images/dTree/minus.png', + minusBottom : 'images/dTree/minusbottom.png', + nlPlus : 'images/dTree/nolines_plus.png', + nlMinus : 'images/dTree/nolines_minus.png' + }; + this.obj = objName; + this.aNodes = []; + this.aIndent = []; + this.root = new Node(-1); + this.selectedNode = null; + this.selectedFound = false; + this.completed = false; +}; + +// Adds a new node to the node array +dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) { + this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open); +}; + +// Open/close all nodes +dTree.prototype.openAll = function() { + this.oAll(true); +}; +dTree.prototype.closeAll = function() { + this.oAll(false); +}; + +// Outputs the tree to the page +dTree.prototype.toString = function() { + var str = '
\n'; + if (document.getElementById) { + if (this.config.useCookies) this.selectedNode = this.getSelected(); + str += this.addNode(this.root); + } else str += 'Browser not supported.'; + str += '
'; + if (!this.selectedFound) this.selectedNode = null; + this.completed = true; + return str; +}; + +// Creates the tree structure +dTree.prototype.addNode = function(pNode) { + var str = ''; + var n=0; + if (this.config.inOrder) n = pNode._ai; + for (n; n'; + } + if (node.url) { + str += ''; + str += node.name; + if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += ''; + str += '
'; + if (node._hc) { + str += '
'; + str += this.addNode(node); + str += '
'; + } + this.aIndent.pop(); + return str; +}; + +// Adds the empty and line icons +dTree.prototype.indent = function(node, nodeId) { + var str = ''; + if (this.root.id != node.pid) { + for (var n=0; n'; + (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1); + if (node._hc) { + str += ''; + } else str += ''; + } + return str; +}; + +// Checks if a node has any children and if it is the last sibling +dTree.prototype.setCS = function(node) { + var lastId; + for (var n=0; nlocation.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_of_folder($id) { + $filesize = 0; + $fquery = mysql_query("select * from lexis_docbank where container='" . $id . "'"); + while ($frow = mysql_fetch_array($fquery)) { + if ($frow['type']=="lexis_directory") { + $filesize += filesize_of_folder($frow['id']); + } else { + $filesize += filesize("files/".$frow['id'].".".$frow['type']); + } + } + return $filesize; +} +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['lexis_dir']) || strlen($row['lexis_dir']) < 51) { + $k = get_random_string("ABCDEFGHIJKLMNOPQRSTUVWYZabcdefghijklmnopqrstuvwyz0123456789", 51); + mysql_query("update `users` set lexis_dir = '" . $k . "' where username = '$username'") or die("Error: " . mysql_error()); +} +if (!isset($_SESSION['lexis_view'])) { + $_SESSION['lexis_view'] = "icon"; +} +?> + + + LEXIS Cloud Office + + + + + + + + + + + + + + + +
+ + + + My Cloud"; + } else { + /* $nowdir = "[unknown directory]"; + $upperDirectory = ""; + $upperName = ""; + $fquery = mysql_query("select * from `lexis_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['lexis_dir']) { + $upperName = "My Cloud"; + } else { + $fquery = mysql_query("select * from `lexis_docbank`") or die("Error: " . mysql_error()); + while ($frow = mysql_fetch_array($fquery)) { + if ($frow['id'] == $upperDirectory) { + $upperName = $frow['title']; + } + } + } + $cDir = (($upperDirectory != $row['lexis_dir'])?"... ":"") . "" . $upperName . " » " . $nowdir . ""; */ + $nowdir = "[unknown directory]"; + $fquery = mysql_query("select * from `lexis_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['lexis_dir']) { + $cDir = "My Cloud"; + } else { + $cur = $_SESSION['current_dir']; + $cDir = "" . $nowdir . ""; + $upperDirectory = ""; + $upperName = ""; + $cName = ""; + while ($cur != $row['lexis_dir']) { + $fquery = mysql_query("select * from `lexis_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 `lexis_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 +     + +
+ + + +
+ +
+

Welcome to LEXIS!

+

LEXIS is a convenient place to store your files, where you can access them from different devices. To get started, head over to the top left and click the File button. There you can create or upload a file. You have 10 GB of available online storage space.

+

Thanks for using LEXIS!

+ +
+ + + + + + "; + for ($i = 0; $i < count($files); $i++) { + if ($types[$i] == "lexis_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] != "lexis_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] != "lexis_directory") { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + echo "\r\n"; + } + ?> +
NameSizeType
Folder" . $titles[$i] . "" . filesize_format($sizes[$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.

+

+

+ + +
+

+
+
+
+
+
+

Rename ItemClose

+

Rename "" to:

+

+

+ + + +
+

+
+
+ + + + +

You have to be signed in to use LEXIS!

+

 

+ + + +
+ + + \ No newline at end of file diff --git a/index_1.php b/index_1.php new file mode 100644 index 0000000..7e45c97 --- /dev/null +++ b/index_1.php @@ -0,0 +1,808 @@ +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['lexis_dir']) || strlen($row['lexis_dir']) < 51) { + $k = get_random_string("ABCDEFGHIJKLMNOPQRSTUVWYZabcdefghijklmnopqrstuvwyz0123456789", 51); + mysql_query("update `users` set lexis_dir = '" . $k . "' where username = '$username'") or die("Error: " . mysql_error()); +} +if (!isset($_SESSION['lexis_view'])) { + $_SESSION['lexis_view'] = "icon"; +} +?> + + + LEXIS Cloud Office + + + + + + + + + + + + + + +
+ + + + My Cloud"; + } else { + /* $nowdir = "[unknown directory]"; + $upperDirectory = ""; + $upperName = ""; + $fquery = mysql_query("select * from `lexis_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['lexis_dir']) { + $upperName = "My Cloud"; + } else { + $fquery = mysql_query("select * from `lexis_docbank`") or die("Error: " . mysql_error()); + while ($frow = mysql_fetch_array($fquery)) { + if ($frow['id'] == $upperDirectory) { + $upperName = $frow['title']; + } + } + } + $cDir = (($upperDirectory != $row['lexis_dir'])?"... ":"") . "" . $upperName . " » " . $nowdir . ""; */ + $nowdir = "[unknown directory]"; + $fquery = mysql_query("select * from `lexis_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['lexis_dir']) { + $cDir = "My Cloud"; + } else { + $cur = $_SESSION['current_dir']; + $cDir = "" . $nowdir . ""; + $upperDirectory = ""; + $upperName = ""; + $cName = ""; + while ($cur != $row['lexis_dir']) { + $fquery = mysql_query("select * from `lexis_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 `lexis_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] == "lexis_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] != "lexis_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] != "lexis_directory") { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + echo "\r\n"; + } + ?> +
NameSizeType
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 LEXIS! + + + +
+ + + \ No newline at end of file diff --git a/newdir.php b/newdir.php new file mode 100644 index 0000000..f51b079 --- /dev/null +++ b/newdir.php @@ -0,0 +1,32 @@ + + + + \ No newline at end of file diff --git a/rename.php b/rename.php new file mode 100644 index 0000000..9756203 --- /dev/null +++ b/rename.php @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 1.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 1.cpp new file mode 100644 index 0000000..f902e38 --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 1.cpp @@ -0,0 +1,70 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + // ********************* CONSTANTS ********************* + const double PI = 3.141592653589793238462643383279502884197; + // ********************* PROBLEM 1 ********************* + double L = 6; + double r = 5; + double TA = PI*r*L + PI*r*r; + + cout << "Total Area = " << TA << " Units squared" << endl; + + // ********************* PROBLEM 2 ********************* + double a = 7; + double b = 8.4; + + double c = sqrt(a*a + b*b); + cout << "c = " << c << endl; + + // ********************* PROBLEM 3 ********************* + double h = 0.6; + double b1 = 1.3; + double b2 = 3.5; + + double A = 0.5 * h * (b1 + b2); + cout << "Area = " << A << " Units squared" << endl; + + // ********************* PROBLEM 4 ********************* + h = 12; + r = 3; + + double volume = PI * r * r * h; + cout << "Volume = " << volume << " Units cubed" << endl; + + // ********************* PROBLEM 5 ********************* + double d1 = 3; + double d2 = 5; + double d3 = 7; + + double s = (d1 + d2 + d3) /2; + A = sqrt(s*(s-d1)*(s-d2)*(s-d3)); + + cout << "Area = " << A << " Units squared" << endl; + + // ********************* PROBLEM 6 ********************* + double diameter = 10; + + double SA = pow(diameter,2) - PI*pow(diameter/2,2); + cout << "Shaded Area = " << SA << " Units squared" << endl; + + cout << endl << endl << "done" << endl; + + return 0; +} + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 10.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 10.cpp new file mode 100644 index 0000000..043f73b --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 10.cpp @@ -0,0 +1,72 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + + // ********************* PROBLEM 1 ********************* + double a[5]; + + for (int i=0;i<5;i++) { + cout << "Please enter a number: "; + cin >> a[i]; + } + + cout << endl << "The average of your numbers is " << (a[0]+a[1]+a[2]+a[3]+a[4])/5 << "." << endl; + + cout << endl; + + // ********************* PROBLEM 2 ********************* + for (int i=0;i<5;i++) { + cout << "Please enter a number: "; + cin >> a[i]; + } + double product = a[0]*a[1]*a[2]*a[3]*a[4]; + + cout << endl << "The product of your numbers is " << product << "." << endl; + + // ********************* PROBLEM 3 ********************* + double sum = 0; + + for (int i=25;i<=50;i++) { + sum += i; + } + + cout << endl << "The sum of the consecutive integers from 25 to 50 is " << sum << "." << endl; + + // ********************* PROBLEM 3 ********************* + product = 1; + + for (int i=3;i<=11;i+=2) { + product *= i; + } + + cout << endl << "The product of the odd integers from 3 to 11 is " << product << "." << endl; + + // ********************* PROBLEM 4 ********************* + double frac = 1, decimal = 1; + + for (int i=2;i<=6;i++) { + frac *= i; + decimal /= i; + } + + cout << endl << "The product of 1/2, 1/3, 1/4, 1/5, and 1/6 is 1/" << frac << ", or " << decimal << "." << endl; + + return 0; +} + + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 11.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 11.cpp new file mode 100644 index 0000000..98ae460 --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 11.cpp @@ -0,0 +1,96 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + + // ********************* PROBLEM 1 ********************* + for (int i=0;i<4;i++) { + for (int j=7;j<=10;j++) { + cout << j << " "; + } + cout << endl; + } + + cout << endl; + for (int i=0;i<4;i++) { + cout << "* "; + for (int j=2;j<=10;j+=2) { + cout << j << " "; + } + cout << endl; + } + + cout << endl; + for (int i=0;i<4;i++) { + for (int j=1;j<=4;j++) { + cout << j << " "; + } + cout << "0 "; + for (int j=6;j<=9;j++) { + cout << j << " "; + } + cout << endl; + } + + cout << endl; + + // ********************* PROBLEM 2 ********************* + for (int i=0;i<3;i++) { + for (int j=0;j<3;j++) { + cout << "A " << (j+1) << " "; + } + cout << endl; + } + + cout << endl; + for (int i=0;i<4;i++) { + cout << "<"; + for (int j=0;j<10;j++) { + cout << "*"; + } + cout << ">" << endl; + } + + cout << endl; + for (int i=0;i<6;i++) { + for (int j=1;j<=4;j++) { + if (i%2==0) + cout << j << " "; + else + cout << 5-j << " "; + } + cout << endl; + } + + cout << endl; + + // ********************* PROBLEM 3 ********************* + for (int i=0;i<3;i++) { + cout << "$ "; + for (int j=0;j<3;j++) { + if (j > 0) cout << "# "; + for (int k=1;k<=5;k++) { + cout << k << " "; + } + } + cout << "$" << endl; + } + + return 0; +} + + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 12.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 12.cpp new file mode 100644 index 0000000..cc195a2 --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 12.cpp @@ -0,0 +1,61 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + + // ********************* PROBLEM 1 ********************* + ifstream f1; + f1.open("nbrs1.dat"); + + double data; + while (f1 >> data) { + if (data > 25) { + cout << data << endl; + } + } + + cout << endl; + + // ********************* PROBLEM 2 ********************* + double S = 25, R, D, T; + + cout << fixed; + + cout << "Speed (MPH)\tReaction Dist\tBraking Dist\tTotal Dist" << endl; + do { + R = S*5200/7200; + D = 0.06*S*S; + T = R+D; + cout << setprecision(1) << S << "\t\t" << R << "\t\t" << D << "\t\t" << T << endl; + S += 5; + } while (S <= 90); + + // ********************* PROBLEM 3 ********************* + int Y = 1; + double amount = 500; + + cout << "Year\tAmount" << endl; + do { + amount *= 1.05; + cout << setprecision(2) << Y << "\t$" << amount << endl; + Y += 1; + } while (Y <= 10); + + return 0; +} + + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 13.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 13.cpp new file mode 100644 index 0000000..9427862 --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 13.cpp @@ -0,0 +1,67 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + + // ********************* PROBLEM 1 ********************* + double population = 1700; + for (int i=0;i<8;i++) { + population *= 1.04; + } + cout << "At Malcolm Community College, there will be " << (int) population << " students in 8 years." << endl; + + cout << endl; + // ********************* PROBLEM 2 ********************* + + ifstream f1; + f1.open("jobs.dat"); + + cout << fixed; + + double a,b; + while (f1 >> a >> b) { + cout << "When Ann Sparks worked " << setprecision(0) << a << " hours at $" << setprecision(2) << b << " per hour she earned $" << a*b << "." << endl; + } + + cout << endl; + // ********************* PROBLEM 3 ********************* + + ifstream f2; + f2.open("rooms.dat"); + + double sum; + + while (f2 >> a >> b) { + sum += a*b; + } + + cout << "Mr. Thomas' building has " << setprecision(0) << sum << " square feet of floor space." << endl; + + cout << endl; + // ********************* PROBLEM 5 ********************* + + double value = 37000; + for (int i=0;i<5;i++) { + value *= 0.75; + } + + cout << "Hook-U's truck is worth $" << setprecision(2) << value << " in 5 years." << endl; + + return 0; +} + + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 14.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 14.cpp new file mode 100644 index 0000000..036d32e --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 14.cpp @@ -0,0 +1,79 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + + // ********************* PROBLEM 1 ********************* + double a,b; + ifstream f1; + f1.open("p14_1.dat"); + + while (f1 >> a >> b) { + if (a<0) { + cout << a*b << endl; + } else { + cout << a+b << endl; + } + } + + cout << endl; + // ********************* PROBLEM 2 ********************* + ifstream f2; + f2.open("p14_2.dat"); + + while (f2 >> a >> b) { + if (a>0) { + if (b<0) { + cout << a << endl; + } else { + cout << b << endl; + } + } else { + cout << a+b << endl; + } + } + + cout << endl; + // ********************* PROBLEM 3 ********************* + + string c; + ifstream f3; + f3.open("p14_3.dat"); + + cout << fixed; + + cout << "EMPLOYEE\tREGULAR HOURLY RATE\tNUMBER OF HOURS WORKED\tPAY" << endl; + while (f3 >> c >> a >> b) { + string q = ""; + if (c.length() < 8) q = "\t\t"; else q = "\t"; + + double pay = 0; + if (b<=40) { + pay = a*b; + } else { + pay = a*40; + b -= 40; + pay += 1.5*a*b; + } + + cout << setprecision(2) << c << q << a << "\t\t\t" << b << "\t\t\t" << pay << endl; + } + + return 0; +} + + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 2.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 2.cpp new file mode 100644 index 0000000..808e22f --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 2.cpp @@ -0,0 +1,51 @@ +// +// main.cpp +// Program 2 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + + // ********************* PROBLEM 1 ********************* + double C = 30; + double F = 9*C/5 + 32; + cout << "CELSIUS\tFAHRENHEIT" << endl << C << "\t\t" << F << endl << endl; + + // ********************* PROBLEM 2 ********************* + double A = 78000; + double R = 6.45; + double T = A * R / 100; + + cout << "The tax on a house with an assessed value of $" << A << " and a tax rate of $" << R << "per $100 is $" << T << "." << endl << endl; + + // ********************* PROBLEM 3 ********************* + double T1 = 89; + double T2 = 72; + double T3 = 86; + + double average = (T1 + T2 + T3) / 3; + cout << "test1\ttest2\ttest3\taverage" << endl << T1 << "\t\t" << T2 << "\t\t" << T3 << "\t\t" << average << endl << endl; + + // ********************* PROBLEM 4 ********************* + double H = 38; + R = 4.75; + + double P = H * R; + cout << "Todd worked " << H << " hours at a rate of $" << R << " and earned $" << P << "." << endl; + + cout << endl << endl << "done" << endl; + + return 0; +} + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 3.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 3.cpp new file mode 100644 index 0000000..15e2fb6 --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 3.cpp @@ -0,0 +1,56 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + cout << std::scientific; + + // ********************* PROBLEM 3 ********************* + double a = 1.922e+14; + int b = 75; + + cout << "The product of " << a << " and " << b << " is " << (a*b) << "." << endl; + + // ********************* PROBLEM 4 ********************* + a = 6.22e-8; + double c = 3.511e-7; + + cout << "The sum of " << a << " and " << c << " is " << (a+c) << "." << endl; + + // ********************* PROBLEM 5 ********************* + double LS = 186000; + double YS = 365 * 24 * 60 * 60; + + cout << "The distance light can travel in one year is " << (LS * YS) << " miles." << endl; + + // ********************* PROBLEM 6 ********************* + double MILE = 5280; + double W = 62.4; + + cout << "The weight of 1000 cubic miles is " << 1000*pow(MILE,3)*W << " pounds." << endl; + + // ********************* PROBLEM 7 ********************* + double L = 5000, H = 9140, R = 516; + W = 199; + + cout << "The total number of sheets of paper in a warehouse that have been stacked " << L << " reams long by " << W << " reams wide by " << H << " reams high is " << (L*W*H*R) << " sheets." << endl; + + cout << endl << endl << "done" << endl; + + return 0; +} + + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 4.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 4.cpp new file mode 100644 index 0000000..edf6adf --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 4.cpp @@ -0,0 +1,58 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + cout << std::scientific; + + cout << "This program will determine the appropriate letter grade and message for a certain percentage.\n\nInput the percentage of the grade here and press \n > "; + int percent; + + cin >> percent; + + string letter, message; + + if (percent > 100) { + letter = "A+"; + message = "Excellent"; + } else if (percent <= 100 && percent >= 90) { + letter = "A"; + message = "Solid work"; + } else if (percent < 90 && percent >= 80) { + letter = "B"; + message = "Doing fine"; + } else if (percent < 80 && percent >= 70) { + letter = "C"; + message = "Need to work harder"; + } else if (percent < 70 && percent >= 60) { + letter = "D"; + message = "On probation"; + } else if (percent < 60 && percent >= 0) { + letter = "F"; + message = "You are failing"; + } else { + letter = "N/A"; + message = "Can't have negative score"; + } + + cout << "\tGrade\t\tLetter Grade\t\tMessage" << endl << "\t" << percent << "\t\t" << letter << "\t\t\t" << message << endl; + + cout << endl << endl << "done" << endl; + + return 0; +} + + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 5.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 5.cpp new file mode 100644 index 0000000..f54be2f --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 5.cpp @@ -0,0 +1,88 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + + // ********************* PROBLEM 1 ********************* + cout << "Input the mortgage amount requested and press :\n > "; + + double mortgage; + cin >> mortgage; + + double DP; + + if (mortgage < 0 || mortgage >100000) { + cout << "Please input a reasonable mortgage amount (less than 100000)"; + return 0; + } else { + if (mortgage <= 50000) { + DP += 0.02 * mortgage; + } else { + DP += 0.02 * 50000; + mortgage -= 50000; + if (mortgage <= 25000) { + DP += 0.2 * mortgage; + }else { + DP += 0.2 * 25000; + mortgage -= 25000; + DP += 0.25 * mortgage; + } + + } + } + + cout << "Your mortgage of $" << mortgage << " requires a down payment of $" << DP << "." << endl; + + // ********************* PROBLEM 2 ********************* + double T1, T2, T3, T4; + cout << "Enter T1: "; + cin >> T1; + cout << "Enter T2: "; + cin >> T2; + cout << "Enter T3: "; + cin >> T3; + cout << "Enter T4: "; + cin >> T4; + + double sum = T1 + T2 + T3 + T4; + string pass = "pass"; + if (sum <= 260) { + pass = "fail"; + } + + cout << "\tT1\tT2\tT3\tT4\tSum\tFinal Grade" << endl; + cout << "\t" << T1 << "\t" << T2 << "\t" << T3 << "\t" << T4 << "\t" << sum << "\t" << pass << endl; + + // ********************* PROBLEM 3 ********************* + double sales, commission; + cout << "Enter the sales\n > "; + cin >> sales; + + if (sales >= 15000) + commission = 0.15 * sales; + else + commission = 0.0725 * sales; + + cout << "\tSales\tCommission" << endl; + cout << "\t" << sales << "\t" << commission << endl; + + cout << endl << endl << "done" << endl; + + return 0; +} + + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 6.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 6.cpp new file mode 100644 index 0000000..c6cfe69 --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 6.cpp @@ -0,0 +1,52 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + // ********************* CONSTANTS ********************* + const double PI = 3.1415926535897932384626433832795028841971693993; + + // ********************* PROBLEM 1 ********************* + double F = -35; + double C; + + cout << "C\tF" << endl; + do { + C = 5*(F-32)/9; + cout << F << "^F\t" << C << "^C" << endl; + F += 5; + } while (F <= 125); + + cout << endl; + + // ********************* PROBLEM 2 ********************* + double radius = 2; + double area, circumference; + + cout << "Radius\tCircumference\tArea" << endl; + do { + circumference = 2 * radius * PI; + area = radius * radius * PI; + cout << radius << "\t" << circumference << "\t\t" << area << endl; + radius += 5; + } while (radius <= 47); + + cout << endl << endl << "done" << endl; + + return 0; +} + + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 7.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 7.cpp new file mode 100644 index 0000000..141b21f --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 7.cpp @@ -0,0 +1,79 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + + // ********************* PROBLEM 3 ********************* + int i = 1; + double s = 1, c = 1; + + cout << "Integer\tSquare Root\tCube Root" << endl; + do { + cout << i << "\t" << s << "\t\t" << c << endl; + i += 1; + s = pow(i,0.5); + c = pow(i,1./3); + } while (c < 2.5); + + cout << endl; + + // ********************* PROBLEM 4 ********************* + double cost = 1.95; + int year = 2013; + + cout << "Year\tCost" << endl; + + cout << fixed; + + do { + cout << year << "\t" << setprecision(2) << cost << endl; + year += 1; + cost *= 1.05; + } while (cost <= 10); + + cout << year << "\t" << cost << endl; + + // ********************* PROBLEM 5 ********************* + int x; + int x1; + + cout << "What is the value of x?\n > "; + cin >> x1; + + if (abs(x1) != x1) { + cout << "Can't be negative." << endl; + return 0; + } else { + x = x1; + int c = 0; + do { + if (x % 2 == 0) { + x /= 2; + } else { + x = 3*x+1; + } + c += 1; + cout << x << " "; + } while (x != 1); + + cout << "It took " << c << " replacements." << endl; + } + + return 0; +} + + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 8.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 8.cpp new file mode 100644 index 0000000..73cb6f6 --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 8.cpp @@ -0,0 +1,47 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + + cout << fixed; + + double amount, rate, payment; + cout << "Amount? "; + cin >> amount; + cout << "Rate? "; + cin >> rate; + cout << "Payment? "; + cin >> payment; + + int month = 1; + + double interest, principal; + + cout << "MONTH\tAMOUNT\tINTEREST\tTO PRINCIPAL" << endl; + do { + interest = rate*amount/1200; + principal = payment - interest; + if (principal > amount) principal = amount; + cout << month << "\t" << setprecision(2) << amount << "\t" << interest << "\t\t" << principal << endl; + amount -= principal; + month++; + } while (amount > 0); + + return 0; +} + + diff --git a/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 9.cpp b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 9.cpp new file mode 100644 index 0000000..9ad8f5a --- /dev/null +++ b/temp/0w7b135tleVaMgEjadntVc3qnmQoVI2QAaNFV8PZRLNAboLuaL/Program 9.cpp @@ -0,0 +1,55 @@ +// +// main.cpp +// Program 1 +// +// Created by Liyang Zhang 2016 on 6/10/13. +// Copyright (c) 2013 Liyang Zhang 2016. All rights reserved. +// + +//precompiler directives: +#include +#include +#include +#include + +using namespace std; + +int main( ) +{ + + // ********************* PROBLEM 1 ********************* + int num, counter = 1; + + while (counter <= 5) { + num = counter * 2; + cout << counter << " doubled is " << num << endl; + counter ++; + } + + // ********************* PROBLEM 2 ********************* + cout << "You will input two numbers. This program will determine if the numbers are equal, or if one is larger than the other." << endl; + cout << endl; + + double A, B; + cout << "A = "; + cin >> A; + cout << "B = "; + cin >> B; + + cout << endl; + + if (A>B) { + cout << A << " > " << B << endl; + cout << "Larger"; + } else if (Ahiadsfihqpweiohtasdifhqpoiewtpqiehwptiqhewpotihqpweithpqioewtpqijwerpoqewjfpjasdo;fkja;dslkfja;lsdkfj;askdjf \ No newline at end of file diff --git a/temp/Windows 7 Wallpaper.jpg b/temp/Windows 7 Wallpaper.jpg new file mode 100644 index 0000000..a418814 Binary files /dev/null and b/temp/Windows 7 Wallpaper.jpg differ diff --git a/temp/jquery-ui.css b/temp/jquery-ui.css new file mode 100644 index 0000000..addf277 --- /dev/null +++ b/temp/jquery-ui.css @@ -0,0 +1,1177 @@ +/*! jQuery UI - v1.10.3 - 2013-05-03 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px +* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin-top: 2px; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-noicons { + padding-left: .7em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month-year { + width: 100%; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 49%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 21px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 2px; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + margin-top: -3px; + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + padding: 0; + width: 100%; + /* support: IE10, see #8844 */ + list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +.ui-menu .ui-menu-divider { + margin: 5px -2px 5px -2px; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-menu-item a { + text-decoration: none; + display: block; + padding: 2px .4em; + line-height: 1.5; + min-height: 0; /* support: IE7 */ + font-weight: normal; +} +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} + +.ui-menu .ui-state-disabled { + font-weight: normal; + margin: .4em 0 .2em; + line-height: 1.5; +} +.ui-menu .ui-state-disabled a { + cursor: default; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item a { + position: relative; + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: .2em; + left: .2em; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + position: static; + float: right; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("images/animated-overlay.gif"); + height: 100%; + filter: alpha(opacity=25); + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* For IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to overide default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertical centre icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav li a { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, +.ui-tabs .ui-tabs-nav li.ui-state-disabled a, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { + cursor: text; +} +.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #dddddd; + background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #e78f08; + background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; + color: #ffffff; + font-weight: bold; +} +.ui-widget-header a { + color: #ffffff; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; + font-weight: bold; + color: #1c94c4; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #1c94c4; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #fbcb09; + background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; + font-weight: bold; + color: #c77405; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited { + color: #c77405; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #fbd850; + background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; + font-weight: bold; + color: #eb8f00; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #eb8f00; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fed22f; + background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-widget-header .ui-icon { + background-image: url(images/ui-icons_ffffff_256x240.png); +} +.ui-state-default .ui-icon { + background-image: url(images/ui-icons_ef8c08_256x240.png); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url(images/ui-icons_ef8c08_256x240.png); +} +.ui-state-active .ui-icon { + background-image: url(images/ui-icons_ef8c08_256x240.png); +} +.ui-state-highlight .ui-icon { + background-image: url(images/ui-icons_228ef1_256x240.png); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url(images/ui-icons_ffd27a_256x240.png); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; + opacity: .5; + filter: Alpha(Opacity=50); +} +.ui-widget-shadow { + margin: -5px 0 0 -5px; + padding: 5px; + background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; + opacity: .2; + filter: Alpha(Opacity=20); + border-radius: 5px; +} diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/.classpath b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/.classpath new file mode 100644 index 0000000..1489f09 --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/.project b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/.project new file mode 100644 index 0000000..2e0785b --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/.project @@ -0,0 +1,17 @@ + + + PlanarTowerDefense + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/.settings/org.eclipse.jdt.core.prefs b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..54e493c --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Back1.jpg b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Back1.jpg new file mode 100644 index 0000000..f6f1d12 Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Back1.jpg differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Camera.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Camera.class new file mode 100644 index 0000000..7c6ad63 Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Camera.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Enemy.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Enemy.class new file mode 100644 index 0000000..2d9e987 Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Enemy.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Entity.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Entity.class new file mode 100644 index 0000000..79111ae Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Entity.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Icon.png b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Icon.png new file mode 100644 index 0000000..5bbe1cf Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Icon.png differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/MenuOptions.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/MenuOptions.class new file mode 100644 index 0000000..b6200b0 Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/MenuOptions.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/MenuPause.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/MenuPause.class new file mode 100644 index 0000000..fc2c39f Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/MenuPause.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Nexa.ttf b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Nexa.ttf new file mode 100644 index 0000000..3b57da1 Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Nexa.ttf differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$1.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$1.class new file mode 100644 index 0000000..4999019 Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$1.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$2.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$2.class new file mode 100644 index 0000000..fa677ca Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$2.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$3.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$3.class new file mode 100644 index 0000000..90de4be Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$3.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$gstate.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$gstate.class new file mode 100644 index 0000000..c625c6c Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$gstate.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$state.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$state.class new file mode 100644 index 0000000..a673bb4 Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense$state.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense.class new file mode 100644 index 0000000..277e63f Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PDefense.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PFont.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PFont.class new file mode 100644 index 0000000..5037a9e Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/PFont.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Splash.png b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Splash.png new file mode 100644 index 0000000..342972f Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Splash.png differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Tile.class b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Tile.class new file mode 100644 index 0000000..573d010 Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/Tile.class differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultMap0.dat b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultMap0.dat new file mode 100644 index 0000000..402fb60 --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultMap0.dat @@ -0,0 +1,6 @@ +5x5 +2,1,1,1,0 +0,0,0,1,0 +0,1,1,1,0 +0,1,0,0,0 +0,1,1,1,3 \ No newline at end of file diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultMap1.dat b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultMap1.dat new file mode 100644 index 0000000..a6af431 --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultMap1.dat @@ -0,0 +1,6 @@ +5x5 +2,1,1,0,0 +0,0,1,0,0 +0,0,1,0,0 +0,0,1,0,0 +0,0,1,1,3 \ No newline at end of file diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultMap2.dat b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultMap2.dat new file mode 100644 index 0000000..24a500f --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultMap2.dat @@ -0,0 +1,6 @@ +5x5 +2,1,0,0,0 +0,1,1,0,0 +0,0,1,0,0 +0,0,1,1,0 +0,0,0,1,3 \ No newline at end of file diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultOptions.dat b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultOptions.dat new file mode 100644 index 0000000..8cc617e --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/bin/pFusion/tmp/defaultOptions.dat @@ -0,0 +1,2 @@ +version=0.2.1 +autopause=true \ No newline at end of file diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Back1.jpg b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Back1.jpg new file mode 100644 index 0000000..f6f1d12 Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Back1.jpg differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Camera.java b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Camera.java new file mode 100644 index 0000000..e127453 --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Camera.java @@ -0,0 +1,158 @@ +package pFusion.tmp; + +import java.awt.Color; +import java.awt.FontMetrics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; +import java.io.BufferedReader; +import java.io.InputStreamReader; + +import javax.imageio.ImageIO; +import javax.swing.JFrame; + +public class Camera { + BufferedImage back; + static Tile[][][] maps; + static Enemy[] enemies = new Enemy[3]; + int map = 0; + int w = 5, h = 5; + + int money = 1000; + + FontMetrics metrics; + + int R = (int) (Math.random() * 255), G = (int) (Math.random() * 255), + B = (int) (Math.random() * 255); + boolean R1 = (Math.random() > 0.5) ? false : true, + G1 = (Math.random() > 0.5) ? false : true, + B1 = (Math.random() > 0.5) ? false : true; + + public Camera() throws Exception { + back = ImageIO.read(Camera.class.getResource("Back1.jpg")); + loadMap(); + } + + public void nextMap() { + map += 1; + if (map > 2) + map = 0; + } + + public void prevMap() { + map -= 1; + if (map < 0) + map = 2; + } + + public void loadMap() throws Exception { + maps = new Tile[3][w][h]; + for (int i = 0; i < 3; i++) { + BufferedReader in = new BufferedReader( + new InputStreamReader( + Camera.class.getResourceAsStream("defaultMap" + i + + ".dat"))); + String t = in.readLine(); + + for (int j = 0; j < w; j++) { + t = in.readLine(); + for (int k = 0; k < h; k++) { + maps[i][j][k] = new Tile(j, k, Integer.parseInt(t + .split(",")[k])); + } + } + } + for (int i = 0; i < enemies.length; i++) { + enemies[i] = new Enemy(); + enemies[i].setMap(i); + enemies[i].setX(0); + enemies[i].setY(0); + } + } + + public void update(long time) { + for (int i = 0; i < enemies.length; i++) { + enemies[i].update(time); + } + } + + public void draw(Graphics2D g) { + String t = ""; + g.drawImage(back, 0, 0, PDefense.width, PDefense.height, null); + g.setColor(new Color(R, G, B, 50)); + g.fillRect(0, 0, PDefense.width, PDefense.height); + if (!PDefense.paused) { + if (R1) + R += 1; + else + R -= 1; + if (G1) + G += 1; + else + G -= 1; + if (B1) + B += 1; + else + B -= 1; + if (R >= 255) { + R = 255; + R1 = false; + } + if (R <= 0) { + R = 0; + R1 = true; + } + if (G >= 255) { + G = 255; + G1 = false; + } + if (G <= 0) { + G = 0; + G1 = true; + } + if (B >= 255) { + B = 255; + B1 = false; + } + if (B <= 0) { + B = 0; + B1 = true; + } + } + + g.setFont(PFont.getFont(15)); + g.setColor(new Color(255, 255, 255)); + metrics = new JFrame().getFontMetrics(g.getFont()); + // t = "[Current map: Map " + (map + 1) + + // "] Keyboard shortcuts: Escape to pause, Tab for next map, Shift+Tab for previous map"; + t = "[Current map: Map " + (map + 1) + "]"; + g.drawString(t, 20, 20); + + for (int i = 0; i < maps[map].length; i++) { + for (int j = 0; j < maps[map][0].length; j++) { + int l = 150 + (100 * i), q = 50 + (100 * j); + if (maps[map][i][j].getC() == 0 && !PDefense.paused) { + if (PDefense.location.x >= l + && PDefense.location.x <= (l + 100) + && PDefense.location.y >= q + && PDefense.location.y <= q + 100) { + if (PDefense.leftMouse) { + g.setColor(maps[map][i][j].getPressColor(map % 3)); + } else { + g.setColor(maps[map][i][j].getHoverColor(map % 3)); + } + } else { + g.setColor(maps[map][i][j].getColor(map % 3)); + } + } else { + g.setColor(maps[map][i][j].getColor(map % 3)); + } + g.fillRect(l, q, 100, 100); + } + } + for (int i = 0; i < enemies.length; i++) { + if (enemies[i].map == map) { + enemies[i].draw(g, 150, 50, 100, 100); + } + } + } +} diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Enemy.java b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Enemy.java new file mode 100644 index 0000000..f37b7d1 --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Enemy.java @@ -0,0 +1,78 @@ +package pFusion.tmp; + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.Point; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.Set; + +public class Enemy extends Entity { + ArrayList travelled; + int moveCountdown = 50; + int health = 100; + + public Enemy() { + travelled = new ArrayList(); + travelled.add(new Point(0, 0)); + color = new Color(200, 50, 50); + } + + public void update(long time) { + Set setItems = new LinkedHashSet(travelled); + travelled.clear(); + travelled.addAll(setItems); + moveCountdown -= 1; + if (moveCountdown == 0) { + moveCountdown = 50; + move(); + } + } + + public void move() { + boolean moved = false; + for (int i = 0; i < Camera.maps[map].length; i++) { + for (int j = 0; j < Camera.maps[map][0].length; j++) { + if (!moved) { + Tile tmpTile = Camera.maps[map][i][j]; + if (tmpTile.getC() == 1) { + int dx = (int) (Math.abs(x - tmpTile.getX())), dy = (int) (Math + .abs(y - tmpTile.getY())); + if ((dx == 0 && dy == 1) || (dy == 0 && dx == 1)) { + boolean b = true; + for (Point p : travelled) { + if (tmpTile.getX() == p.x + && tmpTile.getY() == p.y) { + b = false; + } + } + if (b) { + for (Enemy e : Camera.enemies) { + if (map == e.map && tmpTile.getX() == e.x + && tmpTile.getY() == e.y) { + b = false; + } + } + } + if (b) { + travelled.add(new Point(x, y)); + x = tmpTile.getX(); + y = tmpTile.getY(); + moved = true; + } + } + } + } + } + } + } + + public void draw(Graphics2D g, int sx, int sy, int bw, int bh) { + int eX = sx + (x * bw) + (bw - (bw / 4 * 3)) / 2, eY = sy + (y * bh) + + (bh - (bh / 4 * 3)) / 2; + g.setColor(new Color(200, 50, 50, 100)); + g.fillOval(eX, eY, bw / 4 * 3, bh / 4 * 3); + g.setColor(color); + g.fillArc(eX, eY, bw / 4 * 3, bh / 4 * 3, 90, 90 + (health * 360 / 100)); + } +} diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Entity.java b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Entity.java new file mode 100644 index 0000000..a3bf73f --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Entity.java @@ -0,0 +1,48 @@ +package pFusion.tmp; + +import java.awt.Color; + +public class Entity { + int x, y; + int map; + Color color; + + public Entity() { + x = -1; + y = -1; + map = 0; + color = Color.black; + } + + public void setX(int x) { + this.x = x; + } + + public void setY(int y) { + this.y = y; + } + + public void setMap(int map) { + this.map = map; + } + + public void setColor(Color color) { + this.color = color; + } + + public int getX() { + return x; + } + + public int getY() { + return y; + } + + public int getMap() { + return map; + } + + public Color getColor() { + return color; + } +} diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Icon.png b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Icon.png new file mode 100644 index 0000000..5bbe1cf Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Icon.png differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/MenuOptions.java b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/MenuOptions.java new file mode 100644 index 0000000..c6f4ef9 --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/MenuOptions.java @@ -0,0 +1,125 @@ +package pFusion.tmp; + +import java.awt.Color; +import java.awt.FontMetrics; +import java.awt.Graphics2D; +import java.io.File; +import java.io.PrintWriter; +import java.util.ArrayList; + +import javax.swing.JFrame; + +public class MenuOptions { + + FontMetrics metrics; + JFrame frame; + + int countdown = 6; + + private int button1W = 300, button1H = 60, button1X = 20, button1Y = 520; + private boolean button1O = false; + private int button2W = 300, button2H, button2X, button2Y = 180; + private boolean button2O = false; + + public MenuOptions() { + frame = new JFrame(); + } + + public void draw(Graphics2D g) { + String t = ""; + + g.setColor(new Color(102, 204, 204)); + g.fillRect(0, 0, PDefense.width, PDefense.height); + + g.setColor(new Color(0, 0, 0)); + g.setFont(PFont.getFont(35)); + metrics = frame.getFontMetrics(g.getFont()); + t = "Options"; + g.drawString(t, PDefense.width / 2 - metrics.stringWidth(t) / 2, 100); + + // AUTO-PAUSE + g.setFont(PFont.getFont(16)); + metrics = frame.getFontMetrics(g.getFont()); + t = "Auto-Pause (focusLost)"; + g.drawString(t, 40, 180); + + button2X = 55 + metrics.stringWidth(t); + button2H = metrics.getHeight() + 10; + + g.setFont(PFont.getFont(15)); + metrics = frame.getFontMetrics(g.getFont()); + t = String.valueOf(PDefense.autopause); + + g.setColor(button2O ? new Color(140, 70, 140) : new Color(102, 51, 102)); + g.fillRect(button2X, button2Y + metrics.getHeight() / 2 - button2H / 2, + button2W, button2H); + g.setColor(new Color(255, 255, 255)); + g.drawString(t, button2X + button2W / 2 - metrics.stringWidth(t) / 2, + button2Y); + + // BACK BUTTON + g.setColor(button1O ? new Color(70, 140, 140) : new Color(51, 102, 102)); + g.fillRect(button1X, button1Y, button1W, button1H); + + g.setColor(new Color(255, 255, 255)); + g.setFont(PFont.getFont(25)); + metrics = frame.getFontMetrics(g.getFont()); + t = "Back"; + g.drawString(t, button1X + button1W / 2 - metrics.stringWidth(t) / 2, + button1Y + button1H / 2); + + // MOUSE LOCATION ETC. + + button1O = PDefense.location.x >= button1X + && PDefense.location.x <= button1X + button1W + && PDefense.location.y >= button1Y + && PDefense.location.y <= button1Y + button1H; + button2O = PDefense.location.x >= button2X + && PDefense.location.x <= button2X + button2W + && PDefense.location.y >= button2Y + && PDefense.location.y <= button2Y + button2H; + + if (PDefense.leftMouse && button1O) { + writeOptions(); + PDefense.PState = PDefense.state.MENU; + PDefense.leftMouse = false; + } + if (PDefense.leftMouse && button2O) { + PDefense.autopause = !PDefense.autopause; + ArrayList oTmp = new ArrayList(); + for (String option : PDefense.options) { + if (option.split("=")[0].equals("autopause")) { + oTmp.add("autopause=" + !PDefense.autopause); + } else { + oTmp.add(option); + } + } + PDefense.leftMouse = false; + } + + if (countdown > 0) { + countdown -= 1; + } else { + countdown = 6; + writeOptions(); + } + } + + public void writeOptions() { + try { + PrintWriter out = new PrintWriter(new File(PDefense.appdata + + File.separator + ".planar" + File.separator + + "options.dat")); + for (String option : PDefense.options) { + out.println(option); + } + out.flush(); + out.close(); + } catch (Exception e) { + System.err + .println("***** AN ERROR OCCURRED AT MenuOptions.java *****"); + e.printStackTrace(); + System.exit(0); + } + } +} diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/MenuPause.java b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/MenuPause.java new file mode 100644 index 0000000..1d821ae --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/MenuPause.java @@ -0,0 +1,77 @@ +package pFusion.tmp; + +import java.awt.Color; +import java.awt.FontMetrics; +import java.awt.Graphics2D; + +import javax.swing.JFrame; + +public class MenuPause { + + FontMetrics metrics; + + int button1W = 400, button1H = 60, button1X = 200, button1Y = 320; + private boolean button1O = false; + int button3W = 400, button3H = 60, button3X = 200, button3Y = 390; + private boolean button3O = false; + + public MenuPause() { + + } + + public void draw(Graphics2D g) { + String t = ""; + + g.setFont(PFont.getFont(100)); + g.setColor(new Color(0, 0, 0, 50)); + g.fillRect(0, 0, PDefense.width, PDefense.height); + + g.setColor(new Color(255, 255, 255)); + metrics = new JFrame().getFontMetrics(g.getFont()); + t = "PAUSED"; + g.drawString(t, PDefense.width / 2 - metrics.stringWidth(t) / 2, + PDefense.height / 2 - metrics.getHeight() / 2); + + // RESUME BUTTON + g.setColor(button1O ? new Color(140, 70, 140) : new Color(102, 51, 102)); + g.fillRect(button1X, button1Y, button1W, button1H); + + g.setColor(new Color(255, 255, 255)); + g.setFont(PFont.getFont(25)); + metrics = new JFrame().getFontMetrics(g.getFont()); + t = "Resume"; + g.drawString(t, PDefense.width / 2 - metrics.stringWidth(t) / 2, + button1Y + button1H / 2); + + // MENU BUTTON + g.setColor(button3O ? new Color(140, 70, 140) : new Color(102, 51, 102)); + g.fillRect(button3X, button3Y, button3W, button3H); + + g.setColor(new Color(255, 255, 255)); + g.setFont(PFont.getFont(25)); + metrics = new JFrame().getFontMetrics(g.getFont()); + t = "Menu"; + g.drawString(t, PDefense.width / 2 - metrics.stringWidth(t) / 2, + button3Y + button3H / 2); + + // MOUSE LOCATION ETC. + + button1O = PDefense.location.x >= button1X + && PDefense.location.x <= button1X + button1W + && PDefense.location.y >= button1Y + && PDefense.location.y <= button1Y + button1H; + button3O = PDefense.location.x >= button3X + && PDefense.location.x <= button3X + button3W + && PDefense.location.y >= button3Y + && PDefense.location.y <= button3Y + button3H; + + if (PDefense.leftMouse && button1O) { + PDefense.paused = false; + PDefense.leftMouse = false; + } + if (PDefense.leftMouse && button3O) { + PDefense.PState = PDefense.state.MENU; + PDefense.leftMouse = false; + } + } +} diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Nexa.ttf b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Nexa.ttf new file mode 100644 index 0000000..3b57da1 Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Nexa.ttf differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/PDefense.java b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/PDefense.java new file mode 100644 index 0000000..cf685d7 --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/PDefense.java @@ -0,0 +1,522 @@ +package pFusion.tmp; + +import java.awt.Color; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.MouseInfo; +import java.awt.Point; +import java.awt.RenderingHints; +import java.awt.Toolkit; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; +import java.awt.image.BufferedImage; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.util.ArrayList; + +import javax.imageio.ImageIO; +import javax.swing.JFrame; + +public class PDefense extends JFrame implements MouseMotionListener, + MouseListener, KeyListener, FocusListener { + public static final long serialVersionUID = 1L; + + public static boolean leftMouse = false; + private FontMetrics metrics; + + public static Point location; + private int button1W = 400, button1H = 60, button1X = 200, button1Y = 260; + private boolean button1O = false; + private int button2W = 400, button2H = 60, button2X = 200, button2Y = 330; + private boolean button2O = false; + private int button3W = 400, button3H = 60, button3X = 200, button3Y = 400; + private boolean button3O = false; + + private int logowait = 80; + BufferedImage splash; + public static int optionsReferrer = 0; + + private String version = "0.2.1"; + + Camera c; + MenuPause mp; + MenuOptions mo; + + static int xmouse, ymouse; + static int width, height; + long oldTime, time; + static boolean paused = false; + + boolean shiftPressed = false, tabPressed = false; + + public static String appdata = System.getenv("APPDATA"); + public static ArrayList options; + + static boolean autopause; + + boolean ee = false; + JFrame eeTmp; + + int switchMapDelay = 8; + + /** + * + * @author Michael Zhang Copyright 2013 by pFusion + * + */ + + public static enum state { + NULL, MENU, OPTIONS, GAME + } + + public static state PState = state.NULL; + + public static enum gstate { + PLAYING, PAUSED + } + + public static gstate GState = gstate.PLAYING; + + public PDefense() { + try { + // SEE IF DIRECTORY EXISTS + File mainDir = new File(appdata + File.separator + ".planar"); + if (!(mainDir.exists() && mainDir.isDirectory())) { + mainDir.mkdir(); + } + + // SEE IF OPTIONS FILE EXISTS + boolean updated = false; + File optionsFile = new File(appdata + File.separator + ".planar" + + File.separator + "options.dat"); + if (!optionsFile.exists()) { + copyOptionsFile(); + } else { + ArrayList optionsTmp = new ArrayList(); + BufferedReader in = new BufferedReader(new FileReader(appdata + + File.separator + ".planar" + File.separator + + "options.dat")); + String line; + + while ((line = in.readLine()) != null) { + optionsTmp.add(line); + } + in.close(); + + for (String option : optionsTmp) { + if (option.split("=")[0] == "version" + && option.split("=")[1] == version) { + updated = true; + } + } + } + if (!updated) { + copyOptionsFile(); + } + + // LOAD OPTIONS + options = new ArrayList(); + BufferedReader in = new BufferedReader(new FileReader(appdata + + File.separator + ".planar" + File.separator + + "options.dat")); + String line; + + while ((line = in.readLine()) != null) { + options.add(line); + } + in.close(); + for (String option : options) { + if (option.split("=")[0].equals("autopause")) { + autopause = option.split("=")[1].toLowerCase().trim() == "true"; + } + } + + splash = ImageIO.read(PDefense.class.getResource("Splash.png")); + + c = new Camera(); + mp = new MenuPause(); + mo = new MenuOptions(); + + setSize(800, 600); + setTitle("Planar Tower Defense"); + setFont(PFont.getFont(30f)); + setResizable(false); + setIconImage(ImageIO.read(PDefense.class.getResource("Icon.png"))); + + setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 + - getWidth() / 2, Toolkit.getDefaultToolkit() + .getScreenSize().height / 2 - getHeight() / 2); + setDefaultCloseOperation(EXIT_ON_CLOSE); + setVisible(true); + setFocusable(true); + requestFocus(); + addMouseMotionListener(this); + addMouseListener(this); + addKeyListener(this); + addFocusListener(this); + setFocusTraversalKeysEnabled(false); + + width = getWidth(); + height = getHeight(); + + addMouseListener(new MouseListener() { + public void mouseClicked(MouseEvent e) { + } + + public void mouseEntered(MouseEvent e) { + } + + public void mouseExited(MouseEvent e) { + } + + public void mousePressed(MouseEvent e) { + leftMouse = true; + } + + public void mouseReleased(MouseEvent e) { + leftMouse = false; + } + }); + + Thread th = new Thread() { + public void run() { + try { + while (true) { + location = MouseInfo.getPointerInfo().getLocation(); + location.setLocation(location.x - getLocation().x, + location.y - getLocation().y); + + if (PState == state.MENU) { + button1O = location.x >= button1X + && location.x <= button1X + button1W + && location.y >= button1Y + && location.y <= button1Y + button1H; + button2O = location.x >= button2X + && location.x <= button2X + button2W + && location.y >= button2Y + && location.y <= button2Y + button2H; + button3O = location.x >= button3X + && location.x <= button3X + button3W + && location.y >= button3Y + && location.y <= button3Y + button3H; + } + + if (leftMouse && button1O) { + PState = state.GAME; + PDefense.leftMouse = false; + } + if (leftMouse && button2O) { + options(0); + PDefense.leftMouse = false; + } + if (leftMouse && button3O) { + System.out.println("Exiting the application!"); + System.exit(0); + } + + repaint(); + + Thread.sleep(50); + } + } catch (Exception e) { + System.err + .println("***** AN ERROR OCCURRED AT PDefense.java *****"); + e.printStackTrace(); + System.exit(0); + } + } + }; + th.start(); + } catch (Exception e) { + System.err + .println("***** AN ERROR OCCURRED AT PDefense.java *****"); + e.printStackTrace(); + System.exit(0); + } + } + + public void paint(Graphics g) { + try { + Image buffer = createImage(getWidth(), getHeight()); + Graphics2D g2 = (Graphics2D) buffer.getGraphics(); + draw(g2); + g.drawImage(buffer, 0, 0, null); + g2.dispose(); + } catch (Exception e) { + System.err + .println("***** AN ERROR OCCURRED AT PDefense.java *****"); + e.printStackTrace(); + System.exit(0); + } + } + + public void draw(Graphics2D g) { + g.setRenderingHints(new RenderingHints( + RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_GASP)); + + if (logowait > 0) { + logowait -= 1; + g.drawImage(splash, 0, 0, null); + g.setColor(Color.black); + g.setFont(PFont.getFont(12)); + // g.drawString("Menu in " + logowait + "u", 20, 40); + } else if (logowait == 0) { + logowait = -1; + PState = state.MENU; + } else { + + if (PState == state.MENU) { + String t = ""; + + g.setColor(new Color(204, 102, 204)); + g.fillRect(0, 0, getWidth(), getHeight()); + + g.setColor(new Color(255, 255, 255)); + g.setFont(PFont.getFont(40)); + metrics = getFontMetrics(g.getFont()); + t = "Planar Defense"; + g.drawString(t, getWidth() / 2 - metrics.stringWidth(t) / 2, + 180); + + // PLAY BUTTON + g.setColor(button1O ? new Color(140, 70, 140) : new Color(102, + 51, 102)); + g.fillRect(button1X, button1Y, button1W, button1H); + + g.setColor(new Color(255, 255, 255)); + g.setFont(PFont.getFont(25)); + metrics = getFontMetrics(g.getFont()); + t = "Play"; + g.drawString(t, getWidth() / 2 - metrics.stringWidth(t) / 2, + button1Y + button1H / 2); + + // OPTION BUTTON + g.setColor(button2O ? new Color(140, 70, 140) : new Color(102, + 51, 102)); + g.fillRect(button2X, button2Y, button2W, button2H); + + g.setColor(new Color(255, 255, 255)); + g.setFont(PFont.getFont(25)); + metrics = getFontMetrics(g.getFont()); + t = "Options"; + g.drawString(t, getWidth() / 2 - metrics.stringWidth(t) / 2, + button2Y + button2H / 2); + + // QUIT BUTTON + g.setColor(button3O ? new Color(140, 70, 140) : new Color(102, + 51, 102)); + g.fillRect(button3X, button3Y, button3W, button3H); + + g.setColor(new Color(255, 255, 255)); + g.setFont(PFont.getFont(25)); + metrics = getFontMetrics(g.getFont()); + t = "Exit"; + g.drawString(t, getWidth() / 2 - metrics.stringWidth(t) / 2, + button3Y + button3H / 2); + + // MADE BY + g.setColor(new Color(255, 255, 255)); + g.setFont(PFont.getFont(15)); + metrics = getFontMetrics(g.getFont()); + t = "Made by Michael Zhang."; + g.drawString(t, getWidth() / 2 - metrics.stringWidth(t) / 2, + 570); + t = "© 2013 by pFusion"; + g.drawString(t, getWidth() / 2 - metrics.stringWidth(t) / 2, + 585); + } else if (PState == state.OPTIONS) { + mo.draw(g); + } else if (PState == state.GAME) { + time = System.currentTimeMillis() - oldTime; + oldTime += time; + + g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON); + g.setRenderingHint(RenderingHints.KEY_RENDERING, + RenderingHints.VALUE_RENDER_QUALITY); + g.setRenderingHints(new RenderingHints( + RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_GASP)); + update(); + draw2(g); + } + } + } + + public void update() { + if (!paused) { + switchMapDelay -= 1; + if (switchMapDelay <= 0) + switchMapDelay = 0; + if (tabPressed && switchMapDelay == 0) { + if (shiftPressed) { + c.prevMap(); + } else { + c.nextMap(); + } + tabPressed = false; + switchMapDelay = 8; + } + c.update(time); + } + } + + public void menuUpdate() { + + } + + public void draw2(Graphics2D g) { + if (GState == gstate.PLAYING) { + gameDraw(g); + } else if (GState == gstate.PAUSED) { + } + } + + public void gameDraw(Graphics2D g) { + c.draw(g); + if (paused) { + menuDraw(g); + } + } + + public void menuDraw(Graphics2D g) { + mp.draw(g); + } + + public static void options(int referrer) { + // REFERRER ID + // + // 0: MENU + // 1: GAME + optionsReferrer = referrer; + PState = state.OPTIONS; + } + + public void copyOptionsFile() throws Exception { + File optionsFile = new File(appdata + File.separator + ".planar" + + File.separator + "options.dat"); + BufferedReader in = new BufferedReader(new InputStreamReader( + PDefense.class.getResourceAsStream("defaultOptions.dat"))); + PrintWriter out = new PrintWriter(optionsFile); + String line; + + while ((line = in.readLine()) != null) { + out.println(line); + } + in.close(); + out.flush(); + out.close(); + } + + public void focusGained(FocusEvent e) { + } + + public void focusLost(FocusEvent e) { + if (GState == gstate.PLAYING && autopause) { + paused = true; + } + } + + public void keyPressed(KeyEvent e) { + switch (e.getKeyCode()) { + case KeyEvent.VK_TAB: + tabPressed = true; + break; + case KeyEvent.VK_SHIFT: + shiftPressed = true; + break; + case KeyEvent.VK_ESCAPE: + if (GState == gstate.PLAYING) { + paused = !paused; + } + break; + + // E + case KeyEvent.VK_Q: + eeTmp = new JFrame(); + eeTmp.setUndecorated(true); + eeTmp.setSize(Toolkit.getDefaultToolkit().getScreenSize()); + eeTmp.setAlwaysOnTop(true); + eeTmp.addWindowListener(new WindowListener() { + public void windowActivated(WindowEvent e) { + } + + public void windowClosed(WindowEvent e) { + } + + public void windowClosing(WindowEvent e) { + ee = false; + } + + public void windowDeactivated(WindowEvent e) { + } + + public void windowDeiconified(WindowEvent e) { + } + + public void windowIconified(WindowEvent e) { + } + + public void windowOpened(WindowEvent e) { + } + }); + ee = true; + eeTmp.setVisible(true); + break; + } + } + + public void keyReleased(KeyEvent e) { + switch (e.getKeyCode()) { + case KeyEvent.VK_TAB: + tabPressed = false; + break; + case KeyEvent.VK_SHIFT: + shiftPressed = false; + break; + } + } + + public void keyTyped(KeyEvent e) { + } + + public void mouseClicked(MouseEvent e) { + } + + public void mouseEntered(MouseEvent e) { + } + + public void mouseExited(MouseEvent e) { + } + + public void mousePressed(MouseEvent e) { + leftMouse = true; + } + + public void mouseReleased(MouseEvent e) { + leftMouse = false; + } + + public void mouseDragged(MouseEvent e) { + } + + public void mouseMoved(MouseEvent e) { + } + + public static void main(String[] args) { + new PDefense(); + } +} diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/PFont.java b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/PFont.java new file mode 100644 index 0000000..9e08731 --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/PFont.java @@ -0,0 +1,21 @@ +package pFusion.tmp; + +import java.awt.Font; + +public class PFont extends Font { + public static final long serialVersionUID = 1L; + + protected PFont(Font f) { + super(f); + } + + public static Font getFont(float size) { + try { + return Font.createFont(Font.TRUETYPE_FONT, + PFont.class.getResourceAsStream("Nexa.ttf")).deriveFont( + size); + } catch (Exception e) { + return new Font("sans", Font.PLAIN, (int) size); + } + } +} diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Splash.png b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Splash.png new file mode 100644 index 0000000..342972f Binary files /dev/null and b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Splash.png differ diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Tile.java b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Tile.java new file mode 100644 index 0000000..f2ec2f7 --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/Tile.java @@ -0,0 +1,106 @@ +package pFusion.tmp; + +import java.awt.Color; + +public class Tile { + private int x, y, c; + + /* + * + * KEY: + * + * 0 = AVAILABLE TILE; 1 = ROAD TILE; 2 = ENTER TILE; 3 = EXIT TILE; + */ + + public Tile(int x, int y, int c) { + this.x = x; + this.y = y; + this.c = c; + } + + public void setX(int x) { + this.x = x; + } + + public void setY(int y) { + this.y = y; + } + + public void setC(int c) { + this.c = c; + } + + public int getX() { + return this.x; + } + + public int getY() { + return this.y; + } + + public int getC() { + return this.c; + } + + public Color getHoverColor(int theme) { + Color tmp = getColor(theme); + int k = 30; + int r = tmp.getRed() + k, b = tmp.getBlue() + k, g = tmp.getGreen() + k; + if (r > 255) + r = 255; + if (g > 255) + g = 255; + if (b > 255) + b = 255; + return new Color(r, g, b, tmp.getAlpha()); + } + + public Color getPressColor(int theme) { + Color tmp = getColor(theme); + int k = 30; + int r = tmp.getRed() - k, b = tmp.getBlue() - k, g = tmp.getGreen() - k; + if (r < 0) + r = 0; + if (g < 0) + g = 0; + if (b < 0) + b = 0; + return new Color(r, g, b, tmp.getAlpha()); + } + + public Color getColor(int theme) { + switch (c) { + case 0: + return new Color(225, 225, 225, 85); + case 1: + switch (theme) { + case 0: + return new Color(200, 64, 64, 85); + case 1: + return new Color(64, 200, 64, 85); + case 2: + return new Color(64, 64, 200, 85); + } + case 2: + switch (theme) { + case 0: + return new Color(175, 32, 32, 85); + case 1: + return new Color(32, 175, 32, 85); + case 2: + return new Color(32, 32, 175, 85); + } + case 3: + switch (theme) { + case 0: + return new Color(175, 32, 32, 85); + case 1: + return new Color(32, 175, 32, 85); + case 2: + return new Color(32, 32, 175, 85); + } + default: + return new Color(0, 0, 0, 85); + } + } +} diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultMap0.dat b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultMap0.dat new file mode 100644 index 0000000..402fb60 --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultMap0.dat @@ -0,0 +1,6 @@ +5x5 +2,1,1,1,0 +0,0,0,1,0 +0,1,1,1,0 +0,1,0,0,0 +0,1,1,1,3 \ No newline at end of file diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultMap1.dat b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultMap1.dat new file mode 100644 index 0000000..a6af431 --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultMap1.dat @@ -0,0 +1,6 @@ +5x5 +2,1,1,0,0 +0,0,1,0,0 +0,0,1,0,0 +0,0,1,0,0 +0,0,1,1,3 \ No newline at end of file diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultMap2.dat b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultMap2.dat new file mode 100644 index 0000000..24a500f --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultMap2.dat @@ -0,0 +1,6 @@ +5x5 +2,1,0,0,0 +0,1,1,0,0 +0,0,1,0,0 +0,0,1,1,0 +0,0,0,1,3 \ No newline at end of file diff --git a/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultOptions.dat b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultOptions.dat new file mode 100644 index 0000000..8cc617e --- /dev/null +++ b/temp/veUkiclATnSTC2anrHKaQIrGEpAMMBZmBUhhaY512B75kL8wG6/PlanarTowerDefense/src/pFusion/tmp/defaultOptions.dat @@ -0,0 +1,2 @@ +version=0.2.1 +autopause=true \ No newline at end of file diff --git a/temp/~$siness Investigation of Economic Structure.docx b/temp/~$siness Investigation of Economic Structure.docx new file mode 100644 index 0000000..513e6c2 Binary files /dev/null and b/temp/~$siness Investigation of Economic Structure.docx differ diff --git a/upload.php b/upload.php new file mode 100644 index 0000000..0d562bd --- /dev/null +++ b/upload.php @@ -0,0 +1,109 @@ +"; + + define("MAX_FILE_SIZE", 1024 * 1024 * 50); + define("UPLOAD_DIR", "files/"); + $type = strtolower(end(explode('.', $_FILES['uploaded']['name']))); + $file = $id . "." . $type; + echo "Destination file: " . $file; + echo "

Wow! ".count($permitted)." extensions supported! Request more extensions

"; + if (in_array($type,$permitted) && $_FILES['uploaded']['size'] > 0 && $_FILES['uploaded']['size'] <= MAX_FILE_SIZE) { + switch ($_FILES['image']['error']) { + case 0: + if (!file_exists(UPLOAD_DIR . $file)) { + $success = move_uploaded_file($_FILES['uploaded']['tmp_name'], UPLOAD_DIR . $file); + } else { + unlink(UPLOAD_DIR . $file); + $success = move_uploaded_file($_FILES['uploaded']['tmp_name'], UPLOAD_DIR . $file); + } + if ($success) { + $result = "Your file was uploaded.
« Back to LEXIS"; + $pieces = explode('.', $_FILES['uploaded']['name']); + $query = mysql_query("insert into lexis_docbank (id,title,container,owner,type,dateMod) values('$id','" . $pieces[0] . "','$use_dir','$username','" . $type . "',NOW())") or die("Can't connect: " . mysql_error()); + } else { + $result = "Error uploading your file. Please try again. If this problem persists, contact ANIXO Specifications and we will try to help you."; + } + break; + case 8: + $result = "Error uploading your file. Please try again. If this problem persists, contact ANIXO Specifications and we will try to help you."; + break; + case 4: + $result = "You didn't upload a file."; + break; + default: + break; + } + } else { + $result = "Your file is either too big or is not a file of the specified upload types."; + } +} +if (isset($result)) { + echo "

$result

"; +} +?> + \ No newline at end of file