set_filenames( array('Front2Back' => dirname(__FILE__) . '/Front2Back.tpl') ); $template->assign(array('F2B_PATH' => F2B_PATH)); if (is_file($verso)) { $template->assign( 'verso', array( 'VERSO_URL' => $verso, 'WIDTH_IMG' => $width, 'HEIGHT_IMG' => $height, 'HSHIFT_IMG' => $shift_left, 'VSHIFT_IMG' => $shift_up, ) ); } elseif (is_file($rotat)) { /* Is there a rotated file ? */ $shift_left = (int) ($height / 2) + $conf['Front2Back_hshift']; $template->assign( 'verso', array( 'VERSO_URL' => $rotat, 'WIDTH_IMG' => $height, /* Swap width/height */ 'HEIGHT_IMG' => $width, /* "" "" */ 'HSHIFT_IMG' => $shift_left, 'VSHIFT_IMG' => $shift_up, ) ); } else return $content; return $content . $template->parse('Front2Back', true); } } ?>