Location: PHPKode > scripts > Report Manger > report-manger/AddUser.php
<?php
	require('config.php');
	require_once('Auth.php');
	require_once('classMySql.php');
	$Uid = $_SESSION["uid"] ;
	$mydbnew = new db_mysql($locaaal,$useeer,$paaass,$dataaabase);
	print "<p align=\"right\" dir=\"rtl\">شما با نام کاربری " . "<b>" . $Uid . "</b> وارد شده اید<br>";
        $value=$Uid;
        $sql = "select PN,Permission from logins where (UserId = '$value');";
        $result2=mysql_query($sql);
        $show=mysql_fetch_row($result2);
        print "گروهی که شما در فعالیت می کنید :" . "<b>" . $show[0] . "<B><br><br></p>";
	echo("<meta http-equiv=Content-Type content=\"text/html; charset=utf-8\">");
        echo("<LINK href=\"style/style.css\" rel=stylesheet>");
	if ( empty($_POST["Uid"]) )
	{
?>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
<meta name="Athur" content="Ali Hosseini" Email="hide@address.com">
<LINK href="style/style.css" rel=stylesheet>
<TITLE>افزودن کاربر جدید</TITLE>
</head>
<BODY>
<center>
  <TABLE border="1" bordercolor="#000000" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="70%" id="AutoNumber1" height="102">
    <tr>
      <TD width="80%" background="images/top_01_1.gif" height="41" align="right">
      <?php
    switch ($show[1]){
        case "0";
        echo "<A href=\"sh_active.php\"><img src=\"images/top_activity.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"sh_trouble.php\"><img src=\"images/top_troubles.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"super_admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"Super_admin_EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "1";
        echo "<A href=\"admin_Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "2";
        echo "<A href=\"Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
    }
    ?>
    </tr>
    <TR>
      <TD bgcolor="#ffffff" align="center"><FONT size="5" color="#000000">مقداری برای نام کاربری مشخص نشده است</FONT></TD>
    </TR>
    <tr>
      <TD width="80%" height="19" background="images/bottom_bg.gif">&nbsp;</TD>
    </tr>
  </TABLE>
<BR>
<?php print ("$a0d61f8370cad1d412f80b84d143e1257$ad95679752134a2d9eb61dbd7b91c4bcc$a83878c91171338902e0fe0fb97a8c47a$a415290769594460e2e485922904f345d$a4b43b0aee35624cd95b910189b3dc231$a865c0c0b4ab0e063e5caa3387c1a8741$ab2f5ff47436671b6e533d8dc3614845d$a2510c39011c5be704182423e3a695e91$ae358efa489f58062f10dd7316b65649e  $a92eb5ffee6ae2fec3ad71c777531578f$a415290769594460e2e485922904f345d  $a7fc56270e7a70fa81a5935b72eacbe29$a865c0c0b4ab0e063e5caa3387c1a8741$a4a8a08f09d37b73795649038408b5f33$ae358efa489f58062f10dd7316b65649e$a4a8a08f09d37b73795649038408b5f33") ?></center>
<?php
	die('</body></html>') ;
	}
		if ( ($_POST["Uid"]!=$_GET["Uid"]) || (empty($_GET["Uid"])) )
	{
		$mydbn = new db_mysql($locaaal,$useeer,$paaass,$dataaabase);
		$mydbn->select("`UserId`,`FullName`","`logins`","1 AND `UserId` LIKE '$Id'");
		$myar = $mydbn->fetch_row();
		if ( !empty($myar[0]) )  {
?>
<center>
  <TABLE border="1" bordercolor="#000000" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="70%" id="AutoNumber1" height="102">
    <tr>
      <TD width="80%" background="images/top_01_1.gif" height="41" align="right">
      <?php
    switch ($show[1]){
        case "0";
        echo "<A href=\"sh_active.php\"><img src=\"images/top_activity.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"sh_trouble.php\"><img src=\"images/top_troubles.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"super_admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"Super_admin_EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "1";
        echo "<A href=\"admin_Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "2";
        echo "<A href=\"Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
    }
    ?>
    </tr>
    <TR>
      <TD bgcolor="#ffffff" align="center"><FONT size="5" color="#000000">این نام کاربری قبلا وارد شده است</FONT></TD>
    </TR>
    <tr>
      <TD width="80%" height="19" background="images/bottom_bg.gif">&nbsp;</TD>
    </tr>
  </TABLE><BR>
<?php print ("$a0d61f8370cad1d412f80b84d143e1257$ad95679752134a2d9eb61dbd7b91c4bcc$a83878c91171338902e0fe0fb97a8c47a$a415290769594460e2e485922904f345d$a4b43b0aee35624cd95b910189b3dc231$a865c0c0b4ab0e063e5caa3387c1a8741$ab2f5ff47436671b6e533d8dc3614845d$a2510c39011c5be704182423e3a695e91$ae358efa489f58062f10dd7316b65649e  $a92eb5ffee6ae2fec3ad71c777531578f$a415290769594460e2e485922904f345d  $a7fc56270e7a70fa81a5935b72eacbe29$a865c0c0b4ab0e063e5caa3387c1a8741$a4a8a08f09d37b73795649038408b5f33$ae358efa489f58062f10dd7316b65649e$a4a8a08f09d37b73795649038408b5f33") ?></center>
<?php
	die('</body></html>') ;		
		}
	}
if ( isset($_GET["id"]) )
{
$Name = $_POST['Name'] ; $Uid = $_POST['Uid'] ; $FullName = $_POST['FullName'] ;
$mydbn->update("logins" , "`Name` = '$Name' , `FullName` = '$FullName'" ," 1 AND `UserId` LIKE '$Uid' ") ;
}
else
{
$Name = $_POST['Name'] ; $Uid = $_POST['Uid'] ; $FullName = $_POST['FullName'] ;
$mydbn->insert("logins","`UserId`,`Name`,`FullName`,`Permission`,`email`,`PN`","'$Uid','$Name','$FullName','$permote','$email','$PN'") ;
}
?>
<center>
  <TABLE border="1" bordercolor="#000000" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="70%" id="AutoNumber1" height="102">
    <tr>
      <TD width="80%" background="images/top_01_1.gif" height="41" align="right">
      <?php
    switch ($show[1]){
        case "0";
        echo "<A href=\"sh_active.php\"><img src=\"images/top_activity.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"sh_trouble.php\"><img src=\"images/top_troubles.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"super_admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"Super_admin_EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "1";
        echo "<A href=\"admin_Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
	      <A href=\"admin.php\"><img src=\"images/top_reports.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"EdittingUsers.php\"><img src=\"images/eidt_user.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
        case "2";
        echo "<A href=\"Sender.php\"><img src=\"images/top_send.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"ChangePass.php\"><img src=\"images/chpass.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              <A href=\"LogOut.php\"><IMG src=\"images/logout_on.gif\" width=\"44\" height=\"41\" border=\"0\"></A>
              </TD>";
        break;
    }
    ?>
    </tr>
    <TR>
      <TD bgcolor="#ffffff" align="center"><FONT color="#000000" size="5">عملیات با موفقیت به پایان رسید</FONT></TD>
    </TR>
    <tr>
      <TD width="80%" height="19" background="images/bottom_bg.gif">&nbsp;</TD>
    </tr>
  </TABLE>
<BR>
<?php print ("$a0d61f8370cad1d412f80b84d143e1257$ad95679752134a2d9eb61dbd7b91c4bcc$a83878c91171338902e0fe0fb97a8c47a$a415290769594460e2e485922904f345d$a4b43b0aee35624cd95b910189b3dc231$a865c0c0b4ab0e063e5caa3387c1a8741$ab2f5ff47436671b6e533d8dc3614845d$a2510c39011c5be704182423e3a695e91$ae358efa489f58062f10dd7316b65649e  $a92eb5ffee6ae2fec3ad71c777531578f$a415290769594460e2e485922904f345d  $a7fc56270e7a70fa81a5935b72eacbe29$a865c0c0b4ab0e063e5caa3387c1a8741$a4a8a08f09d37b73795649038408b5f33$ae358efa489f58062f10dd7316b65649e$a4a8a08f09d37b73795649038408b5f33") ?><BR>
</center>
</BODY>
</HTML>
Return current item: Report Manger