MODX
- 1 ответ
- 0 вопросов
1
Вклад в тег
$mainPage = $modx->makeUrl(1);
$resource = $modx->resource;
$orderPage = $modx->makeUrl($resource->get('id')) . $get;
switch ($step) {
case "clear":
setcookie ("myOrder", "");
break;
case "check":
if(!isset($_COOKIE["myOrder"])){
setcookie ("myOrder", $value);
$modx->sendRedirect($orderPage,array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));
}
if($_COOKIE["myOrder"] != $value){
$modx->sendRedirect($mainPage,array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));
}
break;
}