<?php
require_once"../../template/start.php";
require_once"../../template/regglobals.php";
require_once"../../template/config.php";
require_once"../../template/siti_conf.php";
require_once"../../template/functions.php";
require_once"../../template/antidos.php";
require_once"../../template/cookies.php";
require_once"../../template/gzip.php";
require_once"../../template/header.php";
require_once"../../template/referer.php";
include_once"../../themes/$config_themes/index.php";
include_once"../../template/isset.php";
if ($provlog==$_SESSION['log'] && $provpar==md5($_SESSION['par']) && $_SESSION['log']!="" && md5($_SESSION['par'])!="") {
if ($dostup==101 && $log==$config_nikname){

echo'<div class=a><img src="../../images/img/partners.gif" alt=""> <b>Аукционы</b></div><br><br>';
	
if(!isset($action)){
echo'<img src="../../images/img/forums.gif" alt=""> <a href="aukcion.php?action=reltor&amp;'.SID.'">Аукцион нед-ти №1</a><br>';
echo'<img src="../../images/img/forums.gif" alt=""> <a href="aukcion.php?action=reltor1&amp;'.SID.'">Аукцион нед-ти №2</a><br>';
echo'<br>-------------------------------<br>';
}
$siti_g = file(BASEDIR."local/navigator/conf/reltor.dat"); 
$siti_reltor = explode("|",$siti_g[0]);	
$siti_12 = file(BASEDIR."local/navigator/conf/aukned.dat"); 
$siti_aukned = explode("|",$siti_12[0]);
if($action=="reltor"){
	
echo '<b>Аукцион нед-ти №1</b><br>';
if($siti_reltor[0]!==$siti_aukned[0]){		
echo '<form method="post" action="aukcion.php?action=relter&amp;'.SID.'">';
echo ''.$siti_reltor[0].'<input type="hidden" name="conf_reltor1" value="'.$siti_reltor[0].'"/>
<br><input type="hidden" name="conf_reltor2" value="11.jpg"/>
<img src="../dom/11.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[1].'" /><br><input value="Ok" type="submit" /></form>';}
if($siti_reltor[2]!==$siti_aukned[0]){
echo '<form method="post" action="aukcion.php?action=relter&amp;'.SID.'">';	
echo ''.$siti_reltor[2].'<input type="hidden" name="conf_reltor1" value="'.$siti_reltor[2].'"/><input type="hidden" name="conf_reltor2" value="22.jpg"/><br><img src="../dom/22.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[3].'" /><br><input value="Ok" type="submit" /></form>';}
if($siti_reltor[4]!==$siti_aukned[0]){
echo '<form method="post" action="aukcion.php?action=relter&amp;'.SID.'">';
echo ''.$siti_reltor[4].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[4].'"/><input type="hidden" name="conf_reltor2" value="66.jpg"/><img src="../dom/66.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[5].'" /><br><input value="Ok" type="submit" /></form>';}
if($siti_reltor[6]!==$siti_aukned[0]){
echo '<form method="post" action="aukcion.php?action=relter&amp;'.SID.'">';
echo ''.$siti_reltor[6].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[6].'"/><input type="hidden" name="conf_reltor2" value="99.jpg"/><img src="../dom/99.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[7].'" /><br><input value="Ok" type="submit" /></form>';}

if($siti_reltor[8]!==$siti_aukned[0]){
echo '<form method="post" action="aukcion.php?action=relter&amp;'.SID.'">';
echo ''.$siti_reltor[8].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[8].'"/><input type="hidden" name="conf_reltor2" value="33.jpg"/><img src="../dom/33.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[9].'" /><br><input value="Ok" type="submit" /></form>';}

if($siti_reltor[10]!==$siti_aukned[0]){
echo '<form method="post" action="aukcion.php?action=relter&amp;'.SID.'">';
echo ''.$siti_reltor[10].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[10].'"/><input type="hidden" name="conf_reltor2" value="44.jpg"/><img src="../dom/44.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[11].'" /><br><input value="Ok" type="submit" /></form>';}

if($siti_reltor[12]!==$siti_aukned[0]){
echo '<form method="post" action="aukcion.php?action=relter&amp;'.SID.'">';
echo ''.$siti_reltor[12].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[12].'"/><input type="hidden" name="conf_reltor2" value="55.jpg"/><img src="../dom/55.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[13].'" /><br><input value="Ok" type="submit" /></form><hr>';}
echo '<br><img src="../../images/img/back.gif" alt=""> <a href="aukcion.php?'.SID.'">Вернуться</a>';}
if($action=="reltor1"){
if($siti_reltor[14]!==$siti_aukned[3]){
echo '<form method="post" action="aukcion.php?action=relter1&amp;'.SID.'">';
echo ''.$siti_reltor[14].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[14].'"/><input type="hidden" name="conf_reltor2" value="88.jpg"/><img src="../dom/88.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[15].'" /><br><input value="Ok" type="submit" /></form>';}

if($siti_reltor[16]!==$siti_aukned[3]){
echo '<form method="post" action="aukcion.php?action=relter1&amp;'.SID.'">';
echo ''.$siti_reltor[16].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[16].'"/><input type="hidden" name="conf_reltor2" value="77.jpg"/><img src="../dom/77.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[17].'" /><<br>input value="Ok" type="submit" /></form>';}

if($siti_reltor[18]!==$siti_aukned[3]){
echo '<form method="post" action="aukcion.php?action=relter1&amp;'.SID.'">';
echo ''.$siti_reltor[18].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[18].'"/><input type="hidden" name="conf_reltor2" value="bil.jpg"/><img src="../dom/bil.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[19].'" /><br><input value="Ok" type="submit" /></form>';}

if($siti_reltor[20]!==$siti_aukned[3]){
echo '<form method="post" action="aukcion.php?action=relter1&amp;'.SID.'">';
echo ''.$siti_reltor[20].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[20].'"/><input type="hidden" name="conf_reltor2" value="ttt.jpg"/><img src="../dom/ttt.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[21].'" /><br><input value="Ok" type="submit" /></form>';}

if($siti_reltor[22]!==$siti_aukned[3]){
echo '<form method="post" action="aukcion.php?action=relter1&amp;'.SID.'">';
echo ''.$siti_reltor[22].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[22].'"/><input type="hidden" name="conf_reltor2" value="1111.jpg"/><img src="../dom/1111.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[23].'" /><br><input value="Ok" type="submit" /></form>';}

if($siti_reltor[24]!==$siti_aukned[3]){
echo '<form method="post" action="aukcion.php?action=relter1&amp;'.SID.'">';
echo ''.$siti_reltor[24].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[24].'"/><input type="hidden" name="conf_reltor2" value="2222.jpg"/><img src="../dom/2222.jpg" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[25].'" /><br><input value="Ok" type="submit" /></form>';}
if($siti_reltor[26]!==$siti_aukned[3]){
echo '<form method="post" action="aukcion.php?action=relter1&amp;'.SID.'">';
echo ''.$siti_reltor[26].'<br><input type="hidden" name="conf_reltor1" value="'.$siti_reltor[26].'"/><input type="hidden" name="conf_reltor2" value="3333.gif"/><img src="../dom/3333.gif" alt=""><br>Стартовая цена:<br><input name="conf_reltor" maxlength="20" value="'.$siti_reltor[27].'" /><br><input value="OK" type="submit" /></form><hr>';}
echo '<br><img src="../../images/img/back.gif" alt=""> <a href="aukcion.php?'.SID.'">Вернуться</a>';
}
//---------------------- Изменение основных настроек ------------------------------//
if($action=="relter1"){
$uf = file(BASEDIR."local/navigator/conf/aukned.dat"); 
$ud = explode("|",$uf[0]);
$ud[3]=check($conf_reltor1);
$ud[4]=$conf_reltor2;
$ud[5]=$conf_reltor;
for ($u=0; $u<$siti_reltr; $u++){
$utext.=$ud[$u].'|';}
$fp=fopen(BASEDIR."local/navigator/conf/aukned.dat","a+");    
flock($fp,LOCK_EX);           
ftruncate($fp,0);                                                                
fputs($fp,$utext);
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);  
unset($utext);

if(eregi("[^0-9]",$conf_reltor)){echo'Ошибка!!! Вводить только цифры!<br>';
require_once"../themes/$config_themes/foot.php";exit;}	
$ufile = file(BASEDIR."local/profil/Kopilka.prof"); 
$udata = explode(":||:",$ufile[0]);
$udata[54]=$conf_reltor;
$udata[53]="Стартовая";
for ($u=0; $u<$config_userprofkey; $u++){
$utext.=$udata[$u].':||:';}
if($udata[0]!="" && $udata[1]!="" && $udata[4]!="" && $utext!=""){
$fp=fopen(BASEDIR."local/profil/Kopilka.prof","a+");  
flock ($fp,LOCK_EX); 
ftruncate ($fp,0);                                                              
fputs($fp,$utext);
fflush ($fp);
flock ($fp,LOCK_UN);
fclose($fp);  
unset($utext);}
 
header ("Location: aukcion.php?isset=mp_yesset&".SID);}

if($action=="relter"){
$uf = file(BASEDIR."local/navigator/conf/aukned.dat"); 
$ud = explode("|",$uf[0]);
$ud[0]=check($conf_reltor1);
$ud[1]=$conf_reltor2;
$ud[2]=check($conf_reltor);
for ($u=0; $u<$siti_reltr; $u++){
$utext.=$ud[$u].'|';}
$fp=fopen(BASEDIR."local/navigator/conf/aukned.dat","a+");    
flock($fp,LOCK_EX);           
ftruncate($fp,0);                                                                
fputs($fp,$utext);
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);  
unset($utext);

if(eregi("[^0-9]",$conf_reltor)){echo'Ошибка!!! Вводить только цифры!<br>';
require_once"../themes/$config_themes/foot.php";exit;}	
$ufile = file(BASEDIR."local/profil/Kopilka.prof"); 
$udata = explode(":||:",$ufile[0]);
$udata[7]=$conf_reltor;
$udata[20]="Стартовая";
for ($u=0; $u<$config_userprofkey; $u++){
$utext.=$udata[$u].':||:';}
if($udata[0]!="" && $udata[1]!="" && $udata[4]!="" && $utext!=""){
$fp=fopen(BASEDIR."local/profil/Kopilka.prof","a+");  
flock ($fp,LOCK_EX); 
ftruncate ($fp,0);                                                              
fputs($fp,$utext);
fflush ($fp);
flock ($fp,LOCK_UN);
fclose($fp);  
unset($utext);}
 
header ("Location: aukcion.php?isset=mp_yesset&".SID);}

echo'<br><img src="../../images/img/panel.gif" alt=""> <a href="setting.php?'.SID.'">В настройки</a><br>';
echo'<img src="../../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">В город</a><br>';
} else {header ("Location: ../index.php?error&".SID);}
} else {header ("Location: ../index.php?error&".SID);}

include_once"../../themes/$config_themes/foot.php";



