"PHP" / Говнокод #20221 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
# https://www.fusionticket.org/ cms для продажи билетов 

// файл includes/classes/class.router.php

    if(is_null($action)){
      if (isset($_POST['action'])) {
        $action=$_POST['action'];
      } elseif (isset($_GET['action'])) {
        $action=$_GET['action'];
      } else
        $action=false;
    }

    $_REQUEST['action'] = $action;
    $_GET['action']     = $action;
    $_POST['action']    = $action;
    //echo $controller,'-',$module, '-',$action;

//  теперь с class.router.php попадаем сюда includes/template/web/shop.tpl

{if  $smarty.post.action eq 'resendpassword'}
   {$user->forgot_password_f($smarty.post.email)}
{/if}

{if $smarty.request.action eq 'login' and $smarty.request.type != 'block'}
	{include file="user_login.tpl"}

{elseif $smarty.request.action eq 'register'}
  {if $smarty.request.register_user}
    {user->register ismember=true data=$smarty.post secure='user_nospam' login=true}
    {assign var='user_data' value=$smarty.post}
    {if $user_errors}
      {include file="user_register.tpl" ManualRegister=true}
    {else}
      {include file="user_activate.tpl"}
    {/if}
  {else}
    {include file="user_register.tpl" ManualRegister=true}
  {/if}

{elseif $smarty.request.action eq 'activate'}
  {include file="user_activate.tpl"}

{elseif $smarty.request.action eq 'resend_activation'}
  {include file="resend_activation.tpl"}
{elseif $smarty.get.action eq "remove"}
  {$cart->remove_item_f($smarty.get.event_id,$smarty.get.cat_id,$smarty.get.item)}
  {include file="cart_view.tpl"}

{elseif $smarty.request.action eq "addtocart"}
  {if $smarty.post.place}
    {assign var='last_item' value=$cart->add_item_f($smarty.post.event_id, $smarty.post.category_id, $smarty.post.place, $smarty.post.discount, 'mode_web')}
  {else}
    {assign var='last_item' value=$cart->add_item_f($smarty.post.event_id, $smarty.post.category_id, $smarty.post.places, $smarty.post.discount, 'mode_web')}
  {/if}
  {if $last_item}
    {redirect url="index.php?action=view_cart&event_id={$smarty.post.event_id}"}
  {else}
    {include file="event_ordering.tpl"}
  {/if}
{elseif $smarty.request.action eq "buy"}
  {include file="event_ordering.tpl"}
 
и т. д.  250 строк.

https://www.fusionticket.org/.

Запостил: konmado konmado, (Updated )

Комментарии (0) RSS

Добавить комментарий

Я, guest, находясь в здравом уме и твердой памяти, торжественно заявляю:

    А не использовать ли нам bbcode?


    8