clsTemplateList($TemplateRoot); } function ParseTag($raw) { $res = ""; //echo "Tag:".htmlentities($raw).":
\n"; if(strlen(trim($raw))>0) { $tag = new clsHtmlTag($raw); switch($tag->name) { case "include": case "perm_include": $res = ""; break; case "mod_include": $res = ""; break; default: //if($tag->name=="m_language") $res = $tag->Execute(); break; } unset($tag); } return $res; } } //admin only util $rootURL="http://".ThisDomain().$objConfig->Get("Site_Path"); $admin = $objConfig->Get("AdminDirectory"); if(!strlen($admin)) $admin = "admin"; $localURL=$rootURL."kernel/"; $adminURL = $rootURL.$admin; $imagesURL = $adminURL."/images"; //$pathtolocal = $pathtoroot."in-news/"; require_once ($pathtoroot.$admin."/include/elements.php"); require_once ($pathtoroot."kernel/admin/include/navmenu.php"); //require_once ($pathtolocal."admin/include/navmenu.php"); require_once($pathtoroot.$admin."/toolbar.php"); require_once($pathtoroot.$admin."/listview/listview.php"); $section = "in-portal:missing_label_search"; $FilesPerLoad = 20; $ado = &GetADODBConnection(); if($_GET["LangId"]) { $LangId = $_GET["LangId"]; $ThemeId = $_GET["theme"]; $table = $objSession->GetSessionTable("_".$ThemeId."_labels"); @$ado->Execute("DROP TABLE IF EXISTS $table "); $Phrases = new clsPhraseList(); $query = "SELECT * FROM ".$Phrases->SourceTable." WHERE PhraseId = -1"; $insert = "CREATE TABLE ".$table." ".$query; $ado->Execute($insert); $FileIndex = 0; $objThemeFiles = new clsThemeFileList($ThemeId); $NumFiles = TableCount($objThemeFiles->SourceTable,"ThemeId=$ThemeId",0); $objSession->SetVariable("Missing_ThemeId",$ThemeId); $objSession->SetVariable("Missing_LangId",$LangId); } else { $ThemeId = $objSession->GetVariable("Missing_ThemeId"); $table = $objSession->GetSessionKey()."_".$ThemeId."_labels"; $objThemeFiles = new clsThemeFileList($ThemeId); $LangId = $objSession->GetVariable("Missing_LangId"); $FileIndex = $_GET["File"]; $NumFiles = $_GET["NumFiles"]; } $l = $objLanguages->GetItem($LangId); $name = $l->Get("PackName"); $objThemeList = new clsThemeList(); $Theme = $objThemeList->GetItem($ThemeId); $theme_name = $Theme->Get("Name"); $sql = "SELECT * FROM $table"; $rs = $ado->Execute($sql); $found = array(); while($rs && !$rs->EOF) { $p = $rs->fields["Phrase"]; if(!in_array($p,$found)) $found[] = $p; $rs->MoveNext(); } $subtitle = prompt_language("la_prompt_Theme").": ".$theme_name; $title = prompt_language("la_Text_Scanning")." ".prompt_language("la_Text_Templates"); int_header(NULL,NULL,$title); ?> "; echo ""; } else if ($percent < 60) { echo ""; } else if ($percent == 100) { echo ""; } else { echo ""; } $sql = "SELECT * FROM ".$objThemeFiles->SourceTable." WHERE ThemeId=$ThemeId LIMIT $FileIndex,$FilesPerLoad"; $TemplateRoot = $Theme->ThemeDirectory()."/"; $objTemplate = new clsLangParser($TemplateRoot); $objTemplate->SkipIncludes=1; //$ForceLanguage = $LangId; $LogPhraseLookups = TRUE; $rs = $ado->Execute($sql); while($rs && !$rs->EOF) { $path = ""; $p = $rs->fields["FilePath"]; if(strlen(trim($p))) $path .= $p."/"; $path .= $rs->fields["FileName"]; $path = substr($path,0,-4); //echo "Parsing $path
\n"; $html = $objTemplate->ParseTemplate($path); //echo htmlentities($html)."
\n"; $rs->MoveNext(); } if(is_array($MissingList)) { for($x=0;$x\n"; $ado->Execute($sql); } } } if($FileIndex >=$NumFiles) { $target = $adminURL."/config/missing_label_edit.php?env=".BuildEnv()."&lpn=1"; } else { $next = $FileIndex+$FilesPerLoad; $target = $_SERVER["PHP_SELF"]."?env=".BuildEnv()."&File=".$next."&NumFiles=$NumFiles"; } ?>
$percent"; echo "%
"; $row2 = 100-$percent; echo " $percent"; echo "%
$percent%
$percent%"; $row2 = 100-$percent; echo "
"; print " location.href='$target';"; print " "; //print "$target"; ?>