Example #1
0
        private void setAvatar()
        {
            Upload.Avatar myAvatar = new Upload.Avatar();
            Information.topic myTopic = new Information.topic();
            Hashtable picInfo = new Hashtable();
            int pid = Convert.ToInt32(theContext.Request.Form["pid"]);
            string newFileName = "A_" + System.Guid.NewGuid().ToString("N") + "_A" + pid + ".jpg";
            string folderPath=System.DateTime.Now.Year + "/" + System.DateTime.Now.Month + "/" + System.DateTime.Now.Day + "/";
            string savePath = HttpContext.Current.Server.MapPath("~/upload/userImages/" + folderPath);

            picInfo = myTopic.getPostImgByPid(pid);
            Images.MakeThumbnail(picInfo["img"].ToString(), savePath+newFileName, 320, 320, "Cut");

            myAvatar.newUpload(Convert.ToInt32(theContext.Session["id"]), 0, 0, 320, 320, "/upload/userImages/" + folderPath + newFileName);

            addPicPostIntroduce();
        }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     type = Request.Params["type"];
     if (type == "t")
     {
        Information.topic myTopic = new Information.topic();
        thePost = myTopic.get(Convert.ToInt32(Request.Params["id"]));
     }
     else if (type == "g")
     {
         Information.group myGroup = new Information.group();
         thePost = myGroup.topicGetById(Convert.ToInt32(Request.Params["id"]));
     }
 }
Example #3
0
 public void getTopicCount(int cid)
 {
     Information.topic myTopic = new Information.topic();
     Response.Write(myTopic.getChannelTopicCount(cid));
 }