Example #1
0
 function do410()
 {
     Rewrite::newInstance()->set_location('error');
     header('HTTP/1.1 410 Gone');
     osc_current_web_theme_path('404.php');
     exit;
 }
Example #2
0
function item_success_item_validate()
{
    if (Params::getParam('page') == 'item' && Params::getParam('action') == 'activate') {
        $secret = Params::getParam('secret');
        $id = Params::getParam('id');
        $item = Item::newInstance()->listWhere("i.pk_i_id = '%s' AND ((i.s_secret = '%s') OR (i.fk_i_user_id = '%d'))", addslashes($id), addslashes($secret), addslashes(osc_logged_user_id()));
        // item doesn't exist
        if (count($item) == 0) {
            Rewrite::newInstance()->set_location('error');
            header('HTTP/1.1 404 Not Found');
            osc_current_web_theme_path('404.php');
            exit;
        }
        View::newInstance()->_exportVariableToView('item', $item[0]);
        if ($item[0]['b_active'] == 0) {
            // ACTIVETE ITEM
            $mItems = new ItemActions(false);
            $success = $mItems->activate($item[0]['pk_i_id'], $item[0]['s_secret']);
            if ($success) {
                osc_add_flash_ok_message(_m('The listing has been validated'));
                item_success_redirect(Item::newInstance()->findByPrimaryKey($item[0]['pk_i_id']));
                exit;
            } else {
                osc_add_flash_error_message(_m("The listing can't be validated"));
            }
        } else {
            osc_add_flash_warning_message(_m('The listing has already been validated'));
        }
        osc_redirect_to(osc_item_url());
    }
}
Example #3
0
 function doView($file)
 {
     osc_run_hook("before_html");
     osc_current_web_theme_path($file);
     Session::newInstance()->_clearVariables();
     osc_run_hook("after_html");
 }
Example #4
0
 *         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/>.
 */
?>
<!doctype html>
<html class="no-js" lang="<?php 
echo str_replace('_', '-', osc_current_user_locale());
?>
">
    <head>
        <?php 
osc_current_web_theme_path('includes/head.php');
?>
    </head>
<body <?php 
osclassclsx_body_class();
?>
>
    <!--[if lt IE 8]>
        <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
    <![endif]-->
<header id="header">
    <div class="row wrapper">
        <div class="top-bar columns">
            <div class="top-bar-left">
                <div id="logo">
                    <?php 
Example #5
0
function sidebar()
{
    osc_current_web_theme_path('user-sidebar.php');
}
Example #6
0
/**
 * Load the form for the alert subscription
 *
 * @return void
 */
function osc_alert_form()
{
    if (!View::newInstance()->_exists('search_alert')) {
        $search = osc_search();
        $search->order();
        $search->limit();
        View::newInstance()->_exportVariableToView('search_alert', base64_encode(serialize($search)));
    }
    osc_current_web_theme_path('alert-form.php');
}
Example #7
0
 *         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/>.
 */
?>
<!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" dir="ltr" lang="<?php 
echo str_replace('_', '-', osc_current_user_locale());
?>
">
    <head>
        <?php 
osc_current_web_theme_path('head.php');
?>
        <?php 
if (osc_is_search_page()) {
    if (osc_count_items() == 0) {
        osc_add_filter('meta_robots', 'meta_robots_custom');
        function meta_robots_custom()
        {
            return 'noindex, nofollow';
        }
    }
}
?>
        <meta name="robots" content="<?php 
echo osc_apply_filter('meta_robots', 'index, follow');
?>
Example #8
0
 *        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/>.
 */
?>
<!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" dir="ltr" lang="<?php 
echo str_replace('_', '-', osc_current_user_locale());
?>
">
<head>
<?php 
osc_current_web_theme_path('common/head.php');
?>
	<link href="<?php 
echo osc_current_web_theme_url('css/custom.css');
?>
" rel="stylesheet">
	<script src='https://www.google.com/recaptcha/api.js'></script>

	<!-- Put this script tag to the <head> of your page -->
	<script type="text/javascript" src="//vk.com/js/api/openapi.js?116"></script>

	<script type="text/javascript">
		VK.init({apiId: 5035326, onlyWidgets: true});
	</script>
</head>
Example #9
0
 public function init()
 {
     if (Params::existServerParam('REQUEST_URI')) {
         if (preg_match('|[\\?&]{1}http_referer=(.*)$|', urldecode(Params::getServerParam('REQUEST_URI', false, false)), $ref_match)) {
             $this->http_referer = $ref_match[1];
             $_SERVER['REQUEST_URI'] = preg_replace('|[\\?&]{1}http_referer=(.*)$|', "", urldecode(Params::getServerParam('REQUEST_URI', false, false)));
         }
         $request_uri = preg_replace('@^' . REL_WEB_URL . '@', "", urldecode(Params::getServerParam('REQUEST_URI', false, false)));
         $this->raw_request_uri = $request_uri;
         $route_used = false;
         foreach ($this->routes as $id => $route) {
             // UNCOMMENT TO DEBUG
             //echo 'Request URI: '.$request_uri." # Match : ".$route['regexp']." # URI to go : ".$route['url']." <br />";
             if (preg_match('#^' . $route['regexp'] . '#', $request_uri, $m)) {
                 if (!preg_match_all('#\\{([^\\}]+)\\}#', $route['url'], $args)) {
                     $args[1] = array();
                 }
                 $l = count($m);
                 for ($p = 1; $p < $l; $p++) {
                     if (isset($args[1][$p - 1])) {
                         Params::setParam($args[1][$p - 1], $m[$p]);
                     } else {
                         Params::setParam('route_param_' . $p, $m[$p]);
                     }
                 }
                 Params::setParam('page', 'custom');
                 Params::setParam('route', $id);
                 $route_used = true;
                 $this->location = $route['location'];
                 $this->section = $route['section'];
                 $this->title = $route['title'];
                 break;
             }
         }
         if (!$route_used) {
             if (osc_rewrite_enabled()) {
                 $tmp_ar = explode("?", $request_uri);
                 $request_uri = $tmp_ar[0];
                 // if try to access directly to a php file
                 if (preg_match('#^(.+?)\\.php(.*)$#', $request_uri)) {
                     $file = explode("?", $request_uri);
                     if (!file_exists(ABS_PATH . $file[0])) {
                         Rewrite::newInstance()->set_location('error');
                         header('HTTP/1.1 404 Not Found');
                         osc_current_web_theme_path('404.php');
                         exit;
                     }
                 }
                 foreach ($this->rules as $match => $uri) {
                     // UNCOMMENT TO DEBUG
                     // echo 'Request URI: '.$request_uri." # Match : ".$match." # URI to go : ".$uri." <br />";
                     if (preg_match('#^' . $match . '#', $request_uri, $m)) {
                         $request_uri = preg_replace('#' . $match . '#', $uri, $request_uri);
                         break;
                     }
                 }
             }
             $this->extractParams($request_uri);
             $this->request_uri = $request_uri;
             if (Params::getParam('page') != '') {
                 $this->location = Params::getParam('page');
             }
             if (Params::getParam('action') != '') {
                 $this->section = Params::getParam('action');
             }
         }
     }
 }
Example #10
0
<?php

osc_current_web_theme_path('user-profile.php');
Example #11
0
    if (Params::getParam('page') == 'upgrade') {
        require_once osc_lib_path() . 'osclass/upgrade-funcs.php';
        exit(1);
    } else {
        if (!in_array(Params::getParam('page'), array('cron')) && !in_array(Params::getParam('cron-type'), array('hourly', 'daily', 'weekly'))) {
            exit(1);
        }
    }
}
if (file_exists(ABS_PATH . '.maintenance')) {
    if (!osc_is_admin_user_logged_in()) {
        header('HTTP/1.1 503 Service Temporarily Unavailable');
        header('Status: 503 Service Temporarily Unavailable');
        header('Retry-After: 900');
        if (file_exists(WebThemes::newInstance()->getCurrentThemePath() . 'maintenance.php')) {
            osc_current_web_theme_path('maintenance.php');
            die;
        } else {
            require_once LIB_PATH . 'osclass/helpers/hErrors.php';
            $title = sprintf(__('Режим обслуживания &raquo; %s'), osc_page_title());
            $message = sprintf(__('Мы приносим извинения за возможные неудобства. %s зак рыт на обслуживание.') . '.', osc_page_title());
            osc_die($title, $message);
        }
    } else {
        define('__OSC_MAINTENANCE__', true);
    }
}
if (!osc_users_enabled() && osc_is_web_user_logged_in()) {
    Session::newInstance()->_drop('userId');
    Session::newInstance()->_drop('userName');
    Session::newInstance()->_drop('userEmail');
Example #12
0
function sidebar()
{
    osc_current_web_theme_path('search-sidebar.php');
}
Example #13
0
<?php

osc_current_web_theme_path('user-items.php');
function payment_pro_show_item($item)
{
    if (osc_get_preference("pay_per_post", 'payment_pro') == "1" && !ModelPaymentPro::newInstance()->publishFeeIsPaid($item['pk_i_id'])) {
        if (osc_is_admin_user_logged_in()) {
            osc_get_flash_message('pubMessages', true);
            osc_add_flash_warning_message(__('The listing hasn\'t been paid', 'payment_pro'));
        } else {
            if (osc_is_web_user_logged_in() && osc_logged_user_id() == $item['fk_i_user_id']) {
                osc_get_flash_message('pubMessages', true);
                osc_add_flash_warning_message(sprintf(__('To make this listing available to others, you need to pay a publish fee. <a href="%s">Continue and make the ad public</a>', 'payment_pro'), osc_route_url('payment-pro-user-menu')));
            } else {
                ob_get_clean();
                Rewrite::newInstance()->set_location('error');
                header('HTTP/1.1 400 Bad Request');
                osc_current_web_theme_path('404.php');
                exit;
            }
        }
    }
}
Example #15
0
        verticalOffset = typeof(verticalOffset) != 'undefined' ? verticalOffset : 0;
        element = $('body');
        offset = element.offset();
        offsetTop = offset.top;
        $('html, body').animate({scrollTop: offsetTop}, 500, 'linear');
    }
    </script>

<div class="modal fade" id="login" role="dialog">
    <?php 
osc_current_web_theme_path('user-login-modal.php');
?>
      
</div>
<div class="modal fade" id="register" role="dialog">
    <?php 
osc_current_web_theme_path('user-register-modal.php');
?>
      
</div>
<div class="modal fade" id="recover" role="dialog">
    <?php 
osc_current_web_theme_path('user-recover.php');
?>
      
</div>
<div class="subscribe-modal"><!-- Place at bottom of page --></div>      
</body>
</html>
<?php 
osc_run_hook('footer');
Example #16
0
/**
 * Load the form for the alert subscription
 *
 * @return void
 */
function osc_alert_form()
{
    osc_current_web_theme_path('alert-form.php');
}
Example #17
0
        <h3><?php 
    _e('You don\'t have any items yet', 'watchlist');
    ?>
</h3>
        <?php 
} else {
    ?>
        <h3><?php 
    //echo  $iTotalItems;
    ?>
</h3>
         <div id="grid" data-columns class="listings">
    <?php 
    View::newInstance()->_exportVariableToView("listAdmin", true);
    View::newInstance()->_exportVariableToView("listType", 'watchlist');
    osc_current_web_theme_path('loop-items.php');
    ?>
        </div>
        <div class="clear"></div>
        <div class="pagination">
            <?php 
    echo osc_pagination(array('url' => osc_render_file_url(osc_plugin_folder(__FILE__) . 'watchlist.php') . '&iPage={PAGE}'));
    ?>
        </div>
        <?php 
}
?>
    </div>
        </div>
</div>
    
<?php 
}
?>
<p class="name"><?php 
_e('Seller / Pulblisher', 'nepcoders');
?>
: <a href="<?php 
echo osc_user_public_profile_url(osc_item_user_id());
?>
" ><?php 
echo osc_item_contact_name();
?>
</a></p>
<div class="col-md-3">
    <?php 
if (nc_osc_paypal_status()) {
    osc_current_web_theme_path('add_to_cart.php');
}
?>
</div>
<div class="col-md-3">
 	<?php 
if (osc_is_web_user_logged_in()) {
    ?>
    <?php 
    osc_current_web_theme_path('ratings.php');
    ?>
    <?php 
}
?>
</div>
function pop_redirect_404($header_text = '')
{
    if ($header_text != '') {
        View::newInstance()->_exportVariableToView('pop_404_header_text', $header_text);
    }
    Rewrite::newInstance()->set_location('error');
    header('HTTP/1.1 404 Not Found');
    osc_current_web_theme_path('404.php');
    exit;
}
Example #20
0
 function do404()
 {
     header('HTTP/1.1 404 Not Found');
     osc_current_web_theme_path('404.php');
 }
Example #21
0
 function doView($file)
 {
     osc_run_hook("before_html");
     osc_current_web_theme_path($file);
     osc_run_hook("after_html");
 }
Example #22
0
 function doView($file)
 {
     osc_current_web_theme_path($file);
 }
function pop_user_map_header()
{
    osc_current_web_theme_path('inc.user_header_public_profile.php');
}
Example #24
0
 function do404()
 {
     Rewrite::newInstance()->set_location('error');
     header('HTTP/1.1 404 Not Found');
     osc_current_web_theme_path('404.php');
 }
Example #25
0
<?php

/*
 *      Osclass – software for creating and publishing online classified
 *                           advertising platforms
 *
 *                        Copyright (C) 2014 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/>.
 */
// meta tag robots
osc_add_hook('header', 'osclassclsx_nofollow_construct');
osc_current_web_theme_path('item-post.php');
Example #26
0
</th>
                <th><?php 
    _e('Date', 'seeker');
    ?>
</th>
            </tr>
       </thead>
       <tbody>
       <?php 
    $class = "odd";
    ?>
       <?php 
    while (osc_has_latest_items()) {
        ?>
           <?php 
        osc_current_web_theme_path('inc.grid.php');
        ?>
       <?php 
    }
    ?>
       </tbody>
    </table>
    <?php 
    if (osc_count_latest_items() == osc_max_latest_items()) {
        ?>
        <p class="see_more_link"><a href="<?php 
        echo osc_search_show_all_url();
        ?>
">
            <strong><?php 
        _e('See all ads', 'seeker');
Example #27
0
_e("listed in", 'flatter');
?>
 <strong><?php 
echo osc_count_list_cities();
?>
 <?php 
_e("Cities", 'flatter');
?>
</strong>.</p>
                    <?php 
if (osc_users_enabled() || !osc_users_enabled() && !osc_reg_user_post()) {
    ?>
                        <a class="btn btn-success btn-lg" href="<?php 
    echo osc_item_post_url();
    ?>
"><?php 
    _e("Publish your ad for free", 'flatter');
    ?>
</a>
                    <?php 
}
?>
                </div>
            </div>
        </div><!-- Section 5 -->
    </div>

<?php 
osc_current_web_theme_path('locationfind.php');
osc_current_web_theme_path('footer.php');
Example #28
0
_e('Listing location', 'flatter');
?>
</h3>
            <div class="googlemap wblock">
                <?php 
osc_run_hook('location');
?>
            </div>
        </div>
        <?php 
//}
?>
        
        <!-- Seller Related listings-->
        <?php 
osc_current_web_theme_path('sellerlistings.php');
?>
        
        <?php 
if (osc_get_preference('usefulinfo_show', 'flatter_theme') !== '0') {
    ?>
        <div class="widget hidden-xs">
            <h3><?php 
    _e('Useful information', 'flatter');
    ?>
</h3>
            <div class="usefulinfo wblock">
            	<?php 
    echo osc_get_preference("usefulinfo_msg", "flatter_theme");
    ?>
            </div>