자동 댓글 추가

자동 댓글 추가

정한솔 1 4262

write_update.tail.skin.php 

 

if($w == ''){

    $wr_write = get_write($write_table, $wr_id);//원글정보

    $wr_write_content = "자동 댓글입니다.

바르고 고운 말을 사용합시다!";//댓글내용

    $wr_write_cname = "[시스템]";//등록자명

    $wr_write_mb_id = $config[cf_admin];//등록아이디

    $wr_write_password = sql_password(G5_SERVER_TIME);//패스워드

  

    $sql = " insert into $write_table

                set ca_name = '$wr_write[ca_name]',

                    wr_num = '$wr_write[wr_num]',

                    wr_parent = '$wr_id',

                    wr_is_comment = '1',

                    wr_comment = '1',

                    wr_content = '$wr_write_content',

                    mb_id = '$wr_write_mb_id',

                    wr_password = '$wr_write_password',

                    wr_name = '$wr_write_cname',

                    wr_datetime = '".G5_TIME_YMDHIS."',

                    wr_ip = '000.000.000.000' ";

    sql_query($sql);

  

  

    // 원글에 코멘트수 증가

    sql_query(" update $write_table set wr_comment = wr_comment + 1, wr_last = '".G5_TIME_YMDHIS."' where wr_id = '$wr_id' ");

    sql_query(" update {$g5['board_new_table']} set as_comment = as_comment + 1 where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' ", false);

    // 코멘트 1 증가

    sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment + 1 where bo_table = '$bo_table' ");

  

}

1 Comments
[시스템] 2016.10.27 21:14  
자동 댓글입니다.

바르고 고운 말을 사용합시다!