This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function generatePassword($length=9, $strength=0) { | |
| $vowels = 'aeuy'; | |
| $consonants = 'bdghjmnpqrstvz'; | |
| if ($strength >= 1) { | |
| $consonants .= 'BDGHJLMNPQRSTVWXZ'; | |
| } | |
| if ($strength >= 2) { | |
| $vowels .= "AEUY"; | |
| } | |
| if ($strength >= 4) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $username = "your_name"; | |
| $password = "your_password"; | |
| $hostname = "localhost"; | |
| //connection to the database | |
| $dbhandle = mysql_connect($hostname, $username, $password) | |
| or die("Unable to connect to MySQL"); | |
| echo "Connected to MySQL<br>"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| functions.php | |
| <?php | |
| function loggedIn(){ | |
| //Session logged is set if the user is logged in | |
| //set it on 1 if the user has successfully logged in | |
| //if it wasn't set create a login form | |
| if(!$_SESSION['loggd']){ | |
| echo'<form action="checkLogin.php" method="post"> | |
| <p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setTimeout( function() { | |
| jQuery('#loading_mask').hide(); | |
| }, 1000 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var dd = $('dd'); | |
| dd.filter(':nth-child(n+4)').addClass('hide'); | |
| $('dt').on('click',function(){ | |
| $(this) | |
| .next() | |
| .slideDown('fast') | |
| .siblings('dd') | |
| .slideUp('fast'); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| input { | |
| -moz-border-radius: 4px; | |
| -webkit-border-radius: 4px; | |
| border-radius: 4px; | |
| padding: 8px; | |
| border: 0; | |
| -webkit-box-shadow: inset 1px 1px 4px rgba(0,0,0,0.6); | |
| -moz-box-shadow: inset 1px 1px 4px rgba(0,0,0,0.6); | |
| box-shadow: inset 1px 1px 4px rgba(0,0,0,0.6); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) inset, 0 1px 0 rgba(255, 255, 255, .1); | |
| -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) inset, 0 1px 0 rgba(255, 255, 255, .1); | |
| -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) inset, 0 1px 0 rgba(255, 255, 255, .1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .hide-text { text-indent: 100%; white-space: nowrap; overflow: hidden; font:0/0; text-shadow: none; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| global $wp_query; | |
| $postid = $wp_query->post->ID; | |
| echo get_post_meta($postid, 'MyField', true); | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Security checks | |
| function wrong_login() { | |
| return 'Wrong username or password.'; | |
| } | |
| add_filter('login_errors', 'wrong_login'); | |
| function remove_version() { | |
| return ''; | |
| } | |
| add_filter('the_generator', 'remove_version'); |