<commit_before><?php 
session_start(); 
include('lib/config.php');
include('lib/db.class.php');
include('include_classes.php');
include('php_classes/anno.class.php');
include('functions.php');

ini_set('display_errors', 1);
error_reporting(E_ALL);

$db = new Db($dbConfig);
$error = new error();

c_cookie::enforce_log();

//*Permissions
$user_id = $_SESSION['user_id']; 
$admin_p = $_SESSION['admin'];
$teacher_p = $_SESSION['teacher'];
$club_p = $_SESSION['club'];
$sports_p = $_SESSION['sports'];
$staff_p = $_SESSION['staff'];

$submitted = $_REQUEST['submitted']; //?Make a variable called submit that goes through request. If you're just coming to the page, submit should't exist.
$page_type = $_REQUEST['page_type']; //?We are going to have to add this in. page_type can equal "create" or "edit"

//*Check the page_type. If "create", start creating
if($submitted == "true") {
	$anno = new anno();
	$check_subtype = $anno->set_subtype_ids();
	
	if(!$check_subtype) {
		if($page_type = "create") {
			$anno->create_announcement();
		} 
	}
}
<commit_msg>turn off errors<commit_after><?php 
session_start(); 
include('lib/config.php');
include('lib/db.class.php');
include('include_classes.php');
include('php_classes/anno.class.php');
include('functions.php');

ini_set('display_errors', 0);
error_reporting(E_ALL);

$db = new Db($dbConfig);
$error = new error();

c_cookie::enforce_log();

//*Permissions
$user_id = $_SESSION['user_id']; 
$admin_p = $_SESSION['admin'];
$teacher_p = $_SESSION['teacher'];
$club_p = $_SESSION['club'];
$sports_p = $_SESSION['sports'];
$staff_p = $_SESSION['staff'];

$submitted = $_REQUEST['submitted']; //?Make a variable called submit that goes through request. If you're just coming to the page, submit should't exist.
$page_type = $_REQUEST['page_type']; //?We are going to have to add this in. page_type can equal "create" or "edit"

//*Check the page_type. If "create", start creating
if($submitted == "true") {
	$anno = new anno();
	$check_subtype = $anno->set_subtype_ids();
	
	if(!$check_subtype) {
		if($page_type = "create") {
			$anno->create_announcement();
		} 
	}
}

{'fraction_non_alphanumeric': 0.18885741265344666, 'fraction_numerical': 0.0009442870632672333, 'mean_word_length': 5.857605177993528, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1150827', 'n_tokens_mistral': 755, 'n_tokens_neox': 734, 'n_words': 174}