<?php

  //  include("../admin/GoTool/cat.inc");
  include("../cat.inc");
$connection = @mysqli_connect($host,$user,$password) or die(mysqli_error($connection));
$db = @mysqli_select_db($connection,$db_name) or die(mysqli_error($connection));

   $prog300="report/SaveDataGG.php";
  $prog301="report/getCSV.php";
    $prog302="report/export2.php";
$prog399="report/test99.php";
$logged=$_GET['log'];
                       $viewmail='';
                       $display_block667='';
                       
                       
  $sbadG=0;
 
 	if (isset($_POST['sbadG'])) {
  	$sbadG=$_POST['sbadG'];
}                     
                   
                   
//////                   
                   
$showchart=$_POST['Ctext_account34'];
$grade=$_POST['Boo2'];
	                
	 
$signD=$_POST['createD'];
$port_idz=$_POST['stringSS'] ;           
$grade=$_POST['MIT'];
$GgradeSum=$_POST['dir_id'];
$hi2=$_POST['admin_id'];
$showchart=$_POST['Bamboo'];
$x2=$_POST['TXBoo'];
$x22=$_POST['TXXBoo'];
$Pgrade=$_POST['upload'];
$Tgrade=$_POST['product'] ;           
             
                   
                   
                   
                   
                   
////                       
                       

 $Assessment1="Assessment";  //This is on the report side
  $Assessment2="Assessment";  //This is on the back end side to edit survey
//log=You are logged in as <span>admin</span>
//$logged = substr("abcdef", 0, -1);  // returns "abcde"
//$rest = substr("abcdef", 2, -1);  // returns "cde"
$sig="../../../../sig";
$logged1=substr($logged , 0,7);
$logged_test="You are";
if ($logged1==$logged_test){
$logged = substr($logged, 27, -7);  // returns "abcde"
}

// start the session
$k=0;
$user_gid=0;
   $Aname='';
      $Fname=''; 
      
      $display_CATprod='';

if (isset($_POST['admin_id'])) {
  	$user_gid=$_POST['admin_id'];
  	}
  if ($user_gid>0){
 $sq112a5="SELECT * FROM $table_name49 where user_id='$user_gid'";
   $result33a8001 = @mysqli_query($connection,$sq112a5) or die(mysqli_error($connection));
   $row22rAb1 =mysqli_fetch_array($result33a8001,MYSQLI_ASSOC);
      $Aname=$row22rAb1['firstname'];
      $Fname=$row22rAb1['lastname']; 		  	
}

if ($user_gid==0){

 $sq112a5="SELECT * FROM $table_name36 where customer_id='$logged'";
   $result33a8001 = @mysqli_query($connection,$sq112a5) or die(mysqli_error($connection));
   $row22rAb1 =mysqli_fetch_array($result33a8001,MYSQLI_ASSOC);
      $Aname=$row22rAb1['firstname'];
      $Fname=$row22rAb1['lastname']; 

}



$earnReq=0;
$reqPoint=0;
$reqCredit=0;
$ReqPaid=0;
$NReqPaid=0;
//$cust_id=$_POST['text_account34'];

$startd=$_POST['product'];


$rangeA=$_POST['rangeN'];
$rangeA1=$_POST['rangeN1'];

$startd="1/1/$rangeA";

if($startd!=$blink){

$startd =date("Y-m-d",strtotime("$startd"));
$startd1 =date("Y-m-d",strtotime("$startd + 1 day"));

}

if($startd==$blink){

$startyd=date("Y");

$startd =date("Y-m-d");
$startd =date("Y-m-d",strtotime("January 1, $startyd"));

$startd1 =date("Y-m-d",strtotime("$startd + 1 day"));
}



$finishd=$_POST['upload'];
$finishd="12/31/$rangeA1";

if($finishd==$blink){
$finishd =date("Y-m-d",strtotime("$startd + 365 day"));

}else{

$finishd= date("Y-m-d",strtotime("$finishd")); 
}
$finishd1= date("Y-m-d",strtotime("$finishd - 1 day")); 

//echo " $startd - $startd1  yeach  F= $finishd -  $finishd1   ";

$Rtoday = date("Y-m-d h:i:s");

$RtodayTT=strtotime($Rtoday);

$finishdTT =strtotime($finishd);

if ($finishdTT < $RtodayTT){
$startyd=date("Y");

$startydMon=date("F", strtotime("$startd")      );

$startydDay=date("d", strtotime("$startd")      );

$startd =date("Y-m-d",strtotime("$startydMon $startydDay, $startyd"));

$startd1 =date("Y-m-d",strtotime("$startd + 1 day"));

$finishd =date("Y-m-d",strtotime("$startd + 365 day"));
$finishd1= date("Y-m-d",strtotime("$finishd - 1 day")); 

}

$fname=$_POST['first'];
$lname=$_POST['last'];
$ttitle=$_POST['MIT'];
$divisor=$_POST['dir_id'];
$stringSS=$_POST['stringSS'];

$categ=$_POST['stringSS'];

$Rtoday = date("Y-m-d h:i:s");
$Rtoday88 = date("Y-m-d");

// $sq112a="SELECT * FROM $table_name80 WHERE survey_id = '$survey_idR' AND create_date between '$startd' AND '$tomorr' $finishd ";
    
$startda =date("m/d/Y",strtotime("$startd"));
$finishda =date("m/d/Y",strtotime("$finishd"));

$startda1 =date("m-d-Y",strtotime("$startd"));
$finishda1 =date("m-d-Y",strtotime("$finishd"));

  $display_title="$ttitle Report  for dates: $startda- $finishda";
  $prog="stakeholdercredits/creditsRep2.php";

$tok=$_GET['token'];
$bar=$_GET['ean'];
//$tok= session_id();
//include("../cat.inc");


$price="Free";
$tab1="Event Details";
$tab2="Event Description";
$tab3="Register Here";


$cativeG[0]="Not Active";
$cativeG[1]="Active";


 if (isset($_POST['jedID2'])) {
	$jedID2=$_POST['jedID2'];
}

$Rtoday = date("Y-m-d h:i:s");
$Rtoday_calc=strtotime("$Rtoday");
    $display_back="<FORM><INPUT TYPE=\"BUTTON\" VALUE=\"Back\" ONCLICK=\"history.go(-1)\"></FORM><br/> ";
  $display_back="  
  <input type=\"button\" value=\"Close this window\" onclick=\"self.close()\">
  

  <!---
   <a href=\"#\" onclick=\"close_window();return false;\">Close This Window</a>--><br/><br/>";
///




 //Mark:<select name=\"status\">
	//    <option value=\"1\">Complete</option>
	//    <option value=\"-1\">Withdraw</option>
	//    <option value=\"-2\">Transfer</option>
	//    </select><br/>
	$CCstatus[0]="Not Completed"; 
	$CCstatus[1]="Completed";
	$CCstatus[-1]="Withdrawn";
	$CCstatus[-2]="Credits Transferred";






////

 // $product_id=171;
  $path=89;                  //deletes from customer

 

if($sbadG==11099999){

//$file_E_id2=$_POST['file_E_id'];

//$port_idzA1=$_POST['survey_id'];
$rangeA=$_POST['rangeN'];
$rangeA1=$_POST['rangeN1'];
//$rangeAC1=$_POST['rangeC1'];

//$sq112azE9= "UPDATE $table_name80 SET  van1='99' WHERE map_id ='$file_E_id2' ";

////$sq112azE9="DELETE FROM $table_name806A WHERE information ='$file_E_id2'";
  //   $result3319 = @mysqli_query($connection,$sq112azE9) or die(mysqli_error($connection));
  
  $droppy="Yes this is the Summary for Range: 1-1-$rangeA AND 12-31-$rangeA1 <br/>  
  ";
  
  
// include('../../stakeholdercredits/creditsRep.php');
  
  $droppy .="$stuffx";
  
  
$mess="<div class=success> Summary for Range: 1-1-$rangeA AND 12-31-$rangeA1.</div>";

$jedID2=0;

} 










  





         if( $jedID2==0){
$listcreditsA='';
$listcredits='';

$CAT_id=$categ;

$dd=0;
$tt=0;
$ff=0;
$buildlist ='<td>ID</td><td>First Name</td><td>Last Name</td>';  
$buildlistC ='ID,First Name, Last Name,'; 
 

//$sql33cat="SELECT distinct $table_name36001.customer_id, $table_name36.customer_id FROM $table_name36001 INNER JOIN $table_name36 ON $table_name36001.customer_id=$table_name36.customer_id WHERE $table_name36001.type_id='900' AND $table_name36001.status !='0' Order by $table_name36.lastname, $table_name36.firstname ";

$sql33cat="SELECT $table_name54A.product_id, $table_name53.product_id, $table_name53.name FROM $table_name54A INNER JOIN $table_name53 ON $table_name54A.product_id=$table_name53.product_id WHERE $table_name54A.category_id='$CAT_id'  Order by $table_name53.name ";


// $sql33cat ="SELECT * FROM $table_name54A where category_id='$CAT_id' ";
 
 //echo  $sql33cat ;
     $result331cat = @mysqli_query($connection,$sql33cat) or die(mysqli_error($connection));
    while ($row1a1cat = mysqli_fetch_array($result331cat)) {
 $catproduct9= $row1a1cat['product_id'];
 
 $countG[$tt]=$catproduct9;
 $tt=$tt+1;
 
  $pty[$catproduct9]=1;
 	$Processor="
N/A
	";
 
 
 

 $sql33cat1 ="SELECT * FROM $table_name53 where product_id='$catproduct9'  ";
//echo $sql33cat1;
     $result331cat1 = @mysqli_query($connection,$sql33cat1) or die(mysqli_error($connection));
    while ($row1a1cat1 = mysqli_fetch_array($result331cat1)) {
 $nameproduct= $row1a1cat1['name'];
  $Tnameproduct[$catproduct9]= $row1a1cat1['name'];
  $Cv[$dd]=$catproduct9;
  $dd=$dd+1;
  $build[$ff]=$catproduct9;
  $ff=$ff+1;
  
$buildlist .="<td>$nameproduct</td>";  
$buildlistC .="$nameproduct,"; 
 

}

 $creditA= '0';
  $reqA= 'NO';
   $CreqA=0;

 $sql33cat1 ="SELECT * FROM $table_name54 where product_id='$catproduct9' ";
///echo $sql33cat1;
     $result331cat1 = @mysqli_query($connection,$sql33cat1) or die(mysqli_error($connection));
    while ($row1a1cat1 = mysqli_fetch_array($result331cat1)) {
 $creditA= $row1a1cat1['location'];
 $creditAA[$catproduct9]=$creditA;
 $RRcreditAA[$catproduct9]='0';
 $ERcreditAA[$catproduct9]=$creditA;
 $RcreditAA[$catproduct9]='NO';
  $reqA1= $row1a1cat1['ABC_code'];
  
  
  $RreqA1[$catproduct9]=$reqA1;
  
  $RCreqA[$catproduct9]=0;
  
  $ty[$catproduct9]=0;
  
 
  
 /// If ($reqA1=='A'){
  If ($RreqA1[$catproduct9]=='A'){
  $reqA= 'YES';
  $RcreditAA[$catproduct9]='YES';
  $RRcreditAA[$catproduct9]=$creditA;
  $ERcreditAA[$catproduct9]=0;
  $reqPoint=$reqPoint+$creditA;
  $CreqA=1;
  
  $RCreqA[$catproduct9]=1;
  
  $ty[$catproduct9]=$creditA;
  
  }
//echo $nameproduct;


}

//echo "$nameproduct; - CreqA- $CreqA reqCredit-$reqCredit creditA=$creditA +$earnReq=$earnReq+$ty[$catproduct9] <br/>";
}


///$sq112abSzgg="SELECT DISTINCT customer_id FROM $table_name36001 WHERE customer_id >'0' AND type_id='900' AND date_added between '$startd' AND '$finishd'   ";
//echo "$sq112abSzgg <br/>";


//SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate FROM Orders INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID;

//$sq112abSzgg="SELECT distinct $table_name36001.customer_id, $table_name36.customer_id, $table_name36.lastname,$table_name36.firstname, $table_name36001.type_id, $table_name36001.date_added, $table_name36001.status FROM $table_name36001 INNER JOIN $table_name36 ON $table_name36001.customer_id=$table_name36.customer_id WHERE $table_name36001.type_id='900' Order by $table_name36.lastname, $table_name36.firstname ";
$sq112abSzgg="SELECT distinct $table_name36001.customer_id, $table_name36.customer_id FROM $table_name36001 INNER JOIN $table_name36 ON $table_name36001.customer_id=$table_name36.customer_id WHERE $table_name36001.type_id='900' AND $table_name36001.status !='0' Order by $table_name36.lastname, $table_name36.firstname ";

 
   $result222abT9zgg = @mysqli_query($connection,$sq112abSzgg) or die(mysqli_error($connection));
		while ($row1bSzgg = mysqli_fetch_array($result222abT9zgg)) {
$cust_id= $row1bSzgg['customer_id'];

$sql330ss ="SELECT * FROM $table_name36 where customer_id='$cust_id'";
 $result330ss = @mysqli_query($connection,$sql330ss) or die(mysqli_error($connection));
        $row22sd =mysqli_fetch_array($result330ss,MYSQLI_ASSOC);
	$first7=  $row22sd['firstname'];
	$last7=  $row22sd['lastname'];

//echo "$cust_id $first7 $last7 $order7<br/>";

$buildlistT ="<td>$cust_id</td><td>$first7</td><td>$last7</td>";  
$buildlistCT ="$cust_id,$first7, $last7,"; 


 $jade_doc1 ="<font color=\"#780a24\">Not Paid</font>";
 $NA9="<font>Not Completed</font>";
  $NA9='';
$paidchecker=0;


 //$sql330hj ="SELECT * FROM $table_name36001 where customer_id='$cust_id' AND address_id='$catproduct9' AND type_id='900' AND date_added between '$startd' AND '$finishd'  "; 
  
 $sql330hj ="SELECT * FROM $table_name36001 where customer_id='$cust_id'  AND type_id='900' AND date_added between '$startd' AND '$finishd' AND status!='0' "; 
  $result330xcj = @mysqli_query($connection,$sql330hj) or die(mysqli_error($connection));
  	while ($row1bSzggh = mysqli_fetch_array($result330xcj)) {
//$cust_id= $row1bSzggh['customer_id'];

$catproduct9=$row1bSzggh['address_id'];
$buildT[$catproduct9]="Yes";

 $comment99=  $row1bSzggh['email'];  
 $Bstatus=$row1bSzggh['status'];
$GBstatus=$row1bSzggh['pro_id'];

$Bstatus=$row1bSzggh['status'];
		$GBstatus=$row1bSzggh['pro_id'];
		
		$comment99=$row1bSzggh['email'];
		
		$checky[$k]=$GBstatus;

//echo "Req=$RCreqA[$catproduct9] --- $catproduct9 $Tnameproduct[$catproduct9]-$creditAA[$catproduct9] - $cust_id $first7 $last7 $order7<br/>";

$checky[$k]=$GBstatus;


////$RCreqA[$catproduct9]
	if ($Bstatus==1){

///		if ($CreqA==1 AND ($checky[$k]!=$checky[$k-1])){
		
	if ($RCreqA[$catproduct9]==1 ){	
		
//	$ReqPaid=$ReqPaid+$creditA;
//		$reqCredit=$reqCredit+$creditA;
		
	$ReqPaid=$ReqPaid+$creditAA[$catproduct9];
		$reqCredit=$reqCredit+$creditAA[$catproduct9];	
		
//echo "ReqPaid=$ReqPaid <br/>";	
	
	}
	
///	if ($CreqA==0 AND ($checky[$k]!=$checky[$k-1])){
		if ($RCreqA[$catproduct9]==0){
	//$NReqPaid=$NReqPaid+$creditA;
	//$nonReq=$nonReq+$creditA;
	
	$NReqPaid=$NReqPaid+$creditAA[$catproduct9];
	$nonReq=$nonReq+$creditAA[$catproduct9];
	
	
	
//	echo "nonReq=$nonReq <br/>";	
	}

//	echo "$GBstatus--$num3334bT291acy:::$nameproduct - $catproduct9 $NA9 - CreqA- $CreqA reqCredit-$reqCredit creditA=$creditA <br/>";
	
	}

////

////////
$dateordry=$row1bSzggh['date_added'];
		$approvdry=$row1bSzggh['address_1st'];
		$pro_id=$row1bSzggh['pro_id'];
		
		$comment99=$row1bSzggh['email'];
		
		$Dstatus=$row1bSzggh['status'];
		
		$Paidstatus=$row1bSzggh['name'];
		if ($Paidstatus==$blink){
		$Paidstatus="PAID";		
		}
		


	if($Dstatus==1 AND ($checky[$k]!=$checky[$k-1])){

	$earnReq=$earnReq+$ty[$catproduct9];
	
	//$nonReq=$nonReq - $ty[$catproduct9];
	
	$NA9 .="<br/>$approvdry  Approved on: $dateordry";
//	echo "$NA9 - CreqA- $CreqA reqCredit-$reqCredit creditA=$creditA +$earnReq=$earnReq+$ty[$catproduct9] <br/>";
}
$Comp="COMP";

$Dstatus1=$row1bSzggh['status'];
		
		if ($Dstatus1==1  AND $Paidstatus==$Comp ) {
		
		$jameElec=$jameElec + $ERcreditAA[$catproduct9];
		
	
		$jameRec=$jameRec + $RRcreditAA[$catproduct9];
		
		}
		



if($user_gid>0){

$listcredits.="<tr><td>$catproduct9</td><td>$Tnameproduct[$catproduct9]</td><td>$creditAA[$catproduct9]</td><td>$RcreditAA[$catproduct9]</td><td>$Paidstatus</td><td>$NA9</td></tr>";

}

if($user_gid<1){

$listcredits.="<tr><td>$catproduct9</td><td>$Tnameproduct[$catproduct9]</td><td>$creditAA[$catproduct9]</td><td>$RcreditAA[$catproduct9]</td><td>$Paidstatus</td><td>$NA9</td></tr>";
}


$listcreditsA.="<tr><td>$catproduct9</td><td>$Tnameproduct[$catproduct9]</td><td>$creditAA[$catproduct9]</td><td>$RcreditAA[$catproduct9]</td><td>$Paidstatus</td><td>$NA9</td></tr>";









///$boom3 .="$map_id ,$regdateZ,$answerTra[$bob99],$email1,$barnTa \n";



$NA9='';


///////
	$k=$k+1;

} ///just took

$product_code=$model;


/////
//$earnReq=$earnReq+$jameRec;


//$nonReq=$nonReq+$jameElec;



//$reqCredit=$reqCredit+$jameRec+$jameElec;

//echo "earnRq= $earnReq=  ( $earnReq+$jameRec )<br/>";

////
     
        if ($reqPoint >0){
   $perReg= $earnReq/ $reqPoint*100;
   
 $perReg=  sprintf('%0.2f', $perReg);   //total reguired of required
 }else{
 
 $perReg=0;
 
 }
 
 //$perReg1= $reqPoint/ $divisor;  //total req points
 
 //$perReg2= $earnReq/ $divisor;  //total req points
 
 //if ($earnReq=<$reqPoint AND 
 
   
 //$perReg=  sprintf('%0.2f', $perReg);  
 
///just took out$nonReq = $reqCredit-$earnReq; //total credit earned - required points earned
//$nonReq=$nonReq+$jameElec;



$totnonreq=$divisor-$reqPoint; //total non require stuff possible
if ($totnonreq>0){
$perPNonReg=$NReqPaid/$totnonreq*100;
 $perPNonReg1=  sprintf('%0.2f', $perPNonReg);
}else{
$perPNonReg=0;
$perPNonReg1=0;
}


if ($totnonreq>0){

$perReg1= $nonReq/ $totnonreq*100;  //total nonreq points
}else{
$perReg1=0;
}

if ($reqPoint>0){

$perPReg=$ReqPaid/$reqPoint*100;//Percent Required ppoints paid
 $perPReg1=  sprintf('%0.2f', $perPReg); 
}else{
$perPReg=0;
$perPReg1=0;
}

 
 $perReg1=  sprintf('%0.2f', $perReg1); 
 
 
 $reqCredit=$earnReq+$nonReq;
 
 if ($divisor>0){
 
 $perReg2= $reqCredit/ $divisor*100;  //total earned points
 
 $perReg2=  sprintf('%0.2f', $perReg2); 
 }else{
 
 $perReg2=0;
 }
 
 $maxnonreq=$divisor-$reqPoint;
 $meess='';
 if($earnReq<$reqPoint AND $nonReq>$totnonreq) {
 $meess="<br>You have not completed the required classes. This is important to achieve to keep your certifications<br/>.";

//$perReg2="90";
 }
//$perReg=105.00;


////

$missingrec=$reqPoint-$earnReq;
$missingE=$totnonreq-$nonReq;

///Total Required Credits Paid: $ReqPaid - $perPReg1%<br/>
///Total Elective Credits Paid: $NReqPaid - $perPNonReg1%<br/>

  $prog3001="report/aSaveDataGG.php";

$boom3 .="$cust_id,$first7,$last7,$reqPoint,$earnReq,$perReg%,$missingrec,$totnonreq,$nonReq,$perReg1%,$missingE,$reqCredit,$perReg2%  \n";

$headingsEa="ID,First,Last,Total Required Credits Needed<,Total Required Credits Earned,% Required Credits Earned,Required Credits Still Needed,Total Elective Credits Needed,Total Elective Credits Earned,% Elective Credits Earned ,Total Elective Credits Still Needed<b>,Total Credits Earned (Required & Elective),% Credits Earned (Required & Elective) \n";

$myname2="$ttitle_Report__dates__$startda1__$finishda1";

$buildlistX='';
$buildlistCX='';
////
for ($px = 0; $px < $ff; $px++) {

$pfat=$build[$px];
///echo "$px - $pfat  $Tnameproduct[$pfat]<br/>";

$bwat="N";

If ($buildT[$pfat] !=$blink){
$bwat=$buildT[$pfat];
}

$buildlistX .="<td>$bwat</td>";  
$buildlistCX .="$bwat,";  


}

$buildGuts .="<tr>$buildlistT $buildlistX </tr>";
$buildGutsC .="$buildlistCT, $buildlistCX /n";
////////


 $display_block66 .="
  
  

   
 <table class=\"list\">
 <tr>
 <td width=\"70\">$cust_id</td>
 <td width=\"100\">$first7</td>
 <td width=\"100\">$last7</td>
 <td width=\"90\">$reqPoint</td>
 <td width=\"90\">$earnReq</td>
 <td width=\"90\">$perReg%</td>
 <td width=\"100\"><b>$missingrec</b></td>
 <td width=\"100\">$totnonreq</td>
 <td width=\"100\">$nonReq</td>
 <td width=\"90\">$perReg1%</td>
 <td width=\"100\"><b>$missingE</b></td>
 <td width=\"100\">$reqCredit</td>
 <td width=\"100\">$perReg2%</td>
 </tr></table>
  <!---
 <table><tr><td> #ID: $cust_id $first7 $last7</td><td></td></tr>
 <tr><td>Classes Must be Completed from: $startd1</td><td>to: $finishd1</td></tr></table>
<hr><hr><br/>
Type of Report: $ttitle<br/>
Total Credits Needed: $divisor<br/>
<br/>

Total Required Credits Needed: $reqPoint<br/>

Total Required Credits Earned: $earnReq - $perReg%<br/>

<b>Total Required Credits Still Needed: $missingrec</b><br/><br/>

Total Elective Credits Needed: $totnonreq<br/>

Total Elective Credits Earned: $nonReq - $perReg1%<br/>
<b>Total Elective Credits Still Needed: $missingE</b><br/><br/>
<br/>
Total Credits Earned (Required & Elective): $reqCredit -  $perReg2% $meess<br/> --->

<h3 class=\"collapsible\" id=\"stud$cust_id\">Details for $first7 $last7 <span></span></h3>
<div class=\"container\">
    <div class=\"content\">

<br/><div align=\"center\">Required Track: $perReg% complete.  <br/><table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">

	  <tr>
	   <td valign=\"bottom\" background=\"$loc2/admin/GoTool/image/roadway/track3.jpg\">

	    <div class=\"progress progress-striped active\">
						 <div class=\"progress-bar progress-bar-darkpurple\" role=\"progressbar\" aria-valuenow=\"$perReg\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: $perReg%\"> <span><!---$perReg%--></span> </div>
				  </div>

	            </td></tr>

	</table>  </div><br/><br/>
	
	
<div align=\"center\">Elective Track: $perReg1% complete.  <br/><table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">

	  <tr>
	   <td valign=\"bottom\" background=\"$loc2/admin/GoTool/image/roadway/track3.jpg\">

	    <div class=\"progress progress-striped active\">
						 <div class=\"progress-bar progress-bar-red\" role=\"progressbar\" aria-valuenow=\"$perReg1\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: $perReg1%\"> <span><!---$perReg1%--></span> </div>
				  </div>

	            </td></tr>

	</table>  </div><br/><br/>	


<table class=\"sortable\">
<thead>
<tr><td class=\"filterable\">ID# </td>
<td class=\"filterable\">Class</td>
<td class=\"filterable\">Credits</td>
<td class=\"filterable\">Required</td>
<td class=\"filterable\">Paid</td>
<td class=\"filterable\">Completion</td>
</tr>
</thead><tbody>
<tr class=\"filter\">
<td><input type=\"text\" name=\"filter_req1\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>
<td><input type=\"text\" name=\"filter_req2\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>
<td><input type=\"text\" name=\"filter_req3\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>
<td><input type=\"text\" name=\"filter_req4\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>
<td><input type=\"text\" name=\"filter_req5\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>
<td><input type=\"text\" name=\"filter_req6\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>

</tr>

$listcredits
</tbody></table>
<table class=\"list\">
$listcreditsT
</table>





<div style=\"display:none\">
 <table id=\"ReportTable\"> <thead> 
 <tr>
<td>ID: $cust_id </td>
<td>$fname $lname </td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
 <tr>
   <td bgcolor=\"#C0C0C0\"> </td>
<td bgcolor=\"#C0C0C0\">Credits</td>
<td bgcolor=\"#C0C0C0\">Percentage</td>
<td bgcolor=\"#C0C0C0\"></td>
<td bgcolor=\"#C0C0C0\"></td>
<td bgcolor=\"#C0C0C0\"></td>
</tr>


 <tr>
   <td>Total Required Credits Earned: </td>
<td>$earnReq</td>
<td>$perReg%</td>
<td></td>
<td></td>
<td></td>
</tr>
 

 <tr>
   <td>Total Elective Credits Earned:</td>
<td>$reqCredit</td>
<td>$perReg2%</td>
<td></td>
<td></td>
<td></td>
</tr>

 <tr>
   <td> </td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
 <tr>
   <td bgcolor=\"#C0C0C0\"> #ID</td>
<td bgcolor=\"#C0C0C0\">Class</td>
<td bgcolor=\"#C0C0C0\">Credits</td>
<td bgcolor=\"#C0C0C0\">Required</td>
<td bgcolor=\"#C0C0C0\">Paid</td>
<td bgcolor=\"#C0C0C0\">Completion</td>
</tr></thead>  <tbody>
   $listcreditsA</tbody></table>
</table>
</div>

 <form action=\"GoTool/$prog300?token=$tok&log=$logged\" method=\"post\" target=\"_blank\"
onsubmit='$(\"#datatodisplay\").val( $(\"&lt;div&gt;\").append( $(\"#ReportTable\").eq(0).clone() ).html() )'>
Export Table to Excel - xls<input  type=\"image\" src=\"GoTool/image/add.png\" width=\"12\" height=\"12\" >
<input type=\"hidden\" id=\"datatodisplay\" name=\"datatodisplay\" />
</form>        <br/>



<input type=\"submit\" value=\"Export to Excel - xlsx\" onclick=\"doit();\">

</div>
</div>

<br/>



";

$display_block667.=$display_block66;
 $display_block66='';
$listcredits='';
$listcreditsT='';
$listcreditsA='';

$jameElec='';
$jameRec='';

$nonReq='';
$earnReq='';
$reqCredit='';
 //the new big loop



    $display_block= "

   $droppy
  
  <table class=\"list\">
 <tr>
 <td width=\"70\">ID</td>
 <td width=\"100\">First</td>
 <td width=\"100\">Last</td>
 <td width=\"90\">Total Required Credits Needed</td>
 <td width=\"90\">Total Required Credits Earned</td>
 <td width=\"90\">% Required Credits Earned</td>
 <td width=\"100\"><b>Required Credits Still Needed</b></td>
 <td width=\"100\">Total Elective Credits Needed</td>
 <td width=\"100\">Total Elective Credits Earned</td>
 <td width=\"90\">% Elective Credits Earned</td>
 <td width=\"100\"><b>Total Elective Credits Still Needed<b></td>
 <td width=\"100\">Total Credits Earned (Required & Elective)</td>
 <td width=\"100\">% Credits Earned (Required & Elective</td>
 </tr></table>
  
  
  
  
  
         $display_block667
         
         
         
 <br/><br/>
    <form action=\"GoTool/$prog3001?token=$tok&log=$logged\" method=\"post\" target=\"_blank\"
onsubmit='$(\"#datatodisplay\").val( $(\"&lt;div&gt;\").append( $(\"#ReportTable\").eq(0).clone() ).html() )'>
<input type=\"hidden\" name=\"data1\" value=\" $headingsEa\"  />
<input type=\"hidden\" name=\"data2\" value=\"$boom3\"  />
<input type=\"hidden\" name=\"filename\" value=\"$myname2\"  />

Export Registrations to CSV<input  type=\"image\" src=\"GoTool/image/add.png\" width=\"12\" height=\"12\" >
<input type=\"hidden\" id=\"datatodisplay\" name=\"datatodisplay\" />
</form>        <br/>        
         
         
         
         

    ";
    
    $display_block66='';
    }    }


//////
	 $sq112aRr="SELECT * FROM $table_name36001 WHERE type_id = '900'  Order by date_added ASC limit 1  ";
//echo $sq112aRr;

$result33em1 = @mysqli_query($connection,$sq112aRr) or die(mysqli_error($connection));
 $row22em1 =mysqli_fetch_array($result33em1,MYSQLI_ASSOC);
          $Ename=  $row22em1['date_added'];
          
     //  $Rtoday22=date("Y-m-d H:i:s");
   //  date("Y-m-d H:i:s",strtotime("now -1 hour"));    
 
$Ename= date("Y",strtotime("$Ename"));    
          
 	 $sq112aRr="SELECT * FROM $table_name36001 WHERE type_id = '900'   Order by date_added DESC limit 1  ";
//echo $sq112aRr;

$result33em1 = @mysqli_query($connection,$sq112aRr) or die(mysqli_error($connection));
 $row22em1 =mysqli_fetch_array($result33em1,MYSQLI_ASSOC);
          $Ename1=  $row22em1['date_added'];         
          $Ename1= date("Y",strtotime("$Ename1"));  
          
          
 $range1=$Ename1-$Ename+1; 
 $range2=$Ename1+1;    
 
 
 
 $display_listTimeG='';
 $sq112ab="SELECT * FROM $table_name53  ORDER BY name";
//echo $sq112ab;
 
 for ($pC=0;$pC<$range1; $pC+= 1){
 $time77=$Ename+$pC;

  $display_listTimeG .=  "<option value= $time77>  $time77</option>";
 }
 
$prog922="stakeholdercredits/creditsRep.php";
$prog923="stakeholdercredits/creditsRep2.php";
  
  $droppy .="
  <table><tr><td>
  
  Beginning Range: $Ename   <br/>
Ending Range: $Ename1   <br/>

<FORM  name=\"formcheck\" target=\"_blank\"   METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/$prog922?token=$tok&log=$logged\">
			                 <input type=\"hidden\" name=\"sbadG\" value=\"11099999\"  />
                
                 
   Start: <select name=\"rangeN\">
       $display_listTimeG 
       </select>          
       
         End: <select name=\"rangeN1\">
       $display_listTimeG 
       </select>  
       
                        
	                 <input type=\"hidden\" name=\"Ctext_account34\" value=\"$showchart\"  />
	                 <input type=\"hidden\" name=\"Boo2\" value=\"$grade\"  />
	                
	 
	 <input type=\"hidden\" name=\"createD\" value=\" $signD\" >
	<input type=\"hidden\" name=\"stringSS\" value=\"$port_idz\" >             
	    <input type=\"hidden\" name=\"MIT\" value=\"$grade\">
 <input type=\"hidden\" name=\"dir_id\" value=\"$GgradeSum\">
 <input type=\"hidden\" name=\"admin_id\" value=\"$hi2\">
 <input type=\"hidden\" name=\"Bamboo\" value=\"$showchart\"  />
  <input type=\"hidden\" name=\"TXBoo\" value=\"$x2\"  />
	<input type=\"hidden\" name=\"TXXBoo\" value=\"$x22\"  />
 		  <input type=\"hidden\" name=\"upload\" value=\"$Pgrade\"  />
  <input type=\"hidden\" name=\"product\" value=\"$Tgrade\">

       
       
       
 <button class=\"fsSubmitButtonsmall\" type=\"input\">Show Summary</button></form>
</td>

<td>
  
  Beginning Range: $Ename   <br/>
Ending Range: $Ename1   <br/>

<FORM  name=\"formcheck\" target=\"_blank\"   METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/$prog923?token=$tok&log=$logged\">
			                 <input type=\"hidden\" name=\"sbadG\" value=\"11099999\"  />
                
                 
   Start: <select name=\"rangeN\">
       $display_listTimeG 
       </select>          
       
         End: <select name=\"rangeN1\">
       $display_listTimeG 
       </select>  
       
                        
	                 <input type=\"hidden\" name=\"Ctext_account34\" value=\"$showchart\"  />
	                 <input type=\"hidden\" name=\"Boo2\" value=\"$grade\"  />
	                
	 
	 <input type=\"hidden\" name=\"createD\" value=\" $signD\" >
	<input type=\"hidden\" name=\"stringSS\" value=\"$port_idz\" >             
	    <input type=\"hidden\" name=\"MIT\" value=\"$grade\">
 <input type=\"hidden\" name=\"dir_id\" value=\"$GgradeSum\">
 <input type=\"hidden\" name=\"admin_id\" value=\"$hi2\">
 <input type=\"hidden\" name=\"Bamboo\" value=\"$showchart\"  />
  <input type=\"hidden\" name=\"TXBoo\" value=\"$x2\"  />
	<input type=\"hidden\" name=\"TXXBoo\" value=\"$x22\"  />
 		  <input type=\"hidden\" name=\"upload\" value=\"$Pgrade\"  />
  <input type=\"hidden\" name=\"product\" value=\"$Tgrade\">

       
       
       
 <button class=\"fsSubmitButtonsmall\" type=\"input\">Show Summary by Class</button></form>
</td> </tr></table>

";



//////

 $display_block = "
 $droppy
 
 <table class=\"list\"><tr>
 $buildlist
 $buildGuts
 </tr></table>
 

 
 
 
$display_block";



?>


<!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" dir="ltr" lang="en" xml:lang="en">
<title><?PHP echo "$display_title"; ?> <?PHP echo "$tok"; ?> jedID2=<?PHP echo "$jedID2"; ?>gbad=<?PHP echo "$gbad"; ?> sbad=<?PHP echo "$sbad"; ?> survey_id=<?PHP echo "$survey_idR"; ?></title>
<base href="<?PHP echo "$loc24"; ?>" />
<STYLE type="text/css">
   H1.myclass {border-width: 1; border: solid; text-align: center}

 </STYLE>

<link rel="stylesheet" type="text/css" href="view/stylesheet/stylesheet.css" />

<script type="text/javascript" src="view/javascript/jquery/jquery-1.7.1.min.js"></script>
				<script type="text/javascript" src="view/javascript/tablePagination.min.js"></script>
<script type="text/javascript" src="view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="view/javascript/jquery/ui/external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="view/javascript/jquery/tabs.js"></script>
<script type="text/javascript" src="view/javascript/jquery/excelexport.js"></script>

<script type="text/javascript" src="view/javascript/jquery/superfish/js/superfish.js"></script>

<script type="text/javascript"><!--
function updatesum() {
document.form.sum.value = (document.form.sum1.value -0) + (document.form.sum2.value -0) + (document.form.sum3.value -0) + (document.form.sum4.value -0); }
//--></script>









<?PHP echo "$special_code"; ?>



<script type="text/javascript" src="view/javascript/sortable.js"></script>
<script type="text/javascript" src="GoTool//mover/toggleDiv.js"></script>
<script type="text/javascript" src="GoTool/mover/table.js"></script>
<script type="text/javascript" src="GoTool/mover/table2CSV.js"></script>
<script type="text/javascript" src="view/javascript/jquery.collapsible.min.js"></script>
<link rel="stylesheet" type="text/css" href="view/stylesheet/collap.css" />


<script type="text/javascript" src="GoTool/mover/xlsx.core.min.js"></script>
<script type="text/javascript" src="GoTool/mover/Glotool.js"></script>
<script type="text/javascript" src="GoTool/mover/FileSaver.js"></script>
<script type="text/javascript" src="GoTool/mover/Export2Excel.js"></script>

<script type="text/javascript">
function doit() { 
export_table_to_excel('ReportTable'); 
}
</script>


<link rel="stylesheet" type="text/css" href="GoTool/mover/table.css" media="all">

<script type="text/javascript">
function getCSVData(){
 var csv_value=$('#ReportTable').table2CSV({delivery:'value'});
 $("#csv_text").val(csv_value);
}
</script>




  <script type="text/javascript">
//-----------------------------------------
// Confirm Actions (delete, uninstall)
//-----------------------------------------
$(document).ready(function(){
    // Confirm Delete
    $('#form').submit(function(){
        if ($(this).attr('action').indexOf('delete',1) != -1) {
            if (!confirm ('<?php echo $text_confirm; ?>')) {
                return false;
            }
        }
    });


//collapsible management
        $('.collapsible').collapsible({
            defaultOpen: 'section1,section2,section3,section4'
        });



//toggle

   $('#clickme').click(function() {
          $('#me').animate({
               height: 'toggle'
               }, 2000
          );
     });






    // Confirm Uninstall
    $('a').click(function(){
        if ($(this).attr('href') != null && $(this).attr('href').indexOf('uninstall',1) != -1) {
            if (!confirm ('<?php echo $text_confirm; ?>')) {
                return false;
            }
        }
    });
});
</script>

<script type="text/javascript">
function toggleDiv(divId) {
   $("#"+divId).toggle();
}

function toggleAndChangeText() {
     $('#divToToggle').toggle();
     if ($('#divToToggle').css('display') == 'none') {
          $('#aTag').html('<img border=0 src="GoTool/image/add.png">');
     }
     else {
          $('#aTag').html('<img border=0 src="GoTool/image/minus.png">');
     }
}


//});

</script>

<SCRIPT LANGUAGE="JavaScript" SRC="GoTool/risk/AnimatedFader.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">

//Script submitted to and featured on
//http://www.dynamicdrive.com

/*
 * FadingText(divName, numSteps, BGColor)
 * divName : Must match the DIV names defined at the end of the BODY)
 * numSteps: The number of steps in the fading transition
 * BGColor : The background colour of the DIV or document.
 */
	FadingText('fade1', 10,"FFFFFF");

/*** The "Frame Interval" Smaller = faster ***/
	FadeInterval=30;

</SCRIPT>




<script>
$(document).ready(function() {

	//select all the a tag with name equal to modal
	$('a[name=modal]').click(function(e) {
		//Cancel the link behavior
		e.preventDefault();

		//Get the A tag
		var id = $(this).attr('href');

		//Get the screen height and width
		var maskHeight = $(document).height();
		var maskWidth = $(window).width();

		//Set heigth and width to mask to fill up the whole screen
		$('#mask').css({'width':maskWidth,'height':maskHeight});

		//transition effect
		$('#mask').fadeIn(1000);
		$('#mask').fadeTo("slow",0.8);

		//Get the window height and width
		var winH = $(window).height();
		var winW = $(window).width();

		//Set the popup window to center
		$(id).css('top',  winH/2-$(id).height()/2);
		$(id).css('left', winW/2-$(id).width()/2);

		//transition effect
		$(id).fadeIn(2000);

	});

	//if close button is clicked
	$('.window .close').click(function (e) {
		//Cancel the link behavior
		e.preventDefault();

		$('#mask').hide();
		$('.window').hide();
	});

	//if mask is clicked
	$('#mask').click(function () {
		$(this).hide();
		$('.window').hide();
	});


	$(window).resize(function () {

 		var box = $('#boxes .window');

        //Get the screen height and width
        var maskHeight = $(document).height();
        var maskWidth = $(window).width();

        //Set height and width to mask to fill up the whole screen
        $('#mask').css({'width':maskWidth,'height':maskHeight});

        //Get the window height and width
        var winH = $(window).height();
        var winW = $(window).width();

        //Set the popup window to center
        box.css('top',  winH/2 - box.height()/2);
        box.css('left', winW/2 - box.width()/2);

	});

});

</script>

<script type="text/javascript" src="GoTool/risk/jquery.min.js"></script>
<script src="GoTool/risk/formwizard2.js" type="text/javascript">

/***********************************************         1.4.2 version of jQuery above
* jQuery Form to Form Wizard-
* This notice MUST stay intact for legal use
*
***********************************************/

</script>

<script type="text/javascript">

var myform=new formtowizard({
	formid: 'feedbackform',
	persistsection: true,
	revealfx: ['slide', 500]
})

var myform2=new formtowizard({
	formid: 'feedbackform2',
	persistsection: true,
	revealfx: ['fade', 1000],
	validate: ['order_username', 'order_sex', 'order_addr1', 'order_shippingmethod', 'order_feedback']
})


var myform3=new formtowizard({
 formid: 'staff_feedbackform',
 validate: ['staff_username', 'staff_sex', 'staff_addr1'],
 revealfx: ['slide', 500] //<--no comma after last setting
})


</script>






<style>




#mask {
  position:absolute;
  left:0;
  top:0;
  z-index:9000;
  background-color:#000;
  display:none;
}

#boxes .window {
  position:fixed;
  left:0;
  top:0;
  width:440px;
  height:400px;
  display:none;
  z-index:9999;
  padding:20px;
}

#boxes #dialog {
  width:375px;
  height:403px;
  padding:10px;
  background-color:#ffffff;
}

#boxes #dialog1 {
  width:375px;
  height:403px;
}

#dialog1 .d-header {
  background:url(GoTool/risk/images/login-header2.png) no-repeat 0 0 transparent;
  width:375px;
  height:200px;
}

#dialog1 .d-header1 {
  background:url(GoTool/risk/images/login-middle.png) repeat 0 0 transparent;
  width:375px;

}

#dialog1 .d-header input {
  position:relative;
  top:60px;
  left:100px;
  border:3px solid #cccccc;
  height:22px;
  width:200px;
  font-size:15px;
  padding:5px;
  margin-top:4px;
}

#dialog1 .d-blank {
  float:left;
  background:url(GoTool/risk/images/login-blank.png) no-repeat 0 0 transparent;
  width:267px;
  height:53px;
}

#dialog1 .d-login {
  float:left;
  width:108px;
  height:400px;
}

#boxes #dialog2 {
  background:url(GoTool/risk/images/notice.png) repeat 0 0 transparent;
  width:326px;
  height:400px;
  padding:50px 0 20px 25px;
}


#boxes #dialog3 {
  background:url(GoTool/risk/images/notice.png) repeat 0 0 transparent;
  width:326px;
  height:400px;
  padding:50px 0 20px 25px;
}

#boxes #dialog4 {
  background:url(GoTool/risk/images/notice.png) repeat 0 0 transparent;
  width:326px;
  height:400px;
  padding:50px 0 20px 25px;
}

#boxes #dialog5 {
  background:url(GoTool/risk/images/notice.png) repeat 0 0 transparent;
  width:326px;
  height:400px;
  padding:50px 0 20px 25px;
}

#boxes #dialog6 {
  background:url(GoTool/risk/images/notice.png) repeat 0 0 transparent;
  width:326px;
  height:400px;
  padding:50px 0 20px 25px;
}

fieldset.sectionwrap{ /*fieldset that wraps around each form "page" */
border-width:0;
margin-top: 0;
	margin-bottom: 0;

padding:2px;
}

legend{ /*title shown at top of each form page */
font:bold 16px Arial;
color: darkred;
}

div.stepsguide{ /*div that contains all the "steps" text located at top of form */
width: 320px; /*width of "steps" container*/
overflow:hidden;
margin-bottom:15px;
cursor:pointer;
}

div.stepsguide .step{ /*div that wraps around each "steps" text */
width:290px; /*width of each "steps" text*/
font: bold 18px Arial;
float:left;
}

div.stepsguide .disabledstep{ /*div that wraps around each "steps" text */
color:#C4C4C4;
}

div.stepsguide .step .smalltext{ /*small footer text inside "steps" text */
font-size: 10px;
font-weight: normal;
}

div.formpaginate{ /* CSS for pagination DIV container */
width: 300px;
overflow:hidden;
font-weight:bold;
text-align:center;
margin-top:1em;
}

div.formpaginate .prev, div.formpaginate .next{ /*CSS for "prev" and "next" SPAN elements within paginate container */
border-radius:5px;
-webkit-border-radius:5px;
-moz-border-radius:5px;
padding:2px 5px;
background:darkred;
color:white;
cursor:hand;
cursor:pointer;
}


#feedbackform2 legend{ /*title shown at top of each form page */
color: navy;
}

#feedbackform2 div.field{
margin-bottom:7px;
}


#feedbackform2 div.formpaginate .prev, #feedbackform2 div.formpaginate .next{
background:navy;
}


</style>


<script type="text/javascript" src="GoTool/report/table2CSV.js"></script>

<script type="text/javascript" >

function show(num)

{

hideAll();

var obj='#o'+num;

$(obj).show( "slow" );



}



$(document).ready(function () {

   $('#o0,#o1,#o2,#o3,#o4,#o5,#o6').hide();

});



function hideAll()

{

$('#o0,#o1,#o2,#o3,#o4,#o5,#o6').hide();

}



</script>

<script type="text/javascript" src="../../GoTool/mover/xlsx.core.min.js"></script>
<script type="text/javascript" src="../../GoTool/mover/Glotool.js"></script>
<script type="text/javascript" src="../../GoTool/mover/FileSaver.js"></script>
<script type="text/javascript" src="../../GoTool/mover/Export2Excel.js"></script>

<script type="text/javascript">
function doit() { 
export_table_to_excel('ReportTable'); 
}

</script>


</head>
<body>

<div id="content">
  <div class="breadcrumb">
     <!--   <a href="http://<?PHP echo "$loc"; ?>/<?PHP echo "$dir"; ?>/admin/index.php?route=common/home&amp;token=<?PHP echo "$tok"; ?>">Home</a>
        ::<a href="GoTool/<?PHP echo "$prog"; ?>?token=<?PHP echo $tok; ?>&log=<?PHP echo $logged; ?>"><?PHP echo $display_title; ?></a>
--->
      </div>
          <?PHP echo "$mess"; ?>    <?PHP echo "$warn"; ?>   <?PHP echo "$display_back"; ?>
 <div class="box">
    <div class="heading">
      <h1><img src="view/image/report.png" alt="" /> <?PHP echo "$display_title"; ?> </h1>
    </div>
    <div class="content">



      <?PHP echo "$display_block"; ?>





      <div class="pagination"></div>
    </div>
  </div>
<!-- </div>  -->


</div>
 <?PHP echo "$string"; ?>
  <?PHP echo "$display_blockFF"; ?>

    <div style="font-size:10px;color:#ccc"></div>

<div id="boxes">

<div id="dialog" class="window">
Note Window |
<FORM METHOD=POST
   ACTION="consult.php?token=$tok&log=$logged"
   onSubmit="popupform(this, 'join')">
Name: <INPUT NAME="realname"><BR>
Email: <INPUT NAME="email"><BR>
Value: <INPUT NAME="val2"><BR>
<INPUT TYPE=SUBMIT VALUE="show me">
</FORM>
<a href="#"class="close"/>Close it</a>
</div>

<!-- Start of Login Dialog -->
<div id="dialog1" class="window">
  <div class="d-header">
  <input type="button" value="Close it" class="close"/>
    <input type="text" value="username" onclick="this.value=''"/><br/>
  </div>
  <div class="d-header1">
    <input type="text" value="username" onclick="this.value=''"/><br/>
    <input type="password" value="Password" onclick="this.value=''"/>
  </div>
  <div class="d-blank"></div>
  <div class="d-login"><input type="image" alt="Login" title="Login" src="images/login-button.png"/></div>
</div>
<!-- End of Login Dialog -->



<!-- Start of Sticky Note -->
<div id="dialog2" class="window">
<?PHP echo "$bottomNote"; ?>
<input type="button" value="Close it" class="close"/>
</div>
<!-- End of Sticky Note -->

<!-- Start of Sticky Note -->
<div id="dialog3" class="window">
<?PHP echo "$bottomReport"; ?>
<input type="button" value="Close it" class="close"/>
</div>
<!-- End of Sticky Note -->

<!-- Start of Sticky Note -->
<div id="dialog4" class="window">
<?PHP echo "$bottomDelete"; ?>
<input type="button" value="Close it" class="close"/>
</div>
<!-- End of Sticky Note -->

<!-- Start of Sticky Note -->
<div id="dialog5" class="window">
<?PHP echo "$bottomCriteria"; ?>
<input type="button" value="Close it" class="close"/>
</div>
<!-- End of Sticky Note -->

<!-- Start of Sticky Note -->
<div id="dialog6" class="window">
<?PHP echo "$bottomDate"; ?>
<input type="button" value="Close it" class="close"/>
</div>
<!-- End of Sticky Note -->

<!-- Mask to cover the whole screen -->
  <div id="mask"></div>
</div>

 </body></html>

