} $type = $config['show_private_videos'] == '1' ? '' : " AND type = 'public'"; $sql = "SELECT COUNT(VID) AS total_videos FROM video WHERE channel = '" . $video['channel'] . "' AND VID != " . $vid . "\n\t\t\t\t\t AND active = '1'" . $type . "\n AND ( title LIKE '%" . mysql_real_escape_string($video['title']) . "%' " . $sql_add . ")"; $rs = $conn->execute($sql); $total = $rs->fields['total_videos']; if ($total > 80) { $total = 80; } $total = $total > 80 ? 80 : $total; $pagination = new Pagination(8, $page); $limit = $pagination->getLimit($total); $sql = "SELECT VID, title, duration, addtime, rate, likes, dislikes, viewnumber, type, thumb, thumbs, hd\n\t FROM video \n WHERE channel = '" . intval($video['channel']) . "' AND VID != " . $vid . "\n\t\t\t\t\t AND active = '1'" . $type . "\n AND ( title LIKE '%" . mysql_real_escape_string($video['title']) . "%' " . $sql_add . ")\n ORDER BY addtime DESC LIMIT " . $limit; $rs = $conn->execute($sql); $videos = $rs->getrows(); $code = array(); $total_pages = $pagination->getTotalPages(); $page = $page >= $total_pages ? $total_pages : $page; $code[] = '<div class="row">'; foreach ($videos as $video) { if ($video['type'] == 'private') { $img_class = 'class="img-responsive img-private"'; } else { $img_class = 'class="img-responsive"'; } $code[] = '<div class="col-sm-6 col-md-3 col-lg-3">'; $code[] = '<div class="well well-sm m-b-0 m-t-20">'; $code[] = '<a href="' . $config['BASE_URL'] . '/video/' . $video['VID'] . '/' . prepare_string($video['title']) . '">'; $code[] = '<div class="thumb-overlay">'; $code[] = '<img src="' . get_thumb_url($video['VID']) . '/' . $video['thumb'] . '.jpg" title="' . htmlspecialchars($video['title'], ENT_QUOTES, 'UTF-8') . '" alt="' . htmlspecialchars($video['title'], ENT_QUOTES, 'UTF-8') . '" id="rotate_' . $video['VID'] . '_' . $video['thumbs'] . '_' . $video['thumb'] . '" ' . $img_class . ' />'; if ($video['type'] == 'private') { $code[] = '<div class="label-private">' . $lang['global.PRIVATE'] . '</div>';
<option value="trash"><?php _e('Remove', 'wp-sms'); ?> </option> </select> <input value="<?php _e('Apply', 'wp-sms'); ?> " name="doaction" id="doaction" class="button-secondary action" type="submit"/> </div> <br class="clear"> </div> </form> <?php if ($get_result) { ?> <div class="pagination-log"> <?php echo $Pagination->display(); ?> <p id="result-log"> <?php echo ' ' . __('Page', 'wp-sms') . ' ' . $Pagination->getCurrentPage() . ' ' . __('From', 'wp-sms') . ' ' . $Pagination->getTotalPages(); ?> </p> </div> <?php } ?> </div>