<?php
if(isset($_GET["func"])){
if (($_GET["func"])=='predefined_functions')
{ header("Location: http://syntax.xtgem.com/manual/basics/functions/"); }
elseif ((!$_GET["func"]))
{ header("Location: http://syntax.xtgem.com/manual/basics/"); }
}
 ?>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta name="robots" content="noindex , nofollow" />
<xt:code><!--parser:xtscript-->
get func
assign $space= call chr $val=32
assign $heading = call str_replace $subject=$func; $search=_ ; $replace=$space
<!--/parser:xtscript--></xt:code>
    <title>{_$$heading|Xt Script}</title>
</head>
<body>
    <div data-xtcontainer="navigation" class="xt_navigation" style="text-align: center;"><xt:code><a href="/manual/basics/functions/">Functions index</a></xt:code></div>
    <div data-xtcontainer="container" class="xt_container"><xt:code><h2 style="text-align: center;margin:0 auto">
{_$$heading|Xt Script}
</h2></xt:code></div><div class="xt_container" data-xtcontainer="desc" style="text-align: left;"><xt:code><b><!--parser:xtscript-->
  call source $file=function_description/{_$func|default};$html_safe=1;$nl2br=1;$space2nbsp=0
<!--/parser:xtscript--></b></xt:code></div><div class="xt_container notranslate" data-xtcontainer="syntax" style="text-align: left;"><xt:text><b style="display:block;text-align: center;">[...] = optional  ... = your value</b></xt:text><br /><xt:code><!--parser:xtscript-->
call source $file=function_syntax/{_$func|default};$html_safe=1;$nl2br=1;$space2nbsp=0
<!--/parser:xtscript--> </xt:code></div><div class="xt_container notranslate" data-xtcontainer="example" style="text-align: left;"><xt:code><!--parser:xtscript-->
call source $file=function_examples/{_$func|}.xt;$html_safe=1;$nl2br=1;$space2nbsp=0
<!--/parser:xtscript--></xt:code></div><div class="xt_container notranslate" data-xtcontainer="result" style="text-align: left;"><xt:code><!--parser:xtscript-->
include function_examples/{_$func|}.xt
<!--/parser:xtscript--></xt:code></div>
<?php 
$func=$_GET ['func'];
if ( file_exists ('function_extras/'.$func)){
include "function_extras/$func";}
?><div class="xt_container" data-xtcontainer="also see" style="text-align: center;"><xt:text><b>Also see</b></xt:text><br /><xt:code><!--parser:xtscript-->
call source $file=function_also_see/{_$func|};$html_safe=0;$nl2br=1;$space2nbsp=0
<!--/parser:xtscript--></xt:code><xt:code><xt:include file="/manual/basics/functions/footer" /></xt:code></div>
</body>
</html>
