$value) { $path = $pathtoroot. $value."admin/include/parser.php"; if(file_exists($path)) { include_once($path); } } unset($objEditItems); $objEditItems = new clsThemeList(); $objEditItems->SourceTable = $objSession->GetEditTable("Theme"); $objEditItems->EnablePaging = FALSE; //Multiedit init $en = (int)GetVar('en'); $objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable); $itemcount=$objEditItems->NumItems(); $c = $objEditItems->GetItemByIndex($en); $ThemeId = $c->Get("ThemeId"); 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 = "m_edit_theme_templates"; $envar = "env=" . BuildEnv() . "&en=$en"; $section = 'in-portal:theme_templates'; $objListToolBar = new clsToolBar(); $objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('theme','ThemeEditStatus','".$admin."/config/config_theme.php',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');","edit_submit('theme','ThemeEditStatus','".$admin."/config/config_theme.php',2);",$imagesURL."/toolbar/tool_cancel.gif"); $objListToolBar->Set("section",$section); $objListToolBar->Set("load_menu_func",""); $objListToolBar->Set("CheckClass","FileChecks"); $objListToolBar->Set("CheckForm","theme"); //Display header $sec = $objSections->GetSection($section); if ( isset($en_prev) || isset($en_next) ) { $url = $RootUrl.$admin."/config/addtheme_templates.php"; $StatusField = "ThemeEditStatus"; $form = "theme"; MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,$StatusField,$url,$sec->Get("OnClick")); $objListToolBar->Add("divider"); } $listImages = array(); //$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick // addtemplate.php /* $objListToolBar->Add( "new_template", "la_ToolTip_New_Template", $adminURL."/config/edit_template.php?".$envar, "swap('new_template','toolbar/tool_new_template_f2.gif');", "swap('new_template', 'toolbar/tool_new_template.gif');", "", "tool_new_template.gif"); */ $objListToolBar->Add( "new_template", "la_ToolTip_New_Template", "#", "swap('new_template','toolbar/tool_new_template_f2.gif');", "swap('new_template', 'toolbar/tool_new_template.gif');", "OpenTemplateAdd($ThemeId);", "tool_new_template.gif"); $objListToolBar->Add( "template_edit", "la_ToolTip_Edit", "#", "if (FileChecks.itemChecked()) swap('template_edit','toolbar/tool_edit_f2.gif');", "if (FileChecks.itemChecked()) swap('template_edit', 'toolbar/tool_edit.gif');", "if (FileChecks.itemChecked()) OpenTemplateEdit($ThemeId);", "tool_edit.gif", TRUE, TRUE); $listImages[] = "FileChecks.addImage('template_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); "; $objListToolBar->Add("template_del","la_ToolTip_Delete","#", "if (FileChecks.itemChecked()) swap('template_del','toolbar/tool_delete_f2.gif');", "if (FileChecks.itemChecked()) swap('template_del', 'toolbar/tool_delete.gif');","if (FileChecks.itemChecked()) FileChecks.check_submit('addtheme_templates', 'm_template_delete');", "tool_delete.gif",FALSE,TRUE); $listImages[] = "FileChecks.addImage('template_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); "; $objListToolBar->Add("template_preview","la_ToolTip_Preview","#", "if (FileChecks.itemChecked()) swap('template_preview','toolbar/tool_preview_template_f2.gif');", "if (FileChecks.itemChecked()) swap('template_preview', 'toolbar/tool_preview_template.gif');", "if (FileChecks,itemChecked()) OpenTemplatePreview();", "tool_preview_template.gif",FALSE,TRUE); $listImages[] = "FileChecks.addImage('template_preview','$imagesURL/toolbar/tool_preview_template.gif','$imagesURL/toolbar/tool_preview_template_f3.gif',1); "; $objListToolBar->Add("divider"); $objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ", "swap('viewmenubutton', 'toolbar/tool_view.gif');", "ShowViewMenu();","tool_view.gif"); $objListToolBar->Add("divider"); $objListToolBar->AddToInitScript($listImages); $objListToolBar->AddToInitScript("fwLoadMenus();\n"); $objListView = new clsListView($objListToolBar); $objListView->CurrentPageVar = "Page_Template"; $objListView->PerPageVar = "Perpage_Template"; $objThemeFiles = new clsThemeFileList(); $order = trim($objConfig->Get("Template_LV_Sortfield")." ".$objConfig->Get("Template_LV_Sortorder")); $SearchWords = $objSession->GetVariable("TemplateSearchWord"); if(strlen($SearchWords)) { $where = $objThemeFiles->AdminSearchWhereClause($SearchWords); } else $where = ""; $sql = "SELECT t.*,t.Description as Description, ELT(t.FileType+1,'".admin_language("la_Text_BuiltIn")."','".admin_language("la_Text_Custom")."') as Type "; $sql .= "FROM ".GetTablePrefix()."ThemeFiles as t WHERE t.ThemeId=".$c->Get("ThemeId")." "; if( strlen($where) ) $sql .= ' AND '.$where.' '; if( strlen($order) ) $sql .= 'ORDER BY '.$order.' '; $limit = ' '.$objListView->GetLimitSQL();; $sql .= $limit; //echo "SQL: $sql
"; $c->VerifyTemplates($where,$order,$limit); // slow down process if( GetVar('lpn') !== false ) $objSession->SetVariable("Page_Template",$_GET["lpn"]); $objThemeFiles->Query_Item($sql); $ThemeDir = strtolower($c->Get("Name")).$pathchar; $itemcount = QueryCount($sql); if($objSession->HasSystemPermission("DEBUG.LIST")) echo htmlentities($sql,ENT_NOQUOTES)."
\n"; $objListView->SetListItems($objThemeFiles); $objListView->IdField = "FileId"; $order = $objConfig->Get("Template_LV_Sortfield"); $objListView->ColumnHeaders->Add("FilePath",admin_language("la_prompt_Module"),1,0,$order,"width=\"30%\"","Template_LV_Sortfield","Template_LV_Sortorder","FilePath"); $objListView->ColumnHeaders->Add("FileName",admin_language("la_prompt_Template"),1,0,$order,"width=\"30%\"","Template_LV_Sortfield","Template_LV_Sortorder","FileName"); $objListView->ColumnHeaders->Add("Description",admin_language("la_prompt_Description"),1,0,$order,"width=\"30%\"","Template_LV_Sortfield","Template_LV_Sortorder","Description"); $objListView->ColumnHeaders->Add("Type",admin_language("la_prompt_Type"),1,0,$order,"width=\"30%\"","Template_LV_Sortfield","Template_LV_Sortorder","Type"); $objListView->ColumnHeaders->SetSort($objConfig->Get("Template_LV_Sortfield"), $objConfig->Get("Template_LV_Sortorder")); $objListView->PrintToolBar = FALSE; $objListView->checkboxes = TRUE; $objListView->CheckboxName = "itemlist[]"; $objListView->SearchBar = TRUE; $objListView->SearchKeywords = $SearchWords; $objListView->SearchAction="m_template_file_search"; $objListView->extra_env = "en=".(int)$en; $objListView->TotalItemCount = $itemcount; $objListView->ConfigureViewMenu("Template_LV_Sortfield","Template_LV_Sortorder","Module", "",0,0); $filter = false; // always initialize variables before use if($objSession->GetVariable("TemplateSearchWord") != '') { $filter = true; } $title = GetTitle("la_Text_Theme", "la_tab_Template", $c->Get('ThemeId'), $c->Get('Name'));//prompt_language("la_Text_Editing")." ".prompt_language("la_Text_Theme")." '".$c->Get("Name")."' - ".prompt_language("la_tab_Template"); $h = "\n\n\n"; int_header($objListToolBar,NULL, $title,NULL,$h); if ($objSession->GetVariable("HasChanges") == 1) { ?>
" method=POST> PrintList(); ?> >
" name="viewmenu">