| 1 |
/* |
| 2 |
* XOOPS&Platformユーザ管理のためのクラス定義 |
| 3 |
* |
| 4 |
* $Revision$ |
| 5 |
* $Log$ |
| 6 |
* |
| 7 |
*/ |
| 8 |
#include <time.h> |
| 9 |
#include <string.h> |
| 10 |
|
| 11 |
#include "account.h" |
| 12 |
#include "common.h" |
| 13 |
|
| 14 |
account::account() |
| 15 |
{ |
| 16 |
uid = 0; |
| 17 |
activate = false; |
| 18 |
setValue( &address, "" ); |
| 19 |
setValue( &institute, "" ); |
| 20 |
setValue( &tel, "" ); |
| 21 |
setValue( &organization, "" ); |
| 22 |
setValue( &country, "" ); |
| 23 |
setValue( &zipcode, "" ); |
| 24 |
setValue( &fax, "" ); |
| 25 |
setValue( &baseURL, "" ); |
| 26 |
noticeMail = 1; |
| 27 |
noticeMailSince = 0; |
| 28 |
|
| 29 |
setValue( &uname, "" ); |
| 30 |
setValue( &name, "" ); |
| 31 |
setValue( &email, "" ); |
| 32 |
setValue( &url, "" ); |
| 33 |
setValue( &user_avatar, "" ); |
| 34 |
user_regdate = 0; |
| 35 |
setValue( &user_icq, "" ); |
| 36 |
setValue( &user_from, "" ); |
| 37 |
setValue( &user_sig, "" ); |
| 38 |
user_viewemail = 0; |
| 39 |
setValue( &actkey, "" ); |
| 40 |
setValue( &user_aim, "" ); |
| 41 |
setValue( &user_yim, "" ); |
| 42 |
setValue( &user_msnm, "" ); |
| 43 |
setValue( &pass, "" ); |
| 44 |
posts = 0; |
| 45 |
attachsig = 0; |
| 46 |
rank = 0; |
| 47 |
level = 0; |
| 48 |
setValue( &theme, "" ); |
| 49 |
timezone_offset = 0.0; |
| 50 |
last_login = 0; |
| 51 |
setValue( &umode, "" ); |
| 52 |
uorder = 0; |
| 53 |
notify_method = 0; |
| 54 |
notify_mode = 0; |
| 55 |
setValue( &user_occ, "" ); |
| 56 |
setValue( &bio, "" ); |
| 57 |
setValue( &user_intrest, "" ); |
| 58 |
user_mailok = 0; |
| 59 |
} |
| 60 |
|
| 61 |
account::~account() |
| 62 |
{ |
| 63 |
if( address != 0 ) delete[] address; |
| 64 |
if( institute != 0 ) delete[] institute; |
| 65 |
if( tel != 0 ) delete[] tel; |
| 66 |
if( organization != 0 ) delete[] organization; |
| 67 |
if( country != 0 ) delete[] country; |
| 68 |
if( zipcode != 0 ) delete[] zipcode; |
| 69 |
if( fax != 0 ) delete[] fax; |
| 70 |
if( baseURL != 0 ) delete[] baseURL; |
| 71 |
|
| 72 |
if( uname != 0 ) delete[] uname; |
| 73 |
if( name != 0 ) delete[] name; |
| 74 |
if( email != 0 ) delete[] email; |
| 75 |
if( url != 0 ) delete[] url; |
| 76 |
if( user_avatar != 0 ) delete[] user_avatar; |
| 77 |
if( user_icq != 0 ) delete[] user_icq; |
| 78 |
if( user_from != 0 ) delete[] user_from; |
| 79 |
if( user_sig != 0 ) delete[] user_sig; |
| 80 |
if( actkey != 0 ) delete[] actkey; |
| 81 |
if( user_aim != 0 ) delete[] user_aim; |
| 82 |
if( user_yim != 0 ) delete[] user_yim; |
| 83 |
if( user_msnm != 0 ) delete[] user_msnm; |
| 84 |
if( pass != 0 ) delete[] pass; |
| 85 |
if( theme != 0 ) delete[] theme; |
| 86 |
if( umode != 0 ) delete[] umode; |
| 87 |
if( user_occ != 0 ) delete[] user_occ; |
| 88 |
if( bio != 0 ) delete[] bio; |
| 89 |
if( user_intrest != 0 ) delete[] user_intrest; |
| 90 |
} |
| 91 |
|
| 92 |
int account::getUID(){ return uid; } |
| 93 |
|
| 94 |
bool account::getActivate(){ return activate; } |
| 95 |
|
| 96 |
const char * account::getAddress(){ return address; } |
| 97 |
|
| 98 |
const char * account::getInstitute(){ return institute; } |
| 99 |
|
| 100 |
const char * account::getTel(){ return tel; } |
| 101 |
|
| 102 |
const char * account::getOrganization(){ return organization; } |
| 103 |
|
| 104 |
const char * account::getCountry(){ return country; } |
| 105 |
|
| 106 |
const char * account::getZipcode(){ return zipcode; } |
| 107 |
|
| 108 |
const char * account::getFax(){ return fax; } |
| 109 |
|
| 110 |
const char * account::getBaseURL(){ return baseURL; } |
| 111 |
|
| 112 |
int account::getNoticeMail(){ return noticeMail; } |
| 113 |
|
| 114 |
time_t account::getNoticeMailSince(){ return noticeMailSince; } |
| 115 |
|
| 116 |
// xoops_user |
| 117 |
const char* account::getUname( ){ return uname; } |
| 118 |
|
| 119 |
const char* account::getName( ){ return name; } |
| 120 |
|
| 121 |
const char* account::getEmail( ){ return email; } |
| 122 |
|
| 123 |
const char* account::getURL( ){ return url; } |
| 124 |
|
| 125 |
const char* account::getUserAvatar( ){ return user_avatar; } |
| 126 |
|
| 127 |
int account::getUserRegdate( ){ return user_regdate; } |
| 128 |
|
| 129 |
const char* account::getUserIcq( ){ return user_icq; } |
| 130 |
|
| 131 |
const char* account::getUserFrom( ){ return user_from; } |
| 132 |
|
| 133 |
const char* account::getUserSig( ){ return user_sig; } |
| 134 |
|
| 135 |
int account::getUserViewemail( ){ return user_viewemail; } |
| 136 |
|
| 137 |
const char* account::getActkey( ){ return actkey; } |
| 138 |
|
| 139 |
const char* account::getUserAim( ){ return user_aim; } |
| 140 |
|
| 141 |
const char* account::getUserYim( ){ return user_yim; } |
| 142 |
|
| 143 |
const char* account::getUserMsnm( ){ return user_msnm; } |
| 144 |
|
| 145 |
const char* account::getPass( ){ return pass; } |
| 146 |
|
| 147 |
int account::getPosts( ){ return posts; } |
| 148 |
|
| 149 |
int account::getAttachsig( ){ return attachsig; } |
| 150 |
|
| 151 |
int account::getRank( ){ return rank; } |
| 152 |
|
| 153 |
int account::getLevel( ){ return level; } |
| 154 |
|
| 155 |
const char* account::getTheme( ){ return theme; } |
| 156 |
|
| 157 |
double account::getTimezoneOffset( ){ return timezone_offset; } |
| 158 |
|
| 159 |
int account::getLastLogin( ){ return last_login; } |
| 160 |
|
| 161 |
const char* account::getUmode( ){ return umode; } |
| 162 |
|
| 163 |
int account::getUorder( ){ return uorder; } |
| 164 |
|
| 165 |
int account::getNotifyMethod( ){ return notify_method; } |
| 166 |
|
| 167 |
int account::getNotifyMode( ){ return notify_mode; } |
| 168 |
|
| 169 |
const char* account::getUserOcc( ){ return user_occ; } |
| 170 |
|
| 171 |
const char* account::getBio( ){ return bio; } |
| 172 |
|
| 173 |
const char* account::getUserIntrest( ){ return user_intrest; } |
| 174 |
|
| 175 |
int account::getUserMailok( ){ return user_mailok; } |
| 176 |
|
| 177 |
|
| 178 |
// |
| 179 |
void account::setUID(int uid){ this -> uid = uid; } |
| 180 |
|
| 181 |
void account::setActivate(bool activate){ this -> activate = activate; } |
| 182 |
|
| 183 |
void account::setAddress( const char* address) |
| 184 |
{ |
| 185 |
setValue( &this -> address, address ); |
| 186 |
} |
| 187 |
|
| 188 |
void account::setInstitute( const char* institute) |
| 189 |
{ |
| 190 |
setValue( &this -> institute, institute ); |
| 191 |
} |
| 192 |
|
| 193 |
void account::setTel( const char* tel) |
| 194 |
{ |
| 195 |
setValue( &this -> tel, tel ); |
| 196 |
} |
| 197 |
|
| 198 |
void account::setOrganization( const char* organization) |
| 199 |
{ |
| 200 |
setValue( &this -> organization, organization ); |
| 201 |
} |
| 202 |
|
| 203 |
void account::setCountry( const char* country) |
| 204 |
{ |
| 205 |
setValue( &this -> country, country ); |
| 206 |
} |
| 207 |
|
| 208 |
void account::setZipcode( const char* zipcode) |
| 209 |
{ |
| 210 |
setValue( &this -> zipcode, zipcode ); |
| 211 |
} |
| 212 |
|
| 213 |
void account::setFax( const char* fax) |
| 214 |
{ |
| 215 |
setValue( &this -> fax, fax ); |
| 216 |
} |
| 217 |
|
| 218 |
void account::setBaseURL( const char* baseURL) |
| 219 |
{ |
| 220 |
setValue( &this -> baseURL, baseURL ); |
| 221 |
} |
| 222 |
|
| 223 |
void account::setNoticeMail(int noticeMail){ this -> noticeMail = noticeMail; } |
| 224 |
|
| 225 |
void account::setNoticeMailSince(time_t noticeMailSince){ this -> noticeMailSince = noticeMailSince; } |
| 226 |
|
| 227 |
// xoops_user |
| 228 |
void account::setUname( const char* uname ) |
| 229 |
{ |
| 230 |
setValue( &this -> uname, uname ); |
| 231 |
} |
| 232 |
|
| 233 |
void account::setName( const char* name ) |
| 234 |
{ |
| 235 |
setValue( &this -> name, name ); |
| 236 |
} |
| 237 |
|
| 238 |
void account::setEmail( const char* email ) |
| 239 |
{ |
| 240 |
setValue( &this -> email, email ); |
| 241 |
} |
| 242 |
|
| 243 |
void account::setURL( const char* url ) |
| 244 |
{ |
| 245 |
setValue( &this -> url, url ); |
| 246 |
} |
| 247 |
|
| 248 |
void account::setUserAvatar( const char* user_avatar ) |
| 249 |
{ |
| 250 |
setValue( &this -> user_avatar, user_avatar ); |
| 251 |
} |
| 252 |
|
| 253 |
void account::setUserRegdate( int user_regdate ){ this -> user_regdate = user_regdate; } |
| 254 |
|
| 255 |
void account::setUserIcq( const char* user_icq ) |
| 256 |
{ |
| 257 |
setValue( &this -> user_icq, user_icq ); |
| 258 |
} |
| 259 |
|
| 260 |
void account::setUserFrom( const char* user_from ) |
| 261 |
{ |
| 262 |
setValue( &this -> user_from, user_from ); |
| 263 |
} |
| 264 |
|
| 265 |
void account::setUserSig( const char* user_sig ) |
| 266 |
{ |
| 267 |
setValue( &this -> user_sig, user_sig ); |
| 268 |
} |
| 269 |
|
| 270 |
void account::setUserViewemail( int user_viewemail ){ this -> user_viewemail = user_viewemail; } |
| 271 |
|
| 272 |
void account::setActkey( const char* actkey ) |
| 273 |
{ |
| 274 |
setValue( &this -> actkey, actkey ); |
| 275 |
} |
| 276 |
|
| 277 |
void account::setUserAim( const char* user_aim ) |
| 278 |
{ |
| 279 |
setValue( &this -> user_aim, user_aim ); |
| 280 |
} |
| 281 |
|
| 282 |
void account::setUserYim( const char* user_yim ) |
| 283 |
{ |
| 284 |
setValue( &this -> user_yim, user_yim ); |
| 285 |
} |
| 286 |
|
| 287 |
void account::setUserMsnm( const char* user_msnm ) |
| 288 |
{ |
| 289 |
setValue( &this -> user_msnm, user_msnm ); |
| 290 |
} |
| 291 |
|
| 292 |
|
| 293 |
void account::setPass( const char* pass ) |
| 294 |
{ |
| 295 |
setValue( &this -> pass, pass ); |
| 296 |
} |
| 297 |
|
| 298 |
void account::setPosts( int posts ){ this -> posts = posts; } |
| 299 |
|
| 300 |
void account::setAttachsig( int attachsig ){ this -> attachsig = attachsig; } |
| 301 |
|
| 302 |
void account::setRank( int rank ){ this -> rank = rank; } |
| 303 |
|
| 304 |
void account::setLevel( int level ){ this -> level = level; } |
| 305 |
|
| 306 |
void account::setTheme( const char* theme ) |
| 307 |
{ |
| 308 |
setValue( &this -> theme, theme ); |
| 309 |
} |
| 310 |
|
| 311 |
void account::setTimezoneOffset( double timezone_offset ){ this -> timezone_offset = timezone_offset; } |
| 312 |
|
| 313 |
void account::setLastLogin( int last_login ){ this -> last_login = last_login; } |
| 314 |
|
| 315 |
void account::setUmode( const char* umode ) |
| 316 |
{ |
| 317 |
setValue( &this -> umode, umode ); |
| 318 |
} |
| 319 |
|
| 320 |
void account::setUorder( int uorder ){ this -> uorder = uorder; } |
| 321 |
|
| 322 |
void account::setNotifyMethod( int notify_method ){ this -> notify_method = notify_method; } |
| 323 |
|
| 324 |
void account::setNotifyMode( int notify_mode ){ this -> notify_mode = notify_mode; } |
| 325 |
|
| 326 |
void account::setUserOcc( const char* user_occ ) |
| 327 |
{ |
| 328 |
setValue( &this -> user_occ, user_occ ); |
| 329 |
} |
| 330 |
|
| 331 |
|
| 332 |
void account::setBio( const char* bio ) |
| 333 |
{ |
| 334 |
setValue( &this -> bio, bio ); |
| 335 |
} |
| 336 |
|
| 337 |
void account::setUserIntrest( const char* user_intrest ) |
| 338 |
{ |
| 339 |
setValue( &this->user_intrest, user_intrest ); |
| 340 |
} |
| 341 |
|
| 342 |
void account::setUserMailok( int user_mailok ){ this -> user_mailok = user_mailok; } |
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|