• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP osc_redirect_to函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中osc_redirect_to函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_redirect_to函数的具体用法?PHP osc_redirect_to怎么用?PHP osc_redirect_to使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了osc_redirect_to函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: mdh_emailmagick_bump_me

/**
 * Makes this plugin the first to be loaded.
 * - Bumps this plugin at the top of the active_plugins stack.
 */
function mdh_emailmagick_bump_me()
{
    if (OC_ADMIN) {
        // @legacy : ALWAYS remove this if active.
        if (osc_plugin_is_enabled("madhouse_utils/index.php")) {
            Plugins::deactivate("madhouse_utils/index.php");
        }
        // Sanitize & get the {PLUGIN_NAME}/index.php.
        $path = str_replace(osc_plugins_path(), '', osc_plugin_path(__FILE__));
        if (osc_plugin_is_installed($path)) {
            // Get the active plugins.
            $plugins_list = unserialize(osc_active_plugins());
            if (!is_array($plugins_list)) {
                return false;
            }
            // Remove $path from the active plugins list
            foreach ($plugins_list as $k => $v) {
                if ($v == $path) {
                    unset($plugins_list[$k]);
                }
            }
            // Re-add the $path at the beginning of the active plugins.
            array_unshift($plugins_list, $path);
            // Serialize the new active_plugins list.
            osc_set_preference('active_plugins', serialize($plugins_list));
            if (Params::getParam("page") === "plugins" && Params::getParam("action") === "enable" && Params::getParam("plugin") === $path) {
                //osc_redirect_to(osc_admin_base_url(true) . "?page=plugins");
            } else {
                osc_redirect_to(osc_admin_base_url(true) . "?" . http_build_query(Params::getParamsAsArray("get")));
            }
        }
    }
}
开发者ID:bomvendador,项目名称:soroka_r,代码行数:37,代码来源:index.php


示例2: nm_copypaste_plugin_actions

function nm_copypaste_plugin_actions()
{
    $dao_preference = new Preference();
    $option = Params::getParam('nomoreoption');
    if (Params::getParam('file') != 'nm_copypaste_plugin/admin/settings.php') {
        return '';
    }
    if ($option == 'nomoresettings') {
        osc_set_preference('nm_id', Params::getParam("nm_id") ? Params::getParam("nm_id") : '0', 'nm_copypaste_plugin', 'STRING');
        osc_add_flash_ok_message(__('Nomore copy/paste settings has been updated', 'nm_copypaste_plugin'), 'admin');
        osc_redirect_to(osc_admin_render_plugin_url('nm_copypaste_plugin/admin/settings.php'));
    }
}
开发者ID:krahamath,项目名称:nm_copypaste_plugin,代码行数:13,代码来源:index.php


示例3: google_analytics_actions

function google_analytics_actions()
{
    $dao_preference = new Preference();
    $option = Params::getParam('option');
    if (Params::getParam('file') != 'google_analytics/admin.php') {
        return '';
    }
    if ($option == 'stepone') {
        $webid = Params::getParam('webid');
        Preference::newInstance()->update(array("s_value" => $webid), array("s_section" => "plugin-google_analytics", "s_name" => "google_analytics_id"));
        osc_add_flash_ok_message(__('The tracking ID has been updated', 'google_analytics'), 'admin');
        osc_redirect_to(osc_admin_render_plugin_url('google_analytics/admin.php'));
    }
}
开发者ID:mylastof,项目名称:os-class,代码行数:14,代码来源:index.php


示例4: seo_init_admin

function seo_init_admin()
{
    //scripts
    osc_enqueue_style('seoCSS', osc_plugin_url(SEO_PLUGIN_FOLDER . '/css/style.css') . 'style.css');
    //admin menu pages
    osc_add_admin_menu_page(__('SEO Wiz', SEO_PLUGIN_FOLDER), osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'configure.php'), 'seo_dashboard');
    osc_add_admin_submenu_page('seo_dashboard', __('Configure Plugin', SEO_PLUGIN_FOLDER), osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'configure.php'), 'configure');
    osc_add_admin_submenu_page('seo_dashboard', __('Titles & Metas', SEO_PLUGIN_FOLDER), osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'titles_metas.php'), 'titles_metas');
    //form actions
    switch (Params::getParam('seo_action')) {
        //configure page
        case 'seo_configure':
            $page_title_separator = Params::getParam('page_title_separator', false, false, false);
            osc_set_preference('page_title_separator', $page_title_separator, 'seo_plugin');
            osc_add_flash_ok_message(__('Saved correctly', SEO_PLUGIN_FOLDER), 'admin');
            osc_redirect_to(osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'configure.php'));
            break;
            //titles_metas_home
        //titles_metas_home
        case 'titles_metas_home':
            $seo_titles = Params::getParam('seo_titles');
            if (!empty($seo_titles)) {
                foreach ($seo_titles as $key => $value) {
                    osc_set_preference($key, trim($value), 'seo_plugin');
                }
            }
            osc_add_flash_ok_message(__('Saved correctly', SEO_PLUGIN_FOLDER), 'admin');
            osc_redirect_to(osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'titles_metas.php#home'));
            break;
            //titles_metas_pages
        //titles_metas_pages
        case 'titles_metas_pages':
            $seo_titles = Params::getParam('seo_titles');
            if (!empty($seo_titles)) {
                foreach ($seo_titles as $key => $value) {
                    osc_set_preference($key, trim($value), 'seo_plugin');
                }
            }
            osc_add_flash_ok_message(__('Saved correctly', SEO_PLUGIN_FOLDER), 'admin');
            osc_redirect_to(osc_admin_render_plugin_url(osc_plugin_folder(__FILE__) . 'titles_metas.php#pages'));
            break;
    }
}
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:43,代码来源:index.php


示例5: theme_modern_actions_admin

function theme_modern_actions_admin()
{
    if (Params::getParam('file') == 'oc-content/themes/modern/admin/settings.php') {
        if (Params::getParam('donation') == 'successful') {
            osc_set_preference('donation', '1', 'modern_theme');
            osc_reset_preferences();
        }
    }
    switch (Params::getParam('action_specific')) {
        case 'settings':
            $footerLink = Params::getParam('footer_link');
            $defaultLogo = Params::getParam('default_logo');
            osc_set_preference('keyword_placeholder', Params::getParam('keyword_placeholder'), 'modern_theme');
            osc_set_preference('footer_link', $footerLink ? '1' : '0', 'modern_theme');
            osc_set_preference('default_logo', $defaultLogo ? '1' : '0', 'modern_theme');
            osc_add_flash_ok_message(__('Theme settings updated correctly', 'modern'), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/modern/admin/settings.php'));
            break;
        case 'upload_logo':
            $package = Params::getFiles('logo');
            if ($package['error'] == UPLOAD_ERR_OK) {
                if (move_uploaded_file($package['tmp_name'], WebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg")) {
                    osc_add_flash_ok_message(__('The logo image has been uploaded correctly', 'modern'), 'admin');
                } else {
                    osc_add_flash_error_message(__("An error has occurred, please try again", 'modern'), 'admin');
                }
            } else {
                osc_add_flash_error_message(__("An error has occurred, please try again", 'modern'), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/modern/admin/header.php'));
            break;
        case 'remove':
            if (file_exists(WebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg")) {
                @unlink(WebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg");
                osc_add_flash_ok_message(__('The logo image has been removed', 'modern'), 'admin');
            } else {
                osc_add_flash_error_message(__("Image not found", 'modern'), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/modern/admin/header.php'));
            break;
    }
}
开发者ID:jmcclenon,项目名称:Osclass,代码行数:42,代码来源:functions.php


示例6: fb_page_plugin_actions

function fb_page_plugin_actions()
{
    $dao_preference = new Preference();
    $option = Params::getParam('fbpageoption');
    if (Params::getParam('file') != 'fb_page_plugin/admin.php') {
        return '';
    }
    if ($option == 'fbpagesettings') {
        osc_set_preference('fb_page_url', Params::getParam("fb_page_url") ? Params::getParam("fb_page_url") : '0', 'fb_page_plugin', 'STRING');
        osc_set_preference('fb_page_width', Params::getParam("fb_page_width") ? Params::getParam("fb_page_width") : '0', 'fb_page_plugin', 'STRING');
        osc_set_preference('fb_page_height', Params::getParam("fb_page_height") ? Params::getParam("fb_page_height") : '0', 'fb_page_plugin', 'STRING');
        osc_set_preference('fb_show_faces', Params::getParam("fb_show_faces") ? Params::getParam("fb_show_faces") : '0', 'fb_page_plugin', 'STRING');
        osc_set_preference('show_page_posts', Params::getParam("show_page_posts") ? Params::getParam("show_page_posts") : '0', 'fb_page_plugin', 'STRING');
        osc_set_preference('hide_page_cover', Params::getParam("hide_page_cover") ? Params::getParam("hide_page_cover") : '0', 'fb_page_plugin', 'STRING');
        osc_set_preference('use_small_header', Params::getParam("use_small_header") ? Params::getParam("use_small_header") : '0', 'fb_page_plugin', 'STRING');
        osc_set_preference('adapt_container_width', Params::getParam("adapt_container_width") ? Params::getParam("adapt_container_width") : '0', 'fb_page_plugin', 'STRING');
        osc_add_flash_ok_message(__('Facebook page plugin has been updated', 'fb_page_plugin'), 'admin');
        osc_redirect_to(osc_admin_render_plugin_url('fb_page_plugin/admin.php'));
    }
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:20,代码来源:index.php


示例7: theme_osclasswizards_actions_admin

function theme_osclasswizards_actions_admin()
{
    if (Params::getParam('file') == 'oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php') {
        if (Params::getParam('donation') == 'successful') {
            osc_set_preference('donation', '1', 'osclasswizards_theme');
            osc_reset_preferences();
        }
    }
    switch (Params::getParam('action_specific')) {
        case 'settings':
            osc_set_preference('welcome_message', Params::getParam('welcome_message'), 'osclasswizards_theme');
            osc_set_preference('defaultShowAs@all', Params::getParam('defaultShowAs@all'), 'osclasswizards_theme');
            osc_set_preference('defaultShowAs@search', Params::getParam('defaultShowAs@all'));
            osc_add_flash_ok_message(__('Theme settings updated correctly', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php'));
            break;
        case 'templates_home':
            osc_set_preference('show_banner', Params::getParam('show_banner') ? '1' : '0', 'osclasswizards_theme');
            osc_set_preference('keyword_placeholder', Params::getParam('keyword_placeholder'), 'osclasswizards_theme');
            osc_set_preference('show_search_country', Params::getParam('show_search_country') ? '1' : '0', 'osclasswizards_theme');
            osc_set_preference('premium_listings_shown_home', Params::getParam('premium_listings_shown_home'), 'osclasswizards_theme');
            osc_set_preference('sub_cat_limit', Params::getParam('sub_cat_limit'), 'osclasswizards_theme');
            osc_set_preference('show_popular', Params::getParam('show_popular'), 'osclasswizards_theme');
            osc_set_preference('show_popular_regions', Params::getParam('show_popular_regions'), 'osclasswizards_theme');
            osc_set_preference('show_popular_cities', Params::getParam('show_popular_cities'), 'osclasswizards_theme');
            osc_set_preference('show_popular_searches', Params::getParam('show_popular_searches'), 'osclasswizards_theme');
            osc_set_preference('popular_regions_limit', Params::getParam('popular_regions_limit'), 'osclasswizards_theme');
            osc_set_preference('popular_cities_limit', Params::getParam('popular_cities_limit'), 'osclasswizards_theme');
            osc_set_preference('popular_searches_limit', Params::getParam('popular_searches_limit'), 'osclasswizards_theme');
            osc_add_flash_ok_message(__('Templates settings updated correctly', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#templates'));
            break;
        case 'templates_search':
            osc_set_preference('premium_listings_shown', Params::getParam('premium_listings_shown'), 'osclasswizards_theme');
            osc_add_flash_ok_message(__('Templates settings updated correctly', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#templates'));
            break;
        case 'templates_item_post':
            $locations_input_as = Params::getParam('locations_input_as', 'osclasswizards_theme');
            $locations_required = Params::getParam('locations_required', 'osclasswizards_theme');
            $category_multiple_selects = Params::getParam('category_multiple_selects', 'osclasswizards_theme');
            osc_set_preference('title_minimum_length', Params::getParam('title_minimum_length', 'osclasswizards_theme'), 'osclasswizards_theme');
            osc_set_preference('description_minimum_length', Params::getParam('description_minimum_length', 'osclasswizards_theme'), 'osclasswizards_theme');
            osc_set_preference('locations_input_as', $locations_input_as, 'osclasswizards_theme');
            osc_set_preference('locations_required', $locations_required ? '1' : '0', 'osclasswizards_theme');
            osc_set_preference('category_multiple_selects', $category_multiple_selects ? '1' : '0', 'osclasswizards_theme');
            osc_add_flash_ok_message(__('Templates settings updated correctly', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#templates'));
            break;
        case 'ads_mgmt':
            osc_set_preference('header-728x90', trim(Params::getParam('header-728x90', false, false, false)), 'osclasswizards_theme');
            osc_set_preference('homepage-728x90', trim(Params::getParam('homepage-728x90', false, false, false)), 'osclasswizards_theme');
            osc_set_preference('sidebar-300x250', trim(Params::getParam('sidebar-300x250', false, false, false)), 'osclasswizards_theme');
            osc_set_preference('search-results-top-728x90', trim(Params::getParam('search-results-top-728x90', false, false, false)), 'osclasswizards_theme');
            osc_set_preference('search-results-middle-728x90', trim(Params::getParam('search-results-middle-728x90', false, false, false)), 'osclasswizards_theme');
            osc_add_flash_ok_message(__('Ads management updated correctly', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#ads'));
            break;
        case 'categories_icons':
            $catsIcons = Params::getParam('cat-icons');
            foreach ($catsIcons as $catId => $iconName) {
                osc_set_preference('cat-icons-' . $catId, $iconName, 'osclasswizards_theme_cat_icons');
            }
            osc_add_flash_ok_message(__('Category icons settings updated correctly', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#category-icons'));
            break;
        case 'theme_style':
            $color_mode = Params::getParam('theme_color_mode');
            osc_set_preference('theme_color_mode', $color_mode, 'osclasswizards_theme');
            osc_set_preference('google_fonts', Params::getParam('google_fonts'), 'osclasswizards_theme');
            $rtl_view = Params::getParam('rtl_view', 'osclasswizards_theme');
            osc_set_preference('rtl_view', $rtl_view ? '1' : '0', 'osclasswizards_theme');
            osc_set_preference('custom_css', trim(Params::getParam('custom_css', false, false, false)), 'osclasswizards_theme');
            osc_add_flash_ok_message(__('Theme color settings updated correctly', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#theme-style'));
            break;
        case 'facebook':
            osc_set_preference('facebook-url', trim(Params::getParam('facebook-url', false, false, false)), 'osclasswizards_theme');
            osc_set_preference('facebook-width', trim(Params::getParam('facebook-width', false, false, false)), 'osclasswizards_theme');
            osc_set_preference('facebook-height', trim(Params::getParam('facebook-height', false, false, false)), 'osclasswizards_theme');
            osc_set_preference('facebook-hidecover', trim(Params::getParam('facebook-hidecover', false, false, false)), 'osclasswizards_theme');
            osc_set_preference('facebook-showface', trim(Params::getParam('facebook-showface', false, false, false)), 'osclasswizards_theme');
            osc_set_preference('facebook-showpost', trim(Params::getParam('facebook-showpost', false, false, false)), 'osclasswizards_theme');
            osc_set_preference('facebook-showitem', trim(Params::getParam('facebook-showitem', false, false, false)), 'osclasswizards_theme');
            osc_set_preference('facebook-showsearch', trim(Params::getParam('facebook-showsearch', false, false, false)), 'osclasswizards_theme');
            osc_add_flash_ok_message(__('Facebook Page settings updated correctly', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#facebook'));
            break;
        case 'upload_favicon':
            $package = Params::getFiles('favicon');
            if ($package['error'] == UPLOAD_ERR_OK) {
                $img = ImageResizer::fromFile($package['tmp_name']);
                $ext = $img->getExt();
                $logo_name = 'favicon';
                $logo_name .= '.' . $ext;
                $path = osc_uploads_path() . $logo_name;
                $img->saveToFile($path);
                osc_set_preference('favicon', $logo_name, 'osclasswizards_theme');
                osc_add_flash_ok_message(__('The favicon image has been uploaded correctly', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            } else {
//.........这里部分代码省略.........
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:101,代码来源:functions.php


示例8: osc_add_flash_ok_message

        // PAID
        ModelPaymentPro::newInstance()->enableItem($id);
        ModelPaymentPro::newInstance()->payPublishFee($id, 'ADMIN');
        osc_add_flash_ok_message(__('Listing paid', 'payment_pro'), 'admin');
        break;
    case 2:
        // BLOCK
        if (ModelPaymentPro::newInstance()->publishFeeIsPaid($id)) {
            $mItems = new ItemActions(false);
            $mItems->disable($id);
        } else {
            ModelPaymentPro::newInstance()->disableItem($id);
        }
        osc_add_flash_ok_message(__('Listing disabled', 'payment_pro'), 'admin');
        break;
    case 3:
        // UNBLOCK
        if (ModelPaymentPro::newInstance()->publishFeeIsPaid($id)) {
            //$mItems = new ItemActions(false);
            //$mItems->enable($id);
        } else {
            ModelPaymentPro::newInstance()->enableItem($id);
        }
        osc_add_flash_ok_message(__('Listing enabled', 'payment_pro'), 'admin');
        break;
    default:
        break;
}
ob_get_clean();
osc_redirect_to(osc_admin_base_url(true) . '?page=items');
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:30,代码来源:pay.php


示例9: dirname

<?php

/**
 * delete selected files
 * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
 * @link www.phpletter.com
 * @since 22/April/2007
 *
 */
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php";
if (!osc_is_admin_user_logged_in()) {
    exit('Direct access is not allowed.');
}
if (!empty($_GET['path']) && file_exists($_GET['path']) && is_file($_GET['path']) && isUnderRoot($_GET['path'])) {
    $path = $_GET['path'];
    //check if the file size
    $fileSize = @filesize($path);
    if ($fileSize > getMemoryLimit()) {
        //larger then the php memory limit, redirect to the file
        osc_redirect_to($path);
    } else {
        //open it up and send out with php
        downloadFile($path);
    }
} else {
    die(ERR_DOWNLOAD_FILE_NOT_FOUND);
}
开发者ID:oanav,项目名称:closetshare,代码行数:27,代码来源:ajax_download.php


示例10: breadcrumbs_help

function breadcrumbs_help()
{
    if (osc_version() < 320) {
        osc_admin_render_plugin(osc_plugin_path(dirname(__FILE__)) . '/help.php');
    } else {
        osc_redirect_to(osc_route_admin_url('breadcrumbs-admin-help'));
    }
}
开发者ID:oanav,项目名称:closetshare,代码行数:8,代码来源:index.php


示例11: secureFileName

//include different config base file according to query string "config"
$configBaseFileName = 'config.base.php';
if (CONFIG_QUERY_STRING_ENABLE && !empty($_GET['config']) && file_exists(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'config.' . secureFileName($_GET['config']) . ".php") {
    $configBaseFileName = 'config.' . secureFileName($_GET['config']) . ".php";
}
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . $configBaseFileName;
require_once DIR_AJAX_LANGS . CONFIG_LANG_DEFAULT . ".php";
require_once DIR_AJAX_INC . "function.base.php";
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.session.php";
$session = new MySession();
$auth = new Auth();
if (CONFIG_ACCESS_CONTROL_MODE == 1) {
    //access control enabled
    if (!$auth->isLoggedIn() && strtolower(basename($_SERVER['PHP_SELF']) != strtolower(basename(CONFIG_LOGIN_PAGE)))) {
        //
        osc_redirect_to(appendQueryString(CONFIG_LOGIN_PAGE, makeQueryString()));
    }
}
addNoCacheHeaders();
//URL Declartions
define('CONFIG_URL_IMAGE_PREVIEW', 'ajax_image_preview.php');
define('CONFIG_URL_CREATE_FOLDER', 'ajax_create_folder.php');
define('CONFIG_URL_DELETE', 'ajax_delete_file.php');
define('CONFIG_URL_HOME', 'ajaxfilemanager.php');
define("CONFIG_URL_UPLOAD", 'ajax_file_upload.php');
define('CONFIG_URL_PREVIEW', 'ajax_preview.php');
define('CONFIG_URL_SAVE_NAME', 'ajax_save_name.php');
define('CONFIG_URL_IMAGE_EDITOR', 'ajax_image_editor.php');
define('CONFIG_URL_IMAGE_SAVE', 'ajax_image_save.php');
define('CONFIG_URL_IMAGE_RESET', 'ajax_editor_reset.php');
define('CONFIG_URL_IMAGE_UNDO', 'ajax_image_undo.php');
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:config.php


示例12: theme_pop_actions_admin

function theme_pop_actions_admin()
{
    //if(OC_ADMIN)
    if (Params::getParam('file') == 'oc-content/themes/pop/admin/settings.php') {
        if (Params::getParam('donation') == 'successful') {
            osc_set_preference('donation', '1', 'pop_theme');
            osc_reset_preferences();
        }
    }
    switch (Params::getParam('subaction')) {
        case 'color-update':
            /* theme color staff here */
            $aParams = Params::getParamsAsArray();
            unset($aParams['page']);
            unset($aParams['action']);
            unset($aParams['file']);
            unset($aParams['CSRFName']);
            unset($aParams['CSRFToken']);
            osc_set_preference('pop-theme-colors', json_encode($aParams), 'pop_theme');
            osc_add_flash_ok_message(__('Theme settings updated correctly', 'pop'), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/pop/admin/color_settings.php'));
            break;
        case 'color-restore':
            $aParams = pop_getColorScheme(true);
            osc_set_preference('pop-theme-colors', json_encode($aParams), 'pop_theme');
            osc_add_flash_ok_message(__('Theme settings updated correctly', 'pop'), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/pop/admin/color_settings.php'));
            break;
        default:
            break;
    }
    switch (Params::getParam('action_specific')) {
        case 'settings':
            $footerLink = Params::getParam('footer_link');
            osc_set_preference('pop_max_premium', Params::getParam('pop_max_premium'), 'pop_theme');
            osc_set_preference('keyword_placeholder', Params::getParam('keyword_placeholder'), 'pop_theme');
            osc_set_preference('footer_link', $footerLink ? '1' : '0', 'pop_theme');
            osc_set_preference('header-728x90', trim(Params::getParam('header-728x90', false, false, false)), 'pop_theme');
            osc_set_preference('search-results-300x250', trim(Params::getParam('search-results-300x250', false, false, false)), 'pop_theme');
            osc_set_preference('item-detail-300x250', trim(Params::getParam('item-detail-300x250', false, false, false)), 'pop_theme');
            osc_add_flash_ok_message(__('Theme settings updated correctly', 'pop'), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/pop/admin/settings.php'));
            break;
        case 'upload_logo':
            $package = Params::getFiles('logo');
            if ($package['error'] == UPLOAD_ERR_OK) {
                $img = ImageResizer::fromFile($package['tmp_name']);
                $ext = $img->getExt();
                $logo_name = 'pop_logo';
                $logo_name .= '.' . $ext;
                $path = osc_uploads_path() . $logo_name;
                move_uploaded_file($package['tmp_name'], $path);
                osc_set_preference('logo', $logo_name, 'pop_theme');
                osc_add_flash_ok_message(__('The logo image has been uploaded correctly', 'pop'), 'admin');
            } else {
                osc_add_flash_error_message(__("An error has occurred, please try again", 'pop'), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/pop/admin/header.php'));
            break;
        case 'remove':
            $logo = osc_get_preference('logo', 'pop_theme');
            $path = osc_uploads_path() . $logo;
            if (file_exists($path)) {
                @unlink($path);
                osc_delete_preference('logo', 'pop_theme');
                osc_reset_preferences();
                osc_add_flash_ok_message(__('The logo image has been removed', 'pop'), 'admin');
            } else {
                osc_add_flash_error_message(__("Image not found", 'pop'), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/pop/admin/header.php'));
            break;
    }
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:74,代码来源:functions.php


示例13: userlogin

function userlogin()
{
    osc_redirect_to(osc_user_dashboard_url());
}
开发者ID:jhalendra,项目名称:classmandu,代码行数:4,代码来源:functions.php


示例14: osc_csrf_check

    /**
     * Check is CSRF token is valid, die in other case
     *
     * @since 3.1
     */

    function osc_csrf_check() {
        $error      = false;
        $str_error  = '';
        if(Params::getParam('CSRFName')=='' || Params::getParam('CSRFToken')=='') {
            $str_error = _m('Probable invalid request.') ;
            $error = true;
        } else {
            $name   = Params::getParam('CSRFName');
            $token  = Params::getParam('CSRFToken');
            if (!osc_csrfguard_validate_token($name, $token)) {
                $str_error = _m('Invalid CSRF token.');
                $error = true;
            }
        }

        if( defined('IS_AJAX') ) {
            if($error && IS_AJAX === true ) {
                echo json_encode(array(
                    'error' => 1,
                    'msg'   => $str_error
                ));
                exit;
            }
        }

        // ¿ check if is ajax request ?
        if($error) {
            if(OC_ADMIN) {
                osc_add_flash_error_message($str_error, 'admin');
            } else {
                osc_add_flash_error_message($str_error);
            }

            $url = osc_get_http_referer();
            // be sure that drop session referer
            Session::newInstance()->_dropReferer();
            if($url!='') {
                osc_redirect_to($url);
            }

            if(OC_ADMIN) {
                osc_redirect_to( osc_admin_base_url(true) );
            } else {
                osc_redirect_to( osc_base_url(true) );
            }
        }
    }
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:53,代码来源:hSecurity.php


示例15: foreach

 *             GNU Affero General Public License for more details.
 *
 *      You should have received a copy of the GNU Affero General Public
 * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
$mp = ModelPayment::newInstance();
if (Params::getParam('plugin_action') == 'done') {
    $pub_prices = Params::getParam("pub_prices");
    $pr_prices = Params::getParam("pr_prices");
    foreach ($pr_prices as $k => $v) {
        $mp->insertPrice($k, $pub_prices[$k] == '' ? NULL : $pub_prices[$k], $v == '' ? NULL : $v);
    }
    // HACK : This will make possible use of the flash messages ;)
    ob_get_clean();
    osc_add_flash_ok_message(__('Congratulations, the plugin is now configured', 'payment'), 'admin');
    osc_redirect_to(osc_route_admin_url('payment-admin-prices'));
}
$categories = Category::newInstance()->toTreeAll();
$prices = ModelPayment::newInstance()->getCategoriesPrices();
$cat_prices = array();
foreach ($prices as $p) {
    $cat_prices[$p['fk_i_category_id']]['f_publish_cost'] = $p['f_publish_cost'];
    $cat_prices[$p['fk_i_category_id']]['f_premium_cost'] = $p['f_premium_cost'];
}
function drawCategories($categories, $depth = 0, $cat_prices)
{
    foreach ($categories as $c) {
        ?>
            <tr>
                <td>
                    <?php 
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:31,代码来源:conf_prices.php


示例16: osc_set_preference

<?php

if (Params::getParam('plugin_action') == 'done') {
    osc_set_preference('analytics_msg', trim(Params::getParam("analytics_msg", false, false)), 'cookie', 'STRING');
    osc_set_preference('non_analytics_msg', trim(Params::getParam("non_analytics_msg", false, false)), 'cookie', 'STRING');
    osc_set_preference('analytics_id', trim(Params::getParam("analytics_id")), 'cookie', 'STRING');
    osc_set_preference('policy_link', trim(Params::getParam("policy_link")), 'cookie', 'STRING');
    osc_set_preference('what_are_link', trim(Params::getParam("what_are_link")), 'cookie', 'STRING');
    osc_set_preference('domain', Params::getParam("domain"), 'cookie', 'STRING');
    osc_set_preference('accept', Params::getParam("accept") == 1 ? 1 : 0, 'cookie', 'BOOLEAN');
    osc_set_preference('decline', Params::getParam("decline") == 1 ? 1 : 0, 'cookie', 'BOOLEAN');
    osc_set_preference('reset', Params::getParam("reset") == 1 ? 1 : 0, 'cookie', 'BOOLEAN');
    // HACK : This will make possible use of the flash messages ;)
    ob_get_clean();
    osc_add_flash_ok_message(__('Congratulations, the plugin is now configured', 'cookie'), 'admin');
    osc_redirect_to(osc_route_admin_url('cookie-conf'));
}
?>
<script type="text/javascript" >
    $(document).ready(function () {
        $.cookie("cc_cookie_accept", null, { path: '/' });
        $.cookie("cc_cookie_decline", null, { path: '/' });

        var options = new Object();

        function get_options() {
            options.cookieAcceptButton = $("#accept").prop("checked");
            options.cookieDeclineButton = $("#decline").prop("checked");
            options.cookieResetButton = $("#reset").prop("checked");
            options.cookiePolicyLink = $("#policy_link").prop("value");
            options.cookieWhatAreTheyLink = $("#what_are_link").prop("value");
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:conf.php


示例17: dirname

<?php

/**
 * access control login form
 * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
 * @link www.phpletter.com
 * @since 22/April/2007
 *
 */
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php";
if (!osc_is_admin_user_logged_in()) {
    exit('Direct access is not allowed.');
}
if (isset($_POST['username'])) {
    if ($auth->login()) {
        osc_redirect_to(appendQueryString(CONFIG_URL_HOME, makeQueryString()));
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="theme/<?php 
echo CONFIG_THEME_NAME;
?>
/css/login.css" rel="stylesheet" />
<title><?php 
echo LOGIN_PAGE_TITLE;
?>
</title>
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:ajax_login.php


示例18: theme_bender_actions_admin

function theme_bender_actions_admin()
{
    //if(OC_ADMIN)
    if (Params::getParam('file') == 'oc-content/themes/bender/admin/settings.php') {
        if (Params::getParam('donation') == 'successful') {
            osc_set_preference('donation', '1', 'bender');
            osc_reset_preferences();
        }
    }
    switch (Params::getParam('action_specific')) {
        case 'settings':
            $footerLink = Params::getParam('footer_link');
            osc_set_preference('keyword_placeholder', Params::getParam('keyword_placeholder'), 'bender');
            osc_set_preference('footer_link', $footerLink ? '1' : '0', 'bender');
            osc_set_preference('defaultShowAs@all', Params::getParam('defaultShowAs@all'), 'bender');
            osc_set_preference('defaultShowAs@search', Params::getParam('defaultShowAs@all'));
            osc_set_preference('defaultLocationShowAs', Params::getParam('defaultLocationShowAs'), 'bender');
            osc_set_preference('header-728x90', trim(Params::getParam('header-728x90', false, false, false)), 'bender');
            osc_set_preference('homepage-728x90', trim(Params::getParam('homepage-728x90', false, false, false)), 'bender');
            osc_set_preference('sidebar-300x250', trim(Params::getParam('sidebar-300x250', false, false, false)), 'bender');
            osc_set_preference('search-results-top-728x90', trim(Params::getParam('search-results-top-728x90', false, false, false)), 'bender');
            osc_set_preference('search-results-middle-728x90', trim(Params::getParam('search-results-middle-728x90', false, false, false)), 'bender');
            osc_add_flash_ok_message(__('Theme settings updated correctly', 'bender'), 'admin');
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/bender/admin/settings.php'));
            break;
        case 'upload_logo':
            $package = Params::getFiles('logo');
            if ($package['error'] == UPLOAD_ERR_OK) {
                $img = ImageResizer::fromFile($package['tmp_name']);
                $ext = $img->getExt();
                $logo_name = 'bender_logo';
                $logo_name .= '.' . $ext;
                $path = osc_uploads_path() . $logo_name;
                $img->saveToFile($path);
                osc_set_preference('logo', $logo_name, 'bender');
                osc_add_flash_ok_message(__('The logo image has been uploaded correctly', 'bender'), 'admin');
            } else {
                osc_add_flash_error_message(__("An error has occurred, please try again", 'bender'), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/bender/admin/header.php'));
            break;
        case 'remove':
            $logo = osc_get_preference('logo', 'bender');
            $path = osc_uploads_path() . $logo;
            if (file_exists($path)) {
                @unlink($path);
                osc_delete_preference('logo', 'bender');
                osc_reset_preferences();
                osc_add_flash_ok_message(__('The logo image has been removed', 'bender'), 'admin');
            } else {
                osc_add_flash_error_message(__("Image not found", 'bender'), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/bender/admin/header.php'));
            break;
    }
}
开发者ID:mylastof,项目名称:os-class,代码行数:56,代码来源:functions.php


示例19: payment_get_custom

<?php

$data = payment_get_custom(Params::getParam('extra'));
$product_type = explode('x', Params::getParam('item_number'));
osc_add_flash_info_message(__('We are processing your payment, if we did not finish in a few minutes, please contact us', 'payment'));
if ($product_type[0] == 301) {
    if (osc_is_web_user_logged_in()) {
        osc_redirect_to(osc_route_url('payment-user-pack'));
    } else {
        // THIS SHOULD NOT HAPPEN
        osc_redirect_to(osc_base_path());
    }
} else {
    if (osc_is_web_user_logged_in()) {
        osc_redirect_to(osc_route_url('payment-user-menu'));
    } else {
        View::newInstance()->_exportVariableToView('item', Item::newInstance()->findByPrimaryKey($product_type[2]));
        osc_redirect_to(osc_item_url());
    }
}
开发者ID:virsoni,项目名称:plugin-payment,代码行数:20,代码来源:return.php


示例20: osc_add_flash_error_message


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP osc_reg_user_can_contact函数代码示例发布时间:2022-05-15
下一篇:
PHP osc_redirect_admin函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap