PageRenderTime 58ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/themes/default/account/changesex.php

https://github.com/chokoleytdesignoper/fluxcp_choko
PHP | 42 lines | 41 code | 1 blank | 0 comment | 6 complexity | c8a4054f8b5ea7425a85250962a1d5a7 MD5 | raw file
Possible License(s): LGPL-2.1, LGPL-3.0, BSD-3-Clause
  1. <?php if (!defined('FLUX_ROOT')) exit; ?>
  2. <h2><?php echo htmlspecialchars(Flux::message('GenderChangeHeading')) ?></h2>
  3. <?php if ($cost): ?>
  4. <p>
  5. <?php printf(Flux::message('GenderChangeCost'), '<span class="remaining-balance">'.number_format((int)$cost).'</span>') ?>
  6. <?php printf(Flux::message('GenderChangeBalance'), '<span class="remaining-balance">'.number_format((int)$session->account->balance).'</span>') ?>
  7. </p>
  8. <?php if (!$hasNecessaryFunds): ?>
  9. <p><?php echo htmlspecialchars(Flux::message('GenderChangeNoFunds')) ?></p>
  10. <?php endif ?>
  11. <?php endif ?>
  12. <?php if ($hasNecessaryFunds): ?>
  13. <?php if (empty($errorMessage)): ?>
  14. <p><strong><?php echo htmlspecialchars(Flux::message('NoteLabel')) ?>:</strong> <?php printf(Flux::message('GenderChangeCharInfo'), '<em>'.implode(', ', $badJobs).'</em>') ?>.</p>
  15. <h3><?php echo htmlspecialchars(Flux::message('GenderChangeSubHeading')) ?></h3>
  16. <?php else: ?>
  17. <p class="red"><?php echo htmlspecialchars($errorMessage) ?></p>
  18. <?php endif ?>
  19. <form action="<?php echo $this->urlWithQs ?>" method="post" class="generic-form">
  20. <input type="hidden" name="changegender" value="1" />
  21. <table class="generic-form-table">
  22. <tr>
  23. <td>
  24. <p>
  25. <?php printf(Flux::message('GenderChangeFormText'), '<strong>'.strtolower($this->genderText($session->account->sex == 'M' ? 'F' : 'M')).'</strong>') ?>
  26. </p>
  27. </td>
  28. </tr>
  29. <tr>
  30. <td>
  31. <p>
  32. <button type="submit"
  33. onclick="return confirm('<?php echo str_replace("\'", "\\'", Flux::message('GenderChangeConfirm')) ?>')">
  34. <strong><?php echo htmlspecialchars(Flux::message('GenderChangeButton')) ?></strong>
  35. </button>
  36. </p>
  37. </td>
  38. </tr>
  39. </table>
  40. </form>
  41. <?php endif ?>