SourceTable = $objSession->GetEditTable("Topic"); $objEditCat->EnablePaging = FALSE; //Multiedit init $en = (int)$_GET["en"]; $objEditCat->Query_Item("SELECT * FROM ".$objEditCat->SourceTable); $itemcount=$objEditCat->NumItems(); $c = $objEditCat->GetItemByIndex($en); unset($objEditItems); $objEditItems = new clsRelationshipList(); $objEditItems->SourceTable = $objSession->GetEditTable("Relationship"); if(isset($_POST["itemlist"])) { if(is_array($_POST["itemlist"])) { $RelationId = $_POST["itemlist"][0]; } else { $RelationId = $_POST["itemlist"]; } // $Rel = $objEditItems->GetItem($RelationId); $Rel = new clsRelationship(); $Rel->tablename = $objEditItems->SourceTable; $Rel->LoadFromDatabase($RelationId); $action = "m_edit_relation"; } else { $Rel = new clsRelationship(); $Rel->Set("SourceType","3"); $Rel->Set("SourceId",$c->Get("ResourceId")); $Rel->Set("TargetId",$_POST["TargetId"]); $Rel->Set("TargetType",$_POST["TargetType"]); $Rel->Set("Type","0"); $Rel->Set("Enabled","1"); $action = "m_add_relation"; } $item = $Rel->GetTargetItemData(); $envar = "env=" . BuildEnv() . "&en=$en"; $section = 'in-bulletin:edittopic_relations'; $ado = &GetADODBConnection(); /* page header */ $charset = GetRegionalOption('Charset'); print << In-portal END; $title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Topic")." '".$c->Get("TopicText")."' - ".prompt_language("la_tab_Relations"); $title .= " ".prompt_language("la_Text_to")." '".$item[$item["TitleField"]]."'"; $objCatToolBar = new clsToolBar(); $objCatToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('topic','TopicEditStatus','in-bulletin/admin/addtopic_relations.php',0);",$imagesURL."/toolbar/tool_select.gif"); $objCatToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('topic','TopicEditStatus','in-bulletin/admin/addtopic_relations.php',-1);",$imagesURL."/toolbar/tool_cancel.gif"); int_header($objCatToolBar,NULL,$title); if ($objSession->GetVariable("HasChanges") == 1) { ?>
> > > > > "> "> "> "> ">
".$Rel->Get("RelationshipId"); ?>  
()  
Get("Type")=="1") { $Recip = " CHECKED"; } else $OneWay = " CHECKED"; ?> > >  
Get("Enabled")=="1") { $checked = " CHECKED"; } else { $unchecked = " CHECKED"; } ?> > >  
">  
>