orie

view

Jul 31st, 2019
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 33.01 KB | None | 0 0
  1.  
  2. <div class="content-wrapper">
  3.     <br>
  4.     <br>
  5.     <br>
  6.  
  7.     <section>
  8.         <div class="col-md-12" >
  9.             <div class="nav-tabs-custom" id="menu_chart">
  10.                 <!-- menu -->
  11.                 <div class="btn-group">
  12.                     <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" data-menu="1"
  13.                         aria-haspopup="true" aria-expanded="false" id="open_disc">
  14.                         DISC
  15.                     </button>
  16.                 </div>
  17.                 <div class="btn-group">
  18.                     <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" data-menu="1"
  19.                         aria-haspopup="true" aria-expanded="false" id="open_temp">
  20.                         temprament
  21.                     </button>
  22.                 </div>
  23.                 <div class="btn-group">
  24.                     <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
  25.                         aria-haspopup="true" aria-expanded="false" id="open_prbs">
  26.                         Problem Solving
  27.                     </button>
  28.                 </div>
  29.                 <div class="btn-group">
  30.                     <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
  31.                         aria-haspopup="true" aria-expanded="false" id="open_eq">
  32.                         EQ
  33.                     </button>
  34.                 </div>
  35.                 <div class="btn-group">
  36.                     <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
  37.                         aria-haspopup="true" aria-expanded="false" id="open_brain">
  38.                         Brain Dominant
  39.                     </button>
  40.                 </div>
  41.                 <div class="btn-group">
  42.                     <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
  43.                         aria-haspopup="true" aria-expanded="false" id="open_leadership">
  44.                         Leadership
  45.                     </button>
  46.                 </div>
  47.                 <div class="btn-group">
  48.                     <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
  49.                         aria-haspopup="true" aria-expanded="false" id="open_lifemotivation">
  50.                         Life Motivation
  51.                     </button>
  52.                 </div>
  53.                 <!-- <div class="btn-group">
  54.                     <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"
  55.                         aria-haspopup="true" aria-expanded="false" id="open_industry">
  56.                         Industry
  57.                     </button>
  58.                 </div> -->
  59.             </div>
  60.             <!-- content -->
  61.             <div class="col-md-9">
  62.                 <div class="col-md-12" id="sortable">
  63.                 <!-- Start Disc View -->
  64.                     <div class="col-md-4 chart_list" id="disc_col">
  65.                         <div class="chart_content">
  66.                             <button type="button" class="close" aria-label="Close" id="close_disc">
  67.                                 <span aria-hidden="true">&times;</span>
  68.                             </button>
  69.                             <div  id="disc"></div>
  70.                         </div>
  71.                     </div>
  72.  
  73.                     <!-- Close view Dics -->
  74.  
  75.                     <!-- Start view Temprament -->
  76.                     <div class="col-md-4 chart_list"  id="temp_col">
  77.                         <div class="chart_content">
  78.                             <button type="button" class="close" aria-label="Close" id="close_temp">
  79.                                 <span aria-hidden="true">&times;</span>
  80.                             </button>
  81.                             <div id="temprament"></div>
  82.                         </div>
  83.                     </div>
  84.                     <!-- Close View Temprament -->
  85.  
  86.                     <!-- start View Problem Solving -->
  87.                     <div class="col-md-4 chart_list"  id ="prbs_col">
  88.                         <div class="chart_content">
  89.                             <button type="button" class="close" aria-label="Close" id="close_prbs">
  90.                                 <span aria-hidden="true">&times;</span>
  91.                             </button>
  92.                             <div id="problemsolving">
  93.                             </div>
  94.                         </div>
  95.                         <?php
  96.  
  97.                          $ttl_cmpt  = ($hasil_cmpt / $ttl_disc) * 100 ;
  98.                          $ttl_lgc   = ($hasil_lgc / $ttl_disc) * 100 ;
  99.                          $ttl_ct    = ($hasil_ct / $ttl_disc) * 100 ;
  100.                         ?>
  101.                         <script>
  102.                             Highcharts.chart('problemsolving', {
  103.                                 chart: {
  104.                                     type: 'pie',
  105.                                     height : 200 ,
  106.                                     options3d: {
  107.                                         enabled: true,
  108.                                         alpha: 45,
  109.                                         beta: 0
  110.                                     }
  111.                                 },
  112.                                 title: {
  113.                                     text: '',
  114.                                     style: {
  115.                                         display: 'none'
  116.                                     }
  117.                                 },
  118.                                 subtitle: {
  119.                                     text: 'Problem Solving',
  120.  
  121.                                 },
  122.                                
  123.                                 tooltip: {
  124.                                     pointFormat: '{labels.name}: <b>{point.percentage:.1f}%</b>'
  125.                                 },
  126.                                 plotOptions: {
  127.                                     pie: {
  128.                                         allowPointSelect: true,
  129.                                         cursor: 'pointer',
  130.                                         depth: 35,
  131.                                         dataLabels: {
  132.                                             enabled: true,
  133.                                             format: '{point.name}'
  134.                                         }
  135.                                     }
  136.                                 },
  137.                                 series: [{
  138.                                     type: 'pie',
  139.                                     name: 'Problem Solving',
  140.                                     data: [
  141.                                         ['LGC', <?php echo $ttl_lgc ?>],
  142.                                         ['CT', <?php echo $ttl_ct ?>],
  143.                                         ['CMPT', <?php echo $ttl_cmpt ?>]
  144.                                     ]
  145.                                 }]
  146.                             });
  147.  
  148.                         </script>
  149.                     </div>
  150.                     <!-- Close View Problem Solving -->
  151.                     <!-- Start View EQ  -->
  152.                     <div class="col-md-4 chart_list"  id ="eq_col" >
  153.                         <div class="chart_content">
  154.                             <button type="button" class="close" aria-label="Close" id="close_eq">
  155.                                 <span aria-hidden="true">&times;</span>
  156.                             </button>
  157.                             <div id="eq">
  158.                             </div>
  159.                         </div>
  160.                         <?php
  161.                             $st = ($stress_tolerance / $ttl_disc) *100 ;
  162.                             $ad = ($adaptability / $ttl_disc) * 100 ;
  163.                             $aw = ($self_awareness / $ttl_disc) * 100 ;
  164.                             $em = ($empathy / $ttl_disc) * 100 ;
  165.  
  166.  
  167.                         ?>
  168.                         <script>
  169.                             Highcharts.chart('eq', {
  170.                                 chart: {
  171.                                     type: 'pie',
  172.                                     height : 200 ,
  173.                                     options3d: {
  174.                                         enabled: true,
  175.                                         alpha: 45,
  176.                                         beta: 0
  177.                                     }
  178.                                 },
  179.                                 title: {
  180.                                     text: '',
  181.                                     style: {
  182.                                         display: 'none'
  183.                                     }
  184.                                 },
  185.                                 subtitle: {
  186.                                     text: 'EQ',
  187.                                 },
  188.                                
  189.                                 tooltip: {
  190.                                     pointFormat: '{labels.name}: <b>{point.percentage:.1f}%</b>'
  191.                                 },
  192.                                 plotOptions: {
  193.                                     pie: {
  194.                                         allowPointSelect: true,
  195.                                         cursor: 'pointer',
  196.                                         depth: 35,
  197.                                         dataLabels: {
  198.                                             enabled: true,
  199.                                             format: '{point.name}'
  200.                                         }
  201.                                     }
  202.                                 },
  203.                                 series: [{
  204.                                     type: 'pie',
  205.                                     name: 'Problem Solving',
  206.                                     data: [
  207.                                         ['Stress Tolerance', <?php echo $st ?>],
  208.                                         ['Adaptability', <?php echo $ad ?>],
  209.                                         ['Self Awarness', <?php echo $aw ?>],
  210.                                         ['Empathy', <?php echo $em ?>]
  211.                                     ]
  212.                                 }]
  213.                             });
  214.  
  215.                         </script>
  216.                     </div>
  217.                     <!-- Close View EQ -->
  218.                     <!-- Start View Brain Dominan -->
  219.                     <div class="col-md-4 chart_list"  id ="brain_col">
  220.                         <div class="chart_content">
  221.                             <button type="button" class="close" aria-label="Close" id="close_brain">
  222.                                 <span aria-hidden="true">&times;</span>
  223.                             </button>
  224.                             <div id="brain">
  225.                             </div>
  226.                         </div>
  227.                         <?php
  228.                                 $ttl_left  = ($brain_left / $ttl_disc) * 100 ;
  229.                                 $ttl_right = ($brain_right / $ttl_disc) * 100 ;
  230.                                 $ttl_equal = ($brain_equal / $ttl_disc) * 100 ;
  231.                         ?>
  232.                         <script>
  233.                             Highcharts.chart('brain', {
  234.                                 chart: {
  235.                                     type: 'pie',
  236.                                     height : 200 ,
  237.                                     options3d: {
  238.                                         enabled: true,
  239.                                         alpha: 45,
  240.                                         beta: 0
  241.                                     }
  242.                                 },
  243.                                 title: {
  244.                                     text: '',
  245.                                     style: {
  246.                                         display: 'none'
  247.                                     }
  248.                                 },
  249.                                 subtitle: {
  250.                                     text: 'Brain Dominant',
  251.                                 },
  252.                                
  253.                                 tooltip: {
  254.                                     pointFormat: '{labels.name}: <b>{point.percentage:.1f}%</b>'
  255.                                 },
  256.                                 plotOptions: {
  257.                                     pie: {
  258.                                         allowPointSelect: true,
  259.                                         cursor: 'pointer',
  260.                                         depth: 35,
  261.                                         dataLabels: {
  262.                                             enabled: true,
  263.                                             format: '{point.name}'
  264.                                         }
  265.                                     }
  266.                                 },
  267.                                 series: [{
  268.                                     type: 'pie',
  269.                                     name: 'Problem Solving',
  270.                                     data: [
  271.                                         ['Right Brain Dominan', <?php echo $ttl_right ?>],
  272.                                         ['Left Brain Dominan', <?php echo $ttl_left ?>],
  273.                                         ['Equally dominant', <?php echo $ttl_equal ?>]
  274.                                     ]
  275.                                 }]
  276.                             });
  277.  
  278.                         </script>
  279.                     </div>
  280.                     <!-- Close View Brain Dominan -->
  281.  
  282.                     <!-- Start View leadership -->
  283.                     <div class="col-md-8 chart_list"  id ="leadership_col">
  284.                         <div class="col-md-12 chart_content">
  285.                             <!-- <div class="chart_content"> -->
  286.                                 <button type="button" class="close" aria-label="Close" id="close_leadership">
  287.                                     <span aria-hidden="true">&times;</span>
  288.                                 </button>
  289.                                 <div id="leadership">
  290.                                 </div>
  291.                             <!-- </div> -->
  292.                             <?php
  293.  
  294.                                 $ttl_manage             = ($Manage / $ttl_disc)      * 100 ;
  295.                                 $ttl_Adapt              = ($Adapt / $ttl_disc)       * 100 ;
  296.                                 $ttl_Communicate        = ($Communicate / $ttl_disc) * 100 ;
  297.                                 $ttl_Dare               = ($Dare / $ttl_disc)        * 100 ;
  298.                                 $ttl_Excel              = ($Manage / $ttl_disc)      * 100 ;
  299.  
  300.                                 $a_manage               = array_sum($ldi["Manage"]);
  301.                                 $ttl_leading            = ($ldi["Manage"]["Leading"] / $a_manage) * 100  ;
  302.                                 $ttl_tkr                = ($ldi['Manage']['Taking_Responsibility'] / $a_manage) * 100;
  303.                                 $ttl_Organization       = ($ldi['Manage']['Organization'] / $a_manage) * 100 ;
  304.                                 $ttl_vison              = ($ldi['Manage']['Vision'] / $a_manage) * 100;
  305.  
  306.                                 $a_adapt                = array_sum($ldi['Adapt']);
  307.                                 $ttl_stres_mg           = ($ldi['Adapt']['Stress_Management'] / $a_adapt) * 100 ;
  308.                                 $ttl_ROA                = ($ldi['Adapt']['Respect_Of_Authority'] / $a_adapt) * 100 ;
  309.                                 $ttl_Respon             = ($ldi['Adapt']['Responsiveness'] / $a_adapt) * 100 ;
  310.                                 $ttl_pat                = ($ldi['Adapt']['Patience'] / $a_adapt) * 100 ;
  311.  
  312.                                 $a_communitcate         = array_sum($ldi['Communicate']);
  313.                                 $ttl_persuasion         = ($ldi['Communicate']['Persuasion'] / $a_communitcate) * 100 ;
  314.                                 $ttl_Ease_In_Public     = ($ldi['Communicate']['Ease_In_Public'] / $a_communitcate) * 100 ;
  315.                                 $ttl_Opn_u              = ($ldi['Communicate']['Opening_Up_To_Others'] / $a_communitcate) * 100 ;
  316.                                 $ttl_Diplomacy          = ($ldi['Communicate']['Diplomacy'] / $a_communitcate) * 100 ;
  317.  
  318.                                 $a_dare                 = array_sum($ldi['Dare']);
  319.                                 $ttl_slfc               = ($ldi['Dare']['Self_Confidence'] / $a_dare) * 100 ;
  320.                                 $ttl_indm               = ($ldi['Dare']['Independent_Mind'] / $a_dare) * 100 ;
  321.                                 $ttl_crt                = ($ldi['Dare']['Creativity'] / $a_dare) * 100 ;
  322.                                 $ttl_auton              = ($ldi['Dare']['Autonomy'] / $a_dare) * 100 ;
  323.  
  324.                                 $a_excel                = array_sum($ldi['Excel']);
  325.                                 $ttl_deter              = ($ldi['Excel']['Determination'] / $a_excel) * 100 ;
  326.                                 $ttl_ambt               = ($ldi['Excel']['Ambition'] / $a_excel) * 100 ;
  327.                                 $ttl_wrketh             = ($ldi['Excel']['Work_Ethic'] / $a_excel) * 100 ;
  328.                                 $ttl_cmptspr            = ($ldi['Excel']['Competitive_Spirit'] / $a_excel) * 100 ;
  329.                             ?>
  330.                             <script>
  331.                                 Highcharts.chart('leadership', {
  332.                                     chart:{
  333.                                         height:200,
  334.                                         marginLeft: 200,                                       
  335.                                     },
  336.                                     title: {
  337.                                         text: 'Leadership'
  338.                                     },
  339.                                     xAxis: {
  340.                                         //  categories: ['Manage', 'Adapt', 'Communicate', 'Dare', 'Excel']
  341.                                     },
  342.                                     tooltip: {
  343.                                                 pointFormat: '{label.name}: <b>{point.y:.1f}%</b>'
  344.                                             },
  345.                                     labels: {
  346.                                         items: [{
  347.                                             html: '',
  348.                                             style: {
  349.                                                 left: '50px',
  350.                                                 top: '18px',
  351.                                                 color: ( // theme
  352.                                                     Highcharts.defaultOptions.title.style &&
  353.                                                     Highcharts.defaultOptions.title.style.color
  354.                                                 ) || 'black'
  355.                                             }
  356.                                         }]
  357.                                     },
  358.                                    
  359.                                     series: [
  360.                                     {
  361.                                         type: 'column',
  362.                                         name : 'Manage',
  363.                                         data: [
  364.                                                 {name:'Leading', y:<?php echo $ttl_leading ?>},
  365.                                                 {name:'Taking Responsibility' , y:<?php echo $ttl_tkr ?>},
  366.                                                 {name:'Organization' , y:<?php echo $ttl_Organization ?>},
  367.                                                 {name:'Vision' , y:<?php echo $ttl_vison ?>},
  368.                                             ],
  369.                                     },
  370.                                     {
  371.                                         type: 'column',
  372.                                         name: 'Adapt',
  373.                                         data: [
  374.                                                 {name:'Stress Management', y:<?php echo $ttl_stres_mg ?>},
  375.                                                 {name:'Respect Of Authority' , y:<?php echo $ttl_ROA ?>},
  376.                                                 {name:'Responsiveness' , y:<?php echo $ttl_Respon ?>},
  377.                                                 {name:'Patience' , y:<?php echo $ttl_pat ?>},
  378.                                               ]
  379.                                     },
  380.                                     {
  381.                                         type: 'column',
  382.                                         name: 'Communicate',
  383.                                         data: [
  384.                                                 {name:'Persuasion', y:<?php echo $ttl_persuasion ?>},
  385.                                                 {name:'Ease In Public' , y:<?php echo $ttl_Ease_In_Public ?>},
  386.                                                 {name:'Opening Up To Others' , y:<?php echo $ttl_Opn_u ?>},
  387.                                                 {name:'Diplomacy' , y:<?php echo $ttl_Diplomacy ?>},
  388.                                             ]
  389.                                     },
  390.                                     {
  391.                                         type: 'column',
  392.                                         name: 'Dare',
  393.                                         data: [
  394.                                                 {name:'Self Confidence', y:<?php echo $ttl_slfc ?>},
  395.                                                 {name:'Independent_Mind' , y:<?php echo $ttl_indm ?>},
  396.                                                 {name:'Creativity' , y:<?php echo $ttl_crt ?>},
  397.                                                 {name:'Autonomy' , y:<?php echo $ttl_auton ?>},
  398.                                         ]
  399.                                     },
  400.                                     {
  401.                                         type: 'column',
  402.                                         name: 'Excel',
  403.                                         data: [
  404.                                                 {name:'Determination', y:<?php echo $ttl_deter ?>},
  405.                                                 {name:'Ambition' , y:<?php echo $ttl_ambt ?>},
  406.                                                 {name:'Work Ethic' , y:<?php echo $ttl_wrketh ?>},
  407.                                                 {name:'Competitive Spirit' , y:<?php echo $ttl_cmptspr ?>},
  408.                                         ]
  409.                                     },
  410.                                     // pie Chart
  411.                                     {
  412.                                        
  413.                                         type: 'pie',
  414.                                         name: 'Leadership',
  415.                                         data: [
  416.                                             {
  417.                                                 name: 'Manage',
  418.                                                 y: <?php echo $ttl_manage ?>,
  419.                                                 color: Highcharts.getOptions().colors[0] // Manage's color
  420.                                             },
  421.                                             {
  422.                                                 name: 'Adapt',
  423.                                                 y: <?php echo $ttl_Adapt ?>,
  424.                                                 color: Highcharts.getOptions().colors[1] // Adapt's color
  425.                                             },
  426.                                             {
  427.                                                 name: 'Communicate',
  428.                                                 y: <?php echo $ttl_Communicate ?>,
  429.                                                 color: Highcharts.getOptions().colors[2] // Communicate's color
  430.                                             },
  431.                                             {
  432.                                                 name: 'Dare',
  433.                                                 y: <?php echo $ttl_Dare ?>,
  434.                                                 color: Highcharts.getOptions().colors[3] // Dare's color
  435.                                             },
  436.                                             {
  437.                                                 name: 'Excel',
  438.                                                 y: <?php echo $ttl_Excel ?>,
  439.                                                 color: Highcharts.getOptions().colors[4] // Excel's color
  440.                                             }
  441.  
  442.                                         ],
  443.                                         tooltip: {
  444.                                                 pointFormat: '{labels.name}: <b>{point.percentage:.1f}%</b>'
  445.                                             },
  446.                                         center: [-150, 20],
  447.                                         size: 90,
  448.                                         showInLegend: false,
  449.                                         dataLabels: {
  450.                                             enabled: false
  451.                                         }
  452.                                     }]
  453.                                 });
  454.  
  455.                             </script>
  456.                         </div>
  457.  
  458.                     </div>
  459.                     <!-- Close View leadership -->
  460.                    
  461.                     <!-- Start View Life Motivation -->
  462.                     <div class="col-md-4 chart_list"  id ="lifemotivation_col">
  463.                         <div class="chart_content">
  464.                             <button type="button" class="close" aria-label="Close" id="close_lifemotivation">
  465.                                 <span aria-hidden="true">&times;</span>
  466.                             </button>
  467.                             <div id="lifemotivation">
  468.                             </div>
  469.                         </div>
  470.                         <?php
  471.                             $ttl_Social_Recognations        = ($Social_Recognations / $ttl_disc) * 100 ;
  472.                             $ttl_Security                   = ($Security / $ttl_disc) * 100 ;
  473.                             $ttl_Need_For_Relations         = ($Need_For_Relations / $ttl_disc) * 100 ;
  474.                             $ttl_Need_For_Variety           = ($Need_For_Variety / $ttl_disc) * 100 ;
  475.                             $ttl_Need_To_Belong             = ($Need_To_Belong / $ttl_disc) * 100 ;
  476.                             $ttl_Pay                        = ($Pay / $ttl_disc) * 100 ;
  477.                             $ttl_Private_Or_Professional_Life = ($Private_Or_Professional_Life / $ttl_disc) * 100 ;
  478.                             $ttl_Philanthropy               = ($Philanthropy / $ttl_disc) * 100 ;                                  
  479.                        
  480.                         ?>
  481.                         <script>
  482.                             Highcharts.chart('lifemotivation', {
  483.                                 chart: {
  484.                                     type: 'pie',
  485.                                     height : 200 ,
  486.                                     options3d: {
  487.                                         enabled: true,
  488.                                         alpha: 45,
  489.                                         beta: 0
  490.                                     }
  491.                                 },
  492.                                 title: {
  493.                                     text: '',
  494.                                     style: {
  495.                                         display: 'none'
  496.                                     }
  497.                                 },
  498.                                 subtitle: {
  499.                                     text: 'Life Motivation',
  500.                                 },
  501.                                
  502.                                 tooltip: {
  503.                                     pointFormat: '{labels.name}: <b>{point.percentage:.1f}%</b>'
  504.                                 },
  505.                                 plotOptions: {
  506.                                     pie: {
  507.                                         allowPointSelect: true,
  508.                                         cursor: 'pointer',
  509.                                         depth: 35,
  510.                                         dataLabels: {
  511.                                             enabled: true,
  512.                                             format: '{point.name}'
  513.                                         }
  514.                                     }
  515.                                 },
  516.                                 series: [{
  517.                                     type: 'pie',
  518.                                     name: 'Problem Solving',
  519.                                     data: [
  520.                                         ['Social Recognations', <?php echo $ttl_Social_Recognations  ?>],
  521.                                         ['Security', <?php echo $ttl_Security ?>],
  522.                                         ['Need For Relations', <?php echo $ttl_Need_For_Relations ?>],
  523.                                         ['Need For Variety', <?php echo $ttl_Need_For_Variety ?>],
  524.                                         ['Need To Belong', <?php echo $ttl_Need_To_Belong ?>],
  525.                                         ['Pay', <?php echo $ttl_Pay ?>],
  526.                                         ['Private Or Professional Life', <?php echo $ttl_Private_Or_Professional_Life ?>],
  527.                                         ['Philanthropy', <?php echo $ttl_Philanthropy ?>]
  528.                                     ]
  529.                                 }]
  530.                             });
  531.  
  532.  
  533.                         </script>
  534.                     </div>
  535.                     <!-- Close View Life Motivation -->
  536.                    
  537.                     <!-- Start View Industry -->
  538.  
  539.                     <!-- Close View Industry -->
  540.                    
  541.                    
  542.                 </div>
  543.             </div>
  544.             <!-- right box -->
  545.             <div class="col-md-3" style="border:1px solid">
  546.                 <div class="row">
  547.                     <div class="col-md-12" style="border:1px solid red ; margin-buttom:5px;">
  548.                         <form class="form-horizontal">
  549.                             <!-- status -->
  550.                             <div class="form-group">
  551.                                 <div class="col-md-4">
  552.                                     <label class="control-label">Status :</label>
  553.                                 </div>
  554.                                 <div class="col-md-7">
  555.                                     <select name="status" id="status" class="form-control">
  556.                                         <option value="siswa">Siswa</option>
  557.                                         <option value="" disabled>Teacher</option>
  558.                                     </select>
  559.                                 </div>
  560.                             </div>
  561.                             <!-- prodi -->
  562.                             <div class="form-group">
  563.                                 <div class="col-md-4">
  564.                                     <label class="control-label">Prodi :</label>
  565.                                 </div>
  566.                                 <div class="col-md-7">
  567.                                     <select name="prodi" id="prodi" class="form-control">
  568.                                         <?php
  569.                                             foreach($user_prodi as $row_prodi):
  570.                                         ?>
  571.                                             <option value="<?= $row_prodi -> prodi ?>"><?= $row_prodi -> prodi ?></option>
  572.                                         <?php
  573.                                             endforeach;
  574.                                         ?>
  575.                                     </select>
  576.                                 </div>
  577.                             </div>
  578.                             <!-- Kelas -->
  579.                             <div class="form-group">
  580.                                 <div class="col-md-4">
  581.                                     <label class="control-label">Kelas :</label>
  582.                                 </div>
  583.                                 <div class="col-md-7">
  584.                                     <select name="kelas" id="kelas" class=" kelas form-control">
  585.                                         <option value=""> Kelas</option>
  586.                                     </select>
  587.                                 </div>
  588.                             </div>
  589.                         </form>
  590.                     </div>
  591.  
  592.                     <!-- right box 2 -->
  593.  
  594.                     <div class="col-md-12 right_box_2">
  595.                         <form class="form-horizontal form_right_box_2" action="" id="form_right_box_2">
  596.                             <div class="form-group">
  597.                                 <div class="col-md-6">
  598.                                     <label class="control-label"> Introvet</label>
  599.                                     <input class="radio-inline" name="radio_1" type="radio" value="I">
  600.                                 </div>
  601.                                 <div class="col-md-6">
  602.                                     <input class="radio-inline" name="radio_1" type="radio" value="E">
  603.                                     <label class="control-label"> Extrovert</label>
  604.                                 </div>
  605.                             </div>
  606.  
  607.                             <div class="form-group">
  608.                                 <div class="col-md-6">
  609.                                     <label class="control-label"> Sensing</label>
  610.                                     <input class="radio-inline" name="radio_2" type="radio" value="S">
  611.                                 </div>
  612.                                 <div class="col-md-6">
  613.                                     <input class="radio-inline" type="radio" name="radio_2" value="N">
  614.                                     <label class="control-label"> Intuitive</label>
  615.                                 </div>
  616.                             </div>
  617.  
  618.                             <div class="form-group">
  619.                                 <div class="col-md-6">
  620.                                     <label class="control-label"> Thinking</label>
  621.                                     <input class="radio-inline" type="radio" name="radio_3" value="T">
  622.                                 </div>
  623.                                 <div class="col-md-6">
  624.                                     <input class="radio-inline" type="radio" name="radio_3" value="F">
  625.                                     <label class="control-label"> Feeling</label>
  626.                                 </div>
  627.                             </div>
  628.  
  629.                             <div class="form-group">
  630.                                 <div class="col-md-6">
  631.                                     <label class="control-label"> Judging</label>
  632.                                     <input class="radio-inline" type="radio" value="J" name="radio_4">
  633.                                 </div>
  634.                                 <div class="col-md-6">
  635.                                     <input class="radio-inline" type="radio" value="P" name="radio_4">
  636.                                     <label class="control-label"> Perceiving</label>
  637.                                 </div>
  638.                             </div>
  639.                         </form>
  640.                     </div>
  641.  
  642.                     <div class="" id="change">             
  643.                         <input type="hidden" class="hidden" name="form-disc" id="form-disc" value="">
  644.                         <input type="hidden" class="hidden" name="form-temp" id="form-temp" value="">
  645.                         <input type="hidden" class="hidden" id="form-probs" value="">
  646.                         <input type="hidden" class="hidden" id="form-eq" value="">
  647.                         <input type="hidden" class="hidden" id="form-brain" value="">
  648.                         <input type="hidden" class="hidden" id="form-leader" value="">
  649.                         <input type="hidden" class="hidden" id="form-life" value="">
  650.                     </div>
  651.  
  652.                     <!-- right box 3 -->
  653.                     <div class="col-md-12 right_box_3">
  654.                         <div class="table-responsive" id="list-table">
  655.                             <table id="data-table" class="table table-striped table-fixed">
  656.                                     <thead>
  657.                                             <tr>
  658.                                                 <th>Nama</th>
  659.                                                 <th>Kelas</th>
  660.                                             </tr>
  661.                                     </thead>
  662.                                     <tbody>
  663.                                         <?php foreach($nama as $row_nama) : ?>
  664.                                             <tr>
  665.                                                 <?php  
  666.                                                     $kls    = str_replace("." , " " , $row_nama -> None);
  667.                                                 ?>
  668.                                                 <td><?php echo $row_nama -> NAME ?></td>
  669.                                                 <td><?php echo $kls ?></td>
  670.                                             </tr>
  671.                                         <?php endforeach; ?>
  672.                                     </tbody>
  673.                             </table>
  674.                         </div>
  675.                     </div>
  676.                 </div>
  677.             </div>
  678.         </div>
  679.         <!-- Buat comment -->
  680.         <div class="col-md-12" style="border:1px solid; height:85px;">
  681.             <div class="row">
  682.                 <div class="col-md-6">
  683.                     <form class="form-horizontal" method="post">
  684.                         <div class="form-group">
  685.                             <textarea class="form-control" name="isi_comment" id="isi_comment" cols="1" rows="1" placeholder="Comment :" style="height: 48px" ></textarea>
  686.                             <input class="btn btn-success form-control" type="submit" name="kirim" value="Send">
  687.                         </div>
  688.                     </form>
  689.                 </div>
  690.                
  691.                 <div class="col-md-6"  style="overflow-y:scroll; height:80px ; font-size:10px">
  692.                     <ul class="list-group">
  693.                         <?php for($i=0 ; $i < 20 ; $i++): ?>
  694.                             <li class="list-group-item"><?= $i ?></li>
  695.                         <?php endfor ; ?>
  696.                     </ul>
  697.                 </div>
  698.             </div>
  699.         </div>
  700.         <!-- close comment -->
  701.     </section>
  702.  
  703.     <script>
  704.    
  705.     // $(document).ready(function(){
  706.  
  707.     //  $('#send').on("click" , function(){
  708.  
  709.     //      var a = $('#isi_comment').$(this).val();
  710.  
  711.     //      console.log(a);
  712.     //  });
  713.  
  714.     // });
  715.    
  716.     </script>
  717.  
  718.  
  719.     <script>
  720.     $(document).ready(function() {
  721.       $('#data-table').dataTable( {
  722.        
  723.         "aaSorting": [[ 0, "desc" ]],
  724.         "pageLength": 3,
  725.         "responsive": true,
  726.         "pagingType": "simple",
  727.         "retrieve": true,
  728.         "lengthChange": false
  729.       });
  730.      
  731.     });
  732.  
  733.    
  734.    
  735.     $(document).ready(function(){
  736.         var limit = 4;
  737.         $("#menu_chart").on("click change" , function(e){
  738.             e.preventDefault();
  739.             var jml = 0;
  740.  
  741.             // var s = $('.btn.btn-danger').data('menu');
  742.            
  743.             // $(this).each(function(){
  744.             //  var dat =  $('.btn.btn-danger').data('menu');
  745.             //  jml = jml + parseInt(dat);
  746.                
  747.             // });
  748.             // console.log(jml);
  749.  
  750.  
  751.             if($('.btn.active').length >= limit){
  752.                 jml += parseInt($(this));
  753.  
  754.                 console.log(jml);
  755.                 $('.btn.btn-danger').attr("disabled", true);
  756.  
  757.             }else{
  758.                 var a = $('.btn.btn-danger').attr("disabled", false);
  759.                 // console.log(a);
  760.             };
  761.         });
  762.     });
  763.   </script>
  764.     <script type="text/javascript">
  765.         // right box
  766.        
  767.         $(document).ready(function(){
  768.  
  769.             $('#prodi').change(function(){
  770.                 var prodi_val   = $(this).val();
  771.  
  772.                 $.ajax({
  773.                     url : "<?php echo base_url('personality/get_kelas') ?>",
  774.                     method : "POST",
  775.                     data   : {prodi : prodi_val},
  776.                     async : false,
  777.                     dataType : 'json',
  778.                     success : function(data , textStatus, xhr){
  779.                         // console.log(data);
  780.  
  781.                         if(prodi_val == "XI IPA"){
  782.                             var prodi = "XI MIPA";
  783.                         }else{
  784.                             var prodi = prodi_val ;
  785.                         }
  786.                         var html = '' ;
  787.                         var i ;
  788.                         html = '<option value="">Select Kelas</option><option value="' + prodi +'">ALL</option>';
  789.                         for( i = 0 ; i < data.length ; i ++){
  790.                             html += '<option value="'+data[i].prallel+'">' + data[i].prallel + '</option>';
  791.                         }
  792.                         // console.log(data);
  793.                         $('.kelas').html(html);
  794.                        
  795.                     }      
  796.                 });
  797.             });
  798.  
  799.             $('#kelas').change(function(e){
  800.                 e.preventDefault();
  801.                 var kelas = $(this).val();
  802.  
  803.                 // var a = $("#chart_list").load('http://localhost/inadata.net/school/page/personality?kelas=')+this.value
  804.                 // console.log(a)
  805.                 // console.log(kelas);
  806.                 // window.location.href = "http://localhost/inadata.net/school/page/personality?kelas="+ this.value
  807.                 $.ajax({
  808.  
  809.                     url : "<?php echo base_url('page/personality') ?>",
  810.                     type : "get",
  811.                     data   : {kelas : this.value},
  812.                     success : function(data , xhr , textStatus , response){
  813.                         var result = $('#sortable').append(data).find('#sortable').html();
  814.                         var result2 = $('#list-table').append(data).find('#list-table').html();
  815.                         $('#sortable').empty();
  816.                         $('#sortable').html(result);
  817.                         $('#menu_chart .btn.btn-danger').removeClass("active");
  818.                         var menu = $('#menu_chart .btn.btn-danger').attr("disabled", false);
  819.                         $('#list-table').empty();
  820.                         // $("#data-table").DataTable().clear().draw();
  821.                         // $("#data-table").DataTable().destroy();
  822.                         $("#list-table").html(result2);
  823.                         // console.log(result2);
  824.                         //  var a = $('body').html(data).fadeIn(2000);
  825.                         // console.log(data);
  826.                     },
  827.                 });
  828.  
  829.                
  830.  
  831.             });
  832.  
  833.             $('#form_right_box_2').change(function(e){
  834.                 e.preventDefault();
  835.                 var radio1 = $("input[name='radio_1']:checked").val();
  836.                 var radio2 = $("input[name='radio_2']:checked").val();
  837.                 var radio3 = $("input[name='radio_3']:checked").val();
  838.                 var radio4 = $("input[name='radio_4']:checked").val();
  839.                 var kelas  = $('#kelas').val();
  840.                 var url = window.location.href;
  841.  
  842.                 if(radio1){
  843.                     var radio_1 = radio1;
  844.                 }else{
  845.                     var radio_1 = '';
  846.                 }
  847.  
  848.                 if(radio2){
  849.                     var radio_2 = radio2
  850.                 }else{
  851.                     var radio_2 = '';
  852.                 }
  853.  
  854.                 if(radio3){
  855.                     var radio_3 = radio3
  856.                 }else{
  857.                     var radio_3 = '';
  858.                 }
  859.  
  860.                 if(radio4){
  861.                     var radio_4 = radio4
  862.                 }else{
  863.                     var radio_4 = '';
  864.                 }
  865.  
  866.                 var data_radio = radio_1 + radio_2 + radio_3  + radio_4;
  867.                 $.ajax({
  868.  
  869.                     url  : "<?php echo base_url('page/personality') ?>",
  870.                     type : "get",
  871.                     data : {kelas : kelas , MBTI : data_radio},
  872.                     success : function(data , xhr , textStatus , response){
  873.                         var result = $('#sortable').append(data).find('#sortable').html();
  874.                         var result2 = $('#list-table').append(data).find('#list-table').html();
  875.                         $('#sortable').empty();
  876.                         $('#sortable').html(result);
  877.                         $('#menu_chart .btn.btn-danger').removeClass("active");
  878.                         var menu = $('#menu_chart .btn.btn-danger').attr("disabled", false);
  879.                         $('#list-table').empty();
  880.                         // $("#data-table").DataTable().clear().draw();
  881.                         // $("#data-table").DataTable().destroy();
  882.                         $("#list-table").html(result2);
  883.                     },
  884.                 });
  885.  
  886.             });
  887.  
  888.         });
  889.         // close Right  Box
  890.  
  891.         $(function(){
  892.             $( "#sortable" ).sortable();
  893.             $( "#sortable" ).disableSelection();
  894.         });
  895.         // ini function buat generate pie chart
  896.         function myFunction(id_class , isi , title){
  897.             var chart = Highcharts.chart(id_class, {
  898.             chart: {
  899.                 type: 'pie',
  900.                 height : 200 ,
  901.                 options3d: {
  902.                     enabled: true,
  903.                     alpha: 45,
  904.                     beta: 0
  905.                 }
  906.             },
  907.             title: {
  908.                 text: '',
  909.                 style: {
  910.                     display: 'none'
  911.                 }
  912.             },
  913.             subtitle: {
  914.                 text: title,
  915.             },
  916.             tooltip: {
  917.                 pointFormat: '{labels.name}: <b>{point.percentage:.1f}%</b>'
  918.             },
  919.             plotOptions: {
  920.                 pie: {
  921.                     allowPointSelect: true,
  922.                     cursor: 'pointer',
  923.                     depth: 35,
  924.                     dataLabels: {
  925.                         enabled: true,
  926.  
  927.                         formatter: function(e){
  928.                                 return this.point.name
  929.                             }
  930.                         },
  931.                 }
  932.  
  933.             },
  934.             series: [{
  935.                 type: 'pie',
  936.                 data: isi ,
  937.                 point: {
  938.                     events: {
  939.                         click: function() {
  940.                             // nah di sini saya sudah bisa ngambil data sesuai dngan yang di klik.
  941.                             // tapi saya sudah cari dan baca d9oukemntasinya tetap saja saya belom paham2
  942.                             // apakah ada yang bisa solving permasahalhan saya ? nanti soal fee bisa di atur
  943.                             if( title == "DISC"){
  944.                                 var disc = this.name ;
  945.                                 $('#form-disc').val(disc);
  946.                             }else{
  947.                                 var disc = ''
  948.                             }
  949.                             if( title == "Temprament"){
  950.                                 var temp = this.name ;
  951.                                 $('#form-temp').val(temp);
  952.                             }else{
  953.                                 var temp = ''
  954.                             }
  955.  
  956.                             $('#form-disc').val();
  957.                             $('#form-temp').val();
  958.                             // $.ajax({
  959.                             //  url : url ,
  960.                             //  Type : 'GET' ,
  961.                             //  dataType: 'Json',
  962.                             //  data : {"disc" : val_disc , "temp" : val_temp} ,
  963.                             //  success : function(data){
  964.                             //      callback(data);
  965.                             //      console.log(this.url);
  966.                             //  }
  967.  
  968.                             // });
  969.  
  970.  
  971.                             // console.log(gt);
  972.                         }
  973.                     }
  974.                 }
  975.             }]
  976.         });
  977.  
  978.         return chart ;
  979.         }
  980.  
  981.            
  982.         // var a = $("#chart_list").load('http://localhost/inadata.net/school/page/personality?kelas=')+this.value
  983.         // console.log(a)
  984.         // console.log(kelas);
  985.         // window.location.href = "http://localhost/inadata.net/school/page/personality?kelas="+ this.valu
  986.         var url = '<?php echo base_url('personality/get_data_json   ') ?>' ;
  987.  
  988.         var val = $('input')[0]
  989.         if( val === ''){
  990.             var uri = ''
  991.         }else{
  992.             uri = val
  993.         }
  994.         if($('#form-disc').on('change keyup ' , function(){
  995.             var uri = this.value;
  996.             console.log(uri)
  997.         }));
  998.         $(function(){
  999.  
  1000.            
  1001.             $('#disc_col').hide();
  1002.             $('#close_disc').on('click' , function(){
  1003.                 $('#disc_col').hide();
  1004.                 $('#open_disc').removeClass("active");
  1005.                 $('#open_disc').removeAttr("disabled");
  1006.                
  1007.             });
  1008.  
  1009.             $('#open_disc').on('click' , function(){
  1010.                 $('#disc_col').show();
  1011.                 $('#open_disc').addClass("active");
  1012.                 // console.log(url1);
  1013.                 var obj = $.getJSON(url , function(data){
  1014.  
  1015.                     var ttl_D = data['ttl_D'];
  1016.                     var ttl_I = data['ttl_I'];
  1017.                     var ttl_S = data['ttl_S'];
  1018.                     var ttl_C = data['ttl_C'];
  1019.                     var ttl_disc = data['ttl_disc'];
  1020.  
  1021.                     var isi =   [
  1022.                                 ['D',(ttl_D / ttl_disc) * 100],
  1023.                                 ['I',(ttl_I / ttl_disc) * 100],
  1024.                                 ['S',(ttl_S / ttl_disc) * 100],
  1025.                                 ['C',(ttl_C / ttl_disc) * 100]
  1026.                             ] ;
  1027.                     var a = myFunction('disc' , isi , 'DISC');
  1028.  
  1029.                    
  1030.                 });
  1031.  
  1032.             });
  1033.  
  1034.         });
  1035.  
  1036.         // temprament
  1037.         $(function(){
  1038.             $('#temp_col').hide();
  1039.             $('#close_temp').on('click' , function(){
  1040.                 $('#temp_col').hide();
  1041.                 $('#open_temp').removeClass("active");
  1042.                 $('#open_temp').removeAttr("disabled");
  1043.             });
  1044.  
  1045.             $('#open_temp').on('click' , function(){
  1046.                 $('#temp_col').show();
  1047.                 $('#open_temp').addClass("active");
  1048.                 var obj = $.getJSON(url , function(data){
  1049.  
  1050.                 var ttl_sj = data['hasil_sj'];
  1051.                 var ttl_sp = data['hasil_sp'];
  1052.                 var ttl_nf = data['hasil_nf'];
  1053.                 var ttl_nt = data['hasil_nt'];
  1054.                 var ttl_disc = data['ttl_disc'];
  1055.  
  1056.                 var isi =   [
  1057.                             ['SJ',(ttl_sj / ttl_disc) * 100],
  1058.                             ['SP',(ttl_sp / ttl_disc) * 100],
  1059.                             ['NF',(ttl_nf / ttl_disc) * 100],
  1060.                             ['NT',(ttl_nt / ttl_disc) * 100]
  1061.                         ] ;
  1062.                 var a = myFunction('temprament' , isi , 'Temprament');
  1063.                 });
  1064.             });
  1065.  
  1066.         });
  1067.  
  1068.         // ProblemSolving
  1069.         $(function(){
  1070.             $('#prbs_col').hide();
  1071.             $('#close_prbs').on('click' , function(){
  1072.                 $('#prbs_col').hide();
  1073.                 $('#open_prbs').removeClass("active");
  1074.                 $('#open_prbs').removeAttr("disabled");
  1075.             });
  1076.  
  1077.             $('#open_prbs').on('click' , function(){
  1078.                 $('#prbs_col').show();
  1079.                 $('#open_prbs').addClass("active");
  1080.             });
  1081.  
  1082.         });
  1083.  
  1084.         // EQ
  1085.         $(function(){
  1086.             $('#eq_col').hide();
  1087.             $('#close_eq').on('click' , function(){
  1088.                 $('#eq_col').hide();
  1089.                 $('#open_eq').removeClass("active");
  1090.                 $('#open_eq').removeAttr("disabled");
  1091.             });
  1092.  
  1093.             $('#open_eq').on('click' , function(){
  1094.                 $('#eq_col').show();
  1095.                 $('#open_eq').addClass("active");
  1096.             });
  1097.         });
  1098.         // brain dominan
  1099.             $(function(){
  1100.             $('#brain_col').hide();
  1101.             $('#close_brain').on('click' , function(){
  1102.                 $('#brain_col').hide();
  1103.                 $('#open_brain').removeClass("active");
  1104.                 $('#open_brain').removeAttr("disabled");
  1105.             });
  1106.  
  1107.             $('#open_brain').on('click' , function(){
  1108.                 $('#brain_col').show();
  1109.             });
  1110.  
  1111.         });
  1112.  
  1113.         // leadership
  1114.         $(function(){
  1115.             $('#leadership_col').hide();
  1116.             $('#close_leadership').on('click' , function(){
  1117.                 $('#leadership_col').hide();
  1118.                 $('#open_leadership').removeClass("active");
  1119.                 $('#open_leadership').removeAttr("disabled");
  1120.             });
  1121.  
  1122.             $('#open_leadership').on('click' , function(){
  1123.                 $('#leadership_col').show();
  1124.             });
  1125.  
  1126.         });
  1127.  
  1128.  
  1129.         // lifemotivation
  1130.             $(function(){
  1131.             $('#lifemotivation_col').hide();
  1132.             $('#close_lifemotivation').on('click' , function(){
  1133.                 $('#lifemotivation_col').hide();
  1134.                 $('#open_lifemotivation').removeClass("active").removeAttr("disabled");
  1135.             });
  1136.  
  1137.             $('#open_lifemotivation').on('click' , function(){
  1138.                 $('#lifemotivation_col').show();
  1139.             });
  1140.  
  1141.         });
  1142.  
  1143.     </script>
Advertisement
Add Comment
Please, Sign In to add comment