From e44a7e37b6c7b5961adaffc62b9042b8d442938e Mon Sep 17 00:00:00 2001 From: mensonge Date: Thu, 13 Nov 2008 09:49:11 +0000 Subject: New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f --- includes/js/dijit/bench/benchReceive.php | 129 +++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 includes/js/dijit/bench/benchReceive.php (limited to 'includes/js/dijit/bench/benchReceive.php') diff --git a/includes/js/dijit/bench/benchReceive.php b/includes/js/dijit/bench/benchReceive.php new file mode 100644 index 0000000..6330077 --- /dev/null +++ b/includes/js/dijit/bench/benchReceive.php @@ -0,0 +1,129 @@ +decode(urldecode($_POST['key'])); + // $string = $json->decode($_POST['key']); + + print "

Thank YOU!

"; + print " +

Your results have been added to our database. No + personal information outside of what you see here + has been stored. +

+ +

You can go back + and run more tests, or even better, load up another browser + and the submit your tests again! +

+ +

again ... thanks for your time.

+ + "; + + print "

Results Submitted:

"; + print "
";
+
+		$ua = $string->clientNavigator;
+		$dojov = $string->dojoVersion;
+
+		print "Client: ".$ua."\n";
+		print "Dojo v".$dojov."\n"; 
+
+		if (is_array($string->dataSet)) {
+			print "\nTest Results:";
+			// should client serialize a key, or is this safer?
+			$dataSet = md5(serialize($string)); 
+			foreach ($string->dataSet as $test) {
+				$data = array(
+					'dataSet' => $dataSet,
+					'useragent' => $ua,
+					'dojover' => $dojov,
+					'testNum' => $test->testNum,
+					'testMethod' => $test->testMethod,	
+					'testTime' => $test->testTime,
+					'testAverage' => $test->testAverage,
+					'testCount' => $test->testCount,
+					'dijit' => $test->dijit
+				);
+				print_r($data); 
+				add_rec($table,$data); 
+			}
+		}
+
+		if (is_array($string->errors)) {
+			// not saving errors at this point
+			print "\nErrors:";
+			foreach ($string->errors as $error) {
+				print_r($error); 
+			}
+		}
+	print "
"; +} + +function add_rec($table, $data) { + + if (!is_array($data)) { return FALSE; } + + $keys = array_keys($data); + $values = array_values($data); + $field=0; + + for ($field;$field -- cgit v1.2.3