PHP Classes

File: getpreferences.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.Moïse   PHP Mnemonic Secret Path Login   getpreferences.php   Download  
File: getpreferences.php
Role: Auxiliary script
Content type: text/plain
Description: auxilliary script
Class: PHP Mnemonic Secret Path Login
Detect human users telling to click on page places
Author: By
Last change:
Date: 6 years ago
Size: 1,523 bytes
 

Contents

Class file image Download
<?php
        $query
=$bdd->prepare('SELECT user_preference,default_ctcpic
         FROM users
         WHERE user_id =:identity'
);
       
$query->bindValue(':identity',$_SESSION['user_id'],PDO::PARAM_STR);
       
$query->execute();
       
$data=$query->fetch();
       
$query->CloseCursor();
        if(
$data['default_ctcpic']){
            echo
' <img src="'.$data['default_ctcpic'].'" class="preview2" />';
        }
        else{
           
            if(
$ct==1){
               
$req=$bdd->prepare('
                UPDATE users SET
                user_preference=:user_preference
                WHERE user_id=:user_id'
);
               
$req->bindValue(':user_id',$_SESSION["user_id"],PDO::PARAM_INT);
               
$req->bindValue(':user_preference',0,PDO::PARAM_STR);
               
$req->execute();
               
$req->CloseCursor();
               
$tr=true;
                echo
'<div id="float"> normal, only keyboard password</div>';
            }
        }
        switch(
$data['user_preference']){
                case
'0':
                if(!isset(
$tr)) echo'<div id="float"> normal, only keyboard password</div>';
                break;
                case
'1':
                if(!isset(
$tr)) echo'<div id="float">Only click to connect password</div>';
                break;
                case
'2':
                if(!isset(
$tr)) echo'<div id="float">Both click to connect and keyboard passwords</div>';
                break;
                case
'3':
                if(!isset(
$tr)) echo'<div id="float">only random click to connect password</div>';
                break;
                case
'4':
                if(!isset(
$tr)) echo'<div id="float">Both random click to connect<br/> and keyboard passwords</div>';
                break;
                default:
                if(!isset(
$tr)) echo'<div id="float">Undefined</div>';
                break;
            }
       
   

?>