diff --git a/assets/css/index.style.css b/assets/css/index.style.css new file mode 100644 index 00000000..fce88f9d --- /dev/null +++ b/assets/css/index.style.css @@ -0,0 +1,155 @@ +/* +* @Author: prpr +* @Date: 2016-01-21 20:07:47 +* @Last Modified by: prpr +* @Last Modified time: 2016-01-21 21:09:54 +*/ +.home-menu-blur { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: -100; +} +.home-menu-wrp { + height: 100%; + background-color: rgba(255,255,255,0.4); +} +.home-menu-bg { + background-image: url("http://ww4.sinaimg.cn/large/823186a6gw1enwts09sbrj21hc0u016u.jpg"); + background-position: center 0; + background-size: auto 800px; + position: absolute; + width: 100%; + height: 100%; + z-index: -1; + filter: blur(4px); + -webkit-filter: blur(4px); + -moz-filter: blur(4px); + -o-filter: blur(4px); + -ms-filter: blur(4px); + box-shadow: rgba(0,0,0,0.1) 0 1px 2px; +} + +.container { + background-image: + url("http://ww4.sinaimg.cn/large/823186a6gw1enwts09sbrj21hc0u016u.jpg"); + /* background-size: cover; */ + background-size: auto 800px; + background-repeat: no-repeat; + background-position: center 0; + width: 100%; + height: 100%; + top: 0; + left: 0; + position: fixed !important; +} +.container .pure-button { + color: white; + padding: 0.8em 2.5em; + border-radius: 5px; + background: transparent; + border: 1px solid #fff; + font-size: 120%; + transition: color 0.25s ease-in-out, + border-color 0.25s ease-in-out, + background-color 0.25s ease-in-out; +} +.container .pure-button:hover { + background-color: rgba(255, 255, 255, 0.2); +} + +.splash { + width: 80%; + height: 50%; + margin: auto; + position: absolute; + top: 100px; left: 0; bottom: 0; right: 0; + text-align: center; +} +.splash-head { + font-size: 20px; + font-weight: bold; + color: white; + padding: 1em 0.5em; + font-weight: 100; + line-height: 1.5em; + margin: 0.2em 0 0.5em; + font-family: Minecraft; + text-shadow: + 0px 4px 3px rgba(0,0,0,0.4), + 0px 8px 13px rgba(0,0,0,0.1), + 0px 18px 23px rgba(0,0,0,0.1); +} +.splash-subhead { + letter-spacing: 0.05em; + margin-top: 0.8em; + margin-bottom: 1.5em; +} + +.pure-form { + margin: 10px auto; + width: 40%; +} +.pure-input { + margin: 10px 0; + width: 100%; +} +#keep-label { + float: left; +} +#login-button { + float: right; + margin: .5em 0; +} +#register-button { + margin: .5em 0; + width: 100%; + float: left; +} +#msg { + width: 40%; + margin: 3.5em auto 0; +} + +/* Mobile phone */ +@media (max-width: 48em) { + .splash-head { + font-size: 200%; + } + .splash { + width: 100%; + height: 50%; + } + /*.splash-subhead { + font-size: 200%; + }*/ +} + + +@media (min-width: 48em) { + + .splash { + width: 80%; + height: 50%; + } + + .splash-head { + font-size: 250%; + } + +} + +@media (min-width: 78em) { + .splash-head { + font-size: 300%; + } +} + +@media (min-height: 800px) { + .home-menu-bg, + .container { + background-size: cover; + } +} diff --git a/assets/css/style.css b/assets/css/style.css index f1555252..01f11639 100755 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -2,7 +2,7 @@ * @Author: prpr * @Date: 2016-01-21 07:57:38 * @Last Modified by: prpr -* @Last Modified time: 2016-01-21 19:01:48 +* @Last Modified time: 2016-01-21 20:33:40 */ @font-face { @@ -15,7 +15,7 @@ url('../fonts/minecraft.svg#minecraft') format('svg'); } -body { +html { line-height: 1.7em; color: #fff; font-size: 13px; @@ -24,9 +24,8 @@ body { .home-menu { padding: 0; - /*padding: 0.3em 0.5em 0.3em 0.5em;*/ text-align: center; - /*border: 1px solid transparent;*/ + border-bottom: 1px solid rgba(0, 0, 0, 0.3); box-shadow: rgba(0,0,0,0.1) 0 1px 2px; /* for firefox */ white-space: normal; @@ -60,89 +59,14 @@ body { .pure-button { margin: .5em 1em; } -.home-menu-blur { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: -100; -} -.home-menu-wrp { - height: 100%; - background-color: rgba(255,255,255,0.4); -} -.home-menu-bg { - background-image: url("http://ww4.sinaimg.cn/large/823186a6gw1enwts09sbrj21hc0u016u.jpg"); - background-position: center 0; - background-size: auto 800px; - position: absolute; - width: 100%; - height: 100%; - z-index: -1; - filter: blur(5px); - -webkit-filter: blur(5px); - -moz-filter: blur(5px); - -o-filter: blur(5px); - -ms-filter: blur(5px); - box-shadow: rgba(0,0,0,0.1) 0 1px 2px; -} .container { - background-image: - url("http://ww4.sinaimg.cn/large/823186a6gw1enwts09sbrj21hc0u016u.jpg"); - /* background-size: cover; */ - background-size: auto 800px; - background-repeat: no-repeat; - background-position: center 0; width: 100%; height: 100%; top: 0; left: 0; position: fixed !important; } -.container .pure-button { - color: white; - padding: 0.8em 2.5em; - border-radius: 5px; - background: transparent; - border: 1px solid #fff; - font-size: 120%; - transition: color 0.25s ease-in-out, - border-color 0.25s ease-in-out, - background-color 0.25s ease-in-out; -} -.container .pure-button:hover { - background-color: rgba(255, 255, 255, 0.2); -} - -.splash { - width: 80%; - height: 50%; - margin: auto; - position: absolute; - top: 100px; left: 0; bottom: 0; right: 0; - text-align: center; -} -.splash-head { - font-size: 20px; - font-weight: bold; - color: white; - padding: 1em 0.5em; - font-weight: 100; - line-height: 1.5em; - margin: 0.2em 0 0.5em; - font-family: Minecraft; - text-shadow: - 0px 4px 3px rgba(0,0,0,0.4), - 0px 8px 13px rgba(0,0,0,0.1), - 0px 18px 23px rgba(0,0,0,0.1); -} -.splash-subhead { - letter-spacing: 0.05em; - margin-top: 0.8em; - margin-bottom: 1.5em; -} .footer { color: #fff; @@ -165,25 +89,10 @@ body { .home-menu .pure-menu-selected a { display: none; } - /*.home-menu-bg { - background-size: inherit; - background-position-x: center; - }*/ - .splash-head { - font-size: 200%; - } - .splash { - width: 100%; - height: 50%; - } - /*.splash-subhead { - font-size: 200%; - }*/ } @media (min-width: 48em) { - body { font-size: 16px; } @@ -195,50 +104,7 @@ body { float: right; } - .splash { - width: 80%; - height: 50%; - } - - .splash-head { - font-size: 250%; - } - } @media (min-width: 78em) { - .splash-head { - font-size: 300%; - } -} - -@media (min-height: 800px) { - .home-menu-bg, - .container { - background-size: cover; - } -} -.pure-form { - margin: 10px auto; - width: 40%; -} -.pure-input { - margin: 10px 0; - width: 100%; -} -#keep-label { - float: left; -} -#login-button { - float: right; - margin: .5em 0; -} -#register-button { - margin: .5em 0; - width: 100%; - float: left; -} -#msg { - width: 40%; - margin: 3.5em auto 0; } diff --git a/assets/css/user.style.css b/assets/css/user.style.css new file mode 100644 index 00000000..a78492c3 --- /dev/null +++ b/assets/css/user.style.css @@ -0,0 +1,89 @@ +/* +* @Author: prpr +* @Date: 2016-01-21 19:12:06 +* @Last Modified by: prpr +* @Last Modified time: 2016-01-21 22:09:28 +*/ + +.home-menu-blur { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: -100; +} +.home-menu-wrp { + height: 100%; + background-color: rgba(255,255,255,0.4); +} +.home-menu-bg { + background-image: url("../images/bg_stone.png"); + background-repeat: repeat; + width: 100%; + height: 100%; + z-index: -1; + filter: blur(2px); + -webkit-filter: blur(2px); + -moz-filter: blur(2px); + -o-filter: blur(2px); + -ms-filter: blur(2px); + box-shadow: rgba(0,0,0,0.1) 0 1px 2px; +} + +.container { + background-image: + url("../images/bg_stone.png"); + background-repeat: repeat; +} + +/* Mobile phone */ +@media (max-width: 48em) { + .home-menu .pure-menu-selected a { + display: none; + } + /*.home-menu-bg { + background-size: inherit; + background-position-x: center; + }*/ + .splash-head { + font-size: 200%; + } + .splash { + width: 100%; + height: 50%; + } + /*.splash-subhead { + font-size: 200%; + }*/ +} + +#canvas3d { + margin-top: 8%; + margin-left: 20%; + display: block; +} + +.upload-container { + color: #333; + margin-top: 35%; + margin-right: 30%; + border: #989898 1px solid; + border-radius: 4px; + padding: 40px 40px 40px 40px; + background: rgba(255,255,255,.9); +} +.upload-title { + font-family: Minecraft; +} +button { + margin: 0 !important; +} +span { + padding: .5em .5em; + color: #5e5e5e; + margin-top: 0.1em; +} +.alert { + margin: 20px 0 0; +} diff --git a/assets/js/user.utils.js b/assets/js/user.utils.js index 8f3e6ed9..8f3f4179 100644 --- a/assets/js/user.utils.js +++ b/assets/js/user.utils.js @@ -2,7 +2,137 @@ * @Author: prpr * @Date: 2016-01-21 13:56:40 * @Last Modified by: prpr -* @Last Modified time: 2016-01-21 13:56:42 +* @Last Modified time: 2016-01-21 21:56:09 */ 'use strict'; + +$("body").on("change", "#skininput", function(){ + var files = $("#skininput").prop("files"); + handleFiles(files, "skin"); +}); + +$("body").on("change", "#capeinput", function(){ + var files = $("#capeinput").prop("files"); + handleFiles(files, "cape"); +}); + +function showMsg(type, msg) { + $("#msg").removeClass().addClass("alert").addClass(type).html(msg); +} + +var handleFiles = function (files, type) { + if(files.length > 0) { + var file = files[0]; + if(file.type === 'image/png') { + var fr = new FileReader(); + fr.onload = function (e) { + var img = new Image(); + img.onload = function () { + if (type == "skin") { + MSP.changeSkin(img.src); + } else { + MSP.changeCape(img.src); + } + }; + img.onerror = function () { + alert("Error: Not an image or unknown file format"); + }; + img.src = this.result; + }; + fr.readAsDataURL(file); + } else { + alert("Error: This is not a PNG image!"); + } + } +}; + +var canvas = MSP.get3dSkinCanvas(500, 500); +$("#skinpreview").append($(canvas).prop("id", "canvas3d")); + +$("[title='Movements']").click(function(){ + if (MSP.getStatus("movements")) { + MSP.setStatus("movements", false); + } else { + MSP.setStatus("movements", true); + } +}); + +$("[title='Running']").click(function(){ + if (MSP.getStatus("running")) { + MSP.setStatus("running", false); + } else { + MSP.setStatus("running", true); + } +}); + +$("[title='Rotation']").click(function(){ + if (MSP.getStatus("rotation")) { + MSP.setStatus("rotation", false); + } else { + MSP.setStatus("rotation", true); + } +}); + +$("#logout").click(function(){ + $.ajax({ + type: "POST", + url: "../ajax.php?action=logout", + dataType: "json", + data: {"uname": docCookies.getItem('uname')}, + success: function(json) { + var path = "/" + document.URL.split("/").slice(-3)[0]; + docCookies.removeItem("uname", path); + docCookies.removeItem("token", path); + showMsg('alert-success', json.msg); + window.setTimeout(function(){ + window.location = "./index.php"; + }, 1000); + } + }); +}); + +$("#upload").click(function(){ + var skin_file = $("#skininput").get(0).files[0]; + var cape_file = $("#capeinput").get(0).files[0]; + + var form_data = new FormData(); + if (skin_file) { + form_data.append('skin_file', skin_file); + } + if (cape_file) { + form_data.append('cape_file', cape_file); + } + form_data.append('uname', docCookies.getItem('uname')); + if (skin_file || cape_file) { + $.ajax({ + type: 'POST', + url: '../ajax.php?action=upload', + contentType: false, + dataType: "json", + data: form_data, + processData: false, + beforeSend: function() { + showMsg("alert-info", "Uploading..."); + }, + success: function(json) { + console.log(json); + if (json[0].errno == 0 && json[1].errno == 0) { + showMsg("alert-success", "Successfully uploaded."); + } + if (json[0].errno != 0) { + showMsg("alert-danger", "Error when uploading skin:\n"+json[0].msg); + } + if (json[1].errno != 0) { + showMsg("alert-danger", "Error when uploading cape:\n"+json[1].msg); + } + } + }); + } else { + showMsg("alert-warning", "No input file selected"); + } + +}); + + + diff --git a/includes/utils.class.php b/includes/utils.class.php index 12d1a120..640b3eff 100644 --- a/includes/utils.class.php +++ b/includes/utils.class.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-01-16 23:01:33 * @Last Modified by: prpr - * @Last Modified time: 2016-01-17 13:48:15 + * @Last Modified time: 2016-01-21 21:59:47 */ $dir = dirname(dirname(__FILE__)); require "$dir/config.php"; @@ -113,5 +113,12 @@ class utils { } mysql_close(self::$connection); } + + function getValue($key, $array) { + if (array_key_exists($key, $array)) { + return $array[$key]; + } + return false; + } } ?> diff --git a/index.php b/index.php index 337be201..15131e5b 100755 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-01-17 13:55:20 * @Last Modified by: prpr - * @Last Modified time: 2016-01-21 18:56:34 + * @Last Modified time: 2016-01-21 20:19:15 */ session_start(); function __autoload($classname) { @@ -34,6 +34,7 @@ function getValue($key, $array) { + @@ -49,7 +50,7 @@ function getValue($key, $array) {
  • - Welcome, + Welcome, Sign In diff --git a/libs/glyphicon/fonts/glyphicons-halflings-regular.eot b/libs/glyphicon/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 00000000..b93a4953 Binary files /dev/null and b/libs/glyphicon/fonts/glyphicons-halflings-regular.eot differ diff --git a/libs/glyphicon/fonts/glyphicons-halflings-regular.svg b/libs/glyphicon/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 00000000..94fb5490 --- /dev/null +++ b/libs/glyphicon/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/libs/glyphicon/fonts/glyphicons-halflings-regular.ttf b/libs/glyphicon/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 00000000..1413fc60 Binary files /dev/null and b/libs/glyphicon/fonts/glyphicons-halflings-regular.ttf differ diff --git a/libs/glyphicon/fonts/glyphicons-halflings-regular.woff b/libs/glyphicon/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 00000000..9e612858 Binary files /dev/null and b/libs/glyphicon/fonts/glyphicons-halflings-regular.woff differ diff --git a/libs/glyphicon/fonts/glyphicons-halflings-regular.woff2 b/libs/glyphicon/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 00000000..64539b54 Binary files /dev/null and b/libs/glyphicon/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/libs/glyphicon/glyphicon.css b/libs/glyphicon/glyphicon.css new file mode 100644 index 00000000..a842bed8 --- /dev/null +++ b/libs/glyphicon/glyphicon.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +@font-face{font-family:'Glyphicons Halflings';src:url(./fonts/glyphicons-halflings-regular.eot);src:url(./fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(./fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(./fonts/glyphicons-halflings-regular.woff) format('woff'),url(./fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(./fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"} diff --git a/user/index.php b/user/index.php index 38cd1287..72f4b3c6 100644 --- a/user/index.php +++ b/user/index.php @@ -1,4 +1,10 @@ getToken()) { +$action = utils::getValue('action', $_GET); + +if (isset($_SESSION['uname'])) { + $user = new user($_SESSION['uname']); + if ($_SESSION['token'] != $user->getToken()) { header('Location: ../index.php?msg=Invalid token. Please login.'); } } else { @@ -24,61 +26,138 @@ if ($uname = getValue('uname', $_SESSION)) { } ?> - + - Upload - Blessing Skin Server 0.1 - - + + + Upload - Blessing Skin Server + + + + + + + - -
    - -
    -
    -
    -
    -

    Upload

    -
    -

    Select a skin:


    -

    Select a cape:


    - -
    -
    + + +
    +
    +
    +
    +
    +
    +

    Upload

    +
    +

    Select a skin:

    + +
    +

    Select a cape:

    + +

    + + Preview +
    + +
    - + + + + + - + getTexture('skin'); +$skin_file = $user->getTexture('skin'); if ($skin_file) { echo ""; } else {