Changeset 12093 for branches/dev/data
- Timestamp:
- 2007/04/04 23:12:42 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev/data/downloads/module/security/security.php
r12092 r12093 20 20 $objPage = new LC_Page(); 21 21 $objView = new SC_AdminView(); 22 $objQuery = new SC_Query(); 22 23 23 24 24 $arrList[] = sfCheckOpenData(); … … 66 66 return $arrResult; 67 67 } 68 69 // ´ÉÍý¼Ô¥æ¡¼¥¶¤ÎID/¥Ñ¥¹¥ï¡¼¥É¥Á¥§¥Ã¥¯ 70 function sfCheckIDPass($user, $password) { 71 $objQuery = new SC_Query(); 72 $sql = "SELECT password FROM dtb_member WHERE login_id = ?"; 73 // DB¤«¤é°Å¹æ²½¥Ñ¥¹¥ï¡¼¥É¤ò¼èÆÀ¤¹¤ë¡£ 74 $arrRet = $objQuery->getAll($sql ,$user); 75 // ¥æ¡¼¥¶ÆþÎϥѥ¹¥ï¡¼¥É¤ÎȽÄê 76 $ret = sha1($password . ":" . AUTH_MAGIC); 77 78 if($ret == $arrRet[0]['password']) { 79 $arrResult['result'] = "¡ß"; 80 $arrResult['detail'] = "Èó¾ï¤Ë¿ä¬¤Î¤·¤ä¤¹¤¤´ÉÍý¼ÔID¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¸Ä¿Í¾ðÊóϳ±Ì¤Î´í¸±À¤¬¹â¤¤¤Ç¤¹¡£"; 81 } else { 82 if(count($arrRet) > 0) { 83 $arrResult['result'] = "¢¤"; 84 $arrResult['detail'] = "´ÉÍý¼Ô̾¤Ë¡Öadmin¡×¤òÍøÍѤ·¤Ê¤¤¤è¤¦¤Ë¤·¤Æ²¼¤µ¤¤¡£"; 85 } else { 86 $arrResult['result'] = "¡û"; 87 $arrResult['detail'] = "ÆÈ¼«¤ÎID¡¢¥Ñ¥¹¥ï¡¼¥É¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¤è¤¦¤Ç¤¹¡£"; 88 } 89 } 90 } 68 91 ?>
Note: See TracChangeset
for help on using the changeset viewer.
