This file contains 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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |
This file contains 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 | |
/** | |
* Checks if a string is a valid timestamp. | |
* | |
* @param string $timestamp Timestamp to validate. | |
* | |
* @return bool | |
*/ | |
function is_timestamp($timestamp) |
This file contains 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
vim replace sql in php old connected way to PDO | |
match | |
cond. 1: | |
"xxxx $userid='{$userid}' AND $date='{$date}'" => | |
:.s/'{$\w*}'\{-1,}/?/g | |
cond. 2: | |
"xxxx $userid='{$userid}' AND $date='{$date} '" => | |
:.s/'{$\w*}\s\='\{-1,}/?/g |
This file contains 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
<html> | |
<head> | |
<title>login</title> | |
<script type="text/javascript" > | |
function id(id){ | |
return document.getElementById(id); | |
} | |
function setCookie(c_name,value,expiredays){ | |
var exdate=new Date(); | |
exdate.setDate(exdate.getDate()+expiredays); |