예제 #1
0
function module_message_edit()
{
    global $global, $smarty;
    $obj = new message();
    $obj->set_where('mes_id = ' . $global['id']);
    $smarty->assign('message', $obj->get_one());
}
예제 #2
0
         $do->itemid = $itemid;
         $do->delete();
         wap_msg($L['delete_message'], 'index.php?moduleid=' . $moduleid . '&action=message');
     } else {
         wap_msg($L['not_message']);
     }
     break;
 case 'message':
     if (!$_userid) {
         wap_msg($L['please_login'], 'index.php?moduleid=' . $moduleid . '&action=login');
     }
     if ($itemid) {
         require DT_ROOT . '/module/member/message.class.php';
         $do = new message();
         $do->itemid = $itemid;
         $message = $do->get_one();
         if (!$message) {
             wap_msg($L['msg_no_right']);
         }
         extract($message);
         if ($status == 4 || $status == 3) {
             if ($touser != $_username) {
                 wap_msg($L['msg_no_right']);
             }
             if (!$isread) {
                 $do->read();
                 if ($feedback) {
                     $do->feedback();
                 }
             }
         } else {
예제 #3
0
             $tousers .= is_array($touser) ? implode("\n", $touser) : $touser . "\n";
         }
         if ($tousers) {
             $touser = str_replace("\n", ' ', trim($tousers));
         }
         include tpl('message_send', $module);
     }
     break;
 case 'edit':
     $itemid or msg();
     $do->itemid = $itemid;
     if ($submit) {
         $do->_edit($message);
         dmsg('修改成功', '?moduleid=' . $moduleid . '&file=' . $file . '&action=system');
     } else {
         extract($do->get_one());
         include tpl('message_edit', $module);
     }
     break;
 case 'clear':
     if ($submit) {
         if ($do->_clear($message)) {
             dmsg('清理成功', $forward);
         } else {
             msg($do->errmsg);
         }
     } else {
         $todate = timetodate(strtotime('-1 year'), 3);
         include tpl('message_clear', $module);
     }
     break;