assign('mp3_button', array( 'URL' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . WFS_DIR . '%2Fadmin%2Fadd_page_on_index.php&catid=' . $cat_id . '&backurl=' . $_SERVER['REQUEST_URI'], 'ICON' => WFS_PATH . 'template/add_button.png')); } if (!empty($result)) { if (file_exists($result['sound'])) { if (!empty($result['volume'])) { $wfs_conf[1] = $result['volume']; } $template->assign('wfs', array( 'MP3' => WFS_PATH . 'dewplayer.swf?mp3=' . strtr($result['sound'] , array(' ' => '%20')), 'VOLUME' => $wfs_conf[1], 'PLAYER_WIDTH' => $wfs_conf[2] - 2, 'AUTOSTART' => $wfs_conf[3], 'AUTOREPLAY' => $wfs_conf[4])); } else { pwg_query('DELETE FROM ' . WFS_IMG_CAT_TABLE . ' WHERE sound_id = ' . $result['id'] . ';'); pwg_query('DELETE FROM ' . WFS_SOUNDS_TABLE . ' WHERE id = ' . $result['id'] . ';'); } } $template->set_filenames(array('wfs' => dirname(__FILE__) . '/template/wfs_on_index.tpl')); $template->concat('PLUGIN_INDEX_ACTIONS', $template->parse('wfs', true)); ?>