当前位置: 首页>>代码示例>>PHP>>正文


PHP Check::ismd5方法代码示例

本文整理汇总了PHP中Check::ismd5方法的典型用法代码示例。如果您正苦于以下问题:PHP Check::ismd5方法的具体用法?PHP Check::ismd5怎么用?PHP Check::ismd5使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Check的用法示例。


在下文中一共展示了Check::ismd5方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: validateLogin

 function validateLogin()
 {
     if (!Check::isemail($email = $_REQUEST['email'])) {
         return "ERROR: invalid email!";
     }
     if (!Check::ismd5($password = $_REQUEST['password'])) {
         return "ERROR: bad password hash!";
     }
     $p = new Participant();
     if ($p->enrolled($email, $password)) {
         return "OK";
     }
     return "ERROR: participant {$email} not found";
 }
开发者ID:Maharaja1,项目名称:drdata,代码行数:14,代码来源:phone-controller.php

示例2: downloaddata

 public function downloaddata()
 {
     try {
         if (Check::digits($_REQUEST['study_id'], $empty = false)) {
             $study_id = $_REQUEST['study_id'];
         } else {
             throw new Exception("bad study id!");
         }
         global $studyname;
         $studyname = "study_{$study_id}";
         if (isset($_REQUEST['task_id'])) {
             if (Check::digits($_REQUEST['task_id'], $empty = false)) {
                 $task_id = $_REQUEST['task_id'];
             } else {
                 throw new Exception("bad task id!");
             }
             $studyname .= "-task_{$task_id}";
         }
         if (isset($_REQUEST['email'])) {
             if (Check::isemail($_REQUEST['email'], $empty = false)) {
                 $email = $_REQUEST['email'];
             } else {
                 throw new Exception("bad email!");
             }
             if (Check::ismd5($_REQUEST['password'])) {
                 $password = $_REQUEST['password'];
             } else {
                 throw new Exception("bad password!");
             }
             $studyname .= "-{$email}";
         }
         $d = new Data();
         View::assign('csv', $d->task2CSV($study_id, $task_id, $email, $password));
         View::assign('studyname', $studyname);
         global $contenttype;
         $contenttype = 'text-csv';
         return 'downloaddata.tpl';
     } catch (Exception $e) {
         $this->err($e);
         View::assign('error', $this->error);
         return 'error.tpl';
     }
 }
开发者ID:Maharaja1,项目名称:drdata,代码行数:43,代码来源:smi-controller.php

示例3: tasklist

 public function tasklist($_id, $_extra = null)
 {
     try {
         $empty = false;
         if (!Check::digits($_id, $empty)) {
             if (!Check::isemail($_id, $empty)) {
                 throw new Exception("bad email!");
             }
             if (!Check::ismd5($_extra)) {
                 throw new Exception("bad pw!");
             }
             $where = "where participant.email='%s' and participant.password='%s' ";
         } else {
             $where = "where study.study_id=%u ";
         }
         $this->run("select distinct task.task_id, task.task_title, schedule.* " . "from task join schedule using (task_id) " . "join study using (study_id) " . "join enrollment using (study_id) " . "join participant using (participant_id) " . $where . "and study.startdate <= schedule.startdate " . "and study.enddate >= schedule.enddate " . "and schedule.active = 1 " . "order by task.task_id", $_id, $_extra);
         return $this->resultarray();
     } catch (Exception $e) {
         $this->err($e);
         return false;
     }
 }
开发者ID:Maharaja1,项目名称:drdata,代码行数:22,代码来源:model.php


注:本文中的Check::ismd5方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。