public function _del($teamID, $userid) { $Teamuser = new teamuser(); if ($Teamuser->_all("permissions") == '2') { $this->model->Del_By_teaminformationId($teamID); return true; } else { return false; } }
public function _activity($id) { $Teamuser = new teamuser(); $Permissions = $Teamuser->_all("permissions"); $i = 0; $_SESSION["ACTIVITYID"] = $id; $Comments = new comments(); $re = $Comments->show($_SESSION["ACTIVITYID"], $i); foreach ($re as $r) { $commentshow .= "<div id='comment-" . $r->CommentsId . "'><div id='comment_recive'>\n\t\t\t\t<div id='user_picture'><img src='/upload/avatar_small/" . $r->UserId . "_small.jpg' style='float:left'>\n\t\t\t\t</div>\n\t\t\t\t<div id='comment_text'>\n\t\t\t\t" . htmlspecialchars($r->CommentText) . "\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t</div>"; $i++; } $Comments->model->Get('count', array("activityID=" . $_SESSION["ACTIVITYID"])); $commentcounts = $Comments->model->getresult(); if ($commentcounts >= 10) { $commentnumber .= "<a href='/group/group/activity/" . $id . "/1'>1</a>"; $j = 1; for (; $commentcounts > 10; $commentcounts = $commentcounts - 10) { $j++; $commentnumber .= "<a href='/group/group/activity/" . $id . "/" . $j . "'>" . $j . "</a>"; } } echo $index; $this->values = array("user" => $_SESSION["USER"], "title" => "我的Pic-ACGPIC", "nickname" => $_SESSION['NICK'], "groupselect" => $groupselect, "commentshow" => $commentshow, "groupactivity" => $i, "permissions" => $Permissions, "commentnumber" => $commentnumber, "commentindex" => 0); $this->RenderTemplate("activity"); if ($Comments->show($_SESSION["ACTIVITYID"], $i) != null) { echo "<script></script>"; } }