KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/academic/demo/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/academic/demo/STdemoCheckIn.php
<?php 
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_StudentTrackerV = "mysql.web.rcn.net";
$database_StudentTrackerV = "academicassetmanagement_com";
$username_StudentTrackerV = "Admin";
$password_StudentTrackerV = "snarf16";
$StudentTrackerV = mysql_connect($hostname_StudentTrackerV, $username_StudentTrackerV, $password_StudentTrackerV) or trigger_error(mysql_error(),E_USER_ERROR); ?>
<?php
session_start(); 
$_SESSION['Teacher'] = $_POST['Teacher']; // store session data
//echo "Pageviews = ". $_SESSION['views']; //retrieve data
$_SESSION['StudentList'] = $_POST['StudentList2']
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
  $updateSQL = sprintf("UPDATE `asset tagged textbooks` SET `Date Checked In`=%s WHERE `Asset Tag`=%s",
                       GetSQLValueString($_POST['Date'], "date"),
                       GetSQLValueString($_POST['AssetTagBelz'], "text"));

  mysql_select_db($database_StudentTrackerV, $StudentTrackerV);
  $Result1 = mysql_query($updateSQL, $StudentTrackerV) or die(mysql_error());
}

$colname_RecordsetBelz = "-1";
if (isset($_POST['AssetTagBelz'])) {
  $colname_RecordsetBelz = $_POST['AssetTagBelz'];
}
mysql_select_db($database_StudentTrackerV, $StudentTrackerV);
$query_RecordsetBelz = sprintf("SELECT * FROM `asset tagged textbooks` WHERE `Asset Tag` = %s ORDER BY `Asset Tag` ASC", GetSQLValueString($colname_RecordsetBelz, "text"));
$RecordsetBelz = mysql_query($query_RecordsetBelz, $StudentTrackerV) or die(mysql_error());
$row_RecordsetBelz = mysql_fetch_assoc($RecordsetBelz);
$totalRows_RecordsetBelz = mysql_num_rows($RecordsetBelz);

$colname_RecordsetTeacherStudentList = "-1";
if (isset($_SESSION['Teacher'])) {
  $colname_RecordsetTeacherStudentList = $_SESSION['Teacher'];
}
mysql_select_db($database_StudentTrackerV, $StudentTrackerV);
$query_RecordsetTeacherStudentList = sprintf("SELECT Students FROM students WHERE `Class` = %s ORDER BY Students ASC", GetSQLValueString($colname_RecordsetTeacherStudentList, "text"));
$RecordsetTeacherStudentList = mysql_query($query_RecordsetTeacherStudentList, $StudentTrackerV) or die(mysql_error());
$row_RecordsetTeacherStudentList = mysql_fetch_assoc($RecordsetTeacherStudentList);
$totalRows_RecordsetTeacherStudentList = mysql_num_rows($RecordsetTeacherStudentList);
?>
<?php
mysql_select_db($database_StudentTrackerV, $StudentTrackerV);
$query_RecordsetBelz = "SELECT * FROM `asset tagged textbooks`";
$RecordsetBelz = mysql_query($query_RecordsetBelz, $StudentTrackerV) or die(mysql_error());
$row_RecordsetBelz = mysql_fetch_assoc($RecordsetBelz);
$colname_RecordsetBelz = "-1";
if (isset($_POST['AssetTagBelz'])) {
  $colname_RecordsetBelz = $_POST['AssetTagBelz'];
}
mysql_select_db($database_StudentTrackerV, $StudentTrackerV);
$query_RecordsetBelz = sprintf("SELECT * FROM `asset tagged textbooks` WHERE `Asset Tag` = %s ORDER BY `Asset Tag` ASC", GetSQLValueString($colname_RecordsetBelz, "text"));
$RecordsetBelz = mysql_query($query_RecordsetBelz, $StudentTrackerV) or die(mysql_error());
$row_RecordsetBelz = mysql_fetch_assoc($RecordsetBelz);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>StudentTracker Demo CheckIn</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="layout.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/bgstretcher.js" type="text/javascript"></script>
<script src="js/bg-init.js" type="text/javascript"></script>
<script src="/SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script src="/SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<!--[if lt IE 7]>
	<link href="ie_style.css" rel="stylesheet" type="text/css" />
   <script type="text/javascript" src="js/ie_png.js"></script>
   <script type="text/javascript">
       ie_png.fix('.png');
   </script>
<![endif]-->
<link href="/SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<link href="/SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function MM_setTextOfTextfield(objId,x,newText) { //v9.0
  with (document){ if (getElementById){
    var obj = getElementById(objId);} if (obj) obj.value = newText;
  }
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<body id="page1">
  <p>&nbsp;</p>
  <div id="main">
    <!-- header -->
    <div id="header">
      <div class="wrapper">
      	<div class="logo">
       	  <h1><a href="index.html"><img src="/Logo.JPG" alt="" width="580" height="123" /></a></h1>
          <h1><span>Academic asset management, inc.</span></h1>
        </div>
        <!-- .nav -->
        <ul class="nav">
        	<li class="item1"><a href="index-1.html">Home</a></li>
          <li class="item2"><a href="index-2.html">About us</a></li>
          <li class="item3"><a href="index-3.html">services</a></li>
          <!--<li class="item4"><a href="index-4.html">projects</a></li>-->
          <li class="item5"><a href="index-5.html">contact</a></li>
        </ul>
        <!-- /.nav -->
      </div>
    </div>
    <!-- content -->
    <div id="content">
    	<div class="main-message">
    	  <div id="TabbedPanels1" class="TabbedPanels">
      	    <ul class="TabbedPanelsTabGroup">
      	      <li class="TabbedPanelsTab" tabindex="0">StudentTracker Demo<br />
      	      </li>
</ul>
      	    <div class="TabbedPanelsContentGroup">
      	      <div class="TabbedPanelsContent">
      	        <form action="<?php echo $editFormAction; ?>" name="form1" id="form1" method="POST">
      	          <p>&nbsp;</p>
   	            
      	          <p><span id="sprytextfield1">
                  <label>Asset Tag
                    <input type="text" name="AssetTagBelz" id="AssetTagBelz" />
                    <body OnLoad="document.form1.AssetTagBelz.focus();">
                  </label>
                  <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldMinCharsMsg">Minimum number of characters not met.</span><span class="textfieldMaxCharsMsg">Exceeded Asset Tag Length<br />
                  .</span></span>
      	            <label>
      	              <input type="submit" name="ButtonBelz" id="ButtonBelz" value="CheckIn"/>
      	            </label>
      	          </p>
      	          <p>&nbsp;<?php echo $row_RecordsetBelz['Title']; ?></p>
      	          <input type="hidden" name="MM_update" value="form1" />
      	          <label>
      	            <input name="Teacher2" type="text" id="Teacher" value="<?php echo $_SESSION['Teacher']; ?>" readonly="readonly" />
      	          </label>
      	          <label>
      	            <input name="StudentList2" type="text" id="StudentList2" value="<?php echo $_SESSION['StudentList']; ?>" readonly="readonly" />
   	              </label>
      	          <label>
      	            <input name="Date" type="text" id="Date" value="<?php echo date("Y-m-d") ?>" readonly="readonly" />
   	              </label>
      	          <input type="hidden" name="MM_update" value="form1" />
                </form>
      	      </div>
</div>
   	      </div>
      	  <form action="" id="Form2" onsubmit="MM_openBrWindow('STdemoDistrictReport.php','','')">
      	    <p>&nbsp;</p>
      	    <p>
      	      <label>StudentList
      	        <select name="StudentList" id="StudentList" onchange="document.form1.StudentList2.value=this.options[this.selectedIndex].value">
      	          <?php
do {  
?>
      	          <option value="<?php echo $row_RecordsetTeacherStudentList['Students']?>"><?php echo $row_RecordsetTeacherStudentList['Students']?></option>
      	          <?php
} while ($row_RecordsetTeacherStudentList = mysql_fetch_assoc($RecordsetTeacherStudentList));
  $rows = mysql_num_rows($RecordsetTeacherStudentList);
  if($rows > 0) {
      mysql_data_seek($RecordsetTeacherStudentList, 0);
	  $row_RecordsetTeacherStudentList = mysql_fetch_assoc($RecordsetTeacherStudentList);
  }
?>
   	            </select>
      	      </label>
            </p>
      	    <p>&nbsp;
      	      <label>
      	        <input name="Class Report" type="button" id="Class Report" onclick="MM_openBrWindow('/STdemoReport.php','','')" value="Class Report" />
      	      </label>
      	      <label>
      	        <input name="District Report" type="button" id="District Report" onclick="MM_openBrWindow('/STdemoDistrictReport.php','','')" value="Outstanding Report" />
   	          </label>
      	      <label>
      	        <input name="GoTo CheckOut" type="button" id="GoTo CheckOut" onclick="MM_goToURL('parent','/STdemoCheckOut.php');return document.MM_returnValue" value="GoTo CheckOut" />
   	          </label>
      	    </p>
      	  </form>
      	  <p>.</p>
    	</div>
    </div>
  </div>
  <!-- footer -->
  <div id="footer">
  	<div class="container">
    	<div class="indent">
        <div class="wrapper">
          <div class="fleft">AAM &copy; 2010</div>
          <div class="fright"><a href="#" class="rss">RSS</a></div>
        </div>
      </div>
    </div>
  </div>
<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {minChars:14, maxChars:14});
var spryradio2 = new Spry.Widget.ValidationRadio("spryradio2");
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {minChars:14, maxChars:14});
var spryradio3 = new Spry.Widget.ValidationRadio("spryradio3");
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {minChars:14, maxChars:14});
var spryradio4 = new Spry.Widget.ValidationRadio("spryradio4");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {minChars:14, maxChars:14});
//-->
</script>
</body>
</html>
<?php
mysql_free_result($RecordsetBelz);

mysql_free_result($RecordsetTeacherStudentList);

mysql_free_result($RecordsetBelz);
?>

Anon7 - 2021