| 849 | | $html .= "</div>\n"; |
|---|
| 850 | | $html .= "</li>\n"; |
|---|
| | 850 | $html .= "</td>\n"; |
|---|
| | 851 | $html .= "</tr>\n"; |
|---|
| | 852 | |
|---|
| | 853 | $html .= "<tr>\n"; |
|---|
| | 854 | $html .= "<td>"._("Your email address")." : </td>\n"; |
|---|
| | 855 | $html .= "<td>\n"; |
|---|
| | 856 | $name = "user_".$this->getId()."_email"; |
|---|
| | 857 | $html .= "<input type='text' name='$name' value='".htmlentities($this->getEmail())."' size=30>\n"; |
|---|
| | 858 | $html .= "</td>\n"; |
|---|
| | 859 | $html .= "</tr>\n"; |
|---|
| | 860 | |
|---|
| | 861 | $html .= "<tr>\n"; |
|---|
| | 862 | $html .= "<td>"._("Date de naissance (AAAA-MM-JJ)")." : </td>\n"; |
|---|
| | 863 | $html .= "<td>\n"; |
|---|
| | 864 | $name = "user_".$this->getId()."_birthday"; |
|---|
| | 865 | $html .= "<input type='text' name='$name' value='".htmlentities($this->getBirthday())."' size=30>\n"; |
|---|
| | 866 | $html .= "</td>\n"; |
|---|
| | 867 | $html .= "</tr>\n"; |
|---|
| | 868 | |
|---|
| | 869 | $html .= "<tr>\n"; |
|---|
| | 870 | $html .= "<td>"._("Street address")." : </td>\n"; |
|---|
| | 871 | $html .= "<td>\n"; |
|---|
| | 872 | $name = "user_".$this->getId()."_address"; |
|---|
| | 873 | $html .= "<input type='text' name='$name' value='".htmlentities($this->getAddress())."' size=30>\n"; |
|---|
| | 874 | $html .= "</td>\n"; |
|---|
| | 875 | $html .= "</tr>\n"; |
|---|
| | 876 | |
|---|
| | 877 | $html .= "<tr>\n"; |
|---|
| | 878 | $html .= "<td>"._("Postal code")." : </td>\n"; |
|---|
| | 879 | $html .= "<td>\n"; |
|---|
| | 880 | $name = "user_".$this->getId()."_postalcode"; |
|---|
| | 881 | $html .= "<input type='text' name='$name' value='".htmlentities($this->getPostalCode())."' size=30>\n"; |
|---|
| | 882 | $html .= "</td>\n"; |
|---|
| | 883 | $html .= "</tr>\n"; |
|---|
| | 884 | |
|---|
| | 885 | $html .= "<tr>\n"; |
|---|
| | 886 | $html .= "<td>"._("City")." : </td>\n"; |
|---|
| | 887 | $html .= "<td>\n"; |
|---|
| | 888 | $name = "user_".$this->getId()."_city"; |
|---|
| | 889 | $html .= "<input type='text' name='$name' value='".htmlentities($this->getCity())."' size=30>\n"; |
|---|
| | 890 | $html .= "</td>\n"; |
|---|
| | 891 | $html .= "</tr>\n"; |
|---|
| | 892 | |
|---|
| | 893 | |
|---|
| | 894 | $html .= "<tr>\n"; |
|---|
| | 895 | $html .= "<td>"._("Country")." : </td>\n"; |
|---|
| | 896 | $html .= "<td>\n"; |
|---|
| | 897 | $name = "user_".$this->getId()."_country"; |
|---|
| | 898 | $html .= "<input type='text' name='$name' value='".htmlentities($this->getCountry())."' size=30>\n"; |
|---|
| | 899 | $html .= "</td>\n"; |
|---|
| | 900 | $html .= "</tr>\n"; |
|---|
| | 901 | |
|---|
| | 902 | $html .= "<tr>\n"; |
|---|
| | 903 | $html .= "<td>"._("Public phone number")." : </td>\n"; |
|---|
| | 904 | $html .= "<td>\n"; |
|---|
| | 905 | $name = "user_".$this->getId()."_phone"; |
|---|
| | 906 | $html .= "<input type='text' name='$name' value='".htmlentities($this->getPhone())."' size=30>\n"; |
|---|
| | 907 | $html .= "</td>\n"; |
|---|
| | 908 | $html .= "</tr>\n"; |
|---|
| | 909 | |
|---|
| | 910 | |
|---|
| | 911 | |
|---|
| | 931 | |
|---|
| | 932 | public function setWebsite($website) |
|---|
| | 933 | { |
|---|
| | 934 | $website_str = $this->mDb->escapeString($website); |
|---|
| | 935 | if (!($update = $this->mDb->execSqlUpdate("UPDATE users SET website='{$website_str}' WHERE user_id='{$this->id}'"))) |
|---|
| | 936 | { |
|---|
| | 937 | throw new Exception(_("Could not update Website URL.")); |
|---|
| | 938 | } |
|---|
| | 939 | $this->mRow['website'] = $website; // unescaped |
|---|
| | 940 | } |
|---|
| | 941 | |
|---|
| | 942 | public function setRealName($realname) |
|---|
| | 943 | { |
|---|
| | 944 | $realname_str = $this->mDb->escapeString($realname); |
|---|
| | 945 | if (!($update = $this->mDb->execSqlUpdate("UPDATE users SET real_name='{$realname_str}' WHERE user_id='{$this->id}'"))) |
|---|
| | 946 | { |
|---|
| | 947 | throw new Exception(_("Could not update realname.")); |
|---|
| | 948 | } |
|---|
| | 949 | $this->mRow['real_name'] = $realname; // unescaped |
|---|
| | 950 | } |
|---|
| | 951 | |
|---|
| | 952 | |
|---|
| | 953 | public function setAddress($address) |
|---|
| | 954 | { |
|---|
| | 955 | $address_str = $this->mDb->escapeString($address); |
|---|
| | 956 | if (!($update = $this->mDb->execSqlUpdate("UPDATE users SET address='{$address_str}' WHERE user_id='{$this->id}'"))) |
|---|
| | 957 | { |
|---|
| | 958 | throw new Exception(_("Could not update address.")); |
|---|
| | 959 | } |
|---|
| | 960 | $this->mRow['address'] = $address; // unescaped |
|---|
| | 961 | } |
|---|
| | 962 | |
|---|
| | 963 | public function setPostalCode($postalcode) |
|---|
| | 964 | { |
|---|
| | 965 | $postalcode_str = $this->mDb->escapeString($postalcode); |
|---|
| | 966 | if (!($update = $this->mDb->execSqlUpdate("UPDATE users SET postalcode='{$postalcode_str}' WHERE user_id='{$this->id}'"))) |
|---|
| | 967 | { |
|---|
| | 968 | throw new Exception(_("Could not postal code.")); |
|---|
| | 969 | } |
|---|
| | 970 | $this->mRow['postalcode'] = $postalcode; // unescaped |
|---|
| | 971 | } |
|---|
| | 972 | |
|---|
| | 973 | public function setCity($city) |
|---|
| | 974 | { |
|---|
| | 975 | $city_str = $this->mDb->escapeString($city); |
|---|
| | 976 | if (!($update = $this->mDb->execSqlUpdate("UPDATE users SET city='{$city_str}' WHERE user_id='{$this->id}'"))) |
|---|
| | 977 | { |
|---|
| | 978 | throw new Exception(_("Could not update city.")); |
|---|
| | 979 | } |
|---|
| | 980 | $this->mRow['city'] = $city; // unescaped |
|---|
| | 981 | } |
|---|
| | 982 | |
|---|
| | 983 | public function setCountry($country) |
|---|
| | 984 | { |
|---|
| | 985 | $country_str = $this->mDb->escapeString($country); |
|---|
| | 986 | if (!($update = $this->mDb->execSqlUpdate("UPDATE users SET country='{$country_str}' WHERE user_id='{$this->id}'"))) |
|---|
| | 987 | { |
|---|
| | 988 | throw new Exception(_("Could not update country.")); |
|---|
| | 989 | } |
|---|
| | 990 | $this->mRow['country'] = $country; // unescaped |
|---|
| | 991 | } |
|---|
| | 992 | |
|---|
| | 993 | public function setPhone($phone) |
|---|
| | 994 | { |
|---|
| | 995 | $phone_str = $this->mDb->escapeString($phone); |
|---|
| | 996 | if (!($update = $this->mDb->execSqlUpdate("UPDATE users SET phone='{$phone_str}' WHERE user_id='{$this->id}'"))) |
|---|
| | 997 | { |
|---|
| | 998 | throw new Exception(_("Could not update phone.")); |
|---|
| | 999 | } |
|---|
| | 1000 | $this->mRow['phone'] = $phone; // unescaped |
|---|
| | 1001 | } |
|---|
| | 1002 | |
|---|
| | 1003 | |
|---|
| | 1004 | |
|---|
| 882 | | |
|---|
| | 1020 | // website |
|---|
| | 1021 | $website = "user_".$this->getId()."_website"; |
|---|
| | 1022 | $this->setWebsite($_REQUEST[$website]); |
|---|
| | 1023 | |
|---|
| | 1024 | // email |
|---|
| | 1025 | $email = "user_".$this->getId()."_email"; |
|---|
| | 1026 | $this->setEmail($_REQUEST[$email]); |
|---|
| | 1027 | |
|---|
| | 1028 | // address |
|---|
| | 1029 | $address = "user_".$this->getId()."_address"; |
|---|
| | 1030 | $this->setAddress($_REQUEST[$address]); |
|---|
| | 1031 | |
|---|
| | 1032 | // postalcode |
|---|
| | 1033 | $postalcode = "user_".$this->getId()."_postalcode"; |
|---|
| | 1034 | $this->setPostalCode($_REQUEST[$postalcode]); |
|---|
| | 1035 | |
|---|
| | 1036 | // city |
|---|
| | 1037 | $city = "user_".$this->getId()."_city"; |
|---|
| | 1038 | $this->setCity($_REQUEST[$city]); |
|---|
| | 1039 | |
|---|
| | 1040 | // country |
|---|
| | 1041 | $country = "user_".$this->getId()."_country"; |
|---|
| | 1042 | $this->setCountry($_REQUEST[$country]); |
|---|
| | 1043 | |
|---|
| | 1044 | // phone |
|---|
| | 1045 | $phone = "user_".$this->getId()."_phone"; |
|---|
| | 1046 | $this->setPhone($_REQUEST[$phone]); |
|---|
| | 1047 | |
|---|
| | 1048 | // account_status |
|---|
| | 1049 | $account = "user_".$this->getId()."_account_status"; |
|---|
| | 1050 | $this->setAccountStatus($_REQUEST[$account]); |
|---|
| 899 | | } |
|---|
| 900 | | |
|---|
| | 1067 | } |
|---|
| | 1068 | |
|---|
| | 1069 | public function getBirthday() |
|---|
| | 1070 | { |
|---|
| | 1071 | return $this->mRow['birthday']; |
|---|
| | 1072 | } |
|---|
| | 1073 | |
|---|
| | 1074 | public function getAddress() |
|---|
| | 1075 | { |
|---|
| | 1076 | return $this->mRow['address']; |
|---|
| | 1077 | } |
|---|
| | 1078 | |
|---|
| | 1079 | public function getCity() |
|---|
| | 1080 | { |
|---|
| | 1081 | return $this->mRow['city']; |
|---|
| | 1082 | } |
|---|
| | 1083 | |
|---|
| | 1084 | public function getPostalCode() |
|---|
| | 1085 | { |
|---|
| | 1086 | return $this->mRow['postalcode']; |
|---|
| | 1087 | } |
|---|
| | 1088 | |
|---|
| | 1089 | public function getCountry() |
|---|
| | 1090 | { |
|---|
| | 1091 | return $this->mRow['country']; |
|---|
| | 1092 | } |
|---|
| | 1093 | |
|---|
| | 1094 | public function getPhone() |
|---|
| | 1095 | { |
|---|
| | 1096 | return $this->mRow['phone']; |
|---|
| | 1097 | } |
|---|
| | 1098 | |
|---|