\n";
while ($row_mod = sql_fetch_array($result)) {
ob_start();
echo "\n";
?>
'; ?>
';
echo $tab_code;
?>
'; ?>
'; ?>
'; ?>
'; ?>
λͺ¨λ μ€μ
ν΄λΉ λͺ¨λμ μ€μ μ λ³κ²½ν μ μμ΅λλ€.
μΆκ°λ λͺ¨λμ΄ μμ΅λλ€.
λͺ¨λμΆκ° λ²νΌμ ν΄λ¦ν΄μ£ΌμΈμ.
λͺ¨λμ κ³μ μΆκ°ν μ μμ΅λλ€.
';
}
$output .= '';
}
$output .= "";
if ($use_cache) {
$cache_dir = dirname($cache_file);
if(!is_dir($cache_dir)){
@mkdir($cache_dir, 0777, true);
@chmod($cache_dir,0755);
}
file_put_contents($cache_file, $output);
file_put_contents($hash_file, $layout_checksum);
}
try {
ob_start();
$eval_result = eval('?>' . $output);
$eval_output = ob_get_clean();
if ($eval_output) {
throw new Exception("eval() μ€ν μ€ μκΈ°μΉ μμ μΆλ ₯μ΄ λ°μνμ΅λλ€: " . $eval_output);
}
$result_data[$layout_no] = $eval_result;
} catch (ParseError $e) {
$errors[] = "λ μ΄μμ #{$layout_no} μ²λ¦¬ μ€ κ΅¬λ¬Έ μ€λ₯κ° λ°μνμ΅λλ€: " . $e->getMessage();
if ($is_admin) {
$errors[] = "--- μμ±λ μ½λ (μΌλΆ) ---\n" . htmlspecialchars(substr($output, 0, 500)) . "...";
}
} catch (Throwable $e) {
$errors[] = "λ μ΄μμ #{$layout_no} μ²λ¦¬ μ€ μ€λ₯κ° λ°μνμ΅λλ€: " . $e->getMessage();
}
}
header('Content-Type: application/json; charset=utf-8');
if (!empty($errors)) {
http_response_code(500);
echo json_encode(['success' => false, 'message' => "λ μ΄μμ λ°μ΄ν° μ²λ¦¬ μ€ μλ² μ€λ₯κ° λ°μνμ΅λλ€.", 'errors' => $errors]);
} else {
echo json_encode($result_data);
}