function get_gallery_entry() { if (User::is_login()) { global $display; if ((User::have_permit(ADMIN_ITEM) || User::is_mod()) && (int) Url::get('user_id', 0) && (int) Url::get('user_id', 0) != User::id()) { $user_id = (int) Url::get('user_id', 0); $display->add('user_id', $user_id); } else { $user_id = User::id(); } $search_value = ' user_id=' . $user_id . ' AND root_id=0 '; //search theo ngay thang nam //$year=(int)Url::get('year',date('Y')); $year = (int) Url::get('year', -1); //$mon= (int)Url::get('month',(int)date('m')); $mon = (int) Url::get('month', -1); $day = (int) Url::get('day', -1); if ($year == 0) { $year = -1; } if ($mon == 0) { $mon = -1; } if ($day == 0) { $day = -1; } $created_time_from = 0; $created_time_to = 0; if ($year != -1) { if ($mon != -1) { if ($day != -1) { $created_time_from = mktime(0, 0, 0, $mon, $day, $year); $created_time_to = mktime(23, 59, 59, $mon, $day, $year); } else { $max_day = 31; if (in_array($mon, array(4, 6, 9, 11))) { $max_day = 30; } elseif ($mon == 2) { $year % 4 ? $max_day = 28 : ($max_day = 29); } $created_time_from = mktime(0, 0, 0, $mon, 1, $year); $created_time_to = mktime(23, 59, 59, $mon, $max_day, $year); } } else { $created_time_from = mktime(0, 0, 0, 1, 1, $year); $created_time_to = mktime(23, 59, 59, 12, 31, $year); } } $y_arr = array(-1 => '-Lọc theo Năm-'); for ($i = 2008; $i <= date('Y'); $i++) { $y_arr[$i] = "---Năm {$i}-"; } $m_arr = array(-1 => '-Lọc theo Tháng-'); for ($i = 1; $i <= 12; $i++) { $m_arr[$i] = "---Tháng {$i}-"; } $d_arr = array(0 => '-Lọc theo Ngày-'); for ($i = 1; $i <= 31; $i++) { $d_arr[$i] = "---Ngày {$i}-"; } $display->add('option_year', AZLib::getOption($y_arr, $year)); $display->add('option_month', AZLib::getOption($m_arr, $mon)); $display->add('option_day', AZLib::getOption($d_arr, $day)); if ($created_time_from) { $search_value .= ' AND time >= ' . $created_time_from; } if ($created_time_to) { $search_value .= ' AND time <= ' . $created_time_to; } $keywords = AZLib::trimSpace(AZLib::getParam('keywords')); $display->add('keywords', $keywords); if ($keywords) { $search_value .= ' AND des LIKE "%' . $keywords . '%" '; } $item_per_page = 20; $sql_count = 'SELECT count(*) AS total_img FROM item_image WHERE ' . $search_value; $total = DB::fetch($sql_count, 'total_img', 0); $paging = ''; $items = array(); $gallery_url = WEB_DIR . 'ajax.php' . Url::build_all(array('page_no')); if ($total) { $limit = ''; $paging = AjaxGalleryPaging($limit, $total, $item_per_page, 5, $gallery_url, 'gallery_content'); $sql = 'SELECT id, des, item_id, title, img_server, img_url, time FROM `item_image` WHERE ' . $search_value . ' ORDER BY id DESC ' . $limit; $re = DB::query($sql); if ($re) { while ($row = mysql_fetch_assoc($re)) { $row['image_url'] = $row['img_url']; $row['img_url'] = AZLib::getImageThumb($row['img_url'], 100, 100, 0, $row['img_server']); $items[$row['id']] = $row; } } } $display->add('items', $items); $display->add('total', $total); $display->add('paging', $paging); $display->output('gallery_ajax_entry', false, 'Personal'); System::halt(); } else { echo "Bạn chưa đăng nhập hoặc đã thoát khỏi hệ thống - Hãy đăng nhập lại!"; } }
function get_more_comment() { $parent_id = EClassApi::getParam('comment_id'); $item_user_name = EClassApi::getParam('item_user_name'); $item_id = EClassApi::getParam('item_id'); $cat_id = EClassApi::getParam('cat_id'); $guest_email = EClassApi::getParam('guest_email'); $guest_name = EClassApi::getParam('guest_name'); //$cur_id = EClassApi::getParam('cur_id',0); $cur_id = User::id(); $item_user_id = EClassApi::getParam('user_id'); $show_guest_email = User::have_cat_permit($cat_id) || User::id() == $item_user_id; $sql = 'SELECT `comment`.`id`, `time`, `content`, `item_id`, `sender_email`, `sender_user_name`, account.img_server, `receiver_user_name`,`sender_user_id`, `receiver_user_id`, `parent_id`, `have_child`, account.avatar_url, account.id as user_id, account.gids, account.block_time FROM `comment` LEFT JOIN `account` ON account.id=comment.sender_user_id WHERE `comment`.`parent_id` =' . $parent_id . ' AND `comment`.`display`=0 ORDER BY time DESC LIMIT 0,100'; $re = DB::query($sql); $i = 0; $result = ''; $str_user_id = ''; while ($item = mysql_fetch_assoc($re)) { $item['index'] = $i; $i++; if ($item['block_time'] > TIME_NOW) { $item['is_block'] = 1; } else { $item['is_block'] = 0; } $str_user_id .= ($str_user_id != '' ? ',' : '') . $item['sender_user_id']; //set quyen quan tri if ($item['gids']) { $is_admin_mod = CGlobal::$group[User::check_admin($item['gids'])]; } else { $is_admin_mod = array(); } $item['is_admin_mod'] = $is_admin_mod; if (TIME_NOW - $item['time'] < 24 * 3600) { $time_left = TIME_NOW - $item['time']; $hour = floor($time_left / 3600); $day = ''; $minute = floor($time_left % 3600 / 60) . ' phút'; $time_left = ($hour ? $hour . ' giờ ' : '') . $minute; if ($time_left == 0) { $time_left = 'Vài giây'; } $item['created_time'] = $time_left . ' trước'; } elseif (date('Y') != date('Y', $item['time'])) { $item['created_time'] = date('H:i | d.m.Y', $item['time']); } else { $item['created_time'] = date('H:i | d.m', $item['time']); } $item['content'] = EClassApi::parseBBCode($item['content']); if ($item['sender_user_id']) { $item['sender_link'] = Url::build('shop', array('user_name' => $item['sender_user_name'])); } else { $item['sender_link'] = ''; } $item['URL_badcontent'] = Url::build('item_detail', array('id' => Url::get('id'), 'ctype' => 'comment', 'id_comment' => $item['id'])); $result .= '<tr id="' . $item['id'] . '"'; $result .= ' onmouseover="show_hide_menu(' . $item['id'] . ')" onmouseout="show_hide_menu(' . $item['id'] . ')" '; $result .= '><td width="28" align="right" valign="top"><div style="height:5px"><span></span></div>'; if ($item['sender_user_id'] == 0) { /* if($item['id']%3 == 0){ $item['sender_avatar_url'] = 'style/avatar/1.png';//'style/images/eb_small.gif'; } elseif($item['id']%3 == 1){ $item['sender_avatar_url'] = 'style/avatar/2.png'; } else{ $item['sender_avatar_url'] = 'style/avatar/3.png'; }*/ $item['sender_avatar_url'] = WEB_DIR . '_cache/eb_avatar/' . md5($item['sender_user_name']) . '.gif'; $html_content = ''; $result .= '<div class="feedbackAvatarSub" id="avatar_content_' . $item['user_id'] . '"><img src="' . $item['sender_avatar_url'] . '" width="40" height="40" /></div>'; } else { if ($item['avatar_url']) { $item['sender_avatar_url'] = EClassApi::getImageThumb($item['avatar_url'], 60, 0, 1, $item['img_server']); if ($item['parent_id'] > 0) { $html_content = '<a href="' . $item['sender_link'] . '"><img src="' . $item['sender_avatar_url'] . '" width="40"/></a>'; } else { $html_content = '<a href="' . $item['sender_link'] . '"><img src="' . $item['sender_avatar_url'] . '" width="40"/></a>'; } } else { $item['sender_avatar_url'] = WEB_DIR . '_cache/eb_avatar/' . md5($item['sender_user_name']) . '.gif'; /*if ($item['parent_id'] > 0){ $html_content = '<a href="'.$item['sender_link'].'"><img src="style/avatar/2.png" width="40" height="40" /></a>'; }else{ $html_content = '<a href="'.$item['sender_link'].'"><img src="style/avatar/1.png" width="40" height="40" /></a>'; }*/ } $result .= '<div class="profile_load" id="c' . $item['id'] . '" lang="' . $item['user_id'] . '"><div class="feedbackAvatarSub" '; $result .= ' id="avatar_content_' . $item['user_id'] . '"><div class="bubbleInfo" id="info_' . $item['id'] . '" lang="' . $item['user_id'] . '"><div class="commentAva trigger">' . $html_content . '</div><!-- BEGIN POPUP MENU --><div class="popup" style="text-align: left;"><div id="show_mini_profile_c' . $item['id'] . '" style="display:none;"></div><div id="hide_mini_profile_c' . $item['id'] . '"><div class="contentPop" style="background-color:#fff"><div style="margin:4px;"><div class="blastTopLeft"><div class="blastTopRight"><div class="blastTopbg"><span></span></div></div></div><div class="blast"><img src="style/images/ajax-loader4.gif" width="62" height="13" /></div><div class="blastBottomLeft"><div class="blastBottomRight"><div class="blastBottombg"><span></span></div></div></div></div></div></div></div><!--END POPUP MENU --></div></div></div>'; } $result .= '</td><td valign="top"><div class="contentFeedback" align="left"><div '; if (isset($item['is_admin_mod']['id']) && ($item['is_admin_mod']['id'] == 9 || $item['is_admin_mod']['id'] == 1)) { $result .= ' class="topFeedback_admin" '; } elseif (isset($item['is_admin_mod']['id']) && ($item['is_admin_mod']['id'] == 2 || $item['is_admin_mod']['id'] == 3)) { $result .= ' class="topFeedback_mod" '; } elseif ($item['sender_user_name'] == $item_user_name) { $result .= ' class="topFeedbackSelf" '; } else { $result .= ' class="topFeedback"'; } $result .= ' >'; if ($item['sender_user_id'] == 0) { $result .= ' <span class="guest_name">' . $item['sender_user_name']; /*$result .= ($show_guest_email)?'<a href="mailto:'.$item['sender_email'].'" title="Gửi e-mail cho người dùng này!"><img src="style/images/comment_email/email.gif" border="0" width="15" height="11"/></a>':'';*/ $result .= $show_guest_email ? '' : ''; $result .= '</span>'; } else { $result .= ' <a '; $result .= $item['is_block'] == 1 ? ' title="Đang bị khóa nick" ' : ' '; $result .= $item['is_admin_mod'] ? ' title="' . $item['is_admin_mod']['des'] . '" ' : ' '; $result .= ' href="' . WEB_DIR . $item['sender_user_name'] . '">'; $result .= $item['is_block'] == 1 ? ' <s><i> ' : ' '; $result .= $item['sender_user_name']; $result .= $item['is_block'] == 1 ? ' </i></s> ' : ' '; $result .= '</a>'; } $result .= ' <span class="fb_time">' . $item['created_time'] . '</span> '; $result .= '<div class="floatRight" style="margin-top:-12px; height:16px"><div id="show_menu_' . $item['id'] . '" style="display:none">'; if ($item['user_id'] != $cur_id && $item['sender_user_id'] != 0) { $result .= ' <span class="send_pm_fb" onclick="fn_send_pm_fb(' . $item['user_id'] . ',\'' . $item['sender_user_name'] . '\');" id="' . $item['user_id'] . '-' . $item['sender_user_name'] . '" style="margin-left:5px"><a href="javascript: void(0)">gửi tin nhắn </a></span>|<span class="send_fb"><a href="' . WEB_DIR . ECRewrite::formatUrl('?page=shop&user_name=' . $item['sender_user_name'] . '&mode=comment') . '">viết lưu bút</a></span> '; if ($item && $item['sender_user_id'] == 0 && $cur_id == $item['receiver_user_id'] || User::have_permit(ADMIN_ITEM)) { $result .= ' | '; } } if ($item && $item['sender_user_id'] == 0 && $cur_id == $item['receiver_user_id'] || User::have_permit(ADMIN_ITEM)) { $result .= '<span onclick="fn_click_del_comment_aj(' . $item['id'] . ',' . $item_id . ')" id="' . $item['id'] . '|' . $item_id . '"><a href="javascript:void()"><img src="style/images/icon_delete.gif" width="9" height="9" /></a></span>'; } $result .= '</div></div><div style="clear:both"><span></span></div>'; $result .= ' </div> <div align="center" id="mess_success_' . $item['id'] . '" style="display:none" class="mess_success"></div> <div class="detailFeedback" align="left" style="width:92%; overflow:hidden">' . $item['content'] . '</div> '; if ($item['user_id'] != $cur_id) { $result .= '<div id="reply_' . $item['id'] . '" ><div class="btn_fast_reply" onmouseout="if(this.className==\'btn_fast_reply_hover\')this.className=\'btn_fast_reply\'" onmouseover="if(this.className==\'btn_fast_reply\')this.className=\'btn_fast_reply_hover\'" style="float:right" onclick="show_box_reply(' . $item['id'] . ',' . $item['parent_id'] . ',\'' . $guest_name . '\',\'' . $guest_email . '\',\'' . $item['sender_user_name'] . '\',' . $item['sender_user_id'] . '); return true;">trả lời</div></div>'; $result .= ' <div style="clear:right" id="box_reply_' . $item['id'] . '"></div>'; } $result .= '</div></td></tr><tr id="space_' . $item['id'] . '"><td height="1" colspan="2"><div style="height:1px; margin:5px 0; background-color:#fff"><span></span></div></td></tr>'; $result .= '</tr>'; } echo $result; System::halt(); }
function show_log_sms() { $item_id = (int) Url::get('item_id', 0); $page_log = (int) Url::get('page', 1); $rowsPerPage = 10; if ($page_log <= 0) { $page_log = 1; } if ($item_id > 0 && User::is_login()) { $log_ups = array(); $item = Item::get_item($item_id); if ($item) { if (User::have_permit(ADMIN_ITEM) || User::id() == $item['user_id']) { global $display; $limit = ($page_log - 1) * $rowsPerPage . "," . ($rowsPerPage + 1); $re = DB::query("SELECT * FROM sms_item_up_auto WHERE item_id={$item_id} ORDER BY id DESC LIMIT {$limit}"); if ($re) { $stt = 1; while ($log_up = mysql_fetch_assoc($re)) { if ($stt <= $rowsPerPage) { $log_up['stt'] = $rowsPerPage * ($page_log - 1) + $stt++; $log_up['time'] = date('d.m.Y H\\hi:s', $log_up['time']); if ($log_up['up_number'] == 0) { $log_up['up_number'] = $log_up['up_total']; } if ($log_up['status'] == -1) { // Nhan tin sai cu phap $log_up['up_number'] = 0; $log_up['note'] = "Sai cú pháp"; } else { $log_up['note'] = " "; } $log_ups[] = $log_up; } else { $display->add('log_more', 1); } } } $s_up_number = 0; $s_up_total = 0; $s_up_count = 0; $re = DB::query("SELECT up_total, up_number, up_count, status, note FROM sms_item_up_auto WHERE item_id={$item_id}"); while ($item = mysql_fetch_assoc($re)) { if ($item['up_number'] == 0) { $item['up_number'] = $item['up_total']; } if ($item['status'] == -1) { $item['up_number'] = 0; $item['up_total'] = 0; } $s_up_number += $item['up_number']; $s_up_total += $item['up_total']; $s_up_count += $item['up_count']; } if ($s_up_total < 0) { $s_up_total = 0; } $display->add('s_up_number', $s_up_number); $display->add('s_up_total', $s_up_total); $display->add('s_up_count', $s_up_count); if ($page_log > 1) { $display->add('show_log_more', 1); } if ($log_ups) { $display->add('item_id', $item_id); $display->add('log_ups', $log_ups); $display->output('LogECS', false, 'ItemDetail'); System::halt(); } } } } echo 'no_log'; exit; }
function build_user_rss() { $user_id = (int) EClassApi::getParam('user_id'); $user = User::getUser($user_id); if ($user) { $subDir = 'rss1/' . floor($user_id / 1000); //echo $user_id = $user['id']; $user['full_name'] != '' ? $user_name = trim(XMLLib::_xml_encode_attribute($user['full_name'])) : ($user_name = trim(XMLLib::_xml_encode_attribute($user['user_name']))); $cachefile = 'rss1_user_' . $user_id; header("content-type: text/xml"); if (StaticCache::notExistCache($cachefile, 3600, false, $subDir)) { StaticCache::startCache(); $user_name = "Tin đăng của " . $user_name; $rss = $this->build_rss_cat(0, $user_name, 100, $user_id); echo $rss; StaticCache::endCache(); } } else { REWRITE_ON ? header("Location:" . WEB_ROOT . "rss/") : header("Location:" . WEB_ROOT . "?page=rss"); } System::halt(); }
<?php //TuấnNK add (20080617_10h): //Các xử lý cho ajax: //echo basename($_SERVER['PHP_SELF']); require_once 'core/Debug.php'; //System Debug... require_once 'core/config.php'; //System Config... require_once 'core/Init.php'; //System Init... //System process & output for ajax request $choice = array("index" => "index", "user" => "ajax_user", "item" => "ajax_item", "comment" => "ajax_comment", "misc" => "ajax_misc", "personal" => "ajax_personal", "admin" => "ajax_admin", "manage" => "ajax_manage", "upload" => "ajax_upload", "shop_giaodich" => "ajax_shop_giaodich", "shop" => "ajax_shop", "ad" => "ajax_ad", "payment" => "ajax_payment"); $action = AZLib::getParam('act'); if ($action == "" || $choice[$action] == "") { $choice[$action] = "index"; } require_once ROOT_PATH . "includes/ajax_action/" . $choice[$action] . ".ajax.php"; $run_me = new $choice[$action](); $run_me->playme(); //End process & ouput //Stop System System::halt();
function transaction() { // viet luu but header("Content-type: application/xml"); if (!User::is_login()) { echo "<comments><content>no_login</content></comments>"; exit; } else { if (User::is_block()) { echo "<comments><content>no_perm</content></comments>"; exit; } if (AZLib::isBlackList(User::$current->data['id'], AZLib::getParam('user_id'))) { echo "<comments><content>blacklist</content></comments>"; exit; } if (AZLib::checkBadWord(AZLib::getParam('content'))) { echo "<comments><content>bad_word</content></comments>"; exit; } $user_id = AZLib::getParam('user_id'); if (!($user = User::getUser($user_id))) { echo "<comments><content>no_perm</content></comments>"; exit; } $content = preg_replace("/\n/", "<br />", Url::get('content')); $content = str_replace('<br /><br />', ' ', $content); $comment_content = $content; $id = DB::insert('comment_user', array('content' => $comment_content, 'time' => TIME_NOW, 'post_ip' => AZLib::ip(), 'sender_user_id' => User::id(), 'sender_user_name' => User::user_name(), 'receiver_user_id' => $user['id'], 'receiver_user_name' => $user['user_name'], 'is_read' => 0)); if ($id) { DB::query('UPDATE user set total_comment_user=total_comment_user+1 WHERE id=' . $user['id']); // so luu but User::getUser($user['id'], 0, 1); if ($user['email'] && $user['email_alert'] && $user['id'] != User::id()) { //Add to cron job: $link = WEB_ROOT . AZRewrite::formatUrl('?page=shop&user_name=' . $user['user_name'] . '&mode=comment'); AZLib::addCronJob('user_comment', AZLib::parseBBCode($comment_content, true), $user['id'], User::user_name(), '', 0, '', $link); } } $time = $up_time = date('H:i | '); $xml = "<comments><content><![CDATA[" . AZLib::parseBBCode($comment_content) . "]]></content><post_time>{$time}</post_time></comments>"; echo $xml; System::halt(); } }
function view_more_o_trans() { $page_no = (int) Url::get('page_no', 0); $cur_group = (int) Url::get('cur_total_group', 0); $action = Url::get('get_act'); if (!User::is_login()) { $json = '({"msg":"no_login"})'; echo $json; exit; } if (User::is_block()) { $json = '({"msg":"no_perm"})'; echo $json; exit; } if ($page_no > 0) { $json = '({"msg":"success"'; require_once DIR_MODULE . "Personal/forms/Office.php"; $OfficeForm = new OfficeForm("OfficeForm"); $transact_office = $OfficeForm->draw(); $json .= ',"content":"' . addslashes(str_replace(array(chr(13), chr(10)), ' ', $transact_office)) . '"'; $json .= ',"total_group":"' . $OfficeForm->total_group . '","show_more":"' . $OfficeForm->show_more . '"'; $json .= '})'; echo $json; System::halt(); } $json = '({"msg":"no_perm"})'; echo $json; exit; }
function show_log_up_item() { $item_id = (int) Url::get('item_id', 0); if ($item_id > 0 && User::is_login() && !User::is_block()) { $log_ups = array(); $item = Item::get_item($item_id); if ($item) { if (User::id() == $item['user_id']) { global $display; $re = DB::query("SELECT * FROM up_item_log WHERE item_id={$item_id} ORDER BY id DESC LIMIT 200"); if ($re) { $stt = 1; while ($log_up = mysql_fetch_assoc($re)) { $log_up['stt'] = $stt++; $log_up['up_time'] = date('d.m.Y H\\hi:s', $log_up['up_time']); if ($log_up['up_id']) { $log_up['type'] = '<font color=green><b>Up tự động</b></font>'; } else { $log_up['type'] = 'Thành viên up'; } $arr = explode(' ', $log_up['run_order']); $log_up['run_order'] = $arr[0]; if ($log_up['status'] == 0) { $log_up['status'] = '<font color="orange">Chưa kích hoạt</font>'; } elseif ($log_up['status'] == 1) { $log_up['status'] = '<font color="green">Hoạt động</font>'; } elseif ($log_up['status'] == 2) { $log_up['status'] = '<font color="brown">Hết lượt up</font>'; } elseif ($log_up['status'] == 3) { $log_up['status'] = '<span title="Tạm ngừng do tin bị xoá hoặc kiểm duyệt"><font color="red">Tạm ngừng</font></span>'; } $log_up['del_link'] = Url::build_current(array('cmd' => 'del_log', 'log_id' => $log_up['id'])); $log_up['href'] = '?page=item_detail&id=' . $log_up['item_id']; $log_up['item_c_time'] = ''; $log_up['item_up_time'] = ''; $log_ups[] = $log_up; } } if ($log_ups) { $display->add('item_id', $item['id']); $display->add('item_name', $item['name']); $display->add('post_time', date('H\\hi d.m.Y', $item['created_time'])); $display->add('up_time', date('H\\hi d.m.Y', $item['up_time'])); $display->add('item_url', Url::build('item_detail', array('id' => $item['id'], 'ebname' => AZLib::safe_title($item['name'])))); $display->add('log_ups', $log_ups); $display->output('UpTinLog', false, 'Personal'); System::halt(); } } } } echo 'no_log'; exit; }
static function redirect_url($url = false, $type = false) { /*if(!$url || $url==''){ $url='?'.$_SERVER['QUERY_STRING']; }*/ if ($url != '') { if (strpos($url, WEB_ROOT) === 0) { $url = substr($url, strlen(WEB_ROOT)); } if (strpos($url, WEB_DIR) === 0) { $url = substr($url, strlen(WEB_DIR)); } /*if (REWRITE_ON){ $url= AZRewrite::doReplace($url); unset($rewrite); }*/ $url = AZRewrite::formatUrl($url); } else { $url = ''; } if ($type == 301) { Header("HTTP/1.1 301 Moved Permanently"); } header('Location:' . WEB_DIR . $url); System::halt(); }
function mini_profile() { $user_ids = EClassApi::getParam('user_ids'); if ($user_ids) { $page_num = EClassApi::getParam('page_num'); $st = '({'; $topTxt = ''; $sql = 'SELECT account.id, user_name, full_name, blast, create_time, address, mobile_phone, yahoo_id, show_email, email, website FROM account WHERE id IN (' . $user_ids . ')'; $re = DB::query($sql); $i = 0; if ($re) { while ($user = mysql_fetch_assoc($re)) { $user_id = $user['id']; if ($i > 0) { $st .= ','; } $i++; $topTxt = ''; if ($user) { $subDir = 'item_user/' . floor($user_id / 1000); $cachefile = 'top_item_' . $user_id; // start cache if (StaticCache::notExistCache($cachefile, 600, true, $subDir)) { StaticCache::startCache(); $top_items = EClassApi::getTopItem($user_id); if ($top_items) { $topItem = '<div class=\'miniTopList\'>Giao dịch mới nhất:</div><div class=\'listCheap\'>'; foreach ($top_items as $item) { $link = WEB_DIR . ECRewrite::formatUrl("?page=item_detail&id=" . $item['id'] . "&ebname=" . EClassApi::safe_title($item['name'])); $topItem .= '<div><span class=\'miniNews\'><a href=\'' . $link . '\' target=\'_blank\'>' . EClassApi::subString(stripslashes($item['name']), 0, 40, true) . '</a></span></div>'; } $topItem .= '</div>'; echo $topItem; } StaticCache::endCache(); } $topTxt = StaticCache::$curentContent; // end cache $user['blast'] = EClassApi::remove_4_js(EnbacLib::BBCode(EClassApi::cleanHtml($user['blast']))); if (trim($user['blast'])) { $user['blast'] = ' ' . $user['blast']; if (strpos($user['blast'], 'http://')) { $user_blast = $user['blast']; while (strpos($user_blast, 'http://')) { $tmp = substr($user_blast, strpos($user_blast, 'http://')); if (strpos($tmp, ' ')) { $blast_url = substr($tmp, 0, strpos($tmp, ' ')); } else { $blast_url = $tmp; } $user_blast = str_replace($blast_url, '', $user_blast); } $new_blast_url = ' <a href=\'' . $blast_url . '\' target=\'_blank\'>Click here</a>'; $user['blast'] = substr($user_blast . $new_blast_url, 1); } } if ($user['blast'] == '') { $user['blast'] = '...'; } if ($user['website'] == '') { $user['website'] = ''; } else { $user['website_url'] = $user['website']; if (strrpos($user['website_url'], 'ttp://') != 1) { $user['website_url'] = 'http://' . $user['website_url']; } if (strlen($user['website']) > 8) { if (strpos($user['website'], '/', 8) > 0) { $user['website'] = substr($user['website'], 0, strpos($user['website'], '/', 8)); } } $user['website'] = '<a href=\'' . $user['website_url'] . '\' target=\'_blank\' class=\'lineHeight15\'><strong>' . $user['website'] . '</strong></a>'; } $st .= '"' . $user_id . '" : {'; $st .= '"user_id": "' . $user_id . '",'; $st .= '"user_name": "' . $user['user_name'] . '",'; $st .= '"sender_link": "' . Url::build('shop', array('user_name' => $user['user_name'])) . '",'; $st .= '"blast": "' . $user['blast'] . '",'; $st .= '"total_score": "0",'; $st .= '"full_name": "' . stripslashes($user['full_name']) . '",'; $st .= '"create_time": "' . date('d-m-Y', $user['create_time']) . '",'; $st .= '"address": "' . stripslashes($user['address']) . '",'; $st .= '"mobile_phone": "' . stripslashes($user['mobile_phone']) . '",'; $st .= '"yahoo_id": "' . stripslashes($user['yahoo_id']) . '",'; $st .= '"email": "' . ($user['show_email'] == 1 ? stripslashes($user['email']) : '') . '",'; $st .= '"website": "' . ($user['website'] ? stripslashes($user['website']) : '') . '",'; $st .= '"top_item": "' . addslashes($topTxt) . '"'; $st .= '}'; } } } $st .= '})'; } else { $st = '({})'; } header("content-type: text/javascript"); echo $st; System::halt(); }