diff options
author | INOPIAE <inopiae@cacert.org> | 2013-05-15 01:59:30 +0200 |
---|---|---|
committer | INOPIAE <inopiae@cacert.org> | 2013-05-15 01:59:30 +0200 |
commit | b6057400206bd3c8c6c21bff9cd49d6dcd352e69 (patch) | |
tree | 110e125fbd1dc1fccbaf268f697efd6c4a61a69e | |
parent | 9403d13383887ad096e3f7007e76daea9e877921 (diff) | |
download | cacert-devel-b6057400206bd3c8c6c21bff9cd49d6dcd352e69.tar.gz cacert-devel-b6057400206bd3c8c6c21bff9cd49d6dcd352e69.tar.xz cacert-devel-b6057400206bd3c8c6c21bff9cd49d6dcd352e69.zip |
bug 1137: fixed the function check_date_differnce
-rw-r--r-- | includes/wot.inc.php | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/includes/wot.inc.php b/includes/wot.inc.php index fe632e9..aa5500a 100644 --- a/includes/wot.inc.php +++ b/includes/wot.inc.php @@ -628,6 +628,17 @@ function AssureFoot($oldid,$confirm) } // double with notray.inc +/** + * write_user_agreement() + * + * @param mixed $memid + * @param mixed $document + * @param mixed $method + * @param mixed $comment + * @param integer $active + * @param integer $secmemid + * @return + */ function write_user_agreement($memid, $document, $method, $comment, $active=1, $secmemid=0){ // write a new record to the table user_agreement $query="insert into `user_agreements` set `memid`=".$memid.", `secmemid`=".$secmemid. @@ -635,6 +646,13 @@ function write_user_agreement($memid, $document, $method, $comment, $active=1, $ $res = mysql_query($query); } +/** + * check_date_format() + * + * @param mixed $date + * @param integer $year + * @return + */ function check_date_format($date, $year=2000){ //checks if the date is entered in the right date format YYYY-MM-DD and if if (!strpos($date,'-')) { @@ -648,7 +666,14 @@ function check_date_format($date, $year=2000){ } +/** + * check_date_differnce() + * + * @param mixed $date + * @param integer $diff + * @return + */ function check_date_differnce($date, $diff=1){ //returns false if the date is larger then today + time diffrence - return (strtotime($date)>=time+$diff*86400); + return (strtotime($date)>=time()+$diff*86400); }
\ No newline at end of file |