php if isset _SERVER HTTP_X_PJAX echo head title Portal undergame net

  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
<?php
if(!isset($_SERVER['HTTP_X_PJAX']))
{
echo "
<head>
<title>Portal undergame.net</title>
<script src='js/jquery.js'></script>
<script src='js/jquery.cookie.js'></script>
<script src='js/pages.js'></script>
<script src='js/jquery.pjax.js'></script>
<script src='js/jquery.mousewheel.js'></script>
<script src='js/jquery.jscrollpane.min.js'></script>
<script src='js/mwheelIntent.js'></script>
<script src='js/menu.js'></script>
<script src='js/resizer.js'></script>
<script type='text/javascript'>
$(document).pjax('[data-pjax] a, a[data-pjax]', '#main'); //pjaxConfiguration
$(document).on('pjax:send', function() {
$('#loading_mark').css('display', 'block');
});
$(document).on('pjax:complete', function() {
$('#loading_mark').css('display', 'none');
});
$(document).on('pjax:beforeReplace', function() {
$('#main').css('display', 'none');
$('#main').fadeIn(750);
});
$(document).on('pjax:success', function() { //scroll
$(function()
{
$('.scroll-pane').jScrollPane();
});
});
$(document).on('pjax:error', function() {
console.log('pjax:error');
});
</script>
<script type='text/javascript'>
$(function()
{
$(window).on('resize', fix_size);
$('.scroll-pane').jScrollPane(); //scroll
enableMenuAnimantio('#menu_1'); //menu
enableMenuAnimantio('#menu_2');
enableMenuAnimantio('#menu_3');
enableMenuAnimantio('#menu_4');
});
</script>
<link rel='stylesheet' type='text/css' href='styles/page.css'>
<link rel='stylesheet' type='text/css' href='styles/menu.css'>
<link rel='stylesheet' type='text/css' href='styles/jquery.jscrollpane.css' media='all' />
</head>
<body>
<header>
<div id='logo'><img src='/images/logo.png' id='logo_picture'></div></div>
<div id=menu_line>
<div id='css-menu'>
<ul>
<li id='menu_1'><a data-pjax href='/'>
Главная
</a></li>
<li id='menu_2' class='css-menu-central'><a data-pjax href='/'>
Поиск кооператива
</a</li>
<li id='menu_3' class='css-menu-central'><a data-pjax href='/'>
Аккаунт
</a></li>
<li id='menu_4' class='css-menu-central'><a data-pjax href='/'>
Наша система
</a></li>
</ul>
</div>
</div>
</header>
<div id='loading_mark'></div>
<div id='main'>
<div id='text_1' class='text_block scroll-pane'>
<p>First half-transparent text box. <br> Second line. <br> Third line.</p>
<p>Next paragraph</p>
<p>First half-transparent text box. <br> Second line. <br> Third line.</p>
</div>
</div>
<div id='bottom_page'><a href='/'>Blabla Corporation</a></div>
</body>
<script type='text/javascript'>
fix_size() //fix fize for window after loading page
</script>"; }
else
{ echo "<div id='text_1' class='text_block scroll-pane'>
<p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p>
<p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p> <p>I got header!</p>
</div>"; }
?>