Exemplo n.º 1
0
    if ($is_notice) {
        $is_notice = $lang_module['yes'];
    } 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 .= "     &nbsp;-&nbsp;";
    $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";
Exemplo n.º 2
0
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');
}
Exemplo n.º 3
0
                    } elseif ($status == 0 and $post_id == $admin_id) {
                        ++$check_del;
                    }
                }
            }
        }
        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 . "&amp;" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . 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("&nbsp;-&nbsp;", $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)) {
Exemplo n.º 4
0
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');
}
Exemplo n.º 5
0
/**
 * 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']) . '&nbsp;-&nbsp;' . 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');
}
Exemplo n.º 6
0
        $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 . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . 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 . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=seller&amp;pro_id=' . $id . '&amp;nv_redirect=' . nv_base64_encode($base_url), 'link_copy' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=content&amp;copy&amp;id=' . $id, 'link_warehouse' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=warehouse&amp;listid=' . $id . '&amp;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'];
Exemplo n.º 7
0
$sql = 'SELECT catid, alias FROM ' . NV_PREFIXLANG . '_' . $module_data . '_cat ORDER BY sort ASC';
$result = $db->query($sql);
while (list($catid_i, $alias_i) = $result->fetch(3)) {
    $global_array_cat[$catid_i] = array('alias' => $alias_i);
}
$sql = 'SELECT id, catid, alias, title FROM ' . NV_PREFIXLANG . '_' . $module_data . '_rows WHERE topicid=' . $topicid . ' ORDER BY id ASC';
$result = $db->query($sql);
$xtpl = new XTemplate('topicsnews.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
$xtpl->assign('LANG', $lang_module);
$xtpl->assign('GLANG', $lang_global);
$xtpl->assign('TOPICID', $topicid);
$i = 0;
while ($row = $result->fetch()) {
    ++$i;
    $row['link'] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=' . $global_array_cat[$row['catid']]['alias'] . '/' . $row['alias'] . '-' . $row['id'] . $global_config['rewrite_exturl'];
    $row['delete'] = nv_link_edit_page($row['id']);
    $xtpl->assign('ROW', $row);
    $xtpl->parse('main.data.loop');
}
$result->closeCursor();
if ($i) {
    $xtpl->assign('URL_DELETE', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name . '&amp;' . NV_OP_VARIABLE . '=topicdelnews');
    $xtpl->parse('main.data');
} else {
    $xtpl->parse('main.empty');
}
$xtpl->parse('main');
$contents = $xtpl->text('main');
include NV_ROOTDIR . '/includes/header.php';
echo nv_admin_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
Exemplo n.º 8
0
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 . "&amp;" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . 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']) . "&nbsp;-&nbsp;" . 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');
}
Exemplo n.º 9
0
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']) . "&nbsp;-&nbsp;" . 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']) . "&nbsp;-&nbsp;" . 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');
}
Exemplo n.º 10
0
    $contents .= "<td>" . $lang_module['name'] . "</td>\n";
    $contents .= "<td style=\"width:80px;\"></td>\n";
    $contents .= "</tr>\n";
    $contents .= "</thead>\n";
    $a = 0;
    $array_inhome = array($lang_global['no'], $lang_global['yes']);
    while ($row = $db->sql_fetchrow($result)) {
        $catid_i = end(explode(",", $row['listcatid']));
        $link = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=" . $global_array_cat[$catid_i]['alias'] . "/" . $row['alias'] . "-" . $row['id'];
        $class = $a % 2 ? " class=\"second\"" : "";
        $contents .= "<tbody" . $class . ">\n";
        $contents .= "<tr>\n";
        $contents .= "<td><input type='checkbox' name='newsid' value='" . $row['id'] . "'/></td>\n";
        $contents .= "<td align=\"left\"><a target=\"_blank\" href=\"" . $link . "\">" . $row['title'] . "</a></td>\n";
        $contents .= "<td align=\"center\">";
        $contents .= "     " . nv_link_edit_page($row['id']) . "\n";
        $contents .= "     </td>\n";
        $contents .= "</tr>\n";
        $contents .= "</tbody>\n";
        $a++;
    }
    $contents .= "<tfoot>\n";
    $contents .= "<tr>\n";
    $contents .= "<td colspan='3'>";
    $contents .= "\r\n\t\t<span>\r\n\t\t<a name=\"checkall\" id=\"checkall\" href=\"javascript:void(0);\">" . $lang_module['comment_checkall'] . "</a>\r\n\t\t&nbsp;&nbsp;<a name=\"uncheckall\" id=\"uncheckall\" href=\"javascript:void(0);\">" . $lang_module['comment_uncheckall'] . "</a>&nbsp;&nbsp;\r\n\t\t</span><span style='width:100px;display:inline-block'>&nbsp;</span>\r\n\t\t<span class=\"delete_icon\">\r\n\t\t\t<a class='delete' href=\"" . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=topicdelnews\">" . $lang_module['topic_del'] . "</a>\r\n\t\t</span>";
    $contents .= "</td>\n";
    $contents .= "</tr>\n";
    $contents .= "</tfoot>\n";
    $contents .= "</table>\n";
} else {
    $contents .= "<div class=\"quote\" style=\"width:810px;\">\n";