ÿØÿà 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/code/ajax/ |
<?php $user_id = intval($ob_user->user_id); $txt_swal = ''; if($user_id==0){ $txt_swal = 'swal.fire(\'\',\'Please login for comment!\'); return false;'; }else{ $row_user = $DB->fetch_row($DB->query("SELECT user_comment_status FROM tb_user WHERE user_id='$user_id' ")); if($row_user['user_comment_status']=='locked'){ $txt_swal = 'swal.fire(\'\',\''.$arr_option['thong_bao_den_locked_comment_user'].'\'); return false;'; } } $fullname = $ob_user->fullname; $email = $ob_user->user_name; $key_cache_emoji_cat = md5('tb_emoji_cat'); $list_emoji_cat = $memcache->get($key_cache_emoji_cat); if($list_emoji_cat) { }else{ $q_emoji_cat = $DB->query("SELECT * FROM tb_emoji_cat ORDER BY emoji_cat_pos "); $txt = ''; while($r_emoji_cat = $DB->fetch_row($q_emoji_cat)){ $list_emoji_cat[] = $r_emoji_cat; $memcache->set($key_cache_emoji_cat, $list_emoji_cat, MEMCACHE_COMPRESSED, 30); } } $txt = ''; if(!empty($list_emoji_cat)) { foreach ($list_emoji_cat as $r_emoji_cat) { $name = $r_emoji_cat['emoji_cat_name']; $fname = $r_emoji_cat['emoji_cat_fname']; $img_bg = $r_emoji_cat['emoji_cat_img']; $arr_button_one[] = "'" . $fname . '_button' . "'"; $arr_button[] = $fname . '_button: ' . $fname . '_button'; $txt .= ' var ' . $fname . '_button = function (context) { var ui = $.summernote.ui; var content = emoji_content.' . $fname . '; var ' . $fname . '_button = ui.buttonGroup([ ui.button({ contents: \'<div style="background: url(' . $img_bg . ') no-repeat;height: 30px;width: 30px;" title="' . $name . '"></div>\', data: { \'bs-toggle\': \'dropdown\' } }), ui.dropdown({ contents: content, callback: function (items) { $(items).find(\'a\').each(function () { $(this).click(function(e) { var url_img = $(this).data(\'url\'); var img_link = \'<img src="\'+url_img+\'" alt="emoji">\'; context.invoke("editor.pasteHTML", img_link); e.preventDefault(); }); }); } }) ]); return ' . $fname . '_button.render(); } '; } } header('Content-Type: application/javascript'); echo 'function openComment(){ '.$txt_swal.' $(\'#input_form_0\').show(); $(\'.placeholder\').hide(); $(\'#comment_form_0\').summernote({ toolbar: [ [\'mybutton\', ['.implode(',',$arr_button_one).']] ], buttons: { '.implode(',',$arr_button).' }, focus: true }); var html_form = \'<div class="comment-info"><input id="comment_name_0" class="comment-name form-control" maxlength="50" type="text" placeholder="Name (Required)" value="'.$fullname.'"><input id="comment_email_0" class="comment-email form-control" maxlength="100" type="text" placeholder="Email" value="'.$email.'" disabled><button type="submit" class="send_comment_button_0 btn btn-info text-white" onclick="sendComment(0);return false;">Send</button></div>\'; $(\'#input_form_0\').html(html_form); } '; echo ' function replyComment(comment_id){ '.$txt_swal.' $(\'#input_form_\'+comment_id).show(); var html_form = \'<div class="comment-info"><input id="comment_name_\'+comment_id+\'" class="comment-name form-control" maxlength="50" type="text" placeholder="Name (Required)" value="'.$fullname.'"><input id="comment_email_\'+comment_id+\'" class="comment-email form-control" maxlength="100" type="text" placeholder="Email" value="'.$email.'" disabled><button type="submit" class="send_comment_button_\'+comment_id+\' btn btn-info text-white" onclick="sendComment(\'+comment_id+\');return false;">Send</button></div>\'; $(\'#comment_form_\'+comment_id).summernote({ toolbar: [ [\'mybutton\', ['.implode(',',$arr_button_one).']] ], buttons: { '.implode(',',$arr_button).' }, focus: true }); $(\'#input_form_\'+comment_id).html(html_form); } '; echo $txt; exit(); ?>