$width = sensitiveIO::request('width', 'sensitiveIO::isPositiveInteger', 300); $height = sensitiveIO::request('height', 'sensitiveIO::isPositiveInteger', 300); $codename = sensitiveIO::request('module'); if (!$codename) { CMS_grandFather::raiseError('Unknown module ...'); $view->setContent(''); $view->show(); } //load module $module = CMS_modulesCatalog::getByCodename($codename); if (!$module || !$module->isPolymod()) { CMS_grandFather::raiseError('Unknown module or module is not polymod for codename : ' . $codename); $view->show(); } //CHECKS user has module clearance if (!$cms_user->hasModuleClearance($codename, CLEARANCE_MODULE_EDIT)) { CMS_grandFather::raiseError('User has no rights on module : ' . $codename); $view->setActionMessage($cms_language->getmessage(MESSAGE_ERROR_MODULE_RIGHTS, array($module->getLabel($cms_language)))); $view->setContent(''); $view->show(); } $html = ''; if ($url) { $oembed = new CMS_oembed($url, $width, $height); $html = $oembed->getHTML(); if (!$html) { $html = $cms_language->getMessage(MESSAGE_ERROR_OEMBED_NOT_FOUND, false, MOD_POLYMOD_CODENAME); } } $view->setContent($html); $view->show();
require_once dirname(__FILE__) . '/../../cms_rc_frontend.php'; //Check parameter if (!io::get('params')) { die('Missing parameter.'); } $params = io::get('params'); $params = @base64_decode($params); if (!$params) { die('Incorrect parameter.'); } $params = @unserialize($params); if (!is_array($params) || !isset($params['url']) || !isset($params['maxwidth']) || !isset($params['maxheight'])) { die('Incorrect parameter.'); } //load oembed object $oembed = new CMS_oembed($params['url'], $params['maxwidth'], $params['maxheight']); $title = $html = ''; if (!$oembed->hasProvider()) { $title = $html = 'Media not handled ...'; } else { $title = $oembed->getTitle(); $html = $oembed->getHTML(array(), true); } if (defined('APPLICATION_XHTML_DTD')) { echo APPLICATION_XHTML_DTD . "\n"; } echo '<html> <head> <title>' . $title . '</title> <style> body {