<?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, $theme_path;

    // vars url & form
    global $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->user_table_name     = "idx_users";
    $links_obj->editor_table_name   = "idx_editor";
    $links_obj->bad_link_table_name = "idx_bad_link";
    $links_obj->date_format         = $msg["20171"];
    $links_obj->paging              = true;
    $links_obj->pg_size             = 15;
    $links_obj->href                = "editor_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       = $theme_path . "cp/editor_link_bad_rows.html";
    $link                           = $links_obj->BadLinkReport("view_all", "", "", "", "", true);
    $pagination                     = $links_obj->pagination;
    $num_rows                       = $links_obj->num_rows;

    DisplayTemplate($theme_path . "cp/editor_link_bad.html", "\$num_rows,\$pagination,\$link,\$param");
  }


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

  include "../application.php";

  AddFilter('validate_editor');
  RunPreFilter(__FILE__);

  ViewBadLink();

  RunPostFilter(__FILE__);

?>