124.patch

jobin dcruz, 04/17/2010 12:06 am

Download (17.4 kB)

 
b/.htaccess
86 86
<IfModule mod_gzip.c>
87 87
mod_gzip_on No
88 88
</IfModule>
89

  
90
ErrorDocument 404 /404.php
91

  
b/404.php
1
<?php
2

  
3
require 'include/config.php';
4

  
5
$sql = "SELECT count(*) AS total FROM `videos` WHERE
6
       `video_featured`='yes' AND
7
       `video_type`='public' AND
8
       `video_approve`='1' AND
9
       `video_active`='1'
10
       LIMIT 0,4";
11
$result = mysql_query($sql) or mysql_die($sql);
12
$tmp = mysql_fetch_assoc($result);
13

  
14
if ($tmp['total'] > 0)
15
{
16
	$sql = "SELECT * FROM `videos` WHERE
17
	       `video_featured`='yes' AND
18
	       `video_type`='public' AND
19
	       `video_approve`='1' AND
20
	       `video_active`='1'
21
	       LIMIT 0,4";
22
}
23
else
24
{
25
    $sql = "SELECT * FROM `videos` WHERE
26
           `video_type`='public' AND
27
           `video_approve`='1' AND
28
           `video_active`='1'
29
           LIMIT 0,4";
30
}
31

  
32
$result = mysql_query($sql) or mysql_die($sql);
33

  
34
if (mysql_num_rows($result) > 0)
35
{
36
    while($tmp = mysql_fetch_assoc($result))
37
    {
38
        $tmp['video_thumb_url'] = $servers[$tmp['video_server_id']];
39
        $video_info[] = $tmp;
40
    }
41
    
42
    $smarty->assign('video_info',$video_info);
43
}
44

  
45

  
46
$smarty->assign('msg','We\'re sorry, the page you requested cannot be found.');
47
$smarty->display('404.tpl');
48
db_close();
b/templates/404.tpl
1
<html>
2
<head>
3
<title>404 Not Found</title>
4
<link href="{$img_css_url}/css/404.css" rel="stylesheet" type="text/css" />
5
</head>
6
<body>
7
<center>
8
<div id="404" style="width:600px;margin: -20px;">
9
	<div id="message" class="rounded-corner">{$msg}</div>
10
	<div id="search-wrapper" class="rounded-corner">
11
	   <div class="logo"><img src="{$img_css_url}/images/logo.jpg"></div>
12
	   <div style="box-sizing:border-box;float:left;padding:14px 8px 30px 0;">
13
	   <form method="get" action="{$base_url}/search.php">
14
	       <input class="text" value="" name="search" size="25"/>
15
	       <input type="hidden" value="video" name="type">
16
	       <input type="submit" class="search-btn" value="Search" />
17
	   </form>
18
	   </div>
19
	   <a href="{$base_url}/featured/">Featured Videos</a>|<a href="{$base_url}/rated/">Top Rated Videos</a>|<a href="{$base_url}/viewed/">Most Watched Videos</a>
20
	   <div style="margin-top:10px;">
21
	   {section name=i loop=$video_info}
22
	       <div class="featured_video_box">
23
	           <a href="{$base_url}/view/{$video_info[i].video_id}/{$video_info[i].video_seo_name}/">
24
	           <img width="120" height="80" src="{$video_info[i].video_thumb_url}/thumb/{$video_info[i].video_folder}1_{$video_info[i].video_id}.jpg" alt="{$video_info[i].video_title}" border="0" class="video_image" />
25
	           </a>
26
	           <a href="{$base_url}/view/{$video_info[i].video_id}/{$video_info[i].video_seo_name}/">
27
	           {$video_info[i].video_title|truncate:25:'...'}
28
	           </a>
29
	       </div>
30
	   {/section}
31
	   </div>
32
	
33

  
34
		<div class="copy">
35
		    Copyright &copy; {$smarty.now|date_format:"%Y"} {$site_name}. All rights reserved.<br />
36
		    <!--
37
		    REMOVING THE LINE BELOW CONSTITUTES A VIOLATION
38
		    OF YOUR LICENSE AGREEMENT AND WILL RESULT IN
39
		    SIGNIFICANT PENALITIES IF REMOVED.
40
		    -->
41
		    Powered by <a class="copy" href="http://buyscripts.in/youtube_clone.html" target="_blank">vShare</a>
42
		</div>
43
	</div>
44
</div>
45
</center>
46
</body>
47
</html>
b/templates/css/404.css
1

  
2
#message
3
{
4
    background-color:#FFFFCC;
5
    border:1px solid #FFCC05;
6
    color:#666666;
7
    font-size:12px;
8
    font-weight:bold;
9
    margin-top:50px;
10
    padding:10px 0;
11
    text-align:center;
12

  
13
}
14
.rounded-corner {
15
    -moz-border-radius-bottomleft:5px;
16
    -webkit-border-radius-bottomleft:5px;
17
    -moz-border-radius-bottomright:5px;
18
    -webkit-border-radius-bottomright:5px;
19
    -moz-border-radius-topleft:5px;
20
    -webkit-border-radius-topleft:5px;
21
    -moz-border-radius-topright:5px;
22
    -webkit-border-radius-topright:5px;
23
    
24
}
25
#search-wrapper
26
{
27
    border:1px solid #CCCCCC;
28
    margin-top:10px;
29
    padding:15px 0 ;
30
    height:55px;
31
}
32
.search-btn
33
{
34
    background-color: rgba(10,40,250,.08);
35
    -moz-border-radius-bottomleft:5px;
36
    -webkit-border-radius-bottomleft:5px;
37
    -moz-border-radius-bottomright:5px;
38
    -webkit-border-radius-bottomright:5px;
39
    -moz-border-radius-topleft:5px;
40
    -webkit-border-radius-topleft:5px;
41
    -moz-border-radius-topright:5px;
42
    -webkit-border-radius-topright:5px;
43
}
44
.featured_video_box
45
{
46
    box-sizing:border-box;
47
    float:left;
48
    border:1px solid #CCCCCC;
49
    width:132px;
50
    height:150px;
51
    font-size:12px;
52
    text-align: left;
53
    padding:4px 0 0 10px;
54
    margin-left: 4px;
55
    -moz-border-radius:5px;
56
}
57
.logo
58
{
59
    box-sizing:border-box;
60
    float:left;
61
    padding-left:4px;
62
    border-right:1px solid #CCCCCC;
63
    padding:0 20px;
64
}
65
.copy, a.copy, a.copy:link, a.copy:visited {
66
    color:#000000;
67
    font-size:10px;
68
    font-weight:normal;
69
    margin-top:0.6em;
70
    text-align:center;
71
}
72
.video_image
73
{
74
    -moz-border-radius:5px;
75
    -webkit-border-radius:5px;
76
    border:1px solid #CCCCCC;
77
}
0
- 
b/templates/404.tpl
10 10
	<div id="search-wrapper" class="rounded-corner">
11 11
	   <div class="logo"><img src="{$img_css_url}/images/logo.jpg"></div>
12 12
	   <div style="box-sizing:border-box;float:left;padding:14px 8px 30px 0;">
13
	   <form method="get" action="{$base_url}/search.php">
14
	       <input class="text" value="" name="search" size="25"/>
15
	       <input type="hidden" value="video" name="type">
16
	       <input type="submit" class="search-btn" value="Search" />
17
	   </form>
13
		   <form method="get" action="{$base_url}/search.php">
14
		       <input class="text" value="" name="search" size="25"/>
15
		       <input type="hidden" value="video" name="type">
16
		       <input type="submit" class="search-btn" value="Search" />
17
		   </form>
18 18
	   </div>
19
	</div>
20
	<div>
19 21
	   <a href="{$base_url}/featured/">Featured Videos</a>|<a href="{$base_url}/rated/">Top Rated Videos</a>|<a href="{$base_url}/viewed/">Most Watched Videos</a>
22
	</div>
20 23
	   <div style="margin-top:10px;">
21 24
	   {section name=i loop=$video_info}
22 25
	       <div class="featured_video_box">
......
40 43
		    -->
41 44
		    Powered by <a class="copy" href="http://buyscripts.in/youtube_clone.html" target="_blank">vShare</a>
42 45
		</div>
43
	</div>
44 46
</div>
45 47
</center>
46 48
</body>
b/templates/css/404.css
75 75
    -webkit-border-radius:5px;
76 76
    border:1px solid #CCCCCC;
77 77
}
78

  
79

  
80
.clearfix:after {
81
    content: ".";
82
    display: block;
83
    clear: both;
84
    visibility: hidden;
85
    line-height: 0;
86
    height: 0;
87
}
88
.clearfix {
89
    display: inline-block;
90
}
91
html[xmlns] .clearfix {
92
    display: block;
93
}
94
* html .clearfix {
95
    height: 1%;
96
}
78
- 
b/404.php
2 2

  
3 3
require 'include/config.php';
4 4

  
5
$sql = "SELECT count(*) AS total FROM `videos` WHERE
5
$sql = "SELECT * FROM `videos` WHERE
6 6
       `video_featured`='yes' AND
7 7
       `video_type`='public' AND
8 8
       `video_approve`='1' AND
9 9
       `video_active`='1'
10 10
       LIMIT 0,4";
11 11
$result = mysql_query($sql) or mysql_die($sql);
12
$tmp = mysql_fetch_assoc($result);
13 12

  
14
if ($tmp['total'] > 0)
15
{
16
	$sql = "SELECT * FROM `videos` WHERE
17
	       `video_featured`='yes' AND
18
	       `video_type`='public' AND
19
	       `video_approve`='1' AND
20
	       `video_active`='1'
21
	       LIMIT 0,4";
22
}
23
else
13
if (mysql_num_rows($result) == 0)
24 14
{
25 15
    $sql = "SELECT * FROM `videos` WHERE
26 16
           `video_type`='public' AND
27 17
           `video_approve`='1' AND
28 18
           `video_active`='1'
29 19
           LIMIT 0,4";
20
    $result = mysql_query($sql) or mysql_die($sql);
30 21
}
31 22

  
32
$result = mysql_query($sql) or mysql_die($sql);
33

  
34 23
if (mysql_num_rows($result) > 0)
35 24
{
36 25
    while($tmp = mysql_fetch_assoc($result))
b/templates/404.tpl
3 3
<title>404 Not Found</title>
4 4
<link href="{$img_css_url}/css/404.css" rel="stylesheet" type="text/css" />
5 5
</head>
6
<body>
6
<body align="center">
7 7
<center>
8
<div id="404" style="width:600px;margin: -20px;">
8
<div id="404" style="width:650px;">
9 9
	<div id="message" class="rounded-corner">{$msg}</div>
10 10
	<div id="search-wrapper" class="rounded-corner">
11 11
	   <div class="logo"><img src="{$img_css_url}/images/logo.jpg"></div>
12
	   <div style="box-sizing:border-box;float:left;padding:14px 8px 30px 0;">
12
	   <div style="box-sizing:border-box;float:left;padding:14px 0 0px 10px;">
13 13
		   <form method="get" action="{$base_url}/search.php">
14
		       <input class="text" value="" name="search" size="25"/>
14
		       <input type="text" value="" name="search" />
15 15
		       <input type="hidden" value="video" name="type">
16 16
		       <input type="submit" class="search-btn" value="Search" />
17 17
		   </form>
18 18
	   </div>
19 19
	</div>
20
	<div>
21
	   <a href="{$base_url}/featured/">Featured Videos</a>|<a href="{$base_url}/rated/">Top Rated Videos</a>|<a href="{$base_url}/viewed/">Most Watched Videos</a>
20

  
21
	<div id="links">
22
	   <a href="{$base_url}/featured/">Featured Videos</a> |
23
	   <a href="{$base_url}/rated/">Top Rated Videos</a> |
24
	   <a href="{$base_url}/viewed/">Most Watched Videos</a>
22 25
	</div>
26

  
23 27
	   <div style="margin-top:10px;">
24
	   {section name=i loop=$video_info}
25
	       <div class="featured_video_box">
26
	           <a href="{$base_url}/view/{$video_info[i].video_id}/{$video_info[i].video_seo_name}/">
27
	           <img width="120" height="80" src="{$video_info[i].video_thumb_url}/thumb/{$video_info[i].video_folder}1_{$video_info[i].video_id}.jpg" alt="{$video_info[i].video_title}" border="0" class="video_image" />
28
	           </a>
29
	           <a href="{$base_url}/view/{$video_info[i].video_id}/{$video_info[i].video_seo_name}/">
30
	           {$video_info[i].video_title|truncate:25:'...'}
31
	           </a>
28
	       <div id="featured_box">
29
	           Featured Videos
32 30
	       </div>
33
	   {/section}
31
	       <br>
32
		    <div id="video_box">
33
			   {section name=i loop=$video_info}
34
			       <div class="featured_video_box">
35
			           <a href="{$base_url}/view/{$video_info[i].video_id}/{$video_info[i].video_seo_name}/">
36
			           <img width="120" height="80" src="{$video_info[i].video_thumb_url}/thumb/{$video_info[i].video_folder}1_{$video_info[i].video_id}.jpg" alt="{$video_info[i].video_title}" border="0" class="video_image" />
37
			           </a>
38
			           <a href="{$base_url}/view/{$video_info[i].video_id}/{$video_info[i].video_seo_name}/" style="font-weight:bold;">
39
			             {$video_info[i].video_title|truncate:25:'...'}
40
			           </a><br />
41
			           {insert name=time_range assign=added_on field=video_add_time IDFR=video_id id={insert name=time_range assign=added_on field=video_add_time IDFR=video_id id=$video_info[i].video_id tbl=videos}
42
			           <span class="featured_video_box_span">{$added_on}</span><br />
43
			           <span class="featured_video_box_span">{$video_info[i].video_view_number} views</span><br />
44
			           <span class="featured_video_box_span">
45
			           {if $video_info[i].video_rated_by gt "0"}
46
                        {insert name=show_rate assign=rate rte=$video_info[i].video_rate rated=$video_info[i].video_rated_by}
47
                        {$rate}
48
                       {else}
49
                        no rating
50
                       {/if}
51
                       </span><br />
52
                       {insert name=id_to_name assign=user_name un=$video_info[i].video_user_id}
53
                       <a style="font-size : 10px;" href="{$base_url}/{$user_name}">{$user_name}</a>
54
			       </div>
55
			   {/section}
56
		   </div>
57
		   
34 58
	   </div>
35 59
	
36 60

  
b/templates/css/404.css
1
body, * {
2
    font-family: verdana, arial, helvetica, sans-serif;
3
}
4
body {
5
    font-size: 12px;
6
    background-color:#fff;
7
    margin: 0px;
8
    padding: 0px;
9
}
1 10

  
11
a {
12
    color:#0033CC;
13
    text-decoration: none;
14
    font-weight: normal;
15
}
16
a:link {
17
    color:#0033CC;
18
    text-decoration: none;
19
    font-weight: normal;
20
}
21
a:visited {
22
    text-decoration: none;
23
    color:#0033CC;
24
}
25
a:hover {
26
    text-decoration: underline;
27
    color: #0033CC;
28
}
29
a:active {
30
    text-decoration: none;
31
    color: #0033CC;
32
}
33
#links {
34
    margin-top:10px;
35
    text-align:center;
36
}
2 37
#message
3 38
{
4 39
    background-color:#FFFFCC;
......
7 42
    font-size:12px;
8 43
    font-weight:bold;
9 44
    margin-top:50px;
10
    padding:10px 0;
45
    padding:12px 0;
11 46
    text-align:center;
12 47

  
13 48
}
......
31 66
}
32 67
.search-btn
33 68
{
34
    background-color: rgba(10,40,250,.08);
35
    -moz-border-radius-bottomleft:5px;
36
    -webkit-border-radius-bottomleft:5px;
37
    -moz-border-radius-bottomright:5px;
38
    -webkit-border-radius-bottomright:5px;
39
    -moz-border-radius-topleft:5px;
40
    -webkit-border-radius-topleft:5px;
41
    -moz-border-radius-topright:5px;
42
    -webkit-border-radius-topright:5px;
69
    background-color: #D2E3FB;
70
    -moz-border-radius-bottomleft:3px;
71
    -webkit-border-radius-bottomleft:3px;
72
    -moz-border-radius-bottomright:3px;
73
    -webkit-border-radius-bottomright:3px;
74
    -moz-border-radius-topleft:3px;
75
    -webkit-border-radius-topleft:3px;
76
    -moz-border-radius-topright:3px;
77
    -webkit-border-radius-topright:3px;
78
	-o-broder-radius:3px;
79
	-border-radius:3px;
80
	border:1px solid #A1B4D9;
81
	height:24px;
82
	color:#0033CC;
83
	font-weight:bold;
43 84
}
44 85
.featured_video_box
45 86
{
46 87
    box-sizing:border-box;
47 88
    float:left;
48
    border:1px solid #CCCCCC;
49
    width:132px;
89
    width:147px;
50 90
    height:150px;
51 91
    font-size:12px;
52 92
    text-align: left;
53 93
    padding:4px 0 0 10px;
54 94
    margin-left: 4px;
55
    -moz-border-radius:5px;
56 95
}
57 96
.logo
58 97
{
59 98
    box-sizing:border-box;
60 99
    float:left;
61
    padding-left:4px;
62 100
    border-right:1px solid #CCCCCC;
63
    padding:0 20px;
101
	width:190px;
102
	margin-top:-10;
103
	padding-left:2px;
104
}
105
.logo img
106
{
107
    width:180px;
108
	height:70px;
109
	border:0;
64 110
}
65 111
.copy, a.copy, a.copy:link, a.copy:visited {
66 112
    color:#000000;
......
71 117
}
72 118
.video_image
73 119
{
74
    -moz-border-radius:5px;
75
    -webkit-border-radius:5px;
76
    border:1px solid #CCCCCC;
120
    border:3px double #999999;
77 121
}
78 122

  
79 123

  
......
94 138
* html .clearfix {
95 139
    height: 1%;
96 140
}
141

  
142
input[type=text]
143
{
144
    width:370px;
145
}
146
#featured_box
147
{
148
    float:left;
149
    width:620px;
150
    text-align:left;
151
    background-color:#D2E3FB;
152
    border:1px solid #A1B4D9;
153
    font-size:16px;
154
    font-weight:bold;
155
    height:23px;
156
    padding:6px 18px 0 10px;
157
    vertical-align:top;
158
	-moz-border-radius-topleft:5px;
159
	-webkit-border-radius-topleft:5px;
160
	border-radius-topleft:5px;
161
	-o-border-radius-topleft:5px;
162
    -moz-border-radius-topright:5px;
163
	-webkit-border-radius-topright:5px;
164
	border-radius-topright:5px;
165
	-o-border-radius-topright:5px;
166
}
167
#video_box
168
{
169
    border:1px solid #A1B4D9;
170
    height:200px;
171
	-moz-border-radius-bottomright:5px;
172
	-webkit-border-radius-bottomright:5px;
173
	-o-border-radius-bottomright:5px;
174
	border-radius-bottomright:5px;
175
	-moz-border-radius-bottomleft:5px;
176
	-webkit-border-radius-bottomleft:5px;
177
	-o-border-radius-bottomleft:5px;
178
	border-radius-bottomleft:5px;
179
}
180

  
181
.featured_video_box_span
182
{
183
    color : #999999;
184
	font-size : 10px;
185
}
186

  
187
.featured_video_box_span img
188
{
189
	width : 11px;
190
}
97
-