-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
55 lines (43 loc) · 1.41 KB
/
index.php
1
2
3
4
5
6
7
8
9
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
<?php
//##copyright##
define("INTELLI_REALM", $iaCore->get_cfg('name'));
if(SMARTY)
{
// get account recipes
if ('my_recipes' == INTELLI_REALM)
{
if (!IN_USER)
{
iaUtil::errorPage('403');
}
$fields = $iaCore->getAcoFieldsList(false, false, '', true);
$iaCore->assign_by_ref('fields', $fields);
$iaRecipe = $iaCore->factoryPackages(IA_CURRENT_PACKAGE, 'front', 'recipe');
$recipes = $iaRecipe->getRecipesByAccount($_SESSION['user']['id'], 0, 10);
$iaCore->assign('recipes', $recipes);
$iaCore->startHook('phpMyRecipesBeforeStart', array('item' => 'recipe'));
$iaCore->display('myrecipes');
}
elseif ('my_cookbooks' == INTELLI_REALM)
{
if (!IN_USER)
{
iaUtil::errorPage('403');
}
$fields = $iaCore->getAcoFieldsList(false, 'cookbooks', '', true);
$iaCore->assign_by_ref('fields', $fields);
// get account cookbooks
$iaCookbook = $iaCore->factoryPackages(IA_CURRENT_PACKAGE, 'front', 'cookbook');
$cookbooks = $iaCookbook->getCookbooksByAccount($_SESSION['user']['id'], 0, 10);
$iaCore->assign('cookbooks', $cookbooks);
$iaCore->startHook('phpMyCookbooksBeforeStart', array('item' => 'cookbook'));
$iaCore->set_cfg('title', $iaCore->get_cfg('name'));
$iaCore->display('mycookbooks');
}
elseif ('recipes_home' == INTELLI_REALM)
{
$fields = $iaCore->getAcoFieldsList(false, false, '', true);
$iaCore->assign_by_ref('fields', $fields);
$iaCore->display();
}
}