mysqli and login for pattern-summary.php
mysqli and login for template-*.php