GetSection($section); $SortFieldVar = "Emoticon_LV_Sortfield"; $SortOrderVar = "Emoticon_LV_Sortorder"; $DefaultSortField = "Name"; $PerPageVar = "Perpage_Emoticon"; $CurrentPageVar = "Page_Emoticon"; $CurrentFilterVar = ""; $ListForm = "configform"; $CheckClass = "FieldChecks"; $formaction = $_SERVER["PHP_SELF"]."?".$envar; /* ------------------------------------- Configure the toolbar ------------------------------------------- */ $objListToolBar = new clsToolBar(); $objListToolBar->Set("section",$section); $objListToolBar->Set("load_menu_func",""); $objListToolBar->Set("CheckClass",$CheckClass); $objListToolBar->Set("CheckForm",$ListForm); $listImages = array(); $highURL = $rootURL."in-bulletin/admin/images/tool_forum_new_smiley_f2.gif"; $lowURL = $rootURL."in-bulletin/admin/images/tool_forum_new_smiley.gif"; $objListToolBar->Add("new_icon", "la_ToolTip_New_Emoticon",$rootURL."in-bulletin/admin/addemoticon.php?$envar&new=1","swap('new_icon','$highURL');", "swap('new_icon', '$lowURL');","",$lowURL); $objListToolBar->Add("icon_edit","la_ToolTip_Edit","#", "if (FieldChecks.itemChecked()) swap('icon_edit','toolbar/tool_edit_f2.gif');", "if (FieldChecks.itemChecked()) swap('icon_edit', 'toolbar/tool_edit.gif');","if (FieldChecks.itemChecked()) FieldChecks.check_submit('addemoticon', '');", "tool_edit.gif",TRUE,TRUE); $listImages[] = "FieldChecks.addImage('icon_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); "; $objListToolBar->Add("icon_del","la_ToolTip_Delete","#", "if (FieldChecks.itemChecked()) swap('icon_del','toolbar/tool_delete_f2.gif');", "if (FieldChecks.itemChecked()) swap('icon_del', 'toolbar/tool_delete.gif');","if (FieldChecks.itemChecked()) FieldChecks.check_submit('emoticon_config', 'bb_emoticon_delete');", "tool_delete.gif",FALSE,TRUE); $listImages[] = "FieldChecks.addImage('icon_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); "; $objListToolBar->AddToInitScript($listImages); $objListToolBar->AddToInitScript("fwLoadMenus(); \n"); $SearchWords = $objSession->GetVariable("EmoticonSearchWord"); $objEmoticons = new clsEmoticonList(); $order = trim($objConfig->Get("Emoticon_LV_Sortfield")." ".$objConfig->Get("Emoticon_LV_Sortorder")); if(strlen($SearchWords)) { $where .= $objEmoticons->AdminSearchWhereClause($SearchWords); } if(!strlen($objConfig->Get($SortFieldVar))) $objConfig->Set($SortFieldVar,$DefaultSortField); $orderBy = trim($objConfig->Get($SortFieldVar)." ".$objConfig->Get($SortOrderVar)); if(strlen($orderBy)) $objEmoticons->LoadEmoticons($where, $orderBy); else $objEmoticons->LoadEmoticons($where); $count = $objEmoticons->NumItems(); for($i=0;$i<$count;$i++) { $e =& $objEmoticons->GetItemRefByIndex($i); $img = $e->GetImageObject(); $e->Set("Image","FullURL()."\">"); } $objListView = new clsListView($objListToolBar,$objEmoticons); $objListView->IdField = "EmoticonId"; $order = $objConfig->Get("Emoticon_LV_Sortfield"); $objListView->ColumnHeaders->Add("Name",admin_language("la_prompt_Name"),1,0,$order,"width=\"30%\"","Emoticon_LV_Sortfield","Emoticon_LV_Sortorder","Name"); $objListView->ColumnHeaders->Add("KeyStroke",admin_language("la_prompt_KeyStroke"),1,0,$order,"width=\"30%\"","Emoticon_LV_Sortfield","Emoticon_LV_Sortorder","KeyStroke"); $objListView->ColumnHeaders->Add("Image",admin_language("la_prompt_Image"),1,0,$order,"width=\"30%\"","Emoticon_LV_Sortfield","Emoticon_LV_Sortorder","ImageId"); $objListView->ColumnHeaders->SetSort($objConfig->Get("Emoticon_LV_Sortfield"), $objConfig->Get("Emoticon_LV_Sortorder")); $objListView->PrintToolBar = FALSE; $objListView->checkboxes = TRUE; $objListView->SearchBar = TRUE; $objListView->SearchKeywords = $SearchWords; $objListView->SearchAction="bb_emoticon_search"; $objListView->CurrentPageVar = "Page_Emoticon"; $objListView->PerPageVar = "Perpage_Emoticon"; $objListView->CheckboxName = "itemlist[]"; $objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,"","",0); $filter = false; if ($SearchWords != '') { $filter = true; } $title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Emoticons"); $h = "\n\n\n"; int_header($objListToolBar,NULL,$title, NULL, $h); if ($filter) { ?>