<?php
//共通
require_once '../../base/common.php';

$logger = new logger(basename(__FILE__));
$logger->info("===af244x_index_start===");
$logger->info('post', $_POST);

$assign_var["noeventClassHeader"] = "";
$assign_var["noeventClassBody"]   = "";

//POPUP
$assign_var["hasPopJan"] = "1"; //afm02
$assign_var["hasPopMcd"] = "1"; //afm04
$assign_var["hasPopAf244x1"] = "1";  //伝票検索

$header = Array(
  "newmode" => "NEW",
  "ssbat2" => "",
  "ssdat2" => "",
);
$valutil = new getValueUtil();

try {
  //締め関連情報の取得
  $whereParams = array();
  $whereParams["ktktcd"] = $_SESSION[$GLOBALS['SYSTEM_NAME_EN']]["LGKTKTCD"];
  $sql = file_get_contents("./sql/getSsdat2.sql");
$logger->info($sql, $whereParams);
  $result = $dbutil->selectnocount($sql, $whereParams);
  if ($result != null) {  //念のため
    $header["ssbat2"] = $result[0]["ssbat2"];
    $header["ssdat2"] = $result[0]["ssdat2"];
  }

} catch(userException $ue) {
  $assign_var["hasError"] = true;
  $assign_var["errorMsg"] = $ue->getMessage();
} catch(Exception $e) {
  $assign_var["hasError"] = true;
  $assign_var["errorMsg"] = $e->getMessage();
}

$assign_var["header"] = $header;
$logger->info("header", $header);

// 初期表示
$dataList = Array(
);
$obj = [];
array_push($dataList, $obj);

$logger->info("dataList", $dataList);
$assign_var["dataList"] = $dataList;

//Smartyへアサイン
$logger->info("assign_var",$assign_var);
$smarty->assign($assign_var);
$smarty->display("index");

$logger->info("=== af244x_index_end ===");
?>
