Пример #1
0
\t\tdisplay: block;
\t\tborder-top: none;
\t\tborder-bottom: none;
\t}
\t.fups_opt_desc {
\t\tmargin-bottom: 15px;
\t}
\t.fups_opt_label {
\t\tfont-style: italic;
\t}
}
</style>
EOF;
}
$page = substr(__FILE__, strlen(FUPS_INC_ROOT));
fups_output_page_start($page, $errmsg ? $errmsg : 'FUPS options entry for ' . $valid_forum_types[$forum_type] . ' forums', $errmsg ? $errmsg : 'Scrape posts made under a particular username from a ' . $valid_forum_types[$forum_type] . ' forum.', $head_extra);
?>
			<ul class="fups_listmin">
				<li><a href="<?php 
echo $fups_url_homepage;
?>
">&lt;&lt; Back to the FUPS homepage</a></li>
			</ul>

			<h2>FUPS: Forum user-post scraper</h2>
<?php 
$script = '';
if ($errmsg) {
    echo '<p style="border: thin solid black; background-color: red;">Error: ' . $errmsg . '. Redirecting you to <a href=".">forum selection page</a> in 5 seconds.</p>';
} else {
    global $fups_url_run;
Пример #2
0
 */
require_once __DIR__ . '/common.php';
$err = '';
if (!isset($_GET['token'])) {
    $err = 'Fatal error: I did not detect a URL query parameter "token".';
} else {
    $token = $_GET['token'];
    if (validate_token($token, $err)) {
        $cancellation_filename = make_cancellation_filename($token, $err);
        if (!@file_put_contents($cancellation_filename, '') === false) {
            $err = 'A fatal error occurred: failed to write to the cancellation file.';
        }
    }
}
$page = substr(__FILE__, strlen(FUPS_INC_ROOT));
fups_output_page_start($page, 'FUPS cancellation page: cancel an in-progress task', 'Cancel an in-progress FUPS task.');
global $fups_url_run;
if (!$err) {
    ?>
			<ul class="fups_listmin">
				<li><a href="<?php 
    echo $fups_url_run;
    ?>
?token=<?php 
    echo $token . (isset($_GET['ajax']) ? '&amp;ajax=yes' : '');
    ?>
">&lt;&lt; Back to the FUPS status page</a></li>
			</ul>
<?php 
}
?>
Пример #3
0
        if ($i < count($forums_arr) - 1) {
            $forums_str .= ', ';
            $forums_str_linked .= ', ';
        } else {
            $forums_str .= ' or ';
            $forums_str_linked .= ' or ';
        }
    }
    $forums_str .= $forums_arr[$i];
    require_once __DIR__ . '/classes/C' . $forums_arr[$i] . '.php';
    $forum_class = $forums_arr[$i] . 'FUPS';
    $forums_str_linked .= '<a href="' . $forum_class::get_forum_software_homepage() . '">' . $forums_arr[$i] . '</a>';
    $enter_options_links_str .= '<a href="' . $fups_url_enter_options . '?forum_type=' . $forums_lc_arr[$i] . '">' . $forums_arr[$i] . '</a>';
    $how_identify_list_html .= '				<li><b>' . $forums_arr[$i] . '</b>: ' . $forum_class::get_msg_how_to_detect_forum() . '</li>' . "\n";
}
fups_output_page_start($page, 'FUPS: Forum user-post scraper', 'Scrape posts made under a particular username from a ' . $forums_str . ' forum.');
?>
			<h2>FUPS: Forum user-post scraper</h2>

			<br />
			<br />
			<br />

			<h3 style="text-align: center;">Select forum software <sup><a class="footnote" href="#footnote1">[1]</a></sup> to continue</h3>

			<p style="width: 100%; text-align: center;"><?php 
echo $enter_options_links_str;
?>
</p>

			<br />
Пример #4
0
Файл: run.php Проект: ezeql/fups
        $err = 'The status file for your FUPS process with token "' . $token . '" does not exist - possibly because you have already deleted it.';
    }
    $status = @file_get_contents($status_filename);
    $errs = @file_get_contents($errs_filename);
    $errs_admin = @file_get_contents($errs_admin_filename);
}
$head_extra = '';
if (!$err) {
    global $fups_url_run, $fups_url_homepage;
    get_failed_done_cancelled($status, $done, $cancelled, $failed);
    if (!isset($_GET['ajax']) && ((!isset($_GET['last_status']) || $status != $_GET['last_status']) && !$done && !$failed && !$err)) {
        $head_extra = '<meta http-equiv="refresh" content="' . FUPS_META_REDIRECT_DELAY . '; URL=' . $fups_url_run . '?token=' . htmlspecialchars(urlencode($token)) . '&amp;last_status=' . htmlspecialchars(urlencode($status)) . '" />';
    }
}
$page = substr(__FILE__, strlen(FUPS_INC_ROOT));
fups_output_page_start($page, 'FUPS progress', 'Monitor the progress of the scraping script.', $head_extra);
?>
			<ul class="fups_listmin">
				<li><a href="<?php 
echo $fups_url_homepage;
?>
">&lt;&lt; Back to the FUPS homepage</a></li>
			</ul>

			<h2>FUPS progress</h2>
<?php 
if ($file_errs) {
    ?>
			<div class="fups_error"><?php 
    echo 'Apologies, however the following non-fatal error(s) occurred. These may affect updating and/or your final output: ' . $file_errs;
    ?>
Пример #5
0
 *              Part of the web app functionality of FUPS.
 */
require_once __DIR__ . '/common.php';
$err = false;
if (empty($_POST['token']) || empty($_POST['email_address'])) {
    $err = 'Fatal error: one or both of the URL parameters "token" and "email_address" were not set.';
}
if (!$err) {
    $msg = 'The contact email address for the FUPS process "' . $_POST['token'] . '" is <' . $_POST['email_address'] . '>.' . "\n\n" . 'Any message the user included follows:' . "\n\n" . $_POST['message'];
    $headers = 'From: ' . FUPS_EMAIL_SENDER;
    if (!mail(FUPS_EMAIL_RECIPIENT, 'Contact email address for FUPS process ' . $_POST['token'], $msg, $headers)) {
        $err = fups_notify_email_address_fail_msg($_POST['token']);
    }
}
$page = substr(__FILE__, strlen(FUPS_INC_ROOT));
fups_output_page_start($page, 'FUPS: notifying me of your contact email address', 'Notifying me of your contact email address so that I can let you know if/when I fix the error you experienced with the FUPS scraping script.');
if ($err) {
    ?>
			<div class="fups_error"><?php 
    echo $err;
    ?>
</div>
<?php 
} else {
    ?>
			<h2>FUPS: Email sent successfully</h2>
			
			<p>Thank you for sharing your email address with me. I will get back to you on this error and your message (if any) as soon as I can.</p>
<?php 
}
fups_output_page_end($page);
Пример #6
0
    if (!is_file($filename)) {
        if ($add_err_if_file_not_present) {
            $err .= $err ? ' Another' : 'An';
            $err .= ' error occurred: the ' . $name . ' file does not exist on disk; possibly you have already deleted it or it was never created in the first place.';
        }
    } else {
        if (!unlink($filename)) {
            $err .= $err ? ' Another' : 'An';
            $err .= ' error occurred: failed to delete the ' . $name . ' file ' . ($sensitive ? '(contains username and password if you supplied them).' : '(does NOT contain either username or password).');
        } else {
            $num_files_deleted++;
        }
    }
}
$page = substr(__FILE__, strlen(FUPS_INC_ROOT));
fups_output_page_start($page, 'FUPS: file deletion page', 'Permanently remove from the web server all files used to scrape your posts.');
?>
			<ul class="fups_listmin">
				<li><a href="<?php 
echo $fups_url_homepage;
?>
">&lt;&lt; Back to the FUPS homepage</a></li>
			</ul>

			<h2>FUPS: file deletion page</h2>
<?php 
if ($err) {
    ?>
			<p class="fups_error"><?php 
    echo $err;
    ?>