@ -25,6 +25,7 @@ if(isset($_GET['id']) && $_GET['id']!=""){
$stmt->execute();
$stmt->execute();
$contracts = $stmt->fetchAll(PDO::FETCH_ASSOC);
$contracts = $stmt->fetchAll(PDO::FETCH_ASSOC);
$contract = $contracts[0];
$contract = $contracts[0];
$contract_apply_id = $contract['id'];
if(($contract['status'] !== "YY" & & $user_id != 'M0107') & & $user_id != 'M0174'){
if(($contract['status'] !== "YY" & & $user_id != 'M0107') & & $user_id != 'M0174'){
echo '< script type = "text/javascript" >
echo '< script type = "text/javascript" >
alert("非法訪問。");
alert("非法訪問。");
@ -79,14 +80,12 @@ if(isset($_GET['id']) && $_GET['id']!=""){
}
}
}
}
$sql_str = "SELECT file_name FROM contract_apply_files WHERE contract_id = :contract_id AND deleted_at IS NULL";
$sql_str = "SELECT file_name FROM contract_apply_files WHERE contract_id = :contract_id AND deleted_at IS NULL";
$sql_str = "SELECT contract_apply_files.*, contract_new_apply.id as apply_id FROM contract_apply_files LEFT JOIN contract_new_apply ON contract_apply_files.contract_id = contract_new_apply.id WHERE contract_new_apply.mid = :mid AND contract_apply_files.deleted_at IS NULL";
$stmt = $conn->prepare($sql_str);
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':contract_ id', $id);
$stmt->bindParam(':m id', $id);
$stmt->execute();
$stmt->execute();
$files = $stmt->fetchAll(PDO::FETCH_ASSOC);
$files = $stmt->fetchAll(PDO::FETCH_ASSOC);
print_r($files);
echo "count=>" . count($files);
$files_count = count($files);
$files_count = count($files);
}
}
catch (PDOException $e ){
catch (PDOException $e ){
@ -355,6 +354,7 @@ if(isset($_GET['id']) && $_GET['id']!=""){
< / div >
< / div >
< form action = "prviewPdf.php?id= <?php echo $id ; ?> & <?php echo $token_link ; ?> " id = "form" method = "post" x-ref = "form" style = "display:none" >
< form action = "prviewPdf.php?id= <?php echo $id ; ?> & <?php echo $token_link ; ?> " id = "form" method = "post" x-ref = "form" style = "display:none" >
< input type = "hidden" name = "contract_apply_id" id = "contract_apply_id" value = " <?php echo $contract_apply_id ; ?> " />
< input type = "hidden" name = "list" id = "prview-list" / >
< input type = "hidden" name = "list" id = "prview-list" / >
< input type = "hidden" name = "prviewType" id = "prview-type" / >
< input type = "hidden" name = "prviewType" id = "prview-type" / >
< input type = "hidden" name = "standardList" id = "standard-prview-list" / >
< input type = "hidden" name = "standardList" id = "standard-prview-list" / >