account
This commit is contained in:
@@ -30,6 +30,7 @@ long WrenchUpdateProfile(CVars in, CVars &out);
|
||||
long WrenchUpdateAccountTerms(CVars in, CVars &out);
|
||||
long WrenchUpdateAccountDescription(CVars in, CVars &out);
|
||||
long WrenchMyPageIntro(CVars in, CVars &out);
|
||||
long WrenchMyPage(CVars in, CVars &out);
|
||||
|
||||
long LogWrenchBoardMember(CVars in, CVars &out);
|
||||
|
||||
|
||||
@@ -497,7 +497,7 @@ long account_calls(CVars in, CVars &out) {
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_ACCOUNT_MYPAGE:
|
||||
|
||||
return WrenchMyPage(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_ACCOUNT_PAGEINTRO:
|
||||
@@ -511,6 +511,37 @@ long account_calls(CVars in, CVars &out) {
|
||||
|
||||
#define PHP_API_TRANSFER_COMPLETE 200
|
||||
|
||||
long WrenchMyPage(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "WrenchMyPageIntro()");
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
const PGresult *res;
|
||||
CVars x;
|
||||
|
||||
try {
|
||||
REQ_LONG(in, "member_id", 1, -1);
|
||||
REQ_STRING(in, "uid", 3, 150, "(.*)");
|
||||
REQ_STRING(in, "intro", 3, 150, "(.*)");
|
||||
REQ_STRING(in, "description", 3, 150, "(.*)");
|
||||
|
||||
x["intro"] = in["intro"];
|
||||
x["intro"].set_valid(true);
|
||||
x["description"] = in["description"];
|
||||
x["description"].set_valid(true);
|
||||
|
||||
if ( load_db_record(out, "SELECT d.id AS detail_id,d.* FROM members_detail d "
|
||||
"LEFT JOIN members m ON m.id =d.member_id "
|
||||
"WHERE d.member_id=%lu AND m.uid='%s' AND active = 1 ", in["member_id"].Long(), in["uid"].c_str()) > 0){
|
||||
|
||||
}
|
||||
else{
|
||||
ret = PHP_API_OK;
|
||||
}
|
||||
|
||||
} catch (bad_parameter) {
|
||||
out["status"] = "ERROR";
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
long WrenchMyPageIntro(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "WrenchMyPageIntro()");
|
||||
|
||||
Reference in New Issue
Block a user