/*************************************/
//めも
//.htaccessでリライトさせる。
//http://bich.sex5.biz/dir.php?dir=analerotic&page=erogirl
//→http://bich.sex5.biz/analerotic/erogirl.php
//http://bich.sex5.biz/index.php?dir=&page=erogirl
//→http://bich.sex5.biz/erogirl.php
/*************************************/
/*************************************/
//サブドメ取得
//(ルート取得→explode→array_pop)
/*************************************/
$dir_array=explode("/",getcwd( ));
$dir_name=array_pop($dir_array);
//print $dir_name;
/*************************************/
//RSS生成!
/*************************************/
function plugin_rss_echo($i){
global $dir_name;
/*
-
Star City
http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp
How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia's <a href="http://howe.iki.rssi.ru/GCTC/gctc_e.htm">Star City</a>.
Tue, 03 Jun 2003 09:39:21 GMT
http://liftoff.msfc.nasa.gov/2003/06/03.html#item573
*/
$fileName = "../db.txt";
$list=@file($fileName);
$nen=date(Y);
$getsu=date(m);
$hi=date(d);
$ji=date(H);
$fun=date(i);
$byou=date(s);
$nengappi=$nen.$getsu.$hi;
$sday = strtotime($nengappi);
$res = date("w", $sday);
$day = array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
$youbi=$day[$res];
//Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
if($getsu=="01"){ $getsu="Jan"; }
if($getsu=="02"){ $getsu="Feb"; }
if($getsu=="03"){ $getsu="Mar"; }
if($getsu=="04"){ $getsu="Apr"; }
if($getsu=="05"){ $getsu="May"; }
if($getsu=="06"){ $getsu="Jun"; }
if($getsu=="07"){ $getsu="Jul"; }
if($getsu=="08"){ $getsu="Aug"; }
if($getsu=="09"){ $getsu="Sep"; }
if($getsu=="10"){ $getsu="Oct"; }
if($getsu=="11"){ $getsu="Nov"; }
if($getsu=="12"){ $getsu="Dec"; }
/*********************/
if($kazu=="0"){
$pubdate='$youbi.", ".$hi." ".$getsu." ".$nen." ".$ji.":".$fun.":".$byou." +0900';
}
$kazu=$kazu+1;
/*********************/
$kazu="0";
for($i=0;$i
'.mb_convert_encoding($list2[16], "UTF-8", "SJIS").'
'.$dir_name.'
'.mb_convert_encoding($list2[15], "UTF-8", "SJIS").'
Ja
'.$dir_name.'/rss.php
none
webmaster@example.com
webmaster@example.com';
}
$kazu=1;
if($list2[0]==$dir_name){
$kazu=$kazu+1;
print"-
".mb_convert_encoding($list2[16], "UTF-8", "SJIS")."
http://".$dir_name."/".$list2[1]."/".$list2[2].".php
".mb_convert_encoding($list2[15], "UTF-8", "SJIS")."
".$youbi.", ".$hi." ".$getsu." ".$nen." ".$ji.":".$fun.":".$byou." +0900
".$kazu."
";
}
}
print "
";
}
/*************************************/
//モバイルSITEMAP生成!
/*************************************/
function plugin_sitemap_echo(){
global $dir_name;
print '
';
$fileName = "../db.txt";
$sitemap_count_file="./sitemap_count.txt";
$list=@file($fileName);
$sitemap_list=@file($sitemap_count_file);
//print $sitemap_list[0];
$sitemap_kazu=$sitemap_list[0]/10;
for($i=0;$i<$sitemap_kazu;$i++){
$list2= explode(" ",$list[$i]);
if($list2[0]==$dir_name){
print "
http://".$dir_name."/".$list2[1]."/".$list2[2].".php
0.5
weekly
";
}
}
/*
http://kirecawa.net/3mile/bento/cate0002cate.php
0.8
weekly
*/
print "";
//ついでにアクセスがあるとログを残すように設定
$filepath = "sitemaplog.txt";
$string = date(Ymd)."-".date(His)."\t".$_SERVER['HTTP_USER_AGENT']."\n";
$fp = fopen($filepath, "a");
@fwrite( $fp, $string, strlen($string) );
fclose($fp);
//サイトマップ表示数の設定ファイル上書き
$filepath = $sitemap_count_file;
$string = $sitemap_list[0]+1;
$fp = fopen($filepath, "w");
@fwrite( $fp, $string, strlen($string) );
fclose($fp);
}
/*************************************/
//DBの何個目かを選択してリターン
//$_GET[page]を取得してこれの何個目か。
//optionには何個目かが入る
/*************************************/
function dbecho($options){
$page=$_GET['page'];
if($page==""){ $page="index";}
$fileName = "../db.txt";
$list=@file($fileName);
for($i=0;$i".$list2[16]."
";
}
}
}
/*************************************/
//DBからディレクトリを取得してリンク生成
//全ディレクトリへのリンク
//20ディレクトリ固定なんで最初の20件でおk
/*************************************/
function index_link(){
global $dir_name;
$fileName = "../db.txt";
$list=@file($fileName);
$kazu=0;
for($i=0;$i".$list2[16]."
\n";
}
}
}
/*************************************/
//DBからディレクトリを取得してリンク生成
//TOPディレクトリ5件へのリンク
/*************************************/
function index_link5(){
global $dir_name;
$fileName = "../db.txt";
$list=@file($fileName);
$kazu=0;
for($i=0;$i".$list2[16]."
\n";
}
}
}
/*************************************/
//DBの何個目かを選択してリターン
/*************************************/
function dbecho_index($options){
$page="index";
$fileName = "../db.txt";
$list=@file($fileName);
for($i=0;$i".$list2[13]."
";
$a=$a+1;
}
}
}
}
/*************************************/
//カテゴリの10ページを表示
//
//
/*************************************/
function catelink(){
$page=$_GET['page']; //cate0001
$page=str_replace("cate","",$page);
$page=$page*10;
$page=sprintf("%04d",$page); //4桁にする
//print $page;
$fileName = "../db.txt";
$list=@file($fileName);
//何行目かを取得
for($i=0;$i".$list2[7]."
";
}
$gyou=$gyou+1;
}
}
/*************************************/
//NEXTページのリンク
//引数の数だけ次のページを表示
/*************************************/
function nextpage($a){
$page=$_GET['page'];
$fileName = "../db.txt";
$list=@file($fileName);
//何行目かを取得
for($i=0;$i".$list2[7]." ";
}
}
}
/*************************************/
//beforeページのリンク
//引数の数だけ次のページを表示
/*************************************/
function beforepage($a){
$page=$_GET['page'];
$fileName = "../db.txt";
$list=@file($fileName);
//何行目かを取得
for($i=0;$i".$list2[7]." ";
}
}
}
/*********************************************************************************************************************/
//元々合ったものが冗長だったので簡略化
//あと変数使えるように進化。
//書式→plugin_random_show2(数字 max=3)。maxを書かなければ全部表示。
/*********************************************************************************************************************/
function plugin_random_show($options){
global $col01;
global $col02;
global $col03;
global $hr01;
global $hr02;
$options2 = split(" ",$options);
$options3 = split("=",$options2[1]);
$file=$options2[0]; //ファイル
$max=$options3[1]; //max
$list = @file("../random/".$file.".dat");
shuffle($list);
if($max == 0) $max = count($list);
if($max >= count($list)) $max = count($list);
$result="";
for($i=0;$i<$max;$i++){
$result.=str_replace("",$i+1,$list[$i]);
}
$result=str_replace('$col01',$col01,$result);
$result=str_replace('$col02',$col02,$result);
$result=str_replace('$col03',$col03,$result);
$result=str_replace('$hr01',$hr01,$result);
$result=str_replace('$hr02',$hr02,$result);
print $result;
}
/*************************************/
//DBの何個目かを選択してリターン
/*************************************/
function dbecho_rand($options){
$list=@file("../db.txt");
shuffle($list);
for($i=0;$i<$options;$i++){
$list2= explode(" ",$list[$i]);
//print $list2;
print "".$list2[13]."
";
}
}
?>