Exemplo n.º 1
0
function module_advert_edit()
{
    global $global, $smarty;
    $obj = new advert();
    $obj->set_where('adv_id = ' . $global['id']);
    $smarty->assign('advert', $obj->get_one());
}
Exemplo n.º 2
0
function module_ad($par)
{
    global $smarty;
    $obj = new advert();
    $obj->set_where('adv_id = ' . $par['id']);
    $one = $obj->get_one();
    $ad = '';
    if (count($one)) {
        $ad = str_replace(''', chr(39), $one['adv_code']);
    }
    $smarty->assign('ad', $ad);
}