<?
include getenv("DOCUMENT_ROOT")."/include/session_include.php";

//$func->checkAdmin("index.php");

$d_uid = trim($_POST["d_uid"]);

//echo "[$d_uid]";exit;

if ($mode == "") {
		$mode = "update";
		$btnName = "UPDATE";
		$admTag = "DISABLED";
}

if($d_uid == "") {
		$msg = "Invaild data. Please try again. [Err - d_uid / FORECAST-POPUP]";
		$func -> modalMsg ($msg, 1);
		exit();
} else {
	
		// Get Information
		$query = "SELECT d_ruid FROM tbl_daily WHERE d_uid = '$d_uid'";
		$result=$jdb->fQuery($query, "fetch query error");
		//	echo"$query";

		$qry_rnote = "SELECT r_note FROM tbl_request WHERE r_uid = '".$result['d_ruid']."' ";
		$rt_rnote = $jdb->fQuery($qry_rnote, "fetch query error");

		$r_noteSTR = str_replace("\\", "", trim($rt_rnote[0]));
}		


?>


      <div class="modal-header">
        <h4 class="modal-title">REQUEST NOTE</h4>
        <button type="button" class="btn" data-dismiss="modal" aria-label="Close" style="color:#fff;"><i class="bi bi-x"></i></button>
      </div>
      <div class="modal-body">

          <table class="tb-info-box">
 
            <tr>
              <td class="td-title-info">Note</td>
              <td class="td-text-info">
                <textarea id="c_comment" class="textarea" name="c_comment" rows="4" cols="20"><?=$r_noteSTR?></textarea>
              </td>
            </tr>

          </table>
          <br>
          <div class="text-center">
            <button type="button" class="btn-gray" data-dismiss="modal">CLOSE</button>
          </div>
        </FORM>
      </div>


<div class="modal fade" id="myModalPopup" tabindex="-1" role="dialog" aria-labelledby="myModalPopup"  style="opacity: 0.5; padding-right: 0px !important;">
  <div class="modal-dialog modal-dialog-centered modal-xl" role="document">
      <div class="modal-content" style="background-color:#2A9B56 !important; max-width:260px; margin: 0 auto;">
        <div class="myModalPopup-body" style="text-align: center; border-radius: 5px; max-height:60px;	font-size:18px; background-color:#2A9B56; color: #FFFFFF; font-weight: bold;padding:0.5em 1em; ">

        </div>     	
      </div>
  </div>
</div>
