Files
2024-10-29 14:04:59 +08:00

323 lines
16 KiB
PHTML
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
{include file="include/head" /}
<script type="text/javascript">
var navID = "1";
</script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/webth/css/subject/search.css">
</head>
<body>
<!--top-->
<header class="header-PC header-Index">
<div id="header" class="theme-white">
{include file="include/top" /}
{include file="include/top-header" /}
</div>
</header>
{include file="include/top-header-mobile" /}
<!--top End-->
<img src="/uploads/default/ban2.jpg">
<?php if (!empty($category['picture'])): ?>
<!-- 轮播 s -->
<div class="homeban">
<a href="<?php //echo url_rewrite('download', ['id' => $category['id']]); ?>"><img src="<?php echo getImage($category['picture']); ?>"/></a>
<!-- 搜索框 s
<div class="lsea">
<input id="dl-search-in" type="text" value="<?php echo $skeyword; ?>" name="skeyword" placeholder="Search">
<a id="dl-search-btn" href="#"></a>
</div>-->
<!-- 搜索框 e -->
</div>
</div>
<!-- 轮播 e -->
<?php endif; ?>
<!-- 视频列表 s -->
<div class="down">
<div class="load">
<!--<div class="hd">
<ul class="hdone">
<li>驱动下载</li>
<li><a href="__ORICOROOT__<?php echo url('/Download/catelists_down?id=3')?>">说明书下载</a></li>
<li>Orico期刊</li>
<li>其他</li>
</ul>
<a class="prev"><img src="__PUBLIC__/web/images/bfl.png"></a>
<a class="next"><img src="__PUBLIC__/web/images/brh.png"></a>
</div>-->
<!-- title s -->
<div class="S-search-bg nsea">
<div class="swt-Container-1200 S-search-content secon1">
<div class="S-Searchbox">
<div class="Search">
<input type="text" name="textfield" class="ipt" placeholder="" id="search-in">
<button type="submit" name="button" value="" class="searchbtn icon-search" id="search-btn"></button>
<div id="search" class="search_content search_default">
</div>
</div>
<!--<div class="sput">
<input value="dfdff" placeholder="站内搜索" id="search-input" type="text">
<a href="javascript:void(0);" id="search-button"><img src="/frontend/web/images/images/sea1.png"></a>
</div>-->
</div>
</div>
</div>
<div class="Download-title">Software Drivers Download</div>
<!-- title e -->
<div class="swt-Container bd">
<?php if ($list): ?>
<ul class="bdone">
<?php foreach ($list as $detail): ?>
<li>
<div class="loadfl">
<img src="<?php echo getImage($detail['picture']); ?>">
</div>
<div class="loadrh">
<div class="loada"><a href="<?php //echo url_rewrite('downloaddetail', array('id' => $detail['id'])); ?>"><?php echo $detail['name']; ?></a></div>
<?php if ($detail['description']): ?>
<div class="load_destri"><?php echo msubstr($detail['description'], 0, 200); ?></div>
<?php endif; ?>
<div class="loadms1">Supported Models: <?php echo $detail['app_model']; ?></div>
<div class="loadms2">Supported Systems: <?php echo $detail['support_os']; ?></div>
<div class="loadms3">
<?php
$downloadpath = explode(',', $detail['downloadpath']);
$downloadpath64 = explode(',', $detail['downloadpath64']);
foreach ($downloadpath as $k => $dl):
$dlname = empty($downloadpath64[$k]) ? 'Download' : $downloadpath64[$k];
//$url=url('index/download/download', ['id' => $detail['id'], 'bit' => $k]);
?>
<a href="<?php echo url('/') . trim($dl, '/'); ?>" data-cod="dl" data-id="<?php echo $detail['id']; ?>" target="_blank"><?php echo $dlname; ?></a>
<?php endforeach; ?>
</div>
</div>
<div class="clear"></div>
</li>
<?php endforeach; ?>
<!-- 分页 s -->
<div style="margin-top:60px"></div>
<?php
if ($page) {
echo $page;
}
?>
<!-- 分页 e -->
</ul>
<?php endif; ?>
<?php if ($downloadCategory): ?>
<ul class="bdtwo">
<?php foreach ($downloadCategory as $k => $dc): ?>
<li>
<p class="datatitle"><?php echo $dc['name']; ?></p>
<?php
$downloads = getDifferentDownload('ishot', 8, ['cid' => $dc['id']]);
if ($downloads):
?>
<dl>
<?php foreach ($downloads as $download): ?>
<dd>
<div class="datafl">
<img src="<?php echo getImage($download['picture']); ?>">
</div>
<div class="datarh">
<div class="datams1"><?php echo $download['name']; ?></div>
<div class="datams2"><?php echo msubstr($download['description'], 0, 200); ?></div>
<div class="datams3">Format <?php echo $download['format']; ?></div>
<div class="datams4">
<?php
$downloadpath = explode(',', $download['downloadpath']);
$downloadpath64 = explode(',', $download['downloadpath64']);
foreach ($downloadpath as $k => $dl):
$dlname = empty($downloadpath64[$k]) ? 'Download' : $downloadpath64[$k];
?>
<a href="__ORICOROOT__<?php echo url('/') . trim($dl, '/'); ?>" data-cod="dl" data-id="<?php echo $detail['id']; ?>" target="_blank"><?php echo $dlname; ?></a>
<?php endforeach; ?>
</div>
</div>
</dd>
<?php endforeach; ?>
<div class="clear"></div>
</dl>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
<!-- Add Arrows -->
<script>
jQuery(".load .hd").slide({mainCell: "ul", autoPlay: false, effect: "left", vis: 8, scroll: 1, autoPage: false, prevCell: ".prev", nextCell: ".next"});
$(".load").slide({trigger: "click", defaultIndex: 0, });
$(function() {
$("#dl-search-btn").bind("click", function(event) {
var skeyword = $("#dl-search-in").val();
if (skeyword) {
var href = "<?php echo url('/dlsearch'); ?>?skeyword=" + encodeURIComponent(skeyword);
location.href = href;
}
});
$("#dl-search-in").keyup(function(event) {
if (event && event.keyCode == 13) {
$("#dl-search-btn").trigger("click");
}
});
$("[data-cod='dl']").click(function(event) {
var love = $(this), id = love.data("id"), dl = love.data("dl");
dl = typeof (dl) == 'undefined' ? 0 : dl;
if (dl < 10) {
$.ajax({
type: "POST",
dataType: "json",
url: "__ORICOROOT__<?php echo url('download/dlcount'); ?>",
data: {id: id},
cache: false, //不缓存此页面
success: function(data) {
//console.log(data);
love.data("dl", dl + 1);
}
});
} else {
event.preventDefault();
alert('You have downloaded it');
return false;
}
});
});
</script>
</div>
</div>
<!-- 视频列表 e -->
<!-- bottom s -->
{include file="include/bottom" /}
<!-- bottom e -->
</body>
</html>
<script type="text/javascript">
$(function() {
$.ajax({
url: '__ORICOROOT__/download/get_filter',
type: 'post',
dataType: 'json',
data: {},
success: function(res) {
var data = res.data.dl_name;
var html = '<ul>';
// data.forEach((item, index) => {
// html += '<li>';
// html += item.name;
// html += '</li>';
// });
var data_length = data.length;
for(var i=0;i<data_length;i++) {
html += '<li>';
html += data[i].name;
html += '</li>';
}
html += '</ul>';
$('#search').html(html);
},
error: function(res) {
}
})
});
// NEW selector
jQuery.expr[':'].Contains = function(a, i, m) {
return jQuery(a).text().toUpperCase()
.indexOf(m[3].toUpperCase()) >= 0;
};
// OVERWRITES old selecor
jQuery.expr[':'].contains = function(a, i, m) {
return jQuery(a).text().toUpperCase()
.indexOf(m[3].toUpperCase()) >= 0;
};
//Update to work for jQuery 1.8
$.expr[":"].contains = $.expr.createPseudo(function(arg) {
return function( elem ) {
return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
};
});
$(function() {
var search_input = $(".Search input");
var search_content = $(".search_content");
$(search_input).on("keyup", function() {
if (search_input.val().length > 0) {
$(search_content).show().addClass("ul_add");
}
else if (search_input.val().length == 0) {
$(search_content).show().removeClass("ul_add");
}
//$(".search_content li:contains(" + search_input.val().trim() + ")").show();
//$(".search_content li:not(:contains(" + search_input.val().trim() + "))").hide();
$(".search_content li").hide().filter(":contains("+ search_input.val().toLowerCase().trim() +")").show();
});
});
$("#search ul li").live('click',function(){
//console.log(11111);
//获取点击的值
var keywords = $(this).text();
if(keywords) {
$('#search-in').val(keywords);
var href = "__ORICOROOT__<?php echo url('/download'); ?>?skeyword=" + encodeURIComponent(keywords);
location.href = href;
$(".search_content").hide();
}
});
//点击search以外部分隐藏
$("body").click(function (e) {
if (!$(e.target).closest(".Search").length) {
$(".search_content").hide()
}
//console.log(111);
});
</script>
<script type="text/javascript">
/*定位光标*/
document.querySelector('#search-in').focus();
$(function() {
//
$("#search-btn").bind("click", function(event) {
var skeyword = $("#search-in").val();
if (skeyword) {
var href = "__ORICOROOT__<?php echo url('/download'); ?>?skeyword=" + encodeURIComponent(skeyword);
location.href = href;
}
});
$("#search-in").keyup(function(event) {
if (event && event.keyCode === 13) {
$("#search-btn").trigger("click");
}
});
var $category = $(".navlist");
$category.hide();
$(".navul li").mouseleave(function() {
$(this).children("a").addClass("aons");
$(this).children("dl").stop(true, true).slideUp(500);
});
$(".navul li").mouseenter(function() {
$category.hide();
$(this).children("dl").stop(true, true).slideDown(500);
});
//搜索框
$(".Searchbox .icon").click(function() {
$(".Search").slideToggle();
});
});
</script>