home page Site building tutorial Zblog website establishment text

Zblog gets the number of articles updated in 24 hours

Get the number of updated articles of the day (24 hours) Implementation method 1. Add the following code to the include.php file function umhtml_postNum() of the topic{ global $zbp; $nowtime = time(); $settime = 1*24*60*60; $gettime = $nowtime-$settime; $db = $zbp-...

Get today's (24 hours) updates Number of articles

Implementation method

1. Add the following code to the theme Of include.php file

 function um html _postNum(){ global $zbp; $nowtime = time(); $settime = 1*24*60*60; $gettime = $nowtime-$settime; $db = $zbp->db->sql->get(); $sql = $db-> select ('zbp_post')->where(array(array('=','log_Status','0'), array('>','log_PostTime',$gettime)))->sql; 	 $array = $zbp->GetListType('Post', $sql); echo count($array) }

2. Add the following calling code at the template location where you want to call to display the updated quantity

 {umhtml_postNum()}


Reward
poster

This article is written by Beautiful theme Original or collected and released

Please indicate the address of this article for reprinting: https://www.umtheme.com/zblog/112.html

Related recommendations

 The list of zblog user-defined categories is based on the number of views, comments, update time ID or Author Sort

The list of zblog user-defined categories is based on the number of views, comments, update time ID or Author Sort

ZBLOG provides rich interfaces to facilitate the personalized customization of webmasters, so it is easy to reorder articles. For example, it may be necessary to adjust the default sorting of the system during the development and production process (the latest one is first), so that the list of articles under a certain category on its website is based on the specified (browse volume
Zblog website establishment 2022.10.16 zero two thousand nine hundred and eighty-seven
Post comments

Thank you for your support