if (!$error) {
        $this->RedirectToTab($id);
    }
}
// build the form
if (!empty($error)) {
    echo $this->ShowErrors($error);
}
$smarty->assign('grouplist', $groups);
$smarty->assign('pkgdata', $rec);
$smarty->assign('formstart', $this->CGCreateFormStart($id, 'admin_addpaidpkg', $returnid, $params));
$smarty->assign('formend', $this->CreateFormEnd());
$smarty->assign('input_description', $this->CreateTextArea(true, $id, $rec['description'], 'pkg_description'));
$subscr_type = array();
$subscr_type['none'] = $this->Lang('none');
$subscr_type['month'] = $this->Lang('month');
$subscr_type['year'] = $this->Lang('year');
$smarty->assign('subscr_types', $subscr_type);
$tmp = array();
for ($i = 1; $i < 25; $i++) {
    $tmp[$i] = $i;
}
$smarty->assign('nums', $tmp);
if ($this->GetModuleInstance('CGEcommerceBase')) {
    $smarty->assign('currency_symbol', cg_ecomm::get_currency_symbol());
    $smarty->assign('currency_code', cg_ecomm::get_currency_code());
}
echo $this->ProcessTemplate('admin_addpaidpkg.tpl');
#
# EOF
#