あの日の風景 2011

日付チェック(ダミー)

‘;
$date_sample = “1329333907”;
$date_sample_date = date(“Y-m-d H:i:s”, $date_sample);
echo ‘
‘;
echo $date_sample_date;
*/

$unixtime_now = ‘1325343599’;
$timestamp = mt_rand(1293840000, $unixtime_now);
// echo $timestamp;
$rnd_date = date(“Y-m-d H:i:s”, $timestamp);
// echo ‘

日付’;
$rnd_date_view = substr($rnd_date, 0, 10);
// echo $rnd_date_view;
// echo ‘

‘;
$rnd_date_view_y = date(“Y”, $timestamp);
$rnd_date_view_m = date(“m”, $timestamp);
$rnd_date_view_d = date(“d”, $timestamp);
echo ‘

‘;
echo $rnd_date_view_y.’年’.$rnd_date_view_m.’月’.$rnd_date_view_d.’日’;
echo ‘

‘;

$date_start_date = substr($rnd_date, 0, 10);
$date_start_date = $date_start_date.’ 00:00:00′;
// echo $date_start_date;
$date_start_time = strtotime($date_start_date);
// echo $date_start_time;
$date_end_time = $date_start_time + 86400;

// echo ‘
‘;
// echo ‘

その日の総数

‘;
$cnt_sql = ‘SELECT count(*) FROM sme_feelanalyzer_res WHERE created_at BETWEEN ‘.$date_start_time.’ AND ‘.$date_end_time.’;’;
$cnt_res = mysql_query($cnt_sql);
$cnt_row = mysql_fetch_array($cnt_res, MYSQL_NUM);
$count_total = $cnt_row[0];
// echo $count_total;
// echo ‘
‘;

for($i=0;$i < 100;$i++){ $n = mt_rand(1, $count_total); // echo '
ランダム番号’;
// echo $n;
// echo ‘
‘;
$sel_sql = ‘SELECT * FROM sme_feelanalyzer_res WHERE created_at BETWEEN ‘.$date_start_time .’ AND ‘.$date_end_time.’ LIMIT ‘.$n.’, 1;’;
// echo $sel_sql;
$res_sql = mysql_query($sel_sql);
$row_sql = mysql_fetch_array($res_sql, MYSQL_ASSOC);
$rnd_fontcolor = mt_rand(1, 5);
if($rnd_fontcolor == ‘1’){
$fontcolor = ‘778899’;
}elseif($rnd_fontcolor == ‘2’){
$fontcolor = ‘2e8b57’;
}elseif($rnd_fontcolor == ‘3’){
$fontcolor = ‘8b4513’;
}elseif($rnd_fontcolor == ‘4’){
$fontcolor = ‘800080’;
}elseif($rnd_fontcolor == ‘5’){
$fontcolor = ‘6b8e23’;
}else{
$fontcolor = ‘0C5F83’;
}
$rnd_fontsize = mt_rand(10, 30);
echo ‘‘;
$text = $row_sql[‘text’];
// $at_count = substr_count($text, “@”);
// echo $at_count.’回’;

if(strstr($text, “@”)){
// 全体の文字列の長さ
$len_text = strlen($text);
$firstpos = strpos($text, “@”);
$lastpos = strpos($text, ” “);
$del_text = substr($text, $firstpos, $lastpos);
$text = str_replace($del_text, “”, $text);
}

if(strstr($text, “@”)){
// 全体の文字列の長さ
$len_text = strlen($text);
$firstpos = strpos($text, “@”);
$lastpos = strpos($text, ” “);
$del_text = substr($text, $firstpos, $lastpos);
$text = str_replace($del_text, “”, $text);
}

if(strstr($text, “@”)){
// 全体の文字列の長さ
$len_text = strlen($text);
$firstpos = strpos($text, “@”);
$lastpos = strpos($text, ” “);
$del_text = substr($text, $firstpos, $lastpos);
$text = str_replace($del_text, “”, $text);
}

if(strstr($text, “@”)){
// 全体の文字列の長さ
$len_text = strlen($text);
$firstpos = strpos($text, “@”);
$lastpos = strpos($text, ” “);
$del_text = substr($text, $firstpos, $lastpos);
$text = str_replace($del_text, “”, $text);
}

if(strstr($text, “@”)){
// 全体の文字列の長さ
$len_text = strlen($text);
$firstpos = strpos($text, “@”);
$lastpos = strpos($text, ” “);
$del_text = substr($text, $firstpos, $lastpos);
$text = str_replace($del_text, “”, $text);
}

if(strstr($text, “@”)){
// 全体の文字列の長さ
$len_text = strlen($text);
$firstpos = strpos($text, “@”);
$lastpos = strpos($text, ” “);
$del_text = substr($text, $firstpos, $lastpos);
$text = str_replace($del_text, “”, $text);
}

if(strstr($text, “@”)){
// 全体の文字列の長さ
$len_text = strlen($text);
$firstpos = strpos($text, “@”);
$lastpos = strpos($text, ” “);
$del_text = substr($text, $firstpos, $lastpos);
$text = str_replace($del_text, “”, $text);
}

if(strstr($text, “@”)){
// 全体の文字列の長さ
$len_text = strlen($text);
$firstpos = strpos($text, “@”);
$lastpos = strpos($text, ” “);
$del_text = substr($text, $firstpos, $lastpos);
$text = str_replace($del_text, “”, $text);
}

if(strstr($text, “@”)){
// 全体の文字列の長さ
$len_text = strlen($text);
$firstpos = strpos($text, “@”);
$lastpos = strpos($text, ” “);
$del_text = substr($text, $firstpos, $lastpos);
$text = str_replace($del_text, “”, $text);
}

if(strstr($text, “@”)){
// 全体の文字列の長さ
$len_text = strlen($text);
$firstpos = strpos($text, “@”);
$lastpos = strpos($text, ” “);
$del_text = substr($text, $firstpos, $lastpos);
$text = str_replace($del_text, “”, $text);
}

echo $text;

echo ‘‘;
echo ‘ / ‘;
}
?>