} else { $is_notice = $lang_module['no']; } $link = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $global_array_cat[$catid_i]['alias'] . "/" . $alias . "-" . $id; $contents .= "<tbody" . $class . ">"; $contents .= "<tr align=\"center\">\n"; $contents .= "<td align=\"center\"><input type=\"checkbox\" onclick=\"nv_UncheckAll(this.form, 'idcheck[]', 'check_all[]', this.checked);\" value=\"" . $id . "\" name=\"idcheck[]\"></td>\n"; $contents .= "<td align=\"left\"><a target=\"_blank\" href=\"" . $link . "\">" . $title . "</a></td>\n"; $contents .= "<td>" . $publtime . "</td>\n"; $contents .= "<td>" . $status . "</td>\n"; $contents .= "<td>" . $is_notice . "</td>\n"; $contents .= "<td>" . (isset($array_admin[$admin_id]) ? $array_admin[$admin_id] : "") . "</td>\n"; $contents .= "<td>"; $contents .= " " . nv_link_edit_page($id) . "\n"; $contents .= " - "; $contents .= " " . nv_link_delete_page($id) . "\n"; $contents .= " </td>\n"; $contents .= "</tbody>"; $a++; } $contents .= "<tfoot>\n"; $contents .= "<tr align=\"left\">\n"; $contents .= "<td colspan=\"7\">\n"; $contents .= "<select name=\"action\" id=\"action\">\n"; $array_list_action = cp_authorize($nv_Request); while (list($catid_i, $title_i) = each($array_list_action)) { $contents .= "<option value=\"" . $catid_i . "\">" . $title_i . "</option>\n"; } $contents .= "</select>\n"; $contents .= "<input type=\"button\" onclick=\"nv_main_action(this.form,'" . md5($global_config['sitekey'] . session_id()) . "','" . $lang_module['msgnocheck'] . "')\" value=\"" . $lang_module['action'] . "\">\n"; $contents .= "</td>\n";
function tag_theme($topic_array, $generate_page, $page_title, $description, $topic_image) { global $lang_module, $module_info, $module_name, $module_file, $topicalias, $module_config; $xtpl = new XTemplate('tag.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file); $xtpl->assign('LANG', $lang_module); $xtpl->assign('TITLE', $page_title); $xtpl->assign('IMGWIDTH1', $module_config[$module_name]['homewidth']); if (!empty($description)) { $xtpl->assign('DESCRIPTION', $description); if (!empty($topic_image)) { $xtpl->assign('HOMEIMG1', $topic_image); $xtpl->parse('main.description.image'); } $xtpl->parse('main.description'); } if (!empty($topic_array)) { foreach ($topic_array as $topic_array_i) { $xtpl->assign('TOPIC', $topic_array_i); $xtpl->assign('TIME', humanTiming($topic_array_i['publtime'])); if (!empty($topic_array_i['src'])) { $xtpl->parse('main.topic.homethumb'); } if (defined('NV_IS_MODADMIN')) { $xtpl->assign('ADMINLINK', nv_link_edit_page($topic_array_i['id']) . ' ' . nv_link_delete_page($topic_array_i['id'])); $xtpl->parse('main.topic.adminlink'); } if (isset($topic_array_i['uploader_link']) and !empty($topic_array_i['uploader_link'])) { $xtpl->parse('main.topic.uploader_link'); } else { $xtpl->parse('main.topic.uploader'); } $xtpl->parse('main.topic'); } } if (!empty($topic_other_array)) { foreach ($topic_other_array as $topic_other_array_i) { $topic_other_array_i['publtime'] = nv_date('H:i d/m/Y', $topic_other_array_i['publtime']); $xtpl->assign('TOPIC_OTHER', $topic_other_array_i); $xtpl->parse('main.other.loop'); } $xtpl->parse('main.other'); } if (!empty($generate_page)) { $xtpl->assign('GENERATE_PAGE', $generate_page); $xtpl->parse('main.generate_page'); } $xtpl->parse('main'); return $xtpl->text('main'); }
} } } if ($check_edit == sizeof($array_temp)) { $check_permission_edit = true; } if ($check_del == sizeof($array_temp)) { $check_permission_delete = true; } } $admin_funcs = array(); if ($check_permission_edit) { $admin_funcs[] = nv_link_edit_page($id); } if ($check_permission_delete) { $admin_funcs[] = nv_link_delete_page($id); } $link = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $global_array_cat[$catid_i]['alias'] . "/" . $alias . "-" . $id; $data[] = array("class" => $class, "id" => $id, "link" => $link, "title" => $title, "publtime" => $publtime, "status" => $lang_module['status_' . $status], "username" => $username, "feature" => implode(" - ", $admin_funcs)); ++$a; } $array_list_action = array('delete' => $lang_global['delete'], 'publtime' => $lang_module['publtime'], 'exptime' => $lang_module['exptime']); if (defined('NV_IS_ADMIN_MODULE')) { $array_list_action['addtoblock'] = $lang_module['addtoblock']; $array_list_action['addtotopics'] = $lang_module['addtotopics']; } $action = array(); while (list($catid_i, $title_i) = each($array_list_action)) { $action[] = array("value" => $catid_i, "title" => $title_i); } $generate_page = nv_generate_page($base_url, $all_page, $per_page, $page);
/** * wishlist() * * @param mixed $data_content * @param string $html_pages * @return */ function wishlist($data_content, $compare_id, $html_pages = '') { global $module_info, $lang_module, $module_file, $pro_config, $op, $array_displays, $array_wishlist_id, $module_name, $global_array_shops_cat, $global_array_group, $my_head; $xtpl = new XTemplate('wishlist.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file); $xtpl->assign('TEMPLATE', $module_info['template']); $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL); $xtpl->assign('LANG', $lang_module); $xtpl->assign('CSS_PRODUCT_CODE', !empty($pro_config['show_product_code']) ? ' show-product-code' : ''); $xtpl->assign('num', 24 / $pro_config['per_row']); if (!empty($data_content)) { foreach ($data_content as $data_row) { $xtpl->assign('ID', $data_row['id']); $xtpl->assign('LINK', $data_row['link_pro']); $xtpl->assign('TITLE', $data_row['title']); $xtpl->assign('TITLE0', nv_clean60($data_row['title'], 40)); $xtpl->assign('IMG_SRC', $data_row['homeimgthumb']); $xtpl->assign('LINK_ORDER', $data_row['link_order']); $xtpl->assign('height', $pro_config['homeheight']); $xtpl->assign('width', $pro_config['homewidth']); $xtpl->assign('hometext', $data_row['hometext']); $xtpl->assign('PRODUCT_CODE', $data_row['product_code']); $newday = $data_row['publtime'] + 86400 * $data_row['newday']; if ($newday >= NV_CURRENTTIME) { $xtpl->parse('main.items.new'); } if ($pro_config['active_order'] == '1' and $pro_config['active_order_non_detail'] == '1') { if ($data_row['showprice'] == '1') { if ($data_row['product_number'] > 0) { // Kiem tra nhom bat buoc chon khi dat hang $listgroupid = GetGroupID($data_row['id']); $group_requie = 0; if (!empty($listgroupid) and !empty($global_array_group)) { foreach ($global_array_group as $groupinfo) { if ($groupinfo['in_order']) { $group_requie = 1; break; } } } $group_requie = $pro_config['active_order_popup'] ? 1 : $group_requie; $xtpl->assign('GROUP_REQUIE', $group_requie); $xtpl->parse('main.items.order'); } else { $xtpl->parse('main.items.product_empty'); } } } if ($pro_config['active_price'] == '1') { if ($data_row['showprice'] == '1') { $price = nv_get_price($data_row['id'], $pro_config['money_unit']); $xtpl->assign('PRICE', $price); if ($data_row['discount_id'] and $price['discount_percent'] > 0) { $xtpl->parse('main.items.price.discounts'); $xtpl->parse('main.items.price.discounts.standard'); } else { $xtpl->parse('main.items.price.no_discounts'); } $xtpl->parse('main.items.price'); } else { $xtpl->parse('main.items.contact'); } } if ($pro_config['active_tooltip'] == 1) { $xtpl->parse('main.items.tooltip'); } if (!empty($pro_config['show_product_code']) and !empty($data_row['product_code'])) { $xtpl->parse('main.items.product_code'); } if (defined('NV_IS_MODADMIN')) { $xtpl->assign('ADMINLINK', nv_link_edit_page($data_row['id']) . ' - ' . nv_link_delete_page($data_row['id'])); $xtpl->parse('main.items.adminlink'); } // Qua tang if ($pro_config['active_gift'] and !empty($data_row['gift_content']) and NV_CURRENTTIME >= $data_row['gift_from'] and NV_CURRENTTIME <= $data_row['gift_to']) { $xtpl->parse('main.items.gift'); } // So sanh san pham if ($pro_config['show_compare'] == 1) { if (!empty($compare_id)) { $ch = in_array($data_row['id'], $compare_id) ? ' checked="checked"' : ''; $xtpl->assign('ch', $ch); } $xtpl->parse('main.items.compare'); } if ($data_row['discount_id'] and $price['discount_percent'] > 0 and $data_row['showprice']) { $xtpl->parse('main.items.discounts'); } // Hien thi bieu tuong tich luy diem if ($pro_config['point_active'] and $global_array_shops_cat[$data_row['listcatid']]['cat_allow_point'] and !empty($global_array_shops_cat[$data_row['listcatid']]['cat_number_point'])) { $xtpl->assign('point', $global_array_shops_cat[$data_row['listcatid']]['cat_number_point']); $xtpl->assign('point_note', sprintf($lang_module['point_product_note'], $global_array_shops_cat[$data_row['listcatid']]['cat_number_point'])); $xtpl->parse('main.items.point'); } $xtpl->parse('main.items'); } if (!defined('MODAL_LOADED')) { $xtpl->parse('main.modal_loaded'); define('MODAL_LOADED', true); } if (!empty($html_pages)) { $xtpl->assign('generate_page', $html_pages); $xtpl->parse('main.pages'); } } $xtpl->parse('main'); return $xtpl->text('main'); }
function viewfam_location($genealogy_array, $page_title) { global $lang_module, $module_info, $module_name, $module_file, $topicalias, $module_config; $xtpl = new XTemplate('location.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file); $xtpl->assign('LANG', $lang_module); $xtpl->assign('LOCAL_TITLE', $page_title); $xtpl->assign('IMGWIDTH1', $module_config[$module_name]['homewidth']); if (!empty($genealogy_array)) { foreach ($genealogy_array as $genealogy_array_i) { $xtpl->assign('DATA', $genealogy_array_i); $xtpl->assign('TIME', date('H:i', $genealogy_array_i['publtime'])); $xtpl->assign('DATE', date('d/m/Y', $genealogy_array_i['publtime'])); if (!empty($genealogy_array_i['src'])) { $xtpl->parse('main.loop.homethumb'); } if (defined('NV_IS_MODADMIN')) { $xtpl->assign('ADMINLINK', nv_link_edit_page($genealogy_array_i['id']) . ' ' . nv_link_delete_page($genealogy_array_i['id'])); $xtpl->parse('main.loop.adminlink'); } $xtpl->parse('main.loop'); } } $xtpl->parse('main'); return $xtpl->text('main'); }
$catid_i = $listcatid; } // Xac dinh anh nho if ($homeimgthumb == 1) { $thumb = NV_BASE_SITEURL . NV_FILES_DIR . '/' . $module_upload . '/' . $homeimgfile; $imghome = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $homeimgfile; } elseif ($homeimgthumb == 2) { $imghome = $thumb = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $homeimgfile; } elseif ($homeimgthumb == 3) { $imghome = $thumb = $homeimgfile; } elseif (file_exists(NV_ROOTDIR . '/themes/' . $theme . '/images/' . $module_file . '/no-image.jpg')) { $imghome = $thumb = NV_BASE_SITEURL . 'themes/' . $theme . '/images/' . $module_file . '/no-image.jpg'; } else { $imghome = $thumb = NV_BASE_SITEURL . 'themes/default/images/' . $module_file . '/no-image.jpg'; } $xtpl->assign('ROW', array('id' => $id, 'link' => NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_shops_cat[$catid_i]['alias'] . '/' . $alias . $global_config['rewrite_exturl'], 'link_seller' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=seller&pro_id=' . $id . '&nv_redirect=' . nv_base64_encode($base_url), 'link_copy' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=content&copy&id=' . $id, 'link_warehouse' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=warehouse&listid=' . $id . '&checkss=' . md5($global_config['sitekey'] . session_id()), 'title' => $title, 'publtime' => $publtime, 'edittime' => $edittime, 'hitstotal' => $hitstotal, 'num_sell' => $num_sell, 'product_unit' => isset($array_unit[$product_unit]) ? $array_unit[$product_unit][NV_LANG_DATA . '_title'] : '', 'status' => $lang_module['status_' . $status], 'admin_id' => !empty($username) ? $username : '', 'product_number' => $product_number, 'product_price' => nv_number_format($product_price, nv_get_decimals($money_unit)), 'money_unit' => $money_unit, 'thumb' => $thumb, 'imghome' => $imghome, 'link_edit' => nv_link_edit_page($id), 'link_delete' => nv_link_delete_page($id))); if ($num_sell > 0) { $xtpl->parse('main.loop.seller'); } else { $xtpl->parse('main.loop.seller_empty'); } // Hien thi nhap kho if ($pro_config['active_warehouse']) { $xtpl->parse('main.loop.warehouse_icon'); } $xtpl->parse('main.loop'); ++$a; } $array_list_action = array('delete' => $lang_global['delete'], 'publtime' => $lang_module['publtime'], 'exptime' => $lang_module['exptime'], 'addtoblock' => $lang_module['addtoblock']); if ($pro_config['active_warehouse']) { $array_list_action['warehouse'] = $lang_module['warehouse'];
function topic_theme($topic_array, $topic_other_array, $page_title, $description) { global $global_config, $module_info, $module_name, $module_file, $topictitle, $topicalias, $module_config; $xtpl = new XTemplate("topic.tpl", NV_ROOTDIR . "/themes/" . $module_info['template'] . "/modules/" . $module_file); $xtpl->assign('TOPPIC_TITLE', $page_title); $xtpl->assign('TOPPIC_LINK', NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=topic/" . $topicalias); $xtpl->assign('TOPPIC_DESCRIPTION', $description); if (!empty($topic_array)) { foreach ($topic_array as $topic_array_i) { $xtpl->assign('TOPIC', $topic_array_i); $xtpl->assign('TIME', date("H:i", $topic_array_i['publtime'])); $xtpl->assign('DATE', date("d/m/Y", $topic_array_i['publtime'])); if (!empty($topic_array_i['src'])) { $xtpl->parse('main.topic.homethumb'); } if (defined('NV_IS_MODADMIN')) { $xtpl->assign('ADMINLINK', nv_link_edit_page($topic_array_i['id']) . " - " . nv_link_delete_page($topic_array_i['id'])); $xtpl->parse('main.topic.adminlink'); } $xtpl->parse('main.topic'); } } if (!empty($topic_other_array)) { foreach ($topic_other_array as $topic_other_array_i) { $xtpl->assign('TOPIC_OTHER', $topic_other_array_i); $xtpl->parse('main.other.loop'); } $xtpl->parse('main.other'); } $xtpl->parse('main'); return $xtpl->text('main'); }
function viewcat_new_head($array_catpage, $array_cat_other) { global $global_config, $module_name, $module_file, $lang_module, $module_config, $module_info; $xtpl = new XTemplate("viewcat_new_head.tpl", NV_ROOTDIR . "/themes/" . $module_info['template'] . "/modules/" . $module_file); $xtpl->assign('LANG', $lang_module); $a = 0; foreach ($array_catpage as $array_row_i) { $array_row_i['publtime'] = nv_date('d/m/Y H:i', $array_row_i['publtime']); $xtpl->clear_autoreset(); if ($a == 0) { $xtpl->assign("HEAD", $array_row_i); if (defined('NV_IS_MODADMIN')) { $xtpl->assign('ADMINLINK', nv_link_edit_page($array_row_i['id']) . " - " . nv_link_delete_page($array_row_i['id'])); $xtpl->parse('main.head_new.adminlink'); } if ($array_row_i['imghome'] != "") { if (file_exists(NV_UPLOADS_REAL_DIR . '/' . $module_name . '/' . $array_row_i['imghome'])) { $size = @getimagesize(NV_UPLOADS_REAL_DIR . '/' . $module_name . '/' . $array_row_i['imghome']); if ($size[0] > 0) { $homewidth = $module_config[$module_name]['homewidth'] * 2; $size[1] = round($homewidth / $size[0] * $size[1]); $size[0] = $homewidth; $xtpl->assign('IMGWIDTH1', $size[0]); $xtpl->assign('IMGHEIGHT1', $size[1]); $xtpl->assign('HOMEIMG1', NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_name . '/' . $array_row_i['imghome']); $xtpl->assign('HOMEIMGALT1', !empty($array_row_i['homeimgalt']) ? $array_row_i['homeimgalt'] : $array_row_i['title']); $xtpl->parse('main.head_new.image'); } } } $xtpl->set_autoreset(); $xtpl->parse("main.head_new"); } else { $xtpl->assign('CONTENT', $array_row_i); if (defined('NV_IS_MODADMIN')) { $xtpl->assign('ADMINLINK', nv_link_edit_page($array_row_i['id']) . " - " . nv_link_delete_page($array_row_i['id'])); $xtpl->parse('main.viewcatloop.adminlink'); } if ($array_row_i['imghome'] != "") { if (file_exists(NV_UPLOADS_REAL_DIR . '/' . $module_name . '/' . $array_row_i['imghome'])) { $size = @getimagesize(NV_UPLOADS_REAL_DIR . '/' . $module_name . '/' . $array_row_i['imghome']); if ($size[0] > 0) { $homewidth = $module_config[$module_name]['homewidth']; $size[1] = round($homewidth / $size[0] * $size[1]); $size[0] = $homewidth; $xtpl->assign('IMGWIDTH1', $size[0]); $xtpl->assign('IMGHEIGHT1', $size[1]); $xtpl->assign('HOMEIMG1', NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_name . '/' . $array_row_i['imghome']); $xtpl->assign('HOMEIMGALT1', !empty($array_row_i['homeimgalt']) ? $array_row_i['homeimgalt'] : $array_row_i['title']); $xtpl->parse('main.viewcatloop.image'); } } } $xtpl->set_autoreset(); $xtpl->parse('main.viewcatloop'); } $a++; } if (!empty($array_cat_other)) { $xtpl->assign('ORTHERNEWS', $lang_module['other']); foreach ($array_cat_other as $array_row_i) { $array_row_i['publtime'] = nv_date("d/m/Y", $array_row_i['publtime']); $xtpl->assign('RELATED', $array_row_i); $xtpl->parse('main.related.loop'); } $xtpl->parse('main.related'); } $xtpl->parse('main'); return $xtpl->text('main'); }