if ($GLOBALS['TYPO3_DB']->sql_num_rows($qry2) == 0) {
        $products[$row['products_id']] = $row;
    }
}
$content .= '<div class="main-heading"><h2>' . $this->pi_getLL('admin_label_check_2') . '</h2></div>';
foreach ($products as $row) {
    $products_id = $row['products_id'];
    $query = $GLOBALS['TYPO3_DB']->DELETEquery('tx_multishop_products_to_categories', 'products_id=' . $products_id);
    $res = $GLOBALS['TYPO3_DB']->sql_query($query);
}
$content .= '<strong>' . count($products) . '</strong> ' . $this->pi_getLL('admin_label_x_orphanned_products_to_categories_relations_has_been_deleted') . '.<br />';
$str = "SELECT categories_id from tx_multishop_categories";
$qry = $GLOBALS['TYPO3_DB']->sql_query($str);
$cats = array();
while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) != false) {
    if (!mslib_fe::hasProducts($row['categories_id']) and !mslib_fe::hasCats($row['categories_id'])) {
        $cats[$row['categories_id']] = $row;
    }
}
foreach ($cats as $row) {
    if ($row['categories_id']) {
        mslib_befe::deleteCategory($row['categories_id']);
    }
}
$content .= '<strong>' . count($cats) . '</strong> ' . $this->pi_getLL('admin_label_x_orphanned_categories_has_been_deleted') . '.<br />';
// chk 3 the unused options
$content .= '<div class="main-heading"><h2>' . $this->pi_getLL('admin_label_check_3') . '</h2></div>';
$str = "SELECT products_options_values_id from tx_multishop_products_options_values";
$qry = $GLOBALS['TYPO3_DB']->sql_query($str);
$option_values = array();
while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($qry)) != false) {
         $link = $cat['categories_external_url'];
     }
     $categories_name = htmlspecialchars($cat['categories_name']);
     $meta_description = htmlspecialchars($cat['meta_description']);
     $actifsub = 0;
     $act = 0;
     $hasChild = 0;
     if ($user_crumbar[$nested_level]['id'] == $cat['categories_id']) {
         if ($this->get['categories_id'] == $cat['categories_id'] or $this->maxDEPTH == $nested_level + 1) {
             $act = 1;
         }
         if ($user_crumbar[$nested_level + 1]) {
             $actifsub = 1;
         }
     }
     if ($actifsub or mslib_fe::hasCats($cat['categories_id'], 0)) {
         $hasChild = 1;
     }
     $this->class = array();
     if ($hasChild) {
         $this->class[] = 'hasChild';
     }
     if ($act) {
         $this->class[] = 'active';
     }
     if ($actifsub) {
         $this->class[] = 'actifsub active';
     }
     $cat_level_3 .= '<li class="' . implode(' ', $this->class) . '"><a href="' . $link . '" title="' . htmlspecialchars($meta_description) . '"' . $target . '><span>' . $categories_name . '</span></a></li>';
 }
 // hide in menu