本文整理汇总了PHP中action::authorization方法的典型用法代码示例。如果您正苦于以下问题:PHP action::authorization方法的具体用法?PHP action::authorization怎么用?PHP action::authorization使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类action
的用法示例。
在下文中一共展示了action::authorization方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _messageList
}
public function _messageList()
{
$sql = " SELECT usermessage.* FROM usermessage WHERE 1=1 ORDER BY sentdate DESC ";
parent::_list($sql);
}
public function _threadList()
{
$sql = " SELECT forum.*, ";
$sql .= " CASE WHEN judge=1 THEN id ELSE root END AS rid ";
$sql .= " FROM forum ";
// $sql .= " WHERE active=1 ";
$sql .= " WHERE 1=1 ";
parent::_list($sql);
}
public function authorization()
{
$username = $_SERVER['PHP_AUTH_USER'];
$passwordmd5 = $_SERVER['PHP_AUTH_PW'];
$sql = " SELECT * FROM users WHERE username = '{$username}' AND passwordmd5 = '{$passwordmd5}' ";
if (count($this->db->select($sql)) != 1) {
$this->response('', 404);
}
}
}
$api = new action();
$api->authorization();
$api->processApi(api);
?>