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 of the topic function umhtml_postNum(){ 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 position where you want to call the template to display the updated quantity

 {umhtml_postNum()}


Related Babies (Click me to change a batch)
    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 custom categories is sorted by browsing volume, comments, update time, ID or author

    The list of zblog custom categories is sorted by browsing volume, comments, update time, ID or author

    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 three thousand eight hundred and four
    Post comments

    Thank you for your support