From 638ff8a06aae2b1bc9fcbb9406a7a1a30b741ef3 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Mon, 19 Mar 2012 19:24:31 -0700 Subject: achievements.php debug data and some fixes. --- pages/about.php | 1 + pages/achievements.php | 385 +++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 328 insertions(+), 58 deletions(-) (limited to 'pages') diff --git a/pages/about.php b/pages/about.php index d170ea9..b45883a 100644 --- a/pages/about.php +++ b/pages/about.php @@ -47,6 +47,7 @@ topbar($Links);
Matt
Radivel
Splax +
chord "; +foreach ($ac3 as $c3) { + echo ""; + foreach ($ac1 as $c1) { + foreach ($ac2 as $c2) { + + + $c = "#$c1$c2$c3"; + if ($_GET['showcolor'] == 'all') { + //echo ""; + echo ""; + } + //if ($c2 == 'f') break 2; + } + } +} +echo ""; + +$debug = false; + +if ($_GET['debuglevels'] == 'yes') + $debug = true; + + +if ($_GET['showemblems'] == 'all') { + + echo ""; + $dir = "./images/marks/"; + // Open a known directory, and proceed to read its contents + $i = 0; + if (is_dir($dir)) { + if ($dh = opendir($dir)) { + while (($file = readdir($dh)) !== false) { + $c = $file; + if (strpos($file, '.png') == false) + continue; + $c = "$c"; + + if (($i % 20) == 0) + echo ""; + + $i++; + + echo ""; + // echo "filename: $file : filetype: " . filetype($dir . $file) . "\n"; + } + closedir($dh); + } + } + echo "
+
"; +} + + +$dir = "./images/marks/tmpmarks/"; + +// Open a known directory, and proceed to read its contents +if (is_dir($dir)) { + if ($dh = opendir($dir)) { + while (($file = readdir($dh)) !== false) { + //echo "
$file \n"; + } + closedir($dh); + } +} + + + +if ($_GET['showcolor'] == 'grad') { + makeColorGradient(.3,.3,.3,0,2,4); + makeColorGradient(.3,.3,.3,0,2,4, 230,25); + makeColorGradient(.1,.1,.1,120,120,120,128,128); +} + + function makeColorGradient($frequency1, $frequency2, $frequency3, + $phase1, $phase2, $phase3, + $center = 128, $width = 127, $len = 30) + { + echo ""; + for ($i = 0; $i < $len; $i++) { + $red = sin($frequency1*$i + $phase1) * $width + $center; + $grn = sin($frequency2*$i + $phase2) * $width + $center; + $blu = sin($frequency3*$i + $phase3) * $width + $center; + //document.write( ''); + $c = toColor(($grn * 256) + ($red * (256 * 256)) + $blu); + echo ""; + } + echo "
"; + } +function toColor($n) +{ +return("#".substr("000000".dechex($n),-6)); +} + +// !! END TESTING AREA; + +//Self-healing code for unlocks. +if (!$viewer) { + applyAchievements($userID, 1); + applyAchievements($userID, 2); + applyAchievements($userID, 3); + applyAchievements($userID, 4); +} + ?>