Example #1
0
        $_REQUEST["imageType"] = $imgtype;
    }
    $smarty->assign('imageData', $_REQUEST["imageData"]);
    $smarty->assign('tempimg', 'n');
    if (strlen($_REQUEST["imageData"]) > 0) {
        $tmpfname = tempnam($tmpDir, "TMPIMG") . $imgname;
        $fp = fopen($tmpfname, "w");
        if ($fp) {
            fwrite($fp, urldecode($_REQUEST["imageData"]));
            fclose($fp);
            $smarty->assign('tempimg', $tmpfname);
            $smarty->assign('hasImage', 'y');
        } else {
            $smarty->assign('hasImage', 'n');
        }
    }
    if (!isset($_REQUEST["create_zone"])) {
        $bannerId = $bannerlib->replace_banner($_REQUEST["bannerId"], $_REQUEST["client"], $_REQUEST["url"], '', '', $_REQUEST["use"], $_REQUEST["imageData"], $_REQUEST["imageType"], $_REQUEST["imageName"], $_REQUEST["HTMLData"], $_REQUEST["fixedURLData"], $_REQUEST["textData"], $fromDate, $toDate, $useDates, $Dmon, $Dtue, $Dwed, $Dthu, $Dfri, $Dsat, $Dsun, $fromTime, $toTime, $_REQUEST["maxImpressions"], $_REQUEST["zone"]);
        $smarty->assign('bannerId', $bannerId);
    }
}
$zones = $bannerlib->banner_get_zones();
$smarty->assign_by_ref('zones', $zones);
$clients = $userlib->get_users(0, -1, 'login_desc', '');
$smarty->assign_by_ref('clients', $clients["data"]);
ask_ticket('edit-banner');
// disallow robots to index page:
$smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW');
// Display the template
$smarty->assign('mid', 'tiki-edit_banner.tpl');
$smarty->display("tiki.tpl");