Пример #1
0
        $cat['cat_url'] = $action . "&parentid=" . $cat['catid'];
        $cat['edit_url'] = $action . "&catid=" . $cat['catid'];
        $cat['del_url'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=delete&type=cat&catid=" . $cat['catid'];
        $cat['addphoto_url'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=addphoto&type=category&typeid=" . $cat['catid'];
        $i % 2 == 0 ? $cat['class'] = 'class="second"' : ($cat['class'] = '');
        $xtpl->assign('LISTCAT', $cat);
        $xtpl->parse('main.listcat.loop');
        ++$i;
    }
    $xtpl->parse('main.listcat');
}
if (!empty($array_cat_list)) {
    if (empty($alias)) {
        $xtpl->parse('main.content.getalias');
    }
    foreach ($listcat as $data) {
        $xtpl->assign('listcat', $data);
        $xtpl->parse('main.content.listcat');
    }
}
$hook .= custom_metatag($cats);
$hook .= configdata($who_views, $groups_views, $cats['who_view']);
$hook .= setAdmin($cats);
$xtpl->assign('CAT', $cats);
$xtpl->assign('HOOK', $hook);
$xtpl->parse('main.content');
$xtpl->parse('main');
$contents .= $xtpl->text('main');
include NV_ROOTDIR . "/includes/header.php";
echo nv_admin_theme($contents);
include NV_ROOTDIR . "/includes/footer.php";
Пример #2
0
if (in_array($type, array('category', 'photo')) and !empty($allalbs)) {
    $allalbs[0] = array('id' => 0, 'title' => 'Chọn album');
    foreach ($allalbs as $albid => $album) {
        $photo['albumid'] == $albid ? $selected = "selected" : ($selected = "");
        $xtpl->assign('ALB', array('id' => $albid, 'title' => $album['title'], 'selected' => $selected));
        $xtpl->parse('main.alblist.loop');
    }
    $xtpl->assign('label', "Chọn album");
    $xtpl->parse('main.alblist');
}
$who_views = array();
foreach ($array_who_view as $k => $w) {
    $who_views[] = array("value" => $k, "selected" => $photo['who_view'] == $k ? " selected=\"selected\"" : "", "title" => $w);
}
$groups_views = array();
$photo['groups_view'] = explode(",", $photo['groups_view']);
foreach ($groups_list as $group_id => $grtl) {
    $groups_views[] = array("value" => $group_id, "checked" => in_array($group_id, $photo['groups_view']) ? " checked=\"checked\"" : "", "title" => $grtl);
}
$views = configdata($who_views, $groups_views, $photo['who_view']);
$photo['allowed_comm'] == 1 ? $photo['allowed_comm'] = 'checked="checked"' : ($photo['allowed_comm'] = "");
$photo['allowed_rating'] == 1 ? $photo['allowed_rating'] = "checked=\"checked\"" : ($photo['allowed_rating'] = "");
$photo['src'] = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_name . '/' . $photo['filepath'] . '/thumbs/' . $photo['filename'];
$xtpl->assign('PHOTO', $photo);
$xtpl->assign('views', $views);
$xtpl->assign('formid', $formid);
$xtpl->assign('colspan', $colspan);
$xtpl->parse('main');
$contents .= $xtpl->text('main');
echo $contents;
die;