<?php if ($this->_vars['base']['account']['status'] != STATUS_GUEST): ?>
<?php include VIEW_DIR.'mobile/common/menu/private.tpl'; ?><?php else : ?>
<?php include VIEW_DIR.'mobile/common/menu/public.tpl'; ?><?php endif; ?>

<?php if (empty($this->_vars['result'])):?>
	<?php _e('Sorry, no results found.'); ?><br><br>
	<?php loadPlugin::callFunc('hitsuji_banner', POSITION_MOBILE); ?><br>
<?php else: ?>
<?php HTML::mobilePager($this->_vars['pager'], $this->_vars['request']); ?>
<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
<?php foreach ($this->_vars['result'] as $_key=>$_row): ?>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>"><font size="<?php Theme::exec()->fontSize(); ?>">
		<a href="<?php e($_row['view_url']); ?>"><img src="<?php e($_row['small_img']); ?>" alt="<?php e($_row['item_code']); ?>"></a><br>
		<font color="<?php Theme::exec()->columnColor(); ?>"><?php e($_row['title']); ?></font><br>
		<a href="<?php e($_row['view_url']); ?>"><?php printf(_('More at %s'), $this->_vars['atService']); ?></a><br></font>

<?php if ($this->_vars['base']['account']['status'] != STATUS_GUEST): ?>
		<div align="right"><font size="<?php Theme::exec()->fontSize(); ?>">
		&lt;<a href="<?php e(HTTP_ACTION); ?>public/review/view/<?php e($this->_vars['service']); ?>/<?php e($_row['item_code']); ?>/"><?php _e('View list'); ?>&nbsp;(<?php e($_row['posts']); ?>)</a>&gt;<br>
		&lt;<a href="<?php e(HTTP_ACTION); ?>private/post/rating/0/<?php e(US); ?>service=<?php e($this->_vars['service']); ?>&item_code=<?php e($_row['item_code']); ?>"><?php _e('Rating'); ?></a>&gt;<br>
		&lt;<a href="<?php e(HTTP_ACTION); ?>private/post/blog/0/<?php e(US); ?>service=<?php e($this->_vars['service']); ?>&item_code=<?php e($_row['item_code']); ?>"><?php _e('Write a Review'); ?></a>&gt;</font></div>
<?php endif; ?>
	<hr color="<?php Theme::exec()->borderColor(); ?>" noshade="noshade"></td></tr>
<?php endforeach; ?>
</table>
<?php HTML::mobilePager($this->_vars['pager'], $this->_vars['request']); ?>
<?php endif; ?>

<hr color="<?php Theme::exec()->borderColor(); ?>" noshade="noshade">

<form name="login" method="post" action="<?php e(HTTP_ACTION.'public/review/search/'); ?>"><?php HTML::requires(); ?>
<table border="0" width="<?php Theme::exec()->mainWidth(); ?>">
	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Keyword');?>:<br></td></tr>
	<tr><td><input type="text" name="keyword" value="<?php e($this->_vars['request']['keyword']); ?>"><br></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColumnColor(); ?>"><?php _e('Category');?>:<br></td></tr>
	<tr><td><select name="ref_category"><option value=""><?php _e('- Select One -'); ?></option><?php HTML::options($this->_vars['rev_categories'], $this->_vars['request']['ref_category']); ?></select><br></td></tr>
	<tr><td bgcolor="<?php Theme::exec()->bgColor(); ?>" align="center"><input type="submit" name="search" value="<?php _e('Search');?>"><br></td></tr>
</table>

