Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of getting browsing History by Imperial CMS

Shulou Source: shulou.com Published: 2022-06-02 04:04:20 11月16日 Update

This article is about how Imperial CMS obtains browsing history. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

How does Imperial CMS get browsing history?

The method steps are as follows:

First, add the following code to e/class/userfun.php:

The code is as follows:

Function user_SetCook ($name,$id,$time=0,$num=10) {/ / cookie name ID timestamp quantity if (! $id) {printerror2 ('nonexistent product record', $_ SERVER ['HTTP_REFERER']);} $prodq=$id.' |'; $projilu=getcvar ($name); if ($projilu) {$prozuhe=$prodq.$projilu;// put newly browsed on the first $pro_arr=explode ('|', $prozuhe); $new_arr=array_merge (array_unique ($pro_arr)) / / remove duplicates and re-index subscript foreach ($new_arr as $key= > $val) {if (($keyquery ("select id,title,titlepic,titleurl from {$dbtbpre} ecms_ {$tbname} where idin ({$jilu_idin}) order by find_in_set (id,' {$jilu_idin}') limit {$num}"); / / sort while ($jilu_r=$empire- > fetch ($sql)) {$titleurl=sys_ReturnBqTitleLink ($jilu_r) in idin; echo'. $jilu_ r [title]. / / here, to modify the style, you need to add your own picture}}

Second, add the following code to the top of the content template:

The code is as follows:

Three: add the following code where it needs to be displayed:

The code is as follows:

Where:

Cookiepro is the name

Shop is the name of the data table

10 is the number of calls

Thank you for reading! This is the end of the way for Imperial CMS to obtain browsing records. I hope the above content can be of some help to you so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Tags: Code browsing method empire content name quantity more good practical subscript product picture place data datasheet article time style template Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Xiaomi Microsoft Huawei Shulou Information