Ejemplo n.º 1
0
 function newcorp_admin_menu()
 {
     echo '<h3><a href="#">NewCorp</a></h3>
         <ul>
             <li><a href="' . osc_admin_render_theme_url('oc-content/themes/newcorp/admin/settings.php') . '">&raquo; ' . __('Settings', 'newcorp') . '</a></li>
         </ul>';
 }
Ejemplo n.º 2
0
function theme_classified_actions_admin()
{
    switch (Params::getParam('action_specific')) {
        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', 'classified'), 'admin');
                } else {
                    osc_add_flash_error_message(__("An error has occurred, please try again", 'classified'), 'admin');
                }
            } else {
                osc_add_flash_error_message(__("An error has occurred, please try again", 'classified'), 'admin');
            }
            header('Location: ' . osc_admin_render_theme_url('oc-content/themes/classified/admin/header.php'));
            exit;
            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', 'classified'), 'admin');
            } else {
                osc_add_flash_error_message(__("Image not found", 'classified'), 'admin');
            }
            header('Location: ' . osc_admin_render_theme_url('oc-content/themes/classified/admin/header.php'));
            exit;
            break;
    }
}
Ejemplo n.º 3
0
 function modern_admin_menu()
 {
     echo '<h3><a href="#">' . __('Modern theme', 'modern') . '</a></h3>
         <ul>
             <li><a href="' . osc_admin_render_theme_url('oc-content/themes/modern/admin/admin_settings.php') . '">&raquo; ' . __('Settings theme', 'modern') . '</a></li>
         </ul>';
 }
Ejemplo n.º 4
0
 function classified_admin_menu()
 {
     echo '<h3><a href="#">' . __('Classified theme', 'classified') . '</a></h3>
         <ul>
             <li><a href="' . osc_admin_render_theme_url('oc-content/themes/classified/admin/header.php') . '">&raquo; ' . __('Header logo', 'classified') . '</a></li>
             <li><a href="' . osc_admin_render_theme_url('oc-content/themes/classified/admin/settings.php') . '">&raquo; ' . __('Theme settings', 'classified') . '</a></li>
         </ul>';
 }
Ejemplo n.º 5
0
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');
            header('Location: ' . osc_admin_render_theme_url('oc-content/themes/modern/admin/settings.php'));
            exit;
            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');
            }
            header('Location: ' . osc_admin_render_theme_url('oc-content/themes/modern/admin/header.php'));
            exit;
            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');
            }
            header('Location: ' . osc_admin_render_theme_url('oc-content/themes/modern/admin/header.php'));
            exit;
            break;
    }
}
Ejemplo n.º 6
0
<?php

$testo = Testimonial::newInstance()->testimonialList();
$ct_url = 'oc-content/themes/nepcoders/admin/add-edit-testimonial.php';
?>
<a href='<?php 
echo osc_admin_render_theme_url($ct_url);
?>
'>Add new testimonial</a>
<table class="table" cellpadding="0" cellspacing="0">
    <thead>
        <tr>
            <th class="col-status ">Title</th>
    	</tr>
    </thead>
    <tbody>
<?php 
foreach ($testo as $test) {
    echo '<tr><td>' . $test['testimonial_title'] . '</td>';
    echo "<td><a href='" . osc_admin_render_theme_url($ct_url) . "?nepcoders_action=edit&tid=" . $test["pk_testimonial_id"] . "'>Edit</a></td>";
    echo '</tr>';
}
?>
	</tbody>
</table>
Ejemplo n.º 7
0
    _e('The preferred size of the logo is 195x50.', 'pop');
    ?>
</p>
    <?php 
    if ($logo_prefence) {
        ?>
    <div class="flashmessage flashmessage-inline flashmessage-warning"><p><?php 
        _e('<strong>Note:</strong> Uploading another logo will overwrite the current logo.', 'pop');
        ?>
</p></div>
    <?php 
    }
    ?>
    <br/><br/>
    <form action="<?php 
    echo osc_admin_render_theme_url('oc-content/themes/pop/admin/header.php');
    ?>
" method="post" enctype="multipart/form-data" class="nocsrf">
        <input type="hidden" name="action_specific" value="upload_logo" />
        <fieldset>
            <div class="form-horizontal">
                <div class="form-row">
                    <div class="form-label"><?php 
    _e('Logo image (png,gif,jpg)', 'pop');
    ?>
</div>
                    <div class="form-controls">
                        <input type="file" name="logo" id="package" />
                    </div>
                </div>
                <div class="form-actions">
Ejemplo n.º 8
0
    _e('Upload image', 'osclasswizards');
    ?>
</h2>
    <?php 
    if ($logo_prefence) {
        ?>
    <div class="flashmessage flashmessage-inline flashmessage-warning"><p><?php 
        _e('<strong>Note:</strong> Uploading another image will overwrite the current image.', 'osclasswizards');
        ?>
</p></div>
    <?php 
    }
    ?>
    <br/><br/>
    <form action="<?php 
    echo osc_admin_render_theme_url('oc-content/themes/osclasswizards/admin/settings.php');
    ?>
" method="post" enctype="multipart/form-data" class="nocsrf">
        <input type="hidden" name="action_specific" value="upload_favicon" />
        <fieldset>
            <div class="form-horizontal">
                <div class="form-row">
                    <div class="form-label"><?php 
    _e('Accepted image (png,gif,jpg)', 'osclasswizards');
    ?>
</div>
                    <div class="form-controls">
                        <input type="file" name="favicon" id="package" />
                    </div>
                </div>
                <div class="form-actions">
Ejemplo n.º 9
0
<?php

//Show params acording to subaction
$params = pop_getColorScheme();
// pop_theme_options(Params::getParam('subaction'));
$paramsOrigin = array();
//pop_theme_options();
?>
<p >
<?php 
osc_run_hook("logo_tool");
?>
<div class="clear"></div>
</p>
<form id="live-preview-form" action="<?php 
echo osc_admin_render_theme_url('oc-content/themes/pop/admin/settings.php');
?>
" method="post" enctype="multipart/form-data">
<div class="widget-settings">
    <table width="100%">
        <tr class="head-section">
            <td colspan="2"><div><?php 
_e('Header buttons', 'pop');
?>
</div></td>
        </tr>
        <tr>
            <td><?php 
_e('Background', 'pop');
?>
</td>
Ejemplo n.º 10
0
    _e('The preferred size of the logo is 600x100.', 'osclassclsx');
    ?>
</p>
    <?php 
    if ($logo_prefence) {
        ?>
    <div class="flashmessage flashmessage-inline flashmessage-warning"><p><?php 
        _e('<strong>Note:</strong> Uploading another logo will overwrite the current logo.', 'osclassclsx');
        ?>
</p></div>
    <?php 
    }
    ?>
    <br/><br/>
    <form action="<?php 
    echo osc_admin_render_theme_url('oc-content/themes/osclassclsx/admin/header.php');
    ?>
" method="post" enctype="multipart/form-data" class="nocsrf">
        <input type="hidden" name="action_specific" value="upload_logo" />
        <fieldset>
            <div class="form-horizontal">
                <div class="form-row">
                    <div class="form-label"><?php 
    _e('Logo image (png,gif,jpg)', 'osclassclsx');
    ?>
</div>
                    <div class="form-controls">
                        <input type="file" name="logo" id="package" />
                    </div>
                </div>
                <div class="form-actions">
Ejemplo n.º 11
0
 function twitter_admin_menu()
 {
     echo '<h3><a href="#">' . __('Twitter theme', 'twitter') . '</a></h3>
         <ul>
             <li><a href="' . osc_admin_render_theme_url('oc-content/themes/twitter/admin/admin_settings.php') . '">&raquo; ' . __('Settings theme', 'twitter') . '</a></li>
         </ul>';
 }
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;
    }
}
Ejemplo n.º 13
0
_e('Facebook Page', OSCLASSWIZARDS_THEME_FOLDER);
?>
</a></li>
    <li><a href="#documentation"><?php 
_e('Documentation', OSCLASSWIZARDS_THEME_FOLDER);
?>
</a></li>
  </ul>
  <div id="general">
    <h2 class="render-title">
      <?php 
_e('Theme settings', OSCLASSWIZARDS_THEME_FOLDER);
?>
    </h2>
    <form action="<?php 
echo osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php');
?>
" method="post" class="nocsrf">
      <input type="hidden" name="action_specific" value="settings" />
      <fieldset>
        <div class="form-horizontal">
          <div class="form-row">
            <div class="form-label">
              <?php 
_e('Welcome message', OSCLASSWIZARDS_THEME_FOLDER);
?>
            </div>
            <div class="form-controls">
              <textarea style="height: 50px; width: 500px;" name="welcome_message"><?php 
echo osc_get_preference('welcome_message', 'osclasswizards_theme');
?>
Ejemplo n.º 14
0
    if (file_exists(osc_uploads_path() . "realestate-logo-footer.jpg")) {
        ?>
                <p>
                    Preview:<br>
                    <?php 
        $logo_footer = osc_base_url() . str_replace(ABS_PATH, '', osc_uploads_path()) . "realestate-logo-footer.jpg";
        ?>
                    <img border="0" alt="<?php 
        echo osc_page_title();
        ?>
" src="<?php 
        echo $logo_footer;
        ?>
"/>
                    <form action="<?php 
        echo osc_admin_render_theme_url('oc-content/themes/realestate/admin/logo_settings.php');
        ?>
" method="post" enctype="multipart/form-data">
                        <input type="hidden" name="action_specific" value="footer_remove" />
                        <input id="button_remove" type="submit" value="<?php 
        _e('Remove logo footer', 'realestate');
        ?>
" />
                    </form>
                </p>
                <?php 
    } else {
        ?>
                    <p><?php 
        _e('Has not uploaded any logo image for footer', 'realestate');
        ?>
Ejemplo n.º 15
0
    $image_url = Params::getParam('image_url');
    if (Testimonial::newInstance()->insertTestimonialData($title, $message, $image_url)) {
        $ct_url = 'oc-content/themes/nepcoders/admin/testimonial.php';
        osc_add_flash_ok_message(__('Testimonial Saved', 'nepcoders'), 'admin');
        header('Location:' . osc_admin_render_theme_url($ct_url));
    }
}
if (Params::getParam('nep_action') == 'edit_testimonial') {
    $title = Params::getParam('title');
    $message = Params::getParam('message');
    $image_url = Params::getParam('image_url');
    $tid = Params::getParam('testimonial_id');
    if (Testimonial::newInstance()->updateTestimonial($tid, $title, $message, $image_url)) {
        $ct_url = 'oc-content/themes/nepcoders/admin/testimonial.php';
        osc_add_flash_ok_message(__('Testimonial Updated', 'nepcoders'), 'admin');
        header('Location:' . osc_admin_render_theme_url($ct_url));
    }
}
?>
<h1>Testimonial Information</h1>
<form name="testimonial-form" method="post" action="">
  <?php 
if (Params::getParam('nepcoders_action') == 'edit') {
    ?>
  <input type="hidden" name="nep_action" value="edit_testimonial">
  <input type="hidden" name="testimonial_id" value="<?php 
    echo Params::getParam('tid');
    ?>
">
  <?php 
    $result = Testimonial::newInstance()->getTestimonial(Params::getParam('tid'));
Ejemplo n.º 16
0
    <p>
        <?php 
    _e('The preferred size of the logo is 300x70.', 'classified');
    ?>
        <?php 
    if (file_exists(WebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg")) {
        ?>
        <?php 
        _e('<strong>Note:</strong> Uploading another logo will overwrite the current logo.', 'classified');
        ?>
        <?php 
    }
    ?>
    </p>
    <form action="<?php 
    echo osc_admin_render_theme_url('oc-content/themes/classified/admin/header.php');
    ?>
" method="post" enctype="multipart/form-data">
        <input type="hidden" name="action_specific" value="upload_logo" />
        <fieldset>
            <div class="form-horizontal">
                <div class="form-row">
                    <div class="form-label"><?php 
    _e('Logo image (png,gif,jpg)', 'classified');
    ?>
</div>
                    <div class="form-controls">
                        <input type="file" name="logo" id="package" />
                    </div>
                </div>
                <div class="form-actions">
Ejemplo n.º 17
0
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;
    }
}
Ejemplo n.º 18
0
<h2 class="render-title <?php 
echo osc_get_preference('footer_link', 'classified') ? '' : 'separate-top';
?>
"><?php 
_e('Theme settings', 'classified');
?>
</h2>
<form action="<?php 
echo osc_admin_render_theme_url('oc-content/themes/classified/admin/settings.php');
?>
" method="post">
    <input type="hidden" name="action_specific" value="settings" />
    <fieldset>
        <div class="form-horizontal">
            <div class="form-row">
                <div class="form-label"><?php 
_e('Search Content', 'classified');
?>
</div>
                <div class="form-controls"><textarea type="text" class="xlarge" name="search_content"><?php 
echo osc_esc_html(osc_get_preference('search_content', 'classified'));
?>
</textarea></div>
            </div>
            <div class="form-row">
                <div class="form-label"><?php 
_e('Search placeholder', 'classified');
?>
</div>
                <div class="form-controls"><input type="text" class="xlarge" name="keyword_placeholder" value="<?php 
echo osc_esc_html(osc_get_preference('keyword_placeholder', 'classified'));
Ejemplo n.º 19
0
    }
}
if (!function_exists('logo_footer')) {
    function logo_footer()
    {
        $html = '<a id="logo-footer" href="' . osc_base_url() . '"><img border="0" alt="' . osc_page_title() . '" src="' . osc_base_url() . str_replace(ABS_PATH, '', osc_uploads_path()) . "realestate-logo-footer.jpg" . '" /></a>';
        if (file_exists(osc_uploads_path() . "realestate-logo-footer.jpg")) {
            return $html;
        } else {
            return '<a id="logo-footer" class="logo-footer-text" href="' . osc_base_url() . '">' . osc_page_title() . '</a>';
        }
    }
}
if (!function_exists('realestate_theme_admin_menu')) {
    osc_admin_menu_appearance(__('Header logo', 'realestate'), osc_admin_render_theme_url('oc-content/themes/realestate/admin/logo_settings.php'), 'header_realestate');
    osc_admin_menu_appearance(__('Theme settings', 'realestate'), osc_admin_render_theme_url('oc-content/themes/realestate/admin/admin_settings.php'), 'settings_realestate');
}
$sQuery = osc_get_preference('keyword_placeholder', 'realestate');
osc_add_hook('footer', 'fjs_search');
if (!function_exists('fjs_search')) {
    function fjs_search()
    {
        echo "\n";
        ?>
    <script type="text/javascript">
    var sQuery = '<?php 
        echo osc_esc_js(osc_get_preference('keyword_placeholder', 'realestate'));
        ?>
' ;
    $(document).ready(function(){
                var element = $('input[name="sPattern"]');
Ejemplo n.º 20
0
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="lc" value="US" />
    <input type="hidden" name="custom" value="<?php echo osc_admin_render_theme_url('oc-content/themes/bender/admin/settings.php'); ?>&donation=successful&source=bender">
    <div id="flashmessage" class="flashmessage flashmessage-inline flashmessage-warning" style="color: #505050; display: block; ">
        <p><?php _e('I would like to contribute to the development of Osclass with a donation of', 'bender'); ?> <select name="amount" class="select-box-medium">
            <option value="50">50$</option>
            <option value="25">25$</option>
            <option value="10" selected>10$</option>
            <option value="5">5$</option>
            <option value=""><?php _e('Custom', 'bender'); ?></option>
        </select><input type="submit" class="btn btn-mini" name="submit" value="<?php echo osc_esc_html(__('Donate', 'bender')); ?>"></p>
    </div>
</form>
<?php } ?>
<h2 class="render-title <?php echo (osc_get_preference('footer_link', 'bender_theme') ? '' : 'separate-top'); ?>"><?php _e('Theme settings', 'bender'); ?></h2>
<form action="<?php echo osc_admin_render_theme_url('oc-content/themes/bender/admin/settings.php'); ?>" method="post" class="nocsrf">
    <input type="hidden" name="action_specific" value="settings" />
    <fieldset>
        <div class="form-horizontal">
            <div class="form-row">
                <div class="form-label"><?php _e('Search placeholder', 'bender'); ?></div>
                <div class="form-controls"><input type="text" class="xlarge" name="keyword_placeholder" value="<?php echo osc_esc_html( osc_get_preference('keyword_placeholder', 'bender_theme') ); ?>"></div>
            </div>
            <div class="form-row">
                <div class="form-label"><?php _e('Show lists as:', 'bender'); ?></div>
                <div class="form-controls">
                    <select name="defaultShowAs@all">
                        <option value="gallery" <?php if(bender_default_show_as() == 'gallery'){ echo 'selected="selected"' ; } ?>><?php _e('Gallery','bender'); ?></option>
                        <option value="list" <?php if(bender_default_show_as() == 'list'){ echo 'selected="selected"' ; } ?>><?php _e('List','bender'); ?></option>
                    </select>
                </div>
Ejemplo n.º 21
0
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 {
                osc_add_flash_error_message(__("An error has occurred, please try again", OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#favicon'));
            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 = 'logo';
                $logo_name .= '.' . $ext;
                $path = osc_uploads_path() . $logo_name;
                $img->saveToFile($path);
                osc_set_preference('logo', $logo_name, 'osclasswizards_theme');
                osc_add_flash_ok_message(__('The logo image has been uploaded correctly', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            } else {
                osc_add_flash_error_message(__("An error has occurred, please try again", OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#logo'));
            break;
        case 'remove_favicon':
            $logo = osc_get_preference('favicon', 'osclasswizards_theme');
            $path = osc_uploads_path() . $logo;
            if (file_exists($path)) {
                @unlink($path);
                osc_delete_preference('favicon', 'osclasswizards_theme');
                osc_reset_preferences();
                osc_add_flash_ok_message(__('The favicon image has been removed', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            } else {
                osc_add_flash_error_message(__("Image not found", OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#favicon'));
            break;
        case 'remove':
            $logo = osc_get_preference('logo', 'osclasswizards_theme');
            $path = osc_uploads_path() . $logo;
            if (file_exists($path)) {
                @unlink($path);
                osc_delete_preference('logo', 'osclasswizards_theme');
                osc_reset_preferences();
                osc_add_flash_ok_message(__('The logo image has been removed', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            } else {
                osc_add_flash_error_message(__("Image not found", OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#logo'));
            break;
        case 'upload_homeimage':
            $package = Params::getFiles('homeimage');
            if ($package['error'] == UPLOAD_ERR_OK) {
                $img = ImageResizer::fromFile($package['tmp_name']);
                $ext = $img->getExt();
                $logo_name = 'homeimage';
                $logo_name .= '.' . $ext;
                $path = osc_uploads_path() . $logo_name;
                $img->saveToFile($path);
                osc_set_preference('homeimage', $logo_name, 'osclasswizards_theme');
                osc_add_flash_ok_message(__('The banner image has been uploaded correctly', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            } else {
                osc_add_flash_error_message(__("An error has occurred, please try again", OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#banner'));
            break;
        case 'remove_homeimage':
            $logo = osc_get_preference('homeimage', 'osclasswizards_theme');
            $path = osc_uploads_path() . $logo;
            if (file_exists($path)) {
                @unlink($path);
                osc_delete_preference('homeimage', 'osclasswizards_theme');
                osc_reset_preferences();
                osc_add_flash_ok_message(__('The banner image has been removed', OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            } else {
                osc_add_flash_error_message(__("Image not found", OSCLASSWIZARDS_THEME_FOLDER), 'admin');
            }
            osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/' . OSCLASSWIZARDS_THEME_FOLDER . '/admin/settings.php#banner'));
            break;
    }
}
Ejemplo n.º 22
0
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true
    });
</script>
<div id="settings_form" style="border: 1px solid #ccc; background: #eee; ">
    <div style="padding: 20px;">
        <div style="float: left; width: 100%;">
            <fieldset>
                <legend style="font-size: 1.4em; padding-bottom: 15px; clear: both;"><?php 
_e('OSClass Mail Sender', 'osclassmail');
?>
</legend>
                <form name="osclassmail_form"  action="<?php 
echo osc_admin_render_theme_url('oc-content/themes/nepcoders/admin/newsletter.php');
?>
" method="POST" enctype="multipart/form-data" >
                    <input type="hidden" name="nepcoders_action" value="send_email" />
                    <div style="float: left;">
                        <label style="float: left; padding-right: 15px;"><?php 
_e('Subject', 'osclassmail');
?>
</label><input type="text" name="subject" id="subject" value="" />
                        <br/>
                        <textarea name="message" id="message" rows="30" cols="" >
                        </textarea>
                        <br/>
                        <span style="float:right;"><button type="submit" style="float: right;"><?php 
_e('Send Mail', 'osclassmail');
?>
Ejemplo n.º 23
0
            </form>
            <div>
                <?php 
    if (file_exists(WebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg")) {
        ?>
                <p>
                    Preview:<br>
                    <img border="0" alt="<?php 
        echo osc_page_title();
        ?>
" src="<?php 
        echo osc_current_web_theme_url('images/logo.jpg');
        ?>
"/>
                    <form action="<?php 
        echo osc_admin_render_theme_url('oc-content/themes/modern/admin/admin_settings.php');
        ?>
" method="post" enctype="multipart/form-data">
                        <input type="hidden" name="action_specific" value="remove" />
                        <input id="button_remove" type="submit" value="<?php 
        _e('Remove logo', 'modern');
        ?>
" />
                    </form>
                </p>
                <?php 
    } else {
        ?>
                    <p><?php 
        _e('Has not uploaded any logo image', 'modern');
        ?>
Ejemplo n.º 24
0
    if (file_exists(WebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg")) {
        ?>
            <p>
                <?php 
        _e('Preview', 'twitter_bootstrap');
        ?>
:<br>
                <img border="0" alt="<?php 
        echo osc_page_title();
        ?>
" src="<?php 
        echo osc_current_web_theme_url('images/logo.jpg');
        ?>
"/>
                <form action="<?php 
        echo osc_admin_render_theme_url('oc-content/themes/twitter_bootstrap/admin/admin_settings.php');
        ?>
" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="action_specific" value="remove" />
                    <input id="button_remove" type="submit" value="<?php 
        _e('Remove logo', 'twitter_bootstrap');
        ?>
" />
                </form>
            </p>
            <?php 
    } else {
        ?>
                <p><?php 
        _e('Has not uploaded any logo image', 'twitter_bootstrap');
        ?>
Ejemplo n.º 25
0
/**
THEME SETTINGS BUTTONS
**/
function editBtn()
{
    ?>
 <script>
 $(document).ready(function(){
 $('.current-theme .theme-description').append("<br/><br/><a href='<?php 
    echo osc_admin_render_theme_url('oc-content/themes/flatter/admin/settings.php');
    ?>
' class='btn btn-green'><?php 
    _e('Flatter Settings', 'flatter');
    ?>
</a> <a class='btn btn-blue' target='_blank' href='http://www.drizzledesigns.in/forums'><?php 
    _e('Help', 'flatter');
    ?>
</a>"
);
 });
 </script>
 <?php 
}