테스트 사이트 - 개발 중인 베타 버전입니다

php css html 왕초보

 

 

 

 

 

 

성적표가 한개 보일때는 정상적으로 되는데 ,  여러 성적표를 보려니  이렇게 됩니다 .ㅠㅠ 어디부분을 수정해야하나요 ?  새로 만들어야하나요 ? 너무긴데 봐주실수있는분 정말 감사드리겠습니다.  

 

set_time_limit(240);

ini_set('memory_limit','512M');

 

include_once "./_common.php";

include_once "{$g4[lms_path]}/head.sub.php";

 

$sql = "select a.*, b.wr_3 as id, d.wr_1 as d_wr_1, d.wr_15 as d_wr_15, e.wr_1 as e_wr_1, e.wr_2 as e_wr_2, d.wr_datetime as d_wr_datetime

            from {$g4['lms_prefix']}D07 a

            left join {$g4['lms_prefix']}A01 b

            on a.wr_19 = b.wr_11

            left join

                {$g4['lms_prefix']}D04 d

            on

                a.wr_2 = d.wr_id

            left join

                {$g4['lms_prefix']}D01 e

            on

                d.wr_3 = e.wr_id

            where

                a.wr_2='{$id}'";

 

$is = sql_query($sql);

?>

" target="_blank" rel="noopener noreferrer">https://www.gstatic.com/charts/loader.js">

$index = 0;

while($row = sql_fetch_array($is)){

    $index++;

 

    $lis_score = "";

    $rea_score = "";

    $lis_comment = "";

    $rea_comment = "";

    $one_p = "";

    $part1_p = "";

    $part2_p = "";

    $part3_p = "";

    $part4_p = "";

    $part5_p = "";

    $part6_p = "";

    $part7_p = "";

    $lis_p = "";

    $rea_p = "";

 

    $lis_score = $row['wr_25']; //$row['wr_11']+$row['wr_12']+$row['wr_13']+$row['wr_14'];

    $rea_score = $row['wr_26']; //$row['wr_15']+$row['wr_16']+$row['wr_17'];

     $today = date("Y-m-d");

   

        $sub_sql = "

        SELECT

            a.*, b.wr_15 as b_wr_15

        FROM

            lms_D07 a

        left join lms_D04 b

        on a.wr_2 = b.wr_id

        WHERE

            a.wr_19 =  '".$row['wr_19']."' AND

            a.wr_2 !=  '{$id}' and

            b.wr_12 > '{$today}'

        ORDER BY

            a.wr_datetime DESC

        LIMIT 0 , 2

    ";

 

    $sub_is = sql_query($sub_sql);

    $sub_as = sql_fetch($sub_sql);

    $sub_index = 0;

    $one_lis_score = 0;

    $one_rea_score = 0;

    $one_total_score = 0;

    $one_date = null;

    $two_lis_score = 0;

    $two_rea_score = 0;

    $two_total_score = 0;

    $two_date = null;

 

    if(!$sub_as) {

        $one_lis_score = $one_rea_score = $one_total_score = "-";

        $one_date = "이전 시험내역이 없습니다";

        $two_lis_score = $two_rea_score = $two_total_score = "-";

        $two_date = "이전 시험내역이 없습니다";

    }

 

    while($sub_row = sql_fetch_array($sub_is)){

        $sub_index++;

        if($sub_index == 1){

            $one_lis_score = $sub_row['wr_25']; //$sub_row['wr_11']+$sub_row['wr_12']+$sub_row['wr_13']+$sub_row['wr_14'];

            $one_rea_score = $sub_row['wr_26']; //$sub_row['wr_15']+$sub_row['wr_16']+$sub_row['wr_17'];

            $one_total_score = $sub_row["wr_18"];

            if($sub_row['wr_3'] == '2') $one_date = date("Y/m/d", strtotime($sub_row['b_wr_15']));

            else $one_date = date("Y/m/d", strtotime($sub_row['wr_datetime']));

        }else if($sub_index == 2){

            $two_lis_score = $sub_row['wr_25'];//$sub_row['wr_11']+$sub_row['wr_12']+$sub_row['wr_13']+$sub_row['wr_14'];

            $two_rea_score = $sub_row['wr_26'];//$sub_row['wr_15']+$sub_row['wr_16']+$sub_row['wr_17'];

            $two_total_score = $sub_row["wr_18"];

            if($sub_row['wr_3'] == '2') $two_date = date("Y/m/d", strtotime($sub_row['b_wr_15']));

            else $two_date = date("Y/m/d", strtotime($sub_row['wr_datetime']));

        }

    }

 

    if($row['e_wr_1'] == "1"){

        $one_p = "5";

        $part1_p =  ($row['wr_11']/(6*$one_p))*100;

        $part2_p =  ($row['wr_12']/(25*$one_p))*100;

        $part3_p =  ($row['wr_13']/(39*$one_p))*100;

        $part4_p =  ($row['wr_14']/(30*$one_p))*100;

        $part5_p =  ($row['wr_15']/(30*$one_p))*100;

        $part6_p =  ($row['wr_16']/(16*$one_p))*100;

        $part7_p =  ($row['wr_17']/(54*$one_p))*100;

        $lis_p = ($lis_score/495)*100;

        $rea_p = ($rea_score/495)*100;

    }else if($row['e_wr_1'] == "2"){

        $one_p = "10";

        $part1_p =  ($row['wr_11']/(3*$one_p))*100;

        $part2_p =  ($row['wr_12']/(14*$one_p))*100;

        $part3_p =  ($row['wr_13']/(18*$one_p))*100;

        $part4_p =  ($row['wr_14']/(15*$one_p))*100;

        $part5_p =  ($row['wr_15']/(15*$one_p))*100;

        $part6_p =  ($row['wr_16']/(8*$one_p))*100;

        $part7_p =  ($row['wr_17']/(27*$one_p))*100;

        $lis_p = ($lis_score/495)*100;

        $rea_p = ($rea_score/495)*100;

    }

 

    if((0<$lis_score && $lis_score<=150) || !$lis_score){

        $lis_cha = "wr_19";

        $lis_weak = "wr_20";

        $lis_comment = "wr_21";

    }else if(150<$lis_score && $lis_score<=270){

        $lis_cha = "wr_16";

        $lis_weak = "wr_17";

        $lis_comment = "wr_18";

    }else if(270<$lis_score && $lis_score<=322){

        $lis_cha = "wr_13";

        $lis_weak = "wr_14";

        $lis_comment = "wr_15";

    }else if(322<$lis_score && $lis_score<=370){

        $lis_cha = "wr_10";

        $lis_weak = "wr_11";

        $lis_comment = "wr_12";

    }else if(370<$lis_score && $lis_score<=415){

        $lis_cha = "wr_7";

        $lis_weak = "wr_8";

        $lis_comment = "wr_9";

    }else if(415<$lis_score && $lis_score<=455){

        $lis_cha = "wr_4";

        $lis_weak = "wr_5";

        $lis_comment = "wr_6";

    }else if(455<$lis_score && $lis_score<=500){

        $lis_cha = "wr_1";

        $lis_weak = "wr_2";

        $lis_comment = "wr_3";

    }

 

    if((0<$rea_score && $rea_score<=150) || !$rea_score){

        $rea_cha = "wr_40";

        $rea_weak = "wr_41";

        $rea_comment = "wr_42";

    }else if(150<$rea_score && $rea_score<=270){

        $rea_cha = "wr_37";

        $rea_weak = "wr_38";

        $rea_comment = "wr_39";

    }else if(270<$rea_score && $rea_score<=322){

        $rea_cha = "wr_34";

        $rea_weak = "wr_35";

        $rea_comment = "wr_36";

    }else if(322<$rea_score && $rea_score<=370){

        $rea_cha = "wr_31";

        $rea_weak = "wr_32";

        $rea_comment = "wr_33";

    }else if(370<$rea_score && $rea_score<=415){

        $rea_cha = "wr_28";

        $rea_weak = "wr_29";

        $rea_comment = "wr_30";

    }else if(415<$rea_score && $rea_score<=455){

        $rea_cha = "wr_25";

        $rea_weak = "wr_26";

        $rea_comment = "wr_27";

    }else if(455<$rea_score && $rea_score<=500){

        $rea_cha = "wr_22";

        $rea_weak = "wr_23";

        $rea_comment = "wr_24";

    }

 

    $sql = "select * from {$g4['lms_prefix']}D06";

    $comment = sql_fetch($sql);

 

    $crm_info = get_crm2($member[mb_id]);

 

    $imagPath='20230411_110638431.jpg';

    $image = imagecreatefromjpeg($imagePath);

 

    $text = '하이헬로우';

    imagettftext($image, 20, 0, 50, 50, $textColor, 'arial.ttf', $text);

    header('Content-Type: image/jpeg');

    imagejpeg($image);

 

?>

                                   

       

                   

           

               

 

               

 

               

 

               

   

               

               

 

           

       

           

               

               

                   

                       

                       

                   

                       

                                   

                           

                           

Name

                           

               

                       

                       

                           

                               

                       

                            if($row['b_wr_10']){

                                ?>

                                   

                               

                            }else{

                                ?>

                                   

                               

                            }

                        ?>

                       

                   

                               

Student Number

                           

                           

                       

                       

                           

                               

                           

                                    if($row['wr_32']){

                                        echo date("Y/m/d", strtotime($row['wr_32']));

                                    } else {

                                            echo date("Y/m/d", strtotime($row['d_wr_15']));

                                    }

                                } else if($row['d_wr_1'] == '1') { ?>

                               

                           

                       

 

                               

Test date

                       

 

                               

(yyyy/mm/dd)

                           

                           

                       

                   

                   

                       

                           

                               

                                   

                                           LISTENING   

                                   

                                   

                                        Your Score:

                                       

                                   

                                   

5 0 %

                                   

495 99 %

                                   

                                       

                                   

                                       

%;">

                                       

                                       

                                   

                               

                           

                       

                           

                               

                                   

                                   

                                            READING   

                                   

                                   

                                        Your Score:

                                   

                                   

5 0 %

                                   

495 99 %

                                   

                                       

                                           

%;">

                                       

                                   

                               

                           

                       

                       

                           

                               

                                    TOTAL SCORE

                               

                               

                                   

                               

                           

                       

 

           

               

                   

                        LISTENING

                   

                   

                        특징 :

                        취약점 :

                        Comment :

                   

               

               

                   

                        READING

                   

                   

                        특징 :

                        취약점 :

                        Comment :

                   

               

           

 

           

               

                    ABILITIES MEASURED

               

               

                   

                       

                           

                           

                           

                           

                           

                           

                           

                           

                       

                       

                           

                           

                           

                           

                           

                           

                           

                           

                       

                       

                       

                           

                           

                           

                           

                           

                           

                           

                           

                       

                       

 

                        else if($row['e_wr_1'] == "2"){?>

                       

                           

                           

                           

                           

                           

                           

                           

                           

                       

                       

                   

PART PART1 PART2 PART3 PART4 PART5 PART6 PART7
CORRECT % % % % % % %
CORRECT % % % % % % %

 

                   

 

               

               

           

                               

 

   

🐛 버그신고