<?php

/**
 *
 * INDEXU
 * Copyright(C), Nicecoder, 2000-2006, All Rights Reserved.
 *
 * INDEXU(tm) is protected by Indonesia and International copyright laws.
 * Unauthorized use or distribution of INDEXU(tm) is strictly prohibited,
 * violators will be prosecuted. To obtain a license for using INDEXU(tm),
 * please register at Nicecoder home page at http://www.nicecoder.com
 *
 * Author:
 *    Dody Rachmat Wicaksono (dody@nicecoder.com)
 *    M. Zuber (zubby@nicecoder.com)
 *
 */

  /*===================================================
    ViewBadLink()
  ===================================================*/

  function ViewBadLink() {

    // vars global configuration
    global $dbConn, $category_separator, $admin_template_path;

    // vars url & form
    global $cat, $pg_which;

    // vars messages
    global $msg;

    // vars template
    global $link, $pagination, $chk_box, $num_rows, $param;

    $links_obj = new clsLink;

    $links_obj->table_name = "idx_link";
    $links_obj->category_table_name = "idx_category";
    $links_obj->bad_link_table_name = "idx_bad_link";
    $links_obj->date_format = $msg["20251"];

    $links_obj->paging = true;
    $links_obj->pg_size = 15;
    $links_obj->href = "link_bad.php";
    $links_obj->more_param = "";
    $links_obj->category_file = "../browse.php";
    $links_obj->category_separator = $category_separator;

    $param = "pg_which=$pg_which";

    $links_obj->template_file = $admin_template_path . "link_bad_rows.html";
    $link = $links_obj->BadLinkReport("view_all");

    $pagination = $links_obj->pagination;
    $num_rows = $links_obj->num_rows;

    DisplayTemplate($admin_template_path . "link_bad.html", "\$category_path,\$category,".
      "\$num_rows,\$pagination,\$link,\$param");

  }


  /*===================================================
    main
  ===================================================*/

  include "../application.php";
  
  RunPreFilter(__FILE__);

  DisplayTemplate($admin_template_path . "header.html");
  ViewBadLink();
  DisplayTemplate($admin_template_path . "footer.html");

  RunPostFilter(__FILE__);

?>