<?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='';

 $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

$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'];

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'];

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'];



// $sq112a="SELECT * FROM $table_name80 WHERE survey_id = '$survey_idR' AND create_date between '$startd' AND '$tomorr' $finishd ";
    


  $display_title="$ttitle Report";
  $prog="stakeholderMin/credits.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 ($jedID2==436){
      $map_id=$_POST['pnum'];

     $sql33a800 ="Delete FROM $table_name36 WHERE customer_id='$map_id'";
  //$result33a800 = @mysqli_query($connection,$sql33a800) or die(mysqli_error($connection));

  $viewmail="<div class=\"success\">Record $map_id has been deleted.</div>";
    $bob2=2;
  $jedID2=$bob2;

  }



    if ($jedID2==19536){
   //$cust_id2=$_POST['pnum'];
 $class_id=$_POST['classSS'];
     $status=1;
     $approver="$Aname $Fname ";

//$sql2 = "UPDATE $table_name36 SET  salesrep_id='$newagent_id' WHERE customer_id= '$cust_id2' ";
//$sq112abS1acy="SELECT * FROM $table_name36001 WHERE customer_id ='cust_id'  AND address_id= '$catproduct9' AND type_id='900' AND status='1' AND date_added between '$startd' AND '$finishd' ";
	
 $sql2 = "INSERT INTO $table_name36001 (customer_id, date_added,  address_id, type_id,status, address_1st, name   ) VALUES ('$cust_id', '$Rtoday', '$class_id', '900', '$status' , '$approver', 'COMP' )";


$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

  $viewmail="<div class=\"success\">Record Assignment has been updated.</div>";
    $bob2=0;
  $jedID2=$bob2;

  }
  
  
  
  
      if ($jedID2==8536){
   //$cust_id2=$_POST['pnum'];
 $class_id=$_POST['classSS'];
     $status=1;
     
    //Mark:<select name=\"status\">
	//    <option value=\"1\">Complete</option>
	//    <option value=\"-1\">Withdraw</option>
	//    <option value=\"-2\">Transfer</option>
	//    </select><br/> 
	//$CCstatus[$Bstatus]
	
	if (isset($_POST['status'])) {
  	$status=$_POST['status'];
  	
  	if($status==-3){
  	$status=0;
  	}
  	
  	
  	}
     
     $approver="$Aname $Fname ";
     
    $sql33cat1s ="SELECT * FROM $table_name36001 where customer_id='$cust_id' AND address_id='$class_id' AND type_id='900' AND date_added between '$startd' AND '$finishd'  "; 
     $result112ab = @mysqli_query($connection,$sql33cat1s) or die(mysqli_error($connection));
while ($row112ab = mysqli_fetch_array($result112ab)) {
$pro_id=$row112ab['pro_id'];
$sql2 = "UPDATE $table_name36001 SET  approved='99', address_1st='$approver' WHERE pro_id= '$pro_id' ";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

}

//$sql2 = "UPDATE $table_name36 SET  salesrep_id='$newagent_id' WHERE customer_id= '$cust_id2' ";
//$sq112abS1acy="SELECT * FROM $table_name36001 WHERE customer_id ='cust_id'  AND address_id= '$catproduct9' AND type_id='900' AND status='1' AND date_added between '$startd' AND '$finishd' ";
	
 $sql2 = "INSERT INTO $table_name36001 (customer_id, date_added,  address_id, type_id,status, address_1st   ) VALUES ('$cust_id', '$Rtoday', '$class_id', '900', '$status' , '$approver' )";


$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

  $viewmail="<div class=\"success\">Record Assignment has been updated.</div>";
    $bob2=0;
  $jedID2=$bob2;

  }
  

        if ($jedID2==9536){
   //$cust_id2=$_POST['pnum'];
 $pro_id=$_POST['pro_id'];
     $status=1;
     $approver="$Aname $Fname ";

$sql2 = "UPDATE $table_name36001 SET  status='0', address_1st='$approver' WHERE pro_id= '$pro_id' ";
//$sq112abS1acy="SELECT * FROM $table_name36001 WHERE customer_id ='cust_id'  AND address_id= '$catproduct9' AND type_id='900' AND status='1' AND date_added between '$startd' AND '$finishd' ";
	
 //$sql2 = "INSERT INTO $table_name36001 (customer_id, date_added,  address_id, type_id,status, approver   ) VALUES ('$cust_id', '$Rtoday', '$class_id', '900', '$status' , '$approver' )";


$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

  $viewmail="<div class=\"success\">Record Assignment has been updated.</div>";
    $bob2=0;
  $jedID2=$bob2;

  }
  


$display_listCGP='';
 $sq112ab="SELECT * FROM $table_name362  ORDER BY name";
  $result112ab = @mysqli_query($connection,$sq112ab) or die(mysqli_error($connection));
while ($row112ab = mysqli_fetch_array($result112ab)) {
 $leader_id1=  $row112ab['customer_group_id'];
 $first_id=  $row112ab['name'];
 $first_id=stripslashes($first_id);
  $first_id=htmlspecialchars_decode($first_id);
  $first_id=mb_convert_encoding($first_id,  "HTML-ENTITIES");


// $last_id=  $row112ab['lastname'];
 $nameP[$leader_id1]="$first_id";

  $display_listCGP .=  "<option value=$leader_id1> $nameP[$leader_id1]</option>";
 }


  
      if ($jedID2==5360){
      $cust_id2=$_POST['pnum'];
      $newagent_id=$_POST['Cgroup_id'];

$sql2 = "UPDATE $table_name36 SET  customer_group_id='$newagent_id' WHERE customer_id= '$cust_id2' ";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

  $viewmail="<div class=\"success\">Record $cust_id2 has been assigned to $nameP[$newagent_id].</div>";
    $bob2=2;
  $jedID2=$bob2;

  }



     if ($jedID2==53600){
      $cust_id2=$_POST['pnum'];
      $newagent_id=$_POST['ACgroup_id'];

$sql2 = "UPDATE $table_name36 SET  status='$newagent_id' WHERE customer_id= '$cust_id2' ";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

  $viewmail="<div class=\"success\">Record $cust_id2 has been assigned to $cativeG[$newagent_id].</div>";
    $bob2=2;
  $jedID2=$bob2;

  }
  



$display_listCAT='';
 $sq112ab="SELECT * FROM $table_name2001  ORDER BY name";
///echo $sq112ab;
  $result112ab = @mysqli_query($connection,$sq112ab) or die(mysqli_error($connection));
while ($row112ab = mysqli_fetch_array($result112ab)) {
 $leader_id1=  $row112ab['category_id'];
///echo $leader_id1;

 $first_id=  $row112ab['name'];
 $first_id=stripslashes($first_id);
  $first_id=htmlspecialchars_decode($first_id);
  $first_id=mb_convert_encoding($first_id,  "HTML-ENTITIES");


// $last_id=  $row112ab['lastname'];


 $sq112ab556="SELECT * FROM $table_name2000 where category_id='$leader_id1' AND status>0";
  $result112ab556 = @mysqli_query($connection,$sq112ab556) or die(mysqli_error($connection));
  $num331a556 = mysqli_num_rows($result112ab556);

if ($num331a556>0) {
	
 $nameCAT[$leader_id1]="$first_id";

  $display_listCAT .=  "<option value=$leader_id1> $nameCAT[$leader_id1]</option>";

}

 }





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

$CAT_id=$categ;

$dd=0;

 $sql33cat ="SELECT * FROM $table_name54A where category_id='$CAT_id' ";
     $result331cat = @mysqli_query($connection,$sql33cat) or die(mysqli_error($connection));
    while ($row1a1cat = mysqli_fetch_array($result331cat)) {
 $catproduct9= $row1a1cat['product_id'];
  $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;
 
//echo $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'];
  $ty[$catproduct9]=0;
  
 
  
  If ($reqA1=='A'){
  $reqA= 'YES';
  $RcreditAA[$catproduct9]='YES';
  $RRcreditAA[$catproduct9]=$creditA;
  $ERcreditAA[$catproduct9]=0;
  $reqPoint=$reqPoint+$creditA;
  $CreqA=1;
  $ty[$catproduct9]=$creditA;
  
  }
//echo $nameproduct;
}

 $jade_doc1 ="<font color=\"#780a24\">Not Paid</font>";
 $NA9="<font>Not Completed</font>";
$paidchecker=0;
$sq112abSz="SELECT * FROM $db_name.$table_name41 WHERE customer_id ='$cust_id' AND date_added between '$startd' AND '$finishd'   ";
//echo $sq112abSz;

	$result112abz = @mysqli_query($connection,$sq112abSz) or die(mysqli_error($connection));
	 $num3334bT29z = mysqli_num_rows($result112abz);

	if ($num3334bT29z>0) {
	
	
		
		    $result222abT9z = @mysqli_query($connection,$sq112abSz) or die(mysqli_error($connection));
		while ($row1bSz = mysqli_fetch_array($result222abT9z)) {
		    ///$order7=  stripslashes($row1bS['product_id']);
		 $order7=  $row1bSz['order_id'];
		
		$dateordr=$row1bSz['date_added'];
		$amount7=$row1bSz['total'];
	$first7=  $row1bSz['firstname'];
	$last7=  $row1bSz['lastname'];

//	echo "$cust_id $first7 $last7 $order7<br/>";
		
		 $sq112abS1z="SELECT * FROM $db_name.$table_name47 WHERE order_id ='$order7'  AND (product_id ='$catproduct9' )  ";
			$result112ab1z = @mysqli_query($connection,$sq112abS1z) or die(mysqli_error($connection));
			 $num3334bT291z = mysqli_num_rows($result112ab1z); 
		if ($num3334bT291z>0) {
		
//echo "$cust_id $first7 $last7 $order7  $catproduct9<br/>";

	$sq112abS1ac="SELECT * FROM $db_name.$table_name42 WHERE order_id ='$order7'  AND order_status_id > '0'";
			$result112ab1ac = @mysqli_query($connection,$sq112abS1ac) or die(mysqli_error($connection));
	 $num3334bT291ac = mysqli_num_rows($result112ab1ac);
	if ($num3334bT291ac>0) {
$hap1=$hap1+1;
$chap=1;

$paidchecker=1;
$pty[$catproduct9]=0;

	if ($CreqA==1){
	$ReqPaid=$ReqPaid+$creditA;
	}
	
	if ($CreqA==0){
	$NReqPaid=$NReqPaid+$creditA;
	}
	// $countPayPeops[$leader_id1]=$countPayPeops[$leader_id1]+1;
	//echo "l=$leader_id1 - order_id-$order7 - $first7 $last7 - $cust_id44 - $hap s=$hap2 -p=$hap1<br/>";
	//$first7='';
	//$last7='';
	
	 $jade_doc1 ="<font color=\"#0b6933\">Paid</font>";
	//echo "$cust_id $first7 $last7 $order7  $catproduct9<br/>";
	
		$Processor="
	<h3 class=\"collapsible\" id=\"section297$catproduct9\">Manage<span></span></h3>
<div class=\"container\">
    <div class=\"content\">
	                 <FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/$prog?token=$tok&log=$logged\">
                <input type=\"hidden\" name=\"pnum\" value=\"$cust_id\" size=\"5\" />
                  <input type=\"hidden\" name=\"jedID2\" value=\"8536\"  />
                                    <input type=\"hidden\" name=\"jedID21\" value=\"0\"  />
                             <input type=\"hidden\" name=\"text_account34\" value=\"$cust_id\"  />
	                 <input type=\"hidden\" name=\"tboo\" value=\"0\"  />             
	    <input type=\"hidden\" name=\"last\" value=\"$lname\" >
	    <input type=\"hidden\" name=\"approve\" value=\"$logged\" >
	     <input type=\"hidden\" name=\"admin_id\" value=\"$user_gid\">
	 <input type=\"hidden\" name=\"createD\" value=\" $signD\" >
	<input type=\"hidden\" name=\"stringSS\" value=\"$stringSS\" >   
	<input type=\"hidden\" name=\"classSS\" value=\"$catproduct9\" >           
	    <input type=\"hidden\" name=\"MIT\" value=\"$ttitle\">
	  Mark:<select name=\"status\">
	    <option value=\"1\">Complete</option>
	     <option value=\"-3\">Not Complete</option>
	    <option value=\"-1\">Withdraw</option>
	    <option value=\"-2\">Transfer</option>
	    </select><br/>
 <input type=\"hidden\" name=\"dir_id\" value=\"$divisor\">
 		  <input type=\"hidden\" name=\"upload\" value=\"$finishd\"  />
  <input type=\"hidden\" name=\"product\" value=\"$startd\">
	 <input type=\"hidden\" name=\"first\" value=\"$fname\" >    
                 <font size=\"2\"> </font>
 <button class=\"fsSubmitButtonsmall\" type=\"input\"> Approve</button>
</form>
	</div></div>
	";
	
	$sq112abS1acy="SELECT * FROM $table_name36001 WHERE customer_id ='$cust_id'  AND address_id= '$catproduct9' AND type_id='900' AND status='1' AND date_added between '$startd' AND '$finishd' ";
	$sq112abS1acy="SELECT * FROM $table_name36001 WHERE customer_id ='$cust_id'  AND address_id= '$catproduct9' AND type_id='900' AND status!='0'  AND approved ='0' AND date_added between '$startd' AND '$finishd'  ";
	
	
	//echo "$sq112abS1acy <br/>";
	
			$result112ab1acy = @mysqli_query($connection,$sq112abS1acy) or die(mysqli_error($connection));
	 $num3334bT291acy = mysqli_num_rows($result112ab1acy);
	if ($num3334bT291acy>0) {
	
	$result112ab1acyyd = @mysqli_query($connection,$sq112abS1acy) or die(mysqli_error($connection));	
	while ($row1bSzyy1a = mysqli_fetch_array($result112ab1acyyd)) {
		    ///$order7=  stripslashes($row1bS['product_id']);
	
		$Bstatus=$row1bSzyy1a['status'];
	}
	
	$NA9="<font color=\"#0b6933\">$CCstatus[$Bstatus]</font>";
	
	if ($Bstatus==1){
	$reqCredit=$reqCredit+$creditA;
	}

	
$sq112abS1acyy="SELECT * FROM $table_name36001 WHERE customer_id ='$cust_id'  AND address_id= '$catproduct9' AND type_id='900' AND status='1' AND date_added between '$startd' AND '$finishd'   ";
$sq112abS1acyy="SELECT * FROM $table_name36001 WHERE customer_id ='$cust_id'  AND address_id= '$catproduct9' AND type_id='900' AND status!='0' AND approved ='0' AND date_added between '$startd' AND '$finishd'   ";


			$result112ab1acyy = @mysqli_query($connection,$sq112abS1acyy) or die(mysqli_error($connection));	
		while ($row1bSzyy = mysqli_fetch_array($result112ab1acyy)) {
		    ///$order7=  stripslashes($row1bS['product_id']);
	
		$dateordry=$row1bSzyy['date_added'];
		$approvdry=$row1bSzyy['address_1st'];
		$pro_id=$row1bSzyy['pro_id'];
		
		$Dstatus=$row1bSzyy['status'];
	//	echo "$Dstatus - $pro_id  - $catproduct9<br/>";
		
		$nonReq=$reqCredit;
		
		if($Dstatus==1){

	$earnReq=$earnReq+$ty[$catproduct9];
	
	//$nonReq=$nonReq - $ty[$catproduct9];
	
	$NA9 .="<br/>$approvdry  Approved on: $dateordry";

}
	
	$Processor="
	<h3 class=\"collapsible\" id=\"section297$catproduct9\">Manage<span></span></h3>
<div class=\"container\">
    <div class=\"content\">
	                 <FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/$prog?token=$tok&log=$logged\">
                <input type=\"hidden\" name=\"pnum\" value=\"$cust_id\" size=\"5\" />
             <input type=\"hidden\" name=\"pro_id\" value=\"$pro_id\" size=\"5\" />
                  <input type=\"hidden\" name=\"jedID2\" value=\"9536\"  />
                  <input type=\"hidden\" name=\"jedID21\" value=\"0\"  />
                             <input type=\"hidden\" name=\"text_account34\" value=\"$cust_id\"  />
	                 <input type=\"hidden\" name=\"tboo\" value=\"0\"  />             
	    <input type=\"hidden\" name=\"last\" value=\"$lname\" >
	 <input type=\"hidden\" name=\"createD\" value=\" $signD\" >
	<input type=\"hidden\" name=\"stringSS\" value=\"$stringSS\" > 
	 <input type=\"hidden\" name=\"approve\" value=\"$logged\" > 
	 <input type=\"hidden\" name=\"admin_id\" value=\"$user_gid\">          
	    <input type=\"hidden\" name=\"MIT\" value=\"$ttitle\">
	    <input type=\"hidden\" name=\"classSS\" value=\"$catproduct9\" > 
 <input type=\"hidden\" name=\"dir_id\" value=\"$divisor\">
 		  <input type=\"hidden\" name=\"upload\" value=\"$finishd\"  />
  <input type=\"hidden\" name=\"product\" value=\"$startd\">
	 <input type=\"hidden\" name=\"first\" value=\"$fname\" >    
                 <font size=\"2\"> </font>
 <button class=\"fsSubmitButtonsmall\" type=\"input\"> Delete Completion</button>
</form>
	</div></div>
	";
	
	
	}
	
	
	
	
	
	
	
	
	
	}
	
	
	

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

if($pty[$catproduct9]==1){
  //$display_CATprod .=  "<option value=\"$catproduct9\"> $Tnameproduct[$catproduct9]</option>";

}

$kj=$kj+1;
if ($paidchecker==1){

if($user_gid<1){
$listcredits.="<tr><td>$catproduct9</td><td>$nameproduct</td><td>$creditA</td><td>$reqA</td><td>$jade_doc1</td><td>$NA9</td><td>N/A </td></tr>";
}

if($user_gid>0){

$listcredits.="<tr><td>$catproduct9</td><td>$nameproduct</td><td>$creditA</td><td>$reqA</td><td>$jade_doc1</td><td>$NA9</td><td>$Processor</td></tr>";
}

$listcreditsA.="<tr><td>$catproduct9</td><td>$nameproduct</td><td>$creditA</td><td>$reqA</td><td>$jade_doc1</td><td>$NA9</td></tr>";
}

}


$extracellH1 .="<td><input type=\"text\" name=\"filter_req$kj\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>";
$extracellH .="<td>$nameproduct</td>";
$extracellH22 .="<td bgcolor=\"#C0C0C0\">$nameproduct</td>";
//echo $extracellH;
}







$run="$loc2/createaccount/OpenEvent.php?path=$path&product_id=$product_id";

        $i=$i+1;
        









$sq112abS1acyy1="SELECT * FROM $table_name36001 WHERE customer_id ='$cust_id'   AND type_id='900'  AND name='COMP' AND status='1' AND date_added between '$startd' AND '$finishd'   ";
///AND address_id= '$catproduct9'

			$result112ab1acyy1 = @mysqli_query($connection,$sq112abS1acyy1) or die(mysqli_error($connection));	
		while ($row1bSzyy1 = mysqli_fetch_array($result112ab1acyy1)) {
		    ///$order7=  stripslashes($row1bS['product_id']);
	
		$dateordry=$row1bSzyy1['date_added'];
		$approvdry=$row1bSzyy1['address_1st'];
		$pro_id=$row1bSzyy1['pro_id'];
		
		$catproduct9=$row1bSzyy1['address_id'];
		
		$pty[$catproduct9]=0;
		
		$jameElec=$jameElec + $ERcreditAA[$catproduct9];
		$jameRec=$jameRec + $RRcreditAA[$catproduct9];
		
		$NA9 ="<font color=\"#0b6933\">Completed</font><br/>$approvdry  Approved on: $dateordry";
		
		$jade_doc1="COMP";

	$Processor1="
	<h3 class=\"collapsible\" id=\"section297$catproduct9\">Manage<span></span></h3>
<div class=\"container\">
    <div class=\"content\">
	                 <FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/$prog?token=$tok&log=$logged\">
                <input type=\"hidden\" name=\"pnum\" value=\"$cust_id\" size=\"5\" />
             <input type=\"hidden\" name=\"pro_id\" value=\"$pro_id\" size=\"5\" />
                  <input type=\"hidden\" name=\"jedID2\" value=\"9536\"  />
                  <input type=\"hidden\" name=\"jedID21\" value=\"0\"  />
                             <input type=\"hidden\" name=\"text_account34\" value=\"$cust_id\"  />
	                 <input type=\"hidden\" name=\"tboo\" value=\"0\"  />             
	    <input type=\"hidden\" name=\"last\" value=\"$lname\" >
	 <input type=\"hidden\" name=\"createD\" value=\" $signD\" >
	<input type=\"hidden\" name=\"stringSS\" value=\"$stringSS\" > 
	 <input type=\"hidden\" name=\"approve\" value=\"$logged\" > 
	 <input type=\"hidden\" name=\"admin_id\" value=\"$user_gid\">          
	    <input type=\"hidden\" name=\"MIT\" value=\"$ttitle\">
	    <input type=\"hidden\" name=\"classSS\" value=\"$catproduct9\" > 
 <input type=\"hidden\" name=\"dir_id\" value=\"$divisor\">
 		  <input type=\"hidden\" name=\"upload\" value=\"$finishd\"  />
  <input type=\"hidden\" name=\"product\" value=\"$startd\">
	 <input type=\"hidden\" name=\"first\" value=\"$fname\" >    
                 <font size=\"2\"> </font>
 <button class=\"fsSubmitButtonsmall\" type=\"input\"> Delete Completion</button>
</form>
	</div></div>
	";



if($user_gid>0){

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

if($user_gid<1){

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


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





}

for ($Tpm22=0; $Tpm22<$dd; $Tpm22++) {

$catproduct9=$Cv[$Tpm22];

if($pty[$catproduct9]==1){
  $display_CATprod .=  "<option value=\"$catproduct9\"> $Tnameproduct[$catproduct9]</option>";

}
}
$listcreditsT="<tr><td colspan=\"7\">


<FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/$prog?token=$tok&log=$logged\">
                <input type=\"hidden\" name=\"pnum\" value=\"$cust_id\" size=\"5\" />
             <input type=\"hidden\" name=\"pro_id\" value=\"$pro_id\" size=\"5\" />
                  <input type=\"hidden\" name=\"jedID2\" value=\"19536\"  />
                  <input type=\"hidden\" name=\"jedID21\" value=\"0\"  />
                             <input type=\"hidden\" name=\"text_account34\" value=\"$cust_id\"  />
	                 <input type=\"hidden\" name=\"tboo\" value=\"0\"  />             
	    <input type=\"hidden\" name=\"last\" value=\"$lname\" >
	 <input type=\"hidden\" name=\"createD\" value=\" $signD\" >
	<input type=\"hidden\" name=\"stringSS\" value=\"$stringSS\" > 
	 <input type=\"hidden\" name=\"approve\" value=\"$logged\" > 
	 <input type=\"hidden\" name=\"admin_id\" value=\"$user_gid\">          
	    <input type=\"hidden\" name=\"MIT\" value=\"$ttitle\">
	   Select Class <select name=\"classSS\"> 
	   $display_CATprod
	   </select>
 <input type=\"hidden\" name=\"dir_id\" value=\"$divisor\">
 		  <input type=\"hidden\" name=\"upload\" value=\"$finishd\"  />
  <input type=\"hidden\" name=\"product\" value=\"$startd\">
	 <input type=\"hidden\" name=\"first\" value=\"$fname\" >    
                 <font size=\"2\"> </font>
 <button class=\"fsSubmitButtonsmall\" type=\"input\"> Add Credit for This Class</button>
</form>



</td></tr>";


if($user_gid<1){

$listcreditsT='';
}



/////
$earnReq=$earnReq+$jameRec;
///$nonReq=$nonReq+$jameElec+1;
$reqCredit=$reqCredit+$jameRec+$jameElec;


////
     
        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);  
 
$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); 
 
 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;


////

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

  $display_block66 ="
  
 <table><tr><td> #ID: $cust_id $fname $lname</td><td></td></tr>
 <tr><td>Classes Must be Completed from: $startd</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/><br/>

Total Elective Credits Needed: $totnonreq<br/>

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



<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>
<td>Processor</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>
<td></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();\">



  <!----
   <FORM  name=\"formcheck55\"  METHOD=\"POST\"   ACTION=\"$loc2/admin/GoTool/$prog?token=$tok&log=$logged\">

   Select Stakeholder Group:
    <select name=\"group_id\">
       $display_listCGP
    </select><br/>
    
  
    


Select Product Category:
    <select name=\"CAT_id\">
       $display_listCAT
    </select><br/>


    
    
    Just Active Participants/Stakeholders:<input type=\"radio\" name=\"active\" value=\"1\"  /><br/>
All Participants/Stakeholders: <input type=\"radio\" name=\"active\" checked value=\"0\"  /><br/>
                     <input type=\"hidden\" name=\"bb\" value=\"1\"  />
                 <input type=\"hidden\" name=\"gbad\" value=\"1\"  />

                 <input type=\"hidden\" name=\"yummap\" value=\"100\" size=\"40\" />
               <input type=\"hidden\" name=\"gbadMod\" value=\"\"  />
                <input type=\"hidden\" name=\"jedID2\" value=\"2\"  />

<input type=\"submit\" value=\"Select Stakeholder Group\" name=\"B3\">
              </form>--->";







    $display_block= "
         $display_block66

    ";

     }





         if( $jedID2==2){

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


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


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

$display_title .=":  $nameCAT[$CAT_id]";

if ($mail1>0){

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




  include("OpenEventManager_mail.php");
}



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


include('../dashboard/file2/lists2.php');

$Eactive=0;
$EExtra='';
$ALLT="-ALL";

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


if ($Eactive>0) {
	
	$EExtra="And status>'0'";
	$ALLT="-Only Active";
//	echo $EExtra;
}



/////

// $sql33cat ="SELECT * FROM $table_name54A where category_id='$CAT_id' ";
////     $result331cat = @mysqli_query($connection,$sql33cat) or die(mysqli_error($connection));
//    while ($row1a1cat = mysqli_fetch_array($result331cat)) {
// $catproduct9= $row1a1cat['product_id'];


// $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'];
//echo $nameproduct;
//}
//$kj=$kj+1;
//$extracellH1 .="<td><input type=\"text\" name=\"filter_req$kj\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>";
//$extracellH .="<td>$nameproduct</td>";
//$extracellH22 .="<td bgcolor=\"#C0C0C0\">$nameproduct</td>";
////echo $extracellH;
//}

//////

    $sql12d ="SELECT * FROM $table_name36 WHERE customer_group_id = '$group_id' $EExtra ";
          $result331d = @mysqli_query($connection,$sql12d) or die(mysqli_error($connection));
         while ($row11d = mysqli_fetch_array($result331d)) {

          $pnum=  $row11d['customer_id'];
$gpnum= $row11d['customer_group_id'];
         $fname=  $row11d['firstname'];
         $lname=  $row11d['lastname'];
         $email=  $row11d['email'];
         $phone=  $row11d['telephone'];
        $Agpnum=  $row11d['status'];
        $signup=$row11d['date_added'];
         $ip=  $row11d['ip'];
          $i=$i+1;
          $agent_id2="NA";

          $sql33 ="SELECT * FROM $table_name80 where pat_id='$pnum' Order By map_id DESC";
     $result331 = @mysqli_query($connection,$sql33) or die(mysqli_error($connection));
    while ($row1a1 = mysqli_fetch_array($result331)) {
 $customer_idS2=  $row1a1['customer_id'];
 $map_id2= $row1a1['map_id'];
  $agent_id2= $row1a1['agent_id'];
  }


       $sql33 ="SELECT * FROM $table_name36 where customer_id='$pnum' ";
     $result331 = @mysqli_query($connection,$sql33) or die(mysqli_error($connection));
    while ($row1a1 = mysqli_fetch_array($result331)) {
// $customer_idS2=  $row1a1['customer_id'];
// $map_id3= $row1a1['map_id'];
//  $agent_id3= $row1a1['salesrep_id'];
    $agent_id2= $row1a1['salesrep_id'];
                if ($agent_id2==1){
       $agent_id2="NA";
                 }
  }

$extracell='';

/////
////Just took out the payment
////


      $processor="     <FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/$prog?token=$tok&log=$logged\">
                      <input type=\"hidden\" name=\"group_id\" value=\"$group_id\" size=\"5\" />
    <input type=\"hidden\" name=\"jedID2\" value=\"2\"  />
    <input type=\"hidden\" name=\"name1\" value=\"$fname $lname\" style=\"margin-top: 4px;\" />
              <input type=\"hidden\" name=\"email1\" value=\"$email\" style=\"margin-top: 4px;\" />
              <input type=\"hidden\" name=\"telephone1\" value=\"$phone\" style=\"margin-top: 4px;\" />
                <input type=\"hidden\" name=\"fee\" value=\"$total2\" style=\"margin-top: 4px;\" />
              <input type=\"hidden\" name=\"package\" value=\"$package2\" style=\"margin-top: 4px;\" />
              <input type=\"hidden\" name=\"date1\" value=\"$signup\" style=\"margin-top: 4px;\" />
              <input type=\"hidden\" name=\"group_id\" value=\"$group_id\" size=\"5\" />
              <input type=\"hidden\" name=\"id1\" value=\"$pnum\" style=\"margin-top: 4px;\" />
                <input type=\"hidden\" name=\"mail1\" value=\"2\" style=\"margin-top: 4px;\" />
 <button class=\"fsSubmitButtonsmall\" type=\"input\"> Send An Email</button>

</form>  <br/><br/>

           <a href=\"$loc2/admin/index.php?route=sale/customer/update&amp;token=$tok&amp;customer_id=$pnum\"><img src=\"$loc2/admin/GoTool/image/stake.png\" alt=\"\" width=\"120\"/></a>
  <!---- 
<FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/index.php?route=sale/customer/update&amp;token=$tok&amp;customer_id=$pnum\">

 <button class=\"fsSubmitButtonsmall\" type=\"input\"> Edit Stakeholder</button>
</form>--->


            <!---    <FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/$prog?token=$tok&log=$logged\">
                <input type=\"hidden\" name=\"pnum\" value=\"$pnum\" size=\"5\" />
                <input type=\"hidden\" name=\"jedID2\" value=\"436\"  />
                <input type=\"hidden\" name=\"group_id\" value=\"$group_id\" size=\"5\" />
                 <font size=\"2\"> Delete</font><input name=\"button name\" type=\"image\" src=\"$loc2/admin/GoTool/image/delete_small.png\">  </form>   --->

                 <FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/$prog?token=$tok&log=$logged\">
                <input type=\"hidden\" name=\"pnum\" value=\"$pnum\" size=\"5\" />
             <br/><br/>   Assign <input type=\"text\" name=\"newagent\" value=\"$agent_id3\" size=\"5\" />
                  <input type=\"hidden\" name=\"jedID2\" value=\"536\"  />
                <input type=\"hidden\" name=\"group_id\" value=\"$group_id\" size=\"5\" />
                 <font size=\"2\"> </font>
 <button class=\"fsSubmitButtonsmall\" type=\"input\"> Assign Candidate</button>
</form>


  <FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/$prog?token=$tok&log=$logged\">
                <input type=\"hidden\" name=\"pnum\" value=\"$pnum\" size=\"5\" />
    <br/><br/>            Assign to New Group<br/>
<select name=\"Cgroup_id\">
<option value=\"$gpnum\"> $nameP[$gpnum]</option>
       $display_listCGP
    </select><br/>
                  <input type=\"hidden\" name=\"jedID2\" value=\"5360\"  />
                <input type=\"hidden\" name=\"group_id\" value=\"$group_id\" size=\"5\" />
                 
 <button class=\"fsSubmitButtonsmall\" type=\"input\">Change Stakeholder Group</button>
</form>


  <FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/$prog?token=$tok&log=$logged\">
                <input type=\"hidden\" name=\"pnum\" value=\"$pnum\" size=\"5\" />
       <br/><br/>         Change Status<br/>
<select name=\"ACgroup_id\">
<option value=\"$Agpnum\"> $cativeG[$Agpnum]</option>
       <option value=\"1\"> Active</option>
 <option value=\"0\"> Not Active</option>
    </select><br/>
                  <input type=\"hidden\" name=\"jedID2\" value=\"53600\"  />
                <input type=\"hidden\" name=\"group_id\" value=\"$group_id\" size=\"5\" />
                 <font size=\"2\"> 
</font>
 <button class=\"fsSubmitButtonsmall\" type=\"input\">Change Status</button>
</form>


";



       $boom .="<tr>
<td><font color=\"811616\">$pnum</font></td>
<td>$fname</td>

<td>$lname</td>
<td style=\"word-break:break-all;\">$email</td>
<td>$phone</td>
<td>$agent_id2 </td><td>$nameP[$agent_id2]</td>
<td>$ip</td>
<td>$signup</td>
<td> 


<h3 class=\"collapsible\" id=\"section297$pnum\">Manage<span></span></h3>
<div class=\"container\">
    <div class=\"content\">
$processor
</div></div>

</td>$extracell
</tr>";


      $boom2 .="<tr>
<td><font color=\"811616\">$pnum</font></td>
<td>$fname</td>

<td>$lname</td>
<td>$email</td>
<td>$phone</td>
<td>$agent_id2 </td><td>$nameP[$agent_id2]</td>
<td>$ip</td>
<td>$signup</td>$extracell
</tr>";

$csv2 .=$pnum .",";
$csv2 .=$fname .",";
$csv2 .=$lname .",";
$csv2 .=$email .",";
$csv2 .=$phone .",";
$csv2 .=$agent_id2 .",";
$csv2 .=$ip .",";
$csv2 .=$signup .",";
$csv2 .= "\n";
        }


$csv2H .="#$nameP[$group_id]" .",";
$csv2H .="First Name" .",";
$csv2H .="Last Name" .",";
$csv2H .="Email" .",";
$csv2H .="Phone" .",";
$csv2H .="Assigned to" .",";
$csv2H .="Leader" .",";
$csv2H .="IP" .",";
$csv2H .="Registered" ." ";
$csv2H .= "\n";

///$csv2="$csv2H $csv2";








///////
    $display_block= "
                  $viewmail
  <table><tr><td>Stakeholder:<font color=\"811616\"> $nameP[$group_id]<!-- - #$group_id-->$ALLT</font></td>
<td colspan=\"4\">$title</td>   </tr></table>

<table><tr>
 </tr></table>   <br/><br/>


<div style=\"display:none\">
 <table id=\"ReportTable\"> <thead> <tr>
   <td bgcolor=\"#C0C0C0\">  $nameP[$group_id] #ID</td>
<td bgcolor=\"#C0C0C0\">First Name</td>
<td bgcolor=\"#C0C0C0\">Last Name</td>
<td bgcolor=\"#C0C0C0\">Email</td>
<td bgcolor=\"#C0C0C0\">Phone</td>
<td bgcolor=\"#C0C0C0\">Assigned to #</td>
<td bgcolor=\"#C0C0C0\">Leader</td>
<td bgcolor=\"#C0C0C0\">IP</td>
<td bgcolor=\"#C0C0C0\">Date<br/> Registered</td> $extracellH22</tr></thead>  <tbody>
   $boom2</tbody></table>
</table>
</div>





     <table class=\"sortable\" id=\"ReportTable2\"> <thead> <tr>
   <td class=\"filterable\">$nameP[$group_id] #ID</td>
<td class=\"filterable\">First Name</td>
<td class=\"filterable\">Last Name</td>
<td class=\"filterable\">Email</td>
<td class=\"filterable\">Phone</td>
<td class=\"filterable\">Assigned to #</td>
<td class=\"filterable\">Leader #</td>
<td class=\"filterable\">IP</td>
<td class=\"filterable\">Date<br/> Registered</td>

<td class=\"filterable\">PROCESS REQUEST</td>$extracellH

</tr></thead><tbody>
<tr class=\"filter\">
<td align=\"left\"><input type=\"text\" name=\"filter_req\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>

<td align=\"left\"><input type=\"text\" name=\"filter_req0\" value=\"\" size=\"10\" onkeyup=\"Table.filter(this,this)\"/></td>
<td align=\"left\"><input type=\"text\" name=\"filter_req1\" value=\"\" size=\"10\" onkeyup=\"Table.filter(this,this)\"/></td>
<td align=\"left\"><input type=\"text\" name=\"filter_req1a\" value=\"\" size=\"10\" onkeyup=\"Table.filter(this,this)\"/></td>
<td align=\"left\"><input type=\"text\" name=\"filter_req2\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>

<td align=\"left\"><input type=\"text\" name=\"filter_am\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>
<td align=\"left\"><input type=\"text\" name=\"filter_vd\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>
<td align=\"left\"><input type=\"text\" name=\"filter_stat\" value=\"\" size=\"6\" onkeyup=\"Table.filter(this,this)\"/></td>
<td align=\"left\"><input type=\"text\" name=\"filter_comment\" value=\"\" size=\"10\" onkeyup=\"Table.filter(this,this)\"/></td>
<td align=\"left\"></td>$extracellH1


</tr>$boom</tbody></table>



           <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>
		</div>
	</div>
</div>




    ";  }








      if( $jedID2==1){

    $product_id=$_GET['product_id'];

  $r1=rand(0,10);
  $r2=rand(0,10);

 $sql12d ="SELECT * FROM $table_name900 WHERE product_id = '$product_id'";
          $result331d = @mysqli_query($connection,$sql12d) or die(mysqli_error($connection));
         while ($row1d = mysqli_fetch_array($result331d)) {
$title=  $row1d['class_name'];
$title=stripslashes($title);
        $title=htmlspecialchars_decode($title);
                                $title=mb_convert_encoding($title,  "HTML-ENTITIES");
$model=  $row1d['model'];
$seats=  $row1d['seats'];

$run="$loc/createaccount/OpenEvent.php?path=$path&product_id=$product_id";

$event_id=  $row1d['event_id'];

$filled=  $row1d['filled'];

 $sql12dg ="SELECT * FROM $table_name900D WHERE product_id = '$product_id'";
          $result331dg = @mysqli_query($connection,$sql12dg) or die(mysqli_error($connection));
          $num331a = mysqli_num_rows( $result331dg);


$filled=$seats-$filled-$num331a;
$description=  $row1d['description'];

$description=stripslashes($description);
        $description=htmlspecialchars_decode($description);
                                $description=mb_convert_encoding($description,  "HTML-ENTITIES");

$class_days=  $row1d['class_days'];
$dateEvent2=  $row1d['date_time'];

//class_days = '" . $this->db->escape(serialize($data['class_days'])) . "',
//class_length = '" . $this->db->escape($data['class_length']) . "',
//date_time = '" . (int)strtotime($data['class_date'] . ' ' . $data['class_time']) . "'


$dateEvent= gmdate('n/d/Y', $dateEvent2);
$cost=  $row1d['cost'];
$date_end =  $row1d['date_end'];  //  strtotime(
$timeEvent= gmdate('g:i:s A', $dateEvent2);
$dayEvent= gmdate('l', $dateEvent2);
//$dateEvent2= gmdate('m/d/Y h:i:s A', $date_end);
$telephone=  $row1d['telephone'];
$location=  $row1d['location'];
$length=  $row1d['class_length'];

$timeEventEnd=strtotime("$timeEvent + $length");

$refundable=  $row1d['refundable'];
if ($refundable==0){
$refundable ="No";
}else{
 $refundable="Yes";
}

if ($cost==0){
$cost ="Free";
}


//$title="CAPACITY Conference Ministry Service (Volunteer) Information Sessions";


$product_code=$model;


$display_block ="


  <h1>$title</h1>
  <div class=\"product-info\">
        <div class=\"right\">
            <div class=\"price\">Price:                $cost                <br />  </div>

  </div>
        <i>Click Tabs to Review Event</i>  <br/><br/>
  <div id=\"tabs\" class=\"htabs\"> <a href=\"#tab-event\">$tab3</a>
  <a href=\"#tab-description\">$tab2</a>
            <a href=\"#tab-review\">$tab1</a>
  </div>
    <!--Tab 1-->
<div id=\"tab-event\" class=\"tab-content\">
       <h2 id=\"review-title\">$tab3</h2>
       <form action=\"$run\" method=\"post\" enctype=\"multipart/form-data\" id=\"form\">
          <fieldset>
            <input type=\"hidden\" name=\"jedID2\" value=\"2\"  />
                <input type=\"hidden\" name=\"mdate\" value=\"$dateEvent\"  />
                    <input type=\"hidden\" name=\"mtime\" value=\"$timeEvent\"  />
                        <input type=\"hidden\" name=\"location\" value=\"$location\"  />
                          <input type=\"hidden\" name=\"title\" value=\"$title\"  />
                            <input type=\"hidden\" name=\"prod\" value=\"$product_id\"  />
                              <input type=\"hidden\" name=\"event\" value=\"$event_id\"  />
     <table><tr><td> First:</td><td> <input type=\"text\" name=\"firstname\" value=\"First Name&hellip;\"  size=\"60\" onfocus=\"this.value=(this.value=='First Name&hellip;')? '' : this.value ;\" />  </td></tr>
     <tr><td> Last:</td><td>  <input type=\"text\" name=\"lastname\" value=\"Last Name&hellip;\" size=\"60\"  onfocus=\"this.value=(this.value=='Last Name&hellip;')? '' : this.value ;\" />   </td></tr>
     <tr><td> Email:</td><td> <input type=\"text\" name=\"email\" value=\"Email Address&hellip;\" size=\"60\"  onfocus=\"this.value=(this.value=='Email Address&hellip;')? '' : this.value ;\" />  </td></tr>
     <tr><td> Phone:</td><td> <input type=\"text\" name=\"phone\" value=\"Phone Number&hellip;\" size=\"60\"  onfocus=\"this.value=(this.value=='Phone&hellip;')? '' : this.value ;\" />     </td></tr>
     <tr><td> Zip:</td><td> <input type=\"text\" name=\"zip\" value=\"Zip Code&hellip;\" size=\"60\"  onfocus=\"this.value=(this.value=='Zip Code&hellip;')? '' : this.value ;\" />   </td></tr>
       </table>  <br/>  Best time to Contact You:<select size=\"1\" name=\"Time\">
	<option value=\"Morning\">Morning</option>
	<option value=\"Evening\">Evening</option>
	<option value=\"Weekend\">Weekend</option>
	</select>     <br/>  <br/>

    <input type=\"hidden\" name=\"r1\" value=\"$r1\"  />
    <input type=\"hidden\" name=\"r2\" value=\"$r2\"  />
      Prove you are not spam: $r1 + $r2 =  <input type=\"text\" name=\"math\" value=\"Answer&hellip;\" size=\"5\" onfocus=\"this.value=(this.value=='Answer&hellip;')? '' : this.value ;\" />
      <br/>
            <button class=\"fsSubmitButtonsmall\" type=\"input\"> Register </button>

      </fieldset>
      </form>
					</div>

  <div id=\"tab-description\" class=\"tab-content\"><p>
	$description</p>
</div>
<div id=\"tab-review\" class=\"tab-content\">


    				<table class=\"form\">
							<tr>
								<td>Event Name: </td>
								<td>$title</td>
							</tr>
							     <tr>
									<td>Telephone: </td>
									<td>$telephone</td>
								</tr>
														<tr>
								<td>Event Date: </td>
								<td>$dateEvent</td>
							</tr>
							<tr>
								<td>Event Time: </td>
								<td>$timeEvent</td>
							</tr>
							<tr>
								<td>Event Days: </td>
								<td> $dayEvent <br />
																	</td>
							</tr>
							<tr>
								<td>Event Length: </td>
								<td>$length</td>
							</tr>
							<tr>
								<td>Location: </td>
								<td>$location</td>
							</tr>
							<tr>
								<td>Seats: </td>
								<td>$seats</td>
							</tr>
							<tr>
								<td>Seats Available: </td>
								<td>$filled</td>
							</tr>
							<tr>
								<td>Refundable: </td>
								<td>$refundable</td>
							</tr>
						</table>


    <div class=\"buttons\">

    </div>
  </div>


";
       }    }









?>


<!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>

