SetVar('l_mode', 't');
$objEditItems = new clsLinkList();
$objEditItems->SourceTable = $objSession->GetEditTable("Link");
$objEditItems->EnablePaging = FALSE;
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
$c = $objEditItems->GetItemByIndex($en);
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
if((int)$c->Get("OrgId")>0 && $c->Get("Status")==-2)
{
$Org = new clsLink($c->Get("OrgId"));
$Org ->LoadCustomFields();
}
else
$Org = NULL;
$action = "m_edit_link";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-link:editlink_custom';
$title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Link")." '".$c->Get("Name")."' - ".prompt_language("la_tab_Custom");
//$formaction = $_SERVER["PHP_SELF"]."?".$envar;
$saveURL = $admin."/".$objSession->GetVariable('ReturnScript');
//echo $envar."
\n";
//Display header
$sec = $objSections->GetSection($section);
$objCatToolBar = new clsToolBar();
$objCatToolBar->Add("img_save", "la_Save","","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('link','','".$saveURL."',1);","tool_select.gif");
$objCatToolBar->Add("img_cancel", "la_Cancel","","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('link','','".$saveURL."',2);","tool_cancel.gif");
if($itemcount == 1) $objCatToolBar->Add("divider");
if ( isset($en_prev) || isset($en_next) )
{
$url = $RootUrl."/in-link/admin/addlink_custom.php";
$StatusField = "LinkEditStatus";
$form = "link";
MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick"));
$objCatToolBar->Add("divider");
}
$objCatToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ",
"swap('viewmenubutton', 'toolbar/tool_view.gif');",
"ShowViewMenu();","tool_view.gif");
$objCatToolBar->AddToInitScript("fwLoadMenus(); \n");
int_header($objCatToolBar,NULL,$title);
if ($objSession->GetVariable("HasChanges") == 1) {
?>