<?php
// Bible Study: Dispensations

$dispensations = [
    "title" => "Bible Study on Dispensations",
    
    "overview" => "Dispensational theology studies how God interacts with humanity in different periods of history. Each 'dispensation' represents a stewardship or a period in which God tests humanity in specific ways, revealing aspects of His character and plan. Understanding dispensations helps us see the progressive revelation of God's plan, the role of law and grace, and how faith operates in each period.",

    "key_points" => [
        "A dispensation is a period in which God gives humanity responsibilities and expectations.",
        "Different dispensations reveal God’s justice, mercy, and redemptive plan.",
        "Faith is always the required response, but the context and accountability differ.",
        "Dispensational teaching emphasizes God’s progressive revelation and plan for salvation."
    ],

    "main_dispensations" => [
        "Innocence" => [
            "time_period" => "Creation to the Fall",
            "key_scriptures" => ["Genesis 1:28-30", "Genesis 2:16-17"],
            "description" => "Adam and Eve were in perfect fellowship with God, responsible to obey Him. Their failure brought sin and judgment."
        ],
        "Conscience" => [
            "time_period" => "Fall to Noah",
            "key_scriptures" => ["Genesis 3:7-24", "Genesis 4:1-16"],
            "description" => "Humanity acted according to conscience; sin increased. God judged sin with the flood but preserved Noah."
        ],
        "Human Government" => [
            "time_period" => "Noah to Abraham",
            "key_scriptures" => ["Genesis 9:1-17"],
            "description" => "God established human government; people were accountable for maintaining order and life."
        ],
        "Promise" => [
            "time_period" => "Abraham to Moses",
            "key_scriptures" => ["Genesis 12:1-3", "Galatians 3:8"],
            "description" => "God dealt with Abraham by promise; faith in God’s promise was the test, not law."
        ],
        "Law" => [
            "time_period" => "Moses to Christ",
            "key_scriptures" => ["Exodus 19-20", "Romans 3:20"],
            "description" => "God gave the Law to reveal sin and the need for a Savior. Obedience was required, but no one could be justified by law alone."
        ],
        "Grace" => [
            "time_period" => "Christ to the Rapture / Church Age",
            "key_scriptures" => ["Ephesians 2:8-9", "Romans 6:14"],
            "description" => "Salvation is by faith in Christ’s finished work. The Church is called to live by faith and demonstrate God’s love."
        ],
        "Millennial Kingdom" => [
            "time_period" => "Christ’s 1000-year reign",
            "key_scriptures" => ["Revelation 20:4-6", "Isaiah 11:1-9"],
            "description" => "Christ will rule on Earth. Righteousness will be fully manifested, and humanity will experience perfect law under God’s rule."
        ]
    ],

    "common_mistakes" => [
        "Thinking salvation is earned by works rather than faith in Christ.",
        "Confusing the Law with Grace — the Law was temporary, grace is permanent for the Church.",
        "Ignoring historical context of God’s dealings in different dispensations."
    ],

    "practical_application" => [
        "Understand your dispensation: live by faith in Christ during the Church Age.",
        "Study Scripture in context; do not apply Old Testament law to the Church age as a salvation principle.",
        "Trust God’s progressive plan and learn from previous dispensations.",
        "Use knowledge of dispensations to discern God’s instructions and promises for today."
    ],

    "group_discussion_questions" => [
        "How does understanding dispensations help clarify God’s plan for humanity?",
        "Why is faith the consistent requirement across all dispensations?",
        "What mistakes do people often make when they mix Law and Grace?",
        "How can knowledge of previous dispensations encourage your daily walk of faith?",
        "What practical differences in obedience and accountability exist between Law and Grace?"
    ]
];

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><?php echo $dispensations['title']; ?></title>
    <style>
        body { font-family: Arial, sans-serif; line-height: 1.6; margin: 20px; max-width: 900px; }
        h1, h2, h3 { color: #2c3e50; }
        ul { margin-bottom: 20px; }
        li { margin-bottom: 10px; }
        .section { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #ccc; }
        .theme { font-style: italic; color: #34495e; }
    </style>
</head>
<body>

<h1><?php echo $dispensations['title']; ?></h1>
<p><?php echo $dispensations['overview']; ?></p>

<h2>1. Key Points</h2>
<ul>
<?php foreach ($dispensations['key_points'] as $point) {
    echo "<li>$point</li>";
} ?>
</ul>

<h2>2. Main Dispensations</h2>
<?php foreach ($dispensations['main_dispensations'] as $name => $details) { ?>
    <div class="section">
        <h3><?php echo $name; ?></h3>
        <p><strong>Time Period:</strong> <?php echo $details['time_period']; ?></p>
        <p><strong>Key Scriptures:</strong> <?php echo implode(", ", $details['key_scriptures']); ?></p>
        <p><strong>Description:</strong> <?php echo $details['description']; ?></p>
    </div>
<?php } ?>

<h2>3. Common Mistakes</h2>
<ul>
<?php foreach ($dispensations['common_mistakes'] as $mistake) {
    echo "<li>$mistake</li>";
} ?>
</ul>

<h2>4. Practical Application</h2>
<ul>
<?php foreach ($dispensations['practical_application'] as $action) {
    echo "<li>$action</li>";
} ?>
</ul>

<h2>5. Group Discussion Questions</h2>
<ul>
<?php foreach ($dispensations['group_discussion_questions'] as $question) {
    echo "<li>$question</li>";
} ?>
</ul>

</body>
</html>
