Guest User

Untitled

a guest
Mar 16th, 2014
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.20 KB | None | 0 0
  1. <div class="maintitle ipsFilterbar clearfix">
  2. <ul class="ipsList_inline">
  3. <a href="index.php?app=game&module=informations" title="Aktualności">Strona Główna</a>
  4. <li class="active"><a href="index.php?app=game&module=character" title="Lista postaci">Postacie</a></li>
  5. </ul>
  6. </div>
  7.  
  8. <div class="ipsBox">
  9. <div class="ipsLayout ipsLayout_withleft ipsLayout_smallleft ipsVerticalTabbed clearfix usercp_body">
  10. <div class="ipsVerticalTabbed_tabs ipsLayout_left" id="usercp_tabs">
  11. <ul>
  12. <li><a href="index.php?app=game&module=character">Lista postaci</a></li>
  13. <li class="active"><a href="index.php?app=game&module=character&section=createchar">Załóż postać</a></li>
  14. </ul>
  15. </div>
  16. <div class="ipsVerticalTabbed_content ipsLayout_content ipsBox_container">
  17. <div class="ipsPad">
  18. <form action="index.php?app=game&module=character&section=createchar&do=newchar" method="post">
  19. <fieldset class="row1" id="id_charbase">
  20. <h2 class="ipsType_subtitle ipsSettings_pagetitle">Podstawowe dane postaci</h2>
  21. <ul>
  22. <li class="field">
  23. <label for="id_gender">Płeć</label>
  24. <select name="gender" id="id_gender" class="input_select">
  25. <option value="-1">Wybierz płeć...</option>
  26. <option value="1">Mężczyzna</option>
  27. <option value="2">Kobieta</option>
  28. </select>
  29. </li>
  30. <li class="field">
  31. <label for="id_age">Wiek</label>
  32. <input name="age" id="id_age" class="input_text" style="width:30px" maxlength="2" />
  33. </li>
  34. </ul>
  35. </fieldset>
  36. <fieldset class="submit" id="id_shownext_field">
  37. <input type="button" class="input_submit" id="id_shownext_button" value="Dalej" />
  38. </fieldset>
  39. <div id="id_next" style="display:none">
  40. <fieldset class="row1">
  41. <h2 class="ipsType_subtitle ipsSettings_pagetitle">Osobowe dane postaci</h2>
  42. <ul>
  43. <li class="field">
  44. <label for="id_name">Imię</label>
  45. <input name="name" id="id_name" class="input_text" style="width:100px" />
  46. <br />
  47. </li>
  48. <li class="field">
  49. <label for="id_surname">Nazwisko</label>
  50. <input name="surname" id="id_surname" class="input_text" style="width:100px" />
  51. </li>
  52. <li class="field">
  53. <input type="button" value="Wybierz wygląd postaci" id="id_skin" class="input_submit center" />
  54. </li>
  55. </ul>
  56. </fieldset>
  57. <fieldset class="submit">
  58. <input type="hidden" name="skin" id="id_char_skin" value="" />
  59. <input type="submit" class="input_submit" id="id_button_createchar" value="Stwórz postać" />
  60. </fieldset>
  61. </div>
  62. <div style="overflow: auto; width: twoj wymiar px; height: twoj wymiar px;">
  63. <div id="skins" style="display:none">
  64. <h3 class="bar">Wybierz wygląd nowej postaci</h3>
  65. <div style="padding:15px;text-align:center">
  66. <fieldset class="row1" id="id_ajax_skins">
  67. </fieldset>
  68. </div>
  69. </div>
  70. <script type="text/javascript">
  71. var playcountry_skinsPopup;
  72. $("id_shownext_button").observe("click",function(e){
  73. if($("id_gender").getValue() < 0 || $("id_age").getValue() < 18 || $("id_age").getValue() >=90)
  74. {
  75. alert("Musisz wybrać płeć oraz wiek postaci mniejszy niż 90 lat.");
  76. return;
  77. }
  78. $("id_shownext_field").hide();
  79. new Ajax.Request( ipb.vars["base_url"] + "app=game&module=ajax&section=newchar",
  80. {
  81. method: "post",
  82. evalJSON: "force",
  83. parameters: {
  84. "md5check": ipb.vars["secure_hash"],
  85. 'gender': $('id_gender').getValue()
  86. },
  87. onSuccess: function(t)
  88. {
  89. if( Object.isUndefined( t.responseJSON ) )
  90. {
  91. alert( "Bad Request" );
  92. }
  93. else if ( t.responseJSON["error"] )
  94. {
  95. alert( t.responseJSON["error"] );
  96. }
  97. else
  98. {
  99. $("id_ajax_skins").innerHTML = t.responseJSON["skins"];
  100.  
  101. playcountry_skinsPopup = new ipb.Popup("skinPopup",
  102. {
  103. type: "pane", modal: false, w: "1100px",
  104. initial: $("skins").innerHTML,
  105. hideAtStart: true,
  106. close: 'a[rel="close"]'
  107. });
  108.  
  109. $$(".skinimg").each(function(element){
  110. element.observe("click",function(e){
  111. if($("id_char_skin").value != this.alt)
  112. {
  113. $("id_char_skin").value = this.alt;
  114. $$(".skinimg").each(function(el2){
  115. if(el2.alt != $("id_char_skin").value)
  116. {
  117. new Effect.Opacity(el2,{to:0.5,duration: 0.5});
  118. }
  119. else
  120. {
  121. new Effect.Opacity(el2,{to:1.0,duration: 0.5});
  122. }
  123. });
  124. }
  125. else
  126. {
  127. $("id_char_skin").value = "";
  128. $$(".skinimg").each(function(el2){
  129. new Effect.Opacity(el2,{to:1.0,duration: 0.5});
  130. });
  131. }
  132. });
  133. });
  134.  
  135. Effect.BlindUp("id_charbase");
  136. Effect.BlindDown("id_next");
  137. }
  138. }
  139. });
  140. });
  141.  
  142. $("id_skin").observe("click",function(e){
  143. if($("id_name").getValue()=="" || $("id_surname").getValue()=="")
  144. {
  145. alert("Nie wprowadziłeś imienia lub nazwiska postaci.");
  146. Event.stop(e);
  147. return false;
  148. }
  149.  
  150. Event.stop(e);
  151. playcountry_skinsPopup.show();
  152. return false;
  153. });
  154.  
  155. $("id_button_createchar").observe("click",function(e){
  156. if(!($("id_char_skin").getValue()>0))
  157. {
  158. alert("Nie wybrałeś wyglądu postaci.");
  159. Event.stop(e);
  160. return false;
  161. }
  162. });
  163. </script>
  164. </div>
  165. <style type="text/css">
  166. .skinimg{margin-top:3px;cursor:pointer}
  167. </style>
  168. </form>
  169. </div>
  170. </div>
  171. </div>
  172. </div>
Advertisement
Add Comment
Please, Sign In to add comment