ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/netphim/include/functions/ |
<?php function badWords($text,$bad) { //$bad = array('dirty','butt','lips'); for ($i=0; $i < count($bad); $i++) { $position = strpos($text, $bad[$i]); while($position !== false)//if text contains a bad word { /*for($j=$position; $j<$position+strlen($bad[$i]); $j++) $text[$j]='*'; $position = strpos($text, $bad[$i]);*/ return true; } } return false; } function check_bad_word_in_string($string,$arr_bad_word){ //$array = array("name","tom"); if(0 < count(array_intersect(array_map('strtolower', explode(' ', $string)), $arr_bad_word))) { return true; } return false; } function lasted_comment($limit=5){ global $INFO,$DB,$func,$memcache; $key_cache_lasted_comment = md5("SELECT * FROM `tb_comment` WHERE `comment_id` IN ( SELECT max(`comment_id`) as `comment_id` FROM tb_comment WHERE comment_status='active' GROUP BY `phim_id` ORDER BY `time_post` DESC ) ORDER BY `time_post` DESC LIMIT 0,$limit;"); $list_lasted_comment = $memcache->get($key_cache_lasted_comment); if($list_lasted_comment){ $list = $list_lasted_comment; }else { $q_comment = $DB->query("SELECT * FROM `tb_comment` WHERE `comment_id` IN ( SELECT max(`comment_id`) as `comment_id` FROM tb_comment WHERE comment_status='active' GROUP BY `phim_id` ORDER BY `time_post` DESC ) ORDER BY `time_post` DESC LIMIT 0,$limit; "); $list = ''; while ($r_comment = $DB->fetch_row($q_comment)) { if ($r_comment['comment_status'] != 'active') { continue; } $txt_chuong = ''; if ($r_comment['epi'] >= 0) { $txt_chuong = '<a class="cmchapter-link" href="/' . $r_comment['phim_slug'] . ' /' . $r_comment['epi'] . '-' . $r_comment['epi_slug'] . '/"><span class="cmchapter">Táºp ' . $r_comment['epi_slug'] . '</span></a>'; } $date_comment = date('d/m/Y h:i:s A', $r_comment['time_post']); $time_comment = $func->time_ago($r_comment['time_post']); $list .= '<li><h4 class="title-comment"> <a href="/' . $r_comment['phim_slug'] . ' /">' . $r_comment['phim_name'] . '</a> ' . $txt_chuong . ' </h4> <a class="thumb user" title="' . $r_comment['phim_name'] . '" href="/' . $r_comment['phim_slug'] . ' /"><img alt="' . $r_comment['user_id_post_name'] . '" class="lazy center" src="'.$INFO['home_url'] . $r_comment['user_id_img'] . '"></a> <span class="authorname name-5">' . $r_comment['user_id_post_name'] . '</span> <abbr title="' . $date_comment . '"><i class="far fa-clock"></i> ' . $time_comment . '</abbr> <p class="comment-content">' . strip_tags(html_entity_decode($r_comment['comment_content']), '<img></br>') . '</p> </li>'; } $memcache->set($key_cache_lasted_comment, $list, MEMCACHE_COMPRESSED, 1200); } return $list; }