Просмотр файла txtban/forum/readmess.php

Размер файла: 10.36Kb
<?

require "conf.php";
$agent=$HTTP_USER_AGENT;
$conn=mysql_connect(my_host, my_user, my_password);
mysql_select_db(my_db, $conn);









header("Content-Type: text/vnd.wap.wml; charset=utf-8");
header("Cache-Control: no-cache"); 
echo '<?xml version="1.0" encoding="utf-8"?>';
echo '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
   "http://www.wapforum.org/DTD/wml1.2.dtd">';





if(isset($HTTP_GET_VARS['UIN']))
{
$UIN=$HTTP_GET_VARS['UIN'];
}
else
{
$UIN="Guest";
}

$UINmd5=$UIN;




if(isset($HTTP_GET_VARS['pass']))

{

$pass=$HTTP_GET_VARS['pass'];

}

else

{

$pass="Guest";

}

$ee="&#x0427;&#x0438;&#x0442;&#x0430;&#x0442;&#x044C; &#x0441;&#x043D;&#x0430;&#x0447;&#x0430;&#x043B;&#x0430;";
$ee=translate($ee);

$hh="&#x041A; &#x043E;&#x043A;&#x043E;&#x043D;&#x0447;&#x0430;&#x043D;&#x0438;&#x044E;";
$hh=translate($hh);


if(isset($HTTP_GET_VARS['sort']))
{
$sort=$HTTP_GET_VARS['sort'];
}
else
{
$sort=0;
}




$sql=("select * from `index` where id='$UIN'");
$res=mysql_query($sql);
$row=mysql_fetch_object($res);
if (isset($row->setting_forum))
{
$setting_forum=$row->setting_forum;
}
else
{
$setting_forum=5;
}
if (isset($row->setting_forum))
{
$setting_forum=$row->setting_forum;
}
else
{
$setting_forum=5;
}







if(isset($HTTP_GET_VARS['next_row']))
{
$next_row=$HTTP_GET_VARS['next_row'];
}
else
{
$sql4=("select prosm from topic where id='$topic'");
$result4=mysql_query($sql4);
$row4=mysql_fetch_object($result4);
$prosm=$row4->prosm;
$prosm2=$prosm+1;


$sql5="update topic set prosm='$prosm2' where id='$topic'";
mysql_query($sql5);
$next_row=0;
}
$next2=$next_row+$setting_forum;
$next3=$next_row-$setting_forum;

$sql=("select `admin` from `index` where id='$UIN'");
$res=mysql_query($sql);
$row=mysql_fetch_object($res);
$admin=$row->admin;
if ($pass!=$row->pass)
{
$UIN="Guest";
}

$sql33=("select * from `topic` where id='$topic' order by id desc");

$result33=mysql_query($sql33);
$row33=mysql_fetch_object($result33);

$name3333=$row33->name;




echo '<wml>';
echo '<head>';
echo '<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>';
echo '</head>';
?><card id="forjjum" title="&#x0427;&#x0438;&#x0442;&#x0430;&#x0442;&#x044C;">

<?  
if ($UIN!="Guest")
{
?>

<do name="a2" type="options" label = "&#x041D;&#x0430;&#x043F;&#x0438;&#x0441;&#x0430;&#x0442;&#x044C;"><go href="nmess.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;id=<?=$topic?>&amp;room=<?=$room?>"/></do>

<?
}
?>


<do name="afghfg" type="options" label = "&#x0414;&#x0430;&#x043B;&#x044C;&#x0448;&#x0435;"><go href="readmess.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;next_row=<?=$next2?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>&amp;user=<?=$user?>"/></do>
<?
 if ($sort==1)
{
?>
<do name="asdfsd2" type="options" label = "<?=$hh?>"><go href="readmess.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>"/></do>
<?
}
else
{
?>
<do name="asdfsd7ty2" type="options" label = "<?=$ee?>"><go href="readmess.php?sort=1&amp;UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>"/></do>
<?
}
/*if ($admin==1)
{

$adres=strtok($row->date," ");
$site="http://$adres";
?>
<do name="a33rdt3" type="options" label="&#x0423;&#x0434;&#x0430;&#x043B;&#x0438;&#x0442;&#x044C; &#x0442;&#x043E;&#x043F;&#x0438;&#x043A;"><go href="dellmess.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>"/></do>
<do name="a333" type="options" label="&#x0417;&#x0430;&#x0435;&#x0431;&#x0430;&#x043D;&#x0438;&#x0442;&#x044C;"><go href="ban.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;user=<?=$user?>&amp;topic=<?=$topic?>"/></do>

<?
}

if ($admin==2)
{
$sql=("select * from forum where topic=$topic order by topic desc $next_row, $setting_forum");
$adres=strtok($row->date," ");
$site="http://$adres";
?>
<do name="a333ffg3" type="options" label="&#x0423;&#x0434;&#x0430;&#x043B;&#x0438;&#x0442;&#x044C; &#x0442;&#x043E;&#x043F;&#x0438;&#x043A;"><go href="dellmess.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>"/></do>
<?
}
?>
<do name="a23232" type="options" label = "&#x041A; &#x0440;&#x0430;&#x0437;&#x0434;&#x0435;&#x043B;&#x0443;"><go href="forum.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;room=<?=$room?>"/></do>
<do name="a243543" type="options" label = "&#x0424;&#x043E;&#x0440;&#x0443;&#x043C;"><go href="index.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>"/></do>
<?
            


*/





echo '<p>';





$sql=("select * from forum where topic=$topic order by id desc limit $next_row, $setting_forum");



$result=mysql_query($sql);
while ($row=mysql_fetch_object($result))
{







$message=$row->message;
/*if ($setting_trans==1)
{
$message=ereg_replace("h","?", $message);
$message=ereg_replace("a","?", $message);
$message=ereg_replace("b","?", $message);
$message=ereg_replace("v","?", $message);
$message=ereg_replace("g","?", $message);
$message=ereg_replace("d","?", $message);
$message=ereg_replace("e","?", $message);
$message=ereg_replace("z","?", $message);
$message=ereg_replace("xx","?", $message);
$message=ereg_replace("i","?", $message);
$message=ereg_replace("j","?", $message);
$message=ereg_replace("k","?", $message);
$message=ereg_replace("l","?", $message);
$message=ereg_replace("m","?", $message);
$message=ereg_replace("n","?", $message);
$message=ereg_replace("o","?", $message);
$message=ereg_replace("p","?", $message);
$message=ereg_replace("r","?", $message);
$message=ereg_replace("s","?", $message);
$message=ereg_replace("t","?", $message);
$message=ereg_replace("u","?", $message);
$message=ereg_replace("f","?", $message);
$message=ereg_replace("c","?", $message);
$message=ereg_replace("?","?", $message);
$message=ereg_replace("?","?", $message);
$message=ereg_replace("y?","?", $message);
$message=ereg_replace("x","?", $message);
$message=ereg_replace("y?","?", $message);
$message=ereg_replace("y?","?", $message);
$message=ereg_replace("q","?", $message);
$message=ereg_replace("?","?", $message);
$message=ereg_replace("xxx","zzz", $message);





$message=ereg_replace("Q","?", $message);
$message=ereg_replace("H","?", $message);
$message=ereg_replace("A","?", $message);
$message=ereg_replace("B","?", $message);
$message=ereg_replace("V","?", $message);
$message=ereg_replace("G","?", $message);
$message=ereg_replace("D","?", $message);
$message=ereg_replace("E","?", $message);
$message=ereg_replace("Z","?", $message);
$message=ereg_replace("?","?", $message);
$message=ereg_replace("I","?", $message);
$message=ereg_replace("J","?", $message);
$message=ereg_replace("K","?", $message);
$message=ereg_replace("L","?", $message);
$message=ereg_replace("M","?", $message);
$message=ereg_replace("N","?", $message);
$message=ereg_replace("O","?", $message);
$message=ereg_replace("P","?", $message);
$message=ereg_replace("R","?", $message);
$message=ereg_replace("S","?", $message);
$message=ereg_replace("T","?", $message);
$message=ereg_replace("U","?", $message);
$message=ereg_replace("F","?", $message);
$message=ereg_replace("C","?", $message);
$message=ereg_replace("?","?", $message);
$message=ereg_replace("?","?", $message);
$message=ereg_replace("Y?","?", $message);
$message=ereg_replace("X","?", $message);
$message=ereg_replace("Y?","?", $message);
$message=ereg_replace("Y?","?", $message);
$message=ereg_replace("?","?", $message);

$message=ereg_replace(" $", " backs", $message);
$message=htmlspecialchars($message);
$message=eregi_replace("&amp;?;","&gt;", $message);
$message=eregi_replace("&amp;?;","&lt;", $message);
$message=eregi_replace("&amp;??;","&quot;", $message);
$message=eregi_replace("&amp;??","&amp;", $message);
*/





$message=translate($message);


$adres=strtok($row->date," ");
$site="http://$adres";

?>
<a href="user.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>&amp;user=<?=$site?>"><?=$name2?>
<?echo ' ';?>
<?=$row->date?></a><br/>
<?=$message?><br/>
<br/>
<?
$next_row=$next_row+1;
}

    ?>
<small><a href="nmess.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;id=<?=$topic?>&amp;room=<?=$room?>">&#x041D;&#x0430;&#x043F;&#x0438;&#x0441;&#x0430;&#x0442;&#x044C;</a><br/></small>
<?

?>

 
<small><a href="readmess.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;next_row=<?=$next2?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>&amp;user=<?=$user?>">&#x0414;&#x0430;&#x043B;&#x044C;&#x0448;&#x0435;</a><br/>  </small>
<small><a href="readmess.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;next_row=<?=$next3?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>&amp;user=<?=$user?>">Ha&#x0437;a&#x0434;</a><br/>  </small>
<small><a href="nomer.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>&amp;user=<?=$user?>">&#x041F;&#x0435;&#x0440;&#x0435;&#x0439;&#x0442;&#x0438; &#x043A; &#x041D;&#x043E;&#x043C;&#x0435;&#x0440;&#x0443;</a><br/>  </small>
<?
/* if ($sort==1)
{ 
?>
<small><a href="readmess.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>"><?=$hh?></a><br/>  </small>
<?
}
else
{
?>
<small><a href="readmess.php?sort=1&amp;UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>"><?=$ee?></a><br/>  </small>
}*/ 
?>
<?

if ($admin==1)
{
?>
<small>***<br/><a href="dellmess.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>">&#x0423;&#x0434;a&#x043B;&#x0438;&#x0442;&#x044C; Te&#x043C;y</a><br/>  </small>
<small><a href="ban.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;user=<?=$user?>&amp;topic=<?=$topic?>">&#x0417;a&#x0431;a&#x043D;&#x0438;&#x0442;&#x044C;</a><br/> ***<br/> </small>

<?
}

if ($admin==2)
{
?>
<small>***<br/><a href="dellmess.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;topic=<?=$topic?>&amp;room=<?=$room?>">&#x0423;&#x0434;a&#x043B;&#x0438;&#x0442;&#x044C; Te&#x043C;y</a><br/> ***<br/> </small>
<?
}
?>
<small><a href="forum.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>&amp;room=<?=$room?>">&#x041A; &#x0440;&#x0430;&#x0437;&#x0434;&#x0435;&#x043B;&#x0443;</a><br/>  </small>
<small><a href="index.php?UIN=<?=$UINmd5?>&amp;pass=<?=$pass?>">&#x0424;&#x043E;&#x0440;&#x0443;&#x043C;</a><br/>  </small>

<small><a href="../apanel.php?id=<?=$UINmd5?>&amp;pass=<?=$pass?>">B &#x041F;a&#x043D;e&#x043B;&#x044C;</a><br/></small>

</p>
</card>
</wml>