require_once 'modules/CustomView/CustomView.php';
global $app_strings, $mod_strings, $list_max_entries_per_page, $currentModule, $theme, $adb;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$smarty = new vtigerCRM_Smarty();
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MODULE", $currentModule);
$smarty->assign("SINGLE_MOD", 'Vendor');
$category = getParentTab();
$smarty->assign("CATEGORY", $category);
$focus = new Vendors();
// Initialize sort by fields
$focus->initSortbyField('Vendors');
// END
$other_text = array();
if (!$_SESSION['lvs'][$currentModule]) {
    unset($_SESSION['lvs']);
    $modObj = new ListViewSession();
    $modObj->sorder = $sorder;
    $modObj->sortby = $order_by;
    $_SESSION['lvs'][$currentModule] = get_object_vars($modObj);
}
if ($_REQUEST['errormsg'] != '') {
    $errormsg = vtlib_purify($_REQUEST['errormsg']);
    $smarty->assign("ERROR", "The User does not have permission to delete " . $errormsg . " " . $currentModule);
} else {
    $smarty->assign("ERROR", "");
}