commit eaf90401195df65ee8adf2a648e65da3da8f1a0f Author: juyung Date: Tue Jun 30 01:06:38 2015 -0700 Archive diff --git a/bgimage.php b/bgimage.php new file mode 100755 index 0000000..0e3f5ce --- /dev/null +++ b/bgimage.php @@ -0,0 +1,97 @@ + \ No newline at end of file diff --git a/css/nprogress.css b/css/nprogress.css new file mode 100755 index 0000000..78a6cb2 --- /dev/null +++ b/css/nprogress.css @@ -0,0 +1,73 @@ +/* Make clicks pass-through */ +#nprogress { + pointer-events: none; +} + +#nprogress .bar { + background: #29d; + + position: fixed; + z-index: 1031; + top: 0; + left: 0; + + width: 100%; + height: 2px; +} + +/* Fancy blur effect */ +#nprogress .peg { + display: block; + position: absolute; + right: 0px; + width: 100px; + height: 100%; + box-shadow: 0 0 10px #29d, 0 0 5px #29d; + opacity: 1.0; + + -webkit-transform: rotate(3deg) translate(0px, -4px); + -ms-transform: rotate(3deg) translate(0px, -4px); + transform: rotate(3deg) translate(0px, -4px); +} + +/* Remove these to get rid of the spinner */ +#nprogress .spinner { + display: block; + position: fixed; + z-index: 1031; + top: 15px; + right: 15px; +} + +#nprogress .spinner-icon { + width: 27px; /*initial: 18px; */ + height: 27px; /*initial: 18px; */ + box-sizing: border-box; + + border: solid 5px transparent; /* solid 2px transparent; */ + border-top-color: #29d; + border-left-color: #29d; + border-radius: 50%; + + -webkit-animation: nprogress-spinner 400ms linear infinite; + animation: nprogress-spinner 400ms linear infinite; +} + +.nprogress-custom-parent { + overflow: hidden; + position: relative; +} + +.nprogress-custom-parent #nprogress .spinner, +.nprogress-custom-parent #nprogress .bar { + position: absolute; +} + +@-webkit-keyframes nprogress-spinner { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); } +} +@keyframes nprogress-spinner { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} diff --git a/css/summoner.css b/css/summoner.css new file mode 100755 index 0000000..998f32f --- /dev/null +++ b/css/summoner.css @@ -0,0 +1,482 @@ + +*{ + font-family: Tahoma,Verdana,Segoe,sans-serif +} +html { + overflow-y:scroll; +} + +html,body { + width:100%; + height:100%; +} + +body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,form,fieldset,p,button { + margin:0; + padding:0; +} +body { + min-width:880px; + max-width:100%; + max-height:0px; + background-color:#000; + background-attachment: fixed; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} +.input-form { + padding:10px; + font-weight:bold; + text-align:center; +} + +label { + font-family: Copperplate,"Copperplate Gothic Light",fantasy; + font-size:18px; + color: #fff; + text-shadow:-1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000; +} + +img { + cursor: pointer; +} +/* +.input-form{ + text-align:center; + margin:10% auto 0; + padding:10px; + font-weight:bold; +}*/ + +.title { + font-family: Copperplate,"Copperplate Gothic Light",fantasy; + text-shadow:-1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000; + font-size:20px; + color:#fff; + text-decoration:none; +} + +.input-form-name { + font-family: Arial, sans-serif; + border: solid 3px #404040; + padding:6px 3px; + text-indent:3px; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + width:170px; + opacity: 0.8; + filter:Alpha(opacity=80); /* IE8 and earlier versions supports */ +} +.input-form-region { + font-family: Arial, sans-serif; + border:solid 3px #404040; + padding:6px 3px; + width:170px; + border-radius: 3px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + opacity: 0.8; + filter:Alpha(opacity=80); /* IE8 and earlier versions supports */ +} +/* input-form-submit source: http://bradsknutson.com/blog/css-button-with-sliding-background-color/ */ +.input-form-submit { + color: #404040; + background: #FFF; + padding: 6px 15px; + margin: 25px; + font-family: "Arial Black","Arial Bold",Gadget,sans-serif; + border: 3px solid #404040; + font-size: 12px; + font-weight: bold; + letter-spacing: 1px; + text-transform: uppercase; + border-radius: 2px; + display: inline-block; + text-align: center; + cursor: pointer; /* + box-shadow: inset 0 0 0 0 #31302B; + -webkit-transition: all ease 0.8s; + -moz-transition: all ease 0.8s; + transition: all ease 0.8s; + /*border-radius: 5px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + */ + opacity: 0.8; + filter:Alpha(opacity=80); /* IE8 and earlier versions supports */ +} +/* +.input-form-submit:hover{ + box-shadow: inset 150px 0 0 0 #31302B; + color: #FFF; +} +*/ +.input-form-submit:hover { + background-color: #404040; + color: #FFF; +} + +.result { + font-family: "Trebuchet MS","Lucida Grande","Lucida Sans Unicode","Lucida Sans",Tahoma,sans-serif; + margin:-5px auto; + padding: 10px; + text-align:left; + font-size:14px; + color:#000; + width:750px; + background: rgba(255, 255, 255, 0.3); + border:3px solid #404040; + border-radius: 2px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + +} + +.summoner-icon { + border:1px solid #404040; + border-radius: 5px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + margin: 5px; +} +.summoner-name { + position:absolute; + font-size:30px; + cursor: pointer; + } + +#status_dot { + font-size:35px; + text-shadow:-1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000; + cursor:pointer; +} + +#active-text { + position:absolute; + margin-top:75px; + font-size:12px; + color:#202020; + vertical-align:center; +} + +.summoner-level { + position:absolute; + margin-left:-35px; + margin-top:75px; + font-family: "Trebuchet MS","Lucida Grande","Lucida Sans Unicode","Lucida Sans",Tahoma,sans-serif; + background: #fff; + color:#000; + font-size:11px; + padding:1px 4px; + border-radius: 2px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + background: rgba(255, 255, 255, 0.6); + cursor:pointer; + text-align:right; +} + +.summoner-revision_date { + position:absolute; + margin-top:75px; + font-size:12px; + color:#202020; + vertical-align:center; +} + +.summoner-recent { + border: 1px solid #505050; + background: rgba(255, 255, 255, 0.5); + padding: 15px; + margin: 5px 5px; /* box vertical whitespace */ + padding-top: 0px; + margin-top:0px; + padding-bottom: 5px; +} + +.summoner-recent_belt { + margin:0px 5px; + border:1px solid #404040; + border-bottom-color: transparent; + opacity: 0.7; + filter:Alpha(opacity=70); /* IE8 and earlier versions supports */ + text-indent:5px; +} + +.seemore_belt { + margin:0px 5px 5px 5px; + border:1px solid #404040; + border-top-color: transparent; + opacity: 0.7; + filter:Alpha(opacity=70); /* IE8 and earlier versions supports */ + text-indent:5px; + +} + + + +.summoner-champion_pic { + width:75px; + height:75px; + border-radius: 50%; + margin-top:2px; + margin-left:-10px; + margin-right:-10px; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + border: 1px #404040 solid; +} + +.summoner-spell1,.summoner-spell2 { + width:34px; + height:34px; + border-radius: 5px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + position:absolute; + margin-left:15px; + margin-top:3px; + border:1px solid #404040; +} +.summoner-spell2 { + margin-top:43px; +} + +.table-col0 { + position:absolute; + margin-top:-70px; + margin-left:130px; + line-height:150%; + text-align:center; +} + +.table-col1 { + position:absolute; + margin-top:-65px; + margin-left:200px; + text-align:center; + font-size:11px; + font-weight:bold; + text-align:center; + line-height:150%; +} + +.table-col1-level { + color:#303030; + font-weight:normal; +} + +.table-col0-kda_ratio { + color:#fff; + font-weight:bold; + font-size:9px; + background-color:rgb(0, 81, 255); /*386088*/ + padding:0 3px; + text-align:center; +} + +.table-col0-kda { + text-align:center; + font-size:11px; + font-weight:bold; +} + +#table-col0-kill { + color:#242442; +} + +.table-col0-slash { + color:#000; + font-size:10px; + font-weight:normal; +} + +#table-col0-death { + color:#8B0000; +} + +#table-col0-assist { + color:#242442; +} + +.table-col0-kill_title { + line-height:200%; + color:#C50101; + font-weight:bold; + font-size:11px; + text-align:center; +} + +.gold { + color:#FFFC00; + text-shadow:-1px 0 #202020, 0 1px #202020, 1px 0 #202020, 0 -1px #202020; +} + +a[title]:hover:after { + content: attr(title); + padding: 2px 4px; + font-family: Consolas,monaco,monospace; + color: #707070; + font-size:11px; + text-align:center; + position: absolute; + z-index: 20; + white-space: pre-line; + max-width:250px; + margin-right:10px; + -moz-box-shadow: 0px 0px 4px #222; + -webkit-box-shadow: 0px 0px 4px #222; + box-shadow: 0px 0px 4px #222; + background-color: #000; + opacity: 0.90; + filter:Alpha(opacity=90); /* IE8 and earlier versions supports */ +} + + +a[title].tier:hover:after { + margin-left:565px; + margin-top:90px; +} + +a[title].spell1:hover:after, a[title].spell2:hover:after { + margin-left:40px; + width:150px; +} + +a[title].spell2:hover:after { + margin-top:40px; + +} +a[title].gold_a:hover:after { + width:160px; + margin-top:-90px; +} +a[title].kill_title:hover:after { + width:100px; + margin-top:-10px; +} +a[title].damage:hover:after { + width:200px; +} +a[title].ward:hover:after { + width:95px; +} +a[title].item:hover:after { + width:170px; + margin-left:-10px; + margin-top:30px; +} + +.itemlist { + position:absolute; + margin-top:-55px; + margin-left:300px; +} + +.itembox { + border-radius:5px; + border:1px solid #404040; +} + +#ward { + font-size:11px; + color:#0B4C0B; + text-align:center; + font-weight:bold; +} + +.ip_earned { + position:absolute; + margin-top:-50px; + min-width:50px; + margin-left:660px; + font-size:11px; + color:#766C03; + font-weight:bold; + text-align:center; +} + +.blueTeam { + border:2px solid rgb(82, 82, 255); + border-radius: 5%; + -webkit-border-radius: 5%; + -moz-border-radius: 5%; + margin-right:-2px; +} + +.redTeam { + border:2px solid rgb(255, 82, 82); + border-radius: 5%; + -webkit-border-radius: 5%; + -moz-border-radius: 5%; + margin-right:-2px; +} + +.footer { + cursor:default; + margin-top:10%; + text-align:center; + font-size:12px; + color:#fff; + text-shadow:-1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000; +} + +.total_damage { + position:absolute; + margin-top:-60px; + margin-left:600px; + font-size:11px; + color:#E24D00; + text-align:center; + font-weight:bold; +} + +#damage-text { + color:#303030; + font-weight:normal; + font-size:10px; +} + +#status { + line-height:300%; + font-size:12px; + text-shadow:-1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000; + color:#20E22A; + font-weight:normal; +} + +#signup { + color:#ff0; + font-weight:bold; + text-decoration:none; + /*text-shadow:none;*/ +} + +#t_and_c { + line-height:200%; + font-size:11px; + text-decoration:none; + color:rgb(140, 140, 140); +} + +#t_and_c:hover { + color:#fff; +} + +#copyright { + font-size:11px; +} + +#developer_name { + text-decoration:none; + color:#0ff; + font-weight:bold; + line-height:500%; +} + +#developer_name:hover { + color:#fff; +} \ No newline at end of file diff --git a/img/black.png b/img/black.png new file mode 100755 index 0000000..d889de5 Binary files /dev/null and b/img/black.png differ diff --git a/img/blank.png b/img/blank.png new file mode 100755 index 0000000..3486493 Binary files /dev/null and b/img/blank.png differ diff --git a/img/blank_notuse.png b/img/blank_notuse.png new file mode 100755 index 0000000..d889de5 Binary files /dev/null and b/img/blank_notuse.png differ diff --git a/img/empty.png b/img/empty.png new file mode 100755 index 0000000..732a87b Binary files /dev/null and b/img/empty.png differ diff --git a/img/favicon.ico b/img/favicon.ico new file mode 100755 index 0000000..d88b932 Binary files /dev/null and b/img/favicon.ico differ diff --git a/img/gold.png b/img/gold.png new file mode 100755 index 0000000..0162ca5 Binary files /dev/null and b/img/gold.png differ diff --git a/img/noitem.png b/img/noitem.png new file mode 100755 index 0000000..3486493 Binary files /dev/null and b/img/noitem.png differ diff --git a/img/null.png b/img/null.png new file mode 100755 index 0000000..732a87b Binary files /dev/null and b/img/null.png differ diff --git a/img/tier/BRONZE.png b/img/tier/BRONZE.png new file mode 100755 index 0000000..c6274cb Binary files /dev/null and b/img/tier/BRONZE.png differ diff --git a/img/tier/CHALLENGER.png b/img/tier/CHALLENGER.png new file mode 100755 index 0000000..fd528a5 Binary files /dev/null and b/img/tier/CHALLENGER.png differ diff --git a/img/tier/DIAMOND.png b/img/tier/DIAMOND.png new file mode 100755 index 0000000..20ed16d Binary files /dev/null and b/img/tier/DIAMOND.png differ diff --git a/img/tier/GOLD.png b/img/tier/GOLD.png new file mode 100755 index 0000000..2e64b56 Binary files /dev/null and b/img/tier/GOLD.png differ diff --git a/img/tier/MASTER.png b/img/tier/MASTER.png new file mode 100755 index 0000000..85ed996 Binary files /dev/null and b/img/tier/MASTER.png differ diff --git a/img/tier/PLATINUM.png b/img/tier/PLATINUM.png new file mode 100755 index 0000000..c09bf46 Binary files /dev/null and b/img/tier/PLATINUM.png differ diff --git a/img/tier/SILVER.png b/img/tier/SILVER.png new file mode 100755 index 0000000..70732ef Binary files /dev/null and b/img/tier/SILVER.png differ diff --git a/img/tier/UNRANKED.png b/img/tier/UNRANKED.png new file mode 100755 index 0000000..c33bc49 Binary files /dev/null and b/img/tier/UNRANKED.png differ diff --git a/img/triplebar.png b/img/triplebar.png new file mode 100755 index 0000000..e763d2e Binary files /dev/null and b/img/triplebar.png differ diff --git a/index.php b/index.php new file mode 100755 index 0000000..5a4e24a --- /dev/null +++ b/index.php @@ -0,0 +1,573 @@ +key; + } + +/** + * get item name and description by item id + * + * @param $itemId item id + * @return $item item name and description + */ +function getItemText($itemId) { + $json = file_get_contents(Summoner::API_URL.'static-data/na/v1.2/item/'.$itemId.'?api_key='.Summoner::API_KEY); + $link = json_decode($json); + + $item = $link->name . ' + + '.$link->description; + $item = str_replace("
", ' + ', $item); + $item = strip_tags($item); + return $item; +} + + +function itemDescription($itemId) +{ + $itemId_json = file_get_contents('https://na.api.pvp.net/api/lol/static-data/na/v1.2/item/'.$itemId.'?api_key='.Summoner::API_KEY); + $itemId_result = json_decode($itemId_json); + + $first_result = $itemId_result->name . ' + + '.$itemId_result->description; + + $replace_breakline = str_replace(array("
"), ' + ', $first_result); + + $replace_space = strip_tags($replace_breakline); + + return $replace_space; + +} + + + + $apiKey = Summoner::API_KEY; + $inputSummonerName = $_GET['userName']; + $inputSummonerName = str_replace(" ", "", $inputSummonerName); + $summonerName = strtolower($inputSummonerName); + $summonerId = 0; + $summonerJson = file_get_contents('https://na.api.pvp.net/api/lol/na/v1.4/summoner/by-name/' . $summonerName . '?api_key=' . $apiKey, true); + $summoner = json_decode($summonerJson)->$summonerName; + $summonerId = $summoner->id; + $summonerName = $summoner->name; + $summonerRevisionDate = $summoner->revisionDate; + $summonerLevel = $summoner->summonerLevel; + $profileId = $summoner->profileIconId; + + +?> + + + + + + +Summoner <?php if($summonerName){ echo '- ' . $summonerName;} ?> - urgo.tk + + + + + + + + + + + + +"> + + IF NOT, + + +*/ + +?> + + + +
"> +
URGO.TK for NA
+
+ + +     + + + + +
+ + 0){ + echo '
SORRY, ERROR OCCURRED DUE TO ONE OR MORE FOLLOWING REASONS +
:Bad request
:Unauthorized
:No summoner data found for any specified inputs
:Rate limit exceeded
:Internal server error
:Service unavailable
:You are special
+
+ + '; + exit; + } else if($summonerName){ +?> + + (365 * 2)) + { + $epochString .= "several years "; + $statusDotColor = "272727"; // 272727 gray + } + else if($epochDays > 365) + { + $epochString .= "over a year "; + $statusDotColor = "272727"; // 272727 gray + } + else if($epochDays > 180) + { + $epochString .= "over 6 months "; + $statusDotColor = "272727"; + } + else if($epochDays > 90) + { + $epochString .= "over 3 months "; + $statusDotColor = "f00"; + } + else if($epochDays > 30) + { + $epochString .= "over a month "; + $statusDotColor = "f00"; + } + else if($epochDays > 1) + { + $epochString .= $epochDays . " days "; + $statusDotColor = "E5AE00"; + } + else if($epochDays == 1) + { + $epochString .= " a day "; + $statusDotColor = "E5AE00"; //e76000 orange + } + + if($epochDays < 2 && $epochHours > 1) + { + $epochString .= $epochHours . " hrs "; + //$statusDotColor = "E5AE00"; //e5ae00 yellow + } + else if($epochDays < 2 && $epochHours == 1) + { + $epochString .= " an hr "; + } + + if($epochDays == 0 && $epochMinutes > 1) + { + $epochString .= $epochMinutes . " mins "; + } + else if($epochDays == 0 && $epochMinutes == 1) + { + $epochString .= " one min "; + } + + $epochString .= "ago"; + + if($epochDiffSeconds < (60 * 5) ) + { + $epochString = "active now"; + } + +?> + + +
+ + +  ' ?> + + + + + + + + $summonerId; + + $summonerTier = $tier_result[0]->tier; + $summonerDivision = $tier_result[0]->entries[0]->division; + + + if (!$summonerTier){ $summonerTier = 'UNRANKED'; } + /* + if($summonerId == "36821462") + { + $summonerTier = 'CHALLENGER'; + $summonerDivision = ''; + } + */ + $summonerTier = ucfirst(strtolower($summonerTier)); +?> + + + +
+ +games as $recentSummary){ var_dump($recentSummary->stats->championsKilled); } + + foreach( $recent->games as $recentSummary){ + + $FINAL_STATS_WIN = $recentSummary->stats->win; + $FINAL_CHAMPIONID = $recentSummary->championId; + + + $FINAL_STATS_WIN == 1 ? $letterWin = 'VICTORY' : $letterWin ='DEFEAT'; + + $subType = str_replace(array('_','1x1','2x2','3x3','5x5','6x6'), ' ', ucfirst(strtolower($recentSummary->subType))); + + if($recentSummary->subType == 'NONE'){ + $subType = 'Custom'; + } + + $result_champ_name_static_data = file_get_contents('https://na.api.pvp.net/api/lol/static-data/na/v1.2/champion/'. $FINAL_CHAMPIONID .'?api_key=' . $apiKey); + $champName = json_decode($result_champ_name_static_data); +?> + + +stats->timePlayed ); + $timePlayedSecond = gmdate('s', $recentSummary->stats->timePlayed ); +?> + + +
'; echo date('M j Y g:s A', $recentSummary->createDate / 1000); echo '' . $timePlayedMinute. 'm ' . $timePlayedSecond . 's' .' '. $letterWin . ' '; ?>
+
+ + + +spell1 .'?api_key=' . $apiKey); +$summonerSpell1 = json_decode($json_spell1) ; + +$json_spell2 = file_get_contents('https://na.api.pvp.net/api/lol/static-data/na/v1.2/summoner-spell/'. $recentSummary->spell2 .'?api_key=' . $apiKey); +$summonerSpell2 = json_decode($json_spell2) ; + +$spell1Name = $summonerSpell1 -> name; +$spell2Name = $summonerSpell2 -> name; +$spell1Key = $summonerSpell1 -> key; +$spell2Key = $summonerSpell2 -> key; +$spell1Description = $summonerSpell1 -> description; +$spell2Description = $summonerSpell2 -> description; +?> + + + + + +stats->championsKilled ? $championsKilled = $recentSummary->stats->championsKilled : $championKilled = 0; +$recentSummary->stats->numDeaths ? $numDeaths = $recentSummary->stats->numDeaths : $numDeaths = 0; +$recentSummary->stats->assists ? $assists = $recentSummary->stats->assists : $assists = 0; + + +echo '
+
+'.$championsKilled.' +/ +'.$numDeaths.' + / +'.$assists.' +
' + +.'
'; + if($championsKilled > 0 && $numDeaths == 0) + { + echo 'Perfect '; + } + else if($numDeaths > 0) + { + echo number_format( (($championsKilled + $assists) / $numDeaths), 2).':1 '; + } + else + { + echo $championsKilled + $assists . '.00:0 '; + } + echo 'KDA
'; + +$killTitle = ''; +if($recentSummary->stats->firstBlood > 0) $killTitle = 'First Blood'; +if($recentSummary->stats->doubleKills > 0) $killTitle = 'Double Kill'; +if($recentSummary->stats->tripleKills > 0) $killTitle = 'Triple Kill'; +if($recentSummary->stats->quadraKills > 0) $killTitle = 'Quadra Kill'; +if($recentSummary->stats->pentaKills > 0) $killTitle = 'Penta Kill'; + +echo '
'. $killTitle . '
+
Level '.$recentSummary->stats->level.'
'; + +$recentSummary->stats->neutralMinionsKilledYourJungle ? $inTeamJungle = $recentSummary->stats->neutralMinionsKilledYourJungle : $inTeamJungle = 0; +$recentSummary->stats->neutralMinionsKilledEnemyJungle ? $inEnemyJungle = $recentSummary->stats->neutralMinionsKilledEnemyJungle : $inEnemyJungle = 0; +$recentSummary->stats->minionsKilled ? $minionsKilled = $recentSummary->stats->minionsKilled : $minionsKilled = 0; +$recentSummary->stats->goldEarned ? $goldEarned = $recentSummary->stats->goldEarned : $goldEarned = 0; +echo ' + +
'.number_format(($goldEarned / 100), 1) .'k ('. ($minionGoldEarned) . ')
+ + + +
'; + +?> + +
+ +stats->item0){ ?> + + + +stats->item1){ ?> + + + + +stats->item2){ ?> + + + +stats->item3){ ?> + + + +stats->item4){ ?> + + + +stats->item5){ ?> + + + +stats->item6){ ?> + + +
+ +stats->totalDamageDealtToChampions? $totalDealToChamp = $recentSummary->stats->totalDamageDealtToChampions : $totalDealToChamp = 0; +$recentSummary->stats->totalDamageDealt ? $totalDeal = $recentSummary->stats->totalDamageDealt : $totalDeal = 0; + +echo' +'; + +$recentSummary->ipEarned? $ipEarned = $recentSummary->ipEarned : $ipEarned = 0; +echo '
+' . $ipEarned . ' IP
'; ?> + + +
+ + +
+ + + + + + + + +
+ + + +