<?php /** * 스마트알람 (Smart-Alarm for Gnuboard4) * * Copyright (c) 2011 Choi Jae-Young <www.miwit.com> * * 저작권 안내 * - 저작권자는 이 프로그램을 사용하므로서 발생하는 모든 문제에 대하여 책임을 지지 않습니다. * - 이 프로그램을 어떠한 형태로든 재배포 및 공개하는 것을 허락하지 않습니다. * - 이 저작권 표시사항을 저작권자를 제외한 그 누구도 수정할 수 없습니다. */ include_once "_common.php"; include_once "_config.php"; if (function_exists("mw_moa_count")) { echo mw_moa_count(); }
function mw_mobile_total_alarm() { global $g4; global $member; global $mw_moa_table; $mb_id = $member['mb_id']; $memo_not_read = 0; // 읽지 않은 쪽지가 있다면 if ($mb_id) { $sql = " select count(*) as cnt from {$g4['memo_table']} where me_recv_mb_id = '{$mb_id}' and me_read_datetime = '0000-00-00 00:00:00' "; $row = sql_fetch($sql); $memo_not_read = $row['cnt']; } $is_smart_alarm = false; $moa_count = 0; if (is_file($g4['path'] . "/plugin/smart-alarm/_config.php")) { include $g4['path'] . "/plugin/smart-alarm/_config.php"; if (function_exists("mw_moa_count")) { $moa_count = mw_moa_count(); } $is_smart_alarm = true; } $total_alarm = $moa_count + $memo_not_read; return array("total_alarm" => $total_alarm, "is_smart_alarm" => $is_smart_alarm, "moa_count" => $moa_count, "memo_not_read" => $memo_not_read); }