_ssid.html.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <div class="panel panel-default ssid enabled" <?= $service_enabled == 0 ? 'style="display: none"' : '' ?>>
  2. <div class="panel-heading">
  3. <h3 class="panel-title" data-label="<?= _("Hotspot") ?>"><?= _("Hotspot") ?> <?= $ssid['id'] + 1 ?></h3>
  4. </div>
  5. <ul class="nav nav-tabs nav-justified">
  6. <li role="presentation" data-tab="wifi" class="active"><a href="#"><?= _("Wifi") ?></a></li>
  7. <li role="presentation" data-tab="ipv6"><a href="#"><?= _("IPv6") ?></a></li>
  8. <li role="presentation" data-tab="ipv4"><a href="#"><?= _("IPv4") ?></a></li>
  9. </ul>
  10. <!-- Wifi -->
  11. <div class="tabs tabwifi">
  12. <div class="form-group">
  13. <label class="col-sm-3 control-label"><?= _('Name (SSID)') ?></label>
  14. <div class="col-sm-9">
  15. <input type="text" class="form-control ssidin" name="ssid[<?= $ssid['id'] ?>][wifi_ssid]" placeholder="myNeutralNetwork" value="<?= $ssid['wifi_ssid'] ?>" />
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <label for="wifi_secure" class="col-sm-3 control-label"><?= _('Secure') ?></label>
  20. <div class="col-sm-9 input-group-btn" data-toggle="tooltip" data-title="<?= _('Disabling the Secure Wifi allows everyone to join the hotspot and spy the traffic (but it\'s perfect for a PirateBox)') ?>">
  21. <div class="input-group">
  22. <input type="checkbox" class="form-control switch wifi_secure" name="ssid[<?= $ssid['id'] ?>][wifi_secure]" value="1" <?= $ssid['wifi_secure'] == 1 ? 'checked="checked"' : '' ?> />
  23. </div>
  24. </div>
  25. </div>
  26. <div class="form-group wifi_passphrase" <?= $ssid['wifi_secure'] == 0 ? 'style="display: none"' : '' ?>>
  27. <label class="col-sm-3 control-label"><?= _('Password (WPA2)') ?></label>
  28. <div class="input-group col-sm-9" style="padding: 0 15px">
  29. <input type="text" data-toggle="tooltip" data-title="<?= _('At least 8 characters') ?>" class="form-control" name="ssid[<?= $ssid['id'] ?>][wifi_passphrase]" placeholder="VhegT8oev0jZI" value="<?= $ssid['wifi_passphrase'] ?>" />
  30. <a class="btn input-group-addon wifiparty" data-toggle="tooltip" data-title="<?= _('Show to your friends how to access to your hotspot') ?>"><span class="glyphicon glyphicon-fullscreen"></span></a>
  31. </div>
  32. </div>
  33. </div>
  34. <!-- IPv6 -->
  35. <div class="tabs tabipv6" style="display: none">
  36. <?php if(empty($ssid['ip6_net'])): ?>
  37. <div class="alert alert-dismissible alert-warning fade in" style="margin: 2px 2px 17px" role="alert">
  38. <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  39. <strong><?= _('Notice') ?>:</strong> <?= str_replace('<LINK:FFDN>', '<a href="http://db.ffdn.org" class="alert-link">', str_replace('</LINK:FFDN>', '</a>', _("Currently, your wifi clients don't have IPv6 and it's a very bad thing. Ask your Internet Service Provider an IPv6 delegated prefix, or <LINK:FFDN>change providers</LINK:FFDN>!"))) ?>
  40. </div>
  41. <?php endif; ?>
  42. <div class="form-group">
  43. <label class="col-sm-3 control-label"><?= _('Delegated prefix') ?></label>
  44. <div class="col-sm-9">
  45. <input type="text" class="form-control" name="ssid[<?= $ssid['id'] ?>][ip6_net]" placeholder="2001:db8:42::" value="<?= $ssid['ip6_net'] ?>" />
  46. </div>
  47. </div>
  48. <div class="form-group">
  49. <label for="ip6_firewall" class="col-sm-3 control-label"><?= _('Firewall') ?></label>
  50. <div class="col-sm-9 input-group-btn" data-toggle="tooltip" data-title="<?= _('Disabling the Firewall allows everyone to make connections to client hosts, depending on their own security policy') ?>">
  51. <div class="input-group">
  52. <input type="checkbox" class="form-control switch ip6_firewall" name="ssid[<?= $ssid['id'] ?>][ip6_firewall]" value="1" <?= $ssid['ip6_firewall'] == 1 ? 'checked="checked"' : '' ?> />
  53. </div>
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label class="col-sm-3 control-label"><?= _('First DNS resolver') ?></label>
  58. <div class="col-sm-9">
  59. <input type="text" class="form-control" name="ssid[<?= $ssid['id'] ?>][ip6_dns0]" placeholder="2001:913::8" value="<?= $ssid['ip6_dns0'] ?>" />
  60. </div>
  61. </div>
  62. <div class="form-group">
  63. <label class="col-sm-3 control-label"><?= _('Second DNS resolver') ?></label>
  64. <div class="col-sm-9">
  65. <input type="text" class="form-control" name="ssid[<?= $ssid['id'] ?>][ip6_dns1]" placeholder="2001:910:800::40" value="<?= $ssid['ip6_dns1'] ?>" />
  66. </div>
  67. </div>
  68. </div>
  69. <!-- IPv4 -->
  70. <div class="tabs tabipv4" style="display: none">
  71. <div class="form-group">
  72. <label class="col-sm-3 control-label"><?= _('NAT prefix (/24)') ?></label>
  73. <div class="col-sm-9">
  74. <input type="text" class="form-control" name="ssid[<?= $ssid['id'] ?>][ip4_nat_prefix]" placeholder="10.0.242" value="<?= $ssid['ip4_nat_prefix'] ?>" />
  75. </div>
  76. </div>
  77. <div class="form-group">
  78. <label class="col-sm-3 control-label"><?= _('First DNS resolver') ?></label>
  79. <div class="col-sm-9">
  80. <input type="text" class="form-control" name="ssid[<?= $ssid['id'] ?>][ip4_dns0]" placeholder="80.67.188.188" value="<?= $ssid['ip4_dns0'] ?>" />
  81. </div>
  82. </div>
  83. <div class="form-group">
  84. <label class="col-sm-3 control-label"><?= _('Second DNS resolver') ?></label>
  85. <div class="col-sm-9">
  86. <input type="text" class="form-control" name="ssid[<?= $ssid['id'] ?>][ip4_dns1]" placeholder="80.67.169.12" value="<?= $ssid['ip4_dns1'] ?>" />
  87. </div>
  88. </div>
  89. </div>
  90. <div class="deletessid" style="display: none">
  91. <button type="button" class="btn btn-danger"><?= _("Delete") ?></button>
  92. </div>
  93. <div class="wifiparty_passphrase"><?php
  94. $pw = preg_replace('/[^0-9a-z ]/i', '<span-class="passother">$0</span>', $ssid['wifi_passphrase']);
  95. $pw = preg_replace('/\d/', '<span-class="passdigit">$0</span>', $pw);
  96. $pw = preg_replace('/ /', '<span class="passspace">&#x25AE;</span>', $pw);
  97. $pw = preg_replace('/span-class/', 'span class', $pw);
  98. echo $pw;
  99. ?></div>
  100. </div>