Exemple #1
0
 */
?>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="robots" content="noindex, nofollow, noarchive" />
        <meta name="googlebot" content="noindex, nofollow, noarchive" />
        <title><?php 
echo osc_page_title();
?>
 &raquo; <?php 
_e('Log in');
?>
</title>
        <script type="text/javascript" src="<?php 
echo osc_assets_url('js/jquery.min.js');
?>
"></script>
        <link type="text/css" href="style/backoffice_login.css" media="screen" rel="stylesheet" />
        <?php 
osc_run_hook('admin_login_header');
?>
    </head>
    <body class="login">
        <div id="login">
            <h1>
                <a href="<?php 
echo View::newInstance()->_get('login_admin_url');
?>
" title="<?php 
echo View::newInstance()->_get('login_admin_title');
Exemple #2
0
<?php

// check requirements
if (!is_writable(ABS_PATH . 'oc-content/downloads/')) {
    osc_add_flash_error_message(sprintf(_m('<code>downloads</code> folder has to be writable, i.e.: <code>chmod a+w %soc-content/downloads/</code>'), ABS_PATH), 'admin');
}
// fancybox
osc_enqueue_script('fancybox');
osc_enqueue_style('fancybox', osc_assets_url('js/fancybox/jquery.fancybox.css'));
osc_register_script('market-js', osc_current_admin_theme_js_url('market.js'), array('jquery', 'jquery-ui'));
osc_enqueue_script('market-js');
osc_add_hook('admin_header', 'add_market_jsvariables');
function add_market_jsvariables()
{
    $marketPage = Params::getParam("mPage");
    $version_length = strlen(osc_version());
    $main_version = substr(osc_version(), 0, $version_length - 2) . "." . substr(osc_version(), $version_length - 2, 1);
    if ($marketPage >= 1) {
        $marketPage--;
    }
    $action = Params::getParam("action");
    $js_lang = array('by' => __('by'), 'ok' => __('Ok'), 'error_item' => __('There was a problem, try again later please'), 'wait_download' => __('Please wait until the download is completed'), 'downloading' => __('Downloading'), 'close' => __('Close'), 'download' => __('Download'), 'update' => __('Update'), 'last_update' => __('Last update'), 'downloads' => __('Downloads'), 'requieres_version' => __('Requires at least'), 'compatible_with' => __('Compatible up to'), 'screenshots' => __('Screenshots'), 'preview_theme' => __('Preview theme'), 'download_manually' => __('Download manually'), 'buy' => __('Buy'), 'proceed_anyway' => sprintf(__('Warning! This package is not compatible with your current version of Osclass (%s)'), $main_version), 'sure' => __('Are you sure?'), 'proceed_anyway_btn' => __('Ok, proceed anyway'), 'not_compatible' => sprintf(__('Warning! This theme is not compatible with your current version of Osclass (%s)'), $main_version), 'themes' => array('download_ok' => __('The theme has been downloaded correctly, proceed to activate or preview it.')), 'plugins' => array('download_ok' => __('The plugin has been downloaded correctly, proceed to install and configure.')), 'languages' => array('download_ok' => __('The language has been downloaded correctly, proceed to activate.')));
    ?>
        <script type="text/javascript">
            var theme = window.theme || {};
            theme.adminBaseUrl  = "<?php 
    echo osc_admin_base_url(true);
    ?>
";
            theme.marketAjaxUrl = "<?php 
    echo osc_admin_base_url(true);
Exemple #3
0
"/>
<?php 
}
?>
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="Fri, Jan 01 1970 00:00:00 GMT" />

    <script type="text/javascript">
        var fileDefaultText = '<?php 
echo osc_esc_js(__('No file selected', 'modern'));
?>
';
        var fileBtnText     = '<?php 
echo osc_esc_js(__('Choose File', 'modern'));
?>
';
    </script>

<?php 
osc_enqueue_style('style', osc_current_web_theme_url('style.css'));
osc_enqueue_style('tabs', osc_current_web_theme_url('tabs.css'));
osc_enqueue_style('jquery-ui-datepicker', osc_assets_url('css/jquery-ui/jquery-ui.css'));
osc_register_script('jquery-uniform', osc_current_web_theme_js_url('jquery.uniform.js'), 'jquery');
osc_register_script('global', osc_current_web_theme_js_url('global.js'));
osc_enqueue_script('jquery');
osc_enqueue_script('jquery-ui');
osc_enqueue_script('jquery-uniform');
osc_enqueue_script('tabber');
osc_enqueue_script('global');
osc_run_hook('header');
FieldForm::i18n_datePicker();
Exemple #4
0
    <?php 
    }
}
function osc_meta_generator()
{
    echo '<meta name="generator" content="Osclass ' . OSCLASS_VERSION . '" />';
}
osc_add_hook('header', 'osc_show_maintenance');
osc_add_hook('header', 'osc_show_maintenance_css');
osc_add_hook('header', 'osc_meta_generator');
osc_add_hook('header', 'osc_load_scripts', 10);
osc_add_hook('header', 'osc_load_styles', 10);
// register scripts
osc_register_script('jquery', osc_assets_url('js/jquery.min.js'));
osc_register_script('jquery-ui', osc_assets_url('js/jquery-ui.min.js'), 'jquery');
osc_register_script('jquery-json', osc_assets_url('js/jquery.json.js'), 'jquery');
osc_register_script('jquery-treeview', osc_assets_url('js/jquery.treeview.js'), 'jquery');
osc_register_script('jquery-nested', osc_assets_url('js/jquery.ui.nestedSortable.js'), 'jquery');
osc_register_script('jquery-validate', osc_assets_url('js/jquery.validate.min.js'), 'jquery');
osc_register_script('tabber', osc_assets_url('js/tabber-minimized.js'), 'jquery');
osc_register_script('tiny_mce', osc_assets_url('js/tiny_mce/tiny_mce.js'));
osc_register_script('colorpicker', osc_assets_url('js/colorpicker/js/colorpicker.js'));
Plugins::init();
osc_csrfguard_start();
if (!class_exists('PHPMailer')) {
    require_once osc_lib_path() . 'phpmailer/class.phpmailer.php';
}
if (!class_exists('SMTP')) {
    require_once osc_lib_path() . 'phpmailer/class.smtp.php';
}
/* file end: ./oc-load.php */
function pop_admin_enqueue_assets()
{
    if (Params::getParam('file') == 'oc-content/themes/pop/admin/color_settings.php' && Params::getParam('page') == 'appearance' && Params::getParam('action') == 'render') {
        osc_enqueue_style('pop_admin_css', osc_base_url() . 'oc-content/themes/pop/admin/css/admin.css');
        osc_enqueue_script('colorpicker');
        osc_enqueue_style('colorpicker', osc_assets_url('js/colorpicker/css/colorpicker.css'));
    }
}
Exemple #6
0
 *      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/>.
 */
/**
DEFINES
*/
define('OSCLASSWIZARDS_THEME_VERSION', '2.0.2');
define('OSCLASSWIZARDS_THEME_FOLDER', 'osclasswizards');
if (!osc_get_preference('keyword_placeholder', 'osclasswizards_theme')) {
    osc_set_preference('keyword_placeholder', __('ie. PHP Programmer', OSCLASSWIZARDS_THEME_FOLDER), 'osclasswizards_theme');
}
osc_enqueue_style('font-awesome', osc_current_web_theme_url('css/font-awesome/css/font-awesome.min.css'));
// used for date/dateinterval custom fields
osc_enqueue_script('php-date');
if (!OC_ADMIN) {
    osc_enqueue_style('fine-uploader-css', osc_assets_url('js/fineuploader/fineuploader.css'));
    osc_enqueue_style('osclasswizards-fine-uploader-css', osc_current_web_theme_url('css/ajax-uploader.css'));
}
osc_enqueue_script('jquery-fineuploader');
/**
** DEFAULT VALUES
**/
if (!osc_get_preference('welcome_message', 'osclasswizards_theme')) {
    osc_set_preference('welcome_message', 'Hello Guest, Welcome to OsclassWizards', 'osclasswizards_theme');
}
if (!osc_get_preference('sub_cat_limit', 'osclasswizards_theme')) {
    osc_set_preference('sub_cat_limit', 5, 'osclasswizards_theme');
}
if (!osc_get_preference('popular_regions_limit', 'osclasswizards_theme')) {
    osc_set_preference('popular_regions_limit', 10, 'osclasswizards_theme');
}
Exemple #7
0
function customHead()
{
    ?>
        <link rel="stylesheet" media="screen" type="text/css" href="<?php 
    echo osc_assets_url('js/colorpicker/css/colorpicker.css');
    ?>
" />
        <script type="text/javascript">
            $(document).ready(function(){
                // Code for form validation
                $.validator.addMethod('regexp', function(value, element, param) {
                    return this.optional(element) || value.match(param);
                }, '<?php 
    echo osc_esc_js(__('Size is not in the correct format'));
    ?>
');

                $("form[name=media_form]").validate({
                    rules: {
                        dimThumbnail: {
                            required: true,
                            regexp: /^[0-9]+x[0-9]+$/i
                        },
                        dimPreview: {
                            required: true,
                            regexp: /^[0-9]+x[0-9]+$/i
                        },
                        dimNormal: {
                            required: true,
                            regexp: /^[0-9]+x[0-9]+$/i
                        },
                        maxSizeKb: {
                            required: true,
                            digits: true
                        }
                    },
                    messages: {
                        dimThumbnail: {
                            required: '<?php 
    echo osc_esc_js(__("Thumbnail size: this field is required"));
    ?>
',
                            regexp: '<?php 
    echo osc_esc_js(__("Thumbnail size: is not in the correct format"));
    ?>
'
                        },
                        dimPreview: {
                            required: '<?php 
    echo osc_esc_js(__("Preview size: this field is required"));
    ?>
',
                            regexp: '<?php 
    echo osc_esc_js(__("Preview size: is not in the correct format"));
    ?>
'
                        },
                        dimNormal: {
                            required: '<?php 
    echo osc_esc_js(__("Normal size: this field is required"));
    ?>
',
                            regexp: '<?php 
    echo osc_esc_js(__("Normal size: is not in the correct format"));
    ?>
'
                        },
                        maxSizeKb: {
                            required: '<?php 
    echo osc_esc_js(__("Maximum size: this field is required"));
    ?>
',
                            digits: '<?php 
    echo osc_esc_js(__("Maximum size: this field must only contain numeric characters"));
    ?>
'
                        }
                    },
                    wrapper: "li",
                    errorLabelContainer: "#error_list",
                    invalidHandler: function(form, validator) {
                        $('html,body').animate({ scrollTop: $('h1').offset().top }, { duration: 250, easing: 'swing'});
                    },
                    submitHandler: function(form){
                        $('button[type=submit], input[type=submit]').attr('disabled', 'disabled');
                        form.submit();
                    }
                });

                $('#colorpickerField').ColorPicker({
                    onSubmit: function(hsb, hex, rgb, el) { },
                    onChange: function (hsb, hex, rgb) {
                        $('#colorpickerField').val(hex);
                    }
                });

                $('#watermark_none').bind('change', function() {
                    if( $(this).prop('checked') ) {
                        $('#watermark_text_box').hide();
                        $('#watermark_image_box').hide();
                        resetLayout();
                    }
                });

                // dialog bulk actions
                $("#dialog-watermark-warning").dialog({
                    autoOpen: false,
                    modal: true
                });

                $('#watermark_text').on('change', function() {
                    if( $(this).prop('checked') ) {
                        $('#watermark_text_box').show();
                        $('#watermark_image_box').hide();
                        if( !$('input[name="keep_original_image"]').prop('checked') ) {
                            $("#dialog-watermark-warning").dialog('open');
                        }
                        resetLayout();
                    }
                });

                $('#watermark_image').on('change', function() {
                    if( $(this).prop('checked') ) {
                        $('#watermark_text_box').hide();
                        $('#watermark_image_box').show();
                        if( !$('input[name="keep_original_image"]').prop('checked') ) {
                            $("#dialog-watermark-warning").dialog('open');
                        }
                        resetLayout();
                    }
                });

                $('input[name="keep_original_image"]').on("change",function() {
                    if( !$(this).prop('checked') ) {
                        if( !$('#watermark_none').prop('checked') ) {
                            $("#dialog-watermark-warning").dialog('open');
                        }
                        resetLayout();
                    }
                });
            });
        </script>
        <?php 
}
osc_add_hook('header', 'osc_load_styles', 9);
osc_add_hook('header', 'osc_load_scripts', 10);
// register scripts
osc_register_script('jquery', osc_assets_url('js/jquery.min.js'));
osc_register_script('jquery-ui', osc_assets_url('js/jquery-ui.min.js'), 'jquery');
osc_register_script('jquery-json', osc_assets_url('js/jquery.json.js'), 'jquery');
osc_register_script('jquery-treeview', osc_assets_url('js/jquery.treeview.js'), 'jquery');
osc_register_script('jquery-nested', osc_assets_url('js/jquery.ui.nestedSortable.js'), 'jquery');
osc_register_script('jquery-validate', osc_assets_url('js/jquery.validate.min.js'), 'jquery');
osc_register_script('tabber', osc_assets_url('js/tabber-minimized.js'), 'jquery');
osc_register_script('tiny_mce', osc_assets_url('js/tiny_mce/tiny_mce.js'));
osc_register_script('colorpicker', osc_assets_url('js/colorpicker/js/colorpicker.js'));
osc_register_script('fancybox', osc_assets_url('js/fancybox/jquery.fancybox.pack.js'), array('jquery'));
osc_register_script('jquery-migrate', osc_assets_url('js/jquery-migrate.min.js'), array('jquery'));
osc_register_script('php-date', osc_assets_url('js/date.js'));
osc_register_script('jquery-fineuploader', osc_assets_url('js/fineuploader/jquery.fineuploader.min.js'), 'jquery');
Plugins::init();
osc_csrfguard_start();
if (OC_ADMIN) {
    // init admin menu
    AdminMenu::newInstance()->init();
    $functions_path = AdminThemes::newInstance()->getCurrentThemePath() . 'functions.php';
    if (file_exists($functions_path)) {
        require_once $functions_path;
    }
} else {
    Rewrite::newInstance()->init();
}
if (!class_exists('PHPMailer')) {
    require_once osc_lib_path() . 'phpmailer/class.phpmailer.php';
}
Exemple #9
0
 * Copyright (C) 2012 OSCLASS
 *
 * This program is free software: you can redistribute it and/or modify it under the terms
 * of the GNU Affero General Public License as published by the Free Software Foundation,
 * either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the 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/>.
 */
osc_enqueue_script('jquery-validate');
osc_enqueue_script('colorpicker');
osc_enqueue_style('colorpicker', osc_assets_url('js/colorpicker/css/colorpicker.css'));
$maxPHPsize = View::newInstance()->_get('max_size_upload');
$imagickLoaded = extension_loaded('imagick');
$aGD = @gd_info();
$freeType = array_key_exists('FreeType Support', $aGD);
//customize Head
function customHead()
{
    ?>
        <link rel="stylesheet" media="screen" type="text/css" href="<?php 
    echo osc_current_admin_theme_js_url('colorpicker/css/colorpicker.css');
    ?>
" />
        <script type="text/javascript">
            $(document).ready(function(){
                // Code for form validation
Exemple #10
0
require_once ABS_PATH . 'oc-load.php';
if (file_exists(ABS_PATH . '.maintenance')) {
    define('__OSC_MAINTENANCE__', true);
}
// register admin scripts
osc_register_script('admin-osc', osc_current_admin_theme_js_url('osc.js'), 'jquery');
osc_register_script('admin-ui-osc', osc_current_admin_theme_js_url('ui-osc.js'), 'jquery');
osc_register_script('admin-location', osc_current_admin_theme_js_url('location.js'), 'jquery');
// enqueue scripts
osc_enqueue_script('jquery');
osc_enqueue_script('jquery-ui');
osc_enqueue_script('admin-osc');
osc_enqueue_script('admin-ui-osc');
osc_add_hook('admin_footer', array('FieldForm', 'i18n_datePicker'));
// enqueue css styles
osc_enqueue_style('jquery-ui', osc_assets_url('css/jquery-ui/jquery-ui.css'));
osc_enqueue_style('admin-css', osc_current_admin_theme_styles_url('main.css'));
switch (Params::getParam('page')) {
    case 'items':
        require_once osc_admin_base_path() . 'items.php';
        $do = new CAdminItems();
        $do->doModel();
        break;
    case 'comments':
        require_once osc_admin_base_path() . 'comments.php';
        $do = new CAdminItemComments();
        $do->doModel();
        break;
    case 'media':
        require_once osc_admin_base_path() . 'media.php';
        $do = new CAdminMedia();