<?php

$logged=$_GET['log'];
$prog="survey/survey.php";
$Select99="Select Candidate - Assessment";
 $record="Survey";
  $yummap=$_POST['yummap'];

 $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




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






//$dir="checkout";
//$loc="www.1stchoicesolution.com";

//$prod="Timeshare Services to transfer Timeshare";

//$string ="Wow this works<br> ";
$display_blockFF .= "<div id=\"footer4\" align=center><a href=\"http://www.galliumgroup.com\">GalliumGroup</a> &copy; 2009-2011 All Rights Reserved.<br />Version 1.5.1.3</div>
  <br>";
//   echo $string;
$blink="";

//$host="localhost";
//$db_name="nwtrans_gotool2";
//$user="nwtrans_gotool22";
//$password="f*r25Get";


//connect to the server and select the database
$connection = @mysqli_connect($host,$user,$password) or die(mysqli_error($connection));
$db = @mysqli_select_db($connection,$db_name) or die(mysqli_error($connection));
$table_name67="Aprocess2";

  $sql33 ="SELECT * FROM $table_name67 WHERE address_id = '11' ";
        $result222 = @mysqli_query($connection,$sql33) or die(mysqli_error($connection));
while ($row1 = mysqli_fetch_array($result222)) {
 $em55=  $row1['bob'];
                  }

 $sql33 ="SELECT * FROM $table_name67 WHERE address_id = '13' ";
        $result222 = @mysqli_query($connection,$sql33) or die(mysqli_error($connection));
while ($row1 = mysqli_fetch_array($result222)) {
 $authorization=  $row1['bob'];
                            }

 $sql33 ="SELECT * FROM $table_name67 WHERE address_id = '14' ";
        $result222 = @mysqli_query($connection,$sql33) or die(mysqli_error($connection));
while ($row1 = mysqli_fetch_array($result222)) {
 $cutoff=$row1['bob'];
 $Low=$row1['Low'];
 $High=$row1['High'];
 $Medium=$row1['Medium'];
 }

//$em55="glink@galliumo.com";  //admin email

//$login=$_POST['author'];
//$pswd=$_POST['pswd'];

//$zip=$_POST['author'];
//$personID=$_POST['numID'];
//$redID=$_POST['redID2'];
//$redID3=$_POST['redID3'];
$jedID2=$_POST['jedID2'];
 $gbad=$_POST['gbad'];
 $Dbad=$_POST['Dbad'];
  $sbad=$_POST['sbad'];
  $gbadMod=$_POST['gbadMod'];

$BY =$_POST['year'];
$BM =$_POST['month'];
$BD =$_POST['day'];
$birthday="$BY-$BM-$BD";
$optax="A";
$comp="GalliumGroup";

//$state =$_GET['state'];
//$state=46;
//$sub =$_GET['sub'];

$today = date("Y-m-d h:i:s");
$date2 = date("F j,Y");     //date ("format",$timestamp)
$date3 = date("m/d/Y");

//$cust="cust";

$table_name36 = "customer";
$table_name40 = "address";
$table_name41 = "order";
$table_name42 = "order_history";
$table_name43 = "order_status";
$table_name44 = "salesrep";
$table_name45 = "country";
$table_name46 = "zone";

$table_name47 = "order_product";
$table_name48 = "app";
$table_name49 = "user";
$table_name50 = "app_autoincrement";
$table_name70 = "app_consult";
$table_name71 = "con_status";
$table_name72 = "con_state_status";
$table_name73 = "con_end_status";
$table_name74 = "app_consult_map";

$table_name75 = "app_map_comment";

$table_name51 ="app_others";
$table_name52 ="app_agreement";

$table_name53 ="product_description";
$table_name54 ="product";
$table_name55 ="dialin";
$table_name56 ="Afee";
$table_name65="product_to_store";
$table_name76 = "survey_questions";
$table_name77 = "survey_answers";
$table_name78="survey_map";
$table_name79="survey_points_map";
$table_name80="survey_map_text";
$table_name81="survey";
$table_name82="survey_cust";

$ip=$_SERVER['REMOTE_ADDR'];

$table_nameApp=$table_name81;


include("../logger.php");       //This checks tokens

//include("internal.php");       Back and Forth Navigation
  $display_title ="$record Module";

 //jedID2  == 0 Shows the front landing page.

 
 
   if ($jedID2 == 1005) {
    $survey_id=$_POST['lookDF'];
    $lookDF=$_POST['lookDF'];
           $survey_num=$survey_id;
           
   $gbad=$_POST['gbad'];
   
//  if ($gbad==0){
// $lookDF=0;
//} 
   
   
   

 if ($gbad==1){
 $lookDF=$_POST['lookD'];
 $foldtype=$_POST['foldtype'];
  $gleaderS=$_POST['statusInt'];
 $gstatusPar=$_POST['statusPar'];
 $gstatus=$_POST['statusP'];

  $sq112aaF ="SELECT * FROM $table_name88 Where file_match_id ='$lookDF' ";
   $result333F = @mysqli_query($connection,$sq112aaF) or die(mysqli_error($connection));
   $num33 = mysqli_num_rows($result333F);

   if ($num33>0){
     $sql2 = "UPDATE $table_name88 SET   status='$gstatus',foldtype='$foldtype', Parent_F='$gstatusPar', date_modified='$today'  WHERE file_match_id ='$lookDF' " ; //add support_id
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$mess="<div class=success> Access to $record $lookDF has been updated.</div>";

 }else{
               $sql2 = "INSERT INTO $table_name88 ( file_match_id, status, create_date, foldtype, Parent_F) VALUES ('$lookDF','$gstatus', '$today','$foldtype', '$gstatusPar')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
$mess="<div class=success> File Folder: $lookDF has been added.</div>";
 $sql2 = "INSERT INTO $table_name88a ( file_match_id, status, create_date) VALUES ('$lookDF','$gstatus', '$today')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
}
 }
 
 
  if ($gbad==2){
 $lookDF=$_POST['lookD'];
 $foldtype=$_POST['foldtype'];
  $gleaderS=$_POST['statusInt'];
 $gstatusPar=$_POST['statusPar'];
 $gstatus=$_POST['statusP'];
 $matcher=$_POST['matcher'];
 $GroupS=$_POST['GroupS'];


     $sql2 = "UPDATE $table_name88a SET   status='$gstatus',group_id='$GroupS',  date_modified='$today'  WHERE file_matcher_id ='$matcher' " ; //add support_id
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$mess="<div class=success> File Folder $lookDF has been updated.</div>";

 }
 
 
   if ($gbad==3){
 $lookDF=$_POST['lookD'];
 $foldtype=$_POST['foldtype'];
  $gleaderS=$_POST['statusInt'];
 $gstatusPar=$_POST['statusPar'];
 //$gstatus=$_POST['statusP'];
// $matcher=$_POST['matcher'];
 $GroupS=$_POST['GroupS'];



      $sql2 = "INSERT INTO $table_name88a ( file_match_id,  create_date,group_id) VALUES ('$lookDF', '$today', $GroupS)";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$mess="<div class=success> File Folder $lookDF has been updated.</div>";

 }
 
 
   if ($gbad==4){
 $lookDF=$_POST['lookD'];
 $foldtype=$_POST['foldtype'];
  $gleaderS=$_POST['statusInt'];
 $gstatusPar=$_POST['statusPar'];
 $gstatus=$_POST['statusP'];
 $matcher=$_POST['matcher'];
 $GroupS=$_POST['CustGroupS'];


     $sql2 = "UPDATE $table_name88a SET   status='$gstatus',customer_group_id='$GroupS',  date_modified='$today'  WHERE file_matcher_id ='$matcher' " ; //add support_id
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$mess="<div class=success> File Folder $lookDF has been updated.</div>";

 }
 
 
   if ($gbad==5){
 $lookDF=$_POST['lookD'];
 $foldtype=$_POST['foldtype'];
  $gleaderS=$_POST['statusInt'];
 $gstatusPar=$_POST['statusPar'];
 //$gstatus=$_POST['statusP'];
// $matcher=$_POST['matcher'];
 $GroupS=$_POST['CustGroupS'];



      $sql2 = "INSERT INTO $table_name88a ( file_match_id,  create_date,customer_group_id) VALUES ('$lookDF', '$today', $GroupS)";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$mess="<div class=success> File Folder $lookDF has been updated.</div>";

 }
 
 
   if ($gbad==6){
 $lookDF=$_POST['lookD'];
 $foldtype=$_POST['foldtype'];
  $gleaderS=$_POST['statusInt'];
 $gstatusPar=$_POST['statusPar'];
 $gstatus=$_POST['statusP'];
 $matcher=$_POST['matcher'];
 $GroupS=$_POST['CustomerS'];


     $sql2 = "UPDATE $table_name88a SET   status='$gstatus',customer_id='$GroupS',  date_modified='$today'  WHERE file_matcher_id ='$matcher' " ; //add support_id
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$mess="<div class=success> File Folder $lookDF has been updated.</div>";

 }
 
 
   if ($gbad==7){
 $lookDF=$_POST['lookD'];
 $foldtype=$_POST['foldtype'];
  $gleaderS=$_POST['statusInt'];
 $gstatusPar=$_POST['statusPar'];
 //$gstatus=$_POST['statusP'];
// $matcher=$_POST['matcher'];
 $GroupS=$_POST['CustomerS'];



      $sql2 = "INSERT INTO $table_name88a ( file_match_id,  create_date,customer_id) VALUES ('$lookDF', '$today', $GroupS)";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$mess="<div class=success> File Folder $lookDF has been updated.</div>";

 }
 
   if ($gbad==8){
 $lookDF=$_POST['lookD'];
 $foldtype=$_POST['foldtype'];
  $gleaderS=$_POST['statusInt'];
 $gstatusPar=$_POST['statusPar'];
 $gstatus=$_POST['statusP'];
 $matcher=$_POST['matcher'];
 $GroupS=$_POST['userGS'];


     $sql2 = "UPDATE $table_name88a SET   status='$gstatus',user_group_id='$GroupS',  date_modified='$today'  WHERE file_matcher_id ='$matcher' " ; //add support_id
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$mess="<div class=success> File Folder $lookDF has been updated.</div>";

 }
 
 
   if ($gbad==9){
 $lookDF=$_POST['lookD'];
 $foldtype=$_POST['foldtype'];
  $gleaderS=$_POST['statusInt'];
 $gstatusPar=$_POST['statusPar'];
 //$gstatus=$_POST['statusP'];
// $matcher=$_POST['matcher'];
 $GroupS=$_POST['userGS'];



      $sql2 = "INSERT INTO $table_name88a ( file_match_id,  create_date,user_group_id) VALUES ('$lookDF', '$today', $GroupS)";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$mess="<div class=success> File Folder $lookDF has been updated.</div>";

 }


  if ($gbad==10){
 $lookDF=$_POST['lookD'];
 $foldtype=$_POST['foldtype'];
  $gleaderS=$_POST['statusInt'];
 $gstatusPar=$_POST['statusPar'];
 $gstatus=$_POST['statusP'];
 $matcher=$_POST['matcher'];
 $GroupS=$_POST['userS'];


     $sql2 = "UPDATE $table_name88a SET   status='$gstatus',user_id='$GroupS',  date_modified='$today'  WHERE file_matcher_id ='$matcher' " ; //add support_id
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$mess="<div class=success> File Folder $lookDF has been updated.</div>";

 }
 
 
   if ($gbad==11){
 $lookDF=$_POST['lookD'];
 $foldtype=$_POST['foldtype'];
  $gleaderS=$_POST['statusInt'];
 $gstatusPar=$_POST['statusPar'];
 //$gstatus=$_POST['statusP'];
// $matcher=$_POST['matcher'];
 $GroupS=$_POST['userS'];



      $sql2 = "INSERT INTO $table_name88a ( file_match_id,  create_date,user_id) VALUES ('$lookDF', '$today', $GroupS)";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$mess="<div class=success> File Folder $lookDF has been updated.</div>";

 }


  //    include("surv_display2.php");
   //    include("surv_display3.php");
  //  include("survey_manage2.php");
  
  if ($gbad != 100){
    include("group_leader1005.php");
}else {
 include("folder_show1005.php");
}
	


      $display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
      <tr>
      
      </tr>
	<tr>
    <td class=left >
       $display_blockV
    </td>
<!---    <td class=left> $display_block2 </td> -->
	</tr>
    </tbody>

</table> ";

 }
 
 
 
 
 
 

 if ($jedID2 == 0) {



    $mess ="Welcome $agent_first $agent_last. <br> <br> Would You Like To Work On a $record or $record Reports? <br /> <br /><i><b>Remember to put a phone number into the appropriate field.</i></b> ";

         $display_title="Activity Panel";


         include("start1.php");
         include("start2.php");
         include("start3.php");

 	$display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
      <tr>
      <td colspan=2><div align=center>$display_block1</div></td>
      </tr>
	<tr>
    <td class=center>$display_block2 </td>
    <td class=center> $display_block3 </td>
	</tr>
    </tbody>

</table> ";

}


 if ($jedID2 == 1) {


     if ($gbad == 0) {

       $text_box = "$record Name";
       $textbox1="textbox1";

       include("textfield1.php");
       $text_area = "$record Explanation";
       $textarea1="textarea1";

         include("textarea1.php");

         $display_blockV .="	<FORM  name=\"formcheck3\"  METHOD=\"POST\" ACTION=\"GoTool/$prog?token=$tok&log=$logged\">
    Please complete the following:
    $display_block1   <br /> <br />
     <input type=\"hidden\" name=\"jedID2\" value=\"1\"  />
      <input type=\"hidden\" name=\"gbad\" value=\"1\"  />
    	<input name=\"button name0\" type=\"image\" src=\"GoTool/image/submit.png\" align=\"center\" /></form>";

          }

          $name = addslashes($_POST['textbox1']);
          $comment = addslashes($_POST['textarea1']);
          $cutoff = addslashes($_POST['cutoff']);  
          $survey_id2=$_POST['survey_id'];

          if ($gbad ==1) {
          $create_date=$today;


             $sql2 = "INSERT INTO $table_name81 (  name, create_date, comment) VALUES ('$name', '$create_date','$comment')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

            $gbad=3;
          }

                    if ($gbad ==2) {

          $sql2 = "UPDATE $table_name81 SET  name ='$name', comment ='$comment', cutoff='$cutoff', status='$status' WHERE survey_id ='$survey_id2' " ;
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

            $gbad=3;
          }


          if ($gbad ==3) {
          $gbadMod2=$_POST['gbadMod'];
          $sq112a ="SELECT * FROM $table_name81 ";
          if ($gbadMod2 ==15){
           $survey_id2=$_POST['survey_id'];
          $sam ="WHERE survey_id ='$survey_id2' ";
           $sq112a ="SELECT * FROM $table_name81 WHERE survey_id ='$survey_id2' ";
           $sbad=15;
          }

        
             $result33 = @mysqli_query($connection,$sq112a) or die(mysqli_error($connection));
  $num33 = mysqli_num_rows($result33);


              $display_status .="<option  value=1>Enable</option><option  value=0>Disable</option>";
               $Cstatus2[1]="Enabled";
               $Cstatus2[0]="Disabled";




        include("survey_name.php");
              }

 	$display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
	<tr>
    <td class=left >
       $display_blockV
    </td>
    <td class=left> $display_block2 </td>
	</tr>
    </tbody>

</table> ";




}


 if ($jedID2 == 2) {

 if ($gbad==100){
         $survey_id2=$_POST['survey_id'];
   $sql2 = "UPDATE $table_name81 SET   status='$status' WHERE survey_id ='$survey_id2' " ;
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

  $gbad=0;
 }




  if ($gbad ==0) {
   $display_status .="<option  value=1>Enable</option><option  value=0>Disable</option>";
    $Cstatus2[1]="Enabled";
               $Cstatus2[0]="Disabled";

//  include("survey_name.php");
      include("survey_manage1.php");
           }

    if ($gbad ==1) {
     $survey_id=$_POST['survey_id'];

         $sq112a="SELECT * FROM $table_name76 WHERE survey_id ='$survey_id' ";
             $survey_num=$survey_id;



      include("surv_display2.php");
       include("surv_display3.php");
      include("survey_manage2.php");
           }




	$display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
	<tr>
    <td class=left >
       $display_blockV
    </td>
    <td class=left> $display_block2 </td>
	</tr>
    </tbody>

</table> ";




}



 if ($jedID2 == 3) {

 if ($gbad ==0) {
      include("survey_manage3.php");
           }


 if ($gbad ==1) {
 $survey_idR=$_POST['survey_id'];
      include("survey_manage4.php");
           }



$display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
	<tr>
    <td class=left >
       $display_blockV
    </td>
    <td class=left> $display_block2 </td>
	</tr>
    </tbody>

</table> ";

    }


  if ($jedID2 == 5) {
    $survey_id=$_POST['lookD'];
           $survey_num=$survey_id;
       //    $administrative[1]=$_POST['administrative[1]'];
             $gbadMod=$_POST['gbadMod'];
            $a=$_POST['a'];
            $b=$_POST['b'];
            $bam[1]="Please enter the following: First Name, Last Name";
            $bam[2]="Please enter the following: Name, Address, Phone Numbers, Organization";
             $bam[3]="Please enter the following: Name & Organization";
             $bam[-1]="None";
               $bam[4]="Please enter the following: Email";
                 $bam[5]="Please enter the following: Email & Web Address";
                  $bam[-11]="None";

                        if ($survey_id >0 AND $gbadMod !=1){
           if ($gbad ==1) {

                  $surveyQ_id =1;
                  $administrative1=$_POST['administrative1'];
                  $questionT=$bam[$a];
   $sql2 = "INSERT INTO $table_name76 (  surveyQ_id, survey_id, question,comment, administrative) VALUES ('$surveyQ_id','$survey_id', '$questionT','$commentT','$a')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$test_type =1;
$points99=0;
$answerTT=$bam[$a];

   $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$answerTT','$commentTT','$test_type', '$points99')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));


               if ($b != -11){

 $surveyQ_id =2;
 $administrative2=$_POST['administrative2'];
                  $questionT=$bam[$b];
   $sql2 = "INSERT INTO $table_name76 (  surveyQ_id, survey_id, question,comment, administrative) VALUES ('$surveyQ_id','$survey_id', '$questionT','$commentT','$b')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

$test_type =1;
$points99=0;
$answerTT=$bam[$b];

   $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$answerTT','$commentTT','$test_type', '$points99')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));




                      }     //end of b != -11
                       }    // end of $gbad ==1



    if ($gbad ==201) {

           // $survey_idW=$_POST['survey_idW'];
            $Q_delete=$_POST['del_Q'];

        $sq112d="SELECT * FROM $table_name76 WHERE survey_id ='$survey_idW'AND surveyQQ_id ='$Q_delete' ";
         $result331d = @mysqli_query($connection,$sq112d) or die(mysqli_error($connection));
         while ($row1d = mysqli_fetch_array($result331d)) {
$surveyQ_id=  $row1d['surveyQ_id'];
           }

    $sq112az="DELETE FROM $table_name76 WHERE survey_id ='$survey_idW'AND surveyQQ_id ='$Q_delete' ";
     $result331 = @mysqli_query($connection,$sq112az) or die(mysqli_error($connection));
      $sq112az="DELETE FROM $table_name77 WHERE survey_id ='$survey_idW'AND surveyQ_id ='$surveyQ_id' ";
     $result331 = @mysqli_query($connection,$sq112az) or die(mysqli_error($connection));

    $warn= "<div class=success> Question Deleted</div>";




                     }//end of $gbad ==201 - delete Q.



     if ($Dbad ==301) {
             $boo="great";
    // $survey_idW=$_POST['survey_idW'];
         $bat=$_POST['bat'];
          $survey_idW=3;
      //    if ($gbad >0){

    //      }
        //  $sq112azg="DELETE FROM $table_name77 WHERE surveyA_id ='$bat' ";
     //$result331 = @mysqli_query($connection,$sq112azg) or die(mysqli_error($connection));
      $warn= "<div class=success> Answer Deleted</div>";

                     }//end of $gbad ==301 - delete Answer.



       if($gbad==401){

          // $Q_delete=$_POST['del_A'];
          //$survey_id=$_POST['survey_id'];



      ///    $Question_stuff  from the include

       }


        if($gbad==501){

        }



                             }   // if ($survey_id >0 AND $gbadMod !=1)


         $sq112a="SELECT * FROM $table_name76 WHERE survey_id ='$survey_id' Order By surveyQ_id ";




      include("surv_display2.php");
       include("surv_display3.php");
      include("survey_manage2.php");




      $display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
	<tr>
    <td class=left >
       $display_blockV
    </td>
    <td class=left> $display_block2 </td>
	</tr>
    </tbody>

</table> ";

 }


   if ($jedID2 == 6) {
                    $survey_id=$_POST['lookD'];
           $survey_num=$survey_id;


                       $boo="great";
    // $survey_idW=$_POST['survey_idW'];
         $bat=$_POST['bat'];
        //  $survey_idW=3;
      //    if ($gbad >0){

    //      }
       $sq112azg="DELETE FROM $table_name77 WHERE surveyA_id ='$bat' ";
    $result331 = @mysqli_query($connection,$sq112azg) or die(mysqli_error($connection));
      $warn= "<div class=success> Answer Deleted</div>";



    $sq112a="SELECT * FROM $table_name76 WHERE survey_id ='$survey_id' Order By surveyQ_id ";



          // $boo="great";

      include("surv_display2.php");
       include("surv_display3.php");
      include("survey_manage2.php");




      $display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
	<tr>
    <td class=left >
       $display_blockV
    </td>
    <td class=left> $display_block2 </td>
	</tr>
    </tbody>

</table> ";


   }


   if ($jedID2 == 7) {
                    $survey_id=$_POST['lookD'];
           $survey_num=$survey_id;


                       $boo="great";
     $survey_idWa=$_POST['survey_idWa'];
         $bat=$_POST['bat'];
        //  $survey_idW=3;
      //    if ($gbad >0){

    //      }
     $Q_delete=$_POST['del_Q'];

        $sq112d="SELECT * FROM $table_name76 WHERE survey_id ='$survey_idWa'AND surveyQQ_id ='$Q_delete' ";
         $result331d = @mysqli_query($connection,$sq112d) or die(mysqli_error($connection));
         while ($row1d = mysqli_fetch_array($result331d)) {
$surveyQ_id=  $row1d['surveyQ_id'];
           }

    $sq112az="DELETE FROM $table_name76 WHERE survey_id ='$survey_idWa'AND surveyQQ_id ='$Q_delete' ";
     $result331 = @mysqli_query($connection,$sq112az) or die(mysqli_error($connection));
      $sq112az="DELETE FROM $table_name77 WHERE survey_id ='$survey_idWa'AND surveyQ_id ='$surveyQ_id' ";
     $result331 = @mysqli_query($connection,$sq112az) or die(mysqli_error($connection));

    $warn= "<div class=success> Question Deleted</div>";



    $sq112a="SELECT * FROM $table_name76 WHERE survey_id ='$survey_id' Order By surveyQ_id ";



          // $boo="great";

      include("surv_display2.php");
       include("surv_display3.php");
      include("survey_manage2.php");




      $display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
	<tr>
    <td class=left >
       $display_blockV
    </td>
    <td class=left> $display_block2 </td>
	</tr>
    </tbody>

</table> ";


   }


   if ($jedID2 == 8) {
     $Q_add=$_POST['del_Add'];

   //  if ($Q_add == 2 or $Q_add ==3){


     if ($Q_add == 2){
     $title_Q ="This answer will have radio button inputs.";

        include("add_question.php");
     }


  if ($Q_add == 5){
     $title_Q ="This answer will be a dropdown.";

        include("add_question.php");
     }

      if ($Q_add == 7){
     $title_Q ="This answer will be Employee Form.";
         $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"Input\"  size=\"200\">";

        include("add_question_single.php");
     }

      if ($Q_add == 8){
     $title_Q ="This answer will be Schooling Form.";
         $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"Input\"  size=\"200\">";

        include("add_question_single.php");
     }

      if ($Q_add == 9){
     $title_Q ="This answer will be Certificate Form.";
         $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"Input\"  size=\"200\">";

        include("add_question_single.php");
     }

      if ($Q_add == 10){
     $title_Q ="This answer will be Military Form.";
         $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"Input\"  size=\"200\">";

        include("add_question_single.php");
     }

    if ($Q_add == 11){
     $title_Q ="This answer will be COM Form.";
         $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"Input\"  size=\"200\">";

        include("add_question_single.php");
     }

      if ($Q_add == 12){
     $title_Q ="This answer will be Ministry/Group Form.";
         $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"Input\"  size=\"200\">";

        include("add_question_single.php");
     }



  if ($Q_add == 13){
     $title_Q ="This answer will be Residences Form.";
         $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"Input\"  size=\"200\">";

        include("add_question_single.php");
     }



  if ($Q_add == 14){
     $title_Q ="This answer will be Multiple People Associated with Master Form.";
         $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"Input\"  size=\"200\">";

        include("add_question_single.php");
     }


if ($Q_add == 6){
     $title_Q ="This answer will be a textarea.";
         $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"Input\"  size=\"200\">";

        include("add_question_single.php");
     }

      if ($Q_add == 3){
     $title_Q ="This answer will have check boxes.";
  //   }

        include("add_question.php");

        }



      if ($Q_add == 300){
     $title_Q ="This answer will have check boxes that allow multiple checks/multi-answers for the survey participant.";
  //   }

        include("add_question.php");

        }



      if ($Q_add == 301){
     $title_Q ="This answer will have Image check boxes that allow multiple checks/multi-answers for the survey participant.";
  //   }

        include("add_question301.php");

        }



    if ($Q_add == 0 ){
         $title_Q ="This answer will have a text input box.";
    $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"Input\"  size=\"200\">";

        include("add_question_single.php");

        }




            $barrie="states";
    if ($Q_add == 19 ){
              $title_Q ="This answer will have a pulldown state menu.";
    $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"$barrie\"  size=\"200\">";

        include("add_question_single.php");

        }


                    $barrie="countries";
    if ($Q_add == 29 ){
               $title_Q ="This answer will have a pulldown country menu.";
    $mess_fill="";
    $dont2="<input type=\"hidden\" name=\"answer1\" value=\"$barrie\"  size=\"200\">";

        include("add_question_single.php");

        }



                    $survey_id=$_POST['lookD'];
           $survey_num=$survey_id;




  //  $warn= "<div class=success> Question Deleted</div>";



    $sq112a="SELECT * FROM $table_name76 WHERE survey_id ='$survey_id' Order By surveyQ_id ";



          // $boo="great";

      include("surv_display2.php");
       include("surv_display3.php");
      include("survey_manage2.php");




      $display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
	<tr>
    <td class=left >
       $display_blockV
    </td>
    <td class=left> $display_block2 </td>
	</tr>
    </tbody>

</table> ";


   }



   if ($jedID2 == 800) {
     $Q_add=$_POST['del_change'];
$ch_Q=$_POST['what_Q'];

 $survey_id=$_POST['lookD'];
$survey_num=$survey_id;
//echo Hi;

 $sql2xxxx = "UPDATE $table_name77 SET   test_type='$Q_add' WHERE survey_id ='$survey_id'AND surveyQ_id ='$ch_Q' " ;
         $result2 = @mysqli_query($connection,$sql2xxxx) or die(mysqli_error($connection));
//echo $sql2xxxx;


  $sq112a="SELECT * FROM $table_name76 WHERE survey_id ='$survey_id' Order By surveyQ_id ";


      include("surv_display2.php");
       include("surv_display3.php");
      include("survey_manage2.php");




      $display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
	<tr>
    <td class=left >
       $display_blockV
    </td>
    <td class=left> $display_block2 </td>
	</tr>
    </tbody>

</table> ";


}

    if ($jedID2 == 81) {
     $Q_add=$_POST['addA_Q'];

       $survey_id=$_POST['lookD'];
           $survey_num=$survey_id;


                       $boo="great";
     $survey_idWa=$_POST['survey_idWa'];
         $bat=$_POST['bat'];
                               $a1="New Answer";
                               $test_type=3;
                               $p1=0;

   //  if ($Q_add == 2 or $Q_add ==3){

        $sq112az = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$Q_add','$survey_idWa', '$a1','$c1','$test_type', '$p1')";
//$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection))
 //      $sq112az="DELETE FROM $table_name76 WHERE survey_id ='$survey_idWa'AND surveyQQ_id ='$Q_delete' ";
     $result331 = @mysqli_query($connection,$sq112az) or die(mysqli_error($connection));


     if ($Q_add == 2){
     $title_Q ="This answer will have radio button inputs.";

        include("add_question.php");
     }




      if ($Q_add == 3){
     $title_Q ="This answer will have check boxes.";
  //   }

        include("add_question.php");

        }


  if ($Q_add == 300){
     $title_Q ="This answer will have check boxes (Multi-check answer).";
  //   }

        include("add_question.php");

        }


if ($Q_add == 301){
     $title_Q ="This answer will have check boxes (Multi-check answer).";
  //   }

        include("add_question301.php");

        }









                    $survey_id=$_POST['lookD'];
           $survey_num=$survey_id;




  //  $warn= "<div class=success> Question Deleted</div>";



    $sq112a="SELECT * FROM $table_name76 WHERE survey_id ='$survey_id' Order By surveyQ_id ";



          // $boo="great";

      include("surv_display2.php");
       include("surv_display3.php");
      include("survey_manage2.php");




      $display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
	<tr>
    <td class=left >
       $display_blockV
    </td>
    <td class=left> $display_block2 </td>
	</tr>
    </tbody>

</table> ";


   }




      if ($jedID2 == 9) {
     $Q_add=$_POST['Q_add'];
     $test_type=$Q_add;

     $barrie="states";
      $barrie1="countries";
     if ($test_type ==19 or $test_type ==29){
      $test_type=4;
     }

          $survey_id=$_POST['survey_idw'];
           $survey_num=$survey_id;
             $admin=0;

            $q1=addslashes($_POST['QuestionOne']);
            $qc1=addslashes($_POST['Hint']);
            $a1= $_POST['answer1'];
            $p1= addslashes($_POST['Panswer1']);
              $c1= addslashes($_POST['Comment1']);

               $sq112d="SELECT surveyQ_id FROM $table_name76 WHERE survey_id ='$survey_id' Order by surveyQ_id DESC Limit 1  ";
         $result331d = @mysqli_query($connection,$sq112d) or die(mysqli_error($connection));
         while ($row1d = mysqli_fetch_array($result331d)) {
$surveyQ_id=  $row1d['surveyQ_id'];
           }
    $dont="Do Not Include";
$surveyQ_id=$surveyQ_id+1;

                $sql2 = "INSERT INTO $table_name76 (   survey_id, surveyQ_id, question,comment, administrative, create_date) VALUES ('$survey_id','$surveyQ_id', '$q1','$qc1','$admin', '$today')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

                if ($a1 != $blink ){
              if( $a1 != $dont){
                      $a1= addslashes($_POST['answer1']);
          $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$a1','$c1','$test_type', '$p1')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                         }}


              $a2= $_POST['answer2'];

              if ($a2 != $blink ){
              if( $a2 != $dont){
               $a2= addslashes($_POST['answer2']);
            $p2= addslashes($_POST['Panswer2']);
              $c2= addslashes($_POST['Comment2']);
             $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$a2','$c2','$test_type', '$p2')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                                }  }



              $a3= $_POST['answer3'];

            if ($a3 != $blink ) {
            if ($a3 != $dont){
            $a3= addslashes($_POST['answer3']);
            $p3= addslashes($_POST['Panswer3']);
              $c3= addslashes($_POST['Comment3']);
            $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$a3','$c3','$test_type', '$p3')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                                }}



              $a4= $_POST['answer4'];
               if ($a4 != $blink){
               if( $a4 != $dont){
                $a3= addslashes($_POST['answer4']);
            $p3= addslashes($_POST['Panswer4']);
              $c3= addslashes($_POST['Comment4']);

                   $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$a3','$c3','$test_type', '$p3')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                                }  }

              $a5= $_POST['answer5'];
                  if ($a5 != $blink)  {
                 if ($a5 != $dont){

            $p3= addslashes($_POST['Panswer5']);
              $c3= addslashes($_POST['Comment5']);
               $a3= addslashes($_POST['answer5']);
                          $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$a3','$c3','$test_type', '$p3')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                                } }


              $a6= $_POST['answer6'];
                   if ($a6 != $blink) {
                  if ( $a6 != $dont){

            $p3= addslashes($_POST['Panswer6']);
              $c3= addslashes($_POST['Comment6']);
                 $a3= addslashes($_POST['answer6']);
                          $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$a3','$c3','$test_type', '$p3')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                                } }

              $a7= $_POST['answer7'];
               if ($a7 != $blink ){
               if ($a7 != $dont){
            $p3= addslashes($_POST['Panswer7']);
              $c3=addslashes($_POST['Comment7']);

                $a3= addslashes($_POST['answer7']);
                          $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$a3','$c3','$test_type', '$p3')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                                } }


              $a8= $_POST['answer8'];
            if ($a8 != $blink){
            if ($a8 != $dont){
            $p3= addslashes($_POST['Panswer8']);
              $c3= addslashes($_POST['Comment8']);
                 $a3= addslashes($_POST['answer8']);
                          $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$a3','$c3','$test_type', '$p3')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                                } }

              $a9= $_POST['answer9'];
            if ($a9 != $blink){
            if ($a9 != $dont){
            $p3= addslashes($_POST['Panswer9']);
              $c3= addslashes($_POST['Comment9']);
                  $a3= addslashes($_POST['answer9']);
                          $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$a3','$c3','$test_type', '$p3')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                                }}


              $a10= $_POST['answer10'];
           if ($a10 != $blink ){
           if ($a10 != $dont){
            $p3= addslashes($_POST['Panswer10']);
              $c3= addslashes($_POST['Comment10']);
                  $a3= addslashes($_POST['answer10']);
                          $sql2 = "INSERT INTO $table_name77 (  surveyQ_id, survey_id, answer,comment, test_type, A_points) VALUES ('$surveyQ_id','$survey_id', '$a3','$c3','$test_type', '$p3')";
$result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                                } }

      //  include("add_question.php");






  //  $warn= "<div class=success> Question Deleted</div>";



    $sq112a="SELECT * FROM $table_name76 WHERE survey_id ='$survey_id' Order By surveyQ_id ";



          // $boo="great";

      include("surv_display2.php");
       include("surv_display3.php");
      include("survey_manage2.php");




      $display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
	<tr>
    <td class=left >
       $display_blockV
    </td>
    <td class=left> $display_block2 </td>
	</tr>
    </tbody>

</table> ";


   }


    if ($jedID2 == 10) {
             $quest= $_POST['Quest'];
             $survey_id=$_POST['survey_idw'];
           $survey_num=$survey_id;

           $questEdit= addslashes($_POST['Edit']);
               $sql2 = "UPDATE $table_name76 SET   question=' $questEdit' WHERE survey_id ='$survey_id'AND surveyQ_id ='$quest' " ;
                $result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));

 $spot1=$_POST['1'];
 $bot=1;

 if ($spot1 != $blink)  {
             $sql2 = "UPDATE $table_name76 SET   administrative='$spot1' WHERE survey_id ='$survey_id'AND surveyQ_id ='$bot' " ;
  $result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
   }

  $spot1=$_POST['2'];
   $bot=2;
 if ($spot1 != $blink)  {
             $sql2 = "UPDATE $table_name76 SET   administrative=' $spot1' WHERE survey_id ='$survey_id'AND surveyQ_id ='$bot' " ;
         $result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));  
   }


                 $sq112e="SELECT * FROM $table_name77 WHERE survey_id ='$survey_id' AND surveyQ_id ='$quest' ";
                 $result24 = @mysqli_query($connection,$sq112e) or die(mysqli_error($connection));
                  while ($row1da = mysqli_fetch_array($result24)) {
$surveyA_id=  $row1da['surveyA_id'];
$test_type=  $row1da['test_type'];
$Pname="P$surveyA_id";
$Cname="C$surveyA_id";
$Aname="Q$surveyA_id";
$pquest= $_POST["$Pname"];
$cquest= addslashes($_POST["$Cname"]);
$aquest= addslashes($_POST["$Aname"]);


if (($test_type !=4) AND ($test_type !=0)) {

$sql2 = "UPDATE $table_name77 SET    answer ='$aquest', comment='$cquest', A_points='$pquest'  WHERE surveyA_id ='$surveyA_id'" ;
                $result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                }


   if ($test_type ==4)  {

$sql2 = "UPDATE $table_name77 SET    comment='$cquest', A_points='$pquest'  WHERE surveyA_id ='$surveyA_id'" ;
                $result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                }


 if ($test_type ==0)  {
 $aquest=addslashes($_POST["$quest"]);

$sql2 = "UPDATE $table_name77 SET answer ='$aquest',   comment='$cquest', A_points='$pquest'  WHERE surveyA_id ='$surveyA_id'" ;
                $result2 = @mysqli_query($connection,$sql2) or die(mysqli_error($connection));
                }






           }



    $sq112a="SELECT * FROM $table_name76 WHERE survey_id ='$survey_id' Order By surveyQ_id ";



          // $boo="great";

      include("surv_display2.php");
       include("surv_display3.php");
      include("survey_manage2.php");




      $display_block .= "<p><font face=Arial><h1></h1></p>
      <table border=\"0\" width=\"50%\" class=\"list\">
      <tbody>
	<tr>
    <td class=left >
       $display_blockV
    </td>
    <td class=left> $display_block2 </td>
	</tr>
    </tbody>

</table> ";

       }

?>
<!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>Survey Application Tok <?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/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" />

<link rel="stylesheet" type="text/css" href="GoTool/mover/table.css" media="all">
  <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>

</head>
<body>
<?PHP include("../menu/menu.php"); ?>
<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 $text_bob12; ?></a>

      </div>
          <?PHP echo "$mess"; ?>    <?PHP echo "$warn"; ?>
<!--  <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>


