SourceTable = $objSession->GetEditTable("Topic"); $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; } $action = "bb_edit_topic"; $envar = "env=" . BuildEnv() . "&en=$en"; //Set Section $section = 'in-bulletin:edittopic_category'; $formaction = $_SERVER["PHP_SELF"]."?".$envar; //Set Environment Variable $saveURL = $admin."/".$objSession->GetVariable('ReturnScript'); //Display header $sec = $objSections->GetSection($section); $objListToolBar = new clsToolBar(); $objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('save_edit_buttons','TopicEditStatus','".$saveURL."',1);","tool_select.gif"); $objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('save_edit_buttons','TopicEditStatus','".$saveURL."',2);","tool_cancel.gif"); if($itemcount == 1) $objListToolBar->Add("divider"); $objListToolBar->Set("section",$section); $objListToolBar->Set("load_menu_func",""); $objListToolBar->Set("CheckClass","PermChecks"); $objListToolBar->Set("CheckForm","topic"); //Display header $sec = $objSections->GetSection($section); if ( isset($en_prev) || isset($en_next) ) { $url = $RootUrl."in-bulletin/admin/addtopic_category.php"; $StatusField = "TopicEditStatus"; $form = "topic"; MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick")); $objListToolBar->Add("divider"); } $listImages = array(); //$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick $objListToolBar->Add("new_cat", "la_ToolTip_New_Category","#".$envar,"swap('new_cat','toolbar/tool_new_cat_f2.gif');", "swap('new_cat', 'toolbar/tool_new_cat.gif');", "OpenCatSelector('$envar&source=addarticle_category&destform=popup&destfield=CatList');", "tool_new_cat.gif"); $objListToolBar->Add("cat_del","la_ToolTip_Delete","#", "if (PermChecks.itemChecked()) swap('cat_del','toolbar/tool_delete_f2.gif');", "if (PermChecks.itemChecked()) swap('cat_del', 'toolbar/tool_delete.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addtopic_category', 'bb_cat_delete');", "tool_delete.gif"); $listImages[] = "PermChecks.addImage('cat_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); "; // Set Primary Category $objListToolBar->Add("cat_primary","la_ToolTip_SetPrimary","#", "if (PermChecks.itemChecked()) swap('cat_primary','toolbar/tool_primary_cat_f2.gif');", "if (PermChecks.itemChecked()) swap('cat_primary', 'toolbar/tool_primary_cat.gif');","if (PermChecks.itemChecked()) PermChecks.check_submit('addtopic_category', 'bb_primary_cat');", "tool_primary_cat.gif"); $listImages[] = "PermChecks.addImage('cat_primary','$imagesURL/toolbar/tool_primary_cat.gif','$imagesURL/toolbar/tool_primary_cat_f3.gif',1); "; $objListToolBar->AddToInitScript($listImages); $title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Topic")." '".$c->Get("TopicText")."' - ".prompt_language("la_tab_Categories"); int_header($objListToolBar,NULL,$title); if ($objSession->GetVariable("HasChanges") == 1) { ?>