assign( 'msg', tra("This feature is for admins only") . ": show_raw_links" ); $smarty->display("error.tpl"); die; } // Otherwise do the following: // 1. Find all Wiki pages // 2. For each Wiki page P, find all pages that it points to // 3. Print first the name of the page P, then one after the other, // all pages that it points to. header("Content-Type: text/plain; charset=utf-8"); $query = "select `pageName` from `tiki_pages`"; $result = $tikilib->query($query, []); while ($res = $result->fetchRow()) { $resnew = str_replace(" ", '+', $res); // Must do this since // TGBrowser will get confused $put = ""; $query2 = "select `toPage`, `fromPage` from `tiki_links` where `fromPage`='" . $res["pageName"] . "'"; $result2 = $tikilib->query($query2, []); $put = $put . $resnew["pageName"] . " "; while ($res2 = $result2->fetchRow()) { $res2 = str_replace(" ", '+', $res2); $put = $put . $res2["toPage"] . " "; } echo $put . "\n"; }