fcode-page Nine Gongge automatic lock screen jquery plugin

Source: Internet
Author: User
Tags md5 encryption

Fcode.js Automatic Lock Screen Plugin

What is Fcode.js?

Fcode.js is a Web page nine Gongge automatic lock screen JS plug-in, dependent on jquery,

In the scope of the set, determine whether the user has operation, and then perform the function of the lock screen.

Just a JS file, easy to configure, easy to operate, can lock any page, also support the lock screen on the phone side.

In addition, support to update the password, or to log in, there are relevant instructions, especially simple, I believe you look, you will understand!

Demo Address: Http://fcphp.cn/fcode demo please access in HTTP mode

Code Cloud Address: Https://gitee.com/lovefc/fcode

Github:https://github.com/lovefc/fcode

How do I use FCode?
  <script src= "Js/jquery.min.js" ></script>    <script src= "Js/fcode.min.js" ></script>    <script type= "Text/javascript" >         fcode. Start (123);   </script>

Because is the use of nine Gongge, so the password is corresponding to the number 123456789, the top row from left to right represents the 4,5,6, the middle represents the last row represents the 7,8,9 so the corresponding password should be set so

Basic configuration of FCode

Fcode.js Basic configuration is very simple, a look at the know, it does not do more introduction

<script type= "Text/javascript" >Fcode.bgcolor= ' #FFF ';//Background ColorFcode.fontcolor= ' #666 ';//Ring ColorFcode.linecolor= "#333";//the color of the connectionFcode.lineerrorcolor= "#00a254";//Connection Error ColorFcode.linesuceesscolor= "#cc1c21";//continuous Correct colorFCode. time= 10;//Lock screen time, unit sFcode.bgimage= ' images/time.jpg ';//set the background picture to take precedence over the background colorfcode.customhtml= ' LOVEFC ';//define the HTML content above the nine Gongge unlockFCode. Start (' 123 ');//Start Run</script>

Here are some highlights of fcode. Start this function is set, this function is the start function, the parameter can be a password, MD5 encrypted password, or an API interface

1. Normal password form.

   FCode. Start (' 123 '); // Start Run

This way, is to represent the first row of sliding unlock, simple and convenient, the disadvantage is to see the source (although I have blocked the source view, F12, right-click to view the function)

2.MD5 encryption form, in fact, is the above 123MD5 encryption, is the lowercase MD5 32-bit encryption, you can find a tool to encrypt the line, such as with this, http://tool.chinaz.com/tools/md5.aspx This is a much safer approach and eliminates the need to configure API interfaces to run without additional scripting

   FCode. Start (' 202cb962ac59075b964b07152d234b70 '); // Start Run

3. The third way is the API interface form, currently only provides PHP interface reference (I do PHP), address must fill out the full interface address, such as http://127.0.0.1/status.php

   FCode. Start (' http://127.0.0.1/status.php ');

Interface design is also very simple, there is no complicated place, a look at the know

<?PHP/** Used to verify the lock screen password * AUTHOR:LOVEFC*/    $pwd=isset($_post[' pwd ']) ?$_post[' pwd ']:NULL;//get the pass-through password .   $time=isset($_post[' Time ']) ? (int)$_post[' Time ']: 60;//get the time to pass.  if(!Empty($pwd)){//compare the passwords to see if they are equal      if($pwd==1235789) {//set cookies, plus time          Setcookie("Fcode_status", ' LOVEFC ', Time()+$time);//return and output OK           die(' OK '); }  }

4. Compatibility instructions, test support Ie10,ie11, Firefox, Google!

PS: I original a jquery plugin!

fcode-page Nine Gongge automatic lock screen jquery plugin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.