Şimdi Ara

Acil Projem İçin yardım

Bu Konudaki Kullanıcılar:
1 Misafir - 1 Masaüstü
5 sn
1
Cevap
0
Favori
429
Tıklama
Daha Fazla
İstatistik
  • Konu İstatistikleri Yükleniyor
0 oy
Öne Çıkar
Sayfa: 1
Giriş
Mesaj
  • Arkadaslar elimde tc no dogrulama fonksıyonu var fakat bunu nasıl kullanacagım ? nereye yerlestırıcem? asagıda fonksıyonu ve sıte kodlarımı paylasıyorum yardımcı olursanız mınnettar lkalırım.

    bu tc dogrulama kodu:
    function isTcKimlik($tc)   
    {
    if(strlen($tc) < 11){ return false; }
    if($tc[0] == '0'){ return false; }
    $plus = ($tc[0] + $tc[2] + $tc[4] + $tc[6] + $tc[8]) * 7;
    $minus = $plus - ($tc[1] + $tc[3] + $tc[5] + $tc[7]);
    $mod = $minus % 10;
    if($mod != $tc[9]){ return false; }
    $all = '';
    for($i = 0 ; $i < 10 ; $i++){ $all += $tc[$i]; }
    if($all % 10 != $tc[10]){ return false; }

    return true;
    }


    buda benım uye ol sayfası kodlarım:
    <?php require_once('Connections/hastanedb.php'); ?> 
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
    {
    if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
    }

    $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
    break;
    }
    return $theValue;
    }
    }

    // *** Redirect if username exists
    $MM_flag="MM_insert";
    if (isset($_POST[$MM_flag])) {
    $MM_dupKeyRedirect="tc_var_uyari.php";
    $loginUsername = $_POST['uyetcno'];
    $LoginRS__query = sprintf("SELECT uyetcno FROM uyeler WHERE uyetcno=%s", GetSQLValueString($loginUsername, "text"));
    mysql_select_db($database_hastanedb, $hastanedb);
    $LoginRS=mysql_query($LoginRS__query, $hastanedb) or die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);

    //if there is a row in the database, the username was found - can not add the requested username
    if($loginFoundUser){
    $MM_qsChar = "?";
    //append the username to the redirect page
    if (substr_count($MM_dupKeyRedirect,"?") >=1) $MM_qsChar = "&";
    $MM_dupKeyRedirect = $MM_dupKeyRedirect . $MM_qsChar ."requsername=".$loginUsername;
    header ("Location: $MM_dupKeyRedirect");
    exit;
    }
    }

    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    }
    ?>


    <?php


    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form3")) {
    $insertSQL = sprintf("INSERT INTO uyeler (uyeadi, uyesoyadi, uyetcno, uyesifre, uyeadres, uyeil, uyeilce, uyecinsiyet, uyeemail) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
    GetSQLValueString($_POST['uyeadi'], "text"),
    GetSQLValueString($_POST['uyesoyadi'], "text"),
    GetSQLValueString($_POST['uyetcno'], "text"),
    GetSQLValueString($_POST['uyesifre'], "text"),
    GetSQLValueString($_POST['uyeadres'], "text"),
    GetSQLValueString($_POST['uyeil'], "text"),
    GetSQLValueString($_POST['uyeilce'], "text"),
    GetSQLValueString($_POST['uyecinsiyet'], "text"),
    GetSQLValueString($_POST['uyeemail'], "text"));

    mysql_select_db($database_hastanedb, $hastanedb);
    $Result1 = mysql_query($insertSQL, $hastanedb) or die(mysql_error());


    $insertGoTo = "index.php";
    if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
    }
    header(sprintf("Location: %s", $insertGoTo));
    }
    ?>

    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
    session_start();
    }

    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
    $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    }

    if (isset($_POST['uyetcno'])) {
    $loginUsername=$_POST['uyetcno'];
    $password=$_POST['uyesifre'];
    $MM_fldUserAuthorization = "";
    $MM_redirectLoginSuccess = "index.php";
    $MM_redirectLoginFailed = "login.php";
    $MM_redirecttoReferrer = true;
    mysql_select_db($database_hastanedb, $hastanedb);

    $LoginRS__query=sprintf("SELECT uyetcno, uyesifre FROM uyeler WHERE uyetcno=%s AND uyesifre=%s",
    GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));

    $LoginRS = mysql_query($LoginRS__query, $hastanedb) or die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);
    if ($loginFoundUser) {
    $loginStrGroup = "";

    if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
    //declare two session variables and assign them
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;

    if (isset($_SESSION['PrevUrl']) && true) {
    $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
    }
    header("Location: " . $MM_redirectLoginSuccess );
    }
    else {
    header("Location: ". $MM_redirectLoginFailed );
    }
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>kaganozturk.com</title>

    <style type="text/css">
    #sayfa {
    height: auto;
    width: 1050px;
    margin-top: 0px;
    margin-right: auto;
    margin-bottom: auto;
    margin-left: auto;
    }
    .footeryazisi {
    font-family: "MS Serif", "New York", serif;
    font-weight: bold;
    font-size: 14px;
    font-style: italic;
    color: #000;
    margin-right: auto;
    margin-left: auto;
    width: auto;
    text-align: center;
    }
    #sayfa #dugme ul .dugmeli a {
    text-decoration: none;
    }
    #banner {
    height: 130px;
    width: 980px;
    margin-top: 5px;
    margin-right: auto;
    margin-left: auto;
    }
    #clear1 {
    float: left;
    }
    #dugme {
    height: auto;
    width: 1000px;
    margin-top: 10px;
    margin-right: auto;
    margin-left: auto;
    }
    #sayfa #dugme ul {
    display: block;
    list-style-image: none;
    list-style-type: none;
    width: 958px;
    height: 30px;
    margin: 0px;
    }
    #sayfa #dugme ul li {
    float: left;
    list-style-image: none;
    list-style-type: none;
    width: 152px;
    text-align: center;
    height: 25px;
    padding-top: 5px;
    border-right-width: thin;
    border-right-style: solid;
    border-right-color: #FFF;
    }
    .dugmeli {
    background-image: url(resimler/butonarkaplan.jpg);
    background-repeat: repeat;
    font-family: Tahoma, Geneva, sans-serif;
    font-weight: bold;
    font-size: 12px;
    color: #0D014D;
    }
    #orta {
    height: auto;
    width: 1000px;
    margin-top: 10px;
    margin-right: auto;
    margin-bottom: auto;
    margin-left: auto;
    }
    #solmenu {
    float: left;
    width: 200px;
    margin-top: 10px;
    margin-bottom: auto;
    margin-left: 10px;
    }
    #slider {
    float: right;
    width: 770px;
    margin-top: 10px;
    margin-right: 10px;
    margin-bottom: auto;
    }
    #clear2 {
    width: auto;
    margin-right: auto;
    margin-left: auto;
    }
    #footer {
    height: 30px;
    width: 1000px;
    margin-top: 10px;
    margin-right: auto;
    margin-left: auto;
    }
    #sayfa #dugme ul .dugmeli:hover {
    font-family: "Times New Roman", Times, serif;
    font-size: 14px;
    color: #FFF;
    background-image: url(resimler/hover%20arka%20plan.jpg);
    background-repeat: repeat;
    }
    #sayfa #orta #form1 table {
    font-family: "Times New Roman", Times, serif;
    font-weight: bold;
    color: #006;
    background-color: #82D7F6;
    text-align: center;
    margin-right: auto;
    margin-left: auto;
    margin-top: 10px;
    margin-bottom: 10px;
    }
    #ortasag {
    float: left;
    margin-top: 10px;
    margin-right: auto;
    margin-bottom: 10px;
    margin-left: 10px;
    }
    #ortasolaslindasag {
    float: right;
    margin-top: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    margin-left: auto;
    }
    #sayfa #orta #ortasolaslindasag #form3 table {
    font-family: "Times New Roman", Times, serif;
    font-weight: bold;
    color: #006;
    text-align: center;
    margin: 10px;
    background-color: #79D3F6;
    }
    </style>

    </head>

    <body style="background-image: url(resimler/ArkaplanTPIENSCXHM81606JSOXDMIBWG60042.jpg); background-color: #D4D0C8;">
    <div id="sayfa">
    <div id="banner"><img src="resimler/banner.jpg" width="980" height="130" /></div>
    <div id="clear1"></div>
    <div id="dugme">
    <ul>
    <li class="dugmeli">Anasayfa</li>
    <li class="dugmeli">Hakkımızda</li>
    <li class="dugmeli">Doktorlarımız</li>
    <li class="dugmeli">İletişim</li>
    <li class="dugmeli">Bilgilerim</li>
    <li class="dugmeli">ÇIKIŞ</li>
    </ul>
    </div>
    <div id="orta">
    <div id="ortasag">
    echo $loginFormAction; ?>">
    <table width="241" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td> </td>
    <td>Üye Giriş Formu</td>
    </tr>
    <tr>
    <td width="179">T.C Numaranız:</td>
    <td width="62"><label for="uyetcno"></label>
    <input name="uyetcno" type="text" id="uyetcno" maxlength="11" /></td>
    </tr>
    <tr>
    <td>Şifreniz:</td>
    <td><label for="uyesifre"></label>
    <input type="password" name="uyesifre" id="uyesifre" /></td>
    </tr>
    <tr>
    <td> </td>
    <td><input type="submit" name="button" id="button" value="Giriş Yap" /></td>
    </tr>
    </table>
    </form>
    </div>
    <div id="ortasolaslindasag">
    <form action="<?php echo $editFormAction; ?>" method="post" name="form3" id="form3">
    <table align="center">
    <tr valign="baseline">
    <td nowrap="nowrap" align="right"> </td>
    <td>Üye Ol Formu</td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">Adınız:</td>
    <td><input type="text" name="uyeadi" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">Soyadınız:</td>
    <td><input type="text" name="uyesoyadi" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">T.C Numaranız:</td>
    <td><input name="uyetcno" type="text" value="" size="32" maxlength="11" /></td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">Şifreniz:</td>
    <td><input type="password" name="uyesifre" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">Adresiniz:</td>
    <td><input type="text" name="uyeadres" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">İl:</td>
    <td><input type="text" name="uyeil" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">İlçe:</td>
    <td><input type="text" name="uyeilce" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">Cinsiyet:</td>
    <td><input type="text" name="uyecinsiyet" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
    <td nowrap="nowrap" align="right">E-Mail:</td>
    <td><input type="text" name="uyeemail" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
    <td align="right" nowrap="nowrap"><input type="reset" name="button2" id="button2" value="Sıfırla" /></td>
    <td align="right" nowrap="nowrap"><input type="submit" value="Üye Ol" /></td>
    </tr>
    </table>
    <input type="hidden" name="MM_insert" value="form3" />
    </form>
    </div>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    </div>
    <div id="clear2"></div>
    <div class="footeryazisi" id="footer"> TÜM HAKLARI SAKLIDIR - www.kaganozturk.com</div>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    </div>

    </body>
    </html>







  • 
Sayfa: 1
- x
Bildirim
mesajınız kopyalandı (ctrl+v) yapıştırmak istediğiniz yere yapıştırabilirsiniz.