Browse Source

友情链接标签功能优化

tags/6.2.10
tianya 10 months ago
parent
commit
c34596fda3
2 changed files with 12 additions and 2 deletions
  1. +1
    -0
      src/index.php
  2. +11
    -2
      src/system/taglib/flink.lib.php

+ 1
- 0
src/index.php View File

@@ -8,6 +8,7 @@
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/
define("DEDEINDEX", true);
if (!file_exists(dirname(__FILE__).'/data/common.inc.php')) {
header('Location:install/index.php');
exit();


+ 11
- 2
src/system/taglib/flink.lib.php View File

@@ -13,7 +13,7 @@ helper('cache');
function lib_flink(&$ctag, &$refObj)
{
global $dsql, $cfg_soft_lang;
$attlist = "type|textall,row|30,titlelen|30,linktype|1,typeid|0";
$attlist = "type|textall,row|30,titlelen|30,linktype|,typeid|0";
FillAttsDefault($ctag->CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$totalrow = $row;
@@ -21,7 +21,16 @@ function lib_flink(&$ctag, &$refObj)
if (isset($GLOBALS['envs']['flinkid'])) {
$typeid = $GLOBALS['envs']['flinkid'];
}
$wsql = " where ischeck >= '$linktype' ";
if (!empty($linktype)) {
$wsql = " where ischeck = '$linktype' ";
} else {
if (defined('DEDEINDEX')) {
$wsql = " where ischeck = 2 ";
} else {
$wsql = " where ischeck = 1 ";
}
}
if ($typeid == 0) {
$wsql .= '';
} else {


Loading…
Cancel
Save