[MOD]Lottery system

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • you can open the tpl and add the fisrt to the beginning of your script and then the bottom to the same file at the bottom
      <div id="ally_content" class="conteiner">
      <style>
      #ally_content {
      1. width:714px;
      2. padding: 0;
      3. overflow: hidden;
      4. position: relative;
      5. margin: car;
      6. <style>
      this is just a very basic info but should get you started in the right direction
    • Russoll wrote:

      you can open the tpl and add the fisrt to the beginning of your script and then the bottom to the same file at the bottom
      <div id="ally_content" class="conteiner">
      <style>
      #ally_content {
      1. width:714px;
      2. padding: 0;
      3. overflow: hidden;
      4. position: relative;
      5. margin: car;
      6. <style>
      this is just a very basic info but should get you started in the right direction
      Aquí te dejo el TPL para que me heches una mano, agregame ese codigo ccs.

      Source Code

      1. {block name="title" prepend}{$LNG.lm_Lottery}{/block}
      2. {block name="content"}
      3. <div class="content_page" style="width:90%">
      4. <table style="width:100%">
      5. <div class="title text-center font-weight-bold">Lottery</div>
      6. <div class="alert alert-info text-center"><i class="fas fa-exclamation-triangle fa-2x align-middle"></i>
      7. {$descripcion}
      8. </div>
      9. </table>
      10. <table style="width:100%; margin-bottom:10px">
      11. <div class="title font-weight-bold">Descripición de la lotería</div>
      12. <div id="traderContainer" class="centerContainer" style="margin-top:10px;">
      13. <div class="row" style="margin:auto">
      14. <div class="col-md-4" >
      15. <div class="title">Costo</div>
      16. <div class="">
      17. <img src="{$dpath}images/{$resources.901}.gif" border="0" height="30" width="30" style="margin: 3px;">
      18. {$LNG.tech.901}: ${$ticket_price_metal|number}
      19. </div>
      20. <div class="">
      21. <img src="{$dpath}images/{$resources.902}.gif" border="0" height="30" width="30" style="margin: 3px;">
      22. {$LNG.tech.902}: ${$ticket_price_crystal|number}
      23. </div>
      24. <div class="">
      25. <img src="{$dpath}images/{$resources.903}.gif" border="0" height="30" width="30" style="margin: 3px;">
      26. {$LNG.tech.903}: ${$ticket_price_deuterium|number}
      27. </div>
      28. <div class="">
      29. <img src="{$dpath}images/{$resources.921}.gif" border="0" height="30" width="30" style="margin: 3px;">
      30. {$LNG.tech.921}: ${$ticket_price_mo|number}
      31. </div>
      32. </div>
      33. <div class="col-md-4">
      34. <div class="title">Ganancia</div>
      35. <div class="">
      36. <img src="{$dpath}images/{$resources.901}.gif" border="0" height="30" width="30" style="margin: 3px;">
      37. {$LNG.tech.901}: ${$gan_metal|number} - <span class="text-danger">({($gan_metal*$mios)|pretty_number})</span>
      38. </div>
      39. <div class="">
      40. <img src="{$dpath}images/{$resources.902}.gif" border="0" height="30" width="30" style="margin: 3px;">
      41. {$LNG.tech.902}: ${$gan_crystal|number} - <span class="text-danger">({($gan_crystal*$mios)|pretty_number})</span>
      42. </div>
      43. <div class="">
      44. <img src="{$dpath}images/{$resources.903}.gif" border="0" height="30" width="30" style="margin: 3px;">
      45. {$LNG.tech.903}: ${$gan_deu|number} - <span class="text-danger">({($gan_deu*$mios)|pretty_number})</span>
      46. </div>
      47. <div class="">
      48. <img src="{$dpath}images/{$resources.921}.gif" border="0" height="30" width="30" style="margin: 3px;">
      49. {$LNG.tech.921}: ${$gan_mato|number} - <span class="text-danger">({($gan_mato*$mios)|pretty_number})</span>
      50. </div>
      51. </div>
      52. <div class="col-md-4">
      53. <div class="title">Inscribirse</div>
      54. {if !$terminado}
      55. <center><span class="countdown2" style="font-size:2em;" secs="{$secs}"></span></center>
      56. <div class="text-center">
      57. <form action="" method="POST"><input type="hidden" name="inscribirse" value="si"><button type="submit" href="" style="margin-top:10%" class="btn btn-dark btn-xs"><i class="fas fa-check"></i> Comprar boleto</button></form>
      58. </div>
      59. {else}
      60. <div class="text-center">
      61. <div style="margin-top:10%"> Evento Terminado</div>
      62. </div>
      63. {/if}
      64. <div class="text-center">
      65. <div style="margin-top:10%"> TICKETS COMPRADOS <br> <span class="text-success">{$mios}</span>/<span class="text-danger">{$max}<span></div>
      66. </div>
      67. </div>
      68. </div>
      69. </div>
      70. <div>
      71. </table>
      72. <table style="width:100%">
      73. <div class="title text-center font-weight-bold">Jugadores</div>
      74. <div class="row" style="margin:auto;margin-top:10px;">
      75. <div class="col-md-8">
      76. <div class="title">Usuarios Inscritos</div>
      77. <div style="height:100%;padding:0 10px 0 10px; text-align:justify">
      78. {foreach $inscritos as $item}
      79. {$item['user']}({$item['cant']}),
      80. {/foreach}
      81. </div>
      82. </div>
      83. <div class="col-md-4">
      84. <div class="title">Ganador</div>
      85. <div class="{if !is_array($ganador)}text-center{/if}" style="height:100%;margin-bottom:10px">
      86. {if is_array($ganador)}
      87. {foreach $ganador as $key=>$item}
      88. {if $key == 0}
      89. <div style="margin-top:10%"> <img src="styles/resource/images/premios/oro.png" width="50"> {$item[0]} - {$item[1]} </div>
      90. {else if $key == 1}
      91. <div style="margin-top:10%"> <img src="styles/resource/images/premios/plata.png" width="50"> {$item[0]} - {$item[1]} </div>
      92. {else if $key == 2}
      93. <div style="margin-top:10%"> <img src="styles/resource/images/premios/bronce.png" width="50"> {$item[0]} - {$item[1]} </div>
      94. {else}
      95. <div style="margin-top:10%"><i class="fas fa-medal fa-4x text-warning"></i> {$item[0]} - {$item[1]} </div>
      96. {/if}
      97. {/foreach}
      98. {else}
      99. <div style="margin-top:10%">{$ganador}</div>
      100. {/if}
      101. </div>
      102. </div>
      103. </div>
      104. <div class="clear"></div>
      105. </table>
      106. </div>
      107. {/block}
      Display All
    • Source Code

      1. {block name="title" prepend}{$LNG.lm_Lottery}{/block}
      2. {block name="content"}
      3. <div id="ally_content" class="conteiner">
      4. <div class="content_page" style="width:90%">
      5. <table style="width:100%">
      6. <div class="title text-center font-weight-bold">Lottery</div>
      7. <div class="alert alert-info text-center"><i class="fas fa-exclamation-triangle fa-2x align-middle"></i>
      8. {$description}
      9. </div>
      10. </table>
      11. <table style="width:100%; margin-bottom:10px">
      12. <div class="title font-weight-bold">Descripición de la lotería</div>
      13. <div id="traderContainer" class="centerContainer" style="margin-top:10px;">
      14. <div class="row" style="margin:auto">
      15. <div class="col-md-4" >
      16. <div class="title">Costo</div>
      17. <div class="">
      18. <img src="{$dpath}images/{$resources.901}.gif" border="0" height="30" width="30" style="margin: 3px;">
      19. {$LNG.tech.901}: ${$ticket_price_metal|number}
      20. </div>
      21. <div class="">
      22. <img src="{$dpath}images/{$resources.902}.gif" border="0" height="30" width="30" style="margin: 3px;">
      23. {$LNG.tech.902}: ${$ticket_price_crystal|number}
      24. </div>
      25. <div class="">
      26. <img src="{$dpath}images/{$resources.903}.gif" border="0" height="30" width="30" style="margin: 3px;">
      27. {$LNG.tech.903}: ${$ticket_price_deuterium|number}
      28. </div>
      29. <div class="">
      30. <img src="{$dpath}images/{$resources.921}.gif" border="0" height="30" width="30" style="margin: 3px;">
      31. {$LNG.tech.921}: ${$ticket_price_mo|number}
      32. </div>
      33. </div>
      34. <div class="col-md-4">
      35. <div class="title">Ganancia</div>
      36. <div class="">
      37. <img src="{$dpath}images/{$resources.901}.gif" border="0" height="30" width="30" style="margin: 3px;">
      38. {$LNG.tech.901}: ${$gan_metal|number} - <span class="text-danger">({($gan_metal*$mios)|pretty_number})</span>
      39. </div>
      40. <div class="">
      41. <img src="{$dpath}images/{$resources.902}.gif" border="0" height="30" width="30" style="margin: 3px;">
      42. {$LNG.tech.902}: ${$gan_crystal|number} - <span class="text-danger">({($gan_crystal*$mios)|pretty_number})</span>
      43. </div>
      44. <div class="">
      45. <img src="{$dpath}images/{$resources.903}.gif" border="0" height="30" width="30" style="margin: 3px;">
      46. {$LNG.tech.903}: ${$gan_deu|number} - <span class="text-danger">({($gan_deu*$mios)|pretty_number})</span>
      47. </div>
      48. <div class="">
      49. <img src="{$dpath}images/{$resources.921}.gif" border="0" height="30" width="30" style="margin: 3px;">
      50. {$LNG.tech.921}: ${$gan_mato|number} - <span class="text-danger">({($gan_mato*$mios)|pretty_number})</span>
      51. </div>
      52. </div>
      53. <div class="col-md-4">
      54. <div class="title">Inscribirse</div>
      55. {if !$done}
      56. <center><span class="countdown2" style="font-size:2em;" secs="{$secs}"></span></center>
      57. <div class="text-center">
      58. <form action="" method="POST"><input type="hidden" name="inscribirse" value="si"><button type="submit" href="" style="margin-top:10%" class="btn btn-dark btn-xs"><i class="fas fa-check"></i> Comprar boleto</button></form>
      59. </div>
      60. {else}
      61. <div class="text-center">
      62. <div style="margin-top:10%"> Evento Terminado</div>
      63. </div>
      64. {/if}
      65. <div class="text-center">
      66. <div style="margin-top:10%"> TICKETS COMPRADOS <br> <span class="text-success">{$mios}</span>/<span class="text-danger">{$max}<span></div>
      67. </div>
      68. </div>
      69. </div>
      70. </div>
      71. <div>
      72. </table>
      73. <table style="width:100%">
      74. <div class="title text-center font-weight-bold">Jugadores</div>
      75. <div class="row" style="margin:auto;margin-top:10px;">
      76. <div class="col-md-8">
      77. <div class="title">Usuarios Inscritos</div>
      78. <div style="height:100%;padding:0 10px 0 10px; text-align:justify">
      79. {foreach $subscribed as $item}
      80. {$item['user']}({$item['cant']}),
      81. {/foreach}
      82. </div>
      83. </div>
      84. <div class="col-md-4">
      85. <div class="title">Ganador</div>
      86. <div class="{if !is_array($ganador)}text-center{/if}" style="height:100%;margin-bottom:10px">
      87. {if is_array($ganador)}
      88. {foreach $ganador as $key=>$item}
      89. {if $key == 0}
      90. <div style="margin-top:10%"> <img src="styles/resource/images/premios/oro.png" width="50"> {$item[0]} - {$item[1]} </div>
      91. {else if $key == 1}
      92. <div style="margin-top:10%"> <img src="styles/resource/images/premios/plata.png" width="50"> {$item[0]} - {$item[1]} </div>
      93. {else if $key == 2}
      94. <div style="margin-top:10%"> <img src="styles/resource/images/premios/bronce.png" width="50"> {$item[0]} - {$item[1]} </div>
      95. {else}
      96. <div style="margin-top:10%"><i class="fas fa-medal fa-4x text-warning"></i> {$item[0]} - {$item[1]} </div>
      97. {/if}
      98. {/foreach}
      99. {else}
      100. <div style="margin-top:10%">{$ganador}</div>
      101. {/if}
      102. </div>
      103. </div>
      104. </div>
      105. <div class="clear"></div>
      106. </table>
      107. </div>
      108. <style>
      109. #ally_content {
      110. width:714px;
      111. padding: 0;
      112. overflow: hidden;
      113. position: relative;
      114. margin: car;
      115. <style>
      116. {/block}
      Display All
    • Russoll wrote:

      again this is just a starting point, use the other stuff like buildings page as a reference for adding or editing the page
      Message: Undefined index: description
      File: /cache/es^12ae78afc49ae814aa480625c988c8778661bcbd_1.extends.page.lottery.default.tpl.cache.php
      Line: 99
      URL: localhost/xnova/game.php?page=lottery
      PHP-Version: 7.2.0
      PHP-API: apache2handler
      2Moons Version: 1.8.git
      Debug Backtrace:
      #0 /cache/es^12ae78afc49ae814aa480625c988c8778661bcbd_1.extends.page.lottery.default.tpl.cache.php(99): errorHandler(8, 'Undefined index...', 'C://xampp//htdocs...', 99, Array)
      #1 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_inheritance.php(219): Block_20429558026387b7b2426eb7_96883431->callBlock(Object(Smarty_Internal_Template))
      #2 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_inheritance.php(162): Smarty_Internal_Runtime_Inheritance->callBlock(Object(Block_20429558026387b7b2426eb7_96883431), Object(Smarty_Internal_Template))
      #3 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_inheritance.php(164): Smarty_Internal_Runtime_Inheritance->process(Object(Smarty_Internal_Template), Object(Block_20429558026387b7b2426eb7_96883431), Object(Block_16359285456387b7b26b8d92_63374520))
      #4 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_inheritance.php(136): Smarty_Internal_Runtime_Inheritance->process(Object(Smarty_Internal_Template), Object(Block_16359285456387b7b26b8d92_63374520))
      #5 /cache/es^12ae78afc49ae814aa480625c988c8778661bcbd_1.extends.page.lottery.default.tpl.cache.php(1342): Smarty_Internal_Runtime_Inheritance->instanceBlock(Object(Smarty_Internal_Template), 'Block_163592854...', 'content')
      #6 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_6387b7b242adc5_22506058(Object(Smarty_Internal_Template))
      #7 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(341): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template), 'content_6387b7b...')
      #8 /cache/es^12ae78afc49ae814aa480625c988c8778661bcbd_1.extends.page.lottery.default.tpl.cache.php(65): Smarty_Internal_Template->_subTemplateRender('file:layout.ful...', NULL, 'es', 9999, 604800, Array, 2, false, 'd7447398a01ed83...', 'content_6387b7b...')
      #9 /includes/libs/Smarty/sysplugins/smarty_template_resource_base.php(128): content_6387b7b26c3197_91829843(Object(Smarty_Internal_Template))
      #10 /includes/libs/Smarty/sysplugins/smarty_template_compiled.php(170): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
      #11 /includes/libs/Smarty/sysplugins/smarty_internal_runtime_updatecache.php(89): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
      #12 /includes/libs/Smarty/sysplugins/smarty_template_cached.php(142): Smarty_Internal_Runtime_UpdateCache->updateCache(Object(Smarty_Template_Cached), Object(Smarty_Internal_Template), false)
      #13 /includes/libs/Smarty/sysplugins/smarty_internal_template.php(179): Smarty_Template_Cached->render(Object(Smarty_Internal_Template), false)
      #14 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(199): Smarty_Internal_Template->render(false, 1)
      #15 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(114): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
      #16 /includes/classes/class.template.php(137): Smarty_Internal_TemplateBase->display('extends:layout....')
      #17 /includes/pages/game/AbstractGamePage.class.php(253): template->display('extends:layout....')
      #18 /includes/pages/game/ShowLotteryPage.class.php(245): AbstractGamePage->display('page.lottery.de...')
      #19 /game.php(57): ShowLotteryPage->show()
      #20 {main}
    • Russoll wrote:

      revert the changes and let me look

      Source Code

      1. {block name="title" prepend}{$LNG.lm_Lottery}{/block}
      2. {block name="content"}
      3. <div class="content_page" style="width:90%">
      4. <table style="width:100%">
      5. <div class="title text-center font-weight-bold">{$LNG.lm_Lottery}</div>
      6. <div class="alert alert-info text-center"><i class="fas fa-exclamation-triangle fa-2x align-middle"></i>
      7. {$descripcion}
      8. </div>
      9. </table>
      10. <table style="width:100%; margin-bottom:10px">
      11. <div class="title font-weight-bold">Descripición de la lotería</div>
      12. <div id="traderContainer" class="centerContainer" style="margin-top:10px;">
      13. <div class="row" style="margin:auto">
      14. <div class="col-md-4" >
      15. <div class="title">Costo</div>
      16. <div class="">
      17. <img src="{$dpath}images/{$resources.901}.gif" border="0" height="30" width="30" style="margin: 3px;">
      18. {$LNG.tech.901}: ${$ticket_price_metal|number}
      19. </div>
      20. <div class="">
      21. <img src="{$dpath}images/{$resources.902}.gif" border="0" height="30" width="30" style="margin: 3px;">
      22. {$LNG.tech.902}: ${$ticket_price_crystal|number}
      23. </div>
      24. <div class="">
      25. <img src="{$dpath}images/{$resources.903}.gif" border="0" height="30" width="30" style="margin: 3px;">
      26. {$LNG.tech.903}: ${$ticket_price_deuterium|number}
      27. </div>
      28. <div class="">
      29. <img src="{$dpath}images/{$resources.921}.gif" border="0" height="30" width="30" style="margin: 3px;">
      30. {$LNG.tech.921}: ${$ticket_price_mo|number}
      31. </div>
      32. </div>
      33. <div class="col-md-4">
      34. <div class="title">Ganancia</div>
      35. <div class="">
      36. <img src="{$dpath}images/{$resources.901}.gif" border="0" height="30" width="30" style="margin: 3px;">
      37. {$LNG.tech.901}: ${$gan_metal|number} - <span class="text-danger">({($gan_metal*$mios)|pretty_number})</span>
      38. </div>
      39. <div class="">
      40. <img src="{$dpath}images/{$resources.902}.gif" border="0" height="30" width="30" style="margin: 3px;">
      41. {$LNG.tech.902}: ${$gan_crystal|number} - <span class="text-danger">({($gan_crystal*$mios)|pretty_number})</span>
      42. </div>
      43. <div class="">
      44. <img src="{$dpath}images/{$resources.903}.gif" border="0" height="30" width="30" style="margin: 3px;">
      45. {$LNG.tech.903}: ${$gan_deu|number} - <span class="text-danger">({($gan_deu*$mios)|pretty_number})</span>
      46. </div>
      47. <div class="">
      48. <img src="{$dpath}images/{$resources.921}.gif" border="0" height="30" width="30" style="margin: 3px;">
      49. {$LNG.tech.921}: ${$gan_mato|number} - <span class="text-danger">({($gan_mato*$mios)|pretty_number})</span>
      50. </div>
      51. </div>
      52. <div class="col-md-4">
      53. <div class="title">Inscribirse</div>
      54. {if !$terminado}
      55. <center><span class="countdown2" style="font-size:2em;" secs="{$secs}"></span></center>
      56. <div class="text-center">
      57. <form action="" method="POST"><input type="hidden" name="inscribirse" value="si"><button type="submit" href="" style="margin-top:10%" class="btn btn-dark btn-xs"><i class="fas fa-check"></i> Comprar boleto</button></form>
      58. </div>
      59. {else}
      60. <div class="text-center">
      61. <div style="margin-top:10%"> Evento Terminado</div>
      62. </div>
      63. {/if}
      64. <div class="text-center">
      65. <div style="margin-top:10%"> TICKETS COMPRADOS <br> <span class="text-success">{$mios}</span>/<span class="text-danger">{$max}<span></div>
      66. </div>
      67. </div>
      68. </div>
      69. </div>
      70. <div>
      71. </table>
      72. <table style="width:100%">
      73. <div class="title text-center font-weight-bold">Jugadores</div>
      74. <div class="row" style="margin:auto;margin-top:10px;">
      75. <div class="col-md-8">
      76. <div class="title">Usuarios Inscritos</div>
      77. <div style="height:100%;padding:0 10px 0 10px; text-align:justify">
      78. {foreach $inscritos as $item}
      79. {$item['user']}({$item['cant']}),
      80. {/foreach}
      81. </div>
      82. </div>
      83. <div class="col-md-4">
      84. <div class="title">Ganador</div>
      85. <div class="{if !is_array($ganador)}text-center{/if}" style="height:100%;margin-bottom:10px">
      86. {if is_array($ganador)}
      87. {foreach $ganador as $key=>$item}
      88. {if $key == 0}
      89. <div style="margin-top:10%"> <img src="styles/resource/images/premios/oro.png" width="50"> {$item[0]} - {$item[1]} </div>
      90. {else if $key == 1}
      91. <div style="margin-top:10%"> <img src="styles/resource/images/premios/plata.png" width="50"> {$item[0]} - {$item[1]} </div>
      92. {else if $key == 2}
      93. <div style="margin-top:10%"> <img src="styles/resource/images/premios/bronce.png" width="50"> {$item[0]} - {$item[1]} </div>
      94. {else}
      95. <div style="margin-top:10%"><i class="fas fa-medal fa-4x text-warning"></i> {$item[0]} - {$item[1]} </div>
      96. {/if}
      97. {/foreach}
      98. {else}
      99. <div style="margin-top:10%">{$ganador}</div>
      100. {/if}
      101. </div>
      102. </div>
      103. </div>
      104. <div class="clear"></div>
      105. </table>
      106. </div>
      107. {/block}
      Display All
    • ok this css might be missing
      }

      .content_page {
      margin: 0 auto;
      width: 706px;
      border:1px solid #142c52;
      -moz-border-radius: 3px;
      -webkit-border-radius: 3px;
      border-radius: 3px;
      background: #000d20;
      padding: 5px;
      overflow: visible;
      }
      .full #content > table, .full form > table {
      max-width:95%;
      width:80%;
      }

      .left{
      text-align:left
      }

      .right{
      text-align:right
      }

      .center{
      text-align:center
      }

      .top{
      vertical-align:top
      }


      .tooltip, .tooltip_sticky {
      cursor: pointer;
      }
    • Russoll wrote:

      im using the same file u sent
      Pero en que parte añadiste

      CSS Source Code

      1. .content_page {
      2. margin: 0 auto;
      3. width: 706px;
      4. border:1px solid #142c52;
      5. -moz-border-radius: 3px;
      6. -webkit-border-radius: 3px;
      7. border-radius: 3px;
      8. background: #000d20;
      9. padding: 5px;
      10. overflow: visible;
      11. }
      12. .full #content > table, .full form > table {
      13. max-width:95%;
      14. width:80%;
      15. }
      16. .left{
      17. text-align:left
      18. }
      19. .right{
      20. text-align:right
      21. }
      22. .center{
      23. text-align:center
      24. }
      25. .top{
      26. vertical-align:top
      27. }
      28. .tooltip, .tooltip_sticky {
      29. cursor: pointer;
      30. }
      Display All