コード例 #1
0
 public static function init()
 {
     global $USER_DETAILS;
     self::$profiles = array();
     $sql = 'SELECT * ' . ' FROM profiles ' . ' WHERE userid=' . $USER_DETAILS['userid'] . ' AND ' . DBin_node('profileid', false) . ' ORDER BY userid ASC, profileid ASC';
     $db_profiles = DBselect($sql);
     while ($profile = DBfetch($db_profiles)) {
         $value_type = self::getFieldByType($profile['type']);
         if (!isset(self::$profiles[$profile['idx']])) {
             self::$profiles[$profile['idx']] = array();
         }
         self::$profiles[$profile['idx']][$profile['idx2']] = $profile[$value_type];
     }
 }
コード例 #2
0
ファイル: profiles.inc.php プロジェクト: hujingguang/work
 public static function init()
 {
     self::$userDetails = CWebUser::$data;
     self::$profiles = array();
     $profilesTableSchema = DB::getSchema('profiles');
     self::$stringProfileMaxLength = $profilesTableSchema['fields']['value_str']['length'];
     $db_profiles = DBselect('SELECT p.*' . ' FROM profiles p' . ' WHERE p.userid=' . self::$userDetails['userid'] . andDbNode('p.profileid', false) . ' ORDER BY p.userid,p.profileid');
     while ($profile = DBfetch($db_profiles)) {
         $value_type = self::getFieldByType($profile['type']);
         if (!isset(self::$profiles[$profile['idx']])) {
             self::$profiles[$profile['idx']] = array();
         }
         self::$profiles[$profile['idx']][$profile['idx2']] = $profile[$value_type];
     }
 }