@@ 55-59 (lines=5) @@ | ||
52 | $yesterday = strtotime(formatTimestamp(time()-86400)); |
|
53 | if ($limitlid > 0) { |
|
54 | $criteria = new CriteriaCompo(); |
|
55 | if ($xoopsUser) { |
|
56 | $criteria->add(new Criteria('downlimit_uid', $xoopsUser->getVar('uid') , '=')); |
|
57 | } else { |
|
58 | $criteria->add(new Criteria('downlimit_hostname', getenv("REMOTE_ADDR"), '=')); |
|
59 | } |
|
60 | $criteria->add(new Criteria('downlimit_lid', $lid , '=')); |
|
61 | $criteria->add(new Criteria('downlimit_date', $yesterday , '>')); |
|
62 | $numrows = $downloadslimit_Handler->getCount($criteria); |
|
@@ 70-74 (lines=5) @@ | ||
67 | } |
|
68 | if ($limitglobal > 0) { |
|
69 | $criteria = new CriteriaCompo(); |
|
70 | if ($xoopsUser) { |
|
71 | $criteria->add(new Criteria('downlimit_uid', $xoopsUser->getVar('uid') , '=')); |
|
72 | } else { |
|
73 | $criteria->add(new Criteria('downlimit_hostname', getenv("REMOTE_ADDR"), '=')); |
|
74 | } |
|
75 | $criteria->add(new Criteria('downlimit_date', $yesterday , '>')); |
|
76 | $numrows = $downloadslimit_Handler->getCount($criteria); |
|
77 | if ($numrows >= $limitglobal) { |