|
|
@@ -14,9 +14,10 @@ require_once(DEDEINC.'/datalistcp.class.php'); |
|
|
|
$timestamp = time(); |
|
|
|
if (empty($tag)) $tag = ''; |
|
|
|
if (empty($action)) { |
|
|
|
$tag = HtmlReplace($tag, -1); |
|
|
|
$orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z]#i", '', $orderby); |
|
|
|
$orderway = isset($orderway) && $orderway == 'asc' ? 'asc' : 'desc'; |
|
|
|
if (!empty($tag)) $where = " WHERE tag like '%$tag%'"; |
|
|
|
if (!empty($tag)) $where = " WHERE tag like '%$tag%' OR id = '$tag'"; |
|
|
|
else $where = ''; |
|
|
|
$neworderway = ($orderway == 'desc' ? 'asc' : 'desc'); |
|
|
|
$query = "SELECT T.*,TI.* FROM `#@__tagindex` T LEFT JOIN `#@__tagindex_infos` TI ON TI.tagid=T.id $where ORDER BY $orderby $orderway"; |
|
|
|