Exemplo n.º 1
0
            }
        }
        $hook->redirect($refresh);
    } else {
        $hook->redirect($refresh);
    }
} else {
    $tpl->setfile(array('body' => 'member.tpl'));
    $cond = " active=0";
    $cat = $oClass->view($cond);
    $total = $cat->num_rows();
    $orderby = "timestamp DESC";
    $start = LIMIT * intval($_GET['page']);
    $url = './?mod=' . $system->module . '&parentid=' . intval($_GET['parentid']) . '&type=' . intval($_GET['type']);
    $dp = new paging($url, $total, LIMIT);
    $request['divpage'] = $dp->simple();
    $cat = $oClass->view($cond, $start, LIMIT, $orderby);
    while ($rs = $cat->fetch()) {
        //$rs['delete'] = $rs['is_admin']?'':'style="display: inline;"';
        $rs['checked'] = $rs['active'] ? 'checked' : '';
        $rs['avatar'] = $rs['avatar'] ? '<a href="' . _UPLOAD . $rs['avatar'] . '" class="divbox"><img src="' . _UPLOAD . $rs['avatar'] . '" width="30" height="30" /></a>' : '';
        $tpl->assign($rs, 'user');
    }
    $breadcrumb->reset();
    $menu = explode('.', $_SESSION['cms_menu']);
    $breadcrumb->assign("", $MenuName[$menu[0]]);
    $level = $MenuLink[$menu[0]][$menu[1]];
    $breadcrumb->assign($level['link'], $level['name']);
}
$request['breadcrumb'] = $breadcrumb->parse();
$tpl->assign($request);
Exemplo n.º 2
0
*/
$limit = 30;
$start = $limit * intval($request['page']);
$featuredon = $request['id'];
if ($pro['featuredon']) {
    $tmp = explode(',', $pro['featuredon']);
    $tmp[] = $request['id'];
    $featuredon = implode(',', $tmp);
}
$cond = " c.catid = " . $request['catid'] . " AND c.id NOT IN(" . $featuredon . ")";
$result = $oClass->view($request['type'], $request['catid'], NULL, $cond);
$total = $result->num_rows();
$result = $oClass->view($request['type'], $request['catid'], NULL, $cond, $start, $limit);
while ($rs = $result->fetch()) {
    $rs = $hook->format($rs);
    $tpl->assign($rs, 'product');
}
$dP = new paging($_SERVER['QUERY_STRING'], $total, $limit);
$request['divpage'] = $dP->simple(5);
$featuredon = 0;
if ($pro['featuredon']) {
    $tmp = explode(',', $pro['featuredon']);
    $featuredon = implode(',', $tmp);
}
$result = $oClass->view($request['type'], -1, NULL, " c.id IN(" . $featuredon . ")");
while ($rs = $result->fetch()) {
    $rs = $hook->format($rs);
    $tpl->assign($rs, 'current');
}
$request['breadcrumb'] = $breadcrumb->parse();
$tpl->assign($request);