Changeset 12093 for branches/dev/data


Ignore:
Timestamp:
2007/04/04 23:12:42 (19 years ago)
Author:
naka
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/data/downloads/module/security/security.php

    r12092 r12093  
    2020$objPage = new LC_Page(); 
    2121$objView = new SC_AdminView(); 
    22 $objQuery = new SC_Query(); 
     22 
    2323 
    2424$arrList[] = sfCheckOpenData(); 
     
    6666    return $arrResult; 
    6767} 
     68 
     69// ´ÉÍý¼Ô¥æ¡¼¥¶¤ÎID/¥Ñ¥¹¥ï¡¼¥É¥Á¥§¥Ã¥¯ 
     70function 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} 
    6891?> 
Note: See TracChangeset for help on using the changeset viewer.