<commit_before><?
//cache arrays, need to be here
$___Urls = false;

/**
* cu = Clean Up, reloads the page without any current GETs
*
* @todo Not very corpusy- although very useful
* @param string|bool $params
*/
function _cu($params = false) {
	global $_meta; //clean up, mostly for the admin
	redirect(href() . ($params ? '?' . $params : '') );
}

/**
* Redirects the users browser and prevents further code execution
*
* @param int|string $url if an id integer will redirrect to the seo url of the category. if a string redirrects to url
* @param int $code the http status code to return, eg: 301
* @param mixed $strict if true, will not attempt to full path the url
*/
function redirect($url, $code = false, $strict = false) {
	$url = href($url, false, $strict);
	if($code) {
		header('Location: ' . $url, TRUE, (int)$code);
	}else{
		header('Location: ' . $url);
	}
	
	die('A death occurred - Error in redirection... look over there!');
}

/**
* Sends a 204 header preventing the browser from loading the page, and optionally ends execution
* 
* @param bool $fatal
*/
function stopbrowser( $fatal = true ){
	header('HTTP/1.0 204 No Response', 204);
	if($fatal) { die('Browser was Stopped'); }
}

/**
* Creates a url, either from id or str
*
* @param int|string $url if an id integer will return the seo url of the category. if a string, the full path of the address
* @param bool $encode whether to encode the url
* @param bool $strict if true, will not attempt to full path the url
* @param bool|null $ssl enable/disable ssl, if null - auto
* @return string generated URL
*/
function href($url = false, $encode = true, $strict = false, $ssl = null) {
	return _::href($url, $encode, $strict, $ssl);
}

/**
* Damned simple Authorize.net Processor
*
* <code>
* $submit_data = array(
*	'x_amount'             => (double)$pricing_data['price'],
*	'x_card_num'           => $_POST['cc_number'],
*	'x_exp_date'           => (int)$_POST['cc_expir_month'] . substr( (int)$_POST['cc_expir_year'] , -2),
*	'x_card_code'          => $_POST['ccv'],
*	'x_cust_id'            => (int)$login->user_id,
*	'x_invoice_num'        => $new_order_id,  //we need to calculate this
*	'x_first_name'         => $_POST['fname'],
*	'x_last_name'          => $_POST['lname'],
*	'x_company'            => '',
*	'x_address'            => $_POST['address'] . ', ' . $_POST['address2'],
*	'x_city'               => $_POST['city'],
*	'x_state'              => $_POST['state'],
*	'x_zip'                => $_POST['zip'],
*	'x_country'            => 'USA', //may want to change if we do more
*	'x_phone'              => '',
*	'x_email'              => $login->email,
*	'x_ship_to_first_name' => $_POST['fname'],
*	'x_ship_to_last_name'  => $_POST['lname'],
*	'x_ship_to_address'    => $_POST['address'] . ', ' . $_POST['address2'],
*	'x_ship_to_city'       => $_POST['city'],
*	'x_ship_to_state'      => $_POST['state'],
*	'x_ship_to_zip'        => $_POST['zip'],
*	'x_ship_to_country'    => (!is_array($order->delivery['country'])) ? $order->delivery['country'] : $order->delivery['country']['title'],
*	'x_description'        => $description,
* );
* AuthNetProcess( $submit_data );
* </code>
* @todo merge into Creditcard class gracefully
* @param array $ProcessData array of data to send to
* @param array $rr response array return by reference<commit_msg>Spelling correction<commit_after><?
//cache arrays, need to be here
$___Urls = false;

/**
* cu = Clean Up, reloads the page without any current GETs
*
* @todo Not very corpusy- although very useful
* @param string|bool $params
*/
function _cu($params = false) {
	global $_meta; //clean up, mostly for the admin
	redirect(href() . ($params ? '?' . $params : '') );
}

/**
* Redirects the users browser and prevents further code execution
*
* @param int|string $url if an id integer will redirrect to the seo url of the category. if a string redirrects to url
* @param int $code the http status code to return, eg: 301
* @param mixed $strict if true, will not attempt to full path the url
*/
function redirect($url, $code = false, $strict = false) {
	$url = href($url, false, $strict);
	if($code) {
		header('Location: ' . $url, TRUE, (int)$code);
	}else{
		header('Location: ' . $url);
	}
	
	die('A death occurred - Error in redirection... look over there!');
}

/**
* Sends a 204 header preventing the browser from loading the page, and optionally ends execution
* 
* @param bool $fatal
*/
function stopbrowser( $fatal = true ){
	header('HTTP/1.0 204 No Response', 204);
	if($fatal) { die('Browser was Stopped'); }
}

/**
* Creates a url, either from id or str
*
* @param int|string $url if an id integer will return the seo url of the category. if a string, the full path of the address
* @param bool $encode whether to encode the url
* @param bool $strict if true, will not attempt to full path the url
* @param bool|null $ssl enable/disable ssl, if null - auto
* @return string generated URL
*/
function href($url = false, $encode = true, $strict = false, $ssl = null) {
	return _::href($url, $encode, $strict, $ssl);
}

/**
* Damned simple Authorize.net Processor
*
* <code>
* $submit_data = array(
*	'x_amount'             => (double)$pricing_data['price'],
*	'x_card_num'           => $_POST['cc_number'],
*	'x_exp_date'           => (int)$_POST['cc_expir_month'] . substr( (int)$_POST['cc_expir_year'] , -2),
*	'x_card_code'          => $_POST['ccv'],
*	'x_cust_id'            => (int)$login->user_id,
*	'x_invoice_num'        => $new_order_id,  //we need to calculate this
*	'x_first_name'         => $_POST['fname'],
*	'x_last_name'          => $_POST['lname'],
*	'x_company'            => '',
*	'x_address'            => $_POST['address'] . ', ' . $_POST['address2'],
*	'x_city'               => $_POST['city'],
*	'x_state'              => $_POST['state'],
*	'x_zip'                => $_POST['zip'],
*	'x_country'            => 'USA', //may want to change if we do more
*	'x_phone'              => '',
*	'x_email'              => $login->email,
*	'x_ship_to_first_name' => $_POST['fname'],
*	'x_ship_to_last_name'  => $_POST['lname'],
*	'x_ship_to_address'    => $_POST['address'] . ', ' . $_POST['address2'],
*	'x_ship_to_city'       => $_POST['city'],
*	'x_ship_to_state'      => $_POST['state'],
*	'x_ship_to_zip'        => $_POST['zip'],
*	'x_ship_to_country'    => (!is_array($order->delivery['country'])) ? $order->delivery['country'] : $order->delivery['country']['title'],
*	'x_description'        => $description,
* );
* AuthNetProcess( $submit_data );
* </code>
* @todo merge into Credit Card class gracefully
* @param array $ProcessData array of data to send to
* @param array $rr response array return by reference
{'fraction_non_alphanumeric': 0.17159142042897854, 'fraction_numerical': 0.0050997450127493625, 'mean_word_length': 3.442371752165223, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '2748203', 'n_tokens_mistral': 2281, 'n_tokens_neox': 2238, 'n_words': 669}