Changeset 1350
- Timestamp:
- 09/15/08 12:36:00
(3 months ago)
- Author:
- scitech
- Message:
Fixed #1396: Wordwrap in ticket system (admin / client). Fixed #1506: Email edit link inconsistent with other pages. Fixed #1534: Setup script fails if the same username is always used
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1349 |
r1350 |
|
| 1 | 1 | ispCP ω 1.0.0 Changelog |
|---|
| 2 | 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 3 | | 2008-08-26 Daniel Andreca |
|---|
| 4 | | - GUI: |
|---|
| 5 | | * encript email password in database |
|---|
| 6 | | * encript sql password in database |
|---|
| | 3 | |
|---|
| | 4 | 008-09-15 Daniel Andreca |
|---|
| | 5 | - GUI: |
|---|
| | 6 | * Fixed #1396: Wordwrap in ticket system (admin / client) |
|---|
| | 7 | * Fixed #1506: Email edit link inconsistent with other pages |
|---|
| | 8 | - ENGINE: |
|---|
| | 9 | * Fixed #1534: Setup script fails if the same username is always used |
|---|
| | 10 | |
|---|
| | 11 | 2008-09-14 Daniel Andreca |
|---|
| | 12 | - GUI: |
|---|
| | 13 | * Encrypt email password in database |
|---|
| | 14 | * Encrypt sql password in database |
|---|
| 7 | 15 | * Fixed #1535: Wrong error text in user Email creation |
|---|
| 8 | | * Fixed #1396: Wordwrap in ticket system |
|---|
| | 16 | * Fixed #1396: Wordwrap in ticket system (resseler) |
|---|
| 9 | 17 | * Fixed #1533 Hardcoded FTP sepparator |
|---|
| 10 | 18 | |
|---|
| r1320 |
r1350 |
|
| 156 | 156 | # |
|---|
| 157 | 157 | |
|---|
| 158 | | $rs = ask_db_ftp_user(); |
|---|
| 159 | | return $rs if ($rs != 0); |
|---|
| | 158 | do { |
|---|
| | 159 | $rs = ask_db_ftp_user(); |
|---|
| | 160 | } while ($rs == 1); |
|---|
| 160 | 161 | |
|---|
| 161 | 162 | do { |
|---|
| … | … | |
| 167 | 168 | # |
|---|
| 168 | 169 | |
|---|
| 169 | | $rs = ask_db_pma_user(); |
|---|
| 170 | | return $rs if ($rs != 0); |
|---|
| | 170 | do { |
|---|
| | 171 | $rs = ask_db_pma_user(); |
|---|
| | 172 | } while ($rs == 1); |
|---|
| 171 | 173 | |
|---|
| 172 | 174 | do { |
|---|
| r1327 |
r1350 |
|
| 234 | 234 | $main::ua{'db_ftp_user'} = $db_user; |
|---|
| 235 | 235 | } |
|---|
| 236 | | else { |
|---|
| | 236 | elsif( $rdata eq $main::ua{'db_user'}) { |
|---|
| | 237 | $qmsg = "\n\tftp SQL user must not be identical to system SQL user!"; |
|---|
| | 238 | print STDOUT $qmsg; |
|---|
| | 239 | return 1; |
|---|
| | 240 | } else { |
|---|
| 237 | 241 | $main::ua{'db_ftp_user'} = $rdata; |
|---|
| 238 | 242 | } |
|---|
| … | … | |
| 471 | 475 | if (!defined($rdata) || $rdata eq '') { |
|---|
| 472 | 476 | $main::ua{'db_pma_user'} = $db_user; |
|---|
| | 477 | } elsif( $rdata eq $main::ua{'db_user'}){ |
|---|
| | 478 | $qmsg = "\n\tphpMyAdmin Control user must not be identical to system SQL user!"; |
|---|
| | 479 | print STDOUT $qmsg; |
|---|
| | 480 | return 1; |
|---|
| | 481 | } elsif ($rdata eq $main::ua{'db_ftp_user'}) { |
|---|
| | 482 | $qmsg = "\n\tphpMyAdmin Control user must not be identical to ftp SQL user!"; |
|---|
| | 483 | print STDOUT $qmsg; |
|---|
| | 484 | return 1; |
|---|
| 473 | 485 | } else { |
|---|
| 474 | 486 | $main::ua{'db_pma_user'} = $rdata; |
|---|
| r1327 |
r1350 |
|
| 146 | 146 | $ticket_subject = $rs->fields['ticket_subject']; |
|---|
| 147 | 147 | $ticket_date = clean_html($rs->fields['ticket_date']); |
|---|
| 148 | | $ticket_message = clean_html(nl2br($rs->fields['ticket_message'])); |
|---|
| | 148 | $ticket_message = wordwrap(html_entity_decode($rs->fields['ticket_message']), round(($screenwidth-200) / 7), "\n"); |
|---|
| 149 | 149 | |
|---|
| 150 | 150 | $date_formt = Config::get('DATE_FORMAT'); |
|---|
| … | … | |
| 152 | 152 | array( |
|---|
| 153 | 153 | 'DATE' => date($date_formt, $rs->fields['ticket_date']), |
|---|
| 154 | | 'TICKET_CONTENT' => wordwrap(html_entity_decode(nl2br($rs->fields['ticket_message'])), round(($screenwidth-200) / 7), "<br>\n", 1), |
|---|
| 155 | | // 'ID' => $rs -> fields['ticket_reply'], |
|---|
| | 154 | 'TICKET_CONTENT' => nl2br($ticket_message) |
|---|
| 156 | 155 | ) |
|---|
| 157 | 156 | ); |
|---|
| r1327 |
r1350 |
|
| 47 | 47 | function gen_user_mail_action($mail_id, $mail_status) { |
|---|
| 48 | 48 | if ($mail_status === Config::get('ITEM_OK_STATUS')) { |
|---|
| 49 | | return array(tr('Delete'), "mail_delete.php?id=$mail_id", "mail_edit.php?id=$mail_id"); |
|---|
| 50 | | } else { |
|---|
| 51 | | return array(tr('N/A'), '#', '#'); |
|---|
| | 49 | return array(tr('Delete'), "mail_delete.php?id=$mail_id", tr('Edit'), "mail_edit.php?id=$mail_id"); |
|---|
| | 50 | } else { |
|---|
| | 51 | return array(tr('N/A'), '#', tr('N/A'), '#'); |
|---|
| 52 | 52 | } |
|---|
| 53 | 53 | } |
|---|
| … | … | |
| 122 | 122 | } |
|---|
| 123 | 123 | |
|---|
| 124 | | list($mail_action, $mail_action_script, $mail_edit_script) = gen_user_mail_action($rs->fields['mail_id'], $rs->fields['status']); |
|---|
| | 124 | list($mail_delete, $mail_delete_script, $mail_edit, $mail_edit_script) = gen_user_mail_action($rs->fields['mail_id'], $rs->fields['status']); |
|---|
| 125 | 125 | |
|---|
| 126 | 126 | $mail_acc = decode_idna($rs->fields['mail_acc']); |
|---|
| … | … | |
| 139 | 139 | 'MAIL_TYPE' => $mail_type, |
|---|
| 140 | 140 | 'MAIL_STATUS' => translate_dmn_status($rs->fields['status']), |
|---|
| 141 | | 'MAIL_ACTION' => $mail_action, |
|---|
| 142 | | 'MAIL_ACTION_SCRIPT'=> $mail_action_script, |
|---|
| | 141 | 'MAIL_DELETE' => $mail_delete, |
|---|
| | 142 | 'MAIL_DELETE_SCRIPT'=> $mail_delete_script, |
|---|
| | 143 | 'MAIL_EDIT' => $mail_edit, |
|---|
| 143 | 144 | 'MAIL_EDIT_SCRIPT' => $mail_edit_script |
|---|
| 144 | 145 | ) |
|---|
| … | … | |
| 200 | 201 | } |
|---|
| 201 | 202 | |
|---|
| 202 | | list($mail_action, $mail_action_script, $mail_edit_script) = gen_user_mail_action($rs->fields['mail_id'], $rs->fields['status']); |
|---|
| | 203 | list($mail_delete, $mail_delete_script, $mail_edit, $mail_edit_script) = gen_user_mail_action($rs->fields['mail_id'], $rs->fields['status']); |
|---|
| 203 | 204 | |
|---|
| 204 | 205 | $mail_acc = decode_idna($rs->fields['mail_acc']); |
|---|
| … | … | |
| 216 | 217 | |
|---|
| 217 | 218 | $tpl->assign( |
|---|
| 218 | | array('MAIL_ACC' => $mail_acc . "@" . $show_sub_name . "." . $show_dmn_name, |
|---|
| | 219 | array( |
|---|
| | 220 | 'MAIL_ACC' => $mail_acc . "@" . $show_sub_name . "." . $show_dmn_name, |
|---|
| 219 | 221 | 'MAIL_TYPE' => $mail_type, |
|---|
| 220 | 222 | 'MAIL_STATUS' => translate_dmn_status($rs->fields['status']), |
|---|
| 221 | | 'MAIL_ACTION' => $mail_action, |
|---|
| 222 | | 'MAIL_ACTION_SCRIPT'=> $mail_action_script, |
|---|
| | 223 | 'MAIL_DELETE' => $mail_delete, |
|---|
| | 224 | 'MAIL_DELETE_SCRIPT'=> $mail_delete_script, |
|---|
| | 225 | 'MAIL_EDIT' => $mail_edit, |
|---|
| 223 | 226 | 'MAIL_EDIT_SCRIPT' => $mail_edit_script |
|---|
| 224 | 227 | ) |
|---|
| … | … | |
| 279 | 282 | $tpl->assign('ITEM_CLASS', 'content2'); |
|---|
| 280 | 283 | } |
|---|
| 281 | | list($mail_action, $mail_action_script, $mail_edit_script) = gen_user_mail_action($rs->fields['mail_id'], $rs->fields['status']); |
|---|
| | 284 | list($mail_delete, $mail_delete_script, $mail_edit, $mail_edit_script) = gen_user_mail_action($rs->fields['mail_id'], $rs->fields['status']); |
|---|
| 282 | 285 | |
|---|
| 283 | 286 | $mail_acc = decode_idna($rs->fields['mail_acc']); |
|---|
| … | … | |
| 298 | 301 | 'MAIL_TYPE' => $mail_type, |
|---|
| 299 | 302 | 'MAIL_STATUS' => translate_dmn_status($rs->fields['status']), |
|---|
| 300 | | 'MAIL_ACTION' => $mail_action, |
|---|
| 301 | | 'MAIL_ACTION_SCRIPT'=> $mail_action_script, |
|---|
| | 303 | 'MAIL_DELETE' => $mail_delete, |
|---|
| | 304 | 'MAIL_DELETE_SCRIPT'=> $mail_delete_script, |
|---|
| | 305 | 'MAIL_EDIT' => $mail_edit, |
|---|
| 302 | 306 | 'MAIL_EDIT_SCRIPT' => $mail_edit_script |
|---|
| 303 | 307 | ) |
|---|
| r1327 |
r1350 |
|
| 124 | 124 | $ticket_date = $rs->fields['ticket_date']; |
|---|
| 125 | 125 | $ticket_message = clean_input($rs->fields['ticket_message']); |
|---|
| | 126 | $ticket_content = wordwrap(html_entity_decode($rs->fields['ticket_message']), round(($screenwidth-200) / 7), "\n"); |
|---|
| 126 | 127 | |
|---|
| 127 | 128 | $date_formt = Config::get('DATE_FORMAT'); |
|---|
| 128 | | $tpl->assign(array('DATE' => date($date_formt, $rs->fields['ticket_date']), |
|---|
| 129 | | 'TICKET_CONTENT' => wordwrap(html_entity_decode(nl2br($rs->fields['ticket_message'])), round(($screenwidth-200) / 7), "<br>\n", 1), |
|---|
| 130 | | // 'ID' => $rs -> fields['ticket_reply'], |
|---|
| 131 | | )); |
|---|
| | 129 | $tpl->assign( |
|---|
| | 130 | array( |
|---|
| | 131 | 'DATE' => date($date_formt, $rs->fields['ticket_date']), |
|---|
| | 132 | 'TICKET_CONTENT' => nl2br($ticket_content) |
|---|
| | 133 | ) |
|---|
| | 134 | ); |
|---|
| 132 | 135 | get_ticket_from($tpl, $sql, $ticket_id); |
|---|
| 133 | 136 | $tpl->parse('TICKETS_ITEM', '.tickets_item'); |
|---|
| r1290 |
r1350 |
|
| 64 | 64 | <!-- BDP: page_message --> |
|---|
| 65 | 65 | <tr> |
|---|
| 66 | | <td colspan="4" nowrap="nowrap" class="title"><span class="message">{MESSAGE}</span></td> |
|---|
| | 66 | <td colspan="5" nowrap="nowrap" class="title"><span class="message">{MESSAGE}</span></td> |
|---|
| 67 | 67 | </tr> |
|---|
| 68 | 68 | <tr> |
|---|
| … | … | |
| 71 | 71 | <td nowrap="nowrap" class="content3" width="150"><b>{TR_TYPE}</b></td> |
|---|
| 72 | 72 | <td nowrap="nowrap" class="content3" align="center" width="180"><b>{TR_STATUS}</b></td> |
|---|
| 73 | | <td nowrap="nowrap" class="content3" align="center" width="100"><b>{TR_ACTION}</b></td> |
|---|
| | 73 | <td nowrap="nowrap" class="content3" align="center" width="100" colspan="5"><b>{TR_ACTION}</b></td> |
|---|
| 74 | 74 | </tr> |
|---|
| 75 | 75 | <!-- BDP: mail_message --> |
|---|
| 76 | 76 | <tr> |
|---|
| 77 | | <td colspan="4" class="title"><span class="message">{MAIL_MSG}</span></td> |
|---|
| | 77 | <td colspan="5" class="title"><span class="message">{MAIL_MSG}</span></td> |
|---|
| 78 | 78 | </tr> |
|---|
| 79 | 79 | <!-- EDP: mail_message --> |
|---|
| 80 | 80 | <!-- BDP: mail_item --> |
|---|
| 81 | 81 | <tr> |
|---|
| 82 | | <td nowrap="nowrap" class="{ITEM_CLASS}"><img src="{THEME_COLOR_PATH}/images/icons/mail_icon.png" width="16" height="14" align="absmiddle"> <a href="{MAIL_EDIT_SCRIPT}" class="link">{MAIL_ACC}</a> |
|---|
| | 82 | <td nowrap="nowrap" class="{ITEM_CLASS}"><img src="{THEME_COLOR_PATH}/images/icons/mail_icon.png" width="16" height="14" align="absmiddle"> {MAIL_ACC} |
|---|
| 83 | 83 | <!-- BDP: auto_respond --><div style="display: {AUTO_RESPOND_VIS};"> |
|---|
| 84 | 84 | <br><span class="style1"> |
|---|
| … | … | |
| 92 | 92 | <td nowrap="nowrap" class="{ITEM_CLASS}" width="150">{MAIL_TYPE}</td> |
|---|
| 93 | 93 | <td nowrap="nowrap" class="{ITEM_CLASS}" align="center" width="180">{MAIL_STATUS}</td> |
|---|
| 94 | | <td nowrap="nowrap" class="{ITEM_CLASS}" align="center" width="100"><img src="{THEME_COLOR_PATH}/images/icons/delete.png" width="16" height="16" border="0" align="absmiddle"> <a href="#" class="link" onclick="action_delete('{MAIL_ACTION_SCRIPT}', '{MAIL_ACC}')">{MAIL_ACTION}</a></td> |
|---|
| | 94 | <td nowrap="nowrap" class="{ITEM_CLASS}" align="center" width="100"><img src="{THEME_COLOR_PATH}/images/icons/delete.png" width="16" height="16" border="0" align="absmiddle"> <a href="#" class="link" onclick="action_delete('{MAIL_DELETE_SCRIPT}', '{MAIL_ACC}')">{MAIL_DELETE}</a></td> |
|---|
| | 95 | <td nowrap="nowrap" class="{ITEM_CLASS}" align="center" width="100"><img src="{THEME_COLOR_PATH}/images/icons/edit.png" width="16" height="16" border="0" align="absmiddle"> <a href="{MAIL_EDIT_SCRIPT}" class="link">{MAIL_EDIT}</a></td> |
|---|
| 95 | 96 | </tr> |
|---|
| 96 | 97 | <!-- EDP: mail_item --> |
|---|
| 97 | 98 | <!-- BDP: mails_total --> |
|---|
| 98 | 99 | <tr> |
|---|
| 99 | | <td colspan="4" align="right" nowrap="nowrap" class="content3">{TR_TOTAL_MAIL_ACCOUNTS}: <b>{TOTAL_MAIL_ACCOUNTS}</b>/{ALLOWED_MAIL_ACCOUNTS}</td> |
|---|
| | 100 | <td colspan="5" align="right" nowrap="nowrap" class="content3">{TR_TOTAL_MAIL_ACCOUNTS}: <b>{TOTAL_MAIL_ACCOUNTS}</b>/{ALLOWED_MAIL_ACCOUNTS}</td> |
|---|
| 100 | 101 | </tr> |
|---|
| 101 | 102 | <!-- EDP: mails_total --> |
|---|
|