[TASK] Merge pagegen.php to index_ts.php