"); // ------------------------------------------------------------- MAIN PROCESS if ($reset){$submit_search = "";$category = "";$keyword = "";} $line_custom = read_custom(); $dspcount = @$line_custom['dspsu']; if (!$dspcount){$dspcount = 10;} $banner_size = @$line_custom['banner_size']; $w_size = @$line_custom['w_size']; $h_size = @$line_custom['h_size']; if (!$dsp){$dsp = $line_custom['firstdsp_dsp'];} if(!$ranking_mode){$ranking_mode = $line_custom['ranking_mode'];} if (!$ranking){$ranking = $line_custom['firstdsp_rank'];} $line_link = read_file($dir.$file_link); if ($category || $keyword){$line_link = search_data($line_link,$category,$keyword);} if ($ranking == "on"){$line_link = ranking_process($line_link);} dsp_startend($dspcount,$line_link); if (@!$direct){html_linkheader1();html_linkheader2();} html_linkmain($line_link); if (@!$direct){html_linkfooter();} // ------------------------------------------------------------- RANKING PROCESS function ranking_process($line_link){ global $dir,$ip_check,$file_log,$ranking_process; $log_line = read_file($dir.$file_log); if ($ip_check && $log_line){ $log_line = array_unique($log_line); } if ($log_line && $line_link){ foreach($log_line as $value){ list($url_log,$ip_log) = split("&&",$value); $temp_array[] = $url_log; } $log_array = @array_count_values($temp_array); arsort($log_array); $line_links_r = $line_link; foreach ($log_array as $key => $value){ $point = 0; foreach ($line_links_r as $key2 => $value2){ list($count,$site_name,$site_url,$etc) = split("&&",$value2); if ($key == $site_url){ $sort_line[] = $value2; $ranking_process[] = $value; unset($line_links_r[$key2]); break; } } } foreach ($line_links_r as $value){ $ranking_process[] = "0"; $sort_line[] = $value; } return $sort_line; }else{ if ($line_link){ foreach ($line_link as $value){$ranking_process[] = "0";} return $line_link; } } } // ------------------------------------------------------------- SEARCH function search_data($line,$category,$word){ if ($category && $line){ $new_line = ""; foreach ($line as $value){ list($count,$site_name,$site_url,$banner_url,$fname,$keyword01,$keyword02,$keyword03,$comment) = split("&&",$value); if (($category == $keyword01)||($category == $keyword02)||($category == $keyword03)){$new_line[] = $value;} } $line = $new_line; } if ($word && $line){ $word = ereg_replace(" "," ",$word); $word = trim($word); if (extension_loaded("mbstring")){$word = mb_convert_kana($word,"aKCV");$word = strtoupper($word);} if (eregi(" ",$word)){$word_array = split(" ",$word);}else{$word_array[] = $word;} $new_line = ""; foreach ($line as $value){ list($count,$site_name,$site_url,$banner_url,$fname,$keyword01,$keyword02,$keyword03,$comment) = split("&&",$value); $str = $site_name.$comment; if (extension_loaded("mbstring")){ $str = mb_convert_kana($str,"aKCV"); $str = strtoupper($str); } $sword = ""; foreach($word_array as $key => $value2){ if($value2){ if ($key){$sword .= "(.*".$value2.".*)";}else{$sword .= "(.*".$value2.".*)";} } } if (eregi($sword,$str)){$new_line[] = $value;} } $line = $new_line; } return $line; } // ------------------------------------------------------------- READ FILE function read_file($file_name){ $line = ""; $temp_line = file($file_name); foreach ($temp_line as $value){ if ($value){ $value = trim($value); $line[] = $value; } } return $line; } function fix_text($str){ $str = ereg_replace("
","\n",$str); $str = strip_tags($str,allow_tag); $str = eregi_replace("(style|onmouse|onclick)[^=]*=", "", $str); $str = ereg_replace("\r|\n|\r\n","
",$str); if(preg_match_all("/http\:\/\/[\w\.\~\-\/\?\&\+\=\:\@\%\#]+/",$str,$match)){ foreach ($match[0] as $value){ if(strlen($value) > 50){ $dsp_url = "[URL]";}else{$dsp_url = $value;} $str = ereg_replace($value,"\n".$dsp_url."\n",$str); } } if(preg_match_all("/[\w\d\-\.]+\@[\w\d\-\.]+/",$str,$match)){ foreach ($match[0] as $value){ if(strlen($value) > 30){ $dsp_url = "[MAIL]";}else{$dsp_url = $value;} $str = ereg_replace($value,"\n".$dsp_url."\n",$str); } } if (!$str){$str = "--";} return $str; } function read_custom(){ global $file_custom,$dir; $line_custom = ""; $temp_line = file($dir.$file_custom); foreach ($temp_line as $value){ if ($value){ $value = trim($value); list($i,$j) = split("&&",$value); $line_custom[$i] = $j; } } return $line_custom; } // ------------------------------------------------------------- DISPLAY function dsp_startend($dspcount,$dat_line){ global $page,$all,$amari; global $start,$end,$psu; $all = count($dat_line); $psu = @floor($all / $dspcount); $amari = $all % $dspcount; if ($amari){$psu++;} if ($page < 0){$page = 0;} if ($page >= $psu){$page = $psu - 1;} if (!$dspcount){ $start=0; $end = count($dat_line) - 1; }else{ $start = $page * $dspcount; $end = $page * $dspcount + $dspcount - 1; if ($all <= $end){$end = $all - 1;} } } // ------------------------------------------------------------- PAGE LINK function html_pagelink($dspcount,$dat_line){ global $pageurl,$page,$all,$amari,$start,$end,$psu; global $category,$keyword,$dsp,$ranking_mode,$ranking; $page_url = $pageurl."dsp=".$dsp."&ranking=".$ranking.""; $all = count($dat_line); if ($dspcount){ if ($dat_line && $psu > 1){ echo " "."\n"; } } } // ------------------------------------------------------------- HEADER_FIRST function html_linkheader1(){ global $html_title; echo <<< END_OF_HTML 関東(東京.神奈川)関西(兵庫.京都.愛知)ホームページ制作·アクセスアップ(SEO)≡ホームページYA.net相互リンク≡

関東(東京.神奈川)関西(兵庫.京都.愛知)ホームページ制作·アクセスアップ(SEO)≡ホームページYA.net≡

\n END_OF_HTML; } // ------------------------------------------------------------- HEADER_SECOND function html_linkheader2(){ include("./functions/header.inc"); echo <<< END_OF_HTML

ホームページYA.netでは、相互リンクサイトを募集しています。
相互リンクご希望のサイト様は、下記よりお申し込みください。

\n END_OF_HTML; } // ------------------------------------------------------------- HTML MAIN function html_linkmain($line_link){ global $url,$page,$dir,$pageurl,$out_url,$dsp,$ranking_mode,$ranking,$word_list,$category,$keyword,$dspcount; global $dspcount,$banner_size,$w_size,$h_size,$start,$end,$direct,$admin_txt,$ranking,$ranking_process; $pageurl = $url."?"; if ($category || $keyword){ if ($category){$pageurl .= "category=".urlencode($category)."&";} if ($keyword){$pageurl .= "keyword=".urlencode($keyword)."&";} } if ($page){$churl = $pageurl."page=".$page."&";}else{$churl = $pageurl;} if ($ranking_mode == "on"){ if ($dsp == "on"){ $dsp_txt = "[SIMPLE MODE]"; $dsp_url = $churl."ranking=".$ranking."&dsp=off"; }else{ $dsp_txt = "[DETAILS MODE]"; $dsp_url = $churl."ranking=".$ranking."&dsp=on"; } if ($ranking == "on"){ $dsp_txt_ranking = "[SITE LIST]"; $dsp_url_ranking = $churl."dsp=".$dsp."&ranking=off"; }else{ $dsp_txt_ranking = "[RANKING]"; $dsp_url_ranking = $churl."dsp=".$dsp."&ranking=on"; } //-------------------------------------------------------↓ echo <<< END_OF_HTML \n END_OF_HTML; }else{ echo "\n"; } //-------------------------------------------------------↑ echo <<< END_OF_HTML \n END_OF_HTML; //-------------------------------------------------------↑ if ($category || $keyword){ echo "
"."\n"; $result_txt = ""; if ($category){$result_txt .= "CATEGORY:[".$category."]";} if ($keyword){$result_txt .= " KEYWORD:[".$keyword."]";} if ($line_link){$recnt = count($line_link);}else{$recnt=0;} $result_txt .= "⇒ HIT".$recnt."件"; echo " ".$result_txt."\n"; echo "
"."\n"; } // ------------------------------------------------------------- PAGE LINK html_pagelink($dspcount,$line_link); if ($line_link){ echo "

LINK PARTNERS

"."\n"; echo " "."\n"; } // ------------------------------------------------------------- PAGE LINK html_pagelink($dspcount,$line_link); // ------------------------------------------------------------- PASS if (!$direct){ echo "
"."\n"; echo " ".$admin_txt.""."\n"; echo "
"."\n"; } echo <<< END_OF_HTML
Visit Our Link Partners. \n END_OF_HTML; include("./functions/menu.inc"); echo <<< END_OF_HTML
関東(東京.神奈川)関西(兵庫.京都.愛知)
ホームページ制作·アクセスアップ(SEO)≡ホームページYA.net≡

〒630-0114 奈良県生駒市鹿ノ台西1-1-18
TEL:0743-72-6718
\n END_OF_HTML; } // ------------------------------------------------------------- FOOTER function html_linkfooter(){ echo <<< END_OF_HTML
Powered by Y's Corporation.
END_OF_HTML; } ?>