protected void btn_Like_Click(object sender, ImageClickEventArgs e)
        {
            using (TriglavBL temp = new TriglavBL())
            {
                user_likes = temp.getUserLikes(korisnik.id, post.id);

                if (user_likes == null)
                {
                    user_likes = new Data.EntityFramework.DAL.User_Likes();
                    user_likes.PostId = post.id;
                    user_likes.UserId = korisnik.id;
                    user_likes.DaumRated = DateTime.Now;
                    user_likes.DatumLajkanja = DateTime.Now;
                    user_likes.isLiked = 1;
                    user_likes.Rate = 0;
                    temp.SaveUser_Likes(user_likes);
                }
                else
                {
                    Int32 LikesBefore = temp.getVoteUserLikes(user_likes.UserId.Value, user_likes.PostId.Value);
                    user_likes.DatumLajkanja = DateTime.Now;
                    user_likes.isLiked = 1;
                    temp.UpdateUser_Likes(user_likes, LikesBefore);
                }
            }
            LoadClanak(post.id);
        }
        protected void btn_oLike_Click(object sender, ImageClickEventArgs e)
        {
            if (korisnik != null)
            {

                ImageButton _sender = (ImageButton)sender;
                HiddenField hid = (HiddenField)_sender.FindControl("hf");

                using (TriglavBL temp = new TriglavBL())
                {
                    Post odgovorNaLIsti = temp.getOdgovorByID(Convert.ToInt32(hid.Value));

                    if (odgovorNaLIsti != null)
                    {
                        user_likes = temp.getUserLikes(korisnik.id, odgovorNaLIsti.id);

                        if (user_likes == null)
                        {
                            user_likes = new Data.EntityFramework.DAL.User_Likes();
                            user_likes.PostId = odgovorNaLIsti.id;
                            user_likes.UserId = korisnik.id;
                            user_likes.DaumRated = DateTime.Now;
                            user_likes.DatumLajkanja = DateTime.Now;
                            user_likes.isLiked = 1;
                            user_likes.Rate = 0;
                            temp.SaveUser_Likes(user_likes);
                        }
                        else
                        {
                            Int32 LikesBefore = temp.getVoteUserLikes(user_likes.UserId.Value, user_likes.PostId.Value);
                            user_likes.DatumLajkanja = DateTime.Now;
                            user_likes.isLiked = 1;
                            temp.UpdateUser_Likes(user_likes, LikesBefore);
                        }
                    }
                }
                LoadClanak(post.id);
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "Login()", true);
            }
        }