<!-- BEGIN MAIN CONTENT -->
<div id="videowatch_body">
	<div id="videowatch_top">

		<div id="videowatch">

			<link href="{$cssurl}/videos.css" rel="stylesheet" type="text/css" /> 

			<div id="search_page" class="clear">


<div id="browse">
				<!-- Search Form Begins -->
				<div id="searchformdiv" style="width:90%;" align="left">
 					<form name="searchform" method="POST" action="{$baseurl}/searchengine.php">
                    <h2>{$lang412}:</h2><br />
                    
                    <input type="text" value="{$smarty.request.searchterm}"}  name="searchterm" id="searchterm"/>
                    
                    <b> in </b>
                    <select name="searchfor" id="searchfor"> 
                    <option value="videos" {if $smarty.request.searchfor eq "videos"}selected="selected"{/if}>{$lang41}
                    <option value="members" {if $smarty.request.searchfor eq "members"}selected="selected"{/if}>{$lang59}
                    <option value="series" {if $smarty.request.searchfor eq "series"}selected="selected"{/if}>{$lang44}
                    <option value="channels" {if $smarty.request.searchfor eq "channels"}selected="selected"{/if}>{$lang37}
					</select>
                    <div style="padding-bottom:5px;"></div>
                    <input type="hidden" name="submitsearch" value="submitsearch" />
        			<INPUT class="inputBox" type=image value="submitsearch" src="{$imageurl}/buttons/{$smarty.session.language}/searchsmall.gif" height="20px" style="height:20px;" border="0" name=submitsearch>
					</form>
                    
            	</div>
				<!-- Search Form Ends -->
</div>	

<div id="browse">
	<div id="sideAd" >
		<span>{$lang0}</span>
        {insert name=get_advertisement value=var AID="2"}
	</div>

	<div class="containerHeader containerHeaderWAdSpace">
	<h1 class="half_h1">
	<a href="{$baseurl}/syndicate/members/{$filter}/{$showseotitle}"><img style="vertical-align: top;" src="{$imageurl}/smallrss.gif" /></a>
	{$showtitle} {if $error eq ""}{$beginning} - {$ending} {$lang61} {$total}{/if}</h1>
	</div>
    
	<div class="containerD containerWAdSpace">
		<div class="clear" style="height: 10px;"></div>
		<div id="result_container" class="clear">
		<ul class="vList_vFull clearfix clear">
		</ul>
        <ul class="vList_vFull clearfix clear">
        
        	{if $error ne ""}
            	<div class="errorMsg3" id="errorMsg3" name="errorMsg2" style="display:''">
					{$error}
				</div>
            {/if}
            
            {if $getsearchfor eq "videos"}
            
        	{section name=i loop=$listvideos}
			<li>
				<a href="{$baseurl}/videos/{$listvideos[i].VIDEOID}/{insert name=get_seotitle_from_videoid assign=title videoid=$listvideos[i].VIDEOID}" title="{$listvideos[i].title} {$lang299}"><img src="{$vthumburl}/{$listvideos[i].VIDEOID}-1.jpg" oversrc="{$vthumburl}/{$listvideos[i].VIDEOID}-3.jpg" class="vThumb" alt="{$listvideos[i].title} {$lang299}"></a>
				<a href="{$baseurl}/videos/{$listvideos[i].VIDEOID}/{insert name=get_seotitle_from_videoid assign=title videoid=$listvideos[i].VIDEOID}" class="vTitle" title="{$listvideos[i].title}">{$listvideos[i].title}</a>
				<ul class="vMeta">
					<li><var>{insert name=get_runtime value=var runtime=$listvideos[i].runtime}</var></li>
					<li>
						<div class="{insert name=get_member_icon value=var USERID=$listvideos[i].USERID}"> <var><a href="{$baseurl}/members/profile/{$listvideos[i].USERID}/{insert name=get_username_from_userid value=var USERID=$listvideos[i].USERID}">{insert name=get_username_from_userid value=var USERID=$listvideos[i].USERID} </a></var></div>
					</li>
					<li><span class="metaLabel">{$lang60}: </span><var>{$listvideos[i].viewcount}</var></li>
                    {if $listvideos[i].allowcomments ne "0"}
                    <li><span class="metaLabel">{$lang63}: </span><var>{$listvideos[i].commentcount}</var></li>
                    {else}
                    <li><span class="metaLabel">{$lang63}: </span><var>0</var></li>
                    {/if}
					<li><span class="metaLabel">{$lang64}: </span><var>{insert name=get_video_added_date assign=DID videoid=$listvideos[i].VIDEOID}</var></li>
                    {if $listvideos[i].allowratings ne "0"}
					<li>
                    	<var class="vMeta_rating">
						<nobr>
						{insert name=get_rating_stars rating=$listvideos[i].rating}
						</nobr>
						<div class="clear"></div>
						<span class="smallText">({$listvideos[i].ratingcount} {if $listvideos[i].ratingcount eq "1"}{$lang65}{else}{$lang66}{/if})</span>
						</var>
                    </li>
                    {/if}
				</ul>
			</li>
			{/section}
            
            {elseif $getsearchfor eq "members"}
            
            {section name=i loop=$listvideos}
            {insert name=get_member_profilepicture assign=profilefpic value=var USERID=$listvideos[i].USERID}
			<li>
				<a href="{$baseurl}/members/profile/{$listvideos[i].USERID}/{$listvideos[i].username}" title="{$listvideos[i].username} {$lang299}"><img src="{$membersprofilepicurl}/thumbs/{$profilefpic}" alt="{$listvideos[i].username} Photo"></a>
				<a href="{$baseurl}/members/profile/{$listvideos[i].USERID}/{$listvideos[i].username}" class="vTitle" title="{$listvideos[i].username}"><div class="{insert name=get_member_icon value=var USERID=$listvideos[i].USERID}">{$listvideos[i].username}</div></a>
				<ul class="vMeta">
                	<li><span class="metaLabel">{$lang203}: </span><var>{$listvideos[i].profileviews}</var></li>
                    <li><span class="metaLabel">{$lang204}: </span><var>{$listvideos[i].videosyouviewed}</var></li>
                    <li><span class="metaLabel">{$lang134}: </span><var>{if $listvideos[i].gender eq "1"}{$lang135}{elseif $listvideos[i].gender eq "2"}{$lang136}{/if}</var></li>
					<li><span class="metaLabel">{$lang139}: </span><var>{$listvideos[i].country}</var></li>
				</ul>
			</li>
			{/section}
            
            {elseif $getsearchfor eq "series"}
            
            {section name=i loop=$listvideos}
			<li>
				<a href="{$baseurl}/videoseries/{$listvideos[i].SID}/{insert name=get_seotitle_from_sid assign=title sid=$listvideos[i].SID}" title="{$listvideos[i].name} {$lang299}"><img src="{$seriesurl}/{$listvideos[i].thumbnail}" alt="{$listvideos[i].name} {$lang299}"></a>
				<a href="{$baseurl}/videoseries/{$listvideos[i].SID}/{insert name=get_seotitle_from_sid assign=title sid=$listvideos[i].SID}" class="vTitle" title="{$listvideos[i].name}">{$listvideos[i].name}</a>
				<ul class="vMeta">
                    <li><span class="metaLabel">{$lang413}: </span><var><a href="{$baseurl}/members/profile/{$listvideos[i].USERID}/{insert name=get_username_from_userid value=var USERID=$listvideos[i].USERID}">{insert name=get_username_from_userid value=var USERID=$listvideos[i].USERID}</a></var></li>
					<li><span class="metaLabel">{$lang207}: </span><var>{$listvideos[i].subscriptions}</var></li>
                    <li><span class="metaLabel">{$lang41}: </span><var>{insert name=get_videos_in_series assign=videosinser SID=$listvideos[i].SID}{$videosinser}</var></li>
					<li>
                    	<var class="vMeta_rating">
						<nobr>
						{insert name=get_rating_stars rating=$listvideos[i].rating}
						</nobr>
						<div class="clear"></div>
						</var>
                    </li>
				</ul>
			</li>
			{/section}
            
            {elseif $getsearchfor eq "channels"}
            
            {section name=i loop=$listvideos}
			<li>
				<a href="{$baseurl}/{$listvideos[i].seokey}" title="{$listvideos[i].name} {$lang299}"><img src="{$cthumburl}/{$listvideos[i].CID}.jpg" alt="{$listvideos[i].name} {$lang299}"></a>
				<a href="{$baseurl}/{$listvideos[i].seokey}" class="vTitle" title="{$listvideos[i].name}">{$listvideos[i].name}</a>
				<ul class="vMeta">
					<li>
						<div class="{insert name=get_member_icon value=var USERID=$listvideos[i].MID}"> <var><a href="{$baseurl}/members/profile/{$listvideos[i].MID}/{insert name=get_username_from_userid value=var USERID=$listvideos[i].MID}">{insert name=get_username_from_userid value=var USERID=$listvideos[i].MID} </a></var></div>
					</li>
                    <li><span class="metaLabel">{$lang59}: </span><var>{insert name=get_channel_members_count value=var CID=$listvideos[i].CID}</var></li>
					<li><span class="metaLabel">{$lang60}: </span><var>{$listvideos[i].viewcount}</var></li>
					<li>
                    	<var class="vMeta_rating">
						<nobr>
						{insert name=get_rating_stars rating=$listvideos[i].rating}
						</nobr>
						<div class="clear"></div>
						<span class="smallText">({$listvideos[i].ratingcount} {if $listvideos[i].ratingcount eq "1"}{$lang65}{else}{$lang66}{/if})</span>
						</var>
                    </li>
				</ul>
			</li>
			{/section}
            
            {/if}
            
			<!-- new row -->
			</ul><ul class="vList_vFull clearfix clear">
	        <!-- new row end -->     
	

			</ul>

			<div class="clear"></div>
		</div>	
	
<div class="clear" style="height: 15px;"></div>	
	

<!-- Paging Begin -->
<ul class="pagination">
	{$pagelinks}
</ul>
	<div class="clear"></div>
</div>
<!-- Paging End -->

<div id="drpepper">
</div>

<div class="clear"></div>
</div>	
	


<div id="categories" style="width: 151px;>
	<ul class="category clear"></ul>        
    <h1 class="titleBar">{$lang54}</h1>
	<ul class="category clear">
		<li><a href="{$baseurl}/browse/members/a/{$filter}/1/{$showseotitle}" >{$lang56}</a></li>
		<li><a href="{$baseurl}/browse/members/z/{$filter}/1/{$showseotitle}" >{$lang57}</a></li>
	</ul>	
    
    <h1 class="titleBar">{$lang414}</h1>
	<ul id="ieClearHack" class="category clear">
	    <li><a href="{$baseurl}/search/videos/a/1/{$smarty.request.searchterm}" >{$lang41} ({$totalvcount})</a></li>
        <li><a href="{$baseurl}/search/members/a/1/{$smarty.request.searchterm}" >{$lang59} ({$totalmcount})</a></li>
        <li><a href="{$baseurl}/search/series/a/1/{$smarty.request.searchterm}" >{$lang44} ({$totalscount})</a></li>
        <li><a href="{$baseurl}/search/channels/a/1/{$smarty.request.searchterm}" >{$lang37} ({$totalccount})</a></li>
	</ul>
    
    <h1 class="titleBar">{$lang415}</h1>
	<ul id="ieClearHack" class="category clear">
    	{insert name=get_search_phrases assign=topsearches value=var type=$smarty.request.searchfor}
    	{section name=sp loop=$topsearches}
	    <li><a href="{$baseurl}/search/{$topsearches[sp].type}/a/1/{$topsearches[sp].phrase}" >{$topsearches[sp].phrase}</a></li>
        {/section}
	</ul>
		
	</div>

	<div class="clear"></div>
</div>


<div class="clear"></div>
</div>
</div>

	
{include file="bottom.tpl"}
	
</div>
<!-- END MAIN CONTENT -->