error); } $list = $ls->get_popular_terms($x_most_popular); if ($_GET['output'] == 1) { $output = true; $variables_origin = $ls->get_variables_origin(); } /** * Display. */ if (count($list) == 0) { echo 'No terms loaded so far'; } if (count($list) > 0) { $i = 1; $j = 1; $k = 0; $files = []; $trans = []; echo 'Number of records: '.count($list).'
'; echo ''.($output == 1 ? '' : '').''; foreach ($list as $elem) { if ($k > $terms_limit) { break; } $fixed_elem = $elem; if ($output) { if (empty($variables_origin[$elem['term_name']]) && !empty($variables_origin['lang'.$elem['term_name']])) { $fixed_elem = ['id' => $elem['id'], 'term_name' => 'lang'.$elem['term_name'], 'term_count' => $elem['term_count']]; } if (empty($variables_origin[$fixed_elem['term_name']])) { continue; } $files[$variables_origin[$fixed_elem['term_name']]][] = $fixed_elem['term_name']; $translation = get_lang($fixed_elem['term_name']); $k += str_word_count($translation); $trans[$fixed_elem['term_name']] = $translation; $j++; } echo ''; $i++; } echo '
IndexRegistration orderTermOriginCount
', $i, '', $fixed_elem['id'], '', $fixed_elem['term_name']; if ($output) { echo ''.$variables_origin[$fixed_elem['term_name']]; } echo '', $fixed_elem['term_count'], '
'; if ($output) { @mkdir('/tmp/lang'); foreach ($files as $file => $terms) { @touch('/tmp/lang/'.$file); file_put_contents('/tmp/lang/'.$file, "