mardi 20 octobre 2020

How can I change color for a single input and change color for 3 inputs differently?

How can i make For all of the observation color to change except if $ceeeee1view is "Mastered", data is only required to be inputted once before the colour changes and three times if the data is mastered?

                          if ((substr_count($e1view, ",") =='1' && substr_count($ee1view, ",") <'1') && $e1view !=',Mastered' && $e1view !=',Mastered,Mastered' || ($m1==='1')) {
                             $ceeeee1view = ltrim(strrchr($e1view,','),',');
                          }
                          elseif ((substr_count($ee1view, ",") =='1' && substr_count($eee1view, ",") <'1')&& $ee1view !=',Mastered' && $ee1view !=',Mastered,Mastered' || ($mm1==='1')){
                              $ceeeee1view = ltrim(strrchr($ee1view,','),',');
                          }
                          elseif ((substr_count($eee1view, ",") =='1' && substr_count($eeee1view, ",") <'1')&& $eee1view !=',Mastered' && $eee1view !=',Mastered,Mastered' || ($mmm1==='1')){
                              $ceeeee1view = ltrim(strrchr($eee1view,','),',');
                          }
                          elseif ((substr_count($eeee1view, ",") =='1' && substr_count($eeeee1view, ",") <'1')&& $eeee1view !=',Mastered' && $eeee1view !=',Mastered,Mastered' || ($mmmm1==='1')){
                              $ceeeee1view = ltrim(strrchr($eeee1view,','),',');
                          }
                          elseif (substr_count($eeeee1view, ",") =='1' ){
                              $ceeeee1view = ltrim(strrchr($eeeee1view,','),',');
                          }
                          elseif ($e1view ==',Not Applicable' ){
                              $ceeeee1view = 'Not Applicable';
                          }
                          else {
                               $ceeeee1view = '';
                          }
                    


                    switch ($ceeeee1view) {
                          case "Mastered":
                              $color1="#12c4f9";
                              break;
                          case "Attend To":
                              $color1="#fd0303";
                              break;
                          case "Explore":
                              $color1="#fd7803";
                              break;
                          case "Prompt":
                              $color1="#fdd303";
                              break;
                          case "Unaided":
                              $color1="#58d95e";
                              break;
                          case "Not Applicable":
                             $color1="grey";
                              break;
                          
                          default:                     
                      }
                      /* //////////////////// */
                      ?>

Note: If its is mastered, the previous color should remain until mastered is 3 times.

Aucun commentaire:

Enregistrer un commentaire