コード例 #1
0
ファイル: mw.rate.php プロジェクト: l2zeo/miwit-pack5
header("Content-Type: text/html; charset={$g4['charset']}");
$gmnow = gmdate("D, d M Y H:i:s") . " GMT";
header("Expires: 0");
// rfc2616 - Section 14.21
header("Last-Modified: " . $gmnow);
header("Cache-Control: no-store, no-cache, must-revalidate");
// HTTP/1.1
header("Cache-Control: pre-check=0, post-check=0, max-age=0");
// HTTP/1.1
header("Pragma: no-cache");
// HTTP/1.0
if (!$bo_table or !$wr_id) {
    die("데이터가 없습니다.");
}
include "{$board_skin_path}/mw.lib/mw.skin.basic.lib.php";
$readonly = mw_is_rate($bo_table, $wr_id);
?>
<div class="rate_box"> 
    <div>이 게시물을 평가해주세요.</div>
    <div class="comment_rate"></div>
</div> 

<script>
$(".comment_rate").mw_star_rate({
    path : "<?php 
echo $g4['url'] . "/skin/board/" . $board['bo_skin'];
?>
/mw.js/mw.star.rate/",
    star : "star1",
    default_value : 0,
    readonly : <?php 
コード例 #2
0
    exit;
}
// 개별 페이지 접근 불가
$sql = "update {$write_table} set wr_option = '{$wr_option}' where wr_id = '{$comment_id}'";
sql_query($sql);
// 익명
if ($mw_basic[cf_anonymous]) {
    sql_query(" update {$write_table} set wr_anonymous = '{$wr_anonymous}' where wr_id = '{$comment_id}' ");
    if ($mw_basic[cf_anonymous_nopoint] && $wr_anonymous && $w == 'c') {
        delete_point($member[mb_id], $bo_table, $comment_id, '코멘트');
    }
}
// 모바일
if ($w == 'c') {
    if (mw_agent_mobile()) {
        sql_query("update {$write_table} set wr_is_mobile = '1' where wr_id = '{$comment_id}'", false);
    }
}
// 비회원 이름 쿠키 저장
if (!$is_member) {
    set_cookie("mw_cookie_name", $wr_name, -1 * $g4[server_time]);
    set_cookie("mw_cookie_email", $wr_email, -1 * $g4[server_time]);
    set_cookie("mw_cookie_homepage", $wr_homepage, -1 * $g4[server_time]);
}
if ($w == 'c' && mw_is_rate($bo_table, $write['wr_id']) == '' && $wr_rate) {
    sql_query(" update {$write_table} set  wr_rate = '{$wr_rate}' where wr_id = '{$comment_id}' ", false);
    if ($mw_basic['cf_rate_point']) {
        insert_point($member['mb_id'], $mw_basic['cf_rate_point'], "평가 참여 점수", $bo_table, $write['wr_id'], '@rate');
    }
    mw_rate($bo_table, $write['wr_id']);
}