Create New Account
". "". "". "". "
Your real name:". "
Your gender:". "Male". "Female
Your location:
Direct Site password:
Confirm password:
Your avatar:
"; for ($i = 0; $i < $avatarmax; $i++) { $a = "display: inline-block; width: " . $avatarsize . "px; height: " . $avatarsize . "px; background: " . "url('" . $avatarurl . "') no-repeat -" . ($i * $avatarsize) . "px 0px;"; $s = "
"; $retval .= $s . "

"; } $retval .= "
"; return pmapi_output_cleaner($retval); } if($_REQUEST['pmpage'] == "PMCreate" ) { global $pmapi_create_api; if ($Password1 <> $Password2) return "Password mismatch. Click Back Button to correct."; if ($pmapi_create_api -> Result == "Ok") return "Success!
" . pmapi_userinfo_form(); return "Error: " . $pmapi_create_api -> Error . "
Click Back Button to correct."; } if($_REQUEST['pmpage'] == "PMUpdate" ) { global $pmapi_update_api; if ($pmapi_update_api -> Result == "Ok") return "Account Updated
" . pmapi_userinfo_form(); return "Error: " . $pmapi_update_api -> Error . "
" . pmapi_userinfo_form(); } return "Page Contents Not Found."; } return $content; } function pmapi_title_filter($title) { if(isset($_REQUEST['pmpage']) && in_the_loop()) { if($_REQUEST['pmpage'] == "setup") return 'Account Setup'; if($_REQUEST['pmpage'] == "PMCreate") return 'Setup Results:'; if($_REQUEST['pmpage'] == "PMUpdate") return 'Settings:'; return "Page"; } return $title; } function pmapi_do_first() { if($_REQUEST['pmpage'] == "PMCreate" ) { if ($Password1 <> $Password2) return; global $current_user; global $pmapi_create_api; get_currentuserinfo(); $Player = $current_user->user_login; $RealName = $_REQUEST["RealName"]; $Gender = $_REQUEST["Gender"]; $Location = $_REQUEST["Location"]; $Password1 = $_REQUEST["Password1"]; $Password2 = $_REQUEST["Password2"]; $Email = $current_user->user_email;; $Avatar = $_REQUEST["Avatar"]; $params = array("Command" => "AccountsAdd", "Player" => $Player, "RealName" => $RealName, "PW" => $Password1, "Location" => $Location, "Email" => $Email, "Avatar" => $Avatar, "Gender" => $Gender, "Chat" => "Yes", "Note" => "Account created via API"); $pmapi_create_api = PMAPI_Poker_API($params); } if($_REQUEST['pmpage'] == "PMUpdate" ) { global $current_user; global $pmapi_update_api; get_currentuserinfo(); $Player = $current_user->user_login; $RealName = $_REQUEST["RealName"]; $Gender = $_REQUEST["Gender"]; $Location = $_REQUEST["Location"]; $Email = $current_user->user_email;; $Avatar = $_REQUEST["Avatar"]; $params = array("Command" => "AccountsEdit", "Player" => $Player, "RealName" => $RealName, "Location" => $Location, "Email" => $Email, "Avatar" => $Avatar, "Gender" => $Gender); $pmapi_update_api = PMAPI_Poker_API($params); } } add_filter( 'the_content', 'pmapi_content_filter'); add_filter( 'the_title', 'pmapi_title_filter'); add_action( 'init', 'pmapi_do_first'); ?>