File root/index.php changed (mode: 100644) (index 65596f0..4a18a23) |
... |
... |
if ($rg['login_ui']['uid'] > 0) { |
156 |
156 |
|
|
157 |
157 |
$rg['HTML:rg_body'] = $body; |
$rg['HTML:rg_body'] = $body; |
158 |
158 |
// DEBUG: aici deja e busit content-ul! Merg inapoi pe fir. |
// DEBUG: aici deja e busit content-ul! Merg inapoi pe fir. |
159 |
|
echo rg_template("index.html", $rg, TRUE /* xss */); |
|
|
159 |
|
$_c = rg_template("index.html", $rg, TRUE /* xss */); |
|
160 |
|
|
|
161 |
|
header('Cache-Control: private, no-cache'); |
|
162 |
|
|
|
163 |
|
// Caching |
|
164 |
|
$we_have = sha1($_c); |
|
165 |
|
if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) |
|
166 |
|
$client_have = $_SERVER['HTTP_IF_NONE_MATCH']; |
|
167 |
|
else |
|
168 |
|
$client_have = ''; |
|
169 |
|
|
|
170 |
|
if (strcmp($client_have, $we_have) == 0) { |
|
171 |
|
rg_log('Client has the right version'); |
|
172 |
|
header('HTTP/1.1 304 Not modified'); |
|
173 |
|
header('ETag: ' . $we_have); |
|
174 |
|
} else { |
|
175 |
|
rg_log('Client has NOT the right version [' . $client_have . ']'); |
|
176 |
|
header('ETag: ' . $we_have); |
|
177 |
|
echo $_c; |
|
178 |
|
} |
160 |
179 |
|
|
161 |
180 |
rg_prof_end("MAIN"); |
rg_prof_end("MAIN"); |
162 |
181 |
rg_prof_log(); |
rg_prof_log(); |