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 is_touch_device() { | |
| return 'ontouchstart' in window || 'onmsgesturechange' in window; | |
| }; | |
| var isMobile = is_touch_device(); | |
| if (isMobile){ | |
| }else{ |
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
| //url formate should be ...index.html/?targetDiv | |
| $(document).ready(function () { | |
| //CHECK FOR VARIABLES IN URL | |
| var rawKeys = $(location).attr('search'); | |
| if (rawKeys) { | |
| console.log(rawKeys); //displays "?targetDiv" | |
| var strippedKey = rawKeys.substring(1); //get rid of question mark | |
| console.log(strippedKey); //displays "targetDiv" |
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
| //REASSIGN VARIABLES | |
| storyTitle = "New title, can also be a variable with no quotes."; | |
| storyURL = "http://res.dallasnews.com/graphics/2015_03/index.html"; //Can also be a variable | |
| storyImG = "http://res.dallasnews.com/graphics/2015_03/customPreview.jpg"; //Can also be a variable | |
| leadText = "A custom description based on whatever you can script", //Can also be a variable | |
| //ATTACH THEM TO THE APPROPRIATE PROPERTIES | |
| $("meta[property='og\\:title']").attr("content", storyTitle); | |
| $("meta[property='og\\:url']").attr("content", storyURL); | |
| $("meta[property='og\\:image']").attr("content", storyImg); |
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
| n = name | |
| s = symbol | |
| l1 = last trade | |
| c1 = change | |
| g = day low | |
| h = day high | |
| j = 52 week low | |
| k = 52 week high | |
| p2 = %change | |
| a2 = average daily volume |
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
| //CHECK DUPLICATE IPs | |
| $ip = $_SERVER["REMOTE_ADDR"]; | |
| $maxDuplicates = 200; | |
| $sql = "SELECT COUNT(*) FROM --currentTable-- WHERE ip = '$ip'"; | |
| $res = $db->query($sql); | |
| $duplicateIP = $res->fetchColumn(); | |
NewerOlder