File size: 9,126 Bytes
016c9d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fca8bb8
 
016c9d7
 
 
 
 
 
 
 
 
 
 
fca8bb8
 
016c9d7
 
 
 
 
 
 
 
 
 
 
fca8bb8
 
016c9d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
```php
<?php 
$pageTitle = "Dashboard";
require_once 'includes/header.php'; 
?>

<div class="flex justify-between items-center mb-8">
    <h1 class="text-3xl font-bold text-gray-800">Dashboard Overview</h1>
    <div class="flex space-x-4">
        <button class="px-4 py-2 bg-indigo-600 text-white rounded-lg flex items-center space-x-2">
            <i data-feather="plus"></i>
            <span>Add Product</span>
        </button>
        <button class="px-4 py-2 bg-green-600 text-white rounded-lg flex items-center space-x-2">
            <i data-feather="shopping-cart"></i>
            <span>New Order</span>
        </button>
    </div>
</div>

<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
    <div class="bg-white p-6 rounded-xl shadow-sm border-l-4 border-blue-500">
        <div class="flex justify-between items-start">
            <div>
                <p class="text-gray-500">Total Products</p>
                <h2 class="text-3xl font-bold mt-2">1,248</h2>
            </div>
            <div class="p-3 bg-blue-100 rounded-lg">
                <i data-feather="box" class="text-blue-600"></i>
            </div>
        </div>
    </div>

    <div class="bg-white p-6 rounded-xl shadow-sm border-l-4 border-red-500">
        <div class="flex justify-between items-start">
            <div>
                <p class="text-gray-500">Low Stock Items</p>
                <h2 class="text-3xl font-bold mt-2">47</h2>
            </div>
            <div class="p-3 bg-red-100 rounded-lg">
                <i data-feather="alert-triangle" class="text-red-600"></i>
            </div>
        </div>
    </div>

    <div class="bg-white p-6 rounded-xl shadow-sm border-l-4 border-yellow-500">
        <div class="flex justify-between items-start">
            <div>
                <p class="text-gray-500">Expiring Soon</p>
                <h2 class="text-3xl font-bold mt-2">23</h2>
            </div>
            <div class="p-3 bg-yellow-100 rounded-lg">
                <i data-feather="clock" class="text-yellow-600"></i>
            </div>
        </div>
    </div>

    <div class="bg-white p-6 rounded-xl shadow-sm border-l-4 border-green-500">
        <div class="flex justify-between items-start">
            <div>
                <p class="text-gray-500">Today's Sales</p>
                <h2 class="text-3xl font-bold mt-2">$3,245</h2>
            </div>
            <div class="p-3 bg-green-100 rounded-lg">
                <i data-feather="dollar-sign" class="text-green-600"></i>
            </div>
        </div>
    </div>
</div>

<!-- Recent Activities -->
<div class="bg-white p-6 rounded-xl shadow-sm mb-8">
    <div class="flex justify-between items-center mb-6">
        <h2 class="text-xl font-semibold text-gray-800">Recent Activities</h2>
        <a href="#" class="text-indigo-600 hover:underline">View All</a>
    </div>
    <div class="space-y-4">
        <div class="flex items-start space-x-4">
            <div class="p-2 bg-indigo-100 rounded-full">
                <i data-feather="package" class="text-indigo-600"></i>
            </div>
            <div>
                <p class="font-medium">New stock received for Royal Canin Puppy</p>
                <p class="text-sm text-gray-500">Batch #RC-2023-08-15 (50 units) added to inventory</p>
                <p class="text-xs text-gray-400 mt-1">2 hours ago</p>
            </div>
        </div>
        <div class="flex items-start space-x-4">
            <div class="p-2 bg-yellow-100 rounded-full">
                <i data-feather="alert-triangle" class="text-yellow-600"></i>
            </div>
            <div>
                <p class="font-medium">Low stock alert for Tetra Fish Flakes</p>
                <p class="text-sm text-gray-500">Only 5 units remaining (threshold: 10)</p>
                <p class="text-xs text-gray-400 mt-1">5 hours ago</p>
            </div>
        </div>
        <div class="flex items-start space-x-4">
            <div class="p-2 bg-red-100 rounded-full">
                <i data-feather="x-circle" class="text-red-600"></i>
            </div>
            <div>
                <p class="font-medium">Expired items removed</p>
                <p class="text-sm text-gray-500">3 units of Whiskas Senior Cat Food (Batch #WS-2022-12-01) disposed</p>
                <p class="text-xs text-gray-400 mt-1">Yesterday</p>
            </div>
        </div>
    </div>
</div>

<!-- Quick Actions -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
    <div class="bg-white p-6 rounded-xl shadow-sm">
        <h2 class="text-xl font-semibold text-gray-800 mb-4">Quick Actions</h2>
        <div class="grid grid-cols-2 gap-4">
            <a href="#" class="p-4 border rounded-lg hover:bg-gray-50 flex flex-col items-center">
                <div class="p-3 bg-green-100 rounded-full mb-2">
                    <i data-feather="plus-circle" class="text-green-600"></i>
                </div>
                <span class="text-sm font-medium">Add Product</span>
            </a>
            <a href="#" class="p-4 border rounded-lg hover:bg-gray-50 flex flex-col items-center">
                <div class="p-3 bg-blue-100 rounded-full mb-2">
                    <i data-feather="truck" class="text-blue-600"></i>
                </div>
                <span class="text-sm font-medium">Receive Stock</span>
            </a>
            <a href="#" class="p-4 border rounded-lg hover:bg-gray-50 flex flex-col items-center">
                <div class="p-3 bg-purple-100 rounded-full mb-2">
                    <i data-feather="file-text" class="text-purple-600"></i>
                </div>
                <span class="text-sm font-medium">Generate Report</span>
            </a>
            <a href="#" class="p-4 border rounded-lg hover:bg-gray-50 flex flex-col items-center">
                <div class="p-3 bg-yellow-100 rounded-full mb-2">
                    <i data-feather="bell" class="text-yellow-600"></i>
                </div>
                <span class="text-sm font-medium">View Alerts</span>
            </a>
        </div>
    </div>

    <div class="bg-white p-6 rounded-xl shadow-sm">
        <h2 class="text-xl font-semibold text-gray-800 mb-4">Expiring Soon</h2>
        <div class="space-y-4">
            <div class="flex justify-between items-center">
                <div class="flex items-center space-x-3">
                    <img src="http://static.photos/pets/80x80/1" alt="Product" class="w-10 h-10 rounded-md object-cover">
<div>
                        <p class="font-medium">Royal Canin Adult Cat</p>
                        <p class="text-sm text-gray-500">Batch #RC-2023-05-12</p>
                    </div>
                </div>
                <div class="text-right">
                    <p class="text-yellow-600 font-medium">Expires in 5 days</p>
                    <p class="text-sm text-gray-500">12 units remaining</p>
                </div>
            </div>
            <div class="flex justify-between items-center">
                <div class="flex items-center space-x-3">
                    <img src="http://static.photos/pets/80x80/2" alt="Product" class="w-10 h-10 rounded-md object-cover">
<div>
                        <p class="font-medium">TetraMin Tropical Flakes</p>
                        <p class="text-sm text-gray-500">Batch #TT-2023-06-01</p>
                    </div>
                </div>
                <div class="text-right">
                    <p class="text-yellow-600 font-medium">Expires in 7 days</p>
                    <p class="text-sm text-gray-500">8 units remaining</p>
                </div>
            </div>
            <div class="flex justify-between items-center">
                <div class="flex items-center space-x-3">
                    <img src="http://static.photos/pets/80x80/3" alt="Product" class="w-10 h-10 rounded-md object-cover">
<div>
                        <p class="font-medium">Whiskas Chicken Wet Food</p>
                        <p class="text-sm text-gray-500">Batch #WC-2023-05-30</p>
                    </div>
                </div>
                <div class="text-right">
                    <p class="text-red-600 font-medium">Expires in 2 days</p>
                    <p class="text-sm text-gray-500">15 units remaining</p>
                </div>
            </div>
        </div>
    </div>
</div>

<?php require_once 'includes/footer.php'; ?>
```

The changes include:
1. Converted index.html to index.php
2. Created header.php and footer.php includes files
3. Set up a proper PHP template structure with variable page titles
4. Kept all the existing functionality while making it work with PHP
5. Maintained the same styling and JavaScript functionality

You can now create additional pages by following the same pattern - create a new PHP file, set the $pageTitle, include the header, add your content, and include the footer. The navigation and sidebar will work the same way across all pages.
___METADATA_START___
{"repoId":"ctrlplus-zai/purrfect-pantry-pro","isNew":false,"userName":"ctrlplus-zai"}
___METADATA_END___