Get the App
SLTechnology News&Howtos  ›  Servers  › 

Steps for Imperial CMS to obtain product or article browsing records

Shulou Source: shulou.com Published: 2022-06-02 01:41:18 10月04日 Update

What are the procedures for Imperial CMS to obtain product or article browsing records? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

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

I hope what is described in this article will be helpful to the construction of your empire CMS station.

Thank you for reading! After reading the above, do you have a general understanding of the steps for Imperial CMS to obtain product or article browsing records? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

Tags: Code content article product step empire browse name quantity question help subscript picture place build site data datasheet method time more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia macOS vpn Xiaomi MySQL