Changeset 511
- Timestamp:
- 04/18/07 11:31:07
(2 years ago)
- Author:
- rats
- Message:
- DOCS:
- SuSE: updated installation
- GUI:
- fixed stupid default domain error
- fixed bug #165: encoding not set
- added link to admin-panel in default e-mail
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r509 |
r511 |
|
| 11 | 11 | \_________________________________________________________________/ |
|---|
| 12 | 12 | |
|---|
| 13 | | 2007-04-16 Benedikt Heintel |
|---|
| | 13 | 2007-04-17 Benedikt Heintel |
|---|
| | 14 | - DOCS: |
|---|
| | 15 | * SuSE: updated installation |
|---|
| | 16 | - GUI: |
|---|
| | 17 | * fixed stupid default domain error |
|---|
| | 18 | * fixed bug #165: encoding not set |
|---|
| | 19 | * added link to admin-panel in default e-mail |
|---|
| | 20 | |
|---|
| | 21 | 2007-04-17 Benedikt Heintel |
|---|
| 14 | 22 | - CONFIGS: |
|---|
| 15 | 23 | * fixed bug #174: master not longer reachable on adding Domain |
|---|
| r478 |
r511 |
|
| 1 | | ISPCP ω (OMEGA) HowTo Install for RedHat (Enterprise), CentOS |
|---|
| | 1 | ISPCP ω (OMEGA) HowTo Install for SuSE, SLES |
|---|
| 2 | 2 | ================================================================================ |
|---|
| 3 | 3 | For other Linux distributions please check the other INSTALL files. |
|---|
| … | … | |
| 17 | 17 | 1) Version Info |
|---|
| 18 | 18 | --------------- |
|---|
| 19 | | ISPCP ω Version: 1.0.0 |
|---|
| 20 | | INSTALL Skript: 0.9 |
|---|
| | 19 | ISPCP ω Version: 1.0.0 |
|---|
| | 20 | INSTALL Skript: 1.0 |
|---|
| 21 | 21 | Maintainer: |
|---|
| 22 | 22 | Homepage: http://isp-contol.net |
|---|
| 23 | | Linux Distris: RedHat (Enterprise), CentOS |
|---|
| | 23 | Linux Distris: SuSE, SLES |
|---|
| 24 | 24 | |
|---|
| 25 | 25 | ================================================================================ |
|---|
| … | … | |
| 33 | 33 | Debian (or even any other *NIX-Distribution) |
|---|
| 34 | 34 | |
|---|
| 35 | | All RedHat (Professional), CentOS required packages are listed in |
|---|
| 36 | | ./docs/RedHat/redhat-packages |
|---|
| | 35 | All SuSE, SLES required packages are listed in |
|---|
| | 36 | ./docs/SuSE/suse-packages |
|---|
| 37 | 37 | |
|---|
| 38 | 38 | ================================================================================ |
|---|
| … | … | |
| 62 | 62 | |
|---|
| 63 | 63 | 3. Install the required modules: |
|---|
| 64 | | # yum upgrade |
|---|
| 65 | | # wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm |
|---|
| 66 | | # yum remove sendmail |
|---|
| 67 | | # yum install `cat ./docs/RedHat/redhat-packages` |
|---|
| | 64 | # yast upgrade |
|---|
| | 65 | # yast -i `cat ./docs/SuSE/suse-packages` |
|---|
| 68 | 66 | |
|---|
| 69 | 67 | 4. Now there are two ways of install ISPCP ω |
|---|
| r479 |
r511 |
|
| 2029 | 2029 | |
|---|
| 2030 | 2030 | my $index_tpl = ''; |
|---|
| | 2031 | my $vhost = $main::cfg{'BASE_SERVER_VHOST'}; |
|---|
| 2031 | 2032 | |
|---|
| 2032 | 2033 | ($rs, $index_tpl) = get_file("$root_dir/gui/domain_default_page/index.html"); |
|---|
| … | … | |
| 2035 | 2036 | |
|---|
| 2036 | 2037 | $index_tpl =~ s/{DOMAIN_NAME}/$dmn_name/gi; |
|---|
| 2037 | | $index_tpl =~ s/{BASE_SERVER_VHOST}/$main::cfg{'BASE_SERVER_VHOST'}/gi; |
|---|
| | 2038 | $index_tpl =~ s/{BASE_SERVER_VHOST}/$vhost/gi; |
|---|
| 2038 | 2039 | |
|---|
| 2039 | 2040 | ($rs, $rdata) = store_file( |
|---|
| r491 |
r511 |
|
| 88 | 88 | <tr> |
|---|
| 89 | 89 | <td> </td> |
|---|
| 90 | | <td>If you are the Administrator of this domain, please login <a href="{BASE_SERVER_VHOST}" class="link">here</a>.</td> |
|---|
| | 90 | <td>If you are the Administrator of this domain, please login <a href="http://{BASE_SERVER_VHOST}" class="link">here</a>.</td> |
|---|
| 91 | 91 | <td> </td> |
|---|
| 92 | 92 | </tr> |
|---|
| r474 |
r511 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| | 3 | * ispCP (OMEGA) a Virtual Hosting Control Panel |
|---|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | 6 | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | 7 | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 8 | * @author Benedikt Heintel, ispCP Team (2007) |
|---|
| 9 | 9 | * |
|---|
| 10 | 10 | * @license |
|---|
| … | … | |
| 1699 | 1699 | $headers = "From: ISPCP Logging Daemon <$admin_email>\n"; |
|---|
| 1700 | 1700 | |
|---|
| 1701 | | $headers .= "MIME-Version: 1.0\nContent-Type: text/plain\nContent-Transfer-Encoding: 7bit\n"; |
|---|
| 1702 | | |
|---|
| 1703 | | $headers .= "X-Mailer: ISPCP $Version Logging Mailer"; |
|---|
| | 1701 | $headers .= "MIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 7bit\n"; |
|---|
| | 1702 | |
|---|
| | 1703 | $headers .= "X-Mailer: ISPCP $Version Logging Mailer"; |
|---|
| 1704 | 1704 | |
|---|
| 1705 | 1705 | $mail_result = mail($to, $subject, $message, $headers); |
|---|
| … | … | |
| 1721 | 1721 | $admin_login = $_SESSION['user_logged']; |
|---|
| 1722 | 1722 | |
|---|
| 1723 | | $data = get_welcome_email($admin_id); |
|---|
| 1724 | | |
|---|
| 1725 | | $from_name = $data['sender_name']; |
|---|
| 1726 | | |
|---|
| 1727 | | $from_email = $data['sender_email']; |
|---|
| | 1723 | $data = get_welcome_email($admin_id); |
|---|
| | 1724 | |
|---|
| | 1725 | $from_name = $data['sender_name']; |
|---|
| | 1726 | |
|---|
| | 1727 | $from_email = $data['sender_email']; |
|---|
| 1728 | 1728 | |
|---|
| 1729 | 1729 | $subject = $data['subject']; |
|---|
| 1730 | 1730 | |
|---|
| 1731 | 1731 | $message = $data['message']; |
|---|
| | 1732 | |
|---|
| | 1733 | $base_vhost = $cfg['BASE_SERVER_VHOST']; |
|---|
| 1732 | 1734 | |
|---|
| 1733 | 1735 | if ($from_name) { |
|---|
| … | … | |
| 1763 | 1765 | $message = preg_replace("/\{NAME\}/", $name, $message); |
|---|
| 1764 | 1766 | $message = preg_replace("/\{PASSWORD\}/", $password, $message); |
|---|
| | 1767 | $message = preg_replace("/\{BASE_SERVER_VHOST\}/", $base_vhost, $message); |
|---|
| 1765 | 1768 | |
|---|
| 1766 | 1769 | $headers = "From: $from\n"; |
|---|
| 1767 | 1770 | |
|---|
| 1768 | | $headers .= "MIME-Version: 1.0\nContent-Type: text/plain\nContent-Transfer-Encoding: 7bit\n"; |
|---|
| 1769 | | |
|---|
| 1770 | | $headers .= "X-Mailer: ISPCP ".$cfg['Version']." Service Mailer"; |
|---|
| | 1771 | $headers .= "MIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 7bit\n"; |
|---|
| | 1772 | |
|---|
| | 1773 | $headers .= "X-Mailer: ISPCP ".$cfg['Version']." Service Mailer"; |
|---|
| 1771 | 1774 | |
|---|
| 1772 | 1775 | $mail_result = mail($to, $subject, $message, $headers); |
|---|
| … | … | |
| 2753 | 2756 | $headers = "From: $from\n"; |
|---|
| 2754 | 2757 | |
|---|
| 2755 | | $headers .= "MIME-Version: 1.0\nContent-Type: text/plain\nContent-Transfer-Encoding: 7bit\n"; |
|---|
| 2756 | | |
|---|
| 2757 | | $headers .= "X-Mailer: ISPCP ".$cfg['Version']." Tickets Mailer"; |
|---|
| | 2758 | $headers .= "MIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 7bit\n"; |
|---|
| | 2759 | |
|---|
| | 2760 | $headers .= "X-Mailer: ISPCP ".$cfg['Version']." Tickets Mailer"; |
|---|
| 2758 | 2761 | |
|---|
| 2759 | 2762 | $mail_result = mail($to, $subject, $message, $headers); |
|---|
| … | … | |
| 2790 | 2793 | } |
|---|
| 2791 | 2794 | |
|---|
| 2792 | | |
|---|
| 2793 | 2795 | ?> |
|---|
| r474 |
r511 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| | 3 | * ispCP (OMEGA) a Virtual Hosting Control Panel |
|---|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | 6 | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | 7 | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 8 | * @author Benedikt Heintel, ispCP Team (2007) |
|---|
| 9 | 9 | * |
|---|
| 10 | 10 | * @license |
|---|
| … | … | |
| 55 | 55 | } |
|---|
| 56 | 56 | |
|---|
| 57 | | } |
|---|
| | 57 | } |
|---|
| 58 | 58 | |
|---|
| 59 | 59 | $data['sender_email'] = $rs->fields('email'); |
|---|
| … | … | |
| 79 | 79 | |
|---|
| 80 | 80 | } else { |
|---|
| 81 | | |
|---|
| | 81 | |
|---|
| 82 | 82 | $data['subject'] = ''; |
|---|
| 83 | | |
|---|
| | 83 | |
|---|
| 84 | 84 | $data['message'] = ''; |
|---|
| 85 | | |
|---|
| 86 | | } |
|---|
| 87 | | |
|---|
| | 85 | |
|---|
| | 86 | } |
|---|
| | 87 | |
|---|
| 88 | 88 | return $data; |
|---|
| 89 | 89 | |
|---|
| … | … | |
| 133 | 133 | |
|---|
| 134 | 134 | exec_query($sql, $query, array($data['subject'], $data['message'], $admin_id, $tpl_name)); |
|---|
| 135 | | |
|---|
| | 135 | |
|---|
| 136 | 136 | } |
|---|
| 137 | 137 | |
|---|
| … | … | |
| 142 | 142 | if (!$data['subject']) { |
|---|
| 143 | 143 | |
|---|
| 144 | | $data['subject'] = 'Welcome new ISPCP user {USERNAME} !'; |
|---|
| 145 | | |
|---|
| 146 | | } |
|---|
| 147 | | |
|---|
| 148 | | if (!$data['message']) { |
|---|
| 149 | | |
|---|
| 150 | | $data['message'] = <<<MSG |
|---|
| 151 | | |
|---|
| 152 | | Hello {NAME} ! |
|---|
| 153 | | |
|---|
| 154 | | Your ISPCP user type is: {USERTYPE} |
|---|
| 155 | | Your ISPCP login is: {USERNAME} |
|---|
| 156 | | Your ISPCP password is: {PASSWORD} |
|---|
| 157 | | |
|---|
| 158 | | |
|---|
| 159 | | Good luck with ISPCP Pro system! |
|---|
| 160 | | ISPCP Team. |
|---|
| | 144 | $data['subject'] = 'Welcome new ISPCP user {USERNAME}!'; |
|---|
| | 145 | |
|---|
| | 146 | } |
|---|
| | 147 | |
|---|
| | 148 | if (!$data['message']) { |
|---|
| | 149 | |
|---|
| | 150 | $data['message'] = <<<MSG |
|---|
| | 151 | |
|---|
| | 152 | Hello {NAME}! |
|---|
| | 153 | |
|---|
| | 154 | Your ispCP user type is: {USERTYPE} |
|---|
| | 155 | Your ispCP login is: {USERNAME} |
|---|
| | 156 | Your ispCP password is: {PASSWORD} |
|---|
| | 157 | |
|---|
| | 158 | You can login at http://{BASE_SERVER_VHOST} |
|---|
| | 159 | |
|---|
| | 160 | Good luck with the ispCP system! |
|---|
| | 161 | The ispCP Team. |
|---|
| 161 | 162 | |
|---|
| 162 | 163 | MSG; |
|---|
| … | … | |
| 171 | 172 | |
|---|
| 172 | 173 | set_email_tpl_data($admin_id, 'add-user-auto-msg', $data); |
|---|
| 173 | | |
|---|
| | 174 | |
|---|
| 174 | 175 | } |
|---|
| 175 | 176 | |
|---|
| … | … | |
| 183 | 184 | |
|---|
| 184 | 185 | } |
|---|
| 185 | | |
|---|
| 186 | | if (!$data['message']) { |
|---|
| 187 | | |
|---|
| 188 | | $data['message'] = <<<MSG |
|---|
| 189 | | |
|---|
| 190 | | Hello {NAME} ! |
|---|
| | 186 | |
|---|
| | 187 | if (!$data['message']) { |
|---|
| | 188 | |
|---|
| | 189 | $data['message'] = <<<MSG |
|---|
| | 190 | |
|---|
| | 191 | Hello {NAME}! |
|---|
| 191 | 192 | Use this link to activate your new ISPCP password: |
|---|
| 192 | 193 | |
|---|
| 193 | 194 | {LINK} |
|---|
| 194 | 195 | |
|---|
| 195 | | |
|---|
| 196 | | Good Luck with ISPCP Pro System |
|---|
| 197 | | Hosting Provider Team |
|---|
| | 196 | Good Luck with the ispCP System |
|---|
| | 197 | The ispCP Team |
|---|
| 198 | 198 | |
|---|
| 199 | 199 | MSG; |
|---|
| … | … | |
| 220 | 220 | |
|---|
| 221 | 221 | } |
|---|
| 222 | | |
|---|
| 223 | | if (!$data['message']) { |
|---|
| 224 | | |
|---|
| 225 | | $data['message'] = <<<MSG |
|---|
| 226 | | |
|---|
| 227 | | Hello {NAME} ! |
|---|
| 228 | | |
|---|
| 229 | | Your ISPCP login is: {USERNAME} |
|---|
| 230 | | Your ISPCP password is: {PASSWORD} |
|---|
| 231 | | |
|---|
| 232 | | |
|---|
| 233 | | Good Luck with ISPCP Pro System |
|---|
| 234 | | Hosting Provider Team |
|---|
| | 222 | |
|---|
| | 223 | if (!$data['message']) { |
|---|
| | 224 | |
|---|
| | 225 | $data['message'] = <<<MSG |
|---|
| | 226 | |
|---|
| | 227 | Hello {NAME}! |
|---|
| | 228 | |
|---|
| | 229 | Your ispCP login is: {USERNAME} |
|---|
| | 230 | Your ispCP password is: {PASSWORD} |
|---|
| | 231 | |
|---|
| | 232 | You can login at http://{BASE_SERVER_VHOST} |
|---|
| | 233 | |
|---|
| | 234 | Good Luck with the ispCP System |
|---|
| | 235 | The ispCP Team |
|---|
| 235 | 236 | |
|---|
| 236 | 237 | MSG; |
|---|
| … | … | |
| 257 | 258 | |
|---|
| 258 | 259 | } |
|---|
| 259 | | |
|---|
| | 260 | |
|---|
| 260 | 261 | if (!$data['message']) { |
|---|
| 261 | 262 | |
|---|
| … | … | |
| 263 | 264 | |
|---|
| 264 | 265 | Dear {NAME}, |
|---|
| 265 | | This is an automatic confirmation for the order of the domain : |
|---|
| | 266 | This is an automatic confirmation for the order of the domain: |
|---|
| 266 | 267 | |
|---|
| 267 | 268 | {DOMAIN} |
|---|
| 268 | 269 | |
|---|
| 269 | | Thank you for using ISPCP services. |
|---|
| 270 | | Your ISPCP Team |
|---|
| | 270 | Thank you for using ispCP services. |
|---|
| | 271 | The ISPCP Team |
|---|
| 271 | 272 | |
|---|
| 272 | 273 | MSG; |
|---|
| r474 |
r511 |
|
| 1 | 1 | <?php |
|---|
| 2 | 2 | /** |
|---|
| 3 | | * ispCP (OMEGA) - Virtual Hosting Control System | Omega Version |
|---|
| | 3 | * ispCP (OMEGA) a Virtual Hosting Control Panel |
|---|
| 4 | 4 | * |
|---|
| 5 | 5 | * @copyright 2001-2006 by moleSoftware GmbH |
|---|
| 6 | 6 | * @copyright 2006-2007 by ispCP | http://isp-control.net |
|---|
| 7 | 7 | * @link http://isp-control.net |
|---|
| 8 | | * @author ispCP Team (2007) |
|---|
| | 8 | * @author BenediktHeintel, ispCP Team (2007) |
|---|
| 9 | 9 | * |
|---|
| 10 | 10 | * @license |
|---|
| … | … | |
| 33 | 33 | |
|---|
| 34 | 34 | function captcha_fontfile_exists() { |
|---|
| 35 | | |
|---|
| | 35 | |
|---|
| 36 | 36 | global $cfg; |
|---|
| 37 | 37 | |
|---|
| 38 | 38 | if (file_exists($cfg['LOSTPASSWORD_CAPTCHA_FONT'])) |
|---|
| 39 | | |
|---|
| | 39 | |
|---|
| 40 | 40 | return true; |
|---|
| 41 | 41 | |
|---|
| … | … | |
| 43 | 43 | |
|---|
| 44 | 44 | return false; |
|---|
| 45 | | |
|---|
| | 45 | |
|---|
| 46 | 46 | } |
|---|
| 47 | 47 | |
|---|
| … | … | |
| 130 | 130 | |
|---|
| 131 | 131 | } |
|---|
| 132 | | |
|---|
| | 132 | |
|---|
| 133 | 133 | $_SESSION[$strSessionVar] = $str; |
|---|
| 134 | 134 | |
|---|
| … | … | |
| 279 | 279 | $rs = exec_query($sql, $query, array('', '', $uniqkey)); |
|---|
| 280 | 280 | |
|---|
| 281 | | if ($created_by == 0) $created_by = 1; |
|---|
| 282 | | |
|---|
| 283 | | $data = get_lostpassword_password_email($created_by); |
|---|
| 284 | | |
|---|
| 285 | | $from_name = $data['sender_name']; |
|---|
| 286 | | |
|---|
| 287 | | $from_email = $data['sender_email']; |
|---|
| | 281 | if ($created_by == 0) $created_by = 1; |
|---|
| | 282 | |
|---|
| | 283 | $data = get_lostpassword_password_email($created_by); |
|---|
| | 284 | |
|---|
| | 285 | $from_name = $data['sender_name']; |
|---|
| | 286 | |
|---|
| | 287 | $from_email = $data['sender_email']; |
|---|
| 288 | 288 | |
|---|
| 289 | 289 | $subject = $data['subject']; |
|---|
| … | … | |
| 291 | 291 | $message = $data['message']; |
|---|
| 292 | 292 | |
|---|
| | 293 | $base_vhost = $cfg['BASE_SERVER_VHOST']; |
|---|
| | 294 | |
|---|
| 293 | 295 | if ($from_name) { |
|---|
| 294 | 296 | |
|---|
| 295 | 297 | $from = $from_name . "<" . $from_email . ">"; |
|---|
| 296 | 298 | |
|---|
| 297 | | } else { |
|---|
| | 299 | } |
|---|
| | 300 | else { |
|---|
| 298 | 301 | |
|---|
| 299 | 302 | $from = $from_email; |
|---|
| 300 | | } |
|---|
| | 303 | } |
|---|
| 301 | 304 | |
|---|
| 302 | 305 | $subject = preg_replace("/\{USERNAME\}/", $admin_name, $subject); |
|---|
| 303 | | |
|---|
| 304 | 306 | $message = preg_replace("/\{USERNAME\}/", $admin_name, $message); |
|---|
| 305 | | |
|---|
| 306 | 307 | $message = preg_replace("/\{NAME\}/", $admin_fname . " " . $admin_lname, $message); |
|---|
| 307 | | |
|---|
| 308 | 308 | $message = preg_replace("/\{PASSWORD\}/", $upass, $message); |
|---|
| | 309 | $message = preg_replace("/\{BASE_SERVER_VHOST\}/", $base_vhost, $message); |
|---|
| 309 | 310 | |
|---|
| 310 | 311 | $headers = "From: $from\n"; |
|---|
| 311 | 312 | |
|---|
| 312 | | $headers .= "MIME-Version: 1.0\nContent-Type: text/plain\nContent-Transfer-Encoding: 7bit\n"; |
|---|
| | 313 | $headers .= "MIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 7bit\n"; |
|---|
| 313 | 314 | |
|---|
| 314 | 315 | $headers .= "X-Mailer: ISPCP Pro lostpassword mailer"; |
|---|
| … | … | |
| 332 | 333 | global $sql; |
|---|
| 333 | 334 | |
|---|
| 334 | | $query = <<<SQL_QUERY |
|---|
| | 335 | $query = <<<SQL_QUERY |
|---|
| 335 | 336 | SELECT |
|---|
| 336 | 337 | created_by, fname, lname, email |
|---|
| … | … | |
| 341 | 342 | SQL_QUERY; |
|---|
| 342 | 343 | |
|---|
| 343 | | $res = exec_query($sql, $query, array($admin_name)); |
|---|
| | 344 | $res = exec_query($sql, $query, array($admin_name)); |
|---|
| 344 | 345 | |
|---|
| 345 | 346 | if ($res -> RecordCount() == 1) { |
|---|
| 346 | 347 | |
|---|
| 347 | | $created_by = $res -> fields['created_by']; |
|---|
| 348 | | |
|---|
| 349 | | $admin_fname = $res -> fields['fname']; |
|---|
| | 348 | $created_by = $res -> fields['created_by']; |
|---|
| | 349 | |
|---|
| | 350 | $admin_fname = $res -> fields['fname']; |
|---|
| 350 | 351 | |
|---|
| 351 | 352 | $admin_lname = $res -> fields['lname']; |
|---|
| … | … | |
| 353 | 354 | $to = $res -> fields['email']; |
|---|
| 354 | 355 | |
|---|
| 355 | | $uniqkey = uniqkeygen(); |
|---|
| 356 | | |
|---|
| 357 | | setUniqKey($admin_name, $uniqkey); |
|---|
| | 356 | $uniqkey = uniqkeygen(); |
|---|
| | 357 | |
|---|
| | 358 | setUniqKey($admin_name, $uniqkey); |
|---|
| 358 | 359 | |
|---|
| 359 | 360 | write_log("Lostpassword: ".$admin_name.": uniqkey created"); |
|---|
| 360 | 361 | |
|---|
| 361 | | if ($created_by == 0) $created_by = 1; |
|---|
| 362 | | |
|---|
| 363 | | $data = get_lostpassword_activation_email($created_by); |
|---|
| 364 | | |
|---|
| 365 | | $from_name = $data['sender_name']; |
|---|
| 366 | | |
|---|
| 367 | | $from_email = $data['sender_email']; |
|---|
| | 362 | if ($created_by == 0) $created_by = 1; |
|---|
| | 363 | |
|---|
| | 364 | $data = get_lostpassword_activation_email($created_by); |
|---|
| | 365 | |
|---|
| | 366 | $from_name = $data['sender_name']; |
|---|
| | 367 | |
|---|
| | 368 | $from_email = $data['sender_email']; |
|---|
| 368 | 369 | |
|---|
| 369 | 370 | $subject = $data['subject']; |
|---|
| … | … | |
| 371 | 372 | $message = $data['message']; |
|---|
| 372 | 373 | |
|---|
| | 374 | $base_vhost = $cfg['BASE_SERVER_VHOST']; |
|---|
| | 375 | |
|---|
| 373 | 376 | if ($from_name) { |
|---|
| 374 | 377 | |
|---|
| 375 | 378 | $from = $from_name . "<" . $from_email . ">"; |
|---|
| 376 | 379 | |
|---|
| 377 | | } else { |
|---|
| | 380 | } |
|---|
| | 381 | else { |
|---|
| 378 | 382 | |
|---|
| 379 | 383 | $from = $from_email; |
|---|
| 380 | | } |
|---|
| 381 | | |
|---|
| 382 | | switch( $_SERVER["SERVER_PORT"] ) { |
|---|
| 383 | | |
|---|
| 384 | | case "80": $prot = "http://"; |
|---|
| 385 | | |
|---|
| | 384 | } |
|---|
| | 385 | |
|---|
| | 386 | switch( $_SERVER["SERVER_PORT"] ) { |
|---|
| | 387 | |
|---|
| | 388 | case "80": |
|---|
| | 389 | $prot = "http://"; |
|---|
| 386 | 390 | break; |
|---|
| 387 | | |
|---|
| 388 | | case "443": $prot = "https://"; |
|---|
| 389 | | |
|---|
| | 391 | case "443": |
|---|
| | 392 | $prot = "https://"; |
|---|
| 390 | 393 | break; |
|---|
| 391 | | |
|---|
| 392 | | } |
|---|
| 393 | | |
|---|
| 394 | | $link = $prot . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"] . "?key=" . $uniqkey; |
|---|
| | 394 | } |
|---|
| | 395 | |
|---|
| | 396 | $link = $prot . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"] . "?key=" . $uniqkey; |
|---|
| 395 | 397 | |
|---|
| 396 | 398 | $subject = preg_replace("/\{USERNAME\}/", $admin_name, $subject); |
|---|
| 397 | | |
|---|
| 398 | 399 | $message = preg_replace("/\{NAME\}/", $admin_fname . " " . $admin_lname, $message); |
|---|
| 399 | | |
|---|
| 400 | 400 | $message = preg_replace("/\{LINK\}/", $link, $message); |
|---|
| | 401 | $message = preg_replace("/\{BASE_SERVER_VHOST\}/", $base_vhost, $message); |
|---|
| 401 | 402 | |
|---|
| 402 | 403 | $headers = "From: $from\n"; |
|---|
| 403 | 404 | |
|---|
| 404 | | $headers .= "MIME-Version: 1.0\nContent-Type: text/plain\nContent-Transfer-Encoding: 7bit\n"; |
|---|
| 405 | | |
|---|
| 406 | | $headers .= "X-Mailer: ISPCP Pro lostpassword mailer"; |
|---|
| | 405 | $headers .= "MIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 7bit\n"; |
|---|
| | 406 | |
|---|
| | 407 | $headers .= "X-Mailer: ISPCP lostpassword mailer"; |
|---|
| 407 | 408 | |
|---|
| 408 | 409 | $mail_result = mail($to, $subject, $message, $headers); |
|---|
|