<?php
include("require.php");
echo "<wml><card title='用户登录 - 多彩贴吧'>\n";
echo "<p>\n";
echo "<img src='logo.gif'/>";
echo "</p>\n";
echo "<p>\n";
echo "<a href='index.php'>首页</a> ";
echo "<a href='user.php'>登录</a>";
echo " <a href='class.php'>分类</a>";
echo "</p>\n";
echo "<p>\n";
echo "<input name='barname' value=''/>\n";
echo "<anchor>进入贴吧";
echo "<go href='post.php' method='post' accept-charset='utf-8'>";
echo "<postfield name='action' value='gobar'/>";
echo "<postfield id='barname' name='barname' value='$(barname)'/>";
echo "</go>";
echo "</anchor>";
echo "</p>\n";
if(isset($_COOKIE["core_user_name"]))
{
  echo "<p>\n";
  echo "您已经成功登录贴吧";
  echo "</p>\n";
  echo "</card></wml>";
  exit();
}
echo "<p>\n";
echo "帐号:<input name='username' value=''/>\n";
echo "</p>\n";
echo "<p>\n";
echo "密码:<input name='pwd' value=''/>\n";
echo "</p>\n";
echo "<p>\n";
echo "<anchor>登陆";
echo "<go href='post.php' method='post'>";
echo "<postfield name='action' value='login'/>";
echo "<postfield id='username' name='username' value='$(username)'/>";
echo "<postfield id='pwd' name='pwd' value='$(pwd)'/>";
echo "</go>";
echo "</anchor>";
echo "</p>\n";
echo "</card></wml>";
?>