2010年8月31日
日志类同步写入:
Diary/submit.php
$ipdz = $_SERVER['REMOTE_ADDR'];
$dateline = strtotime($CUR_TIME);
$query = "select * from user where user_id='{$LOGIN_USER_ID}'";
$cursor = exequery( $connection, $query );
$ROW = mysql_fetch_array( $cursor );
$suid = $ROW['UID'];
$query = "insert into uchome_blog(UID,USERNAME,SUBJECT,DATELINE) values ('{$suid}','".$LOGIN_USER_ID."','{$SUBJECT}','{$dateline}')";
exequery( $connection, $query );
$query = "insert into uchome_blogfield(UID,MESSAGE,POSTIP) values ('{$suid}','{$NOTAGS_CONTENT}','{$ipdz}')";
exequery( $connection, $query );
$query = "select * from uchome_blog where subject='{$SUBJECT}'";
$cursor = exequery( $connection, $query );
$ROW = mysql_fetch_array( $cursor );
$blogid=$ROW['blogid'];
$query = "update uchome_blogfield set blogid='{$blogid}' where message='{$NOTAGS_CONTENT}'";
exequery( $connection, $query );