Changeset 410
- Timestamp:
- 03/12/07 11:52:04
(2 years ago)
- Author:
- rats
- Message:
- GUI:
* fixed: Some design issues
- changed: behaviour of Lostpassword messages
- modified: layout of some functions
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r405 |
r410 |
|
| 12 | 12 | \_________________________________________________________________/ |
|---|
| 13 | 13 | |
|---|
| | 14 | 2007-03-12 Benedikt Heintel |
|---|
| | 15 | - GUI: |
|---|
| | 16 | * fixed: Some design issues |
|---|
| | 17 | * changed: behaviour of Lostpassword messages |
|---|
| | 18 | * modified: layout of some functions |
|---|
| | 19 | |
|---|
| 14 | 20 | 2007-03-09 Benedikt Heintel |
|---|
| 15 | 21 | - CONFIGS: |
|---|
| 16 | 22 | * proftpd: changed config files for v3.1 |
|---|
| 17 | 23 | - SETUP: |
|---|
| 18 | | * fixed bug #104: error on setting up proFTPd on Debian Etch |
|---|
| | 24 | * fixed bug #104 & #105: error on setting up proFTPd on Debian Etch |
|---|
| 19 | 25 | |
|---|
| 20 | 26 | 2007-03-09 Benedikt Heintel |
|---|
| r154 |
r410 |
|
| 213 | 213 | write_log(htmlspecialchars($user_logged, ENT_QUOTES, "UTF-8") . " bad session data."); |
|---|
| 214 | 214 | |
|---|
| 215 | | return false; |
|---|
| 216 | | |
|---|
| 217 | | } |
|---|
| | 215 | return false; |
|---|
| | 216 | } |
|---|
| 218 | 217 | |
|---|
| 219 | 218 | } |
|---|
| … | … | |
| 222 | 221 | |
|---|
| 223 | 222 | $path = explode("/", $_SERVER['SCRIPT_NAME']); |
|---|
| 224 | | |
|---|
| 225 | | $found = false; |
|---|
| 226 | | |
|---|
| 227 | | for($i = count($path) - 2 ; $i < count($path); $i++) { |
|---|
| 228 | | |
|---|
| 229 | | if($path[$i] == $_SESSION['user_type']){ |
|---|
| 230 | | |
|---|
| 231 | | $found= true; |
|---|
| 232 | | |
|---|
| 233 | | } else if ($_SESSION['user_type'] == 'user' && $path[$i] == 'client') { |
|---|
| 234 | | |
|---|
| 235 | | $found= true; |
|---|
| 236 | | |
|---|
| 237 | | } |
|---|
| 238 | | |
|---|
| | 223 | $found = false; |
|---|
| | 224 | |
|---|
| | 225 | for($i = count($path) - 2 ; $i < count($path); $i++) { |
|---|
| | 226 | if($path[$i] == $_SESSION['user_type']){ |
|---|
| | 227 | $found= true; |
|---|
| | 228 | } |
|---|
| | 229 | else if ($_SESSION['user_type'] == 'user' && $path[$i] == 'client') { |
|---|
| | 230 | $found= true; |
|---|
| | 231 | } |
|---|
| 239 | 232 | } |
|---|
| 240 | 233 | |
|---|
| 241 | 234 | if(!$found) { |
|---|
| 242 | | |
|---|
| 243 | 235 | if ($_SESSION['user_type'] == 'admin') { |
|---|
| 244 | | |
|---|
| 245 | | header("Location: ../admin/manage_users.php"); |
|---|
| 246 | | |
|---|
| 247 | | die(); |
|---|
| 248 | | |
|---|
| 249 | | } else if ($_SESSION['user_type'] == 'reseller') { |
|---|
| 250 | | |
|---|
| 251 | | header("Location: ../reseller/index.php"); |
|---|
| 252 | | |
|---|
| 253 | | die(); |
|---|
| 254 | | |
|---|
| 255 | | } else if ($_SESSION['user_type'] == 'user') { |
|---|
| 256 | | |
|---|
| 257 | | header("Location: ../client/index.php"); |
|---|
| 258 | | |
|---|
| 259 | | die(); |
|---|
| 260 | | |
|---|
| 261 | | } |
|---|
| 262 | | |
|---|
| 263 | | } |
|---|
| 264 | | |
|---|
| | 236 | header("Location: ../admin/manage_users.php"); |
|---|
| | 237 | die(); |
|---|
| | 238 | } |
|---|
| | 239 | else if ($_SESSION['user_type'] == 'reseller') { |
|---|
| | 240 | header("Location: ../reseller/index.php"); |
|---|
| | 241 | die(); |
|---|
| | 242 | } |
|---|
| | 243 | else if ($_SESSION['user_type'] == 'user') { |
|---|
| | 244 | header("Location: ../client/index.php"); |
|---|
| | 245 | die(); |
|---|
| | 246 | } |
|---|
| | 247 | } |
|---|
| 265 | 248 | } |
|---|
| 266 | 249 | |
|---|
| … | … | |
| 269 | 252 | if (isset($_SESSION['user_logged'])) { |
|---|
| 270 | 253 | |
|---|
| 271 | | if (!check_user_login()) { |
|---|
| 272 | | |
|---|
| 273 | | header("Location: ../index.php"); |
|---|
| 274 | | |
|---|
| | 254 | if (!check_user_login()) { |
|---|
| | 255 | header("Location: ../index.php"); |
|---|
| 275 | 256 | die(); |
|---|
| 276 | | |
|---|
| 277 | | } |
|---|
| 278 | | |
|---|
| 279 | | } else { |
|---|
| 280 | | |
|---|
| 281 | | header("Location: ../index.php"); |
|---|
| 282 | | |
|---|
| | 257 | } |
|---|
| | 258 | } |
|---|
| | 259 | else { |
|---|
| | 260 | header("Location: ../index.php"); |
|---|
| 283 | 261 | die(); |
|---|
| 284 | 262 | } |
|---|
| 285 | | |
|---|
| 286 | 263 | } |
|---|
| 287 | 264 | |
|---|
| … | … | |
| 290 | 267 | global $sql, $cfg; |
|---|
| 291 | 268 | |
|---|
| 292 | | $timestamp = time(); |
|---|
| 293 | | |
|---|
| 294 | | if ($cfg['DB_TYPE'] === 'mysql') { |
|---|
| | 269 | $timestamp = time(); |
|---|
| | 270 | |
|---|
| | 271 | if ($cfg['DB_TYPE'] === 'mysql') { |
|---|
| 295 | 272 | |
|---|
| 296 | 273 | $query_from = "select admin_id, admin_name, admin_pass, admin_type, created_by from admin where binary admin_id = ?"; |
|---|
| 297 | 274 | |
|---|
| 298 | | $query_to = "select admin_id, admin_name, admin_pass, admin_type, created_by from admin where binary admin_id = ?"; |
|---|
| 299 | | |
|---|
| 300 | | } |
|---|
| 301 | | |
|---|
| 302 | | $rs_from = exec_query($sql, $query_from, array($form_id)); |
|---|
| 303 | | |
|---|
| 304 | | $rs_to = exec_query($sql, $query_to, array($to_id)); |
|---|
| 305 | | |
|---|
| 306 | | if (($rs_from -> RecordCount()) != 1 || ($rs_to -> RecordCount()) != 1) { |
|---|
| | 275 | $query_to = "select admin_id, admin_name, admin_pass, admin_type, created_by from admin where binary admin_id = ?"; |
|---|
| | 276 | |
|---|
| | 277 | } |
|---|
| | 278 | |
|---|
| | 279 | $rs_from = exec_query($sql, $query_from, array($form_id)); |
|---|
| | 280 | |
|---|
| | 281 | $rs_to = exec_query($sql, $query_to, array($to_id)); |
|---|
| | 282 | |
|---|
| | 283 | if (($rs_from -> RecordCount()) != 1 || ($rs_to -> RecordCount()) != 1) { |
|---|
| 307 | 284 | |
|---|
| 308 | 285 | write_log("Change interface error => unknown from or to username"); |
|---|
| 309 | 286 | |
|---|
| 310 | | return false; |
|---|
| 311 | | |
|---|
| 312 | | } |
|---|
| 313 | | |
|---|
| 314 | | |
|---|
| 315 | | $from_udata = $rs_from -> FetchRow(); |
|---|
| 316 | | |
|---|
| 317 | | $to_udata = $rs_to -> FetchRow(); |
|---|
| | 287 | return false; |
|---|
| | 288 | |
|---|
| | 289 | } |
|---|
| | 290 | |
|---|
| | 291 | |
|---|
| | 292 | $from_udata = $rs_from -> FetchRow(); |
|---|
| | 293 | |
|---|
| | 294 | $to_udata = $rs_to -> FetchRow(); |
|---|
| 318 | 295 | |
|---|
| 319 | 296 | if (!is_userdomain_ok($to_udata['admin_name'])) { |
|---|
| r319 |
r410 |
|
| 103 | 103 | $tpl -> assign(array( |
|---|
| 104 | 104 | 'TR_MESSAGE' => tr('The password was requested'), |
|---|
| 105 | | 'TR_LINK' => "<a class=\"link\" href=\"index.php\">".tr('Login')."</a>" |
|---|
| | 105 | 'TR_LINK' => "<a class=\"link\" href=\"index.php\">".tr('Back')."</a>" |
|---|
| 106 | 106 | ) |
|---|
| 107 | 107 | ); |
|---|
| … | … | |
| 109 | 109 | $tpl -> assign(array( |
|---|
| 110 | 110 | 'TR_MESSAGE' => tr('ERROR: Unknown user'), |
|---|
| 111 | | 'TR_LINK' => "<a class=\"link\" href=\"index.php\">".tr('Retry')."</a>" |
|---|
| | 111 | 'TR_LINK' => "<a class=\"link\" href=\"lostpassword.php\">".tr('Retry')."</a>" |
|---|
| 112 | 112 | ) |
|---|
| 113 | 113 | ); |
|---|
| … | … | |
| 116 | 116 | $tpl -> assign(array( |
|---|
| 117 | 117 | 'TR_MESSAGE' => tr('ERROR: Security code was not correct!').' '. $_SESSION['image'], |
|---|
| 118 | | 'TR_LINK' => "<a class=\"link\" href=\"index.php\">".tr('Retry')."</a>" |
|---|
| | 118 | 'TR_LINK' => "<a class=\"link\" href=\"lostpassword.php\">".tr('Retry')."</a>" |
|---|
| 119 | 119 | ) |
|---|
| 120 | 120 | ); |
|---|
| r371 |
r410 |
|
| 73 | 73 | <td> </td> |
|---|
| 74 | 74 | <td class="content2" width="200">{TR_SUBJECT}</td> |
|---|
| 75 | | <td><input type="text" name="auto_subject" value="{SUBJECT_VALUE}" style="width:270px" class="textinput"> |
|---|
| | 75 | <td class="content"><input type="text" name="auto_subject" value="{SUBJECT_VALUE}" style="width:270px" class="textinput"> |
|---|
| 76 | 76 | </td> |
|---|
| 77 | 77 | </tr> |
|---|
| … | … | |
| 79 | 79 | <td> </td> |
|---|
| 80 | 80 | <td class="content2" width="200">{TR_MESSAGE}</td> |
|---|
| 81 | | <td><textarea name="auto_message" style="width:270px" class="textinput2" rows="8">{MESSAGE_VALUE}</textarea> |
|---|
| | 81 | <td class="content"><textarea name="auto_message" style="width:270px" class="textinput2" rows="8">{MESSAGE_VALUE}</textarea> |
|---|
| 82 | 82 | </td> |
|---|
| 83 | 83 | </tr> |
|---|
| … | … | |
| 85 | 85 | <td width="25"> </td> |
|---|
| 86 | 86 | <td width="200" class="content2">{TR_SENDER_EMAIL}</td> |
|---|
| 87 | | <td class="content">{SENDER_EMAIL_VALUE}> </td> |
|---|
| | 87 | <td class="content">{SENDER_EMAIL_VALUE}</td> |
|---|
| 88 | 88 | </tr> |
|---|
| 89 | 89 | <tr> |
|---|
| 90 | 90 | <td width="25"> </td> |
|---|
| 91 | 91 | <td width="200" class="content2">{TR_SENDER_NAME}</td> |
|---|
| 92 | | <td class="content">{SENDER_NAME_VALUE}> </td> |
|---|
| | 92 | <td class="content">{SENDER_NAME_VALUE}</td> |
|---|
| 93 | 93 | </tr> |
|---|
| 94 | 94 | <tr> |
|---|
| r371 |
r410 |
|
| 76 | 76 | font-family: arial, helvetica, sans-serif; |
|---|
| 77 | 77 | font-weight: bold; |
|---|
| 78 | | font-size: 10px; |
|---|
| | 78 | font-size: 12px; |
|---|
| 79 | 79 | color: #ffffff; |
|---|
| 80 | 80 | height: 18px; |
|---|
| r371 |
r410 |
|
| 38 | 38 | <tr> |
|---|
| 39 | 39 | <td colspan="2"><strong> |
|---|
| 40 | | <div class="login_text">{TR_USERNAME}</div> </td> |
|---|
| | 40 | <div class="login_text">{TR_USERNAME}</div> |
|---|
| | 41 | </td> |
|---|
| 41 | 42 | </tr> |
|---|
| 42 | 43 | <tr> |
|---|
| … | … | |
| 49 | 50 | <td> </td> |
|---|
| 50 | 51 | <td align="left" valign="bottom"><input type="submit" name="Submit" class="button" value=" {TR_SEND} "></td> |
|---|
| 51 | | <td width="302" align="left" valign="bottom"><a class="login" href="index.php">{TR_BACK}</a></td> |
|---|
| | 52 | <td width="302" align="right" valign="bottom"><a class="login" href="index.php">{TR_BACK}</a></td> |
|---|
| 52 | 53 | </tr> |
|---|
| 53 | 54 | </table> |
|---|
| … | … | |
| 64 | 65 | </tr> |
|---|
| 65 | 66 | </table> |
|---|
| 66 | | <table align="center" width="453"> |
|---|
| | 67 | <table align="center" width="453"> |
|---|
| 67 | 68 | <tr> |
|---|
| 68 | 69 | <td align="right" class="login"> |
|---|
|