本文整理汇总了PHP中XoopsUser::getUnameFromID方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsUser::getUnameFromID方法的具体用法?PHP XoopsUser::getUnameFromID怎么用?PHP XoopsUser::getUnameFromID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsUser
的用法示例。
在下文中一共展示了XoopsUser::getUnameFromID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: empty
(!empty($_POST["uid"]) && $moderate_handler->getLatest($_POST["uid"])>(time()+$_POST["expire"]*3600*24))
||
(!empty($_POST["ip"]) && $moderate_handler->getLatest($_POST["ip"], false)>(time()+$_POST["expire"]*3600*24))
||
(empty($_POST["uid"]) && empty($_POST["ip"]))
){
}else{
$moderate_obj =& $moderate_handler->create();
$moderate_obj->setVar("uid", @$_POST["uid"]);
$moderate_obj->setVar("ip", @$_POST["ip"]);
$moderate_obj->setVar("forum_id", $forum_id);
$moderate_obj->setVar("mod_start", time());
$moderate_obj->setVar("mod_end", time()+$_POST["expire"]*3600*24);
$moderate_obj->setVar("mod_desc", @$_POST["desc"]);
if($res = $moderate_handler->insert($moderate_obj) && !empty($forum_id) && !empty($_POST["uid"]) ){
$uname = XoopsUser::getUnameFromID($_POST["uid"]);
$post_handler =& xoops_getmodulehandler("post", "xforum");
$xforumpost =& $post_handler->create();
$xforumpost->setVar("poster_ip", forum_getIP());
$xforumpost->setVar("uid", empty($GLOBALS["xoopsUser"])?0:$GLOBALS["xoopsUser"]->getVar("uid"));
$xforumpost->setVar("forum_id", $forum_id);
$xforumpost->setVar("subject", sprintf(_MD_SUSPEND_SUBJECT, $uname, $_POST["expire"]));
$xforumpost->setVar("post_text", sprintf(_MD_SUSPEND_TEXT, '<a href="' . XOOPS_URL . '/userinfo.php?uid='.$_POST["uid"].'">'.$uname.'</a>', $_POST["expire"], @$_POST["desc"], formatTimestamp(time()+$_POST["expire"]*3600*24) ));
$xforumpost->setVar("dohtml", 1);
$xforumpost->setVar("dosmiley", 1);
$xforumpost->setVar("doxcode", 1);
$xforumpost->setVar("post_time", time());
$post_handler->insert($xforumpost);
unset($xforumpost);
}
if($_POST["uid"]>0){