uacyberarenatv
Новичок
Создал скрипт в котором инфа с form, записывается через POST в txt файл.
Было что-то типа этого
<?php
if (isset($_POST['map'])) {
$file=fopen("D:\\1\\cstrike\\1.cfg","w");
fwrite($file,"changelevel ".$_POST['map']."
exec ".$_POST['gamemode'].".cfg");
header("Location: http://127.0.0.1//gameee.php");
}
?>
<form name="f" id="form_f" method="post">
...
</form>
Но теперь мне надл это перенисти в CMS в .tpl файл.
Он вот такой
{include file='header.tpl' showWhiteBack=true}
<h1>{$aLang.mix_create}:</h1>
<form method=post>
{if ($_aRequest.mix_modify)}<div style="display:none">{/if}
<p>
<select name="mix_type" style="width: 50%" onchange="if(this.value==3 || $('mix_play').getStyle('display')=='none') $('mix_play').toggle();">
<option value="1" {if ($_aRequest.mix_type == 1)}selected{/if}>{$aLang.mix_cs16}</option>
<option value="2" {if ($_aRequest.mix_type == 2)}selected{/if}>{$aLang.mix_css}</option>
<option value="3" {if ($_aRequest.mix_type == 3)}selected{/if}>{$aLang.mix_brush}</option>
</select><br>
<span class="form_note">{$aLang.mix_select_type}</span>
</p>
<p id="mix_play" {if ($_aRequest.mix_type == 3)}style="display: none;"{/if}>
<select name="mix_play" style="width: 50%;">
<option value="1" {if ($_aRequest.mix_play == 1)}selected{/if}>{$aLang.mix_1x1}</option>
<option value="2" {if ($_aRequest.mix_play == 2)}selected{/if}>{$aLang.mix_2x2}</option>
<option value="3" {if ($_aRequest.mix_play == 3)}selected{/if}>{$aLang.mix_3x3}</option>
<option value="4" {if ($_aRequest.mix_play == 4)}selected{/if}>{$aLang.mix_4x4}</option>
<option value="5" {if ($_aRequest.mix_play == 5)}selected{/if}>{$aLang.mix_5x5}</option>
</select><br/>
</form>
{include file='footer.tpl'}
Как сюда в писать что бы кроме действий внутри плагина некоторая инфа записывалась и в TXT файл
Пробовал так же поставить пхп скрипт перед всем, но либо эррор либо просто не пишет в файл.
Было что-то типа этого
<?php
if (isset($_POST['map'])) {
$file=fopen("D:\\1\\cstrike\\1.cfg","w");
fwrite($file,"changelevel ".$_POST['map']."
exec ".$_POST['gamemode'].".cfg");
header("Location: http://127.0.0.1//gameee.php");
}
?>
<form name="f" id="form_f" method="post">
...
</form>
Но теперь мне надл это перенисти в CMS в .tpl файл.
Он вот такой
{include file='header.tpl' showWhiteBack=true}
<h1>{$aLang.mix_create}:</h1>
<form method=post>
{if ($_aRequest.mix_modify)}<div style="display:none">{/if}
<p>
<select name="mix_type" style="width: 50%" onchange="if(this.value==3 || $('mix_play').getStyle('display')=='none') $('mix_play').toggle();">
<option value="1" {if ($_aRequest.mix_type == 1)}selected{/if}>{$aLang.mix_cs16}</option>
<option value="2" {if ($_aRequest.mix_type == 2)}selected{/if}>{$aLang.mix_css}</option>
<option value="3" {if ($_aRequest.mix_type == 3)}selected{/if}>{$aLang.mix_brush}</option>
</select><br>
<span class="form_note">{$aLang.mix_select_type}</span>
</p>
<p id="mix_play" {if ($_aRequest.mix_type == 3)}style="display: none;"{/if}>
<select name="mix_play" style="width: 50%;">
<option value="1" {if ($_aRequest.mix_play == 1)}selected{/if}>{$aLang.mix_1x1}</option>
<option value="2" {if ($_aRequest.mix_play == 2)}selected{/if}>{$aLang.mix_2x2}</option>
<option value="3" {if ($_aRequest.mix_play == 3)}selected{/if}>{$aLang.mix_3x3}</option>
<option value="4" {if ($_aRequest.mix_play == 4)}selected{/if}>{$aLang.mix_4x4}</option>
<option value="5" {if ($_aRequest.mix_play == 5)}selected{/if}>{$aLang.mix_5x5}</option>
</select><br/>
</form>
{include file='footer.tpl'}
Как сюда в писать что бы кроме действий внутри плагина некоторая инфа записывалась и в TXT файл
Пробовал так же поставить пхп скрипт перед всем, но либо эррор либо просто не пишет в файл.