doConnect(); mysql_query("begin",$d->con); //---------------------------------------------------------------- $sql1 = "select * from info where info_id='".$in['info_id']."'"; //echo $sql1; $rtn1 = mysql_query($sql1,$d->con); if (!$rtn1) { print("Alert1"); mysql_query("rollback",$d->con); exit; } $cnt1 = mysql_num_rows($rtn1); if($cnt1>0){ $data=mysql_fetch_array($rtn1); } //------------------------------------------------------------------ $info_date = $data['date_yyyy'] . "." . $data['date_mm'] . "." . $data['date_dd']; //--------------------------------------------------- //テンプレート書き出し //--------------------------------------------------- $tmpl = "$TemplatePath/info_page.html"; $fp = fopen( $tmpl, "r" ); $tmp_contents = fread ($fp, filesize ($tmpl)); $contents = $tmp_contents; $contents = ereg_replace("",$info_date,$contents); $info_title = ereg_replace("\n","
",$data['info_title']); $contents = ereg_replace("",$info_title,$contents); $comment = ereg_replace("\n","
",$data['comment']); $contents = ereg_replace("",$comment,$contents); $contents = mb_convert_encoding($contents,"SJIS","EUC-JP"); print $contents; mysql_query("commit",$d->con); mysql_close($d->con); ?>