File size: 5.01Kb
<?
session_start();
$title="Техническая поддержка\n";
include ("header.php");
include ("func/translit.php");
include ("func/aut.php");
if ($mod=="add")
{
if (empty($message))
{
if ($_SESSION['wap']=="xml")
{
echo "<form action=\"support.php?mod=add&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo $div["ten"];
echo "<img src=\"pics/st.gif\" alt=\"*\"/>";echo "Вопрос: <br/>";
echo "<input name=\"message\" maxlength=\"250\" value=\"$msg_db\" title=\"Text\"/><br/>";
echo "<img src=\"pics/st.gif\" alt=\"*\"/>";echo "Введите число на картинке: ";echo "<img src=\"pic.php?".session_name()."=".session_id()."\" alt=\"...\"/><br/>";
echo "<input name=\"psw\" maxlength=\"5\" size=\"5\"/><br/>";
echo "<select multiple=\"multiple\" name=\"translit\">
<option value=\"1\">Транслит</option></select><br/>";
echo "<input class=\"ibutton\" type=\"submit\" value=\"Отправить\"/>";
echo $div["end"];;
echo "</form>";
}
else
{
echo "<img src=\"pics/st.gif\" alt=\"*\"/>";echo "Вопрос: <br/>";
echo "</small><input name=\"message".$ref."\" value=\"$msg_db\" maxlength=\"250\" title=\"Text\"/><br/><small>";
echo "<img src=\"pics/st.gif\" alt=\"*\"/>";echo "Введите число на картинке: ";echo "<img src=\"pic.php?".session_name()."=".session_id()."\" alt=\"...\"/><br/>";
echo "</small><input name=\"psw".$ref."\" maxlength=\"5\" size=\"5\"/><br/><small>";
echo "</small><select multiple=\"true\" name=\"translit\">
<option value=\"1\">Транслит</option></select><small><br/>";
echo "<anchor title=\"send\">Отправить<go href=\"support.php?mod=add&".session_name()."=".session_id()."&go=post\" method=\"post\">";
echo "<postfield name=\"message\" value=\"$(message".$ref.")\"/>";
echo "<postfield name=\"translit\" value=\"$(translit)\"/>";
echo "<postfield name=\"psw\" value=\"$(psw".$ref.")\"/>";
echo "</go></anchor><br/>";
}
}
else
{
echo $div["ten"];
if($_SESSION['pswd']!=$psw)
{
echo "Число на картинке не совпадает с введенным!<br/>";
echo "<img src=\"pics/st.gif\" alt=\"*\"/>";echo "<a href=\"support.php?".session_name()."=".session_id()."\">Поддержка</a><br/>";
echo "<img src=\"pics/st.gif\" alt=\"*\"/>";echo "<a href=\"enter.php?".session_name()."=".session_id()."\">Панель</a><br/>";
}
else
{
if($translit==1) $message=latrus($message);
@mysql_query("insert into `support` values(0,'".$autorize['id']."','$date','$message','');")or die ("FUCK");
$idt=mysql_insert_id();
echo "Тикет №$idt успешно создан. Ваш вопрос на обработке. Спасибо<br/>";
echo "<img src=\"pics/st.gif\" alt=\"*\"/>";echo "<a href=\"support.php?".session_name()."=".session_id()."\">Поддержка</a><br/>";
echo "<img src=\"pics/st.gif\" alt=\"*\"/>";echo "<a href=\"enter.php?".session_name()."=".session_id()."\">Панель</a><br/>";
echo $div["end"];
}
}
include ("footer.php");
exit();
}
echo $div["ten"];
if(empty($startan)) $startan = 0;
$startan=intval($startan);
if($startan<0) $startan=0; $num_msgs_an=5;
$arr = mysql_query("select * from `support`");
$qi = mysql_query("select * from `support` where `idc`='".$autorize['id']."' order by `id` desc limit $startan,$num_msgs_an;;");
if (mysql_affected_rows()==0)
{
echo "Не созданно ни одного тикета!<br/>";
}
else
{
while($row=mysql_fetch_array($qi))
{
echo "#".$row['id']." | ".$row['date']." |
".$row['msg']."<br/>";
echo ""; if (empty($row['ans'])) echo "в обработке...<br/>---<br/>"; else echo "<b>Ответ:</b> ".$row['ans']."<br/>---<br/>";
}
}
$i = @mysql_num_rows($arr);
if($startan!=0)
echo "<a href=\"support.php?".session_name()."=".session_id()."&startan=".($startan-$num_msgs_an)."\">".htmlspecialchars("<<--")."</a>] ";
if($i>$startan+$num_msgs_an)
echo "[<a href=\"support.php?".session_name()."=".session_id()."&startan=".($startan+$num_msgs_an)."\">".htmlspecialchars("-->>")."</a>";;
echo "<br/><img src=\"pics/st.gif\" alt=\"*\"/>";echo "<a href=\"support.php?mod=add&".session_name()."=".session_id()."\">Добавить тикет</a><br/>";
echo "<img src=\"pics/st.gif\" alt=\"*\"/>";echo "<a href=\"enter.php?".session_name()."=".session_id()."\">Панель</a><br/>";
echo $div["end"];
include ("footer.php");
?>