$value ) if( $value['eid'] == $eid ) return $value; return null; } function RecommendedEntry_updateIndexFile( $eid_updated, $eid, $direction ) { $filename = '/var/www/VirtualDomain/kenji00.com/cat/recommend_data'; is_dir( $filename ) || mkdir( $filename ); $filename .= '/'. substr( $eid_updated, -1 ); is_dir( $filename ) || mkdir( $filename ); $filename .= sprintf( '/%d.txt', $eid_updated); file_exists( $filename ) || touch( $filename ); $fp = @fopen( $filename, 'r+' ); if( $fp ) { if( flock( $fp, LOCK_EX | LOCK_NB )) { $ret = ''; $not_found = 1; while( !feof( $fp ) && ( $buf = fgets( $fp ))) { list( $_eid, $_n0, $_n1 ) = split( "[\t\r\n]", $buf ); if( $eid == $_eid ) { $not_found = 0; $direction ? $_n1++ : $_n0++; } $ret .= sprintf( "%d\t%d\t%d\n", $_eid, $_n0, $_n1 ); } if( $not_found ) $ret .= sprintf( "%d\t%d\t%d\n", $eid, 1 - $direction, $direction); rewind( $fp ); fwrite( $fp, $ret, strlen( $ret )); } fclose( $fp ); } } function RecommendedEntry_incoming() { $eid_prev = $_COOKIE['mtrcmnd_eid']; if( isset( $eid_prev )) { if( $eid_prev != 608 && RecommendedEntry_getEntryData( $eid_prev )) { RecommendedEntry_updateIndexFile( 608, $eid_prev, 0 /*incoming_from*/ ); RecommendedEntry_updateIndexFile( $eid_prev, 608, 1 /*outgoing_to*/ ); } } else { RecommendedEntry_updateIndexFile( 608, 608, 0 /*incoming_from*/ ); } } RecommendedEntry_incoming(); function RecommendedEntry_outgoing() { setcookie( 'mtrcmnd_eid', 608, time() + 2592000, '/' ); } RecommendedEntry_outgoing(); function RecommendedEntry_initialize( $mode = 0 ) { global $RecommendedEntry_table; $RecommendedEntry_table = array(); $filename = '/var/www/VirtualDomain/kenji00.com/cat/recommend_data/'. substr( '608', -1 ). '/608.txt'; $fp = @fopen( $filename, 'r' ); if( $fp ) { if( flock( $fp, LOCK_SH | LOCK_NB )) { while( !feof( $fp ) && ( $buf = fgets( $fp ))) { list( $_eid, $_n0, $_n1 ) = split( "[\t\r\n]", $buf ); if( 608 == $_eid ) continue; else if( $mode == 1 ) $RecommendedEntry_table{$_eid} = $_n0; else if( $mode == 2 ) $RecommendedEntry_table{$_eid} = $_n1; else $RecommendedEntry_table{$_eid} = $_n0 + $_n1; } arsort( $RecommendedEntry_table, SORT_NUMERIC ); } fclose( $fp ); } } function RecommendedEntry_GetEntry( $_index ) { global $RecommendedEntry_table; foreach( $RecommendedEntry_table as $eid => $count ) { if( --$_index ) continue; $entry = RecommendedEntry_getEntryData( $eid ); if( $entry ) $entry['count'] = $count; return $entry; } } ?> 大サービス!! - 養猫日記

大サービス!!

| コメント(0)

今日は嬉しいので、大サービスしちゃいます(^^)

ミーアの門外不出・秘蔵写真一挙大公開~~!!

あ、心なしか、ミーアが涙目になっている。

左上:きゃっ、も写っちゃった

右上:ピンクの部分が2つ・・・(本当はモザイクかけたかったです。汗)

左下:のび~~~~ 最初の頃です。

右下:来たばかりのとき、顔が幼い

y1pfbsHJuB97RHbC-pB1IHFsxt2iSfdmjGy_SjDjuI0xrmRFyhKeYZRB-u7-sfcIDu4rXaCap9M0s8.jpgy1pfbsHJuB97RGkEt2JQ7KYeshhtYh8afrXvPdHzBFZKCJ4PEps1CT9HH_SPTPAlctZ91eN2i0YJdg.jpg

y1pIhIlRnbFH43u-GMEOeBQzcuf-t-xnuHDN435OoYj8mjLJDsEq5miZWzi2VpfV3TAIMIoqiNEWHQ.jpgy1pIhIlRnbFH40uuIvKnKVh6h5qwE_LlPe68KouCxOCAm2lkY3bsW12pJ1ouhNivkj9PhSDEaszSfo.jpg


この記事を読んだ人はこんな記事も読んでいます

  • ( hits)

コメントする

アーカイブ

Powered by Movable Type 4.23-ja



写真ピックアップ!

  • y1pARhnS1f_byjjknFNM239oGADlIQViSC6f1ZLHWHsM1U_JfEyXj9EtYMvJeOIoCZh.jpg
  • y1pGdBKUHE9BBCmXI6yClJrqXJgjc_GqDuuoh9ow-cNIDsiFL0FdF1-Gbfp5DBv9ibr.jpg
  • y1pGdBKUHE9BBD-fFWSV0kCZ7CnHFjfUQ2O0QTr82N1zKsrj_2T5lvJlBLLUNykD7HW.jpg
  • y1pGB6PzuSn78XPCVFusDYmQpyc3HQtWZ6F2Edb87fCJhvKnF0WsWA8aw7aqmyxYVl0.jpg
  • y1pofKd2W_r7oyOvzVvmEdNkdzffJSHgCynt-XPXpHgZTQEjAx-odWcrBQ8ZDQoa5OTNOr6eblzWh0.jpg
  • y1pofKd2W_r7owSU-78DzMmGwT1nqgDo7FKP04FpnHfNoRiU5KaljJg-os5BgDnFqMkP4zgnx4rPp4.jpg
  • y1pX4sxOpbBrOD68pBnC8sTQwxDh4lBPM4Y3TgwFbyfbu6kXnwEu4-iuivnVxSKqoiRNjA7v33ZLm0.jpg
  • y1pCei_TK-fhg5fzK90uX1HsHbat9zcXdFtebKo3CO8Y9vOS7ZaO80VGbbehU6VvZmS4xIBSo1fh-Y.jpg
  • y1pcvAsZ2ZHEXpTODgAEOmJT7enD3wS7QVoYsDfe53Qp7LM1T9eKynlRdqjzguR8KPgQQC-kbONDNI.jpg
  • y1pxf5qiR0rLEIPKMPwVnfFhxXZAK2hmjtprd-zOZ3Gm5zkeoatZIGTSF3XpYkWtx1MyaJoXG1V9Dk.jpg