1 Star 0 Fork 1

缘维 / you2php

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
search.php 2.39 KB
一键复制 编辑 原始数据 按行查看 历史
Gaerisson 提交于 2018-11-08 22:34 . Added Translation System
<?php
require_once "lang.conf.php";
if(!is_array($_GET)&&count($_GET)<=0){
exit();
}
include("./lib.php");
$headtitle=$_GET["q"].'-'.SITE_NAME;;
include("./header.php");
$order=isset($_GET['order'])?$_GET['order']:'relevance';
$order1=$order;
$q=urlencode($_GET["q"]);
$type=isset($_GET['type'])?$_GET['type']:'video';
if($type=='channel'){
$order1='channel';
}
?>
<div class="container">
<div class="py-2">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12 col-lg-12">
<span class="txt2 pt-1 pb-1" style="text-align: center;display:block;"><?php echo $lang['SEARCH_SFOR']?><?php echo $_GET["q"] ?></span>
<div class="row"> <div class="col-md-12 selectalign"> <?php echo $lang['SEARCH_SOPT']?> <select class="custom-select" id="paixu">
<?php
switch ($order1){
case 'relevance':
$relevance='selected';
break;
case 'date':
$date1='selected';
break;
case 'viewCount';
$viewCount='selected';
case 'channel';
$channel='selected';
break;
}
echo '<option '.$relevance.' data-url="./ajax/ajax.php?q='.$q.'&type=video&order=relevance&ptk='.$_GET['pageToken'].'">'.$lang['SEARCH_OPT1'].'</option>';
echo '<option '.$date1.' data-url="./ajax/ajax.php?q='.$q.'&type=video&order=date&ptk='.$_GET['pageToken'].'">'.$lang['SEARCH_OPT2'].'</option>';
echo '<option '.$viewCount.' data-url="./ajax/ajax.php?q='.$q.'&type=video&order=viewCount&ptk='.$_GET['pageToken'].'">'.$lang['SEARCH_OPT3'].'</option>';
echo '<option '.$channel.' data-url="./ajax/ajax.php?q='.$q.'&type=channel&order=relevance&ptk='.$_GET['pageToken'].'">'.$lang['SEARCH_OPT4'].'</option>';
?>
</select></div></div>
<div id="videocontent" class="pt-2 videocontentrow"></div>
</div>
<script>
$("#videocontent").load('<?php echo './ajax/ajax.php?q='.$q.'&type='.$type.'&order='.$order.'&ptk='.$_GET['pageToken']?>');
$('#paixu').on('change', function() {
loadPage($(this).find(':selected').data('url'));
});
function loadPage(url) {
$("#videocontent").load(url);
}
</script>
</div>
</div> </div>
<?php
include("./footer.php");
?>
PHP
1
https://gitee.com/xiugan/you2php.git
git@gitee.com:xiugan/you2php.git
xiugan
you2php
you2php
master

搜索帮助