<?php
	$act=$_GET['act'];

	switch ($act){
		case 'update_sName':
			$sid=$_GET['sid'];
			$sName=$_GET['sName'];
			update_sName($sid,$sName);
			break;
		case 'update_sUrl':
			$sid=$_GET['sid'];
			$sUrl=$_GET['sUrl'];
			update_sUrl($sid,$sUrl);
			break;
	}


	function update_sName($sid,$sName){
		include($_SERVER['DOCUMENT_ROOT'] ."/_ps2020/config/connect.php");

			$result = $conn->query("UPDATE school SET school_name='".$sName."' WHERE school_id='".$sid."'");

		$conn->close();
	}

	function update_sUrl($sid,$sUrl){
		include($_SERVER['DOCUMENT_ROOT'] ."/_ps2020/config/connect.php");

			$result = $conn->query("UPDATE school SET specific_sAdminCode='".$sUrl."' WHERE school_id='".$sid."'");

		$conn->close();
	}
?>