Get($field); $NewValue = $c->Get($field); $class = ($OrgValue != $NewValue) ? 'error' : 'text'; return ''.$OrgValue.''; } } // -------------------------------------------------------------------- $objEditItems = new clsLinkList(); $objRelList = new clsRelationshipList(); $objReviewList = new clsItemReviewList(); $objImages = new clsImageList(); $application->SetVar('l_mode', 't'); $objCustomFields = new clsCustomFieldList(4); $objCustomDataList = new clsCustomDataList(); //Multiedit init if ($_GET["new"] == 1) { $objEditItems->SourceTable = $objSession->GetEditTable("Link"); $objEditItems->EnablePaging = FALSE; $c = new clsLink(NULL); $c->Set("CreatedOn", adodb_mktime()); $c->Set("EndOn", adodb_mktime()); $c->Set("CategoryId",$objCatList->CurrentCategoryID()); $c->Set("HotItem",2); $c->Set("NewItem",2); $c->Set("PopItem",2); $c->Set("Status",2); $c->Set('AutomaticFilename', 1); if($objSession->Get("PortalUserId")>0) { $u = $objUsers->GetUser($objSession->Get("PortalUserId")); $CreatedByName = $u->Get("Login"); } else { $CreatedByName = "root"; } $en = 0; $action = "l_link_add"; $objLinkList->CreateEmptyEditTable("LinkId"); $objRelList->CreateEmptyEditTable("RelationshipId"); $objReviewList->CreateEmptyEditTable("ReviewId"); $objCustomDataList->CreateEmptyEditTable('l'); $objLinkList->CreateEmptyCatListTable("ItemResourceId"); $objImages->CreateEmptyEditTable("ResourceId"); $TitleVerb = prompt_language("la_Text_Adding"); } else { /*$direct_id = GetVar('direct_id'); if($direct_id) $_POST['linklist'] = Array($direct_id);*/ $env_id = $l_var_list['id']; if($env_id) $_POST['linklist'] = Array($env_id); $en = (int)$_GET["en"]; if($_GET["item"]) { if($_GET["newsession"]==1) { $objSession->CopyToNewSession(); } /*shortcut to edit link */ $objLinkList->CopyToEditTable("ResourceId",$_GET["item"]); } else { if (GetVar('multiple_ids') == 1) { // from K4 template LinkId's are passed here SetVar('linklist', array_keys($application->GetVar('l')) ); } if (isset($_POST["linklist"])) { $objLinkList->CopyToEditTable("LinkId",$_POST["linklist"]); } } $objEditItems->SourceTable = $objSession->GetEditTable("Link"); $objEditItems->EnablePaging = FALSE; $objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable); if(isset($_POST["linklist"]) || $_GET["item"]) { $ids = $objEditItems->GetResourceIDList(); $objRelList->CopyToEditTable("SourceId",$ids); $objReviewList->CopyToEditTable("ItemId",$ids); $objCustomDataList->CopyToEditTable('l', $ids); $objLinkList->CopyCatListToEditTable("ItemResourceId", $ids); $objImages->CopyToEditTable("ResourceId",$ids); } $itemcount=$objEditItems->NumItems(); $c = $objEditItems->GetItemByIndex($en); if($c->Get("CreatedById")>0) { $u = $objUsers->GetUser($c->Get("CreatedById")); $CreatedByName = $u->Get("Login"); } else $CreatedByName = "root"; 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 = "l_edit_link"; $TitleVerb = prompt_language("la_Text_Editing"); /* check to see if this is a pending link */ //echo "checking
"; //echo "OID_:".$c->Get("OrgId")."
"; if( (int)$c->Get("OrgId") > 0 && $c->Get("Status") == -2 ) $Org = new clsLink($c->Get("OrgId")); else $Org = NULL; //echo "GC: ".get_class($Org).'
'; } $envar = "env=" . BuildEnv() . "&en=$en"; $section = 'in-link:editlink_general'; $saveURL = $admin."/".$objSession->GetVariable('ReturnScript'); //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','LinkEditStatus','$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','LinkEditStatus','$saveURL',2);","tool_cancel.gif"); if ( isset($en_prev) || isset($en_next) ) { $url = $RootUrl."/in-link/admin/addlink.php"; $StatusField = "LinkEditStatus"; $form = "link"; MultiEditButtons($objCatToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick")); } if (strlen($c->Get("Name"))) $editing_title = "'".$c->Get("Name")."' "; else $editing_title = ""; $title = $TitleVerb." ".prompt_language("la_Text_Link")." $editing_title- ".prompt_language("la_tab_General"); int_header($objCatToolBar,NULL,$title); $c->Data=inp_htmlize($c->Data); if ($objSession->GetVariable("HasChanges") == 1) { ?>
> Get("LinkId") > 0 ) { ?> > > > > > > > > > > > > > > > > > > GetFieldUIList(TRUE); if($CustomFieldUI->NumItems()>0) { $objCustomDataList->SourceTable = $objSession->GetEditTable("CustomMetaData"); if((int)$c->Get("ResourceId")>0) { $objCustomDataList->LoadResource($c->Get("ResourceId")); } $headings = $CustomFieldUI->GetHeadingList(); //echo "
";print_r($objCustomFields); echo "
"; $tab_index = 16; for($i=0;$i<=count($headings);$i++) { $h = $headings[$i]; if(strlen($h)) { int_subsection_title(prompt_language($h)); $Items = $CustomFieldUI->GetHeadingItems($h); foreach($Items as $f) { $n = substr($f->name,1); $cfield = $objCustomFields->GetItemByField("FieldName",$n,FALSE); if(is_object($cfield)) { $f->default_value = $c->GetCustomFieldValue($n, '', 0, true); } print "\n"; print " \n"; print " "; if(is_object($f->NextItem)) { $n = $f->NextItem; print " "; } else print " \n"; print "\n"; } } } } ?> ">

Get("LinkId"); ?> Get("OrgId") ) echo prompt_language("la_origional_values"); ?>
">

">
Get("CreatedById")>0) { $u = $objUsers->GetUser($Org->Get("CreatedById")); $OrgValue = $u->Get("Login"); } else $OrgValue = "root"; $NewValue = $CreatedByName; if($OrgValue != $NewValue) { $class = "error"; } else $class = "text"; echo "$OrgValue"; } ?>
Get('AutomaticFilename') == 1) echo ' checked'; ?> onchange="reflect_filename();">  
 
Get("Status") == 1) echo "checked"; ?>> Get("Status") == $PendingVal) echo "checked"; ?>> Get("Status") == 0) echo "checked"; ?>>
Get("NewItem") == 2) echo "checked"; ?>> Get("NewItem") == 1) echo "checked"; ?>> Get("NewItem") == 0) echo "checked"; ?>> Get("NewItem")) { case 2: echo prompt_language("la_val_Auto"); break; case 1: echo prompt_language("la_val_Always"); break; case 0: echo prompt_language("la_val_Never"); break; } } ?>
Get("HotItem") == 2) echo "checked"; ?>> Get("HotItem") == 1) echo "checked"; ?>> Get("HotItem") == 0) echo "checked"; ?>> Get("HotItem")) { case 2: echo prompt_language("la_val_Auto"); break; case 1: echo prompt_language("la_val_Always"); break; case 0: echo prompt_language("la_val_Never"); break; } } ?>
Get("PopItem") == 2) echo "checked"; ?>> Get("PopItem") == 1) echo "checked"; ?>> Get("PopItem") == 0) echo "checked"; ?>> Get("PopItem")) { case 2: echo prompt_language("la_val_Auto"); break; case 1: echo prompt_language("la_val_Always"); break; case 0: echo prompt_language("la_val_Never"); break; } } ?>
Get("EditorsPick") == 1) echo "checked"; ?>> Get("EditorsPick")) { echo prompt_language("lu_yes"); } else echo prompt_language("lu_no"); } ?>
">
"> parsetag("link_date"); $NewValue = $c->parsetag("link_date"); if($OrgValue != $NewValue) { $class = "error"; } else $class = "text"; echo "$OrgValue"; } ?>
"> parsetag("link_expire"); $NewValue = $c->parsetag("link_expire"); if($OrgValue != $NewValue) { $class = "error"; } else $class = "text"; echo "$OrgValue"; } ?>
"> Get("CachedRating"); $NewValue = (int)$c->Get("CachedRating"); if($OrgValue != $NewValue) { $class = "error"; } else $class = "text"; echo "$OrgValue"; } ?>
"> Get("CachedVotesQty"); $NewValue = (int)$c->Get("CachedVotesQty"); if($OrgValue != $NewValue) { $class = "error"; } else $class = "text"; echo "$OrgValue"; } ?>
"> "> Get("Hits"); $NewValue = (int)$c->Get("Hits"); if($OrgValue != $NewValue) { $class = "error"; } else $class = "text"; echo "$OrgValue"; } ?>
".$f->GetPrompt()."".$f->ItemFormElement($tab_index++)."".$n->ItemFormElement($tab_index++)."