function sp_retrieve_help($file, $tag, $folder) { $path = SPHELP . 'admin/' . $folder; $note = ''; $lang = spa_get_language_code(); if (empty($lang) || ($lang = 'en_US')) { $lang = 'en'; } $helpfile = $path . $file . '.' . $lang; $helpfile = apply_filters('sph_admin_help-' . $file, $helpfile, $tag, $lang); if (file_exists($helpfile) == false) { $helpfile = str_replace('.' . $lang, '.en', $helpfile); if (file_exists($helpfile) == false) { return spa_text('No help file can be located'); } else { $note = spa_text('Sorry but a help file can not be found in your language'); } } $fh = fopen($helpfile, 'r'); do { $theData = fgets($fh); if (feof($fh)) { break; } } while (substr($theData, 0, strlen($tag)) != $tag); $theData = ''; $theEnd = false; do { if (feof($fh)) { break; } $theLine = fgets($fh); if (substr($theLine, 0, 5) == '[end]') { $theEnd = true; } else { $theData .= $theLine; } } while ($theEnd == false); fclose($fh); return $note . '<br /><br />' . $theData; }
function spa_permissions_add_permission_form() { ?> <script type="text/javascript"> jQuery(document).ready(function() { spjAjaxForm('sfrolenew', 'sfreloadpb'); }); </script> <?php # Get correct tooltips file $lang = spa_get_language_code(); if (empty($lang)) { $lang = 'en'; } $ttpath = SPHELP . 'admin/tooltips/admin-permissions-tips-' . $lang . '.php'; if (file_exists($ttpath) == false) { $ttpath = SPHELP . 'admin/tooltips/admin-permissions-tips-en.php'; } if (file_exists($ttpath)) { include_once $ttpath; } global $spGlobals; spa_paint_options_init(); $ahahURL = SFHOMEURL . 'index.php?sp_ahah=permissions-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=addperm'; ?> <form action="<?php echo $ahahURL; ?> " method="post" id="sfrolenew" name="sfrolenew"> <?php echo sp_create_nonce('forum-adminform_rolenew'); spa_paint_open_tab(spa_text('Permissions') . " - " . spa_text('Add New Permission'), true); spa_paint_open_panel(); spa_paint_open_fieldset(spa_text('Add New Permission'), 'true', 'create-new-permission-set'); spa_paint_input(spa_text('Permission Set Name'), "role_name", '', false, true); spa_paint_input(spa_text('Permission Set Description'), "role_desc", '', false, true); spa_paint_select_start(spa_text('Clone Existing Permission Set'), 'role', 'role'); spa_display_permission_select('', false); spa_paint_select_end('<small>(' . spa_text('Select an existing Permission Set to Clone. Any settings below will be ignored.') . ')</small>'); ?> <br /><p><strong><?php spa_etext('Permission Set Actions'); ?> :</strong></p> <?php echo '<p><img src="' . SFADMINIMAGES . 'sp_GuestPerm.png" alt="" style="width:16px;height:16px;vertical-align:top" />'; echo '<small> ' . spa_text('Note: Action settings displaying this icon will be ignored for Guest Users') . '</small>'; echo ' <img src="' . SFADMINIMAGES . 'sp_GlobalPerm.png" alt="" style="width:16px;height:16px;vertical-align:top" />'; echo '<small> ' . spa_text('Note: Action settings displaying this icon require enabling to use') . '</small>'; echo ' <img src="' . SFADMINIMAGES . 'sp_Warning.png" alt="" style="width:16px;height:16px;vertical-align:top" />'; echo '<small> ' . spa_text('Note: Action settings displaying this icon should be used with great care') . '</small></p>'; sp_build_site_auths_cache(); $sql = 'SELECT auth_id, auth_name, auth_cat, authcat_name, warning FROM ' . SFAUTHS . ' JOIN ' . SFAUTHCATS . ' ON ' . SFAUTHS . '.auth_cat = ' . SFAUTHCATS . '.authcat_id WHERE active = 1 ORDER BY auth_cat, auth_id'; $authlist = spdb_select('set', $sql); $firstitem = true; $category = ''; ?> <!-- OPEN OUTER CONTAINER DIV --> <div class="outershell" style="width: 100%;"> <?php foreach ($authlist as $a) { if ($category != $a->authcat_name) { $category = $a->authcat_name; if (!$firstitem) { ?> <!-- CLOSE DOWN THE ENDS --> </table></div> <?php } ?> <!-- OPEN NEW INNER DIV --> <div class="innershell"> <!-- NEW INNER DETAIL TABLE --> <table style="width:100%;border:0"> <tr><td colspan="2" class="permhead"><?php spa_etext($category); ?> </td></tr> <?php $firstitem = false; } $auth_id = $a->auth_id; $auth_name = $a->auth_name; $authWarn = empty($a->warning) ? false : true; $warn = $authWarn ? " permwarning" : ''; $tip = $authWarn ? " class='permwarning' title='" . esc_js(spa_text($a->warning)) . "'" : ''; $button = 'b-' . $auth_id; if ($spGlobals['auths'][$auth_id]->ignored || $spGlobals['auths'][$auth_id]->enabling || $authWarn) { $span = ''; } else { $span = ' colspan="2" '; } ?> <tr<?php echo $tip; ?> > <td class="permentry<?php echo $warn; ?> "> <input type="checkbox" name="<?php echo $button; ?> " id="sf<?php echo $button; ?> " /> <label for="sf<?php echo $button; ?> " class="sflabel"> <img style="text-align:top;float: right; border: 0pt none ; margin: -4px 5px 0px 3px; padding: 0;" class="" title="<?php echo $tooltips[$auth_name]; ?> " src="<?php echo SFADMINIMAGES; ?> sp_Information.png" alt="" /> <?php spa_etext($spGlobals['auths'][$auth_id]->auth_desc); ?> </label> <?php if ($span == '') { ?> <td style="text-align:center;width:32px" class="permentry"> <?php } if ($span == '') { if ($spGlobals['auths'][$auth_id]->enabling) { echo '<img src="' . SFADMINIMAGES . 'sp_GlobalPerm.png" alt="" style="width:16px;height:16px" title="' . spa_text('Requires Enabling') . '" />'; } if ($spGlobals['auths'][$auth_id]->ignored) { echo '<img src="' . SFADMINIMAGES . 'sp_GuestPerm.png" alt="" style="width:16px;height:16px" title="' . spa_text('Ignored for Guests') . '" />'; } if ($authWarn) { echo '<img src="' . SFADMINIMAGES . 'sp_Warning.png" alt="" style="width:16px;height:16px" title="' . spa_text('Use with Caution') . '" />'; } echo '</td>'; } else { ?> </td><td class="permentry" style="width:32px"></td> <?php } ?> </tr> <?php } ?> <!-- END CONTAINER DIV --> </table></div><div class="clearboth"></div> </div> <?php spa_paint_close_fieldset(); spa_paint_close_panel(); do_action('sph_perm_add_perm_panel'); spa_paint_close_container(); ?> <div class="sfform-submit-bar"> <input type="submit" class="button-primary" id="saveit" name="saveit" value="<?php spa_etext('Create New Permission'); ?> " /> </div> <?php spa_paint_close_tab(); ?> </form> <div class="sfform-panel-spacer"></div> <?php }
function spa_permissions_edit_permission_form($role_id) { global $spGlobals; ?> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('#rolerow-<?php echo $role_id; ?> ').addClass('inForm'); spjAjaxForm('sfroleedit<?php echo $role_id; ?> ', 'sfreloadpb'); jQuery(function(jQuery){vtip();}) }); </script> <?php # Get correct tooltips file $lang = spa_get_language_code(); if (empty($lang)) { $lang = 'en'; } $ttpath = SPHELP . 'admin/tooltips/admin-permissions-tips-' . $lang . '.php'; if (file_exists($ttpath) == false) { $ttpath = SPHELP . 'admin/tooltips/admin-permissions-tips-en.php'; } if (file_exists($ttpath)) { include_once $ttpath; } $role = spa_get_role_row($role_id); spa_paint_options_init(); $ahahURL = SFHOMEURL . 'index.php?sp_ahah=permissions-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=editperm'; ?> <form action="<?php echo $ahahURL; ?> " method="post" id="sfroleedit<?php echo $role->role_id; ?> " name="sfroleedit<?php echo $role->role_id; ?> "> <?php echo sp_create_nonce('forum-adminform_roleedit'); spa_paint_open_tab(spa_text('Permissions') . ' - ' . spa_text('Manage Permissions'), true); spa_paint_open_panel(); spa_paint_open_fieldset(spa_text('Edit Permission'), 'true', 'edit-master-permission-set'); ?> <input type="hidden" name="role_id" value="<?php echo $role->role_id; ?> " /> <?php spa_paint_input(spa_text('Permission Set Name'), 'role_name', sp_filter_title_display($role->role_name), false, true); spa_paint_input(spa_text('Permission Set Description'), 'role_desc', sp_filter_title_display($role->role_desc), false, true); ?> <br /><p><strong><?php spa_etext("Permission Set Actions"); ?> :</strong></p> <?php echo '<p><img src="' . SFADMINIMAGES . 'sp_GuestPerm.png" alt="" width="16" height="16" align="top" />'; echo '<small> ' . spa_text('Note: Action settings displaying this icon will be ignored for Guest Users') . '</small><br />'; echo '<img src="' . SFADMINIMAGES . 'sp_GlobalPerm.png" alt="" width="16" height="16" align="top" />'; echo '<small> ' . spa_text('Note: Action settings displaying this icon require enabling to use') . '</small><br />'; echo '<img src="' . SFADMINIMAGES . 'sp_Warning.png" alt="" width="16" height="16" align="top" />'; echo '<small> ' . spa_text('Note: Action settings displaying this icon should be used with great care') . '</small></p>'; sp_build_site_auths_cache(); $sql = 'SELECT auth_id, auth_name, auth_cat, authcat_name, warning FROM ' . SFAUTHS . ' JOIN ' . SFAUTHCATS . ' ON ' . SFAUTHS . '.auth_cat = ' . SFAUTHCATS . '.authcat_id WHERE active = 1 ORDER BY auth_cat, auth_id'; $authlist = spdb_select('set', $sql); $role_auths = maybe_unserialize($role->role_auths); $firstitem = true; $category = ''; ?> <!-- OPEN OUTER CONTAINER DIV --> <div class="outershell" style="width: 100%;"> <?php foreach ($authlist as $a) { if ($category != $a->authcat_name) { $category = $a->authcat_name; if (!$firstitem) { ?> <!-- CLOSE DOWN THE ENDS --> </table></div> <?php } ?> <!-- OPEN NEW INNER DIV --> <div class="innershell"> <!-- NEW INNER DETAIL TABLE --> <table width="100%" border="0"> <tr><td colspan="2" class="permhead"><?php spa_etext($category); ?> </td></tr> <?php $firstitem = false; } $auth_id = $a->auth_id; $auth_name = $a->auth_name; $authWarn = empty($a->warning) ? false : true; $warn = $authWarn ? ' permwarning' : ''; $tip = $authWarn ? " class='vtip permwarning' title='" . esc_js(spa_text($a->warning)) . "'" : ''; $button = 'b-' . $auth_id; $checked = ''; if (isset($role_auths[$auth_id]) && $role_auths[$auth_id]) { $checked = ' checked="checked"'; } if ($spGlobals['auths'][$auth_id]->ignored || $spGlobals['auths'][$auth_id]->enabling || $authWarn) { $span = ''; } else { $span = ' colspan="2" '; } ?> <tr<?php echo $tip; ?> > <td class="permentry<?php echo $warn; ?> "> <label for="sfR<?php echo $role->role_id . $button; ?> " class="sflabel"> <img align="top" style="float: right; border: 0pt none ; margin: -4px 5px 0px 3px; padding: 0;" class="vtip" title="<?php echo $tooltips[$auth_name]; ?> " src="<?php echo SFADMINIMAGES; ?> sp_Information.png" alt="" /> <?php spa_etext($spGlobals['auths'][$auth_id]->auth_desc); ?> </label> <input type="checkbox" name="<?php echo $button; ?> " id="sfR<?php echo $role->role_id . $button; ?> "<?php echo $checked; ?> /> <?php if ($span == '') { ?> <td align="center" class="permentry" width="32px"> <?php } if ($span == '') { if ($spGlobals['auths'][$auth_id]->enabling) { echo '<img src="' . SFADMINIMAGES . 'sp_GlobalPerm.png" alt="" width="16" height="16" title="' . spa_text('Requires Enabling') . '" />'; } if ($spGlobals['auths'][$auth_id]->ignored) { echo '<img src="' . SFADMINIMAGES . 'sp_GuestPerm.png" alt="" width="16" height="16" title="' . spa_text('Ignored for Guests') . '" />'; } if ($authWarn) { echo '<img src="' . SFADMINIMAGES . 'sp_Warning.png" alt="" width="16" height="16" title="' . spa_text('Use with Caution') . '" />'; } echo '</td>'; } else { ?> </td><td class="permentry" width="32px"></td> <?php } ?> </tr> <?php } ?> <!-- END CONTAINER DIV --> </table></div><div class="clearboth"></div> </div> <?php spa_paint_close_fieldset(); spa_paint_close_panel(); do_action('sph_perm_edit_perm_panel'); spa_paint_close_container(); ?> <div class="sfform-submit-bar"> <input type="submit" class="button-primary" id="sfpermedit<?php echo $role->role_id; ?> " name="sfpermedit<?php echo $role->role_id; ?> " value="<?php spa_etext('Update Permission'); ?> " /> <input type="button" class="button-primary" onclick="javascript:jQuery('#perm-<?php echo $role->role_id; ?> ').html('');jQuery('#rolerow-<?php echo $role_id; ?> ').removeClass('inForm');" id="sfpermedit<?php echo $role->role_id; ?> " name="editpermcancel<?php echo $role->role_id; ?> " value="<?php spa_etext('Cancel'); ?> " /> </div> </form> <?php spa_paint_close_tab(); ?> <div class="sfform-panel-spacer"></div> <?php }
function spa_setup_admin_menu() { global $sfadminpanels, $sfactivepanels, $sfatooltips; # Get correct tooltips file $lang = spa_get_language_code(); if (empty($lang)) { $lang = 'en'; } $ttpath = SPHELP . 'admin/tooltips/admin-menu-tips-' . $lang . '.php'; if (file_exists($ttpath) == false) { $ttpath = SPHELP . 'admin/tooltips/admin-menu-tips-en.php'; } if (file_exists($ttpath)) { include_once $ttpath; } $sfadminpanels = $sfactivepanels = array(); /** * admin panel array elements * 0 - panel name * 1 - spf capability to view * 2 - admin file * 3 - tool tip * 4 - icon * 5 - loader function * 6 - subpanels * 7 - display in wp admin left side menu (should be false for user plugins) */ $forms = array(spa_text('Manage Groups And Forums') => array('forums' => 'sfreloadfb'), spa_text('Order Groups and Forums') => array('ordering' => 'sfreloadfo'), spa_text('Create New Group') => array('creategroup' => ''), spa_text('Create New Forum') => array('createforum' => ''), spa_text('Custom Icons') => array('customicons' => 'sfreloadci'), spa_text('Featured Images') => array('featuredimages' => 'sfreloadfi'), spa_text('Add Global Permission Set') => array('globalperm' => ''), spa_text('Delete All Permission Sets') => array('removeperms' => ''), spa_text('Merge Forums') => array('mergeforums' => 'sfreloadmf'), spa_text('Global RSS Settings') => array('globalrss' => 'sfreloadfd')); $sfadminpanels[] = array(spa_text('Forums'), 'SPF Manage Forums', '/panel-forums/spa-forums.php', $sfatooltips['forums'], 'icon-Forums', SFHOMEURL . 'index.php?sp_ahah=forums-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['forums'] = 0; $forms = array(spa_text('Global Settings') => array('global' => 'sfreloadog'), spa_text('General Display Settings') => array('display' => ''), spa_text('Content Settings') => array('content' => ''), spa_text('Member Settings') => array('members' => 'sfreloadms'), spa_text('Email Settings') => array('email' => '')); $sfadminpanels[] = array(spa_text('Options'), 'SPF Manage Options', '/panel-options/spa-options.php', $sfatooltips['options'], 'icon-Options', SFHOMEURL . 'index.php?sp_ahah=options-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['options'] = 1; $forms = array(spa_text('Smileys') => array('smileys' => 'sfreloadsm'), spa_text('Login And Registration') => array('login' => ''), spa_text('SEO') => array('seo' => 'sfreloadse'), spa_text('Forum Ranks') => array('forumranks' => 'sfreloadfr'), spa_text('Custom Messages') => array('messages' => '')); $sfadminpanels[] = array(spa_text('Components'), 'SPF Manage Components', '/panel-components/spa-components.php', $sfatooltips['components'], 'icon-Components', SFHOMEURL . 'index.php?sp_ahah=components-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['components'] = 2; $forms = array(spa_text('Manage User Groups') => array('usergroups' => 'sfreloadub'), spa_text('Create New User Group') => array('createusergroup' => ''), spa_text('Map Users to User Group') => array('mapusers' => 'sfreloadmu')); $sfadminpanels[] = array(spa_text('User Groups'), 'SPF Manage User Groups', '/panel-usergroups/spa-usergroups.php', $sfatooltips['usergroups'], 'icon-UserGroups', SFHOMEURL . 'index.php?sp_ahah=usergroups-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['usergroups'] = 3; $forms = array(spa_text('Manage Permissions Sets') => array('permissions' => 'sfreloadpb'), spa_text('Add New Permission Set') => array('createperm' => ''), spa_text('Reset Permissions') => array('resetperms' => ''), spa_text('Add New Authorization') => array('newauth' => '')); $sfadminpanels[] = array(spa_text('Permissions'), 'SPF Manage Permissions', '/panel-permissions/spa-permissions.php', $sfatooltips['permissions'], 'icon-Permissions', SFHOMEURL . 'index.php?sp_ahah=permissions-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['permissions'] = 4; $forms = array(spa_text('Page and Permalink') => array('page' => 'sfreloadpp'), spa_text('Storage Locations') => array('storage' => 'sfreloadsl'), spa_text('Language Translations') => array('language' => 'sfreloadla')); $sfadminpanels[] = array(spa_text('Integration'), 'SPF Manage Integration', '/panel-integration/spa-integration.php', $sfatooltips['integration'], 'icon-Integration', SFHOMEURL . 'index.php?sp_ahah=integration-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['integration'] = 5; $forms = array(spa_text('Profile Options') => array('options' => ''), spa_text('Profile Tabs & Menus') => array('tabsmenus' => 'sfreloadptm'), spa_text('Avatars') => array('avatars' => 'sfreloadav')); $sfadminpanels[] = array(spa_text('Profiles'), 'SPF Manage Profiles', '/panel-profiles/spa-profiles.php', $sfatooltips['profiles'], 'icon-Profiles', SFHOMEURL . 'index.php?sp_ahah=profiles-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['profiles'] = 6; if (sp_current_user_can('SPF Manage Admins')) { $forms = array(spa_text('Your Admin Options') => array('youradmin' => 'sfreloadao'), spa_text('Global Admin Options') => array('globaladmin' => ''), spa_text('Manage Admins') => array('manageadmin' => 'sfreloadma')); } else { $forms = array(spa_text('Your Admin Options') => array('youradmin' => 'sfreloadao')); } $sfadminpanels[] = array(spa_text('Admins'), 'SPF Manage Admins', '/panel-admins/spa-admins.php', $sfatooltips['admins'], 'icon-Admins', SFHOMEURL . 'index.php?sp_ahah=admins-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['admins'] = 7; $forms = array(spa_text('Member Information') => array('member-info' => '')); $sfadminpanels[] = array(spa_text('Users'), 'SPF Manage Users', '/panel-users/spa-users.php', $sfatooltips['users'], 'icon-Users', SFHOMEURL . 'index.php?sp_ahah=users-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['users'] = 8; $forms = array(spa_text('Available Plugins') => array('plugin-list' => 'sfreloadpl')); if (!is_multisite() || is_super_admin()) { $forms[spa_text('Plugin Uploader')] = array('plugin-upload' => ''); } $sfadminpanels[] = array(spa_text('Plugins'), 'SPF Manage Plugins', '/panel-plugins/spa-plugins.php', $sfatooltips['plugins'], 'icon-Plugins', SFHOMEURL . 'index.php?sp_ahah=plugins-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['plugins'] = 9; $forms = array(spa_text('Available Themes') => array('theme-list' => 'sfreloadtlist'), spa_text('Mobile Phone Theme') => array('mobile' => 'sfreloadmlist'), spa_text('Mobile Tablet Theme') => array('tablet' => 'sfreloadtablist')); if (!is_multisite() || is_super_admin()) { $forms[spa_text('Theme Editor')] = array('editor' => 'sfreloadttedit'); $forms[spa_text('Theme Uploader')] = array('theme-upload' => ''); } $sfadminpanels[] = array(spa_text('Themes'), 'SPF Manage Themes', '/panel-themes/spa-themes.php', $sfatooltips['themes'], 'icon-Themes', SFHOMEURL . 'index.php?sp_ahah=themes-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['themes'] = 10; $forms = array(spa_text('Toolbox') => array('toolbox' => ''), spa_text('Housekeeping') => array('housekeeping' => 'sfreloadhk'), spa_text('Data Inspector') => array('inspector' => ''), spa_text('CRON Inspector') => array('cron' => 'sfcron'), spa_text('Error Log') => array('errorlog' => 'sfreloadel'), spa_text('Environment') => array('environment' => ''), spa_text('Install Log') => array('log' => ''), spa_text('Change Log') => array('changelog' => ''), spa_text('Uninstall') => array('uninstall' => '')); $sfadminpanels[] = array(spa_text('Toolbox'), 'SPF Manage Toolbox', '/panel-toolbox/spa-toolbox.php', $sfatooltips['toolbox'], 'icon-Toolbox', SFHOMEURL . 'index.php?sp_ahah=toolbox-loader&sfnonce=' . wp_create_nonce('forum-ahah'), $forms, true); $sfactivepanels['toolbox'] = 11; # allow plugins to alter the admin menus $sfadminpanels = apply_filters('sf_admin_panels', $sfadminpanels); $sfactivepanels = apply_filters('sf_admin_activepanels', $sfactivepanels); }
function sp_rpx_iframe($style = '', $token_url_params = '') { $sfrpx = sp_get_option('sfrpx'); $realm = $sfrpx['sfrpxrealm']; $params .= '&flags=hide_sign_in_with&language_preference=' . spa_get_language_code(); $turl = sp_rpx_token_url() . $token_url_params . $params; $iframe_src = 'https://' . $realm . '/openid/embed?token_url=' . urlencode($turl); echo '<iframe src="' . $iframe_src . '" scrolling="no" frameBorder="no" style="width:373px;height:240px;' . $style . '"></iframe>'; }
function spa_integration_storage_form() { ?> <script type="text/javascript"> jQuery(document).ready(function() { spjAjaxForm('sfstorageform', 'sfreloadsl'); }); </script> <?php # Get correct tooltips file $lang = spa_get_language_code(); if (empty($lang)) { $lang = 'en'; } $ttpath = SPHELP . 'admin/tooltips/admin-integration-storage-tips-' . $lang . '.php'; if (file_exists($ttpath) == false) { $ttpath = SPHELP . 'admin/tooltips/admin-integration-storage-tips-en.php'; } if (file_exists($ttpath)) { include_once $ttpath; } $sfoptions = spa_get_storage_data(); $ahahURL = SFHOMEURL . 'index.php?sp_ahah=integration-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=storage'; ?> <form action="<?php echo $ahahURL; ?> " method="post" id="sfstorageform" name="sfstorage"> <?php echo sp_create_nonce('forum-adminform_storage'); spa_paint_options_init(); spa_paint_open_tab(spa_text('Integration') . ' - ' . spa_text('Storage Locations'), true); spa_paint_open_panel(); echo '<br /><div class="sfoptionerror">'; spa_etext('BEWARE: Please read the help before making any changes to these locations. Incorrect changes may cause Simple:Press to stop functioning'); echo '</div>'; spa_paint_open_fieldset(spa_text('Set Storage Locations'), true, 'storage-locations'); echo '<table><tr>'; echo '<td><img src="' . SFADMINIMAGES . 'sp_Yes.png" title="' . spa_text('Location found') . '" alt="" style="vertical-align: middle;" /> ' . spa_text('Location found') . '</td>'; echo '<td><img src="' . SFADMINIMAGES . 'sp_No.png" title="' . spa_text('Location not found') . '" alt="" style="vertical-align: middle;" /> ' . spa_text('Location not found') . '</td></tr><tr>'; echo '<td><img src="' . SFADMINIMAGES . 'sp_YesWrite.png" title="' . spa_text('Write - OK') . '" alt="" style="vertical-align: middle;" /> ' . spa_text('Write - OK') . '</td>'; echo '<td><img src="' . SFADMINIMAGES . 'sp_NoWrite.png" title="' . spa_text('Write - denied') . '" alt="" style="vertical-align: middle;" /> ' . spa_text('Write - denied') . '</td>'; echo '</tr></table>'; echo '<p><strong>' . spa_text('Set the new location of your') . ':</strong></p>'; echo '<table class="wp-list-table widefat">'; $ok = true; $path = SF_STORE_DIR . '/' . $sfoptions['plugins']; $r = spa_paint_storage_input(spa_text('Plugins Folder'), 'plugins', $sfoptions['plugins'], $path); if (!$r) { $ok = false; } $path = SF_STORE_DIR . '/' . $sfoptions['themes']; $r = spa_paint_storage_input(spa_text('Themes Folder'), 'themes', $sfoptions['themes'], $path); if (!$r) { $ok = false; } $path = SF_STORE_DIR . '/' . $sfoptions['avatars']; $r = spa_paint_storage_input(spa_text('Avatars Folder'), 'avatars', $sfoptions['avatars'], $path); if (!$r) { $ok = false; } $path = SF_STORE_DIR . '/' . $sfoptions['avatar-pool']; $r = spa_paint_storage_input(spa_text('Avatar Pool Folder'), 'avatar-pool', $sfoptions['avatar-pool'], $path); if (!$r) { $ok = false; } $path = SF_STORE_DIR . '/' . $sfoptions['smileys']; $r = spa_paint_storage_input(spa_text('Smileys Folder'), 'smileys', $sfoptions['smileys'], $path); if (!$r) { $ok = false; } $path = SF_STORE_DIR . '/' . $sfoptions['ranks']; $r = spa_paint_storage_input(spa_text('Forum Badges Folder'), 'ranks', $sfoptions['ranks'], $path); if (!$r) { $ok = false; } $path = SF_STORE_DIR . '/' . $sfoptions['custom-icons']; $r = spa_paint_storage_input(spa_text('Custom Icons Folder'), 'custom-icons', $sfoptions['custom-icons'], $path); if (!$r) { $ok = false; } $path = SF_STORE_DIR . '/' . $sfoptions['language-sp']; $r = spa_paint_storage_input(spa_text('Simple:Press Language Files'), 'language-sp', $sfoptions['language-sp'], $path); if (!$r) { $ok = false; } $path = SF_STORE_DIR . '/' . $sfoptions['language-sp-plugins']; $r = spa_paint_storage_input(spa_text('Simple:Press Plugin Language Files'), 'language-sp-plugins', $sfoptions['language-sp-plugins'], $path); if (!$r) { $ok = false; } $path = SF_STORE_DIR . '/' . $sfoptions['language-sp-themes']; $r = spa_paint_storage_input(spa_text('Simple:Press Theme Language Files'), 'language-sp-themes', $sfoptions['language-sp-themes'], $path); if (!$r) { $ok = false; } $path = SF_STORE_DIR . '/' . $sfoptions['cache']; $r = spa_paint_storage_input(spa_text('Forum CSS/JS Cache'), 'cache', $sfoptions['cache'], $path); if (!$r) { $ok = false; } $path = SF_STORE_DIR . '/' . $sfoptions['forum-images']; $r = spa_paint_storage_input(spa_text('Forum Feature Images'), 'forum-images', $sfoptions['forum-images'], $path); if (!$r) { $ok = false; } do_action('sph_integration_storage_panel_location'); if (!$ok) { echo '<tr><td colspan="3"><br /><div class="sfoptionerror"><h4>'; spa_etext('For Simple:Press to function correctly it is imperative that the above location errors are resolved'); echo '</h4></div></td></tr>'; } echo '</table>'; spa_paint_close_fieldset(); spa_paint_close_panel(); do_action('sph_integration_storage_panel'); spa_paint_close_container(); ?> <div class="sfform-submit-bar"> <input type="submit" class="button-primary" id="saveit" name="saveit" value="<?php spa_etext('Update Storage Locations'); ?> " /> </div> <?php spa_paint_close_tab(); ?> </form> <?php spa_check_upgrade_error(); }