czy ten skrypt zalicza się do skryptu zgodnego z wzorcami MVC?
Funkcje hexpass oraz safe email są w innym pliku pokazuje je tylko dla tego tematu
<?php function safeEmail($str) { $pattern = '/^[a-zA-Z0-9.-_]+@[a-z0-9]+.([a-z]+){2,4}$/'; { return false; } else { return true; } } function hexPass($str) { return $str; } class LoginModel { { $result=@mysql_fetch_assoc(mysql_query("SELECT id FROM players WHERE email='".safeEmail($email)."' AND pass='".hexPass($pass)."'")); } } Class LoginView { { $tpl->assign('actionFile', $actionFile); $tpl->parse('login.tpl'); } } class LoginController { { $test=LoginModel::getData($email, $pass); if ($test == false) { return false; } else { return $test['id']; } } } ?>