} } } if (isset($_REQUEST['to_userid'])) { foreach ($_REQUEST['to_userid'] as $u_id => $u_id_name) { $pm->setVar("msg_image", $_REQUEST['msg_image']); $pm->setVar("subject", $myts->htmlSpecialChars($myts->stripSlashesGPC($_REQUEST['subject']))); $pm->setVar("from_userid", $xoopsUser->getVar("uid")); $pm->setVar("to_userid", $u_id_name); $pm->setVar("msg_time", time()); $pm->setVar("msg_text", $myts->htmlSpecialChars($myts->stripSlashesGPC($_REQUEST['message']))); $pm->setVar("anim_msg", $_REQUEST['anim_msg']); $pm->setVar("cat_msg", 1); $pm->setVar("file_msg", $upid); $erreur = $pm_handler->insert($pm); $sendt .= mp_getLinkedUname(intval($u_id_name)) . ","; if ($reply == 1) { $pm_handler->setReply($pm2); } if ($xoopsModuleConfig['notification'] == "1") { mp_mail($u_id_name); } } } if (!$erreur) { redirect_header("javascript:history.go(-1)", 1, _PM_REDNON); } else { if ($oresend == "1") { $pm->setVar("msg_image", $_REQUEST['msg_image']); $pm->setVar("subject", $myts->htmlSpecialChars($myts->stripSlashesGPC($_REQUEST['subject']))); $pm->setVar("from_userid", $xoopsUser->getVar("uid"));
} else { $upid = "0"; } if (isset($_REQUEST['to_userid'])) { $pm->setVar("msg_pid", $pm_handler->getCount() + 1); $pm->setVar("msg_image", $_REQUEST['msg_image']); $pm->setVar("subject", $myts->htmlSpecialChars($myts->stripSlashesGPC($_REQUEST['subject']))); $pm->setVar("from_userid", $xoopsUser->getVar("uid")); $pm->setVar("to_userid", $_REQUEST['to_userid']); $pm->setVar("msg_time", time()); $pm->setVar("msg_text", $myts->htmlSpecialChars($myts->stripSlashesGPC($_REQUEST['message']))); $pm->setVar("anim_msg", $_REQUEST['anim_msg']); $pm->setVar("cat_msg", 1); $pm->setVar("file_msg", $upid); $erreur = $pm_handler->insert($pm); $sendt .= mp_getLinkedUname(intval($_REQUEST['to_userid'])) . ","; if ($_REQUEST['reply'] == 1) { $pm_handler->setReply($pm2); } if ($xoopsModuleConfig['notification'] == "1") { mp_mail($_REQUEST['to_userid']); } } if (!$erreur) { redirect_header("javascript:history.go(-1)", 1, _PM_REDNON); } else { if ($oresend == "1") { $pm->setVar("msg_image", $_REQUEST['msg_image']); $pm->setVar("subject", $myts->htmlSpecialChars($myts->stripSlashesGPC($_REQUEST['subject']))); $pm->setVar("from_userid", $xoopsUser->getVar("uid")); $pm->setVar("to_userid", $xoopsUser->getVar('uid'));