Esempio n. 1
0
echo '<input type="submit" class="btn btn-primary" value="Save" /> ';
echo 'or <a href="edit-pattern.php" class="btn" >Cancel and return to listing</a>';
echo '</form>';
// DELETE option
if (!empty($matched)) {
    echo '<hr /><h3>Delete file?</h3>';
    echo '<p>Delete <strong>' . htmlspecialchars($file_location) . '</strong></p>';
    echo '<form method="POST" action="edit-pattern.php" onsubmit="return confirm(\'Are you sure?\');">';
    echo '<input type="hidden" name="delete" value="' . htmlspecialchars(basename($file_location)) . '" />';
    echo '<input type="hidden" name="delete_dir" value="' . (strpos($file_location, '/standard/') ? 'standard' : 'custom') . '" />';
    echo '<input type="submit" value="Delete" class="btn btn-danger" />';
    echo '</form>';
}
// TEST URLs
if (!empty($matched)) {
    if ($sconfig = SiteConfig::build_from_array(explode("\n", $contents))) {
        if (!empty($sconfig->test_url)) {
            echo '<hr /><h3>Test URLs</h3>';
            echo '<ul>';
            foreach ($sconfig->test_url as $test_url) {
                $ftr_test_url = $test_url;
                if (strtolower(substr($ftr_test_url, 0, 7)) == 'http://') {
                    $ftr_test_url = substr($ftr_test_url, 7);
                }
                $ftr_test_url = '../makefulltextfeed.php?url=' . urlencode($ftr_test_url);
                echo '<li>';
                echo '<a href="' . htmlspecialchars($test_url) . '" target="_blank">' . htmlspecialchars($test_url) . '</a>';
                echo ' | <a href="' . $ftr_test_url . '" target="_blank">Full-Text RSS result</a>';
                echo ' | <a href="' . $ftr_test_url . '&debug" target="_blank">Debug</a>';
                echo '</li>';
            }