99 *
1010 * 此项目 GitHub 地址:https://github.com/yuantuo666/baiduwp-php
1111 *
12- * @version 2.1.7
12+ * @version 2.1.8
1313 *
1414 * @author Yuan_Tuo <yuantuo666@gmail.com>
1515 * @link https://imwcr.cn/
1616 * @link https://space.bilibili.com/88197958
1717 *
1818 */
19- $ programVersion_Index = "2.1.7 " ;
19+ $ programVersion_Index = "2.1.8 " ;
2020session_start ();
2121define ('init ' , true );
2222if (version_compare (PHP_VERSION , '7.0.0 ' , '< ' )) {
@@ -324,7 +324,7 @@ function getip()
324324 connectdb ();
325325
326326 // 查询数据库中是否存在已经保存的数据
327- $ sql = "SELECT * FROM ` " . $ dbtable . "_ip` WHERE `ip`= ' $ ip'; " ;
327+ $ sql = "SELECT * FROM ` " . $ dbtable . "_ip` WHERE `ip` LIKE ' $ ip'; " ;
328328 $ mysql_query = mysqli_query ($ conn , $ sql );
329329 if ($ result = mysqli_fetch_assoc ($ mysql_query )) {
330330 // 存在 判断类型
@@ -473,8 +473,8 @@ function getip()
473473 // 记录下使用者ip,下次进入时提示
474474 if (USING_DB and !$ usingcache ) {
475475 $ ptime = date ("Y-m-d H:i:s " );
476- $ Sqlfilename = htmlspecialchars ($ filename ); // 防止出现一些刁钻的文件名无法处理
477- $ Sqlpath = htmlspecialchars ($ path );
476+ $ Sqlfilename = htmlspecialchars ($ filename, ENT_QUOTES ); // 防止出现一些刁钻的文件名无法处理
477+ $ Sqlpath = htmlspecialchars ($ path, ENT_QUOTES );
478478 $ sql = "INSERT INTO ` $ dbtable`(`userip`, `filename`, `size`, `md5`, `path`, `server_ctime`, `realLink` , `ptime`,`paccount`) VALUES (' $ ip',' $ Sqlfilename',' $ size',' $ md5',' $ Sqlpath',' $ server_ctime',' $ realLink',' $ ptime',' $ id') " ;
479479 $ mysql_query = mysqli_query ($ conn , $ sql );
480480 if ($ mysql_query == false ) {
@@ -496,7 +496,7 @@ function getip()
496496 if (USING_DB ) {
497497 if ($ usingcache ) echo "<p class= \"card-text \">下载链接从数据库中提取,不消耗免费次数。</p> " ;
498498 elseif ($ smallfile ) echo "<p class= \"card-text \"><span style= \"color:red; \">此文件很小,不消耗解析次数。</span></p> " ;
499- else echo "<p class= \"card-text \">服务器将保存下载地址8小时 ,时限内再次解析不消耗免费次数。</p> " ;
499+ else echo "<p class= \"card-text \">服务器将保存下载地址 " . DownloadLinkAvailableTime . " 小时 ,时限内再次解析不消耗免费次数。</p> " ;
500500 }
501501 echo FileInfo ($ filename , $ size , $ md5 , $ server_ctime );
502502
@@ -520,13 +520,9 @@ function getip()
520520 if (strstr ('https:// ' . $ realLink , "//qdall " )) echo '<h5 class="text-danger">当前SVIP账号已被限速,请联系站长更换账号。</h5> ' ;
521521 echo '
522522 <p class="card-text">
523- <a id="http" href="http:// ' . $ realLink . '" style="display: none;"> ' . Language["DownloadLink " ] . '(不安全)</a> ' ;
524- if ($ smallfile ) {
525- echo '<a id="https" href="https:// ' . $ realLink . '" target="_blank" rel="nofollow noopener noreferrer"> ' . Language["DownloadLink " ] . '(无需设置UA,8小时有效)</a> ' ;
526- } else {
527- echo '<a id="https" href="https:// ' . $ realLink . '" target="_blank" rel="nofollow noopener noreferrer"> ' . Language["DownloadLink " ] . '(需设置UA,8小时有效)</a> ' ;
528- }
529- echo '</p> ' ;
523+ <a id="http" href="http:// ' . $ realLink . '" style="display: none;"> ' . Language["DownloadLink " ] . '(不安全)</a> ' .
524+ '<a id="https" href="https:// ' . $ realLink . '" target="_blank" rel="nofollow noopener noreferrer"> ' . Language["DownloadLink " ] .
525+ '( ' . ($ smallfile ? '无需 ' : '需要 ' ) . '设置 UA, ' . DownloadLinkAvailableTime . '小时内有效)</a></p> ' ;
530526 ?>
531527 <p class="card-text">
532528 <a href="javascript:void(0)" data-toggle="modal" data-target="#SendToAria2"><?php echo Language["SendToAria2 " ]; ?> (Motrix)</a>
0 commit comments