failed!
".mysql_error()); $num_rows = mysql_num_rows($result); if ($num_rows!=0) { $data_array = mysql_fetch_array($result); $vaka0_txt=$data_array["name"]; $vaka_name=$data_array["name"]; } // vaka name if($menu1+$menu2>0) { $mm=$menu0*1000000+$menu1*10000; $query ="SELECT * FROM main where category*1000000+grup*10000+term=".$mm; $result = @mysql_query($query) or die("$query failed!
".mysql_error()); $num_rows = mysql_num_rows($result); if ($num_rows!=0) { $data_array = mysql_fetch_array($result); if($menu1<91) { $vaka1_txt=$data_array["name"]; $vaka_name=$data_array["name"]; } } if($menu2>0) { $query ="SELECT * FROM main where category*1000000+grup*10000+term=".$menu; $result = @mysql_query($query) or die("$query failed!
".mysql_error()); $num_rows = mysql_num_rows($result); if ($num_rows!=0) { $data_array = mysql_fetch_array($result); $vaka2_txt=$data_array["name"]; $vaka_name=$data_array["name"]; } } } // end menu1+menu2<>0 print ("&vaka0_txt=$vaka0_txt&vaka1_txt=$vaka1_txt&vaka2_txt=$vaka2_txt&vaka_name=$vaka_name &"); // content if($lang=='lv') {$query_c ="SELECT foto_l,id,menu_nr,REPLACE(REPLACE (saturs_lv,CHAR(10),'

'),CHAR(13),'
') AS saturs FROM content WHERE menu_nr=".$menu." ORDER BY dat "; } else {$query_c ="SELECT foto_l,id,menu_nr,REPLACE(REPLACE (saturs_en,CHAR(10),'

'),CHAR(13),'
') AS saturs FROM content WHERE menu_nr=".$menu." ORDER BY dat "; } //total lines $query_cc ="SELECT count(id) from content WHERE menu_nr=$menu "; $all_lines = @mysql_result(mysql_query($query_cc ),0); if (empty($all_lines)) $count_pages=0; else $count_pages = ceil($all_lines / $lines_per_page); if (!isset($page) or empty($page) or $page<=0) $page=1; else $page=(int)$page; if ($page>$count_pages) $page=$count_pages; $page_for_query = $page-1; $lpos = $page_for_query * $lines_per_page; if (!isset($all_lines) or empty($all_lines) or $all_lines<=0) { } else { $query_c=$query_c." LIMIT $lpos,$lines_per_page"; } $result_c = @mysql_query($query_c) or die("$query_c failed!
".mysql_error()); $num_rows_c = mysql_num_rows($result_c); if ($num_rows_c!=0) { $daiga=""; while ($data_array_c = mysql_fetch_array($result_c)) { $id=$data_array_c['id']; if( $data_array_c['foto_l']=="" or $data_array_c['foto_l']=="-") { if($menu2>0) { if ($menu1<92 ){$daiga="";} if ($menu1==99){ if ($menu0<20)$daiga="";else $daiga="";} if ($menu1==98){$daiga="";} if ($menu1==97){$daiga="";} if ($menu1==96){$daiga="";} } } else { $daiga=""; } $content=$daiga.$content."
".$data_array_c['saturs']."|" ; //plus $query = "SELECT * FROM plus where menu_nr=".$menu." and re_id=".$id." and (plus_file_ext='jpg' or plus_file_ext='swf' or plus_file_ext='flv')order by dat, plus_file_ext"; $result = @mysql_query($query) or die("$query failed!
".mysql_error()); $rows = mysql_num_rows($result); if ($rows!=0) { while ($data_array = mysql_fetch_array($result)) { if(strtolower($data_array['plus_file_ext'])=="jpg") { $file_jpg=$file_jpg.'down/'.$data_array['re_id'].'/'.$data_array['plus_file'].'|' ; if($lang=="lv") {$file_jpg_txt=$file_jpg_txt." ".$data_array['plus_lv']."|" ;} else {$file_jpg_txt=$file_jpg_txt." ".$data_array['plus_en']."|" ;} } if(strtolower($data_array['plus_file_ext'])=="flv" ) { $file_video=$file_video.'down/'.$data_array['re_id'].'/'.$data_array['plus_file'].'|' ; if($lang=="lv") {$file_video_txt=$file_video_txt." ".$data_array['plus_lv']."|" ;} else {$file_video_txt=$file_video_txt." ".$data_array['plus_en']."|" ; } } if(strtolower($data_array['plus_file_ext'])=="swf" ) { $file_doc=$file_doc.'down/'.$data_array['re_id'].'/'.$data_array['plus_file'].'|' ; if($lang=="lv") {$file_doc_txt=$file_doc_txt.$doc_img.$data_array['plus_lv']."|" ;} else {$file_doc_txt=$file_doc_txt.$doc_img.$data_array['plus_en']."|" ; } } }//while end }// if end }//while end }// if end print ("
&re_id=$id&"); if($content=="") print ("&content=n"); else print ("&content=".substr($content, 0, strlen($content)-1)."&"); if($file_jpg=="")print ("&file_jpg=n"); else print ("&file_jpg=".substr($file_jpg, 0, strlen($file_jpg)-1)."&"); print ("&file_jpg_txt=".substr($file_jpg_txt, 0, strlen($file_jpg_txt)-1)."&"); if($file_video=="") print ("&file_video=n"); else print ("&file_video=".substr($file_video, 0, strlen($file_video)-1)."&"); print ("&file_video_txt=".substr($file_video_txt, 0, strlen($file_video_txt)-1)."&"); if($file_doc=="") print ("&file_doc=n"); print ("&file_doc=".substr($file_doc, 0, strlen($file_doc)-1)."&"); print ("&file_doc_txt=".substr($file_doc_txt, 0, strlen($file_doc_txt)-1)."&"); //}//end menu $flash_pages=""; $flash_page=""; if ($count_pages>1) { for ($i=1; $i<=$count_pages; $i++) { $flash_pages=$flash_pages.$i."|"; } print "&flash_page=".$page."&flash_pages=".substr($flash_pages, 0, strlen($flash_pages)-1)."&"; } ?>