- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 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 строк.