Exemple #1
0
		}
	}
}

// see if we're subscribed to all lists.
if (sizeof($lists) == sizeof($already_subscribed_lists)) {
	foreach ($already_subscribed_lists as $listid => $listname) {
		$errors[] = sprintf(GetLang('FormFail_AlreadySubscribedToList'), $listname);
	}
}

/**
* We have errors? No point doing anything else. Print out the errors and stop.
*/
if (!empty($errors)) {
	DisplayErrorPage($formapi, $formtype, $errors);
	exit();
}

/**
* If there are no errors, let's do the rest of the work.
*/
$ipaddress = GetRealIp();
$subscriberapi->Set('requestip', $ipaddress);

if ($formapi->Get('requireconfirm') == true) {
	$subscriberapi->Set('confirmed', 0);
} else {
	$subscriberapi->Set('confirmed', 1);
}
        $fn = cms_join_path(dirname(__FILE__), 'templates', 'list.tpl');
        $tpl = @file_get_contents($fn);
        $hidden = $this->CreateInputHidden($id, 'view', 'list');
    } else {
        if ($res) {
            $err = strpos($res, 'err') === 0;
            if ($err) {
                $message = $this->Lang('err_list') . '<br /><br />' . $this->Lang($res);
            } else {
                $message = $this->Lang($res);
            }
        } else {
            $err = TRUE;
            $message = $this->Lang('err_list');
        }
        DisplayErrorPage($this, $smarty, $db, $params, $err, $message);
        return;
    }
}
if (!empty($params['message'])) {
    $smarty->assign('message', urldecode($params['message']));
}
$smarty->assign('hidden', $this->CreateInputHidden($id, 'bracket_id', $bracket_id) . $hidden);
$smarty->assign('start_form', $this->CreateFormStart($id, 'default', $returnid));
$smarty->assign('end_form', $this->CreateFormEnd());
$submit = null;
if ($bdata['contact']) {
    //check for match(es) scheduled & unscored
    if ($sch->UnRecorded($bracket_id)) {
        //check for valid address for results
        $funcs = new tmtComm($this);