query( "SELECT * FROM visitor WHERE deleted_at IS NULL AND visitor_id = '".$visitor_id."' LIMIT 1" ) ; if ( $select_visitor->num_rows == 0 || setSecret( $visitor_id ) != $token ){ header('Location: index.php') ; exit ; } $row_visitor = $select_visitor->fetch_assoc() ; // get branch name $branch_name = '' ; $mysqli_query = "SELECT branch_id, branch_name FROM branch WHERE branch_id = '".$row_visitor['branch']."' LIMIT 1" ; $mysqli_branch = $mysqli->query($mysqli_query) ; if ( $mysqli_branch->num_rows > 0 ){ $row_branch = $mysqli_branch->fetch_assoc() ; $branch_name = $row_branch['branch_name'] ; } $qrcode = 'VT|'.$visitor_id ; $outputqrcode = generateQrcode( '', $qrcode, $qrcode ) ; include '../requires/page_header.php' ; include 'requires.php' ; $more_scripts = showMessage( $_SESSION['error'], $message ) ; ?>