<commit_before>
<p><?php echo $this->translate('gallery intro text'); ?></p>
<br />
<?php if(count($this->errors)): ?>
		<div class="error">
			<ul>
				<?php foreach($this->errors as $error): ?>
				<li><?php echo $this->translate($error); ?></li>
				<?php endforeach; ?>
			</ul>
		</div>
<?php endif; ?>
		
<div id="filters" class="clear">
	<h2><?php echo $this->translate('gallery filter title'); ?></h2>
	<?php echo $this->searchEntriesForm; ?>
</div>

 <div id="results">
	<h2>&nbsp;</h2>
	<ul id="summary">
		<li><?php echo $this->translate('gallery auto refresh'); ?> <span>(every <?php echo $this->getConfigValue('refreshIntervalSec'); ?> seconds)</span>:&nbsp; <a href="#" id="cmdToggleRefresh"
			onclick="toggleRefresh();return false;"><?php echo $this->translate('gallery refresh pause label'); ?></a> &nbsp;|&nbsp;
			<a href="#" onclick="refreshPage();return false;"><?php echo $this->translate('gallery refresh now label'); ?></a></li>
	</ul>
			
	<h2><?php echo $this->translate('gallery grid title'); ?> <span>(<?php echo $this->paginator->getItemsCount() . $this->translate('gallery grid sum'); ?>)</span></h2>

	<table>
		<thead>
		</thead>
		<tfoot>
		<tr>
			<td colspan="11">
			<?php echo $this->paginator; ?>
			</td>
		</tr>
		</tfoot>
		<tbody>
			<tr>
				<?php 
					$recordsFound = false;
					foreach($this->paginator as $index => $entry)
					{
						/* @var $entry Kaltura_Client_Type_MediaEntry */
						
						$recordsFound = true;
						?>
							<td>
								<table>
									<tr>
										<td><?php echo $entry->id; ?>: <a href="<?php echo $this->url(array('controller' => 'batch', 'action' => 'entry-investigation', 'entryId' => $entry->id)); ?>" target="_blank"><?php echo $entry->name; ?></a></td>
									</tr>
									<tr>
										<td style="cursor: pointer;" onclick="playEntry('<?php echo $entry->id; ?>')"><img style="" src="<?php echo $entry->thumbnailUrl; ?>" width="120" /></td>
									</tr>
								</table>
								<br/>
							</td>
						<?php
						if(!(($index + 1) % 4))
							echo "</tr><tr>";
					}
					if(!$recordsFound)
					{
						?>
							<td colspan="4"><?php echo $this->translate('no results'); ?></td>
						<?php
					} 
				?>
			</tr>
		</tbody>
	</table>
	
	<?php 
		if($this->uiConf)
		{
			$uiConf = $this->uiConf;
			$swfUrl = $this->swfUrl;
			/* @var $uiConf Kaltura_Client_AdminConsole_Type_UiConfAdmin */
			?>
			<object id="kaltura_player" name="kaltura_player" type="application/x-shockwave-flash" allowFullScreen="true" allowNetworking="all" allowScriptAccess="always" height="<?php echo $uiConf->height; ?>" width="<?php echo $uiConf->width; ?>" bgcolor="#000000" xmlns:dc="http://purl.org/dc/terms/" xmlns:media="http://search.yahoo.com/searchmonkey/media/" rel="media:video" resource="<?php echo $swfUrl; ?>" data="<?php echo $swfUrl; ?>">
				<param name="allowFullScreen" value="true" />
				<param name="allowNetworking" value="all" />
				<param name="allowScriptAccess" value="always" />
				<param name="bgcolor" value="#000000" />
				<param name="flashVars" value="externalInterfaceDisabled=false&partnerId=<?php echo $this->playerPartnerId; ?>" />
				<param name="movie" value="<?php echo $swfUrl; ?>" />
				<span property="media:width" content="<?php echo $uiConf->width; ?>"></span>
				<span property="media:height" content="<?php echo $uiConf->height; ?>"></span>
				<span property="media:type" content="application/x-shockwave-flash"></span>
			</object>
			<?php
		}
	?>
</div>

<script type="text/javascript">


	function playEntry ( entry_id ){
		//alert ( "playEntry:" + entry_id );
		var player = document.getElementById("kaltura_player");
		if ( player ){
			if ( player.sendNotification ){
				player.sendNotification ('changeMedia', {entryId: entry_id});
			}
			else{
				alert ( "Player loading..." );
			}
		}<commit_msg>qnd: show results only if there are any results<commit_after>
<p><?php echo $this->translate('gallery intro text'); ?></p>
<br />
<?php if(count($this->errors)): ?>
		<div class="error">
			<ul>
				<?php foreach($this->errors as $error): ?>
				<li><?php echo $this->translate($error); ?></li>
				<?php endforeach; ?>
			</ul>
		</div>
<?php endif; ?>
		
<div id="filters" class="clear">
	<h2><?php echo $this->translate('gallery filter title'); ?></h2>
	<?php echo $this->searchEntriesForm; ?>
</div>

<?php if($this->playerPartnerId): ?>
	<div id="results">
		<h2>&nbsp;</h2>
		<ul id="summary">
			<li><?php echo $this->translate('gallery auto refresh'); ?> <span>(every <?php echo $this->getConfigValue('refreshIntervalSec'); ?> seconds)</span>:&nbsp; <a href="#" id="cmdToggleRefresh"
				onclick="toggleRefresh();return false;"><?php echo $this->translate('gallery refresh pause label'); ?></a> &nbsp;|&nbsp;
				<a href="#" onclick="refreshPage();return false;"><?php echo $this->translate('gallery refresh now label'); ?></a></li>
		</ul>
				
		<h2><?php echo $this->translate('gallery grid title'); ?> <span>(<?php echo $this->paginator->getItemsCount() . $this->translate('gallery grid sum'); ?>)</span></h2>
	
		<table>
			<thead>
			</thead>
			<tfoot>
			<tr>
				<td colspan="11">
				<?php echo $this->paginator; ?>
				</td>
			</tr>
			</tfoot>
			<tbody>
				<tr>
					<?php 
						$recordsFound = false;
						foreach($this->paginator as $index => $entry)
						{
							/* @var $entry Kaltura_Client_Type_MediaEntry */
							
							$recordsFound = true;
							?>
								<td>
									<table>
										<tr>
											<td><?php echo $entry->id; ?>: <a href="<?php echo $this->url(array('controller' => 'batch', 'action' => 'entry-investigation', 'entryId' => $entry->id)); ?>" target="_blank"><?php echo $entry->name; ?></a></td>
										</tr>
										<tr>
											<td style="cursor: pointer;" onclick="playEntry('<?php echo $entry->id; ?>')"><img style="" src="<?php echo $entry->thumbnailUrl; ?>" width="120" /></td>
										</tr>
									</table>
									<br/>
								</td>
							<?php
							if(!(($index + 1) % 4))
								echo "</tr><tr>";
						}
						if(!$recordsFound)
						{
							?>
								<td colspan="4"><?php echo $this->translate('no results'); ?></td>
							<?php
						} 
					?>
				</tr>
			</tbody>
		</table>
		
		<?php 
			if($this->uiConf)
			{
				$uiConf = $this->uiConf;
				$swfUrl = $this->swfUrl;
				/* @var $uiConf Kaltura_Client_AdminConsole_Type_UiConfAdmin */
				?>
				<object id="kaltura_player" name="kaltura_player" type="application/x-shockwave-flash" allowFullScreen="true" allowNetworking="all" allowScriptAccess="always" height="<?php echo $uiConf->height; ?>" width="<?php echo $uiConf->width; ?>" bgcolor="#000000" xmlns:dc="http://purl.org/dc/terms/" xmlns:media="http://search.yahoo.com/searchmonkey/media/" rel="media:video" resource="<?php echo $swfUrl; ?>" data="<?php echo $swfUrl; ?>">
					<param name="allowFullScreen" value="true" />
					<param name="allowNetworking" value="all" />
					<param name="allowScriptAccess" value="always" />
					<param name="bgcolor" value="#000000" />
					<param name="flashVars" value="externalInterfaceDisabled=false&partnerId=<?php echo $this->playerPartnerId; ?>" />
					<param name="movie" value="<?php echo $swfUrl; ?>" />
					<span property="media:width" content="<?php echo $uiConf->width; ?>"></span>
					<span property="media:height" content="<?php echo $uiConf->height; ?>"></span>
					<span property="media:type" content="application/x-shockwave-flash"></span>
				</object>
				<?php
			}
		?>
	</div>
<?php endif; ?>

<script type="text/javascript">


	function playEntry ( entry_id ){
		//alert ( "playEntry:" + entry_id );
		var player = document.getElementById("kaltura_player");
		if ( player ){
			if ( player.sendNotification ){
				player.sendNotification ('changeMedia', {entryId: entry_id});
			}
			else{
				alert ( "Player loading..." );
			}
		}
{'fraction_non_alphanumeric': 0.2214867617107943, 'fraction_numerical': 0.006619144602851324, 'mean_word_length': 3.523316062176166, 'pattern_counts': {'":': 0, '<': 233, '<?xml version=': 0, '>': 304, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6030323', 'n_tokens_mistral': 3277, 'n_tokens_neox': 2613, 'n_words': 546}