[3609] | 1 | <?php |
---|
| 2 | |
---|
| 3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 4 | |
---|
| 5 | $params = unserialize($conf['PY_GVideo']); |
---|
| 6 | |
---|
| 7 | $idvideo = file_get_contents($picture['current']['path']); |
---|
| 8 | $sp = explode("/", $idvideo); |
---|
| 9 | |
---|
| 10 | $template->assign(array( |
---|
| 11 | 'ID_GVIDEO' => $sp[0], |
---|
[7791] | 12 | 'AUTO_GVIDEO' => $params[$extension][2], |
---|
| 13 | 'HEIGHT_IMG' => !empty($sp[1]) ? $sp[1] : $params[$extension][0], |
---|
[7793] | 14 | 'WIDTH_IMG' => !empty($sp[2]) ? $sp[2] : $params[$extension][1], |
---|
[7791] | 15 | )); |
---|
[3609] | 16 | |
---|
| 17 | if ($extension == 'gvideo') |
---|
| 18 | { |
---|
| 19 | $template->assign(array( |
---|
| 20 | 'LANG_GVIDEO' => $params[$extension][3], |
---|
| 21 | 'START_GVIDEO' => !empty($sp[3]) ? "initialTime=" . $sp[3] : '')); |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | // bouton de telechargement |
---|
| 25 | unset($template->smarty->_tpl_vars['current']['U_DOWNLOAD']); |
---|
| 26 | $pi = pathinfo($picture['current']['path']); |
---|
| 27 | $location = get_filename_wo_extension($pi['dirname'] . '/pwg_high/' . $pi['basename']); |
---|
| 28 | foreach(array('.asf', '.wmv', '.divx', '.xvid', '.avi', '.AVI', '.qt', '.mov', '.mpg', '.mpeg', '.mp4', '.flv', '.zip', '.rar') as $high_ext) |
---|
| 29 | { |
---|
| 30 | if (file_exists($location . $high_ext)) |
---|
| 31 | { |
---|
| 32 | $template->smarty->_tpl_vars['current']['U_DOWNLOAD'] = $location . $high_ext; |
---|
| 33 | } |
---|
| 34 | } |
---|
| 35 | |
---|
[7791] | 36 | $template->set_filenames(array('py_content' => dirname(__FILE__) . '/template/pywaie_' . $extension . '.tpl')); |
---|
| 37 | $content = $template->parse('py_content', true); |
---|
[3609] | 38 | |
---|
[3296] | 39 | ?> |
---|