arrowHome arrow News arrow Latest arrow Test

Main Menu
Home
News
Links
Contact Us
Search
Store (DEMO)
Podcast
Front
Baseball Team
Message Board
Board Members
Administrator
Login Form





Lost Password?
No account yet? Register
Floating Module Orthopal
Tag Cloud

HOT TAGS

administrators commissioners county district ed funding gov html members monday news newsobserver parents pb php reassignment request schools spellings students tb today tuesday vote wakeed
Phlogin Form
RokLogin Module
Login
No account yet? Register
JoomLeague Navigation Menu

Latest News

Popular

 

 
\n" . MathGuard2 :: renderExpression($a, $b) . "
"; return $output; } /** function that converts the decimal number to line of 3 random characters * @param $dec decimal number that is being converted to line of 3 random characters * */ function decToBin($dec) { $pattern = "123456789ABCDEFGHIJKLMNOPQRTSTUWXYZ"; //without zero, it was interpreted as an empty space $output = " "; $i = 0; do { if ($dec % 2) { $rand = rand() % 34; $output { 2 - $i } = $pattern { $rand }; } else { $output { 2 - $i } = " "; } $dec = (int) ($dec / 2); $i++; } while ($dec > 0); return $output; } /** function that renders a final 3x5 matrix consisting of random characters * @param $a random number a that renders to the 3x5 matrix consisting of random characters * @param $b random number b that renders to the 3x5 matrix consisting of random characters * */ function renderExpression($a, $b) { $output2 = ""; $number = array ( array ( 7, 5, 5, 5, 7 ), array ( 2, 6, 2, 2, 7 ), array ( 7, 1, 7, 4, 7 ), array ( 7, 1, 7, 1, 7 ), array ( 4, 5, 7, 1, 1 ), array ( 7, 4, 7, 1, 7 ), array ( 7, 4, 7, 5, 7 ), array ( 7, 1, 1, 1, 1 ), array ( 7, 5, 7, 5, 7 ), array ( 7, 5, 7, 1, 7 ) ); $plus = array ( 0, 2, 7, 2, 0 ); $eq = array ( 0, 7, 0, 7, 0 ); for ($line = 0; $line < 5; $line++) { $output2 .= MathGuard2 :: decToBin($number[$a][$line]) . " " . MathGuard2 :: decToBin($plus[$line]) . " " . MathGuard2 :: decToBin($number[$b][$line]) . " " . MathGuard2 :: decToBin($eq[$line]) . "\n"; $output2 = str_replace("0", " ", $output2); } return $output2; } /** A main hashing function: concat of user's answer, hour and the additional prime number (default 37) */ function encode($input, $prime) { return md5($input . date("H") . $prime); } /** This function generates the hash code from the two numbers * @param $a first number * @param $b second sumber * @param $prime additional number to encode with * */ function generateCode($a, $b, $prime) { $code = MathGuard2 :: encode($a + $b, $prime); return $code; } /** This function checks whether the answer and generated security code match * @param $mathguard_answer answer the user has entered * @param $mathguard_code hashcode the mathguard has generated */ function checkResult($mathguard_answer, $mathguard_code, $prime = 37) { // echo("prime; $prime, $mathguard_answer"); $result_encoded = MathGuard2 :: encode($mathguard_answer, $prime); if ($result_encoded == $mathguard_code) return true; else return false; } /** this function inserts the two math term into your form, the parameter is optional */ function insertQuestion($prime = 37) { //default prime is 37, you can change it when specifying the different parameter $output = MathGuard2 :: produceOutput($prime); echo $output; } /** this function inserts the two math term into your form, the parameter is optional */ function insertQuestion2($prime = 37) { //default prime is 37, you can change it when specifying the different parameter $output = MathGuard2 :: produceOutput($prime); return $output; } /** this function returns math expression into your form, the parameter is optional * quite simmilar to insertQuestion, but returns the output as a text instead of echoing */ function returnQuestion($prime = 37) { //default prime is 37, you can change it when specifying the different parameter $output = MathGuard2 :: produceOutput($prime); return $output; } } ?>
Test PDF Print E-mail
Written by Demo User   
Saturday, 27 January 2007

This is a test

This is a simple example of niftybox This is a more complex example of niftybox Let's put some text here. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum Crimson {niftynextcolumn background=lawngreen} Lawn Green {niftynextcolumn background=cornflowerblue} Corn Flower Blue This text will be placed in column 1 {niftynextcolumn} This text will be placed in column 2. I am inserting a longer paragraph here but we can ensure that this all columns will be equal in height. {niftynextcolumn background=#999999} This text will be placed in column 3. The background color will be light grey.
Last Updated ( Wednesday, 11 April 2007 )
 
Next >
 

Podcast
Web Links Module

 

Powered by MoCo Liberty
© 2010 MoCo Data Demo Site
Joomla! is Free Software released under the GNU/GPL License.