- <!--历史浏览记录 S-->
- <div class="column_box mt_10">
- <div class="column_title">历史浏览记录</div>
- <div class="box_body_new">
- <?php
- $MOD_name = "$MOD[moduledir]";
- if (!empty($_cookie["$MOD_name"]['history'])){
- $history = explode(',', $_cookie["$MOD_name"]['history']);
- array_unshift($history, $itemid);
- $history = array_unique($history);
- while (count($history) > 8){
- array_pop($history);
- }setcookie("$MOD_name".'[history]', implode(',', $history), time() + 86400 * 7,'/'."$MOD_name","$DT_PATH");
- } else {
- setcookie("$MOD_name".'[history]', $itemid, time() + 86400 * 7,'/'."$MOD_name","$DT_PATH");
- } $history =isset ($_cookie["$MOD_name"]['history']) ? $_cookie["$MOD_name"]['history'] : 0;
- if($del=="del"){
- setcookie("$MOD_name".'[history]', "", time()-3600);
- echo header("Location: $linkurl");
- };
- $query = mysql_query("SELECt * FROM $table WHERe itemid in ($history) ORDER BY FIELD(itemid,$history)");
- while($t = mysql_fetch_array($query)){?>
- <li><a href="{$t[linkurl]}" title="{$t[alt]}" target="_blank">{$t[title]}</a></li>
- <?php } ?>
- </div>
- </div>
- <!--历史浏览记录 END-->