{{-- Original footer --}}
@php $datapic = DB::table('tb_case') ->join('patient','patient.hn','tb_case.case_hn') ->where('case_id',$casedata->case_id) ->first(); $file_start = fopen("public/images/ori-esign.txt", "r") or die("Unable to open file!"); $str_start = fread($file_start,filesize("public/images/ori-esign.txt")); fclose($file_start); $check_file = file_exists(htdocs("store/$datapic->hn/$folderdate/$casedata->caseuniq.txt")); if($check_file==1){ $file_end = fopen(htdocs("store/$datapic->hn/$folderdate/$casedata->caseuniq.txt"), "r") or die("Unable to open file!"); $str_end = fread($file_end,filesize(htdocs("store/$datapic->hn/$folderdate/$casedata->caseuniq.txt"))); fclose($file_end); }else{ $file_end = fopen("public/images/ori-esign.txt", "r") or die("Unable to open file!"); $str_end = fread($file_end,filesize("public/images/ori-esign.txt")); fclose($file_end); } $rightto = DB::table('patient') ->where('patient.hn',$casedata->case_hn)->first(); $this_json = jsonDecode($casedata->case_json); $doctorname = "-"; if(isset($this_json->doctorname)){ if($this_json->doctorname != ''){ $doctorname = $this_json->doctorname; } } @endphp @if($str_start==$str_end) Signature____________________________________________ {{$doctor[1]}} @else Signature {{nbsp(50)}} {{$doctor[1]}} @endif Reported by EndoCapture