本文整理汇总了PHP中sp_esc_str函数的典型用法代码示例。如果您正苦于以下问题:PHP sp_esc_str函数的具体用法?PHP sp_esc_str怎么用?PHP sp_esc_str使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sp_esc_str函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: spa_render_profiles_container
function spa_render_profiles_container($formid)
{
switch ($formid) {
case 'options':
include_once SF_PLUGIN_DIR . '/admin/panel-profiles/forms/spa-profiles-options-form.php';
spa_profiles_options_form();
break;
case 'tabsmenus':
include_once SF_PLUGIN_DIR . '/admin/panel-profiles/forms/spa-profiles-tabs-menus-form.php';
spa_profiles_tabs_menus_form();
break;
case 'avatars':
include_once SF_PLUGIN_DIR . '/admin/panel-profiles/forms/spa-profiles-avatars-form.php';
spa_profiles_avatars_form();
break;
# leave this for plugins to add to this panel
# leave this for plugins to add to this panel
case 'plugin':
include_once SF_PLUGIN_DIR . '/admin/panel-plugins/forms/spa-plugins-user-form.php';
$admin = isset($_GET['admin']) ? sp_esc_str($_GET['admin']) : '';
$save = isset($_GET['save']) ? sp_esc_str($_GET['save']) : '';
$form = isset($_GET['form']) ? sp_esc_int($_GET['form']) : '';
$reload = isset($_GET['reload']) ? sp_esc_str($_GET['reload']) : '';
spa_plugins_user_form($admin, $save, $form, $reload);
break;
}
}
示例2: spa_render_options_container
function spa_render_options_container($formid)
{
switch ($formid) {
case 'global':
include_once SF_PLUGIN_DIR . '/admin/panel-options/forms/spa-options-global-form.php';
spa_options_global_form();
break;
case 'display':
include_once SF_PLUGIN_DIR . '/admin/panel-options/forms/spa-options-display-form.php';
spa_options_display_form();
break;
case 'content':
include_once SF_PLUGIN_DIR . '/admin/panel-options/forms/spa-options-content-form.php';
spa_options_content_form();
break;
case 'members':
include_once SF_PLUGIN_DIR . '/admin/panel-options/forms/spa-options-members-form.php';
spa_options_members_form();
break;
case 'email':
include_once SF_PLUGIN_DIR . '/admin/panel-options/forms/spa-options-email-form.php';
spa_options_email_form();
break;
# leave this for plugins to add to this panel
# leave this for plugins to add to this panel
case 'plugin':
include_once SF_PLUGIN_DIR . '/admin/panel-plugins/forms/spa-plugins-user-form.php';
$admin = isset($_GET['admin']) ? sp_esc_str($_GET['admin']) : '';
$save = isset($_GET['save']) ? sp_esc_str($_GET['save']) : '';
$form = isset($_GET['form']) ? sp_esc_int($_GET['form']) : '';
$reload = isset($_GET['reload']) ? sp_esc_str($_GET['reload']) : '';
spa_plugins_user_form($admin, $save, $form, $reload);
break;
}
}
示例3: spa_render_integration_container
function spa_render_integration_container($formid)
{
switch ($formid) {
case 'page':
include_once SF_PLUGIN_DIR . '/admin/panel-integration/forms/spa-integration-page-form.php';
spa_integration_page_form();
break;
case 'storage':
include_once SF_PLUGIN_DIR . '/admin/panel-integration/forms/spa-integration-storage-form.php';
spa_integration_storage_form();
break;
case 'language':
include_once SF_PLUGIN_DIR . '/admin/panel-integration/forms/spa-integration-language-form.php';
spa_integration_language_form();
break;
# leave this for plugins to add to this panel
# leave this for plugins to add to this panel
case 'plugin':
include_once SF_PLUGIN_DIR . '/admin/panel-plugins/forms/spa-plugins-user-form.php';
$admin = isset($_GET['admin']) ? sp_esc_str($_GET['admin']) : '';
$save = isset($_GET['save']) ? sp_esc_str($_GET['save']) : '';
$form = isset($_GET['form']) ? sp_esc_int($_GET['form']) : '';
$reload = isset($_GET['reload']) ? sp_esc_str($_GET['reload']) : '';
spa_plugins_user_form($admin, $save, $form, $reload);
break;
}
}
示例4: spa_render_themes_container
function spa_render_themes_container($formid)
{
switch ($formid) {
case 'theme-list':
include_once SF_PLUGIN_DIR . '/admin/panel-themes/forms/spa-themes-list-form.php';
spa_themes_list_form();
break;
case 'mobile':
include_once SF_PLUGIN_DIR . '/admin/panel-themes/forms/spa-themes-mobile-form.php';
spa_themes_mobile_form();
break;
case 'tablet':
include_once SF_PLUGIN_DIR . '/admin/panel-themes/forms/spa-themes-tablet-form.php';
spa_themes_tablet_form();
break;
case 'editor':
include_once SF_PLUGIN_DIR . '/admin/panel-themes/forms/spa-themes-editor-form.php';
spa_themes_editor_form();
break;
case 'theme-upload':
include_once SF_PLUGIN_DIR . '/admin/panel-themes/forms/spa-themes-upload-form.php';
spa_themes_upload_form();
break;
# leave this for plugins to add to this panel
# leave this for plugins to add to this panel
case 'plugin':
include_once SF_PLUGIN_DIR . '/admin/panel-plugins/forms/spa-plugins-user-form.php';
$admin = isset($_GET['admin']) ? sp_esc_str($_GET['admin']) : '';
$save = isset($_GET['save']) ? sp_esc_str($_GET['save']) : '';
$form = isset($_GET['form']) ? sp_esc_int($_GET['form']) : '';
$reload = isset($_GET['reload']) ? sp_esc_str($_GET['reload']) : '';
spa_plugins_user_form($admin, $save, $form, $reload);
break;
}
}
示例5: spa_render_admins_container
function spa_render_admins_container($formid)
{
switch ($formid) {
case 'youradmin':
include_once SF_PLUGIN_DIR . '/admin/panel-admins/forms/spa-admins-your-options-form.php';
spa_admins_your_options_form();
break;
case 'globaladmin':
include_once SF_PLUGIN_DIR . '/admin/panel-admins/forms/spa-admins-global-options-form.php';
spa_admins_global_options_form();
break;
case 'manageadmin':
require_once ABSPATH . 'wp-admin/includes/admin.php';
include_once SF_PLUGIN_DIR . '/admin/panel-admins/forms/spa-admins-manage-admins-form.php';
spa_admins_manage_admins_form();
break;
# leave this for plugins to add to this panel
# leave this for plugins to add to this panel
case 'plugin':
include_once SF_PLUGIN_DIR . '/admin/panel-plugins/forms/spa-plugins-user-form.php';
$admin = isset($_GET['admin']) ? sp_esc_str($_GET['admin']) : '';
$save = isset($_GET['save']) ? sp_esc_str($_GET['save']) : '';
$form = isset($_GET['form']) ? sp_esc_int($_GET['form']) : '';
$reload = isset($_GET['reload']) ? sp_esc_str($_GET['reload']) : '';
spa_plugins_user_form($admin, $save, $form, $reload);
break;
}
}
示例6: sp_profile_add_menu
function sp_profile_add_menu($menu, $name, $form, $order = 0, $display = 1, $auth = '')
{
# sanitize before use
$menu = sp_filter_title_save($menu);
$slug = sp_create_slug($name, false);
$name = sp_filter_title_save($name);
$form = str_replace('\\', '/', $form);
# sanitize for Win32 installs
$display = (int) $display;
$auth = sp_esc_str($auth);
# get profile tabs
$tabs = sp_profile_get_tabs();
if (empty($tabs)) {
return false;
}
# find the requested tab
foreach ($tabs as &$tab) {
$found = false;
if ($tab['name'] == $menu) {
# make sure the menu doesnt already exist on this tab
if (isset($tab['menus']) && $tab['menus']) {
foreach ($tab['menus'] as $thisMenu) {
if ($thisMenu['name'] == $name) {
return -1;
}
}
}
# insert the new menu
if (empty($order)) {
$order = empty($tab['menus']) ? 0 : count($tab['menus']);
}
$newtab = array();
$newtab['name'] = $name;
$newtab['slug'] = $slug;
$newtab['form'] = $form;
$newtab['display'] = $display;
$newtab['auth'] = $auth;
sp_array_insert($tab['menus'], $newtab, $order);
# make sure its compact
$tab['menus'] = array_values($tab['menus']);
# menu added so break out
$found = true;
break;
}
}
# if tab wasnt found bail
if (!$found) {
return false;
}
# save the new profile tabs
$result = sp_add_sfmeta('profile', 'tabs', $tabs);
return $result;
}
示例7: spa_render_toolbox_container
function spa_render_toolbox_container($formid)
{
switch ($formid) {
case 'toolbox':
include_once SF_PLUGIN_DIR . '/admin/panel-toolbox/forms/spa-toolbox-toolbox-form.php';
spa_toolbox_toolbox_form();
break;
case 'environment':
include_once SF_PLUGIN_DIR . '/admin/panel-toolbox/forms/spa-toolbox-environment-form.php';
spa_toolbox_environment_form();
break;
case 'housekeeping':
include_once SF_PLUGIN_DIR . '/admin/panel-toolbox/forms/spa-toolbox-housekeeping-form.php';
spa_toolbox_housekeeping_form();
break;
case 'inspector':
include_once SF_PLUGIN_DIR . '/admin/panel-toolbox/forms/spa-toolbox-inspector-form.php';
spa_toolbox_inspector_form();
break;
case 'cron':
include_once SF_PLUGIN_DIR . '/admin/panel-toolbox/forms/spa-toolbox-cron-form.php';
spa_toolbox_cron_form();
break;
case 'log':
include_once SF_PLUGIN_DIR . '/admin/panel-toolbox/forms/spa-toolbox-log-form.php';
spa_toolbox_log_form();
break;
case 'errorlog':
include_once SF_PLUGIN_DIR . '/admin/panel-toolbox/forms/spa-toolbox-errorlog-form.php';
spa_toolbox_errorlog_form();
break;
case 'changelog':
include_once SF_PLUGIN_DIR . '/admin/panel-toolbox/forms/spa-toolbox-changelog-form.php';
spa_toolbox_changelog_form();
break;
case 'uninstall':
include_once SF_PLUGIN_DIR . '/admin/panel-toolbox/forms/spa-toolbox-uninstall-form.php';
spa_toolbox_uninstall_form();
break;
# leave this for plugins to add to this panel
# leave this for plugins to add to this panel
case 'plugin':
include_once SF_PLUGIN_DIR . '/admin/panel-plugins/forms/spa-plugins-user-form.php';
$admin = isset($_GET['admin']) ? sp_esc_str($_GET['admin']) : '';
$save = isset($_GET['save']) ? sp_esc_str($_GET['save']) : '';
$form = isset($_GET['form']) ? sp_esc_int($_GET['form']) : '';
$reload = isset($_GET['reload']) ? sp_esc_str($_GET['reload']) : '';
spa_plugins_user_form($admin, $save, $form, $reload);
break;
}
}
示例8: spa_render_components_container
function spa_render_components_container($formid)
{
switch ($formid) {
case 'smileys':
include_once SF_PLUGIN_DIR . '/admin/panel-components/forms/spa-components-smileys-form.php';
spa_components_smileys_form();
break;
case 'login':
include_once SF_PLUGIN_DIR . '/admin/panel-components/forms/spa-components-login-form.php';
spa_components_login_form();
break;
case 'seo':
include_once SF_PLUGIN_DIR . '/admin/panel-components/forms/spa-components-seo-form.php';
spa_components_seo_form();
break;
case 'forumranks':
include_once SF_PLUGIN_DIR . '/admin/panel-components/forms/spa-components-forumranks-form.php';
spa_components_forumranks_form();
break;
case 'addmembers':
include_once SF_PLUGIN_DIR . '/admin/panel-components/forms/spa-components-special-ranks-add-form.php';
spa_components_sr_add_members_form($_GET['id']);
break;
case 'delmembers':
include_once SF_PLUGIN_DIR . '/admin/panel-components/forms/spa-components-special-ranks-del-form.php';
spa_components_sr_del_members_form($_GET['id']);
break;
case 'messages':
include_once SF_PLUGIN_DIR . '/admin/panel-components/forms/spa-components-messages-form.php';
spa_components_messages_form();
break;
case 'policies':
include_once SF_PLUGIN_DIR . '/admin/panel-components/forms/spa-components-policies-form.php';
spa_components_policies_form();
break;
# leave this for plugins to add to this panel
# leave this for plugins to add to this panel
case 'plugin':
include_once SF_PLUGIN_DIR . '/admin/panel-plugins/forms/spa-plugins-user-form.php';
$admin = isset($_GET['admin']) ? sp_esc_str($_GET['admin']) : '';
$save = isset($_GET['save']) ? sp_esc_str($_GET['save']) : '';
$form = isset($_GET['form']) ? sp_esc_int($_GET['form']) : '';
$reload = isset($_GET['reload']) ? sp_esc_str($_GET['reload']) : '';
spa_plugins_user_form($admin, $save, $form, $reload);
break;
}
}
示例9: spa_render_usergroups_container
function spa_render_usergroups_container($formid)
{
switch ($formid) {
case 'usergroups':
include_once SF_PLUGIN_DIR . '/admin/panel-usergroups/spa-usergroups-display-main.php';
spa_usergroups_usergroup_main();
break;
case 'createusergroup':
include_once SF_PLUGIN_DIR . '/admin/panel-usergroups/forms/spa-usergroups-create-usergroup-form.php';
spa_usergroups_create_usergroup_form();
break;
case 'editusergroup':
include_once SF_PLUGIN_DIR . '/admin/panel-usergroups/forms/spa-usergroups-edit-usergroup-form.php';
spa_usergroups_edit_usergroup_form(sp_esc_int($_GET['id']));
break;
case 'delusergroup':
include_once SF_PLUGIN_DIR . '/admin/panel-usergroups/forms/spa-usergroups-delete-usergroup-form.php';
spa_usergroups_delete_usergroup_form(sp_esc_int($_GET['id']));
break;
case 'addmembers':
include_once SF_PLUGIN_DIR . '/admin/panel-usergroups/forms/spa-usergroups-add-members-form.php';
spa_usergroups_add_members_form(sp_esc_int($_GET['id']));
break;
case 'delmembers':
include_once SF_PLUGIN_DIR . '/admin/panel-usergroups/forms/spa-usergroups-delete-members-form.php';
spa_usergroups_delete_members_form(sp_esc_int($_GET['id']));
break;
case 'mapusers':
include_once SF_PLUGIN_DIR . '/admin/panel-usergroups/forms/spa-usergroups-map-users.php';
spa_usergroups_map_users();
break;
# leave this for plugins to add to this panel
# leave this for plugins to add to this panel
case 'plugin':
include_once SF_PLUGIN_DIR . '/admin/panel-plugins/forms/spa-plugins-user-form.php';
$admin = isset($_GET['admin']) ? sp_esc_str($_GET['admin']) : '';
$save = isset($_GET['save']) ? sp_esc_str($_GET['save']) : '';
$form = isset($_GET['form']) ? sp_esc_int($_GET['form']) : '';
$reload = isset($_GET['reload']) ? sp_esc_str($_GET['reload']) : '';
spa_plugins_user_form($admin, $save, $form, $reload);
break;
}
}
示例10: spa_render_users_container
function spa_render_users_container($formid)
{
switch ($formid) {
case 'member-info':
require_once ABSPATH . 'wp-admin/includes/admin.php';
include_once SF_PLUGIN_DIR . '/admin/panel-users/forms/spa-users-members-form.php';
spa_users_members_form();
break;
# leave this for plugins to add to this panel
# leave this for plugins to add to this panel
case 'plugin':
include_once SF_PLUGIN_DIR . '/admin/panel-plugins/forms/spa-plugins-user-form.php';
$admin = isset($_GET['admin']) ? sp_esc_str($_GET['admin']) : '';
$save = isset($_GET['save']) ? sp_esc_str($_GET['save']) : '';
$form = isset($_GET['form']) ? sp_esc_int($_GET['form']) : '';
$reload = isset($_GET['reload']) ? sp_esc_str($_GET['reload']) : '';
spa_plugins_user_form($admin, $save, $form, $reload);
break;
}
}
示例11: spa_render_permissions_container
function spa_render_permissions_container($formid)
{
switch ($formid) {
case 'permissions':
include_once SF_PLUGIN_DIR . '/admin/panel-permissions/spa-permissions-display-main.php';
spa_permissions_permission_main();
break;
case 'createperm':
include_once SF_PLUGIN_DIR . '/admin/panel-permissions/forms/spa-permissions-add-permission-form.php';
spa_permissions_add_permission_form();
break;
case 'editperm':
include_once SF_PLUGIN_DIR . '/admin/panel-permissions/forms/spa-permissions-edit-permission-form.php';
spa_permissions_edit_permission_form(sp_esc_int($_GET['id']));
break;
case 'delperm':
include_once SF_PLUGIN_DIR . '/admin/panel-permissions/forms/spa-permissions-delete-permission-form.php';
spa_permissions_delete_permission_form(sp_esc_int($_GET['id']));
break;
case 'resetperms':
include_once SF_PLUGIN_DIR . '/admin/panel-permissions/forms/spa-permissions-reset-permissions-form.php';
spa_permissions_reset_perms_form();
break;
case 'newauth':
include_once SF_PLUGIN_DIR . '/admin/panel-permissions/forms/spa-permissions-add-auth-form.php';
spa_permissions_add_auth_form();
break;
# leave this for plugins to add to this panel
# leave this for plugins to add to this panel
case 'plugin':
include_once SF_PLUGIN_DIR . '/admin/panel-plugins/forms/spa-plugins-user-form.php';
$admin = isset($_GET['admin']) ? sp_esc_str($_GET['admin']) : '';
$save = isset($_GET['save']) ? sp_esc_str($_GET['save']) : '';
$form = isset($_GET['form']) ? sp_esc_int($_GET['form']) : '';
$reload = isset($_GET['reload']) ? sp_esc_str($_GET['reload']) : '';
spa_plugins_user_form($admin, $save, $form, $reload);
break;
}
}
示例12: spa_save_plugin_activation
function spa_save_plugin_activation()
{
check_admin_referer('forum-adminform_plugins', 'sfnonce');
if (!sp_current_user_can('SPF Manage Plugins')) {
spa_etext('Access denied - you do not have permission');
die;
}
if (empty($_GET['action']) && empty($_GET['action2']) || empty($_GET['plugin'])) {
return spa_text('An error occurred activating/deactivating the plugin!');
}
$action = !empty($_GET['action']) ? sp_esc_str($_GET['action']) : sp_esc_str($_GET['action2']);
$plugin = sp_esc_str($_GET['plugin']);
if ($action == 'activate') {
# activate the plugin
sp_activate_sp_plugin($plugin);
# reset all users plugin data in case new plugin adds elements to user object
sp_reset_member_plugindata();
} else {
if ($action == 'deactivate') {
# deactivate the plugin
sp_deactivate_sp_plugin($plugin);
} else {
if ($action == 'uninstall_confirmed') {
# fire uninstall action
do_action('sph_uninstall_plugin', trim($plugin));
do_action('sph_uninstall_' . trim($plugin));
do_action('sph_uninstalled_plugin', trim($plugin));
# now deactivate the plugin
sp_deactivate_sp_plugin($plugin);
} else {
if ($action == 'delete' && (!is_multisite() || is_super_admin())) {
# delete the plugin
sp_delete_sp_plugin($plugin);
}
}
}
}
do_action('sph_plugins_save', $action, $plugin);
}
示例13: spa_render_sidemenu
function spa_render_sidemenu()
{
global $sfadminpanels, $spThisUser, $spDevice;
$target = 'sfmaincontainer';
$image = SFADMINIMAGES;
$upgrade = admin_url('admin.php?page=' . SPINSTALLPATH);
if (isset($_GET['tab']) ? $formid = sp_esc_str($_GET['tab']) : ($formid = '')) {
}
if ($spDevice == 'mobile') {
echo '<div id="spaMobileAdmin">' . "\n";
echo '<select class="wp-core-ui" onchange="location = this.options[this.selectedIndex].value;">' . "\n";
foreach ($sfadminpanels as $index => $panel) {
if (sp_current_user_can($panel[1]) || $panel[0] == 'Admins' && ($spThisUser->admin || $spThisUser->moderator)) {
echo '<optgroup label="' . $panel[0] . '">' . "\n";
foreach ($panel[6] as $label => $data) {
foreach ($data as $formid => $reload) {
# ignore user plugin data for menu
if ($formid == 'admin' || $formid == 'save' || $formid == 'form') {
continue;
}
$id = '';
if ($reload != '') {
$id = ' id="' . esc_attr($reload) . '"';
} else {
$id = ' id="acc' . esc_attr($formid) . '"';
}
$sel = '';
if (isset($_GET['tab'])) {
if ($_GET['tab'] == 'plugin') {
if (isset($_GET['admin']) && isset($data['admin']) && $_GET['admin'] == $data['admin']) {
$sel = ' selected="selected" ';
}
} else {
if ($_GET['tab'] == $formid) {
$sel = ' selected="selected" ';
}
}
}
echo "<option {$id} {$sel}";
$admin = !empty($data['admin']) ? '&admin=' . $data['admin'] : '';
$save = !empty($data['save']) ? '&save=' . $data['save'] : '';
$form = !empty($data['form']) ? '&form=' . $data['form'] : '';
if (empty($admin)) {
$base = SFHOMEURL . 'wp-admin/admin.php?page=simple-press/admin';
} else {
$base = SFHOMEURL . 'wp-admin/admin.php?page=simple-press/admin/panel-plugins/spa-plugins.php';
$panel[2] = '';
}
$http = $base . $panel[2] . '&tab=' . $formid . $admin . $save . $form;
echo 'value="' . $http . '">' . $label . '</option>' . "\n";
}
}
echo '</optgroup>' . "\n";
}
}
echo '</select>' . "\n";
echo '<a class="button button-secondary" href="' . sp_url() . '">' . spa_text('Go To Forum') . '</a>';
echo '</div>' . "\n";
} else {
echo '<div id="sfsidepanel">' . "\n";
echo '<div id="sfadminmenu">' . "\n";
foreach ($sfadminpanels as $index => $panel) {
if (sp_current_user_can($panel[1]) || $panel[0] == 'Admins' && ($spThisUser->admin || $spThisUser->moderator)) {
$pName = str_replace(' ', '', $panel[0]);
echo '<div class="sfsidebutton" id="sfacc' . $pName . '">' . "\n";
echo '<div class="" title="' . esc_attr($panel[3]) . '"><span class="spa' . $panel[4] . '"></span><a href="#">' . $panel[0] . '</a></div>' . "\n";
echo '</div>' . "\n";
echo '<div class="sfmenublock">' . "\n";
foreach ($panel[6] as $label => $data) {
foreach ($data as $formid => $reload) {
# ignore user plugin data for menu
if ($formid == 'admin' || $formid == 'save' || $formid == 'form') {
continue;
}
echo '<div class="sfsideitem">' . "\n";
$id = '';
if ($reload != '') {
$id = ' id="' . esc_attr($reload) . '"';
} else {
$id = ' id="acc' . esc_attr($formid) . '"';
}
$base = esc_js($panel[5]);
$admin = !empty($data['admin']) ? $data['admin'] : '';
$save = !empty($data['save']) ? $data['save'] : '';
$form = !empty($data['form']) ? $data['form'] : '';
?>
<a<?php
echo $id;
?>
href="#" onclick="spjLoadForm('<?php
echo $formid;
?>
', '<?php
echo $base;
?>
', '<?php
echo $target;
?>
', '<?php
echo $image;
//.........这里部分代码省略.........
示例14: sp_esc_str
echo '</fieldset>';
}
if ($action == 'delsmiley') {
$file = sp_esc_str($_GET['file']);
$path = SF_STORE_DIR . '/' . $spPaths['smileys'] . '/' . $file;
@unlink($path);
# load smiles from sfmeta
$meta = sp_get_sfmeta('smileys', 'smileys');
# now cycle through to remove this entry and resave
if (!empty($meta[0]['meta_value'])) {
$newsmileys = array();
foreach ($meta[0]['meta_value'] as $name => $info) {
if ($info[0] != $file) {
$newsmileys[$name][0] = sp_filter_title_save($info[0]);
$newsmileys[$name][1] = sp_filter_name_save($info[1]);
$newsmileys[$name][2] = sp_filter_name_save($info[2]);
$newsmileys[$name][3] = $info[3];
$newsmileys[$name][4] = $info[4];
}
}
sp_update_sfmeta('smileys', 'smileys', $newsmileys, $meta[0]['meta_id'], true);
}
echo '1';
}
if ($action == 'delbadge') {
$file = sp_esc_str($_GET['file']);
$path = SF_STORE_DIR . '/' . $spPaths['ranks'] . '/' . $file;
@unlink($path);
echo '1';
}
die;
示例15: sp_notify
# check for tab press
if (isset($_GET['tab'])) {
# profile edit, so only admin or logged in user can view
if (empty($userid) || $spThisUser->ID != $userid && !$spThisUser->admin) {
sp_notify(SPFAILURE, sp_text('Invalid profile request'));
$out .= sp_render_queued_notification();
$out .= '<div class="sfmessagestrip">';
$out .= apply_filters('sph_ProfileErrorMsg', sp_text('Sorry, an invalid profile request was detected. Do you need to log in?'));
$out .= '</div>';
return $out;
}
# set up profile for requested user
sp_SetupUserProfileData($userid);
# get pressed tab and menu (if pressed)
$thisTab = sp_esc_str($_GET['tab']);
$thisMenu = isset($_GET['menu']) ? sp_esc_str($_GET['menu']) : '';
# get all the tabs meta info
$tabs = sp_profile_get_tabs();
if (!empty($tabs)) {
foreach ($tabs as $tab) {
# find the pressed tab in the list of tabs
if ($tab['slug'] == $thisTab) {
# now output the menu and content
$first = true;
$thisForm = '';
$thisName = '';
$thisSlug = '';
$out = '';
if (!empty($tab['menus'])) {
foreach ($tab['menus'] as $menu) {
# do we need an auth check?