示例#1
0
 public function exp_CHK($confirmLink)
 {
     Trace::output($this->traceID, "exp_CHK");
     //----------------------------------------------------------
     //init var
     //----------------------------------------------------------
     $chk = array("bool" => true, "traceID" => "exp_CHK");
     //----------------------------------------------------------
     if ($chk['bool']) {
         $chk = GenFun::checkDateTime($confirmLink['exp_date']);
     } else {
         return $chk;
     }
     //----------------------------------------------------------
     if ($chk['bool']) {
         $chk = GenFun::exp_CHK($confirmLink['exp_date']);
     } else {
         return $chk;
     }
     //----------------------------------------------------------
     if (!$chk['bool']) {
         $chk['message'] = "This link is not expired.";
     }
     //----------------------------------------------------------
     if (!$chk['bool']) {
         Trace::output($this->traceID, "exp_CHK: " . $chk['message']);
     }
     //----------------------------------------------------------
     if ($chk['bool']) {
         $chk = $this->disableConfirmLink($confirmLink['hash']);
     } else {
         return $chk;
     }
     //----------------------------------------------------------
     if ($chk['bool']) {
         $chk['bool'] = false;
         $chk['message'] = "This link is expired.";
     }
     //----------------------------------------------------------
     return $chk;
 }