Location: PHPKode > projects > A-Dater Pro - Online Dating Script > a-dater-pro-online-dating-script/includes/vaat.php
<?php
/*
  ******************************************************
  ***   A-Dater Pro        Version 2                 ***
  ***   File name          vaat.php                  ***
  ***   Script Owner       Alfacom Systems           ***
  ***   Script Homepage    www.a-dater.com           ***
  ***   Licence Terms      www.a-dater.com/licence   ***
  ***                                                ***
  ***   You need to purchase a license if you want   ***
  ***   to use this script with ads or without the   ***
  ***   reference to www.a-dater.com                 ***
  ******************************************************
*/

  include('includes/include_check.php');


  if(isset($_SESSION['id']) && isset($_GET['leht'])){

    if($_GET['leht'] == 'pilt'){

      if(isset($_GET['id'])){

        $selectPic = mysql_query("SELECT kasutaja_id FROM pildid WHERE id = ".$_GET['id']);

	  $rowPic = mysql_fetch_assoc($selectPic);

	  $selectUser = mysql_query("SELECT id FROM kasutajad WHERE id = ".(int)$rowPic['kasutaja_id']);

	  if(mysql_num_rows($selectUser)){

          $rowUser = mysql_fetch_assoc($selectUser);

          if($rowUser['id'] != $_SESSION['id']){

  	        mysql_insert('vaat', $_SESSION['id'], (int)$rowUser['id']);

          }

	  }

      }

    }

    else{

      if(isset($_GET['id'])){

 	  $selectUser = mysql_query("SELECT id FROM kasutajad WHERE id = ".(int)$_GET['id']);

	  if(mysql_num_rows($selectUser)){

	  	if($_GET['id'] != $_SESSION['id']){

  	    mysql_insert('vaat', $_SESSION['id'], (int)$_GET['id']);

	  	}

	  }

      }

    }

  }

?>
Return current item: A-Dater Pro - Online Dating Script