protected void upload_Click(object sender, EventArgs e)
 {
     Data data = new Data();
     ImageReformat format = new ImageReformat();
     Stream imgStream = photo_upload.PostedFile.InputStream;
     string name = photo_upload.FileName.ToString();
     string path = "../image/client/" + name;
     string _path = Server.MapPath("../image/client/" + name);
     format.uploadImage(imgStream, _path);
     Photo_gl photo = new Photo_gl();
     data.add("caption", Param.getValue("caption"));
     data.add("profile_id", Param.getValue("profileID"));
     data.add("path", path);
     data.add("name", name);
     photo.insert(data);
     go("../client/photo_upload.aspx?profile=" + Param.getString("profileName") + "&id=" + Param.getString("profileID"));
 }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Photo_gl photo = new Photo_gl();
         User_gl user = new User_gl();
         Data data = new Data();
         Data list = photo.select(Param);
         profileName.Value = Param.getString("profile");
         profileID.Value = Param.getString("id");
         photoView.DataSource = list.Source;
         photoView.DataBind();
         data.add("imageId", Param.getString("image"));
         Data imageList = photo.selectImage(data);
         imagePop.ImageUrl = imageList.getString("path");
         checkImage.Value = imageList.getString("path");
         caption.Text = imageList.getString("caption");
         setPageTypeSession(Session, "photo");
         //set a size for photo album, set overflowhidden, fixed small images and top/left with minus fixed pixels
     }
 }