public function _index($id) { if ($id == null) { $Teaminformation = new teaminformation(); $re = $Teaminformation->_showallteam(); foreach ($re as $r) { if (file_exists("upload/avatar_big/group_" . $r->TeaminformationId . "_big.jpg")) { $file = "/upload/avatar_big/group_" . $r->TeaminformationId . "_big.jpg"; } else { $file = "/upload/avatar_big/_big.jpg"; } $allteam .= "<div id='group-show-" . $r->TeaminformationId . "'><div id='group_show'><img class='group_picture' src='" . $file . "' ><div id='group_information'><a href='/group/" . $r->TeaminformationId . "'>" . $r->teamname . "</a></div><div id='group_information'>" . $r->teamremarks . "</div></div></div>"; $i++; $TeamID = $TeamID + 1; } $this->values = array("user" => $_SESSION["USER"], "title" => "我的Pic-ACGPIC", "nickname" => $_SESSION['NICK'], "allteam" => $allteam, "teamID" => $TeamID); $this->RenderTemplate("index"); } else { $_SESSION["TEAMID"] = $id; $Teaminformation = new teaminformation(); $re = $Teaminformation->_show($id); $Teamuser = new teamuser(); $re2 = $Teamuser->_all(); foreach ($re2 as $r2) { $Permissions = $r2->usertake; $groupuerid = $r2->TeamuserId; } foreach ($re as $r) { if ($Permissions > 0) { $picture = "<a data-controls-modal='modal-from-avatar' data-backdrop='true' style='width:120px;overflow:hidden;'><img id='group_picture' style='width:120px;max-height:140px;' src='/upload/avatar_big/group_" . $id . "_big.jpg' title='点击以更改头像'/></a>"; $groupname = $r->teamname; $groupdescription = $r->teamremarks; } else { $picture = "<img id='group_picture' style='width:120px;max-height:140px;' src='/upload/avatar_big/group_" . $id . "_big.jpg' title='点击以更改头像'/>"; $groupname = $r->teamname; $groupdescription = $r->teamremarks; } } $Activity = new activity(); $re1 = $Activity->_showall($id); foreach ($re1 as $r1) { $activityinformation .= "<p><a href='/group/activity/" . $r1->ActivityId . "'>" . $r1->title . " " . $r1->text . "</a></p>"; } $this->values = array("user" => $_SESSION["USER"], "title" => "我的Pic-ACGPIC", "nickname" => $_SESSION['NICK'], "information" => $information, "permissions" => $Permissions, "groupname" => $groupname, "groupdescription" => $groupdescription, "activity" => $activityinformation, "picture" => $picture, "groupuserid" => $groupuerid); $this->RenderTemplate("groupid"); } }