if (!empty($_GET['trackback'])) {
    $_POST['trackback'] = $_GET['trackback'];
}
// determine which step of the submit process we are on
$phase = isset($_POST["phase"]) && is_numeric($_POST["phase"]) ? $_POST["phase"] : 0;
// If show URL input box is disabled, go straight to step 2
if ($phase == 0 && Submit_Show_URL_Input == false) {
    $phase = 1;
}
switch ($phase) {
    case 0:
        // Link to this page, before starting submit process.
        do_submit0();
        break;
    case 1:
        do_submit1();
        break;
    case 2:
        do_submit2();
        break;
    case 3:
        do_submit3();
        break;
}
exit;
// enter URL before submit process
function do_submit0()
{
    global $main_smarty, $the_template;
    $main_smarty->assign('submit_rand', rand(10000, 10000000));
    $main_smarty->assign('Submit_Show_URL_Input', Submit_Show_URL_Input);
Exemple #2
0
// 		http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
include 'config.php';
include_once mnminclude . 'html1.php';
include_once mnminclude . 'tags.php';
include_once mnminclude . 'ban.php';
$globals['ads'] = false;
global $errors;
$errors = array();
if (isset($_POST["phase"])) {
    force_authentication();
    switch ($_POST["phase"]) {
        case 1:
            do_header(_('enviar historia') . " 2/3", _('enviar historia'));
            echo '<div id="singlewrap">' . "\n";
            if (!do_submit1()) {
                // Just to display error messages
                $link = new Link();
                $link->randkey = rand(10000, 10000000);
                $link->key = md5($link->randkey . $current_user->user_id . $current_user->user_email . $site_key . get_server_name());
                Haanga::Load('link/submit_empty_form.html', compact('link', 'errors'));
            }
            break;
        case 2:
            do_header(_('enviar historia') . " 3/3", _('enviar historia'));
            echo '<div id="singlewrap">' . "\n";
            if (!do_submit2()) {
                // Just to display error messages
                $link = new Link();
                $link->randkey = rand(10000, 10000000);
                $link->key = md5($link->randkey . $current_user->user_id . $current_user->user_email . $site_key . get_server_name());