Location: PHPKode > projects > Homeless Mangement Information System > hmis/add_organizations.php
<?php
$page_access_levels = ":20:";

////Header for every page that finds the include directory, connects to db, authenticates user access 
include("initialize_pointer.php");
if(!include($include_root."authenticate.inc")){echo "No Authentication"; exit; };

$page_title = "Add ".$organization_term;
$page_id = "add_organizations";
$page_profile = "New ".$organization_term." Information";
$instructions .= "Add \"".$organization_term."\" to the system by inputting their info below. ";
	
include($include_root."Questions_into_array_class.inc");
include($include_root."questions_display.inc");
include($include_root."Questions_answers_validation_class.inc");
include($include_root."head.inc");	
include($include_root."template_parser.inc");
include($include_root."add_organization_class.inc");
include($include_root.'passwords_class.inc');
include($include_root."user_info_functions.inc");
include($include_root."questions_into_tags_function.inc");
include($include_root."page_elements_display.inc");
include($include_root."permissions_class.inc");
include($include_root."services_functions.inc");

$quest = new Load_new_entity_questions();
$quest->load_new_org_questions(TRUE);

//If a form is submitted from a page with the same $page_id, process it
if ( $_POST['form_submitted'] == $page_id ){
	//Put the relevant question attributes into an array
	//$pull_questions = new Questions_into_array ("add_orgs", $access_level, $org_id, $group_id, "display");
	//$pull_questions = load_new_org_questions();

	//Validate the answers against the questions attributes pulled into an array above
	$validation = new Questions_answers_validation($quest->questions, $quest->question_elements, $form_answer);
	//$validation->Questions_answers_validation($pull_questions->questions, $pull_questions->question_elements, $form_answer);

	if (!$question_validation_error)    {
    
		$insert_login = new Add_organization ($validation->vetted_value, $group_id);
		//If no validation errors appeared in "Add_organization", reset the form
		if (!$question_validation_error) {$validation->vetted_form_answer = "";}
    }
}

//Pull appropriate questions attributes into an array (based on page, user, org, and access level) for display
//$pull_questions_display = new Questions_into_array ("add_orgs", $access_level, $org_id, $group_id, "display");
//$pull_questions_display = load_new_org_questions();
//$pull_questions_display = new Load_new_entity_questions();

//Define the values for tags contained in the html template
$tag_values["{FORM_START}"] = form_start ();
$tag_values["{FORM_END}"] = form_end ("Submit New ".$organization_term." Info", 1);
$tag_values["{PAGE TITLE}"] = page_title_table();
$tag_values["{MENU}"] = menu();
$tag_values["{HEAD}"] = head ($page_title, $head_page_specific, $head_dynamic_style);
$tag_values["{FOOTER}"] = footer();
	
	
questions_into_tags ($quest->questions, $quest->question_elements, $validation->vetted_form_answer);
	
template_parser ("add_groups.html", $tag_values);
	//template_parser ($page_id.".html", $pull_questions_display->questions, $pull_questions_display->question_elements, $tag_values, $validation->form_answer);
?>
Return current item: Homeless Mangement Information System