load($file2); $dogbreedname= $xml->getElementsByTagName( "name" )->item(0)->nodeValue; $dogshortname= $xml->getElementsByTagName( "shortname" )->item(0)->nodeValue; $dogarray = array(); //$breeds = array(); //$matching = array(); //$images = array(); $thebreed = ''; $theimage = ''; $k = 0; $imagearraysize = 0; $dir = opendir($menudir); while(($file = readdir($dir)) !== false) { if(substr($file, -4, 4) == ".xml") { $k = 0; $xml2 = new DOMDocument; $xml2->load($menudir.$file); //echo substr($xml2->getElementsByTagName( "linkname" )->item(0)->nodeValue,5,strpos($xml2->getElementsByTagName( "linkname" )->item(0)->nodeValue,".")-5); $breedname = substr($xml2->getElementsByTagName( "linkname" )->item(0)->nodeValue,5,strpos($xml2->getElementsByTagName( "linkname" )->item(0)->nodeValue,".")-5); if (!(preg_match("/^..?$/", $file))) { $image_array = $xml2->getElementsByTagName( "images" )->item(0); if ($image_array){ $imagearray = array(); foreach($image_array->getElementsBytagName('image') as $image){ $imagearray[] = $image->nodeValue; } shuffle($imagearray); $imagearraysize = count($imagearray); while ($k < $imagearraysize) { $breedimage = $imagearray[$k]; $k++; if ($breed == $breedname){ if ($k < 6){ $dogarray[] = array($breedname,"1",$breedimage); $theimage = $breedimage; $thebreed = $breedname; //echo 'Gevonden! '; //echo $theimage; //$breeds[] = $breedname; //$matching[] = '1'; //$images[] = $breedimage; } } else{ if ($k < 3){ $dogarray[] = array($breedname,'0',$breedimage); //$breeds[] = $breedname; //$matching[] = '0'; //$images[] = $breedimage; } } } } } } } if ($dogbreedname != ''){ $items2 = count($dogarray); if ($items2 > 30) { $shufflecount = 0; $fileMax = 30; $fileCount2 = 0; $goodshuffle = '0'; while ($goodshuffle == '0' && $shufflecount < 4) { //shuffle($dogarray); //$shufflecount++; shuffle($dogarray); $fileCount2 = 0; while ($fileCount2 < $fileMax) { //echo $dogarray[$fileCount2][1]; if ($dogarray[$fileCount2][1] == '1') { $goodshuffle = '1'; //echo 'Goed geschud! '; } $fileCount2++; } $shufflecount++; } } else { $fileMax = $items2; shuffle($dogarray); } if ($goodshuffle == '0'){ $fileMax--; $shufflecount = $shufflecount + rand(0, 3); } } ?> Spartan Dogs - Find the <? echo $dogbreedname; ?> '; echo '' ?>

 

  Spartan Dogs - Find the

Doe het vind de '.$dogshortname.' spel, u leert spelenderwijs veel meer van het '.$dogbreedname.' ras en tegelijkertijd andere rassen. Wordt een hondenkenner!'; else echo '

Do the find the '.$dogshortname.' game, playing this you will learn a lot more about the '.$dogbreedname.' breed and other breeds at the same time. Become a dog expert!'; if ($dogbreedname == $dogshortname) echo '

Find the '.$dogbreedname.':

'; else echo '

Find the '.$dogbreedname.' or '.$dogshortname.':

'; if($lang=='1') echo '

Als u het hondenras kunt herkennen door alleen naar voorbeeld foto\'s te kijken, lukt dit u vaak ook heel snel in het echte leven. Vind de hond of honden waarvan jij denkt dat het '.$dogbreedname.' honden zijn en zet deze op "Ja". Succes!'; else echo '

If you can recognize the dog breed just from looking at example photos, you can often also very quickly do so in real life. Find the dog or dogs that you think are '.$dogbreedname.' dogs and put them on "Yes". Success!'; echo '

'; $items = count($dogarray); $fileCount = 0; $tablecount = 0; echo ''; while ($fileCount < $fileMax) { $tablecount++; if (!(($tablecount-1) % 3)) { echo ''; } echo ' '; if (!($tablecount % 3)) { echo ''; } if ($goodshuffle == '0' && $dogarray[$fileCount][1] == '1') { $goodshuffle = '1'; $fileMax++; } //echo $dogarray[$fileCount][1].'
'; if ($goodshuffle == '0' && $shufflecount == $fileCount) { $tablecount++; if (!(($tablecount-1) % 3)) { echo ''; } echo ' '; if (!($tablecount % 3)) { echo ''; } //echo $breed.'
'; } //echo $dogarray[$fileCount][0]; //echo $dogarray[$fileCount][1]; //echo $dogarray[$fileCount][2]; //echo '
'; //echo $breeds[$fileCount]; //echo $matching[$fileCount]; //echo $images[$fileCount]; $fileCount++; } if ($tablecount % 2) { if ($tablecount % 1) { echo ''; } else { echo ''; } } else { } echo '
'; if($lang=='1') echo 'Is dit een '.$dogbreedname.'?'; else echo 'Is this a '.$dogbreedname.'?'; echo '
'; if($lang=='1') echo ' Ja
'; else echo ' Yes
'; if($lang=='1') echo ' Nee
'; else echo ' No
'; echo ' '; echo ' '; echo '
'; if($lang=='1') echo 'Is dit een '.$dogbreedname.'?'; else echo 'Is this a '.$dogbreedname.'?'; echo '
'; if($lang=='1') echo ' Ja
'; else echo ' Yes
'; if($lang=='1') echo ' Nee
'; else echo ' No
'; echo ' '; echo ' '; echo '
'; ?>


($rater_ip_vote_qty - 1)){ $rater_msg=$rater_already_rated_msg; }else{ fwrite($rater_file,$rater_rating."|".$rater_ip.$rater_end_of_line_char); $rater_msg=$rater_thankyou_msg; } }else{ fwrite($rater_file,$rater_rating."|".$rater_ip.$rater_end_of_line_char); $rater_msg=$rater_thankyou_msg; } }else{ fwrite($rater_file,$rater_rating."|".$rater_ip.$rater_end_of_line_char); $rater_msg=$rater_thankyou_msg; } fclose($rater_file); }else{ $rater_msg=$rater_not_selected_msg; } } // Get current rating if(is_file($rater_filename)){ $rater_file=fopen($rater_filename,"r"); $rater_str=""; $rater_str = fread($rater_file, 1024*8); if($rater_str!=""){ $rater_data=explode($rater_end_of_line_char,$rater_str); $rater_votes=count($rater_data)-1; $rater_sum=0; foreach($rater_data as $d){ $d=explode("|",$d); $rater_sum+=$d[0]; } $rater_rating=number_format(($rater_sum/$rater_votes), 2, '.', ''); } fclose($rater_file); }else{ $rater_file=fopen($rater_filename,"w"); fclose($rater_file); } // Assign star image if ($rater_rating <= 0 ){$rater_stars = "./commentrate/img/00star.png";$rater_stars_txt="Not Rated";} if ($rater_rating >= 0.5){$rater_stars = "./commentrate/img/05star.png";$rater_stars_txt="0.5";} if ($rater_rating >= 1 ){$rater_stars = "./commentrate/img/10star.png";$rater_stars_txt="1";} if ($rater_rating >= 1.5){$rater_stars = "./commentrate/img/15star.png";$rater_stars_txt="1.5";} if ($rater_rating >= 2 ){$rater_stars = "./commentrate/img/20star.png";$rater_stars_txt="2";} if ($rater_rating >= 2.5){$rater_stars = "./commentrate/img/25star.png";$rater_stars_txt="2.5";} if ($rater_rating >= 3 ){$rater_stars = "./commentrate/img/30star.png";$rater_stars_txt="3";} if ($rater_rating >= 3.5){$rater_stars = "./commentrate/img/35star.png";$rater_stars_txt="3.5";} if ($rater_rating >= 4 ){$rater_stars = "./commentrate/img/40star.png";$rater_stars_txt="4";} if ($rater_rating >= 4.5){$rater_stars = "./commentrate/img/45star.png";$rater_stars_txt="4.5";} if ($rater_rating >= 5 ){$rater_stars = "./commentrate/img/50star.png";$rater_stars_txt="5";} echo ''; echo ''; echo ''; echo '
'; echo ''; echo ''; echo ''; // '.$rater_item_name.' echo ''; echo ''; echo '

  Rate this page

'; // Output ->> echo '
'; echo '
'; echo '
'; echo ''.$rater_stars_txt.' Stars. Average rating: '.$rater_stars_txt.' from '.$rater_votes.' votes.'; echo '
'; echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'; if($rater_msg!="") echo "
".$rater_msg."
"; echo '
'; echo '
'; // End of Output <<- echo '
'; echo '

'; echo ''; ?>

  If you have any comments you can submit them here

[ 2014-07-17 ] :: jai
Looking for irish blue or red black nose stud dog