<?php
              $beg1Why9919a='';
         // beg1Why9919a
$map_idQ='';
$display_block11='';
$bvo='';

 if (isset($_POST['Boo2'])) {
	$jBoo2=$_POST['Boo2'];
	if ($jBoo2>0){
	$bvo=1;
	}
	
	}
	

 if (isset($_POST['jedID2z'])) {
	$jedID2z=$_POST['jedID2z'];
$groupS4=$text_account2;//stays to current group
if ($jedID2z==100){
$groupS4=$_POST['groupyz'];
 $sql2 = "UPDATE $table_name36 SET   customer_group_id='$groupS4',status='1'  WHERE customer_id='$text_account3'" ; //add support_id the opportunity to be part of the $nameCustG[$groupS4]
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());
$viewmail .="<div class=\"success\"> <font size=\"4\">Congratulations!   You have accepted this $newministryopportunity. Please click the red <i>My Dashboard Tab</i> below or close this browser window to begin your new program.</font></div> ";

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

       $sql2azzDe = "INSERT INTO $table_name301 ( app_id, survey_id, create_date, test_stat, customer_id ,van1, van2)  VALUES ('$app_idQ','$gsurvey_idR2', '$Rtoday', '$Qstat5','$text_account3','$groupS4','$text_account2')";
$result2azzDe = @mysql_query($sql2azzDe,$connection) or die(mysql_error());
       $sql2azzDe = "INSERT INTO $table_name302 ( app_id, survey_id, create_date, test_stat, customer_id ,van1, van2) VALUES ('$app_idQ','$gsurvey_idR2', '$Rtoday', '$Qstat5','$text_account3','$groupS4','$text_account2')";
$result2azzDe = @mysql_query($sql2azzDe,$connection) or die(mysql_error());
///$mess="<div class=success>A Decision Record for Application has been created.</div>";


}

if ($jedID2z==101){
$groupS4=$_POST['groupyz'];
 $sql2 = "UPDATE $table_name36 SET   customer_group_id='$groupS4',status='0'  WHERE customer_id='$text_account3'" ; //add support_id
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());
$viewmail .="<div class=\"warning2\"> You have declined the opportunity to be part of $newministryopportunity.   We thank you for your participation in the $nameCustG[$groupS4] application process and pray God’s continued blessings over you, your family and your ministry.  Should you decide to re-apply for the $nameCustG[$groupS4] program when it is offered again, you will be required to start the process as a new applicant.  Please click the red <i>My Dashboard Tab</i> below or close this browser window.</div>"; 
$app_idQ=1001;
$gsurvey_idR2=1000;
$Qstat5=1001;
$Rtoday=date("Y-m-d h:i:s");

       $sql2azzDe = "INSERT INTO $table_name301 ( app_id, survey_id, create_date, test_stat, customer_id ,van1, van2)  VALUES ('$app_idQ','$gsurvey_idR2', '$Rtoday', '$Qstat5','$text_account3','$groupS4','$text_account2')";
$result2azzDe = @mysql_query($sql2azzDe,$connection) or die(mysql_error());
       $sql2azzDe = "INSERT INTO $table_name302 ( app_id, survey_id, create_date, test_stat, customer_id ,van1, van2) VALUES ('$app_idQ','$gsurvey_idR2', '$Rtoday', '$Qstat5','$text_account3','$groupS4','$text_account2')";
$result2azzDe = @mysql_query($sql2azzDe,$connection) or die(mysql_error());
///$mess="<div class=success>A Decision Record for Application $map_idQ has been created.</div>";
}



}







    ////
$buyApp='';
$startApp='';
               $startApp[1]=" <FORM  name=\"formcheck\" METHOD=\"POST\" ACTION=\"$runCAP\">

                 <input type=\"hidden\" name=\"gbad\" value=\"1\"  />
                 <input type=\"hidden\" name=\"survey_id\" value=\"21\"  />
                 <input type=\"hidden\" name=\"yummap\" value=\"100\" size=\"40\" />
               <input type=\"hidden\" name=\"gbadMod\" value=\"\"  />
                <input type=\"hidden\" name=\"jedID2\" value=\"3\"  />
                <button class=\"fsSubmitButton\" type=\"input\">Start Application</button>
         </form>";

 
     $XX1=1;
    $bucketstitle='';
     $bucketsZ='';
$otherApp='';



$RegEve2=0;

 $sql12daaE ="SELECT * FROM $table_name1005B WHERE survey_id = '$port_id' AND van36 >'0'";
          $result331daaE = @mysql_query($sql12daaE,$connection) or die(mysql_error());
$RegEve2 = mysql_num_rows( $result331daaE);


    $sql12daa ="SELECT * FROM $table_name1005B WHERE survey_id = '$port_id' Order by surveyQ_id DESC limit 1";
          $result331daa = @mysql_query($sql12daa,$connection) or die(mysql_error());
  while ($row1daa1 = mysql_fetch_array($result331daa)) {
     $buckets=  $row1daa1['surveyQ_id'];
$bucketsKt=  $row1daa1['surveyQ_idK'];
   //     echo "buckets = $buckets  K= $bucketsKt <br/>";
              }

     ///  for ($x22=1; $x22<=$buckets; $x22++) {
for ($x22=1; $x22<=$buckets; $x22++) {
$bucketsZ[$x22]=0;
       $XX1=$XX1+1;                    //AND Z_num >'-1' AND title !='NONE' Order by surveyQ_idK, surveyQ_id 
          $sql12ad12 ="SELECT * FROM $table_name1005B WHERE survey_id = '$port_id' AND sub_id='0' AND status='1' AND surveyQ_idK='$x22' Order by surveyQ_idK, surveyQ_id ";
           $result331daa = @mysql_query($sql12ad12,$connection) or die(mysql_error());
            while ($row1daa12 = mysql_fetch_array($result331daa)) {
     $bucketstitle[$x22]=  $row1daa12['title'];
     $judge=   $row1daa12['surveyQ_id'];

//echo "judge = $judge $bucketstitle[$x22] $x22<br/>";

                                                                                                              
      //  $x22              // Order by surveyQ_idK, surveyQ_id
           $sql12ad12aG ="SELECT * FROM $table_name1005B WHERE survey_id = '$port_id' AND sub_id='1' AND surveyQ_id='$judge' order by Z_num DESC limit 1 ";
            $result331daaG = @mysql_query($sql12ad12aG,$connection) or die(mysql_error());
             while ($row1daa1G = mysql_fetch_array($result331daaG)) {
     $bucketsZ[$x22]=  $row1daa1G['Z_num'];

       //   echo "bucketsZ = $bucketsZ[$x22] -$bucketstitle[$x22] <br/>";

             }
if ($bucketsZ[$x22]<1){
$bucketsZ[$x22]=0;
}
         for ($x2=1; $x2<=$bucketsZ[$x22]; $x2++) {                                                                          // Z_num     Order by
                  $XX1=$XX1+1;
     $sql12ad12aG1 ="SELECT * FROM $table_name1005B WHERE survey_id = '$port_id' AND sub_id='1' AND surveyQ_id='$judge' AND  surveyQ_idK='$x2' AND status='1'   ";
            $result331daaG1 = @mysql_query($sql12ad12aG1,$connection) or die(mysql_error());
             while ($row1daa1G1 = mysql_fetch_array($result331daaG1)) {
     $infoZ[$x2]=  $row1daa1G1['information_id'];
       $titleZ[$x2]=  $row1daa1G1['title'];

        //  echo "InfoZ = $x2 - $x22 -$infoZ[$x2] <br/>";


         $testy= $infoZ[$x2];
 $sql33 ="SELECT * FROM $table_name92 WHERE information_id = '$testy' ";
  $result33 = @mysql_query($sql33,$connection) or die(mysql_error());
        $row22 =mysql_fetch_array($result33,MYSQL_ASSOC);
          $display_block9=  $row22['description'];
            $display_block9=stripslashes($display_block9);
              // $display_block9=htmlspecialchars_decode($display_block9);
            $display_block9=  html_entity_decode($display_block9, ENT_QUOTES, 'UTF-8');
            $display_block19[$x2]=$display_block9;
 // $display_block19[$x2]=      htmlentities( $display_block9, ENT_QUOTES | ENT_SUBSTITUTE, "UTF-8" );


 $find[] = 'â'; // left side double smart quote
$find[] = 'â'; // left side single smart quote
$find[] = 'â'; // right side single smart quote
$find[] = 'â¦'; // elipsis
$find[] = 'â'; // em dash
$find[] = 'â'; // en dash
$find[] = 'â'; // right side double smart quote                       // â
$replace[] = '"';
$replace[] = "'";
$replace[] = "'";
$replace[] = "...";
$replace[] = "-";
$replace[] = "-";
  $replace[] = '"';
$display_block19[$x2]= str_replace($find, $replace, $display_block19[$x2]);     // $infozz[$x2]
   $buyprint='';
    $appprint='';
$otherprint='';//payprint
    $Intprint='';
    $Roadprint='';
$buyprint2a='';
$buyprint[$x2]=  $row1daa1G1['buy'];
$zPersonalT[$x2]='';
          $buyprint2='';
      if ($buyprint[$x2]>0){
   $buyprint2a=$buyprint[$x2];


 $zPersonalT[$x2]=  $row1daa1G1['zPersonalT'];
if ($zPersonalT[$x2] !=$blink){
$buttontile="$zPersonalT[$x2]";
}else{
$buttontile="Pay Fees";
}



  $buyApp[$buyprint2a] =   "<FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/index.php?route=product/category&cc=$cc99&path=$buyprint2a\">

                 <input type=\"hidden\" name=\"gbad\" value=\"1\"  />
                 <input type=\"hidden\" name=\"survey_id\" value=\"21\"  />
                 <input type=\"hidden\" name=\"yummap\" value=\"100\" size=\"40\" />
               <input type=\"hidden\" name=\"gbadMod\" value=\"\"  />
                <button class=\"fsSubmitButton\" type=\"input\">$buttontile</button>
         </form>";





  $buyApp[1] =   "<FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$buyApp2\">

                 <input type=\"hidden\" name=\"gbad\" value=\"1\"  />
                 <input type=\"hidden\" name=\"survey_id\" value=\"21\"  />
                 <input type=\"hidden\" name=\"yummap\" value=\"100\" size=\"40\" />
               <input type=\"hidden\" name=\"gbadMod\" value=\"\"  />
                <input type=\"hidden\" name=\"jedID2\" value=\"3\"  />
                <button class=\"fsSubmitButton\" type=\"input\">Pay Application Fee</button>
         </form>";

 $buyprint2=$buyApp[$buyprint2a];

      }
  $appprint2=''; 
$zPersonalT[$x2]='';
 $appprint[$x2]=  $row1daa1G1['app'];
 

      if ($appprint[$x2]>0){

$appprint2a=$appprint[$x2];
 $zPersonalT[$x2]=  $row1daa1G1['zPersonalT'];
if ($zPersonalT[$x2] !=$blink){
$buttontile="$zPersonalT[$x2]";
}else{
$buttontile="Pay Fees";
}


$startApp[$appprint2a] =   "<FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/index.php?route=product/product&cc=$cc99&product_id=$appprint2a\">

                 <input type=\"hidden\" name=\"gbad\" value=\"1\"  />
                 <input type=\"hidden\" name=\"survey_id\" value=\"21\"  />
                 <input type=\"hidden\" name=\"yummap\" value=\"100\" size=\"40\" />
               <input type=\"hidden\" name=\"gbadMod\" value=\"\"  />
                <button class=\"fsSubmitButton\" type=\"input\">$buttontile</button>
         </form>";



   $appprint2=$startApp[$appprint2a];
      }


 $otherprint[$x2]=  $row1daa1G1['pay'];
$otherprintZZ=  $row1daa1G1['pay'];

   $otherprint2='';
      if ($otherprint[$x2]>0){
$othergroup='';
$othergroupZ=  $row1daa1G1['groupy'];
$otherApp='';

$otherApp[1] =   "<FORM  name=\"formcheck\" target=\"blank\" METHOD=\"POST\" ACTION=\"$badboy\">

                 <input type=\"hidden\" name=\"groupyz\" value=\"$othergroupZ\"  />
                   <input type=\"hidden\" name=\"status\" value=\"1\" size=\"40\" />
                <input type=\"hidden\" name=\"jedID2z\" value=\"100\"  />
            
                <button class=\"fsSubmitButton\" type=\"input\">I Accept</button>
         </form>";

$otherApp[2] =   "<FORM  name=\"formcheck\" target=\"blank\" METHOD=\"POST\" ACTION=\"$badboy\">
<input type=\"hidden\" name=\"groupyz\" value=\"$othergroupRegZ\"  />
                 <input type=\"hidden\" name=\"status\" value=\"0\" size=\"40\" />
                <input type=\"hidden\" name=\"jedID2z\" value=\"101\"  />
                <button class=\"fsSubmitButton\" type=\"input\">I Decline</button>
         </form></td></tr></table>";

$otherApp[3]="<FORM  name=\"formcheck\" METHOD=\"POST\" ACTION=\"$runCAP\">

                 <input type=\"hidden\" name=\"gbad\" value=\"1\"  />
                 <input type=\"hidden\" name=\"survey_id\" value=\"21\"  />
                 <input type=\"hidden\" name=\"yummap\" value=\"100\" size=\"40\" />
               <input type=\"hidden\" name=\"gbadMod\" value=\"\"  />
                <input type=\"hidden\" name=\"jedID2\" value=\"3\"  />
                <button class=\"fsSubmitButton\" type=\"input\">Start Application</button>
         </form>";




if ($otherprintZZ==6){

///echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
$Tgrade=$row1daa1G1['title37'];
$Pgrade=$row1daa1G1['title4'];

$display_blockRA92='';
include('file/NewUploadsP.php');
//$display_blockRA92='yes';
$otherApp[6]="$display_blockRA92";
$showchart='';
}

if ($otherprintZZ==7){

///echo "hello <br/>";
$jedID2U=7;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
include('file/NewPayment.php');
//$display_blockRA92='yes';
$otherApp[7]="$display_blockRA92";
$showchart='';
}


if ($otherprintZZ==8){

///echo "hello <br/>";
$jedID2U=8;
//$port_idz=$row1daa1G1['zPersonalT'];
$bobmail='';
$whomail=$row1daa1G1['zDoctor'];
$memail=$row1daa1G1['zPersonalT'];
$Omemail=$row1daa1G1['title3'];

include('file/mailtrial.php');
//$display_blockRA92='yes';
$otherApp[8]="$bobmail";
$whomail='';
$memail='';

}


if ($otherprintZZ==8331){

///banners echo "hello <br/>";
$jedID2U=3;
 $viewmail='';
$port_idz=$row1daa1G1['zPersonalT'];////stakeholder_groups
$showchart=$row1daa1G1['zDoctor'];///name of button
$grade=$row1daa1G1['title3']; ///stores
$Tgrade=$row1daa1G1['title37'];
$Pgrade=$row1daa1G1['title4'];
$Wgrade=$row1daa1G1['MemCardTitle'];

$cust_first='';
$cust_last='';
$newemail1='';
$Pnewemail1='';

include('file/usergrou.php');



$display_blockRA92='';
///include('file/logintoall.php');
$topcat22="
$viewmail

<table><tr><td>

<FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$badboy\">
	             <table><tr><td>
 <input type=\"hidden\" name=\"Bamboo\" value=\"100\"  />
  <input type=\"hidden\" name=\"TXBoo\" value=\"$x2\"  />
	<input type=\"hidden\" name=\"TXXBoo\" value=\"$x22\"  />
	<input type=\"hidden\" name=\"Boo2\" value=\"$x2\"  />
<table><tr><td>	
First Name:</td><td><input type=\"text\" name=\"Nteamail1\" value=\"$cust_first\"  /><br/></td></tr>
<tr><td>Last Name:</td><td><input type=\"text\" name=\"Nteamail2\" value=\"$cust_last\"  /><br/></td></tr>

<tr><td>Email:</td><td><input type=\"text\" name=\"teamail1\" value=\"$newemail1\"  /><br/></td></tr>
<tr><td>Confirm Email:</td><td> <input type=\"text\" name=\"teamail2\" value=\"\"  /><br/></td>

<tr><td>Phone:</td><td><input type=\"text\" name=\"Pteamail1\" value=\"$Pnewemail1\"  /><br/></td></tr>
<tr><td>Confirm Phone:</td><td><input type=\"text\" name=\"Pteamail2\" value=\"\"  /><br/><br/></td></tr></table>
 <input type=\"hidden\" name=\"jedID2b\" value=\"536011\"  />
</td>
<td width=\"10\"></td>

<td>	
Group: <select name=\"Cgroup_id\">
       $display_listCGP
    </select><br/><br/>
Channel: <select name=\"Cstore_id\">
       $display_listStore
    </select><br/><br/>
    Send Email to Stakeholder: <br/> Yes <input type=\"radio\" name=\"sendemail\" value=\"1\" checked />
No <input type=\"radio\" name=\"sendemail\" value=\"0\"  /><br/><br/>
</td></tr></table>
	                <button class=\"fsSubmitButtonsmall\" type=\"input\">Add Account</button>
	         </form>
	         
	   </td><td width=\"10\"></td><td>
  <!--- <h1>Add Client Online </h1> --->
<FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/GoTool/stakeholder/OpenStakeholdersManager.php?token=$tok&log=$logged\">
	<input type=\"hidden\" name=\"gbad\" value=\"\">
    <input type=\"hidden\" name=\"jedID2\" value=\"0\"  />

    <input name=\"button name\" type=\"image\" src=\"GoTool/image/icon/addStakeRep.png\" /> </form>


            </td></tr></table>     
	         
	         
	         
	         
	         ";


$otherApp[8331]="$topcat22";
$showchart='';
$topcat22='';

}





if ($otherprintZZ==9){

///echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
$Mgrade=$row1daa1G1['MemCardTitle'];
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];
$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/NewAgentsP.php');
//$display_blockRA92='yes';
$otherApp[9]="$topcat22";
$showchart='';
}

//////
if ($otherprintZZ==909){
$topcat22='';
///echo "hello <br/>";
$jedID2U=3;
$tilepic=1;

///echo "approver= $text_account3";

$port_idz0=$row1daa1G1['zPersonalT'];

$port_idz02=explode(",", $port_idz0);
			$port_idz02M=count($port_idz02);
$port_idz=$port_idz02[0];
$tile1="View Roadmap";
if ($port_idz02M>1){
$tile1=$port_idz02[1];
}

$showchart0=$row1daa1G1['zDoctor'];

$showchart02=explode(",", $showchart0);
			$showchart02M=count($showchart02);
$showchart=$showchart02[0];

if ($showchart==0){
$tilepic=0;
}


$tile2="View Pathway";
if ($showchart02M>1){
$tile2=$showchart02[1];
}


$grade=$row1daa1G1['title3'];
$Mgrade=$row1daa1G1['MemCardTitle'];
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];
$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/NewAgentsP909.php');
//$display_blockRA92='yes';
$otherApp[909]="$topcat22";
$showchart='';
$topcat22='';

}


if ($otherprintZZ==911){
$topcat22='';
///echo "hello <br/>";
$jedID2U=3;
$tilepic=1;

///echo "approver= $text_account3";

$port_idz0=$row1daa1G1['zPersonalT'];

$port_idz02=explode(",", $port_idz0);
			$port_idz02M=count($port_idz02);
$port_idz=$port_idz02[0];
$tile1="View Roadmap";
if ($port_idz02M>1){
$tile1=$port_idz02[1];
}

$showchart0=$row1daa1G1['zDoctor'];

$showchart02=explode(",", $showchart0);
			$showchart02M=count($showchart02);
$showchart=$showchart02[0];

if ($showchart==0){
$tilepic=0;
}


$tile2="View Pathway";
if ($showchart02M>1){
$tile2=$showchart02[1];
}


$grade=$row1daa1G1['title3'];
$Mgrade=$row1daa1G1['MemCardTitle'];
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];
$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/NewAgentsP.php');
//$display_blockRA92='yes';
$otherApp[911]="$topcat22";
$showchart='';
$topcat22='';
}
///////

if ($otherprintZZ==9110){
$topcat22='';
///echo "hello <br/>";
$jedID2U=3;
$tilepic=1;

///echo "approver= $text_account3";

$port_idz0=$row1daa1G1['zPersonalT'];

$port_idz02=explode(",", $port_idz0);
			$port_idz02M=count($port_idz02);
$port_idz=$port_idz02[0];
$tile1="View Roadmap";
if ($port_idz02M>1){
$tile1=$port_idz02[1];
}

$showchart0=$row1daa1G1['zDoctor'];

$showchart02=explode(",", $showchart0);
			$showchart02M=count($showchart02);
$showchart=$showchart02[0];

if ($showchart==0){
$tilepic=0;
}


$tile2="View Pathway";
if ($showchart02M>1){
$tile2=$showchart02[1];
}


$grade=$row1daa1G1['title3'];
$Mgrade=$row1daa1G1['MemCardTitle'];
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];
$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/NewAgentsP9110.php');
//$display_blockRA92='yes';
$otherApp[9110]="$topcat22";
$showchart='';
$topcat22='';
}

/////
if ($otherprintZZ==89111){
$topcat22='';
///echo "hello <br/>";
$jedID2U=3;
$tilepic=1;

///echo "approver= $text_account3";

$port_idz0=$row1daa1G1['zPersonalT'];

$port_idz02=explode(":", $port_idz0);
			$port_idz02M=count($port_idz02);
$port_idz=$port_idz02[0];
$tile1="View Roadmap";
if ($port_idz02M>1){
$tile1=$port_idz02[1];
}

$showchart0=$row1daa1G1['zDoctor'];

$showchart02=explode(":", $showchart0);
			$showchart02M=count($showchart02);
$showchart=$showchart02[0];

if ($showchart==0){
$tilepic=0;
}


$tile2="View Pathway";
if ($showchart02M>1){
$tile2=$showchart02[1];
}
$GgradeSum=24;

if ($showchart02M>2){
$GgradeSum=$showchart02[2];
}


$grade=$row1daa1G1['title3'];


$Mgrade=$row1daa1G1['MemCardTitle'];
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];
$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/NewAgentsP89111.php');
//$display_blockRA92='yes';
$otherApp[89111]="$topcat22";
$showchart='';
$topcat22='';
}
/////
/////
if ($otherprintZZ==9111){
$topcat22='';
///echo "hello <br/>";
$jedID2U=3;
$tilepic=1;

///echo "approver= $text_account3";

$port_idz0=$row1daa1G1['zPersonalT'];

$port_idz02=explode(":", $port_idz0);
			$port_idz02M=count($port_idz02);
$port_idz=$port_idz02[0];
$tile1="View Roadmap";
if ($port_idz02M>1){
$tile1=$port_idz02[1];
}

$showchart0=$row1daa1G1['zDoctor'];

$showchart02=explode(":", $showchart0);
			$showchart02M=count($showchart02);
$showchart=$showchart02[0];

if ($showchart==0){
$tilepic=0;
}


$tile2="View Pathway";
if ($showchart02M>1){
$tile2=$showchart02[1];
}


$grade=$row1daa1G1['title3'];
$Mgrade=$row1daa1G1['MemCardTitle'];
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];
$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/NewAgentsP9111.php');
//$display_blockRA92='yes';
$otherApp[9111]="$topcat22";
$showchart='';
$topcat22='';
}

////

if ($otherprintZZ==91110){
$topcat22='';
///echo "hello <br/>";
$jedID2U=3;
$tilepic=1;

$Simap099=0;

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


if($Simap099==100){
$Simap1=$_POST['Simap'];

$sql2 = "UPDATE $table_name36001 SET  status='99'  Where pro_id ='$Simap1'  ";
//echo $sql2 ;
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());


}

if($Simap099==110){
$Simap1=$_POST['Simap'];
$cust_id99=$_POST['Simap'];
$last99=$_POST['last'];
$first99=$_POST['first'];
$phone99=$_POST['phone'];
$email99=$_POST['email'];
$group99=$_POST['cust_group'];


$sql2 = "UPDATE $table_name36 SET  customer_group_id='$group99'  Where customer_id ='$Simap1'  ";
//echo $sql2 ;
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());

$event_id=0;

if (isset($_POST['event'])) {
  	$event_id=$_POST['event'];
  	
} 
if ($event_id>0){
$package='';
$gender='';
$role='';

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

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

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


   $sql2 = "INSERT INTO event_manager_class_roster (class_id,customer_id, firstname,lastname,email, telephone,package_id,gender_id,role_id,total_seats,pay_id  )VALUES 
   ('$event_id','$cust_id99','$first99',  '$last99', '$email99', '$phone99', '$package','$gender','$role', '1','$cust_id99'  )";
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());





}





}



///echo "approver= $text_account3";

$port_idz0=$row1daa1G1['zPersonalT'];

$port_idz02=explode(":", $port_idz0);
			$port_idz02M=count($port_idz02);
$port_idz=$port_idz02[0];

$port_idzFirst=explode(",", $port_idz);


$tile1="View Roadmap";
if ($port_idz02M>1){
$tile1=$port_idz02[1];
}

$showchart0=$row1daa1G1['zDoctor'];

$showchart02=explode(":", $showchart0);
			$showchart02M=count($showchart02);
$showchart=$showchart02[0];

if ($showchart==0){
$tilepic=0;
}


$tile2="View Pathway";
if ($showchart02M>1){
$tile2=$showchart02[1];
}


$grade=$row1daa1G1['title3'];
$Mgrade=$row1daa1G1['MemCardTitle'];
//echo $Mgrade;
$Tgrade0=$row1daa1G1['title37'];

$Tgrade02=explode(",", $Tgrade0);
			$Tgrade02M=count($Tgrade02);
$Tgrade=$Tgrade02[0];	

if($Tgrade02M<4){
$Tgrade02[3]=0;
$Tgrade02[4]=0;
$Tgrade02[5]=0;
$Tgrade02[6]=0;

}

if($Tgrade02M<5){
$Tgrade02[4]=0;
$Tgrade02[5]=0;
$Tgrade02[6]=0;

}

if($Tgrade02M<6){
$Tgrade02[5]=0;
$Tgrade02[6]=0;

}

if($Tgrade02M<7){

$Tgrade02[6]=0;

}	

///$Tgrade=$Tgrade02[0];			
///0=product to buy
///1=Change customer_group_id
///2=Event to Register for

$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/NewAgentsP91110.php');
//$display_blockRA92='yes';
$otherApp[91110]="$topcat22";
$showchart='';
$topcat22='';
}

////


/////
if ($otherprintZZ==9113){
$topcat22='';
///echo "hello <br/>";
$jedID2U=3;
$tilepic=1;

///echo "approver= $text_account3";

$port_idz0=$row1daa1G1['zPersonalT'];

$port_idz02=explode(":", $port_idz0);
			$port_idz02M=count($port_idz02);
$port_idz=$port_idz02[0];
$tile1="View Roadmap";
if ($port_idz02M>1){
$tile1=$port_idz02[1];
}

$showchart0=$row1daa1G1['zDoctor'];

$showchart02=explode(":", $showchart0);
			$showchart02M=count($showchart02);
$showchart=$showchart02[0];

if ($showchart==0){
$tilepic=0;
}


$tile2="View Pathway";
if ($showchart02M>1){
$tile2=$showchart02[1];
}


$grade=$row1daa1G1['title3'];
$Mgrade=$row1daa1G1['MemCardTitle'];
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];
$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/NewAgentsP9113.php');
//$display_blockRA92='yes';
$otherApp[9113]="$topcat22";
$showchart='';
$topcat22='';
}

////



if ($otherprintZZ==919){

///echo "hello <br/>";
$jedID2U=3;
$jedID2019=0;

$tile1="Pathway Progress";
$tile2="Pathway Progress";


$port_idz=$row1daa1G1['zPersonalT']; ///5
$showchart=$row1daa1G1['zDoctor'];   //2
$grade=$row1daa1G1['title3'];   ///1
$Mgrade=$row1daa1G1['MemCardTitle']; ///search strand, 2016,Q1
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];  ///Incomplete, Complete
$Pgrade=$row1daa1G1['title4'];////-1, 1
$display_blockRA92='';

 if (isset($_POST['jedID2919'])) {
  	$jedID2019=$_POST['jedID2919'];
//echo $jade1a;
} 
$topcat22A='';
$topcat22='';
//////

           if ($jedID2019 == 5) {
             
      //       echo "I am in $jedID2019";
         $Rtoday=date("Y-m-d H:i:s");
           $cust_id=$_POST['cust_id'];
             $log=$_POST['log'];
             ///  $tok=$_GET['token'];
     $gbadMod=$_POST['gbadMod'];
     for ($t=1;$t<=$gbadMod; $t++){
     
  $van[$t]='';
       //  $van[$t]=addslashes($_POST["T$t"]);
       
       if(isset($_POST["T$t"])){ $van[$t] = $_POST["T$t"]; }
       
  //      echo "A: $t - $van[$t]- $num331a <br/>";

         if ($van[$t]==0){
         $status=0;
            $sql2 = "UPDATE $table_name806 SET  date_added='$Rtoday',  status='$status' , approver= '$log' Where customer_id ='$cust_id'AND  task_id ='$t' AND status='1' ";
//echo "$sql2 <br />";
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());
         }
         
         
          if ($van[$t]==1){
          
          $status=1;
            $sql2 = "UPDATE $table_name806 SET  date_added='$Rtoday',  status='$status' , approver= '$log' Where customer_id ='$cust_id'AND  task_id ='$t' AND status='0' ";
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());
         }
         
         
    ///       $sq112b1a="SELECT * FROM $table_name806 Where customer_id ='$cust_id' AND  task_id ='$t' AND status='1'";
    ///          $result112b1a = @mysql_query($sq112b1a,$connection) or die(mysql_error());
 //$num331a = mysql_num_rows($result112b1a);
  //        if  ($num331a>0){
  //      $status=0;
   //    $sql2 = "UPDATE $table_name806 SET  date_added='$Rtoday',  status='$status' , approver= '$log' Where customer_id ='$cust_id'AND  task_id ='$t' ";
//$result2 = @mysql_query($sql2,$connection) or die(mysql_error());

     //     }
     
     
     
     if ($van[$t]>0){
      $sq112b1a="SELECT * FROM $table_name806 Where customer_id ='$cust_id' AND  task_id ='$t'";
      $result112b1a = @mysql_query($sq112b1a,$connection) or die(mysql_error());
 $num331a = mysql_num_rows($result112b1a);
/// echo "$t - $van[$t]- $num331a <br/>";
 
 if  ($num331a==0){
 $status=1;
 $sql2 = "INSERT INTO $table_name806 (customer_id, date_added,  task_id, status, approver   ) VALUES ('$cust_id', '$Rtoday', '$t', '$status' , '$log' )";
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());
}}
                   }//end =0
                   
                   
                   
                   
  //     if ($van[$t]>0){
   //             $status=1;
             ////   $status=$van[$t];
   //        $sq112b1a="SELECT * FROM $table_name806 Where customer_id ='$cust_id' AND  task_id ='$t' AND status='0' ";
         ///     $result112b1a = @mysql_query($sq112b1a,$connection) or die(mysql_error());
 //$num331a = mysql_num_rows($result112b1a);
        
      //    if  ($num331a>0){

       //    $sql2 = "UPDATE $table_name806 SET  date_added='$Rtoday',  status='$status' , approver= '$log' Where customer_id ='$cust_id' AND  task_id ='$t' AND status='0' ";
//$result2 = @mysql_query($sql2,$connection) or die(mysql_error());

  //        }else{
  //   $sql2 = "INSERT INTO $table_name806 (customer_id, date_added,  task_id, status, approver   ) VALUES ('$cust_id', '$Rtoday', '$t', '$status' , '$log' )";
//$result2 = @mysql_query($sql2,$connection) or die(mysql_error());


   //     }//end else
        
        
    //         $status='';
  // }   
      // }
         $startsaying ="<br/><div=\"success\"> CAP Records have been updated. </div> ";
//  $jedID2 = 0 ;
include('file/listPath.php');	
$topcat22A="$startsaying $display_blockRA92";
   }


//////
include('file/NewAgentsPath.php');
///include('file/NewAgentsP.php');
$otherApp[919]=" $topcat22A $topcat22";
$showchart='';
}

////


if ($otherprintZZ==92){

///echo "hello <br/>";
$jedID2U=3;
$port_idzZ=$row1daa1G1['zPersonalT']; ///5  --the list for button 1, (make 0 - to hide) pos0=showchart, pos1=button title, pos2=surv_id pos3=dir
$showchartZ=$row1daa1G1['zDoctor'];   //2 - upload list for button 2, (make 0 - to hide) pos0=showchart, pos1=button title, pos2=surv_id pos3=dir
$gradeZ=$row1daa1G1['title3'];   ///1 =1 means get to grade ///2nd position set b2 default =0
$Mgrade=$row1daa1G1['MemCardTitle']; ///search strand, 2016,Q1
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];  ///Incomplete, Complete
$Pgrade=$row1daa1G1['title4'];////-1, 1
$display_blockRA92='';

	$b2[0]="leader_id='$text_account3' or leader_idA='$text_account3'";
	$b2[1]="leader_id='$text_account3' ";
	$b2[2]="leader_idA='$text_account3'";
	$b2[3]="leader_idB='$text_account3'";
	$b2[4]="leader_idAdm='$text_account3'"; ///mentor
	
	$b2[5]="support_id='$text_account3'";  ///spouse
	$b2[6]="overseer_id='$text_account3'";
	$b2[7]="other_id='$text_account3'"; ///student
	$b2[8]="customer_group_id='$text_account2'";
	$b2[9]="leader_id='$text_account3' or leader_idA='$text_account3'  or leader_idB='$text_account3'";
	

include('file/NewAgentsP10.php');
//$display_blockRA92='yes';
$otherApp[92]="$topcat22";
$showchart='';
$port_idzZ='';
$gradeZ='';
}

/////
////

if ($otherprintZZ==929){
 $jedID2YYY=0;

if(isset($_POST['jedID2YYY'])){

$jedID2YYY= $_POST['jedID2YYY'];

}

if ($jedID2YYY==13){

$Tmapid=$_POST['map_id'];

  $sql2 = "UPDATE $table_name80 SET  van1='99' WHERE map_id= '$Tmapid' ";
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());


}




///echo "hello <br/>";
$jedID2U=3;

$tilepic=1;

///echo "approver= $text_account3";

$port_idz0=$row1daa1G1['zPersonalT'];

$port_idz02=explode(":", $port_idz0);
			$port_idz02M=count($port_idz02);
$port_idz=$port_idz02[0];
$tile1="Overview";
if ($port_idz02M>1){
$tile1=$port_idz02[1];
}

$showchart0=$row1daa1G1['zDoctor'];

$showchart02=explode(":", $showchart0);
			$showchart02M=count($showchart02);
$showchart=$showchart02[0];

if ($showchart==0){
$tilepic=0;
}


$tile2="View Pathway";
if ($showchart02M>1){
$tile2=$showchart02[1];
}


//$port_idz=$row1daa1G1['zPersonalT']; ///5
$showchart=$row1daa1G1['zDoctor'];   //2
$grade=$row1daa1G1['title3'];   ///1
$Mgrade=$row1daa1G1['MemCardTitle']; ///search strand, 2016,Q1
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];  ///Incomplete, Complete
$Pgrade=$row1daa1G1['title4'];////-1, 1
$display_blockRA92='';

$topcat22A='';
$topcat22='';
//////


//////
include('file/NewAgentsPersonP929P.php');
//$display_blockRA92='yes';
$otherApp[929]=" $topcat22A $topcat22";
$showchart='';
}
//////

////

if ($otherprintZZ==9290){
 $jedID2YYY=0;

if(isset($_POST['jedID2YYY'])){

$jedID2YYY= $_POST['jedID2YYY'];

}

if ($jedID2YYY==13){

$Tmapid=$_POST['map_id'];

  $sql2 = "UPDATE $table_name80 SET  van1='99' WHERE map_id= '$Tmapid' ";
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());


}




///echo "hello <br/>";
$jedID2U=3;

$tilepic=1;

///echo "approver= $text_account3";

$port_idz0=$row1daa1G1['zPersonalT'];

$port_idz02=explode(":", $port_idz0);
			$port_idz02M=count($port_idz02);
$port_idz=$port_idz02[0];
$tile1="Overview";
if ($port_idz02M>1){
$tile1=$port_idz02[1];
}

$showchart0=$row1daa1G1['zDoctor'];

$showchart02=explode(":", $showchart0);
			$showchart02M=count($showchart02);
$showchart=$showchart02[0];

if ($showchart==0){
$tilepic=0;
}


$tile2="View Pathway";
if ($showchart02M>1){
$tile2=$showchart02[1];
}


//$port_idz=$row1daa1G1['zPersonalT']; ///5
$showchart=$row1daa1G1['zDoctor'];   //2
$grade=$row1daa1G1['title3'];   ///1
$Mgrade=$row1daa1G1['MemCardTitle']; ///search strand, 2016,Q1
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];  ///Incomplete, Complete
$Pgrade=$row1daa1G1['title4'];////-1, 1
$display_blockRA92='';

$topcat22A='';
$topcat22='';
//////


//////
include('file/NewAgentsPersonP929PB.php');
//$display_blockRA92='yes';
$otherApp[9290]=" $topcat22A $topcat22";
$showchart='';
}

////

if ($otherprintZZ==99291){
 $jedID2YYY=0;

if(isset($_POST['jedID2YYY'])){

$jedID2YYY= $_POST['jedID2YYY'];

}

if ($jedID2YYY==13){

$Tmapid=$_POST['map_id'];

  $sql2 = "UPDATE $table_name80 SET  van1='99' WHERE map_id= '$Tmapid' ";
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());


}




///echo "hello <br/>";
$jedID2U=3;

$tilepic=1;

///echo "approver= $text_account3";

$port_idz0=$row1daa1G1['zPersonalT'];

$port_idz02=explode(":", $port_idz0);
			$port_idz02M=count($port_idz02);
$port_idz=$port_idz02[0];
$tile1="Overview";
if ($port_idz02M>1){
$tile1=$port_idz02[1];
}

$showchart0=$row1daa1G1['zDoctor'];

$showchart02=explode(":", $showchart0);
			$showchart02M=count($showchart02);
$showchart=$showchart02[0];

if ($showchart==0){
$tilepic=0;
}


$tile2="View Pathway";
if ($showchart02M>1){
$tile2=$showchart02[1];
}


$TTport_idz=$row1daa1G1['zPersonalT']; ///5
$showchart=$row1daa1G1['zDoctor'];   //2
$grade=$row1daa1G1['title3'];   ///1
$Mgrade=$row1daa1G1['MemCardTitle']; ///search strand, 2016,Q1
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];  ///Incomplete, Complete
$Pgrade=$row1daa1G1['title4'];////-1, 1
$display_blockRA92='';

$topcat22A='';
$topcat22='';
//////


//////
include('file/NewAgentsPersonP9291PB.php');
//$display_blockRA92='yes';
$otherApp[99291]=" $topcat22A $topcat22";
$showchart='';
}

////

if ($otherprintZZ==92911){
 $jedID2YYY=0;

if(isset($_POST['jedID2YYY'])){

$jedID2YYY= $_POST['jedID2YYY'];

}

if ($jedID2YYY==13){

$Tmapid=$_POST['map_id'];

//  $sql2 = "UPDATE $table_name80 SET  van1='99' WHERE map_id= '$Tmapid' ";
//$result2 = @mysql_query($sql2,$connection) or die(mysql_error());


}




///echo "hello <br/>";
$jedID2U=3;

$tilepic=1;

///echo "approver= $text_account3";

$port_idz0=$row1daa1G1['zPersonalT'];

$port_idz02=explode(":", $port_idz0);
			$port_idz02M=count($port_idz02);
$port_idz=$port_idz02[0];
$tile1="Reporting";
if ($port_idz02M>1){
$tile1=$port_idz02[1];
}

$showchart0=$row1daa1G1['zDoctor'];

$showchart02=explode(":", $showchart0);
			$showchart02M=count($showchart02);
$showchart=$showchart02[0];

if ($showchart==0){
$tilepic=0;
}


$tile2="View Pathway";
if ($showchart02M>1){
$tile2=$showchart02[1];
}


//$port_idz=$row1daa1G1['zPersonalT']; ///5
$showchart=$row1daa1G1['zDoctor'];   //2
$grade=$row1daa1G1['title3'];   ///1
$Mgrade=$row1daa1G1['MemCardTitle']; ///search strand, 2016,Q1
//echo $Mgrade;
$Tgrade=$row1daa1G1['title37'];  ///Incomplete, Complete
$Pgrade=$row1daa1G1['title4'];////-1, 1
$display_blockRA92='';

$topcat22A='';
$topcat22='';
//////


//////
include('file/NewAgentsPersonP929PB1.php');
//$display_blockRA92='yes';
$otherApp[92911]=" $topcat22A $topcat22";
$showchart='';
}

//////
//////


if ($otherprintZZ==10){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
//$showchart=$row1daa1G1['zDoctor'];
//$grade=$row1daa1G1['title3'];
//$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/sanycaro.php');
//$display_blockRA92='yes';
$otherApp[10]="$topcat22";
$showchart='';
}

if ($otherprintZZ==11){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/viewcaro.php');
//$display_blockRA92='yes';
$otherApp[11]="$display_blockRA92";
$showchart='';
}

if ($otherprintZZ==110){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/viewcaro1.php');
//$display_blockRA92='yes';
$otherApp[110]="$display_blockRA92";
$showchart='';
}


if ($otherprintZZ==12){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/viewwar.php');
//$display_blockRA92='yes';
$otherApp[12]="$display_blockRA92";
$showchart='';
}



if ($otherprintZZ==13){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
//$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/sanywarview.php');
//$display_blockRA92='yes';
$otherApp[13]="$display_blockRA92";
$showchart='';
}


if ($otherprintZZ==130){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];///1st turn on Your Recovery versus rest ////2nd Totals, 3rd The calc breakdown, 4th=game - the searches  all >0 to turn on
$showchart=$row1daa1G1['zDoctor'];//industry average
$grade=$row1daa1G1['title3'];
//$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/whole_sanywarview.php');
//$display_blockRA92='yes';
$otherApp[130]="$display_blockRA92";
$showchart='';
}


if ($otherprintZZ==131){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];///1st turn on Your Recovery versus rest ////2nd Totals, 3rd The calc breakdown, 4th=game - the searches  all >0 to turn on
$showchart=$row1daa1G1['zDoctor'];//industry average
$grade=$row1daa1G1['title3'];
//$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/sanyregistrations.php');
//$display_blockRA92='yes';
$otherApp[131]="$display_blockRA92";
$showchart='';
}




if ($otherprintZZ==14){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
//$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/dsanywarview.php');
//$display_blockRA92='yes';
$otherApp[14]="$display_blockRA92";
$showchart='';
}


if ($otherprintZZ==15){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idzZ=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3']; //table titles
$Tgrade=$row1daa1G1['title37'];//include table 99
$Pgrade=$row1daa1G1['title4']; //the vans
$Wgrade=$row1daa1G1['MemCardTitle']; //99 view all button.
$display_blockRA92='';
include('file/CompleteApp3.php');
//$display_blockRA92='yes';
$otherApp[15]="$display_sec2A";
$showchart='';
}




if ($otherprintZZ==150){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idzZ=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3']; //table titles
$Tgrade=$row1daa1G1['title37'];//include table 99
$Pgrade=$row1daa1G1['title4']; //the vans
$Wgrade=$row1daa1G1['MemCardTitle']; //99 no view all button.
$display_blockRA92='';
include('file/CompleteApp30.php');
//$display_blockRA92='yes';
$otherApp[150]="$display_sec2A";
$showchart='';
}



if ($otherprintZZ==151){

///banners echo "hello <br/>";//the complex folder ones
$jedID2U=3;
$port_idzZ=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3']; //table titles
$Tgrade=$row1daa1G1['title37'];//include table 99 =all if 98 =no edit, del, or quick edit, 101 = Full edit And del, 100 = full edit ,  102 = quick edit , 103 = Quick edit and del
$Pgrade=$row1daa1G1['title4']; //the vans
$Wgrade=$row1daa1G1['MemCardTitle']; //0=viewallpath with GoTool/war...., 1=casmit path
$display_blockRA92='';
include('file/CompleteApp31.php');
//$display_blockRA92='yes';
$otherApp[151]="$display_sec2A";
$showchart='';
}

if ($otherprintZZ==1510){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idzZ=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3']; //table titles
$Tgrade=$row1daa1G1['title37'];//include table 99 =all if 98 =no edit, del, or quick edit, 101 = Full edit And del, 100 = full edit ,  102 = quick edit , 103 = Quick edit and del
$Pgrade=$row1daa1G1['title4']; //the vans
$Wgrade=$row1daa1G1['MemCardTitle']; //0=viewallpath with GoTool/war...., 1=casmit path
$display_blockRA92='';
include('file/CompleteApp310.php');
//$display_blockRA92='yes';
$otherApp[1510]="$display_sec2A";
$showchart='';
}

if ($otherprintZZ==1500){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idzZ=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3']; //table titles
$Tgrade=$row1daa1G1['title37'];//include table 99
$Pgrade=$row1daa1G1['title4']; //the vans
$Wgrade=$row1daa1G1['MemCardTitle']; //0=viewallpath with GoTool/war...., 1=casmit path
$display_blockRA92='';
include('file/CompleteApp3100.php');
//$display_blockRA92='yes';
$otherApp[1500]="$display_sec2A";
$showchart='';
}

if ($otherprintZZ==1590){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3']; //table titles
$Tgrade=$row1daa1G1['title37'];//include table 99
$Pgrade=$row1daa1G1['title4']; //the vans
$Wgrade=$row1daa1G1['MemCardTitle']; //0=viewallpath with GoTool/war...., 1=casmit path
$display_blockRA92='';
///i//nclude('file/CompleteApp3100.php');   &log=$text_account3&agent=$text_account3&store=$cc99 for cat side
$display_blockRA92="
<table>
          <tr><td width=\"600\">$display_block1</td>
         <td>$display_block2 <br/> <td/></tr>

          </table> <br/>     <table><tr><td width=\"400\">
           <FORM  name=\"formcheck\" METHOD=\"POST\" ACTION=\"$loc2/survey/pmreg.php?test=$port_idz&tword=Form&token=$tok&log=$logged\" target=\"_blank\" >


                <button class=\"fsSubmitButton\" type=\"input\">$showchart</button>
         </form></td><td>
        
         </td></tr></table>

";
$otherApp[1590]="$display_blockRA92";
$showchart='';
}


if ($otherprintZZ==16){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
//$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/account_list.php');
//$display_blockRA92='yes';
$otherApp[16]="$display_sec2A";
$showchart='';
}

if ($otherprintZZ==17){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz1=$row1daa1G1['zPersonalT'];
$port_idz2=explode(",", $port_idz1);
	$port_idz3=count($port_idz2);
$port_idz=$port_idz2[0];
$pointC=50;
if ($port_idz3==2){
$pointC==$port_idz2[1];
}
$showchart=$row1daa1G1['zDoctor'];
$Vgrade=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
$Tgrade=$row1daa1G1['title37'];
$Pgrade=$row1daa1G1['title4'];
$Wgrade=$row1daa1G1['MemCardTitle'];
$display_blockRA92='';
include('file/CompanyOptions.php');
//$display_blockRA92='yes';
$otherApp[17]="$display_sec2A";
$showchart='';
}


if ($otherprintZZ==18){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/dnormviewcaro.php');
//$display_blockRA92='yes';
$otherApp[18]="$display_blockRA92";
$showchart='';
}


/////


if ($otherprintZZ==30){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
//$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/section9Events.php');
//$display_blockRA92='yes';
$otherApp[30]="$display_blockRA92";
$showchart='';
}

if ($otherprintZZ==31){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];////condition
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
//$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/oldCAP.php');
//$display_blockRA92='yes';
$otherApp[31]="$display_blockRA92";
$showchart='';
}

if ($otherprintZZ==310){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];////condition
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
//$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
///include('file/oldCAP.php');
$display_blockRA92='yes';
$otherApp[310]="<FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/index.php?route=product/category&cc=$cc99&path=$port_idz\">
                 <input type=\"hidden\" name=\"gbad\" value=\"1\"  />
                 <input type=\"hidden\" name=\"survey_id\" value=\"21\"  />
                 <input type=\"hidden\" name=\"yummap\" value=\"100\" size=\"40\" />
               <input type=\"hidden\" name=\"gbadMod\" value=\"\"  />
                <button class=\"fsSubmitButton\" type=\"input\">$showchart</button>
         </form>";
$showchart='';
}




if ($otherprintZZ==311){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];////condition
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
//$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$display_blockRA92='';
include('file/write.php');
$display_blockRA92='yes';
$otherApp[311]="$test";
$showchart='';
}


if ($otherprintZZ==332){

///banners echo "hello <br/>";
$jedID2U=3;
$port_idz=$row1daa1G1['zPersonalT'];////condition
$showchart=$row1daa1G1['zDoctor'];
$grade=$row1daa1G1['title3'];
//$Tgrade=$row1daa1G1['title37'];
//$Pgrade=$row1daa1G1['title4'];
$ptok=$_GET['token'];
$display_blockRA92='';
///include('file/oldCAP.php');
$display_blockRA92='yes';
$otherApp[332]="<FORM  name=\"formcheck\"  METHOD=\"POST\" ACTION=\"$loc2/admin/index.php?route=$port_idz&&token=$ptok\">
                 <input type=\"hidden\" name=\"gbad\" value=\"1\"  />
                 <input type=\"hidden\" name=\"survey_id\" value=\"21\"  />
                 <input type=\"hidden\" name=\"yummap\" value=\"100\" size=\"40\" />
               <input type=\"hidden\" name=\"gbadMod\" value=\"\"  />
                <button class=\"fsSubmitButton\" type=\"input\">$showchart</button>
         </form>";
$showchart='';
}




   $otherprint2=$otherApp[$otherprintZZ];
      }


$zPersonalT[$x2]='';
 $Intprint[$x2]=  $row1daa1G1['Intprint'];
        $Intprint2='';
      if ($Intprint[$x2]>0){
     // require($vqmod->modCheck('admin/GoTool/dashboard2/file/section7RoadmapList2.php'));
     // require($vqmod->modCheck('admin/GoTool/dashboard2/file/ZInterview.php'));

 $zPersonalT[$x2]=  $row1daa1G1['zPersonalT'];
if ($zPersonalT[$x2]==1){

      include('file/ZInterview.php');
}

$pathg='';
if ($zPersonalT[$x2]==2){
$pathg[$x2]=  $row1daa1G1['title3'];

      include('file/freeEvent.php');
}


if ($zPersonalT[$x2]>10){
$badboyInt="$loc2/index.php?route=product/category&cc=$cc99&path=$zPersonalT[$x2]";
$display_block11="<FORM  name=\"formcheck\" target=\"blank\" METHOD=\"POST\" ACTION=\"$badboyInt\">
                 <input type=\"hidden\" name=\"status\" value=\"0\" size=\"40\" />

                <button class=\"fsSubmitButton\" type=\"input\">Sign Up For Session</button>
         </form></td></tr></table>";
   $Intprint2=$display_block11;
}


   $Intprint2=$display_block11;
      }

     $Roadprint[$x2]=  $row1daa1G1['road'];
            $Roadprint2='';
      if ($Roadprint[$x2]>0){
       //  echo " Roadprint - $Roadprint[$x2]-$x2 :$Z_num</br>";
       include('file/ZRoadmap2.php');
$Roadprint2=$display_blockRA;
$display_blockRA='';
      }


          $Checkprint[$x2]=  $row1daa1G1['check1'];

               $Checkprint2='';
      if ($Checkprint[$x2]>0){

       include('file/ZChecklist.php');
$Checkprint2=$beg1AA;
      }

           $Pathprint[$x2]=  $row1daa1G1['path'];

               $Pathprint2='';
      if ($Pathprint[$x2]>0){

       include('file/ZPathway.php');
$Pathprint2=$display_blockRA;
$display_blockRA='';
      }

           $Upprint[$x2]=  $row1daa1G1['upp'];

                     $Upprint2='';
      if ($Upprint[$x2]>0){
           //   echo "Upp - $Upprint[$x2]<br/>";
               include('file/ZButtons.php');
       include('file/ZUpload.php');
$Upprint2=$beg1;
      }

           $Assessprint[$x2]=  $row1daa1G1['assess'];

                      $Assessprint2='';

      if ($Assessprint[$x2]>0){

   //   $zDisc =1;
     // $zKolbe =1;
    //  $zStrength =1;
    //  $zTakeSpirit=1;
    //  $zSpirit =1;
    //  $zLifeTime =1;
   //   $zPersonal =1;

      $zDisc=$row1daa1G1['zDisc'];
$zKolbe=$row1daa1G1['zKolbe'];
$zStrength=$row1daa1G1['zStrength'];
$zSpiritTake=$row1daa1G1['zSpiritTake'];
$zSpirit=$row1daa1G1['zSpirit'];
$zLife=$row1daa1G1['zLife'];
$zLifeTime=$row1daa1G1['zLifeTime'];
$zPersonal=$row1daa1G1['zPersonal'];

      $PersonalForms=$row1daa1G1['zPersonalT'];
                         // echo "Assess = $Assessprint[$x2]<br/>";
       include('file/ZAssessments.php');
$Assessprint2=$zAssess;
      }

      $Reportprint[$x2]=  $row1daa1G1['Report'];

                      $Reportprint2='';
      if ($Reportprint[$x2]>0){

       include('file/ZReports.php');
$Reportprint2=$zReports;
      }

              $EnrollAgentsprint[$x2]=  $row1daa1G1['Enroll'];
                     $Enrollprint2='';
                     $zAgentReports='';

                   //  echo " EnrollAgentsprint - $EnrollAgentsprint[$x2]</br>";
      if ($EnrollAgentsprint[$x2]>0){
                 //  $AgentMat=1;
                 //  $EnrollMat=1 ;
                 //  $AgentList=1;
                 //  $AgentForm=1;
                   $AgentMat=$row1daa1G1['AgentMat']; ;
                   $EnrollMat=$row1daa1G1['EnrollMat'];  ;
                   $AgentList=$row1daa1G1['AgentList']; ;
                   $AgentForm=$row1daa1G1['AgentForm']; ;
$title_disp2="LINKS&nbsp;TO&nbsp;VIDEO&nbsp;PRESENTATION";
$title_disp3="ENROLL AN AGENT";
$title_disp37="MY AGENTS";
$title_disp4="FORMS";

       include('file/ZEnrollAgents.php');
$Enrollprint2=$zAgentReports;


       }
               $SignMemsprint[$x2]=  $row1daa1G1['SignMem'];

                     $SignUpprint2='';
                     $SignMemprint2='';
                     $zMemReports='';
      if ($SignMemsprint[$x2]>0){
                   $CompMat=1;
                   $ReadyToPayMat=1 ;
                   $Incomplete=1;
                   $StatementShow=1;
//$title_disp2="COMPLETED SIGN UPS";
//$title_disp21="SIGN UPS READY TO PAY";
//$title_disp3="INCOMPLETE SIGN UPS";
//$title_disp529="STATEMENTS";

$title_disp2=$row1daa1G1['title3'];
$title_disp21=$row1daa1G1['title37'];
$title_disp3=$row1daa1G1['title4'];
$title_disp529=$row1daa1G1['MemCardTitle'];

       include('file/ZMemStatements.php');
$SignMemprint2=$zMemReports;


       }

               $Doctorprint[$x2]=  $row1daa1G1['Doctor'];

                        $Doctorprint2='';
      if ($Doctorprint[$x2]>0){
           // $groupy=28;
            $groupy=$row1daa1G1['groupy'];
          //  $zDoctor="Doctor(s)";
             $zDoctor=$row1daa1G1['zDoctor'];
       include('file/ZDoctors.php');
$Doctorprint2= $display_blockRA;
$display_blockRA='';
//;
      }

             $MemCardprint[$x2]=  $row1daa1G1['Memcard'];
                     $MemCardprint2='';
                      $zMemReports='';

      if ($MemCardprint[$x2]>0){
                   $MemCard=1;
                   $MemRecord=1 ;
                   $MemCard=$row1daa1G1['Card'];
                   $MemRecord=$row1daa1G1['MemRecord'];
             //   $zDoctor="Doctor(s)";
                $zDoctor=$row1daa1G1['zDoctor'];
//$title_disp2="YOUR MEMBERSHIP&nbsp;CARD";
//$title_disp22="YOUR COMPLETE&nbsp;VISIT HISTORY";
// $MemCardTitle  ="$CAPz Membership Card";
 $title_disp2=$row1daa1G1['title3'];
$title_disp22=$row1daa1G1['title37'];
 $MemCardTitle=$row1daa1G1['MemCardTitle'];


       include('file/ZMemCard.php');
$MemCardprint2=$zMemReports;


       }


             $Patientprint[$x2]=  $row1daa1G1['Patient'];

                       $Patientprint2='';
      if ($Patientprint[$x2]>0){
          ////  $zDoctor="Doctor(s)";
          //$zPatient="Patient";
          $zPatient=$row1daa1G1['zDoctor'];
          $dlength=30;
       include('file/ZPatientLook.php');
$Patientprint2= $display_blockRA;
$display_blockRA='';
//;
      }
      
      
   
   
   
$abx=$x22;
if (isset($_POST['TXXBoo'])) {
$TXXBoo=$_POST['TXXBoo'];
if ($TXXBoo==$x22){

$Bamboo=$_POST['Bamboo'];




if ($TXXBoo==$x22 AND $Bamboo==100){
$bvo=1;
$Bamboo=0;
}
}}
      
      
$abx=$x22;
$aXX1=$XX1;
if ($bvo==1){
$aXX1='';
$bvo='';
 $abx=1;
}





        $beg1Why9919 .="
     <h3 class=\"collapsible\" id=\"section1$aXX1\"><font color=\"921319\">$titleZ[$x2]</font><span></span></h3>
<div class=\"container\">
    <div class=\"content\">

          $display_block19[$x2]
          <table><tr><td>$appprint2</td><td>$buyprint2</td></tr></table>
          $Intprint2
          $Roadprint2
          $Checkprint2
          $Pathprint2
          $Upprint2
          $Assessprint2
          $Reportprint2
          $Enrollprint2
          $SignMemprint2
          $Doctorprint2
          $MemCardprint2
          $Patientprint2
$otherprint2
    </div>
</div>
   ";

             }




             }//for
             
      //  $abx=$x22; 
 if (isset($_POST['Boo2'])) {
	$jBoo2=$_POST['Boo2'];
	if ($jBoo2>0){
	$bvo=1;
	}
	
	}     
      
   if ($bvo==1){
$aXX1='';
$bvo='';
 $abx=1;
}
       
             
                        $section4 .=  "<h3 class=\"collapsible\" id=\"section$abx\">$bucketstitle[$x22]<span></span></h3>
<div class=\"container\">
    <div class=\"content\">
          $beg1Why9919
    </div>
</div>
   ";
    $beg1Why9919='';
            }


     $Ztitle1='';
 }  //end of bucket

?>
