コード例 #1
0
 public function userindex($uid)
 {
     //if($uid==$_SESSION['USERID'])
     //    header("Location:"."/home");
     $username = $this->getuserbyid($uid);
     $friendlist = new friend();
     $flist = $friendlist->_getfriend($uid);
     $isFriends = $friendlist->isFriends($uid);
     $prof = new profile();
     $desc = $prof->getdesc($uid);
     $imggroup = new imagegroup();
     $cover = $imggroup->getCoverByID($uid);
     $this->values = array("user" => $_SESSION["USER"], "userid" => $_SESSION['USERID'], "nickname" => $_SESSION['NICK'], "thisuserid" => $uid, "friends" => $flist, "thisdesc" => $desc, "isfriends" => $isFriends, "cover" => $cover, "thisnickname" => $username, "title" => $username . "的个人空间");
     $this->RenderTemplate("user");
 }
コード例 #2
0
 public function _index()
 {
     $img = new image();
     $imgs = $img->model->Get("all", 0, 0, "ImageId desc");
     foreach ($imgs as $img) {
         $url = rawurlencode($img->imgurl);
         $desc = $img->Description;
         $images .= "<img class='imginfo' src='/medium/" . $url . "' title='" . $desc . "' data-author='" . $img->user->NickName . "' data-url='/files/" . $url . "'></img>\n";
     }
     $images .= "<a href='/cover'><div style='display:inline;background-image: url(/img/zoom.png);background-color: #09C;background-position: 20%;width:240px;height:80px;background-repeat: no-repeat;'><center><h3 style='line-height:80px;color:white;'>找你喜欢的</h3></center></div></a>";
     $users = new user();
     $users->model->Get(array('NickName'));
     $usr = $users->model->getresult();
     $imggroup = new imagegroup();
     $cover = $imggroup->getPublicImgs();
     $this->values = array("user" => $_SESSION["USER"], "title" => "主页-ACGPIC", "nickname" => $_SESSION['NICK'], "images" => $images, "cover" => $cover, "users" => $usr);
     $this->RenderTemplate("index");
     //赋值耗时0.0022368431091309
     //序列化耗时0.00037193298339844
     //$start = getmicrotime();
     /*$acl = new Acl();
     		$acl->addRole("admin");
     		$acl->addRole("user","admin");
     		$acl->allow("admin","index","abc");
     		$acl->allow("user",array("1","2","3"));
     		//if($acl->isallowed("admin","index","abc")) echo "权限确认";
     		//if($acl->isallowed("user","index")) echo "权限确认";
     		//$acl->serializeit();*/
     //$acl= loadser();
     //$end = getmicrotime();
     //echo $end-$start;
     //if($acl->isallowed("admin","index","abc")) echo "权限确认";
     //if($acl->isallowed("user","index")) echo "权限确认";
     //$s= serialize($acl);
     //$acl2 = unserialize($s);
 }
コード例 #3
0
 public function _imagegroupadd()
 {
     $Imagegroup = new imagegroup();
     $Imagegroup->_add($_POST['groupname'], $_POST['groupdescription'], $_POST['groupcatalog']);
 }