<?php 
function send_notify($group_id,$user_id,$subject,$message){
    $subject = RMC($subject);
    $message = RMC_MSG($message);
    //
    $CurrentDate =date("Y-m-d H:i:s"); //currentDate
    //insert 
    $sql = "INSERT INTO j_notifications 
    (j_group_id,j_user_id,j_subject,j_message,j_date)
    VALUES
    ('".$group_id."','".$user_id."','".$subject."','".$message."','".$CurrentDate."')
    ";
    $result = runSQL($sql);
    if($result){ return 1; }else{ return 0; }  
}


function send_notify2($group_id,$user_id,$subject,$message,$message_sm,$type,$kind,$link){
	$user_id = RMC($user_id);
    $subject = RMC($subject);
    $message = RMC_MSG($message);
    $message_sm = RMC_MSG($message_sm);
    $link = RMC_MSG($link);
    //
    $CurrentDate =date("Y-m-d H:i:s"); //currentDate
    //insert 
    $sql = "INSERT INTO j_notifications 
    (j_group_id,j_user_id,j_subject,j_message,j_message_sm,j_type,j_kind,j_link,j_date)
    VALUES
    ('".$group_id."','".$user_id."','".$subject."','".$message."','".$message_sm."','".$type."','".$kind."','".$link."','".$CurrentDate."')
    ";
    $result = runSQL($sql);
    if($result){ return 1; }else{ return 0; }  
}

function check_read_notify($group_id,$user_id,$subject,$message){
    //insert 
    /*
    $sql = "INSERT INTO j_notifications 
    (j_group_id,j_user_id,j_subject,j_message)
    VALUES
    ('".$group_id."','".$user_id."','".$subject."','".$message."')
    ";
    $result = runSQL($sql);
    if($result){ return 1; }else{ return 0; }  
    */
}

?>