Файл: adultscript-2.0.3-pro/files/admin/templates/default/photo_search.tpl.php
Строк: 185
<?php defined('_VALID') or die('Restricted Access!'); ?>
<?php
if (!isset($this->option)):
if (isset($_SESSION['search_photo_option'])):
$this->option = $_SESSION['search_photo_option'];
else:
$this->option = array(
'title' => '', 'username' => '', 'description' => '',
'category' => '', 'status' => '', 'flagged' => '',
'sort' => 'a.album_id', 'order' => 'DESC', 'display' => 10
);
endif;
endif;
if (!isset($this->categories)):
$db = VF::factory('database');
$this->categories = $db->get_rows("SELECT cat_id, name FROM #__photo_categories ORDER BY name ASC");
endif;
?>
<div id="search_advanced" style="display: none;">
<form id="photo-videos-form" method="post" action="<?php echo ADMIN_URL; ?>/index.php?q=photo/manage">
<fieldset>
<legend>Advanced Search</legend>
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="search">
<tr>
<td>
<div class="optional">
<label for="title" class="search">Title</label>
<input name="title" type="text" id="title" class="medium" value="<?php echo e($this->option['title']); ?>" />
</div>
</td>
<td>
<div class="optional">
<label for="description" class="search">Description</label>
<input name="description" type="text" id="description" class="medium" value="<?php echo e($this->option['description']); ?>" />
</div>
</td>
<td>
<div class="optional">
<label for="desc" class="search">Username</label>
<input name="username" type="text" id="username" class="medium" value="<?php echo e($this->option['username']); ?>" />
</div>
</td>
</tr>
<tr>
<td>
<div class="optional">
<label for="category" class="search">Category</label>
<select name="category" id="category">
<option value="">All</option>
<?php foreach ($this->categories as $categ): ?>
<option value="<?php echo $categ['cat_id']; ?>"<?php if ($this->option['category'] == $categ['cat_id']): echo ' selected="selected"'; endif; ?>><?php echo e($categ['name']); ?></option>
<?php endforeach; ?>
</select>
</div>
</td>
<td>
<div class="optional">
<label for="flagged" class="search">Flagged</label>
<select name="flagged" id="flagged">
<option value="">----</option>
<option value="0"<?php if ($this->option['flagged'] == '0'): echo ' selected="selected"'; endif; ?>>No</option>
<option value="1"<?php if ($this->option['flagged'] == '1'): echo ' selected="selected"'; endif; ?>>Yes</option>
</select>
</div>
</td>
<td>
<div class="optional">
<label for="status" class="search">Status</label>
<select name="status" id="status">
<option value="">-------</option>
<option value="1"<?php if ($this->option['status'] == '1'): echo ' selected="selected"'; endif; ?>>Active</option>
<option value="0"<?php if ($this->option['status'] == '0'): echo ' selected="selected"'; endif; ?>>Suspended</option>
<option value="2"<?php if ($this->option['status'] == '2'): echo ' selected="selected"'; endif; ?>>Approve Required</option>
<option value="3"<?php if ($this->option['status'] == '3'): echo ' selected="selected"'; endif; ?>>Processing</option>
</select>
</div>
</td>
</tr>
<tr>
<td>
<div class="optional">
<label for="sort" class="search">Sort</label>
<select name="sort" id="sort">
<option value="a.album_id"<?php if ($this->option['sort'] == 'a.album_id'): echo ' selected="selected"'; endif; ?>>Id</option>
<option value="a.title"<?php if ($this->option['sort'] == 'a.title'): echo ' selected="selected"'; endif; ?>>Title</option>
<option value="a.add_date"<?php if ($this->option['sort'] == 'a.add_date'): echo ' selected="selected"'; endif; ?>>Add Date</option>
<option value="a.total_views"<?php if ($this->option['sort'] == 'a.total_views'): echo ' selected="selected"'; endif; ?>>Total Views</option>
<option value="a.total_photos"<?php if ($this->option['sort'] == 'a.total_photos'): echo ' selected="selected"'; endif; ?>>Total Photos</option>
<option value="a.total_comments"<?php if ($this->option['sort'] == 'a.total_comments'): echo ' selected="selected"'; endif; ?>>Total Comments</option>
<option value="a.rating"<?php if ($this->option['sort'] == 'a.rating'): echo ' selected="selected"'; endif; ?>>Rating</option>
<option value="a.rated_by"<?php if ($this->option['sort'] == 'a.rated_by'): echo ' selected="selected"'; endif; ?>>Ratings</option>
<option value="a.status"<?php if ($this->option['sort'] == 'a.status'): echo ' selected="selected"'; endif; ?>>Status</option>
</select>
</div>
</td>
<td>
<div class="optional">
<label for="order" class="search">Order</label>
<select name="order" id="order">
<option value="ASC"<?php if ($this->option['order'] == 'ASC'): echo ' selected="selected"'; endif; ?>>ASC</option>
<option value="DESC"<?php if ($this->option['order'] == 'DESC'): echo ' selected="selected"'; endif; ?>>DESC</option>
</select>
</div>
</td>
<td>
<div class="optional">
<label for="display" class="search">Display</label>
<select name="display" id="display">
<option value="5"<?php if ($this->option['display'] == '5'): echo ' selected="selected"'; endif; ?>>5</option>
<option value="10"<?php if ($this->option['display'] == '10'): echo ' selected="selected"'; endif; ?>>10</option>
<option value="20"<?php if ($this->option['display'] == '20'): echo ' selected="selected"'; endif; ?>>20</option>
<option value="30"<?php if ($this->option['display'] == '30'): echo ' selected="selected"'; endif; ?>>30</option>
<option value="50"<?php if ($this->option['display'] == '50'): echo ' selected="selected"'; endif; ?>>50</option>
<option value="100"<?php if ($this->option['display'] == '100'): echo ' selected="selected"'; endif; ?>>100</option>
<option value="200"<?php if ($this->option['display'] == '200'): echo ' selected="selected"'; endif; ?>>200</option>
</select>
</div>
</td>
</tr>
<tr>
<td colspan="3">
<div style="text-align: center; margin-top: 3px;">
<input name="submit_search" type="submit" class="button butDef" value=" Search " />
<input name="submit_reset" type="submit" class="button butDef" value=" Reset " />
</div>
</td>
</tr>
</table>
</fieldset>
</form>
</div>