Location: PHPKode > projects > proManager > proman/www/edit_account.php

require "inc/init.php";
require "inc/small_functions.php";

$post_vars = array(
include "import_vars_post.inc";

#$get_vars = array('task_id','note_id');
#include "import_vars_get.inc";

  if ($cancel) {
    header ("Location: home.php");

  // validate data

  $name = AddSlashes(StripSlashes($name));
  $username = AddSlashes(StripSlashes($username));
  $password = AddSlashes(StripSlashes($password));
  $password2 = AddSlashes(StripSlashes($password2));

  // Silly hacking attempt

  if (!$user_id) Header ("Location: index.php");

  // verify if passwords match

  if ("$password" != "$password2") $error = $strThepasswordsdontmatch;

  // verify if username doesnt exist

     $error = $strThatusernameisalreadybeingused;

  // if we get parameters (without any error messages)
  // save them and head to home.php

  if ($name && $username && !$error)
    Header ("Location: home.php");

  } else {

    if (!$name && !$username && !$password && !$email) {
      GetUserInfo($user_id, $name, $d, $d, $username, $password, $email);

<title><? echo $strEditaccount;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<? if ($charset) print $charset; else print "ISO-8859-1"; ?>">
<link href="css/pman.css" rel="stylesheet" type="text/css">
<body bgcolor=<? print $bgcolorEditAccount; ?>>
<table width=100% height=100%>
      <td width=30% valign=middle align=center>
          <form method=post>

    if ($error) $error = "\n<p align=center><font color=#FF0000>$error</font></p>\n";

    $content = "
        <br><div align=center>$error
        $strRealname: <input type=text name=name value=\"$name\" size=25><br>
        $strUsername: <input type=text name=username value=\"$username\" size=16><br>
        $strPassword: <input type=password name=password value=\"$password\" size=16><br>
        $strConfirmpassword: <input type=password name=password2 size=16><br><br>
        $strEmail: <input type=text name=email value=\"$email\" size=30><br><br>
        <input type=submit value=\"$strSave\">&nbsp;
        <input type=submit name=cancel value=\"$strCancel\"><br>

    $title = $strEditaccount;
    $color = $boxcolorEditAccount;
    $plus = "width=45%";

    include "templates/box.php";

Return current item: proManager