<commit_before><?php

/*

NO HTML IN THIS FILE!!

// Name: alert.php
// Author:  <NAME> <EMAIL>
// Version: 0.5 beta
// Date: 6th Jan 2005
// Description:  This file contains ALERT class.

The ALERT class allows us to fetch and alter data about any email alert.
Functions here:

ALERT
	fetch($confirmed, $deleted)		Fetch all alert data from DB.
	listalerts()					Lists all live alerts
	add($details, $confirmation_email)	Add a new alert to the DB.
	send_confirmation_email($details)	Done after add()ing the alert.
	email_exists($email)			Checks if an alert exists with a certain email address.
	confirm($token)				Confirm a new alert in the DB
	delete($token)				Remove an existing alert from the DB
	id_exists()				Checks if an alert_id is valid.
	
	Accessor functions for each object variable (eg, alert_id()  ).

To create a new alert do:
	$ALERT = new ALERT;
	$ALERT->add();

You can then access all the alert's variables with appropriately named functions, such as:
	$ALERT->alert_id();
	$ALERT->email();
etc.

*/

// CLASS:  ALERT

function alert_confirmation_advert($details) {
	global $THEUSER;

	$adverts = array(
		array('hfymp', '<h2 style="border-top: dotted 1px #999999; padding-top:0.5em; margin-bottom:0">Get email from your MP in the future</h2> <p style="font-size:120%;margin-top:0;">and have a chance to discuss what they say in a public forum [form]Sign up to HearFromYourMP[/form]'),
		array('fms', '<p>Got a local problem like potholes or flytipping in your street?<br><a href="http://www.fixmystreet.com/">Report it at FixMyStreet</a></p>'),
		array('gny', '<h2>Are you a member of a local group&hellip;</h2> <p>&hellip;which uses the internet to coordinate itself, such as a neighbourhood watch? If so, please help the charity that runs TheyWorkForYou by <a href="http://www.groupsnearyou.com/">adding some information about it</a> to our new site, GroupsNearYou.</p>'),
		array('twfy_alerts', ''),
	);

	if ($THEUSER->isloggedin()) {
		$advert_shown = crosssell_display_advert('twfy', $details['email'], $THEUSER->firstname() . ' ' . $THEUSER->lastname(), $THEUSER->postcode(), $adverts);
	} else {
		$advert_shown = crosssell_display_advert('twfy', $details['email'], '', '', $adverts);<commit_msg>Link direct to GNY add page.<commit_after><?php

/*

NO HTML IN THIS FILE!!

// Name: alert.php
// Author:  <NAME> <EMAIL>
// Version: 0.5 beta
// Date: 6th Jan 2005
// Description:  This file contains ALERT class.

The ALERT class allows us to fetch and alter data about any email alert.
Functions here:

ALERT
	fetch($confirmed, $deleted)		Fetch all alert data from DB.
	listalerts()					Lists all live alerts
	add($details, $confirmation_email)	Add a new alert to the DB.
	send_confirmation_email($details)	Done after add()ing the alert.
	email_exists($email)			Checks if an alert exists with a certain email address.
	confirm($token)				Confirm a new alert in the DB
	delete($token)				Remove an existing alert from the DB
	id_exists()				Checks if an alert_id is valid.
	
	Accessor functions for each object variable (eg, alert_id()  ).

To create a new alert do:
	$ALERT = new ALERT;
	$ALERT->add();

You can then access all the alert's variables with appropriately named functions, such as:
	$ALERT->alert_id();
	$ALERT->email();
etc.

*/

// CLASS:  ALERT

function alert_confirmation_advert($details) {
	global $THEUSER;

	$adverts = array(
		array('hfymp', '<h2 style="border-top: dotted 1px #999999; padding-top:0.5em; margin-bottom:0">Get email from your MP in the future</h2> <p style="font-size:120%;margin-top:0;">and have a chance to discuss what they say in a public forum [form]Sign up to HearFromYourMP[/form]'),
		array('fms', '<p>Got a local problem like potholes or flytipping in your street?<br><a href="http://www.fixmystreet.com/">Report it at FixMyStreet</a></p>'),
		array('gny', '<h2>Are you a member of a local group&hellip;</h2> <p>&hellip;which uses the internet to coordinate itself, such as a neighbourhood watch? If so, please help the charity that runs TheyWorkForYou by <a href="http://www.groupsnearyou.com/add/about/">adding some information about it</a> to our new site, GroupsNearYou.</p>'),
		array('twfy_alerts', ''),
	);

	if ($THEUSER->isloggedin()) {
		$advert_shown = crosssell_display_advert('twfy', $details['email'], $THEUSER->firstname() . ' ' . $THEUSER->lastname(), $THEUSER->postcode(), $adverts);
	} else {
		$advert_shown = crosssell_display_advert('twfy', $details['email'], '', '', $adverts);
{'fraction_non_alphanumeric': 0.13615023474178403, 'fraction_numerical': 0.0111781801922647, 'mean_word_length': 4.55776397515528, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '959633', 'n_tokens_mistral': 1561, 'n_tokens_neox': 1448, 'n_words': 508}