HEX
Server: Apache
System: Linux host.hizmetvakfi.org 4.18.0-553.16.1.el8_10.x86_64 #1 SMP Thu Aug 8 07:11:46 EDT 2024 x86_64
User: sinanpasha (1007)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/sinanpasha/public_html/risale/yeni/uye-ol.php
<?php
include ("include/uye-oturum.php");


// Formdan bilgileri çek.
$ad_soyad			= trim(strip_tags($_POST ["ad_soyad"]));
$email_adresi		= trim(strip_tags($_POST ["email_adresi"]));
$parola				= trim(strip_tags($_POST ["parola"]));
$cinsiyet			= $_POST ["cinsiyet"];
$guvenlik_kodu		= $_POST ["guvenlik_kodu"];
$uretilen_kod		= $_POST ["uretilen_kod"];
$adres				= trim(addslashes(strip_tags($_POST ["adres"])));
?>

<!doctype html>
<html lang="tr">
<head>
<meta charset="utf-8">
<title>Bil Soft Eticaret - Üye Ol</title>
<meta name="language" content="tr">
<meta name="description" content=" ">
<meta name="author" content="Bil Shop Eticaret Sitesi">
<meta name="robots" content="index,follow">
<meta name="Copyright" content="Tüm hakları Bil Shop Firmasına aittir.">
<link rel="stylesheet" type="text/css" href="css/stiller.css">
<link rel="stylesheet" type="text/css" href="font-awesome/css/font-awesome.css">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<!-- Responsive için gerekli Head kodu başladı -->
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/stiller-responsive.css">
<link rel="stylesheet" href="js/responsive-menu/slicknav.css">
<script src="js/responsive-menu/modernizr.min.js"></script>
<!-- Responsive için gerekli Head kodu bitti -->

</head>

<body>

<!-- ==================== Header Top ====================  -->
<?php
include("include/header-top.php");
?>

<!-- ==================== Wrapper Top ====================  -->
<div id="wrapper" class="sablon_width">
  <?php
  include ("include/header.php");
  ?>
  <div id="page_title">
    	<h1>ÜYE OL</h1>
    </div>
  <div id="page_content">
    <form name="uyelik" method="post" action="">
      <table width="100%" border="0" cellspacing="5" cellpadding="5">
              <tr>
                <td width="20%"><strong>Ad Soyad</strong></td>
                <td width="4%"><strong>:</strong></td>
                <td><input name="ad_soyad" type="text" id="ad_soyad" value="<?php echo $ad_soyad;?>" size="70" maxlength="50"></td>
              </tr>
              <tr>
                <td><strong>Email Adresi</strong></td>
                <td><strong>:</strong></td>
                <td><input name="email_adresi" type="text" id="email_adresi" value="<?php echo $email_adresi;?>" size="70" maxlength="50"></td>
              </tr>
              <tr>
                <td><strong>Parola</strong></td>
                <td><strong>:</strong></td>
                <td><input name="parola" type="text" id="parola" value="<?php echo $parola;?>" size="70" maxlength="10"></td>
              </tr>
              <tr>
                <td valign="top"><strong>Cinsiyet</strong></td>
                <td valign="top"><strong>:</strong></td>
                <td><p>
                  <label>
                    <input name="cinsiyet" type="radio" id="cinsiyet_0" value="Bay" <?php if ($cinsiyet=="Bay") { echo 'checked="CHECKED" '; } ?>>
                    Bay</label>
                  <br>
                  <label>
                    <input name="cinsiyet" type="radio" id="cinsiyet_1" value="Bayan" <?php if ($cinsiyet=="Bayan") { echo 'checked="CHECKED" '; } ?>>
                    Bayan</label>
                  <br>
                </p></td>
              </tr>
              <tr>
                <td valign="top"><strong>Adres</strong></td>
                <td valign="top"><strong>:</strong></td>
                <td><textarea name="adres" cols="70" rows="6" id="adres"><?php echo $adres;?></textarea></td>
              </tr>
              <tr>
                <td><strong>Güvenlik Kodu</strong></td>
                <td><strong>:</strong></td>
                <td><input name="guvenlik_kodu" type="text" id="guvenlilk_kodu" size="10" maxlength="5">
                <?php
				$kod		= substr(md5(rand (1000,9999)),10,5);
				echo "<span style='color:#F00;font-weight:bold'>$kod</span>";
				?>
				<input name="uretilen_kod" type="hidden" id="uretilen_kod" size="10" maxlength="5" value="<?php echo $kod;?>">                </td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td><input type="submit" name="button2" id="button" value="Üye Ol"></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>
                <?php
                if ($_POST ["button2"] ) {
				// Butona basılmış ise kontrolleri yap başladı
					if (mb_strlen($ad_soyad,"utf8")<5) {
						echo "Ad soyad gir";
					} elseif ($email_adresi=="") {
						echo "Email gir";
					} elseif (!$parola) {
						echo "Parola gir";
					} elseif ( empty($cinsiyet) ) {
						echo "Cinsiyet seç";
					} elseif (!$adres) {
						echo "Adres gir";
					} elseif (!$guvenlik_kodu) {
						echo "Güvenlk kodu gir";
					} elseif ($guvenlik_kodu != $uretilen_kod) {
						echo "HATA : Güvenlik kodu hatalı";
					} else {
					// Tüm bilgiler doğru girildiği için veritabanına kayıt başladı. Veritabanına kayıt için o email adresinin sistemde kayıtlı olmaması gerekir.
						$uye_sayisi		= mysql_num_rows(mysql_query("select * from uyeler where email_adresi='$email_adresi'"));
						
						if ($uye_sayisi==1) {
							echo "HATA : Üye sistemde kayıtlı";
						} else {
							$uye_ekle	= mysql_query("insert into uyeler set ad_soyad='$ad_soyad', email_adresi='$email_adresi', parola='$parola', cinsiyet='$cinsiyet', adres='$adres', durum='0' ");
							if ($uye_ekle) {
								echo "Üye eklendi";
								// Üye eklendi ise üyeye aktivasyon linki gönder
				include_once("smtp-email-gonder/class.phpmailer.php");
			
				$mail = new PHPMailer();
				$mail->IsSMTP();
				$mail->IsHTML(True);
				$mail->Host = "mail.phpkursum.com";
				$mail->SMTPAuth = true;
				$mail->Username = "[email protected]";
				$mail->Password = "Php1234";
				$mail->From = "[email protected]";
				$mail->Fromname = "phpkursum.com";
				
				$mail->AddAddress($email_adresi,"Mail gönderimi");
				
				$mail->Subject = "Phpkursum Üyelik Aktivasyonu";
				$mail->Body = "Sayın $ad_soyad üyeliğinizin aktif olması için linke tıklayınız. <br> 
<a href='http://phpkursum.com/bilshop/uyelik-aktivasyonu.php?email=$email_adresi'> Üyeliğimi aktif et </a> ";
			
				if(!$mail->Send()) {
				   echo '<font color="#F62217"><b>Gönderim Hatası: ' . $mail->ErrorInfo . '</b></font>';
				   exit;
				}
				echo "<center><b>Sayın $ad_soyad üyeliğiniz alındı. Lütfen $email_adresi email adresine gönderilen Aktivasyon Linkine tıklayınız.</b></center> ";
								// ---------------------------------------------
							} else {
								echo "HATA : Üye eklenemedi";
							}
						}
						
					
					// Tüm bilgiler doğru girildiği için veritabanına kayıt bitti
						
					}
				// Butona basılmış ise kontrolleri yap bitti	
				}				
				?>
                </td>
              </tr>
            </table>
          </form>
  </div>
  <?php
  include("include/adres.php");
  ?>    
</div>

<!-- ==================== Footer Bottom ====================  -->
<?php
include("include/footer.php");
?>


</body>
</html>