function getGTK($skey) { $hash = 5381; for ($i = 0; $i < strlen($skey); ++$i) { $hash += ($hash << 5) + utf8_unicode($skey[$i]); } return $hash & 0x7fffffff; }
echo utf8_unicode(__('Strength indicator')); ?> ","short":"<?php echo utf8_unicode(_x('Short', 'Password')); ?> ","bad":"<?php echo utf8_unicode(_x('Bad', 'Password')); ?> ","good":"<?php echo _x('Good', 'Password'); ?> ","strong":"<?php echo utf8_unicode(_x('Strong', 'Password')); ?> ","mismatch":"<?php echo utf8_unicode(_x('Mismatch', 'Password')); ?> "}; $(function () { $("input,select,textarea").not("[type=submit]").jqBootstrapValidation( { submitError: function ($form, event, errors){ $(".form-actions").addClass("error"); $(".button_error").html('<ul role="alert"><li><?php _e('You have some errors, please check the form.'); ?> </li></ul>'); } } ); } ); KindEditor.ready(function(K) { K.each({
/** * Display installer setup form. */ function display_setup_form($error = null) { global $step_language; $repo_title = isset($_POST['repo_title']) ? trim(dcrm_unslash($_POST['repo_title'])) : ''; $repo_url = isset($_POST['repo_url']) ? trim(dcrm_unslash($_POST['repo_url'])) : BASE_URL; $user_name = isset($_POST['user_name']) ? trim(dcrm_unslash($_POST['user_name'])) : ''; $admin_email = isset($_POST['admin_email']) ? trim(dcrm_unslash($_POST['admin_email'])) : ''; if (!is_null($error)) { ?> <p class="message"><?php echo $error; ?> </p> <?php } ?> <form id="setup" method="post" action="setup-install.php?step=1&<?php echo $step_language; ?> " novalidate="novalidate"> <table class="form-table"> <tr> <th scope="row"><label for="repo_title"><?php _e('Repository Title'); ?> </label></th> <td><input name="repo_title" type="text" id="repo_title" size="25" value="<?php echo $repo_title; ?> " /></td> </tr> <tr> <th scope="row"><label for="repo_url"><?php _e('Repository URL'); ?> </label></th> <td> <input name="repo_url" type="text" id="repo_url" size="25" value="<?php echo $repo_url; ?> " /> <p><?php _e('Displayed on the homepage for the user to add, and used for the autofill package\'s Depiction when import.'); ?> </p> </td> </tr> <tr> <th scope="row"><label for="user_login"><?php _e('Username'); ?> </label></th> <td> <input name="user_name" type="text" id="user_login" size="25" value="<?php echo $user_name; ?> " /> <p><?php _e('Usernames can have only alphanumeric characters, spaces, underscores, hyphens, periods, and the @ symbol.'); ?> </p> </td> </tr> <tr> <th scope="row"> <label for="pass1"><?php _e('Password, twice'); ?> </label> <p><?php _e('A password will be automatically generated for you if you leave this blank.'); ?> </p> </th> <td> <input name="admin_password" type="password" id="pass1" size="25" value="" /> <p><input name="admin_password2" type="password" id="pass2" size="25" value="" /></p> <div id="pass-strength-result"><?php _e('Strength indicator'); ?> </div> <p><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers, and symbols like ! " ? $ % ^ & ).'); ?> </p> </td> </tr> <tr> <th scope="row"><label for="admin_email"><?php _e('Your E-mail'); ?> </label></th> <td><input name="admin_email" type="email" id="admin_email" size="25" value="<?php echo $admin_email; ?> " /> <p><?php _e('Double-check your email address before continuing.'); ?> </p></td> </tr> </table> <p class="step"><input type="submit" name="Submit" value="<?php _e('Install DCRM'); ?> " class="button button-large" /></p> </form> <script type="text/javascript" src="http://libs.useso.com/js/jquery/1.4.2/jquery.min.js"></script> <script src="../js/password-strength.min.js" type="text/javascript"></script> <script src="../js/zxcvbn-async.min.js" type="text/javascript"></script> <script src="../js/zxcvbn.min.js" type="text/javascript"></script> <script type='text/javascript'> var pwsL10n = {"empty":"<?php echo utf8_unicode(__('Strength indicator')); ?> ","short":"<?php echo utf8_unicode(_x('Short', 'Password')); ?> ","bad":"<?php echo utf8_unicode(_x('Bad', 'Password')); ?> ","good":"<?php echo _x('Good', 'Password'); ?> ","strong":"<?php echo utf8_unicode(_x('Strong', 'Password')); ?> ","mismatch":"<?php echo utf8_unicode(_x('Mismatch', 'Password')); ?> "}; </script> <?php }
function filter_gen($str, $ext = 0) { $ext = !empty($ext) ? 1 : 0; $re_arr = array(' ', '【', '】', '★', '?', '☆', '(', ')', '(', ')', '.', ':', ':', '≪', '≫', '。', ',', '"', '&', '『', '』', '「', '」', 'φ', '\'', '・', '●', '◆', '*', '+', '#', '%', '$', '^', '|', '_', '[', ']', '〔', '〕', 'ü', '-', ' '); $str = str_replace($re_arr, '', $str); $str = utf8_unicode($str); $str = unicode_decode($str); //hwz:两次转换用于过滤其他无法识别的字符! if ($ext) { $str = filter_blankstr($str); } return $str; }
function duality_word_encode($arr) { $len = count($arr); $new_arr = array(); for ($i = 0; $i < $len; $i++) { $tmp_arr = utf8_str2a($arr[$i]); $len1 = count($tmp_arr); for ($k = 0; $k < $len1; $k++) { $new_arr[$i] .= utf8_unicode($tmp_arr[$k]); } } return $new_arr; }
function unicode($str) { global $CFG; $return = ''; $step = strtolower($CFG['charset'] == 'utf-8') ? 3 : 2; while ($str != '') { if (ord(substr($str, 0, 1)) > 127) { $return .= "&#x" . dechex(utf8_unicode(convert(substr($str, 0, $step), $CFG['charset'], 'utf-8'))) . ";"; $str = substr($str, $step, strlen($str)); } else { $return .= substr($str, 0, 1); $str = substr($str, 1, strlen($str)); } } return $return; }