$check_str = $_REQUEST['check']; if ($check_str != "") { //TODO: Check we have all the params and tell user if not $site = urldecode($_REQUEST['site']); $type = urldecode($_REQUEST['type']); $license = urldecode($_REQUEST['license']); $license_locale = ''; $license_version = '4.0'; $title = urldecode($_REQUEST['title']); $url = urldecode($_REQUEST['url']); $author = urldecode($_REQUEST['author']); $author_url = urldecode($_REQUEST['author_url']); $preview_url = urldecode($_REQUEST['preview_url']); $full_url = urldecode($_REQUEST['full_url']); $check = Integrity::view_params_hash($license, $type, $site, $title, $url, $author, $author_url, $preview_url, $full_url); if ($check_str != $check) { die("Params invalid."); } $smarty->assign('site', $site); $smarty->assign('dcmitype', media_dcmitype_for_letter($type)); $smarty->assign('license_string', license_string($license, $license_version, $license_locale)); $smarty->assign('license_url', license_url_for_num($license, $license_version)); $smarty->assign('license_icon', license_icon_for_num($license, $license_version)); $smarty->assign('title', $title); $smarty->assign('url', $url); $smarty->assign('author', $author); $smarty->assign('author_url', $author_url); $smarty->assign('image', $full_url); } $smarty->assign('headerfile', 'welcome-header.tpl'); $smarty->display('view.tpl');
function license_deed_for_num($num, $ver, $lang) { if ($lang) { $lc = ".{$lang}"; } else { $lc = ''; } return license_url_for_num($num) . 'deed' . $lc; }