summaryrefslogtreecommitdiff
path: root/gstudio/templates/gstudio/video.html
blob: 644831a67ae9ce6cc49185fd83a57adda73b329c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
{% extends "gstudio/base.html" %}
{% load i18n %}
{% load adminmedia grp_tags %}
{% block content %}
{% if user.is_authenticated %}
<h1 style="color: teal;">Welcome to the VideoCore</h1>
<p><img id="zoomable" src="{% admin_media_prefix %}img/videos.jpg" alt="{{ image.title }}" class="left" /></p>
<h2>Logged in as: {{user.username}}</h2>
<br>
<form enctype="multipart/form-data" method="post" action="">
{% csrf_token %}
<p><h4 style="color: black;">Post Video:</h4><input type="file" name="clip[]" multiple="multiple" /></p>
<input type="hidden" name="user" value={{user.username}}>
<input type="submit" value="Upload">
</form>
<br>
<form method="post" action="">
{% csrf_token %}
<h4 style="color: black;">Search Video</h4>
<p><input type="text" name="svid" value={{val}}></p>
<h4 style="color: black;">Sort videos by:</h4>
<p><div align="center">
<select name="mydropdown">
<option value="title">Title</option>
<option value="creation_date">Creation Date</option>
</select>
</div>
<input type="submit" name="norm" value="Search">
<input type="submit" name="spe" value="Search by User">
</form>
<br>
<form method="post" action="">
{% csrf_token %}
<input type="hidden" name="user" value={{user.username}}>
<input type="submit" name="fav" value="View Favourites">
</form>

<h4 style="color: teal;">VIDEOS</h4><br>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
  
  <script>
 
       
$(function() {
    





$('#progressbar').progressbar({ value: 0.0001 }); 
    $pVal = $('.ui-progressbar-value').addClass('ui-corner-right');
    var pGress = setInterval(function() { //generate our endless loop
        var pCnt = $pVal.width(); // get width as int
        // generate a random number between our max 100 and it's half 50, 
        // this is optional, and make the bar move back and forth before
        // we reach the end.
        var rDom = Math.floor(Math.random() * (100 - 0 + 1) + 0);
       var step = rDom >= 100 ? 100: rDom; // reached our max ? reset step.
       doAnim(step);
    },1000);
    var doAnim = function(wD) {
        // complete easing list http://jqueryui.com/demos/effect/easing.html
        $pVal.stop(true).animate({width: wD + '%'},1000, 'easeOutBack');
        if (wD >= 100) clearInterval(pGress) /* run callbacks here */
    }

 var time = new Date().getTime();
     $(document.body).bind("mousemove keypress", function(e) {
         time = new Date().getTime();
     });

     function refresh() {
         if(new Date().getTime() - time >= 200000) 
             window.location.reload(true);
         else 
             setTimeout(refresh, 10000);
     }

     setTimeout(refresh, 10000);






});

  





</script>


 <div id="progressbar"></div>







<br>
{% if fav %}
<h4 style="color: teal;">Favourite Videos</h4>
{% endif %}
<br>

{% for video in vids %}
<iframe src="{{video.rurl}}/embed?in=0&out=10000&view=video" width="256" height="144" allowfullscreen></iframe>
<h4>{{video.title}}</a></h4>
<form enctype="multipart/form-data" method="post" action="" target="_blank">
{% csrf_token %}
<input type="hidden" name = "full" value ={{video.slug}}>
<input type="submit" value="FullScreen">
</form>	
<h4><a href={{video.rurl}} target="_blank">Right click to download</a></h4><br>
<font color = 'black'>Posted By : </font>
{% for author in video.get_nbh.posted_by %}
  <font color = 'teal'>{{author}}</font>
{% endfor %}
<br>
<font color = 'black'>Posted At :</font>
{% for date in video.get_nbh.creation_day %}
 <font color = 'teal'>{{date}}</font>
{% endfor %}
<br>
{% for we in video.get_nbh.source %}		
		<font color = 'black'>Location: </font>
			{% for map in video.get_nbh.map_link %}
				{% ifnotequal map '' %}		
					<a href=http://maps.google.co.in/maps?hl=en&cp=43&gs_id=6&xhr=t&q={{map}}&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&biw=1304&bih=680&um=1&ie=UTF-8&sa=N&tab=wl target="_blank">{{we}}</a>
				{% endifnotequal %}			
			{% endfor %}
		{% endfor %}
<br>
<font color = 'black'>Current rating is </font><h4>{{ video.rating.get_rating }}</h4>
<br>
<form method="post" action="">
{% csrf_token %}
<input name="star1" type="radio" value=1 class="star"/>
<input name="star1" type="radio" value=2 class="star"/>
<input name="star1" type="radio" value=3 class="star"/>
<input name="star1" type="radio" value=4 class="star"/>
<input name="star1" type="radio" value=5 class="star"/>
  
<input type="hidden" name="vidid" value={{video.id}}>
<input type="submit" value="Rate it!!!">
</form>
<br>
<form method="post" action="">
{% csrf_token %}
<input type="hidden" name="favid" value={{video.id}}>
<input type="hidden" name="favusr" value={{user.username}}>
<input type="submit" value="Add to favourites">
</form><br>
<hr width="100%" style="height:5px;" color="black"/>
<br>
{% endfor %}<br>

<br><br>
<a href="http://www.facebook.com" target="_blank">Follow us on Facebook</a>
{% else %}
 
<h2 style="color: indigo;">Sorry you need to log in to see this content !</h2>
 
{% endif %}
{% endblock %}

{% block chart %}
<br> <br><br><br><br><br><br><br><br><br><br><br><br><br>

<br><br><br><br><br>

<br>
{% endblock %}