/**
  * Automatically executed before the widget action. Can be used to set
  * class properties, do authorization checks, and execute other custom code.
  *
  * @return  void
  */
 public function before()
 {
     // get all categories
     if ($this->advanced != FALSE) {
         $this->cat_items = Model_Category::get_as_array();
         $this->cat_order_items = Model_Category::get_multidimensional();
         $this->selected_category = NULL;
         if (core::request('category')) {
             $this->selected_category = core::request('category');
         } elseif (Model_Category::current()->loaded()) {
             $this->selected_category = core::config('general.search_multi_catloc') ? array(Model_Category::current()->seoname) : Model_Category::current()->seoname;
         }
         // get all locations
         $this->loc_items = Model_Location::get_as_array();
         $this->loc_order_items = Model_Location::get_multidimensional();
         $this->selected_location = NULL;
         if (core::request('location')) {
             $this->selected_location = core::request('location');
         } elseif (Model_Location::current()->loaded()) {
             $this->selected_location = core::config('general.search_multi_catloc') ? array(Model_Location::current()->seoname) : Model_Location::current()->seoname;
         }
     }
     if ($this->custom != FALSE) {
         $fields = Model_Field::get_all();
         $this->custom_fields = $fields;
     }
 }
Beispiel #2
0
 public function action_create()
 {
     try {
         if (!Valid::email(core::request('email'))) {
             $this->_error(__('Invalid email'), 501);
         } elseif (!is_numeric(core::request('id_product'))) {
             $this->_error(__('Invalid product'), 501);
         } else {
             $product = new Model_Product(core::request('id_product'));
             if ($product->loaded()) {
                 $user = Model_User::create_email(core::request('email'), core::request('name'));
                 $order = Model_Order::new_order($user, $product);
                 $order->confirm_payment(core::request('paymethod', 'API'), core::request('txn_id'), core::request('pay_date'), core::request('amount'), core::request('currency'), core::request('fee'));
                 //adding the notes
                 $order->notes = core::request('notes');
                 $order->save();
                 $this->rest_output(array('order' => self::get_order_array($order)));
             } else {
                 $this->_error(__('Something went wrong'), 501);
             }
         }
     } catch (Kohana_HTTP_Exception $khe) {
         $this->_error($khe);
     }
 }
Beispiel #3
0
 /**
  * get the affiliate from the query or from the cookie
  * @return Model_Affiliate
  */
 public static function get_affiliate()
 {
     $id_affiliate = core::request('aff', Cookie::get(self::$_cookie_name));
     $affiliate = new Model_User();
     if (Core::config('affiliate.active') == 1 and is_numeric($id_affiliate) and Theme::get('premium') == 1) {
         $affiliate = new Model_User($id_affiliate);
         //the user exists so we set again the cookie, just in case it's a different user or to renew it
         if ($affiliate->loaded()) {
             Cookie::set(self::$_cookie_name, $id_affiliate, time() + 24 * 60 * 60 * Core::config('affiliate.cookie'));
         }
     }
     return $affiliate;
 }
Beispiel #4
0
        function lili_search($item, $key, $cats)
        {
            ?>
                <?php 
            if (count($item) == 0 and $cats[$key]['id_category_parent'] != 1) {
                ?>
                <option value="<?php 
                echo $cats[$key]['seoname'];
                ?>
" data-id="<?php 
                echo $cats[$key]['id'];
                ?>
" <?php 
                echo core::request('category') == $cats[$key]['seoname'] ? "selected" : '';
                ?>
 ><?php 
                echo $cats[$key]['name'];
                ?>
</option>
                
                <?php 
            }
            ?>
                    <?php 
            if ($cats[$key]['id_category_parent'] == 1 or count($item) > 0) {
                ?>
                    <option value="<?php 
                echo $cats[$key]['seoname'];
                ?>
" <?php 
                echo core::request('category') == $cats[$key]['seoname'] ? "selected" : '';
                ?>
> <?php 
                echo $cats[$key]['name'];
                ?>
 </option>
                        <optgroup label="<?php 
                echo $cats[$key]['name'];
                ?>
">  
                        <?php 
                if (is_array($item)) {
                    array_walk($item, 'lili_search', $cats);
                }
                ?>
                        </optgroup>
                    <?php 
            }
            ?>
                <?php 
        }
Beispiel #5
0
 /**
  *
  * Loads a basic list info
  * @param string $view template to render 
  */
 public function action_index($view = NULL)
 {
     $this->template->title = __('Orders');
     $this->template->styles = array('//cdn.jsdelivr.net/bootstrap.datepicker/0.1/css/datepicker.css' => 'screen');
     $this->template->scripts['footer'] = array('//cdn.jsdelivr.net/bootstrap.datepicker/0.1/js/bootstrap-datepicker.js', 'js/oc-panel/crud/index.js', 'js/oc-panel/stats/dashboard.js');
     $orders = new Model_Order();
     $orders = $orders->where('status', '=', Model_Order::STATUS_PAID);
     //filter email
     if (core::request('email') !== NULL) {
         $user = new Model_User();
         $user->where('email', '=', core::request('email'))->limit(1)->find();
         if ($user->loaded()) {
             $orders = $orders->where('id_user', '=', $user->id_user);
         }
     }
     //filter date
     if (!empty(Core::request('from_date')) and !empty(Core::request('to_date'))) {
         //Getting the dates range
         $from_date = Core::request('from_date', strtotime('-1 month'));
         $to_date = Core::request('to_date', time());
         $orders = $orders->where('pay_date', 'between', array($from_date, $to_date));
     }
     //filter coupon
     if (is_numeric(core::request('id_coupon'))) {
         $orders = $orders->where('id_coupon', '=', core::request('id_coupon'));
     }
     //filter product
     if (is_numeric(core::request('id_product'))) {
         $orders = $orders->where('id_product', '=', core::request('id_product'));
     }
     //filter status
     if (is_numeric(core::request('status'))) {
         $orders = $orders->where('status', '=', core::request('status'));
     }
     //order by paid if we are filtering paid....
     if (core::request('status') == Model_Order::STATUS_PAID) {
         $orders->order_by('pay_date', 'desc');
     } else {
         $orders->order_by('id_order', 'desc');
     }
     $items_per_page = core::request('items_per_page', 10);
     $pagination = Pagination::factory(array('view' => 'oc-panel/crud/pagination', 'total_items' => $orders->count_all(), 'items_per_page' => $items_per_page))->route_params(array('controller' => $this->request->controller(), 'action' => $this->request->action()));
     $pagination->title($this->template->title);
     $orders = $orders->limit($items_per_page)->offset($pagination->offset)->find_all();
     $pagination = $pagination->render();
     $products = new Model_Product();
     $products = $products->find_all();
     $this->render('oc-panel/pages/order/index', array('orders' => $orders, 'pagination' => $pagination, 'products' => $products));
 }
Beispiel #6
0
 /**
  * Handle GET requests.
  */
 public function action_get()
 {
     try {
         if (($coupon_name = $this->request->param('id')) != NULL) {
             $coupon = new Model_Coupon();
             $coupon->where('name', '=', $coupon_name)->where('number_coupons', '>', 0)->where('valid_date', '>', Date::unix2mysql())->where('status', '=', 1);
             //filter by product
             if (is_numeric(core::request('id_product'))) {
                 $coupon->where('id_product', '=', core::request('id_product'));
             }
             $coupon = $coupon->limit(1)->find();
             $this->rest_output(array('coupon' => $coupon->loaded() ? $coupon->as_array() : FALSE));
         } else {
             $this->_error('You need to specify a coupon');
         }
     } catch (Kohana_HTTP_Exception $khe) {
         $this->_error($khe);
     }
 }
    function lolo($item, $key, $locs)
    {
        ?>
                                <?php 
        if (core::config('general.search_multi_catloc')) {
            ?>
                                    <option value="<?php 
            echo $locs[$key]['seoname'];
            ?>
" <?php 
            echo (is_array(core::request('location')) and in_array($locs[$key]['seoname'], core::request('location'))) ? "selected" : '';
            ?>
 ><?php 
            echo $locs[$key]['name'];
            ?>
</option>
                                <?php 
        } else {
            ?>
                                    <option value="<?php 
            echo $locs[$key]['seoname'];
            ?>
" <?php 
            echo core::request('location') == $locs[$key]['seoname'] ? "selected" : '';
            ?>
 ><?php 
            echo $locs[$key]['name'];
            ?>
</option>
                                <?php 
        }
        ?>
                                <?php 
        if (count($item) > 0) {
            ?>
                                <optgroup label="<?php 
            echo $locs[$key]['name'];
            ?>
">    
                                    <?php 
            if (is_array($item)) {
                array_walk($item, 'lolo', $locs);
            }
            ?>
                                    </optgroup>
                                <?php 
        }
        ?>
                            <?php 
    }
Beispiel #8
0
 /**
  * verifies pricing in an existing order
  * @return void
  */
 public function check_pricing()
 {
     //update order based on the price and the amount of
     $days = core::get('featured_days');
     if (is_numeric($days) and ($price = Model_Order::get_featured_price($days)) !== FALSE) {
         $this->amount = $price;
         //get price from config
         $this->featured_days = $days;
         $this->save();
     }
     //original coupon so we dont lose it while we do operations
     $orig_coupon = $this->id_coupon;
     //remove the coupon forced by get/post
     if (core::request('coupon_delete') != NULL) {
         $this->id_coupon = NULL;
     } elseif (Model_Coupon::valid($this->id_product) and $this->id_coupon != Model_Coupon::current()->id_coupon) {
         $this->id_coupon = Model_Coupon::current()->id_coupon;
     } elseif ($this->coupon->loaded() and (Date::mysql2unix($this->coupon->valid_date) < time() or $this->coupon->status == 0 or $this->coupon->number_coupons == 0)) {
         Alert::set(Alert::INFO, __('Coupon not valid, expired or already used.'));
         $this->coupon->clear();
         $this->id_coupon = NULL;
     }
     //add new discount
     $new_amount = Model_Coupon::price($this->id_product, $this->original_price());
     //recalculate price since it change the coupon
     if ($orig_coupon != $this->id_coupon or $this->amount != $new_amount) {
         $this->amount = $new_amount;
         try {
             $this->save();
         } catch (Exception $e) {
             throw HTTP_Exception::factory(500, $e->getMessage());
         }
     }
 }
Beispiel #9
0
 /**
  * installs the software
  * @return [type] [description]
  */
 public static function execute()
 {
     $error_msg = '';
     $install = TRUE;
     $TABLE_PREFIX = '';
     ///////////////////////////////////////////////////////
     //check DB connection
     $link = @mysqli_connect(core::request('DB_HOST'), core::request('DB_USER'), core::request('DB_PASS'));
     if (!$link) {
         $error_msg = __('Cannot connect to server') . ' ' . core::request('DB_HOST');
         $install = FALSE;
     }
     if ($link and $install === TRUE) {
         if (core::request('DB_NAME')) {
             //they selected to create the DB
             if (core::request('DB_CREATE')) {
                 @mysqli_query($link, "CREATE DATABASE IF NOT EXISTS `" . core::request('DB_NAME') . "`");
             }
             $dbcheck = @mysqli_select_db($link, core::request('DB_NAME'));
             if (!$dbcheck) {
                 $error_msg .= __('Database name') . ': ' . mysqli_error($link);
                 $install = FALSE;
             }
         } else {
             $error_msg .= '<p>' . __('No database name was given') . '. ' . __('Available databases') . ':</p>';
             $db_list = @mysqli_query($link, 'SHOW DATABASES');
             $error_msg .= '<pre>';
             if (!$db_list) {
                 $error_msg .= __('Invalid query') . ':<br>' . mysqli_error($link);
             } else {
                 while ($row = mysqli_fetch_assoc($db_list)) {
                     $error_msg .= $row['Database'] . '<br>';
                 }
             }
             $error_msg .= '</pre>';
             $install = FALSE;
         }
     }
     //clean prefix
     $TABLE_PREFIX = core::slug(core::request('TABLE_PREFIX'));
     //save DB config/database.php
     if ($install === TRUE) {
         $_POST['TABLE_PREFIX'] = $TABLE_PREFIX;
         $_GET['TABLE_PREFIX'] = $TABLE_PREFIX;
         $search = array('[DB_HOST]', '[DB_USER]', '[DB_PASS]', '[DB_NAME]', '[TABLE_PREFIX]', '[DB_CHARSET]');
         $replace = array(core::request('DB_HOST'), core::request('DB_USER'), core::request('DB_PASS'), core::request('DB_NAME'), $TABLE_PREFIX, core::request('DB_CHARSET'));
         $install = install::replace_file(INSTALLROOT . 'samples/database.php', $search, $replace, APPPATH . 'config/database.php');
         if (!$install === TRUE) {
             $error_msg = __('Problem saving ' . APPPATH . 'config/database.php');
         }
     }
     //install DB
     if ($install === TRUE) {
         //check if has key is posted if not generate
         self::$hash_key = core::request('HASH_KEY') != '' ? core::request('HASH_KEY') : core::generate_password();
         //check if DB was already installed, I use content since is the last table to be created
         $installed = mysqli_num_rows(mysqli_query($link, "SHOW TABLES LIKE '" . $TABLE_PREFIX . "content'")) == 1 ? TRUE : FALSE;
         if ($installed === FALSE) {
             //if was installed do not launch the SQL.
             include INSTALLROOT . 'samples/install.sql' . EXT;
         }
     }
     ///////////////////////////////////////////////////////
     //AUTH config
     if ($install === TRUE) {
         $search = array('[HASH_KEY]', '[COOKIE_SALT]', '[QL_KEY]');
         $replace = array(self::$hash_key, self::$hash_key, self::$hash_key);
         $install = install::replace_file(INSTALLROOT . 'samples/auth.php', $search, $replace, APPPATH . 'config/auth.php');
         if (!$install === TRUE) {
             $error_msg = __('Problem saving ' . APPPATH . 'config/auth.php');
         }
     }
     ///////////////////////////////////////////////////////
     //create robots.txt
     if ($install === TRUE) {
         $search = array('[SITE_URL]', '[SITE_FOLDER]');
         $replace = array(core::request('SITE_URL'), core::request('SITE_FOLDER'));
         $install = install::replace_file(INSTALLROOT . 'samples/robots.txt', $search, $replace, DOCROOT . 'robots.txt');
         if (!$install === TRUE) {
             $error_msg = __('Problem saving ' . DOCROOT . 'robots.txt');
         }
     }
     ///////////////////////////////////////////////////////
     //create htaccess
     if ($install === TRUE) {
         $search = array('[SITE_FOLDER]');
         $replace = array(core::request('SITE_FOLDER'));
         $install = install::replace_file(INSTALLROOT . 'samples/example.htaccess', $search, $replace, DOCROOT . '.htaccess');
         if (!$install === TRUE) {
             $error_msg = __('Problem saving ' . DOCROOT . '.htaccess');
         }
     }
     ///////////////////////////////////////////////////////
     //all good!
     if ($install === TRUE) {
         core::delete(INSTALLROOT . 'install.lock');
         //core::delete(INSTALLROOT);//prevents from performing a new install
     } elseif ($link != FALSE) {
         if ($table_list = mysqli_query($link, "SHOW TABLES LIKE '" . $TABLE_PREFIX . "%'")) {
             while ($row = mysqli_fetch_assoc($table_list)) {
                 mysqli_query($link, "DROP TABLE " . $row[0]);
             }
         }
     }
     self::$error_msg = $error_msg;
     return $install;
 }
Beispiel #10
0
                            <div class="col-sm-12">
                                <?php 
echo FORM::label('latitude', __('Latitude'), array('class' => 'control-label', 'for' => 'latitude'));
?>
                                <?php 
echo FORM::input('latitude', core::request('latitude'), array('placeholder' => __('Longitude'), 'class' => 'form-control', 'id' => 'latitude'));
?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-12">
                                <?php 
echo FORM::label('longitude', __('Longitude'), array('class' => 'control-label', 'for' => 'longitude'));
?>
                                <?php 
echo FORM::input('longitude', core::request('longitude'), array('placeholder' => __('Longitude'), 'class' => 'form-control', 'id' => 'longitude'));
?>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-12">
                                <?php 
echo FORM::button('submit', __('Create'), array('type' => 'submit', 'class' => 'btn btn-primary', 'action' => Route::url('oc-panel', array('controller' => 'location', 'action' => 'create'))));
?>
                            </div>
                        </div>
                    </fieldset>
                <?php 
echo FORM::close();
?>
            </div>
                                        <option value="<?php 
echo $locs[$key]['seoname'];
?>
" <?php 
echo (is_array(core::request('location')) and in_array($locs[$key]['seoname'], core::request('location'))) ? "selected" : '';
?>
 ><?php 
echo $locs[$key]['name'];
?>
</option>
                                    <?else:?>
                                        <option value="<?php 
echo $locs[$key]['seoname'];
?>
" <?php 
echo core::request('location') == $locs[$key]['seoname'] ? "selected" : '';
?>
 ><?php 
echo $locs[$key]['name'];
?>
</option>
                                    <?endif?>
                                    <?if (count($item)>0):?>
                                        <optgroup label="<?php 
echo $locs[$key]['name'];
?>
">    
                                            <? if (is_array($item)) array_walk($item, 'lolo_search', $locs);?>
                                        </optgroup>
                                    <?endif?>
                                <?}
Beispiel #12
0
echo __('Please now erase the folder');
?>
 <code>/install/</code><br>
    
        <a class="btn btn-success btn-large" href="<?php 
echo core::request('SITE_URL');
?>
"><?php 
echo __('Go to Your Website');
?>
</a>
        
        <a class="btn btn-warning btn-large" href="<?php 
echo core::request('SITE_URL');
?>
oc-panel/home/">Admin</a> 
        <?php 
if (core::request('ADMIN_EMAIL')) {
    ?>
            <span class="help-block">user: <?php 
    echo core::request('ADMIN_EMAIL');
    ?>
 pass: <?php 
    echo core::request('ADMIN_PWD');
    ?>
</span>
        <?php 
}
?>
    </p>
</div>
 /**
  * gets data to the view and filters the ads
  * @param  Model_Category $category 
  * @param  Model_Location $location
  * @return array           
  */
 public function list_logic($category = NULL, $location = NULL)
 {
     //user recognition
     $user = Auth::instance()->get_user() == NULL ? NULL : Auth::instance()->get_user();
     $ads = new Model_Ad();
     //filter by category or location
     if ($category !== NULL) {
         $ads->where('id_category', 'in', $category->get_siblings_ids());
     }
     if ($location !== NULL) {
         $ads->where('id_location', 'in', $location->get_siblings_ids());
     }
     //only published ads
     $ads->where('status', '=', Model_Ad::STATUS_PUBLISHED);
     //if ad have passed expiration time dont show
     if (core::config('advertisement.expire_date') > 0) {
         $ads->where(DB::expr('DATE_ADD( published, INTERVAL ' . core::config('advertisement.expire_date') . ' DAY)'), '>', Date::unix2mysql());
     }
     //if sort by distance
     if (core::request('sort') == 'distance' and Model_User::get_userlatlng()) {
         $ads->select(array(DB::expr('degrees(acos(sin(radians(' . $_COOKIE['mylat'] . ')) * sin(radians(`latitude`)) + cos(radians(' . $_COOKIE['mylat'] . ')) * cos(radians(`latitude`)) * cos(radians(abs(' . $_COOKIE['mylng'] . ' - `longitude`))))) * 69.172'), 'distance'))->where('latitude', 'IS NOT', NULL)->where('longitude', 'IS NOT', NULL);
     }
     // featured ads
     $featured = NULL;
     if (Theme::get('listing_slider') == 2) {
         $featured = clone $ads;
         $featured = $featured->where('featured', '>=', Date::unix2mysql())->order_by('featured', 'desc')->limit(Theme::get('num_home_latest_ads', 4))->find_all();
     } elseif (Theme::get('listing_slider') == 3) {
         $featured = clone $ads;
         $featured = $featured->where('featured', '>=', Date::unix2mysql())->order_by(DB::expr('RAND()'))->limit(Theme::get('num_home_latest_ads', 4))->find_all();
     }
     $res_count = clone $ads;
     $res_count = $res_count->count_all();
     // check if there are some advet.-s
     if ($res_count > 0) {
         // pagination module
         $pagination = Pagination::factory(array('view' => 'pagination', 'total_items' => $res_count, 'items_per_page' => core::config('advertisement.advertisements_per_page')))->route_params(array('controller' => $this->request->controller(), 'action' => $this->request->action(), 'category' => $category !== NULL ? $category->seoname : NULL, 'location' => $location !== NULL ? $location->seoname : NULL));
         Breadcrumbs::add(Breadcrumb::factory()->set_title(__("Page ") . $pagination->current_page));
         /**
          * order depending on the sort parameter
          */
         switch (core::request('sort', core::config('advertisement.sort_by'))) {
             //title z->a
             case 'title-asc':
                 $ads->order_by('title', 'asc')->order_by('published', 'desc');
                 break;
                 //title a->z
             //title a->z
             case 'title-desc':
                 $ads->order_by('title', 'desc')->order_by('published', 'desc');
                 break;
                 //cheaper first
             //cheaper first
             case 'price-asc':
                 $ads->order_by('price', 'asc')->order_by('published', 'desc');
                 break;
                 //expensive first
             //expensive first
             case 'price-desc':
                 $ads->order_by('price', 'desc')->order_by('published', 'desc');
                 break;
                 //featured
             //featured
             case 'featured':
                 $ads->order_by('featured', 'desc')->order_by('published', 'desc');
                 break;
                 //rating
             //rating
             case 'rating':
                 $ads->order_by('rate', 'desc')->order_by('published', 'desc');
                 break;
                 //distance
             //distance
             case 'distance':
                 if (Model_User::get_userlatlng()) {
                     $ads->order_by('distance', 'asc')->order_by('published', 'asc');
                 }
                 break;
                 //oldest first
             //oldest first
             case 'published-asc':
                 $ads->order_by('published', 'asc');
                 break;
                 //newest first
             //newest first
             case 'published-desc':
             default:
                 $ads->order_by('published', 'desc');
                 break;
         }
         //we sort all ads with few parameters
         $ads = $ads->limit($pagination->items_per_page)->offset($pagination->offset)->find_all();
     } else {
         // array of categories sorted for view
         return array('ads' => NULL, 'pagination' => NULL, 'user' => $user, 'category' => $category, 'location' => $location, 'featured' => NULL);
     }
     // array of categories sorted for view
     return array('ads' => $ads, 'pagination' => $pagination, 'user' => $user, 'category' => $category, 'location' => $location, 'featured' => $featured);
 }
Beispiel #14
0
                <?php 
        } elseif ($values == 'INPUT') {
            ?>
                    <div class="form-group">
                        <div class="input-group">
                            <input type="text" class="form-control" id="filter__<?php 
            echo $field_name;
            ?>
" name="filter__<?php 
            echo $field_name;
            ?>
" placeholder="<?php 
            echo isset($captions[$field_name]) ? $captions[$field_name]['model'] . ' ' . $captions[$field_name]['caption'] : $field_name;
            ?>
" value="<?php 
            echo core::request('filter__' . $field_name);
            ?>
" >
                        </div>
                    </div>
                <?php 
        }
        ?>
            <?php 
    }
    ?>
            <button type="submit" class="btn btn-primary btn-icon-left"><?php 
    echo __('Filter');
    ?>
</button>
        </form>
Beispiel #15
0
 public function action_listing()
 {
     if (Theme::get('infinite_scroll')) {
         $this->template->scripts['footer'][] = '//cdn.jsdelivr.net/jquery.infinitescroll/2.0b2/jquery.infinitescroll.js';
         $this->template->scripts['footer'][] = 'js/listing.js';
     }
     $this->template->scripts['footer'][] = 'js/sort.js';
     Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Home'))->set_url(Route::url('default')));
     /**
      * we get the model of category from controller to filter and generate urls titles etc...
      */
     $category = NULL;
     $category_parent = NULL;
     if (Model_Category::current()->loaded()) {
         $category = Model_Category::current();
         //adding the category parent
         if ($category->id_category_parent != 1 and $category->parent->loaded()) {
             $category_parent = $category->parent;
         }
     }
     //base title
     if ($category !== NULL) {
         //category image
         if (($icon_src = $category->get_icon()) !== FALSE) {
             Controller::$image = $icon_src;
         }
         $this->template->title = $category->name;
         if ($category->description != '') {
             $this->template->meta_description = $category->description;
         } else {
             $this->template->meta_description = $category->name . ' ' . __('sold in') . ' ' . Core::config('general.site_name');
         }
     } else {
         $this->template->title = __('all');
         $this->template->meta_description = __('List of all products in') . ' ' . Core::config('general.site_name');
     }
     if ($category_parent !== NULL) {
         $this->template->title .= ' (' . $category_parent->name . ')';
         Breadcrumbs::add(Breadcrumb::factory()->set_title($category_parent->name)->set_url(Route::url('list', array('category' => $category_parent->seoname))));
     }
     if ($category !== NULL) {
         Breadcrumbs::add(Breadcrumb::factory()->set_title($category->name)->set_url(Route::url('list', array('category' => $category->seoname))));
     }
     //user recognition
     $user = Auth::instance()->get_user() == NULL ? NULL : Auth::instance()->get_user();
     $products = new Model_Product();
     //filter by category
     if ($category !== NULL) {
         $products->where('id_category', 'in', $category->get_siblings_ids());
     }
     //only published products
     $products->where('status', '=', Model_Product::STATUS_ACTIVE);
     $res_count = $products->count_all();
     // check if there are some advet.-s
     if ($res_count > 0) {
         // pagination module
         $pagination = Pagination::factory(array('view' => 'pagination', 'total_items' => $res_count, 'items_per_page' => core::config('general.products_per_page')))->route_params(array('controller' => $this->request->controller(), 'action' => $this->request->action(), 'category' => $category !== NULL ? $category->seoname : NULL));
         Breadcrumbs::add(Breadcrumb::factory()->set_title(__("Page ") . $pagination->current_page));
         /**
          * order depending on the sort parameter
          */
         switch (core::request('sort', core::config('general.sort_by'))) {
             //title z->a
             case 'title-asc':
                 $products->order_by('title', 'asc')->order_by('created', 'desc');
                 break;
                 //title a->z
             //title a->z
             case 'title-desc':
                 $products->order_by('title', 'desc')->order_by('created', 'desc');
                 break;
                 //cheaper first
             //cheaper first
             case 'price-asc':
                 $products->order_by('price', 'asc')->order_by('created', 'desc');
                 break;
                 //expensive first
             //expensive first
             case 'price-desc':
                 $products->order_by('price', 'desc')->order_by('created', 'desc');
                 break;
                 //featured
             //featured
             case 'featured':
             default:
                 $products->order_by('featured', 'desc')->order_by('created', 'desc');
                 break;
                 //oldest first
             //oldest first
             case 'published-asc':
                 $products->order_by('created', 'asc');
                 break;
                 //newest first
             //newest first
             case 'published-desc':
                 $products->order_by('created', 'desc');
                 break;
         }
         //we sort all products with few parameters
         $products = $products->limit($pagination->items_per_page)->offset($pagination->offset)->find_all();
         // array of categories sorted for view
         $data = array('products' => $products, 'pagination' => $pagination, 'user' => $user, 'category' => $category);
     } else {
         // array of categories sorted for view
         $data = array('products' => NULL, 'pagination' => NULL, 'user' => $user, 'category' => $category);
     }
     $this->template->bind('content', $content);
     $this->template->content = View::factory('pages/product/listing', $data);
 }
Beispiel #16
0
 /**
  * download theme from license key
  * @return [view] 
  */
 public function action_download()
 {
     // save only changed values
     if ($license = core::request('license')) {
         if (($theme = Theme::download($license)) != FALSE) {
             Alert::set(Alert::SUCCESS, __('Theme downloaded') . ' ' . $theme);
             $this->redirect(Route::url('oc-panel', array('controller' => 'theme', 'action' => 'license', 'id' => $theme)) . '?license=' . $license);
         }
     }
     Alert::set(Alert::ALERT, __('Theme could not be downloaded'));
     $this->redirect(Route::url('oc-panel', array('controller' => 'theme', 'action' => 'index')));
 }
Beispiel #17
0
 public function action_advanced_search()
 {
     if (Theme::get('infinite_scroll')) {
         $this->template->scripts['footer'][] = '//cdn.jsdelivr.net/jquery.infinitescroll/2.0b2/jquery.infinitescroll.js';
         $this->template->scripts['footer'][] = 'js/listing.js';
     }
     if (core::config('general.auto_locate') or core::config('advertisement.map')) {
         Theme::$scripts['async_defer'][] = '//maps.google.com/maps/api/js?libraries=geometry,places&v=3&key=' . core::config("advertisement.gm_api_key") . '&callback=initLocationsGMap';
     }
     $this->template->scripts['footer'][] = 'js/jquery.toolbar.js';
     $this->template->scripts['footer'][] = 'js/sort.js';
     //template header
     $this->template->title = __('Advanced Search');
     $this->template->meta_description = __('Search in') . ' ' . core::config('general.site_name');
     //breadcrumbs
     Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Home'))->set_url(Route::url('default')));
     Breadcrumbs::add(Breadcrumb::factory()->set_title($this->template->title));
     $pagination = NULL;
     $ads = NULL;
     $res_count = NULL;
     $user = $this->user ? $this->user : NULL;
     if ($this->request->query()) {
         // variables
         $search_advert = core::get('title');
         $search_loc = core::get('location');
         // filter by each variable
         $ads = new Model_Ad();
         //if sort by distance
         if ((core::request('sort', core::config('advertisement.sort_by')) == 'distance' or core::request('userpos') == 1) and Model_User::get_userlatlng()) {
             $ads->select(array(DB::expr('degrees(acos(sin(radians(' . $_COOKIE['mylat'] . ')) * sin(radians(`latitude`)) + cos(radians(' . $_COOKIE['mylat'] . ')) * cos(radians(`latitude`)) * cos(radians(abs(' . $_COOKIE['mylng'] . ' - `longitude`))))) * 111.321'), 'distance'))->where('latitude', 'IS NOT', NULL)->where('longitude', 'IS NOT', NULL);
         }
         // early filter
         $ads = $ads->where('status', '=', Model_Ad::STATUS_PUBLISHED);
         //if ad have passed expiration time dont show
         if (core::config('advertisement.expire_date') > 0) {
             $ads->where(DB::expr('DATE_ADD( published, INTERVAL ' . core::config('advertisement.expire_date') . ' DAY)'), '>', Date::unix2mysql());
         }
         if (core::request('userpos') == 1 and Model_User::get_userlatlng()) {
             if (is_numeric(Core::cookie('mydistance')) and Core::cookie('mydistance') <= 500) {
                 $location_distance = Core::config('general.measurement') == 'imperial' ? Num::round(Core::cookie('mydistance') * 1.60934) : Core::cookie('mydistance');
             } else {
                 $location_distance = Core::config('general.measurement') == 'imperial' ? Num::round(Core::config('advertisement.auto_locate_distance') * 1.60934) : Core::config('advertisement.auto_locate_distance');
             }
             $ads->where(DB::expr('degrees(acos(sin(radians(' . $_COOKIE['mylat'] . ')) * sin(radians(`latitude`)) + cos(radians(' . $_COOKIE['mylat'] . ')) * cos(radians(`latitude`)) * cos(radians(abs(' . $_COOKIE['mylng'] . ' - `longitude`))))) * 111.321'), '<=', $location_distance);
         }
         if (!empty($search_advert) or core::get('search') !== NULL and strlen(core::get('search')) >= 3) {
             // if user is using search from header
             if (core::get('search')) {
                 $search_advert = core::get('search');
             }
             if (core::config('general.search_by_description') == TRUE) {
                 $ads->where_open()->where('title', 'like', '%' . $search_advert . '%')->or_where('description', 'like', '%' . $search_advert . '%')->where_close();
             } else {
                 $ads->where('title', 'like', '%' . $search_advert . '%');
             }
         }
         //cf filter arrays
         $cf_fields = array();
         $cf_user_fields = array();
         foreach ($this->request->query() as $name => $field) {
             if (isset($field) and $field != NULL) {
                 // get by prefix cf
                 if (strpos($name, 'cf_') !== FALSE and array_key_exists(str_replace('cf_', '', $name), Model_Field::get_all())) {
                     $cf_fields[$name] = $field;
                     //checkbox when selected return string 'on' as a value
                     if ($field == 'on') {
                         $cf_fields[$name] = 1;
                     } elseif (empty($field)) {
                         $cf_fields[$name] = NULL;
                     }
                 } elseif (strpos($name, 'cfuser_') !== FALSE and array_key_exists(str_replace('cfuser_', '', $name), Model_UserField::get_all())) {
                     $name = str_replace('cfuser_', 'cf_', $name);
                     $cf_user_fields[$name] = $field;
                     //checkbox when selected return string 'on' as a value
                     if ($field == 'on') {
                         $cf_user_fields[$name] = 1;
                     } elseif (empty($field)) {
                         $cf_user_fields[$name] = NULL;
                     }
                 }
             }
         }
         $category = NULL;
         $location = NULL;
         if (core::config('general.search_multi_catloc') and Theme::$is_mobile === FALSE) {
             //filter by category
             if (is_array(core::get('category'))) {
                 $cat_siblings_ids = array();
                 foreach (core::get('category') as $cat) {
                     if ($cat !== NULL) {
                         $category = new Model_Category();
                         $category->where('seoname', '=', $cat)->cached()->limit(1)->find();
                         if ($category->loaded()) {
                             $cat_siblings_ids = array_merge($cat_siblings_ids, $category->get_siblings_ids());
                         }
                     }
                 }
                 if (count($cat_siblings_ids) > 0) {
                     $ads->where('id_category', 'IN', $cat_siblings_ids);
                 }
             }
             //filter by location
             if (is_array(core::get('location'))) {
                 $loc_siblings_ids = array();
                 foreach (core::get('location') as $loc) {
                     if ($loc !== NULL) {
                         $location = new Model_location();
                         $location->where('seoname', '=', $loc)->cached()->limit(1)->find();
                         if ($location->loaded()) {
                             $loc_siblings_ids = array_merge($loc_siblings_ids, $location->get_siblings_ids());
                         }
                     }
                 }
                 if (count($loc_siblings_ids) > 0) {
                     $ads->where('id_location', 'IN', $loc_siblings_ids);
                 }
             }
         } else {
             if (core::get('category') !== NULL) {
                 $category = new Model_Category();
                 $category->where('seoname', is_array(core::get('category')) ? 'in' : '=', core::get('category'))->cached()->limit(1)->find();
                 if ($category->loaded()) {
                     $ads->where('id_category', 'IN', $category->get_siblings_ids());
                 }
             }
             $location = NULL;
             //filter by location
             if (core::get('location') !== NULL) {
                 $location = new Model_location();
                 $location->where('seoname', is_array(core::get('location')) ? 'in' : '=', core::get('location'))->cached()->limit(1)->find();
                 if ($location->loaded()) {
                     $ads->where('id_location', 'IN', $location->get_siblings_ids());
                 }
             }
         }
         //filter by price(s)
         if (is_numeric($price_min = str_replace(',', '.', core::get('price-min')))) {
             // handle comma (,) used in some countries for prices
             $price_min = (double) $price_min;
         }
         // round((float)$price_min,2)
         if (is_numeric($price_max = str_replace(',', '.', core::get('price-max')))) {
             // handle comma (,) used in some countries for prices
             $price_max = (double) $price_max;
         }
         // round((float)$price_max,2)
         if (is_numeric($price_min) and is_numeric($price_max)) {
             // swap 2 values
             if ($price_min > $price_max) {
                 $aux = $price_min;
                 $price_min = $price_max;
                 $price_max = $aux;
                 unset($aux);
             }
             $ads->where('price', 'BETWEEN', array($price_min, $price_max));
         } elseif (is_numeric($price_min)) {
             $ads->where('price', '>=', $price_min);
         } elseif (is_numeric($price_max)) {
             $ads->where('price', '<=', $price_max);
         }
         //filter by CF ads
         if (count($cf_fields) > 0) {
             foreach ($cf_fields as $key => $value) {
                 //filter by range
                 if (array_key_exists(str_replace('cf_', '', $key), Model_Field::get_all()) and Model_Field::get_all()[str_replace('cf_', '', $key)]['type'] == 'range') {
                     $cf_min = isset($value[0]) ? $value[0] : NULL;
                     $cf_max = isset($value[1]) ? $value[1] : NULL;
                     if (is_numeric($cf_min = str_replace(',', '.', $cf_min))) {
                         // handle comma (,) used in some countries
                         $cf_min = (double) $cf_min;
                     }
                     if (is_numeric($cf_max = str_replace(',', '.', $cf_max))) {
                         // handle comma (,) used in some countries
                         $cf_max = (double) $cf_max;
                     }
                     if (is_numeric($cf_min) and is_numeric($cf_max)) {
                         // swap 2 values
                         if ($cf_min > $cf_max) {
                             $aux = $cf_min;
                             $cf_min = $cf_max;
                             $cf_max = $aux;
                             unset($aux);
                         }
                         $ads->where($key, 'BETWEEN', array($cf_min, $cf_max));
                     } elseif (is_numeric($cf_min)) {
                         // only min cf has been provided
                         $ads->where($key, '>=', $cf_min);
                     } elseif (is_numeric($cf_max)) {
                         // only max cf has been provided
                         $ads->where($key, '<=', $cf_max);
                     }
                 } elseif (is_numeric($value)) {
                     $ads->where($key, '=', $value);
                 } elseif (is_string($value)) {
                     $ads->where($key, 'like', '%' . $value . '%');
                 } elseif (is_array($value)) {
                     if (!empty($value = array_filter($value))) {
                         $ads->where($key, 'IN', $value);
                     }
                 }
             }
         }
         //filter by user
         if (count($cf_user_fields) > 0) {
             $users = new Model_User();
             foreach ($cf_user_fields as $key => $value) {
                 if (is_numeric($value)) {
                     $users->where($key, '=', $value);
                 } elseif (is_string($value)) {
                     $users->where($key, 'like', '%' . $value . '%');
                 } elseif (is_array($value)) {
                     if (!empty($value = array_filter($value))) {
                         $ads->where($key, 'IN', $value);
                     }
                 }
             }
             $users = $users->find_all();
             if ($users->count() > 0) {
                 $ads->where('id_user', 'in', $users->as_array());
             } else {
                 $ads->where('id_user', '=', 0);
             }
         }
         // count them for pagination
         $res_count = $ads->count_all();
         if ($res_count > 0) {
             // pagination module
             $pagination = Pagination::factory(array('view' => 'pagination', 'total_items' => $res_count, 'items_per_page' => core::config('advertisement.advertisements_per_page')))->route_params(array('controller' => $this->request->controller(), 'action' => $this->request->action(), 'category' => $category !== NULL ? $category->seoname : NULL));
             Breadcrumbs::add(Breadcrumb::factory()->set_title(__("Page ") . $pagination->offset));
             /**
              * order depending on the sort parameter
              */
             switch (core::request('sort', core::config('advertisement.sort_by'))) {
                 //title z->a
                 case 'title-asc':
                     $ads->order_by('title', 'asc')->order_by('published', 'desc');
                     break;
                     //title a->z
                 //title a->z
                 case 'title-desc':
                     $ads->order_by('title', 'desc')->order_by('published', 'desc');
                     break;
                     //cheaper first
                 //cheaper first
                 case 'price-asc':
                     $ads->order_by('price', 'asc')->order_by('published', 'desc');
                     break;
                     //expensive first
                 //expensive first
                 case 'price-desc':
                     $ads->order_by('price', 'desc')->order_by('published', 'desc');
                     break;
                     //featured
                 //featured
                 case 'featured':
                     $ads->order_by('featured', 'desc')->order_by('published', 'desc');
                     break;
                     //rating
                 //rating
                 case 'rating':
                     $ads->order_by('rate', 'desc')->order_by('published', 'desc');
                     break;
                     //favorited
                 //favorited
                 case 'favorited':
                     $ads->order_by('favorited', 'desc')->order_by('published', 'desc');
                     break;
                     //distance
                 //distance
                 case 'distance':
                     if (Model_User::get_userlatlng() and core::config('general.auto_locate')) {
                         $ads->order_by('distance', 'asc')->order_by('published', 'asc');
                     }
                     break;
                     //oldest first
                 //oldest first
                 case 'published-asc':
                     $ads->order_by('published', 'asc');
                     break;
                     //newest first
                 //newest first
                 case 'published-desc':
                 default:
                     $ads->order_by('published', 'desc');
                     break;
             }
             //we sort all ads with few parameters
             $ads = $ads->limit($pagination->items_per_page)->offset($pagination->offset)->find_all();
         } else {
             $ads = NULL;
         }
     }
     $this->template->bind('content', $content);
     $this->template->content = View::factory('pages/ad/advanced_search', array('ads' => $ads, 'categories' => Model_Category::get_as_array(), 'order_categories' => Model_Category::get_multidimensional(), 'locations' => Model_Location::get_as_array(), 'order_locations' => Model_Location::get_multidimensional(), 'pagination' => $pagination, 'user' => $user, 'fields' => Model_Field::get_all(), 'total_ads' => $res_count));
 }
 /**
  * get the coupon from the query or from the sesion or the post in paypal
  * @return Model_Coupon or null if not found
  */
 public static function get_coupon()
 {
     $coupon = new Model_Coupon();
     /**
      * Deletes a coupon in use
      */
     if (core::request('coupon_delete') != NULL) {
         Session::instance()->set('coupon', '');
         Alert::set(Alert::INFO, __('Coupon deleted.'));
     } elseif (core::post('custom') != NULL or core::request('coupon') != NULL or Session::instance()->get('coupon') != '') {
         $slug_coupon = new Model_Coupon();
         $coupon = $slug_coupon->where('name', '=', core::post('custom', core::request('coupon', Session::instance()->get('coupon'))))->where('number_coupons', '>', 0)->where('valid_date', '>', Date::unix2mysql())->where('status', '=', 1)->limit(1)->find();
         if ($coupon->loaded()) {
             //only add it to session if its different than before
             if (Session::instance()->get('coupon') != $coupon->name) {
                 Alert::set(Alert::SUCCESS, __('Coupon added!'));
                 Session::instance()->set('coupon', $coupon->name);
             }
         } else {
             Alert::set(Alert::INFO, __('Coupon not valid, expired or already used.'));
             Session::instance()->set('coupon', '');
         }
     }
     return $coupon;
 }
mysqli_query($link, "INSERT INTO `" . core::request('TABLE_PREFIX') . "content` (`id_content`, `locale`, `order`, `title`, `seotitle`, `description`, `from_email`, `created`, `type`, `status`)\n    VALUES\n(30, 'ro_RO', 0, 'Anunțul dvs. `[AD.NAME]` a fost adăugat cu succes pe [SITE.NAME]!', 'ads-confirm', 'Bun venit, [USER.NAME].\n\nÎți mulțumim pentru adăugarea anunțului dvs. pe [SITE.NAME].\n\nTe rugăm să apeși un click pe acest link [URL.QL], pentru a confirma anunțul.\n\nToate cele bune!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:25:48', 'email', 1),\n(31, 'ro_RO', 0, 'Anunțul dvs. `[AD.NAME]` a fost adăugat pe [SITE.NAME].', 'ads-user-check', 'Bună [USER.NAME],\n\nAnunțul a fost adăugat în contul dvs. [USER.NAME]. Puteți vizita acest link pentru vizualizarea anunțului [URL.AD].\n\nDacă nu sunteți răspunzător pentru adăugarea acestui anunț, vă rugăm să ne contactați, folosind link-ul următor: [URL.CONTACT].', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:27:46', 'email', 1),\n(32, 'ro_RO', 0, 'Anunțul dvs. `[AD.NAME]` a fost adăugat cu succes pe [SITE.NAME]!', 'ads-notify', 'Bună [USER.NAME],\n\nVă mulțumim că folosii serviciul nostru de anunțuri, [SITE.NAME]\n\nPuteți edita anunțul dvs. aici: [URL.QL].\n\nAnunțul dvs. nu este publicat momentan, deoarece este necesară validarea lui de către un administrator. \nNe cerem scuze pentru eventualele neplăceri. Vom încerca să-l revizuim cât mai repede posibil.\n\nCu stimă.', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:30:59', 'email', 1),\n(33, 'ro_RO', 0, '[EMAIL.SENDER] dorește să ia legătura cu dvs.', 'contact-admin', 'Salut Admin,\n\n[EMAIL.SENDER]: [EMAIL.FROM], are un mesaj pentru tine:\n\n[EMAIL.BODY]\n\nCu stimă.', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:32:57', 'email', 1),\n(34, 'ro_RO', 0, 'Anunțul dvs. pe [SITE.NAME] a fost activat!', 'ads-activated', 'Salutări [USER.OWNER],\n\nDorim să vă informăm că anunțul dvs. [URL.QL] a fost activat.\nAcum, el poate fi vizualizat de către toată lumea.\n\nSperăm că nu v-am făcut să așteptați prea mult timp.\n\nCu stimă.', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:35:35', 'email', 1),\n(36, 'ro_RO', 0, 'Bună [USER.NAME]!', 'user-contact', 'Ați fost contactat referitor la anunțul dvs. \n\nUtilizatorul [EMAIL.SENDER] [EMAIL.FROM], are un mesaj pentru dvs.:\n[EMAIL.BODY].\n\nCu stimă.', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:40:46', 'email', 1),\n(37, 'ro_RO', 0, 'Modificare parolă [SITE.NAME]', 'auth-remember', 'Salutare [USER.NAME],\n\nVizitează acest link: [URL.QL] \n\nMulțumim!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:41:59', 'email', 1),\n(38, 'ro_RO', 0, 'Bun venit pe [SITE.NAME]!', 'auth-register', 'Bun venit [USER.NAME],\n\nNe bucurăm că v-ați decis să vă alăturați echipei și serviciilor noastre! [URL.QL]\n\nIată detaliile contului dvs.:\nE-mail: [USER.EMAIL]\nParolă: [USER.PWD]\n\nDe acum, vă puteți autentifica folosind aceste date. (parola generată automat nu mai este valabilă).\n\nCu stimă!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:44:44', 'email', 1),\n\n(39, 'pl_PL', 0, 'Sukces! Twoje ogłoszenie `[AD.NAME]` zostało utworzone na [SITE.NAME]!', 'ads-confirm', 'Witaj [USER.NAME],\n\nDziękujemy za zamieszczenie ogłoszenia na [SITE.NAME]!\n\nKliknij na ten link [URL.QL] aby je zatwierdzić.\n\nMiłego dnia!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:49:48', 'email', 1),\n(40, 'pl_PL', 0, 'Ogłoszenie utworzone na [SITE.NAME]!', 'ads-user-check', 'Witaj [USER.NAME],\n\nOgłoszenie zostało utworzone na Twoim koncie [USER.NAME]! Odwiedź ten link, aby zobaczyć ogłoszenie [URL.AD].\n\nJeśli to nie Ty utworzyłeś to ogłoszenie, kliknij na link, aby się z nami skontaktować [URL.CONTACT].', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:51:48', 'email', 1),\n(41, 'pl_PL', 0, 'Sukces! Twoje ogłoszenie `[AD.NAME]` zostało utworzone na [SITE.NAME]!', 'ads-notify', 'Witaj [USER.NAME],\n\nDziękujemy za zamieszczenie ogłoszenia na [SITE.NAME]!\n\nMożesz edytować swoje ogłoszenie tutaj [URL.QL].\n\nTwoje ogłoszenie jest wciąż nieopublikowane, najpierw musi być zatwierdzone przez administratora.\nPrzepraszamy za wszelkie niedogodności. Ogłoszenie zostanie zatwierdzone najszybciej jak to tylko możliwe.\n\nPozdrowienia!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:53:51', 'email', 1),\n(42, 'pl_PL', 0, '[EMAIL.SENDER] chce się z Tobą skontaktować!', 'contact-admin', 'Drogi administratorze,\n\n[EMAIL.SENDER]: [EMAIL.FROM], ma dla Ciebie wiadomość:\n\n[EMAIL.BODY] \n\nPozdrowienia!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:55:08', 'email', 1),\n(43, 'pl_PL', 0, 'Twoje ogłoszenie na [SITE.NAME] zostało aktywowane!', 'ads-activated', 'Witaj [USER.OWNER],\n\nInformujemy, że Twoje ogłoszenie [URL.QL] zostało aktywowane! Teraz może być widziane przez innych.\n\nMamy nadzieję, że nie musiałeś czekać długo.\n\nPozdrowienia!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 10:56:23', 'email', 1),\n(45, 'pl_PL', 0, 'Witaj [USER.NAME]!', 'user-contact', 'Dostałeś/aś wiadomość związaną z Twoim ogłoszeniem. \n\nUżytkownik [EMAIL.SENDER] [EMAIL.FROM] ma dla Ciebie wiadomość:\n\n[EMAIL.BODY]. \n\nMiłego dnia!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 11:00:12', 'email', 1),\n(46, 'pl_PL', 0, 'Zmień hasło [SITE.NAME]', 'auth-remember', 'Witaj [USER.NAME],\n\nKliknij na ten link [URL.QL]\n\nDziękujemy!!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 11:00:51', 'email', 1),\n(47, 'pl_PL', 0, 'Witamy na [SITE.NAME]!', 'auth-register', 'Witamy na [SITE.NAME].\n\nBardzo się cieszymy, że do nas dołączyłeś.\n\nZapamiętaj swoje dane logowania:\nEmail: [USER.EMAIL]\nHasło: [USER.PWD]\n\nNie posiadamy już Twojego poprzedniego hasła.\n\nPozdrowienia!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-29 11:03:08', 'email', 1),\n\n(48, 'ru_RU', 0, 'Готово! Ваше объявление `[AD.NAME]` размещено на [SITE.NAME]', 'ads-confirm', 'Здравствуйте,  [USER.NAME],\n\nБлагодарим за публикацию объявления на  [SITE.NAME]! \n\nДля подтверждения пройдите по ссылке [URL.QL].\n\nВсего доброго!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:08:43', 'email', 1),\n(49, 'ru_RU', 0, 'Объявление опубликовано на  [SITE.NAME]!', 'ads-user-check', 'Здравствуйте, [USER.NAME],\n\nВ вашем аккаунте [USER.NAME] создано новое объявление! Посмотреть его вы можете, пройдя по ссылке [URL.AD]\n\nЕсли вы не создавали никакого объявления, сообщите нам, пройдя по этой ссылке [URL.CONTACT].', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:10:30', 'email', 1),\n(50, 'ru_RU', 0, 'Поздравляем! Ваше объявление опубликовано на [SITE.NAME]!', 'ads-notify', 'Здравствуйте, [USER.NAME],\n\nБлагодарим за публикацию объявления на  [SITE.NAME]! \n\nРедактировать объявление вы можете здесь [URL.QL].\n\nВаше объявление будет опубликовано после проверки администратором. \nПриносим свои извинения за неудобства. Постараемся исправить как можно быстрее. \n\nВсего доброго!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:11:50', 'email', 1),\n(51, 'ru_RU', 0, '[EMAIL.SENDER] прислал сообщение!', 'contact-admin', 'Здравствуйте, Администратор!\n\n[EMAIL.SENDER]: [EMAIL.FROM], прислал для вас сообщение:\n\n[EMAIL.BODY]', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:12:56', 'email', 1),\n(52, 'ru_RU', 0, 'Ваше объявление на  [SITE.NAME] опубликовано!', 'ads-activated', 'Здравствуйте, [USER.OWNER],\n\nСообщаем вам, что объявление на [URL.QL] опубликовано! Теперь его смогут увидеть другие. \n\nНадеемся, мы не заставили вас ждать слишком долго.\n\nУдачи!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:14:20', 'email', 1),\n(54, 'ru_RU', 0, 'Здравствуйте, [USER.NAME]!', 'user-contact', 'Это сообщение касается вашего объявления. \n\nПользователь [EMAIL.SENDER] [EMAIL.FROM] прислал сообщение: \n\n[EMAIL.BODY]. \n\nУдачи!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:16:48', 'email', 1),\n(55, 'ru_RU', 0, 'Изменить пароль на  [SITE.NAME]', 'auth-remember', 'Здравствуйте, [USER.NAME]!\n\nПройдите по этой сылке  [URL.QL]\n\nСпасибо!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:17:41', 'email', 1),\n(56, 'ru_RU', 0, 'Добро пожаловать на  [SITE.NAME]!', 'auth-register', 'Добро пожаловать, [USER.NAME],\n\nРады, что вы к нам присоединились на [URL.QL]\n\nЗапомните ваши данные для входа:\nEmail: [USER.EMAIL]\nПароль: [USER.PWD]\n\nМы не сохраяем ваш первоначальный пароль.\n\nУдачи!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:18:35', 'email', 1),\n\n(57, 'cs_CZ', 0, 'Úspěch! Váš inzerát `[AD.NAME]` byl vytvořen na [SITE.NAME]!', 'ads-confirm', 'Vítejte [USER.NAME],\n\nDěkujeme za vytvoření inzerátu na [SITE.NAME]! \n\nPro potvrzení prosím klikněte na tento link  [URL.QL]\n\nPřejeme příjemný zbytek dne!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:22:12', 'email', 1),\n(58, 'cs_CZ', 0, 'Inzerát je vytvořen na [SITE.NAME]!', 'ads-user-check', 'Dobrý den  [USER.NAME],\n\nInzerát byl vytvořen pod Vaším účtem [USER.NAME]!  Pro prohlédnutí inzerátu můžete kliknout na tento link  [URL.AD]\n\nPokud jste inzerát nevytvořili Vy, prosím kontaktujte nás na [URL.CONTACT].', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:23:07', 'email', 1),\n(59, 'cs_CZ', 0, 'Úspěch! Váš inzerát `[AD.NAME]` byl vytvořen na [SITE.NAME]!', 'ads-notify', 'Dobrý den  [USER.NAME],\n\nDěkujeme za zveřejnění inzerátu na [SITE.NAME]! \n\nVáš inzerát můžete upravit zde  [URL.QL].\n\nVáš inzerát ještě není zveřejněn, potřebuje být schválen administrátorem.\nOmlouváme se za nepříjemností. Shlédneme ho, co nejdříve to bude možné.\n\nPřejeme příjemný zbytek dne!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:24:31', 'email', 1),\n(60, 'cs_CZ', 0, '[EMAIL.SENDER] Vás chce kontaktovat!', 'contact-admin', 'Dobrý den Admine,\n\n[EMAIL.SENDER]: [EMAIL.FROM], má pro Vás zprávu:\n\n[EMAIL.BODY] \n\nPřejeme příjemný zbytek dne!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:26:28', 'email', 1),\n(61, 'cs_CZ', 0, 'Váš inzerát na [SITE.NAME] byl aktivován!', 'ads-activated', 'Dobrý den [USER.OWNER],\n\nChceme Vás informovat, že Váš inzerát [URL.QL]  byl aktivován!\nNyní si ho mohou prohlížet ostatní.\n\nDoufáme, že jste nečekali dlouho.\n\nPřejeme příjemný zbytek dne!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:27:36', 'email', 1),\n(63, 'cs_CZ', 0, 'Dobrý den [USER.NAME]!', 'user-contact', 'Byli jste kontaktování ohledně Vašeho inzerátu, uživatelem [EMAIL.SENDER] \n\n[EMAIL.FROM], má pro Vás tuto zprávu:\n\n[EMAIL.BODY]. \n\nPřejeme příjemný zbytek dne!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:30:08', 'email', 1),\n(64, 'cs_CZ', 0, 'Změna hesla [SITE.NAME]', 'auth-remember', 'Dobrý den [USER.NAME],\n\nKlikněte na tento link  [URL.QL]\n\nDěkujeme!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:31:01', 'email', 1),\n(65, 'cs_CZ', 0, 'Vítejte na [SITE.NAME]!', 'auth-register', 'Vítejte [USER.NAME],\n\nJsme rádi, že jste se k nám připojili! [URL.QL]\n\nZapamatujte si Vaše přihlašovací údaje:\nEmail: [USER.EMAIL]\nHeslo: [USER.PWD]\n\nJiž nemáme Vaše původní heslo.\n\nPřejeme příjemný zbytek dne!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:32:10', 'email', 1),\n\n(75, 'da_DK', 0, 'Din annonce `[AD.NAME]` blev oprettet på [SITE.NAME]!', 'ads-confirm', 'Velkommen [USER.NAME],\n\nTak for din annonce på [SITE.NAME]!\n\nFølge dette link for at bekræfte annoncen.\n\nMed venlig hilsen', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:55:52', 'email', 1),\n(76, 'da_DK', 0, 'Annonce oprettet på [SITE.NAME]!', 'ads-user-check', 'Hej [USER.NAME],\n\nAnnoncen er oprettet under din profil [USER.NAME]! Du kan følge dette link for at se din annonce: [URL.AD]\n\nHvis det ikke er dig der har oprettet denne annonce, så kontakt os her: [URL.CONTACT].', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:56:56', 'email', 1),\n(77, 'da_DK', 0, 'Din annonce `[AD.NAME]` blev oprettet på [SITE.NAME]!', 'ads-notify', 'Hej [USER.NAME],\n\nTak for din annonce på [SITE.NAME]! \n\nDu kan redigere din annonce her [URL.QL].\n\nDin annonce er endnu ikke udgivet, da den skal valideres af en administrator. \n\nVi validerer annoncer så hurtigt vi kan, og undskylder på forhånd for ventetiden.\n\nMed venlig hilsen', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:58:35', 'email', 1),\n(78, 'da_DK', 0, '[EMAIL.SENDER] vil gerne i kontakt med dig', 'contact-admin', 'Hej Admin,\n\n[EMAIL.SENDER]: [EMAIL.FROM], har skrevet en besked til dig:\n\n[EMAIL.BODY] \n\nMed venlig hilsen', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 08:59:54', 'email', 1),\n(79, 'da_DK', 0, 'Din annonce på [SITE.NAME] er blevet aktiveret!', 'ads-activated', 'Hej [USER.OWNER],\n\nDin annonce [URL.QL] er blevet aktiveret,\nden er nu synlig for alle!\n\nHeld og lykke med annoncen.\n\nMed venlig hilsen', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 09:01:26', 'email', 1),\n(81, 'da_DK', 0, 'Hej [USER.NAME]!', 'user-contact', 'Der er et svar til din annonce. \nBrugeren [EMAIL.SENDER] [EMAIL.FROM], har skrevet følgende besked til dig:\n\n[EMAIL.BODY]. \n\nMed venlig hilsen', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 09:04:57', 'email', 1),\n(82, 'da_DK', 0, 'Ændring af adgangskode på [SITE.NAME]', 'auth-remember', 'Hej [USER.NAME],\n\nFølg dette link: [URL.QL]\n\nTak!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 09:07:13', 'email', 1),\n(83, 'da_DK', 0, 'Velkommen til [SITE.NAME]!', 'auth-register', 'Velkommen [USER.NAME],\n\nVi er glade for du vil være med! [URL.QL]\n\nHusk venligst dine log ind oplysninger:\nEmail: [USER.EMAIL]\nAdgangskode: [USER.PWD]\n\nDin oprindelige adgangskode er ikke længere gyldig.\n\nMed venlig hilsen', '" . core::request('ADMIN_EMAIL') . "', '2013-07-30 09:08:14', 'email', 1),\n\n(84, 'no_NO', 0, 'Vellykket! Din annonse `[AD.NAME]` er opprettet på [SITE.NAME]!', 'ads-confirm', 'Velkommen [USER.NAME],\n\nTakk for at du la inn annonnse på [SITE.NAME]! \n\nVennligst klikk på denne lenken [URL.QL] for å godkjenne den.\n\nHilsen!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-31 11:22:01', 'email', 1),\n(85, 'no_NO', 0, 'Annonse er opprettet på [SITE.NAME]!', 'ads-user-check', 'Hallo [USER.NAME],\n\nAnnonse er opprettet for din bruker [USER.NAME]! Du kan klikke på denne lenken for å se annonsen [URL.AD]\n\nHvis du ikke har opprettet denne annonse, klikk på lenken for å kontakte oss [URL.CONTACT].', '" . core::request('ADMIN_EMAIL') . "', '2013-07-31 11:22:55', 'email', 1),\n(86, 'no_NO', 0, 'Vellykket! Din annonse `[AD.NAME]` er opprettet på [SITE.NAME]!', 'ads-notify', 'Hallo [USER.NAME],\n\nTakk for at du la inn annonnse på [SITE.NAME]! \nDu kan editere annonsen her [URL.QL].\n\nDin annonse er fremdeles ikke publisert, den må godkjennes av en administrator. \n\nVi beklager ubeleiligheten. Vi vill se på det så snarest mulig.\n\nHilsen!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-31 11:31:47', 'email', 1),\n(87, 'no_NO', 0, '[EMAIL.SENDER] ønsker å kontakte deg!', 'contact-admin', 'Hallo Admin,\n\n[EMAIL.SENDER]: [EMAIL.FROM], har en melding til deg:\n\n[EMAIL.BODY] \n\nHilsen!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-31 11:32:36', 'email', 1),\n(88, 'no_NO', 0, 'Din annonse påt [SITE.NAME], har blitt aktivert!', 'ads-activated', 'Hallo [USER.OWNER],\n\nVi vil informere deg om at din annonse [URL.QL] har blitt aktivert!\nDen kan nå ses av andre. \n\nVi håper du ikke måtte vente for lenge. \n\nHilsen!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-31 11:33:29', 'email', 1),\n(90, 'no_NO', 0, 'Hallo [USER.NAME]!', 'user-contact', 'Du har blitt kontaktet angående din annonse. \nBruker [EMAIL.SENDER] [EMAIL.FROM], har en beskjed til deg: \n[EMAIL.BODY]. \n\nHilsen!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-31 11:35:54', 'email', 1),\n(91, 'no_NO', 0, 'Endre passord [SITE.NAME]', 'auth-remember', 'Hallo [USER.NAME],\n\nKlikk på denne lenken  [URL.QL]\n\nTakk!!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-31 11:37:12', 'email', 1),\n(92, 'no_NO', 0, 'Velkommen to [SITE.NAME]!', 'auth-register', 'Velkommen [USER.NAME],\n\nVi setter pris på at du har registrert deg! [URL.QL]\n\nHusk din brukerinformasjon:\nE-post: [USER.EMAIL]\nPassword: [USER.PWD]\n\nVi har ikke ditt opprinnelige passord lenger.\n\nHilsen!', '" . core::request('ADMIN_EMAIL') . "', '2013-07-31 11:38:06', 'email', 1),\n\n(93, 'ca_ES', 0, 'Èxit! El vostre anunci `[AD.NAME]` és creat damunt [SITE.NAME]!', 'ads-confirm', 'Benvingut [USER.NAME],\n\nGràcies Per crear un anunci a [SITE.NAME]! \n\nSi us plau clic en aquest enllaç [URL.QL] per confirmar-lo.\n\nConsideracions,', '" . core::request('ADMIN_EMAIL') . "', '2013-07-31 11:46:03', 'email', 1),\n(94, 'ca_ES', 0, 'El vostre anunci és creat damunt [SITE.NAME]!', 'ads-user-check', 'Hola [USER.NAME],\n\nL''anunci és creat sota el vostre compte [USER.NAME]! Pots visitar aquest enllaç per veure anunci [URL.AD].\n\nSi no ets responsable per crear aquest anunci, clic un enllaç per contactar-nos [URL.CONTACT].', '" . core::request('ADMIN_EMAIL') . "', '2013-07-31 11:55:59', 'email', 1),\n(95, 'ca_ES', 0, 'Èxit! El vostre anunci `[AD.NAME]` és creat damunt [SITE.NAME]!', 'ads-notify', 'Hola [USER.NAME],\n\nGràcies Per crear un anunci a [SITE.NAME]! \nEt Pot editar el vostre anunci aquí [URL.QL].\n\nEl vostre anunci és encara no publicat, necessita ser validat per un administrador. \nEns sap greu per qualsevol inconveniència. El revisarem al més aviat possible. \n\nConsideracions!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 09:29:57', 'email', 1),\n(96, 'ca_ES', 0, '[EMAIL.SENDER] vol contactarte!', 'contact-admin', 'Hola Admin,\n\n[EMAIL.SENDER]: [EMAIL.FROM], té un missatge per tu:\n\n[EMAIL.BODY]\n\nConsideracions!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 11:17:04', 'email', 1),\n(97, 'ca_ES', 0, 'El vostre anunci a [SITE.NAME] ha estat activat!', 'ads-activated', 'Hola [USER.OWNER],\n\nEt volem informar que el vostre anunci [URL.QL] ha estat activat! Ara pugui ser vist per altres. \nEsperem no vam fer esperes per llarg. \n\nConsideracions!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 11:18:05', 'email', 1),\n(99, 'ca_ES', 0, 'Hola [USER.NAME]!', 'user-contact', 'T''Ha estat contactat pel que fa al vostre anunci. Usuari [EMAIL.SENDER] [EMAIL.FROM], té un missatge per tu: \n[EMAIL.BODY]\n\nConsideracions!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 09:47:07', 'email', 1),\n(100, 'ca_ES', 0, 'Canvi contrasenya [SITE.NAME]', 'auth-remember', 'Hola [USER.NAME],\n\nSeguir aquest enllaç [URL.QL]\n\nGràcies!!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 09:48:18', 'email', 1),\n(101, 'ca_ES', 0, 'Benvingut a [SITE.NAME]!', 'auth-register', 'Benvinguda [USER.NAME],\n\nSom realment feliços que te''ns ha unit! [URL.QL]\n\nRecordar els vostres detalls d''usuari:\nCorreu electrònic: [USER.EMAIL]\nContrasenya: [USER.PWD]\nNo tenim la vostra contrasenya original més.\n\nConsideracions!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 09:49:40', 'email', 1),\n\n(102, 'in_ID', 0, 'Berhasil! Iklan anda `[AD.NAME]` telah dibuat [SITE.NAME]!', 'ads-confirm', 'Selamat datang [USER.NAME],\n\nTerima kasih telah membuat iklan di [SITE.NAME]! \n\nSilahkan Klik link ini [URL.QL] untuk konfirmasi.\n\nRegard!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:04:14', 'email', 1),\n(103, 'in_ID', 0, 'Iklan telah dibuat [SITE.NAME]!', 'ads-user-check', 'Halo [USER.NAME],\n\nIklananda telah dibuat dibawah email [USER.NAME]! Anda dapat mengunjungi tutan ini untuk melihat iklan [URL.AD]\n\nJika anda tidak bertanggung jawab membuat iklan ini, klik tautan untuk hubungi kami [URL.CONTACT].', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:05:30', 'email', 1),\n(104, 'in_ID', 0, 'Berhasil! Iklan anda `[AD.NAME]` telah dibuat [SITE.NAME]!', 'ads-notify', 'Halo [USER.NAME],\n\nTerima kasih telah membuat iklan di [SITE.NAME]! \n\nAnda dapar mengedit iklan anda disini [URL.QL].\n\nIklan ada masih belum dipublikasi, harus disahkan oleh administrator.\nKami meminta maaf atas gangguan ini. Kami akan mengadakan peninjauan segera.\n\nRegard!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:07:03', 'email', 1),\n(105, 'in_ID', 0, '[EMAIL.SENDER] ingin menghubungi Anda!', 'contact-admin', 'Halo Admin,\n\n[EMAIL.SENDER]: [EMAIL.FROM], Mempunyai pesan untuk anda:\n[EMAIL.BODY] \n\nRegard!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:07:54', 'email', 1),\n(106, 'in_ID', 0, 'Iklan ada pada situs [SITE.NAME] telah diaktifan!', 'ads-activated', 'Halo [USER.OWNER],\n\nKami akan menginformasikan bahwa iklan anda [URL.QL] telah diaktifkan!\nSekarang dapat terlihat oleh yang lain.\n\nKami harap tidak membuat anda menunggu lama.\n\nRegard!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:09:34', 'email', 1),\n(108, 'in_ID', 0, 'Halo [USER.NAME]!', 'user-contact', 'Anda telah dihubungi mengenai iklan Anda. Pengguna [EMAIL.SENDER] [EMAIL.FROM], mempunyai pesan untuk anda: \n[EMAIL.BODY]. \n\nRegard!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:12:05', 'email', 1),\n(109, 'in_ID', 0, 'Ubah kata sandi [SITE.NAME]', 'auth-remember', 'Halo [USER.NAME],\n\nIkutitautan ini [URL.QL]\n\nTerima kasih!!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:13:28', 'email', 1),\n(110, 'in_ID', 0, 'Selamat datang di [SITE.NAME]!', 'auth-register', 'Selamat datang [USER.NAME],\n\nKami sangat senang karena anda telah bergabung dengan kami! [URL.QL]\n\nMengingat rincian pengguna Anda:\nEmail: [USER.EMAIL]\nKata sandi: [USER.PWD]\n\nKami tidak mempunyai kata sandi anda yang asli lagi.\n\nRegard!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:14:44', 'email', 1),\n\n(111, 'sk_SK', 0, 'Blahoželáme! Váš inzerát `[AD.NAME]` je vytvorený na [SITE.NAME]!', 'ads-confirm', 'Vitajte [USER.NAME],\n\nĎakujeme za pridanie inzerátu na [SITE.NAME]!\n\nProsím kliknite na nasledujúci odkaz [URL.QL] pre potvrdenie.\n\nS pozdravom!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:19:56', 'email', 1),\n(112, 'sk_SK', 0, 'Inzerát je vytvorený na [SITE.NAME]!', 'ads-user-check', 'Dobrý deň [USER.NAME],\n\n Inzerát bol vytvorený pod Vaším účtom [USER.NAME]! Pre zobrazenie inzerátu môžete navštíviť túto stránku [URL.AD]\n\nAk ste nevytvorili tento inzerát, kliknite na nasledujúci link aby ste nás kontaktovali  [URL.CONTACT].', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:21:41', 'email', 1),\n(113, 'sk_SK', 0, 'Blahoželáme! Váš inzerát `[AD.NAME]` je vytvorený na [SITE.NAME]!', 'ads-notify', 'Dobrý deň  [USER.NAME],\n\nĎakujeme za zadanie inzerátu na stránke [SITE.NAME]! \nVáš inzerát môžete upraviť tu [URL.QL].\n\nVáš inzerát ešte nie je zverenený, musí ho schváliť administrátor.\nOspravedlňujeme sa za nepríjemnosť. Budeme sa tomu venovať hneď ako to bude možné.\n\nS pozdravom!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:23:18', 'email', 1),\n(114, 'sk_SK', 0, '[EMAIL.SENDER] má pre Vás správu', 'contact-admin', 'Dobrý deň Admin,\n\n[EMAIL.SENDER]: [EMAIL.FROM], má pre Vás správu:\n\nS pozdravom!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:27:37', 'email', 1),\n(115, 'sk_SK', 0, 'Váš inzerát na [SITE.NAME] bol aktivovaný!', 'ads-activated', 'Dobrý deň [USER.OWNER],\n\nOznamujeme Vám, že Váš inzerát [URL.QL] aktivovaný!\nTeraz to môžu vidieť aj ostatní.\n\nDúfame, že sme Vás nenechali čakať dlho.\n\nS pozdravom !', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:28:44', 'email', 1),\n(117, 'sk_SK', 0, 'Dobrý deň [USER.NAME]!', 'user-contact', 'Boli ste kontaktovaní vzhľadom na Váš inzerát. \n\nUžívateľ [EMAIL.SENDER] [EMAIL.FROM], má pre Vás správu: \n\n[EMAIL.BODY]. \n\nS pozdravom!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:32:17', 'email', 1),\n(118, 'sk_SK', 0, 'Zmena hesla [SITE.NAME]', 'auth-remember', 'Dobrý deň  [USER.NAME],\n\nNásledujte tento odkaz [URL.QL]\n\nĎakujeme!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:34:08', 'email', 1),\n(119, 'sk_SK', 0, 'Vitajte na [SITE.NAME]!', 'auth-register', 'Vitajte [USER.NAME],\n\nNaozaj nás teší, že ste sa k nám pripojili! [URL.QL]\nUchovajte si Vaše údaje:\nEmail: [USER.EMAIL]\nHeslo: [USER.PWD]\nUž nemáme vaše pôvodné heslo.\n\nĎakujeme!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 10:35:50', 'email', 1),\n\n(120, 'ml_IN', 0, '[SITE.NAME] - ല്‍ താങ്കളുടെ `[AD.NAME]` പരസ്യം സ്വീകരിക്കപ്പെട്ടിരിക്കുന്നു.  അഭിനന്ദനങ്ങള്‍!', 'ads-confirm', 'സ്വാഗതം [USER.NAME],\n\n[SITE.NAME] - ല്‍ ഒരു പരസ്യം പ്രസിദ്ധീകരിക്കുവാന്‍ മുമ്പോട്ടുവന്നതില്‍ താങ്കളോട്‌ നന്ദി അറിയിക്കുന്നു.\n\nദയവായി അത്‌ ഉറപ്പാക്കുവാന്‍ ഈ ലിങ്കില്‍ ക്ലിക്ക് ചെയ്യുക [URL.QL] \n\nഅന്യേഷണങ്ങള്‍ അറിയിക്കുന്നു !', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 11:21:25', 'email', 1),\n(121, 'ml_IN', 0, '[SITE.NAME] - ല്‍  പരസ്യം സ്വീകരിക്കപ്പെട്ടിരിക്കുന്നു!', 'ads-user-check', 'ഹെല്ലോ [USER.NAME],\n\nപ്രിയ [USER.NAME], താങ്കളുടെ അക്കൗണ്ടില്‍ ഈ പരസ്യം ഞങ്ങള്‍ സ്വീകരിച്ചിരിക്കുന്നു. താങ്കളുടെ പരസ്യം കാണുവാന്‍ ഈ ലിങ്കില്‍ ക്ലിക്ക് ചെയ്യുക [URL.AD]\n\nഈ പരസ്യം താങ്കള്‍ തന്നിരിക്കുന്നതല്ല എങ്കില്‍, ദയവായി ഈ ലിങ്കില്‍ ക്ലിക്ക് ചെയ്ത്‌ ഞങ്ങളെ വിവരമറിയിക്കുക [URL.CONTACT].', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 11:23:21', 'email', 1),\n(122, 'ml_IN', 0, '[SITE.NAME] - ല്‍ താങ്കളുടെ `[AD.NAME]` പരസ്യം സ്വീകരിക്കപ്പെട്ടിരിക്കുന്നു.  അഭിനന്ദനങ്ങള്‍!', 'ads-notify', 'ഹെല്ലോ [USER.NAME],\n\n[SITE.NAME] - ല്‍ ഒരു പരസ്യം പ്രസിദ്ധീകരിക്കുവാന്‍ മുമ്പോട്ടുവന്നതില്‍ താങ്കളോട്‌ നന്ദി അറിയിക്കുന്നു.\n\nതാങ്കളുടെ പരസ്യത്തില്‍ ഏതെങ്കിലും മാറ്റം വരുത്തുവാന്‍ ഉണ്ടെങ്കില്‍ ഈ ലിങ്ക് ഉപയോഗിക്കുക [URL.QL].\n\nതാങ്കളുടെ പരസ്യം ഇപ്പോഴും പ്രസിദ്ധീകരിക്കപ്പെട്ടില്ല. അത് അഡ്മിനിസ്ട്രേട്ടരുടെ വിലയിരുത്തലിനുകൂടി വിധേയമാവേണ്ടതുണ്ട്.\nതാങ്കള്‍ക്കുണ്ടായ അസൌകര്യങ്ങള്‍ക്ക് ക്ഷമാപണം നടത്തുന്നു.ഏറ്റവും വേഗത്തില്‍ പരിശോധനാ നടപടികള്‍ പൂര്‍ത്തീകരിക്കുന്നതാണ്.\n\nഅന്യേഷണങ്ങള്‍ അറിയിക്കുന്നു !', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 11:25:33', 'email', 1),\n(123, 'ml_IN', 0, '[SITE.NAME] - ല്‍ തന്നിരുന്ന താങ്കളുടെ പരസ്യം ആക്ടിവേറ്റ് ചെയ്യപ്പെട്ടിരിക്കുന്നു. അഭിനന്ദനങ്ങള്‍', 'ads-activated', 'ഹെല്ലോ [USER.OWNER],\n\nതാങ്കളുടെ പരസ്യം [URL.QL] ആക്ടിവേറ്റ് ആയിരിക്കുന്നതായി അറിയിക്കുന്നതില്‍ അതിയായ സന്തോഷമുണ്ട്.\nഇപ്പോള്‍ താങ്കളുടെ പരസ്യം മറ്റുള്ളവര്‍ക്കും കാണുവാന്‍ കഴിയും.\nതാങ്കളെ ഏറെ കാത്തിരുത്തിയില്ലായെന്നു കരുതട്ടെ.\nഅന്യേഷണങ്ങള്‍ അറിയിക്കുന്നു !', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 11:27:09', 'email', 1),\n(125, 'ml_IN', 0, 'ഹെല്ലോ [USER.NAME]!', 'user-contact', 'താങ്കളുടെ പരസ്യത്തിന് ഇതാ ഒരു അന്വേഷണം എത്തിയിരിക്കുന്നു.  [EMAIL.SENDER] [EMAIL.FROM] - ല്‍ നിന്നുമുള്ള പ്രതികരണമാണിത്.\n\n[EMAIL.BODY]\n\nഅന്യേഷണങ്ങള്‍ അറിയിക്കുന്നു !', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 11:29:59', 'email', 1),\n(126, 'ml_IN', 0, 'പാസ്‌വേഡ് മാറ്റം : [SITE.NAME]!', 'auth-remember', 'ഹെല്ലോ [USER.NAME],\n\nഈ ലിങ്ക് പിന്‍തുടരുക [URL.QL]\n\nനന്ദി!', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 11:31:21', 'email', 1),\n(127, 'ml_IN', 0, '[SITE.NAME] - ലേയ്ക്ക് സ്വാഗതം!', 'auth-register', 'സ്വാഗതം [USER.NAME],\n\nപ്രിയ [URL.QL], താങ്കള്‍ ഞങ്ങളോടൊപ്പം ഒത്തുചേര്‍ന്നത്തില്‍ അതിയായ സന്തോഷം അറിയിക്കുന്നു.\n\nതാങ്കളുടെ യൂസര്‍ അക്കൌണ്ട് വിവരങ്ങള്‍ ഓര്‍ത്തിരിക്കുക:\nഇമെയില്‍ : [USER.EMAIL]\nപാസ്‌വേഡ് : [USER.PWD]\n\nതുടര്‍ന്ന്‍ താങ്കളുടെ പാസ്‌വേഡ് ഞങ്ങളോടൊപ്പമല്ല, താങ്കളുടെ നിയന്ത്രണത്തിലാന്നെന്ന്‍ അറിയുക.\n\nഅന്യേഷണങ്ങള്‍ അറിയിക്കുന്നു !', '" . core::request('ADMIN_EMAIL') . "', '2013-08-02 11:32:29', 'email', 1),\n\n(128, 'ar', 0, 'تم بنجاح `[AD.NAME]` اضافة اعلانك على موقع [SITE.NAME]!', 'ads-confirm', '[right][USER.NAME] مرحبا[/right]\n[right]شكرا  لك على وضع اعلانك على  موقع [SITE.NAME][/right]\n[right]الرجاء الضغط على الرابط  [URL.QL] للتاكيد[/right]\n[right]مع ارق التحيات[/right]', '" . core::request('ADMIN_EMAIL') . "', '2013-08-05 10:07:44', 'email', 1),\n(129, 'ar', 0, 'تم ‘نشاء الاعلان  على  [SITE.NAME]!', 'ads-user-check', '[right][USER.NAME] مرحبا [/right]\n[right]تم انشاء اعلان  بواسطة حسابك [USER.NAME]!  اضغط على الرابط للتاكد من الاعلان [URL.AD][/right]\n[right]اذا لم تقم بانشاء هذا الاعلان , الرجاء الضغط على الرابط للتواصل معنا [URL.CONTACT][/right]', '" . core::request('ADMIN_EMAIL') . "', '2013-08-05 10:13:12', 'email', 1),\n(130, 'ar', 0, 'تم بنجاح `[AD.NAME]` اضافة اعلانك على موقع [SITE.NAME]!', 'ads-notify', '[right]مرحبا[USER.NAME][/right]\n[right]شكرا لك لانشائك اعلان على موقع [SITE.NAME][/right]\n[right]بمكانك التعديل على الاعلان  هنا [URL.QL][/right]\n[right]لم يتم نشر اعلانك حتى تتم الموافقة من الادارة.[/right]\n[right]ونحن نعتذر عن أي إزعاج. وسوف يتم مراجعة في أقرب وقت ممكن.[/right]\n[right]تحياتنا  لك [/right]', '" . core::request('ADMIN_EMAIL') . "', '2013-08-05 10:16:20', 'email', 1),\n(131, 'ar', 0, '!يريد الاتصال بك [EMAIL.SENDER]', 'contact-admin', '[right]اهلا مدير [/right]\n[right][EMAIL.SENDER] لديك رساله جديدة من [EMAIL.FROM][/right]\n[right][EMAIL.BODY][/right]\n[right]تحياتنا لك [/right]', '" . core::request('ADMIN_EMAIL') . "', '2013-08-05 10:20:56', 'email', 1),\n(132, 'ar', 0, 'تم تفعيل علانك على موقع [SITE.NAME]!', 'ads-activated', '[right]مرحبا [USER.OWNER][/right]\n[right]نود اعلامك بان اعلانك [URL.QL] قد تم تفعيلة ![/right]\n[right]الان يمكن للاخرين مشاهدته[/right]\n[right]نتمنى ألا نكون قد اطلنا انتظارك [/right]\n[right]تحياتنا لك [/right]', '" . core::request('ADMIN_EMAIL') . "', '2013-08-05 10:22:53', 'email', 1),\n(134, 'ar', 0, 'مرحبا [USER.NAME],', 'user-contact', '[right]تم الاتصال بك  بسبب اعلانك  المستخدم [EMAIL.FROM][EMAIL.SENDER] قام ارسالك  رساله  [/right]\n[right][EMAIL.BODY][/right]\n[right]تحياتنا لك [/right]', '" . core::request('ADMIN_EMAIL') . "', '2013-08-05 10:26:01', 'email', 1),\n(135, 'ar', 0, 'تغيير كلمة المرور [SITE.NAME]', 'auth-remember', '[right]مرحبا [USER.NAME][/right]\n[right]الرجاء  الضغط على الرابط التالي [URL.QL][/right]\n[right]وشكرا لك [/right]', '" . core::request('ADMIN_EMAIL') . "', '2013-08-05 10:27:06', 'email', 1),\n(136, 'ar', 0, 'مرحبا [SITE.NAME]', 'auth-register', '[right]مرحبا [USER.NAME][/right]\n[right]نحن في غاية السعادة بنظمامك الينا! [URL.QL][/right]\n[right]تفااصيل حسابك [/right]\n[right]البريد الالكتروني: [USER.EMAIL][/right]\n[right]كلمة السر: [USER.PWD][/right]\n[right]لم نعد نملك كلمة السر الاصلية  بعد الان.[/right]\n[right]تحياتنا لك[/right]', '" . core::request('ADMIN_EMAIL') . "', '2013-08-05 10:28:13', 'email', 1),\n\n(137, 'es_ES', 0, 'Cambiar Contraseña [SITE.NAME]', 'auth-remember', 'Hola [USER.NAME],\r\n\r\nSigue este enlace  [URL.QL]\r\n\r\n¡Gracias!', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 03:40:59', 'email', 1),\n(138, 'es_ES', 0, '¡Bienvenido a [SITE.NAME]!', 'auth-register', 'Bienvenido [USER.NAME],\r\n\r\n¡Estamos muy contentos de que te no hayas unido! [URL.QL]\r\n\r\nRecuerda tus detalles de usuario:\r\nEmail: [USER.EMAIL]\r\nContraseña: [USER.PWD]\r\n\r\nYa no tenemos más tu contraseña original.\r\n\r\n¡Saludos!', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 03:43:35', 'email', 1),\n(139, 'es_ES', 0, '¡Hola [USER.NAME]!', 'user-contact', 'Has sido contactado en relación con tu anuncio: \r\n\r\n`[AD.NAME]`. \r\n\r\n Usuario [EMAIL.SENDER] [EMAIL.FROM], tiene un mensaje para ti: \r\n\r\n[EMAIL.BODY]. \r\n\r\n ¡Saludos!', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 03:44:40', 'email', 1),\n(140, 'es_ES', 0, '¡Hola [USER.NAME]!', 'user-profile-contact', 'Usuario [EMAIL.SENDER] [EMAIL.FROM], tiene un mensaje para ti: \r\n\r\n[EMAIL.SUBJECT] \r\n\r\n[EMAIL.BODY]. \r\n\r\n ¡Saludos!', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 03:45:17', 'email', 1),\n(141, 'es_ES', 0, '¡[EMAIL.SENDER] quiere contactarte!', 'contact-admin', 'Hello Admin,\r\n\r\n [EMAIL.SENDER]: [EMAIL.FROM], tiene un mensaje para ti:\r\n\r\n [EMAIL.BODY] \r\n\r\n ¡Saludos!', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 03:46:09', 'email', 1),\n(142, 'es_ES', 0, '¡Tu anuncio `[AD.NAME]` en [SITE.NAME] ha sido activado!', 'ads-activated', 'Hola [USER.OWNER],\r\n\r\n ¡Queremos informate que tu anuncio [URL.QL] ha sido activado!\r\n\r\n Ahora puede ser visto por otros usuarios. \r\n\r\n Esperamos no habarte hecho esperar demasiado. \r\n\r\n¡Saludos!', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 03:48:22', 'email', 1),\n(143, 'es_ES', 0, '¡Enhorabuena! Tu anuncio `[AD.NAME]` ha sido creado en [SITE.NAME]!', 'ads-notify', 'Hola [USER.NAME],\r\n\r\n¡Gracias por crear un anuncio en [SITE.NAME]! \r\n\r\nPuedes editar tu anuncio aquí [URL.QL].\r\n\r\n Tu anuncio aún no está publicado, necesita que sea validado por un administrador. \r\n\r\n Lamentamos el inconveniente. Lo revisaremos lo más pronto posible.\r\n\r\n¡Saludos!', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 03:51:32', 'email', 1),\n(144, 'es_ES', 0, '¡Anuncio `[AD.NAME]` ha sido creado en [SITE.NAME]!', 'ads-user-check', 'Hola [USER.NAME],\r\n\r\n ¡[USER.NAME], un anuncio ha sido creado en tu cuenta! Puedes visitar este enlace para verlo [URL.AD]\r\n\r\n Si no eres el responsable de la creación de este anuncio, has clic en este enlace para contactarnos [URL.CONTACT].\r\n\r\n', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 04:08:50', 'email', 1),\n(145, 'es_ES', 0, '¡Anuncio `[AD.TITLE]` ha sido creado en [SITE.NAME]!', 'ads-subscribers', '¡Hola,\r\n\r\n ¡Quizás te interese esto!\r\n\r\nPuede visitar este enlace para ver el anuncio [URL.AD]\r\n\r\n', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 04:08:55', 'email', 1),\n(146, 'es_ES', 0, '¡Anuncio `[AD.TITLE]` ha sido creado en [SITE.NAME]!', 'ads-to-admin', 'Clic aquí para visitarlo [URL.AD]', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 04:03:48', 'email', 1),\n(147, 'es_ES', 0, '¡Anuncio `[AD.TITLE]` ha sido vendido en [SITE.NAME]!', 'ads-sold', 'ID de la orden: [ORDER.ID]\r\n\r\nID del producto: [PRODUCT.ID]\r\n\r\nPor favor, verifica tu cuenta para el pago recibido.\r\n\r\nClic aquí para visitar [URL.AD]', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 04:08:16', 'email', 1),\n(148, 'es_ES', 0, '¡El anuncio `[AD.TITLE]` ya no cuenta con stock en [SITE.NAME]!', 'out-of-stock', 'Hola [USER.NAME],\r\n\r\nMientras tu anuncio está fuera de stock, no estará disponible para que otros usuarios lo vean. Si deseas incrementar tu stock y activar tu anuncio, por favor sigue este enlace [URL.EDIT].\r\n\r\n¡Saludos!', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 04:08:07', 'email', 1),\n(149, 'es_ES', 0, '¡El anuncio `[AD.TITLE]` ha sido comprado [SITE.NAME]!', 'ads-purchased', 'ID de la orden: [ORDER.ID]\r\n\r\nID del producto: [PRODUCT.ID]\r\n\r\nPor cualquier inconveniente por favor ponte en contacto con el administrador de [SITE.NAME]\r\n\r\nClic aquí para visitar [URL.AD]', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 04:10:23', 'email', 1),\n(150, 'es_ES', 0, 'Recibo de [ORDER.DESC] #[ORDER.ID]', 'new-order', 'Hola [USER.NAME], gracias por comprar [ORDER.DESC].\r\n\r\nPor favor, completa tu pago aquí [URL.CHECKOUT]', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 04:11:39', 'email', 1),\n(151, 'es_ES', 0, '¡Enhorabuena! Tu anuncio `[AD.NAME]` fue creado en [SITE.NAME]!', 'ads-confirm', 'Bienvenido [USER.NAME],\r\n\r\nGracias por crear un anuncio en [SITE.NAME]! \r\n\r\nPor favor, has clic en este enlace [URL.QL] para confirmarlo.\r\n\r\n¡Saludos!', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 04:12:51', 'email', 1),\n(152, 'es_ES', 0, 'Tu anuncio [AD.NAME] ha expirado', 'ad-expired', 'Hola [USER.NAME], Tu anuncio [AD.NAME] ha expirado \r\n\r\nPor favor, revisa tu anuncio aquí [URL.EDITAD]', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 03:52:59', 'email', 1),\n(153, 'es_ES', 0, 'Opinión nueva para [AD.TITLE] [RATE]', 'ad-review', '[URL.QL]\r\n\r\n[RATE]\r\n\r\n[DESCRIPTION]', '" . core::request('ADMIN_EMAIL') . "', '2014-10-28 03:52:15', 'email', 1);");
mysqli_query($link, "INSERT INTO `" . core::request('TABLE_PREFIX') . "content` (`locale`, `title`, `seotitle`, `description`, `from_email`, `type`, `status`) VALUES\n('fr_FR', 'Félicitations! Votre annonce a bien été créée sur [SITE.NAME]!', 'ads-confirm', 'Bienvenue [USER.NAME],<br /><br />\n<br /><br />\nMerci d''avoir créé une anonnce sur [SITE.NAME]! <br /><br />\n<br /><br />\nVeuillez cliquer sur ce lien [URL.QL] pour la confirmer.<br /><br />\n<br /><br />\nCordialement!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Félicitations! Votre annonce a été créée sur [SITE.NAME]!', 'ads-notify', 'Bonjour [USER.NAME],<br /><br />\n<br /><br />\nMerci d''avoir créé une anonnce sur [SITE.NAME]! <br /><br />\n<br /><br />\nVous pouvez modifier votre annonce ici [URL.QL].<br /><br />\n<br /><br />\nVotre annonce est en attente de publication, elle doit encore être validée par l''administrateur. Nous allons l''examiner dès que possible. <br /><br />\n<br /><br />\nNous sommes désolés pour le délai et la gène occasionnée. Merci de votre compréhension.<br /><br />\n<br /><br />\nCordialement!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', '[EMAIL.SENDER] souhaite vous contacter!', 'contact-admin', 'Bonjour Administrateur,<br /><br />\n<br /><br />\n[EMAIL.SENDER]: [EMAIL.FROM], a un message pour vous:<br /><br />\n<br /><br />\n[EMAIL.BODY] <br /><br />\n<br /><br />\nCordialement!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Votre annonce sur [SITE.NAME] a été activée!', 'ads-activated', 'Bonjour [USER.OWNER],<br /><br />\n<br /><br />\nNous vous informons que votre annonce [URL.QL] a été activée!<br /><br />\nElle est désormais visible de tous sur le site. <br /><br />\n<br /><br />\nEn espérant ne pas vous avoir fait trop attendre. <br /><br />\n<br /><br />\nCordialement!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Bonjour [USER.NAME]!', 'user-new', 'Bienvenue sur [SITE.NAME]. <br /><br />\n<br /><br />\nNous sommes ravis de votre participation,<br /><br />\nVous pouvez vous connecter avec votre email: [USER.EMAIL], <br /><br />\net votre mot de passe: [USER.PWD]. <br /><br />\n<br /><br />\nLe mot de passe a été généré automatiquement; pour le remplacer par votre mot de passe préféré, cliquez sur ce lien: [URL.PWCH]. <br /><br />\n<br /><br />\nMerci de votre confiance! <br /><br />\n<br /><br />\nCordialement!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Bonjour [USER.NAME]!', 'user-contact', 'Vous avez été contacté au sujet de votre annonce. <br /><br />\nL''utilisateur [EMAIL.SENDER] [EMAIL.FROM] vous a envoyé le message suivant:<br /><br />\n[EMAIL.BODY]. <br /><br />\n<br /><br />\nCordialement!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Changement de mot de passe [SITE.NAME]', 'auth-remember', 'Bonjour [USER.NAME],<br /><br />\n<br /><br />\nVeuillez suivre ce lien [URL.QL]<br /><br />\n<br /><br />\nMerci!!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Bienvenue sur [SITE.NAME]!', 'auth-register', 'Bienvenue [USER.NAME],<br /><br />\n<br /><br />\nNous sommes ravis de votre participation! [URL.QL]<br /><br />\nVoici pour rappel vos informations de connexion:<br /><br />\nEmail: [USER.EMAIL]<br /><br />\nMot de passe: [USER.PWD]<br /><br />\n<br /><br />\nPour des raisons de sécurité, nous ne gardons pas votre mot de passe original.<br /><br />\n<br /><br />\nCordialement!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Bonjour [USER.NAME]!', 'user-profile-contact', 'L''utilisateur [Email.SENDER] [EMAIL.From] a un message pour vous: [EMAIL.SUBJECT] [EMAIL.BODY]. Cordialement,', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'L''annonce `[AD.NAME]` a été créée sur [SITE.NAME]!', 'ads-user-check', 'Bonjour [USER.NAME], l''annonce a été créée avec votre compte [USER.NAME]! Vous pouvez visiter ce lien pour Cliquez ici pour accéder à votre annonce: [URL.AD] Si vous n''êtes pas l''auteur de cette annonce, cliquez sur le lien pour nous contacter: [URL.CONTACT].', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'L''annonce `[AD.TITLE]` vient d''être publiée sur [SITE.NAME]!', 'ads-subscribers', 'Bonjour, Vous êtes peut être intéressé(e) par cette nouvelle annonce! Cliquez sur ce lien pour Cliquez ici pour accéder à votre annonce: [URL.AD]', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'L''annonce `[AD.TITLE]` vient d''être créée sur [SITE.NAME]!', 'ads-to-admin', 'Cliquez ici pour voir l''annnonce [URL.AD]', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'L''annonce `[AD.TITLE]` a été vendue sur [SITE.NAME]!', 'ads-sold', 'Numéro de commande: [ORDER.ID] ID de produit: [PRODUCT.ID] Veuillez svp vérifier votre compte pour le paiement entrant. Cliquez ici pour accéder à votre annonce: [URL.AD]', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'L''annonce `[AD.TITLE]` est en rupture de stock sur [SITE.NAME]!', 'out-of-stock', 'Bonjour [USER.NAME]. Comme votre annonce est en rupture de stock, il n''est pas posible pour les visiteurs du site de la voir. Si vous souhaitez augmenter sa disponibilité et ainsi activer votre annonce, veuillez svp cliquer sur le lien suivant: [URL.EDIT]. Cordialement!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Reçu pour votre commande [ORDER.DESC] # [ORDER.ID]', 'new-order', 'Bonjour [USER.NAME], Merci pour votre commande [ORDER.DESC]. Veuillez svp régler votre commande et procéder à son paiement ici: [URL.CHECKOUT]', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Votre annonce [AD.NAME] a expiré', 'ad-expired', 'Bonjour [USER.NAME], Votre annonce [AD.NAME] a expiré. Veuillez svp vérifier votre annonce ici: [URL.EDITAD]', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'L''annonce `[AD.TITLE]` a été achetée sur [SITE.NAME]!', 'ads-purchased', 'Numéro de commande: [ORDER.ID] ID du produit: [PRODUCT.ID] Pour toute question ou demande veuillez svp contacter l''administrateur du site [SITE.NAME] Cliquez ici pour accéder à votre annonce: [URL.AD]', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Mot de passe modifié [SITE.NAME]', 'password-changed', 'Bonjour [USER.NAME], Votre mot de passe a été changé. Voici vos nouvelles informations de connexion: Email: [USER.EMAIL] Mot de passe: [USER.PWD] . Pour des raisons de sécurité, nous ne gardons pas votre mot de passe original. Cordialement!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Votre annonce [AD.NAME] va expirer', 'ad-to-expire', 'Bonjour [USER.NAME], Votre annonce [AD.NAME] va bientôt expirer. Veuillez svp vérifier votre annonce en cliquant sur ce lien: [URL.EDITAD]', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Nouvelle réponse: [TITRE]', 'messaging-reply', '[URL.QL]\r\n\r\n[DESCRIPTION]', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', '[FROM.NAME] vous a envoyé un message direct', 'messaging-user-contact', 'Bonjour [TO.NAME], [FROM.NAME] a un message pour vous: [description] [URL.QL] Cordialement!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Nouveau commentaire sur votre annonce [AD.TITLE] [RATE]', 'ad-review', 'Bonjour, une nouveau commentaire et une appréciation ont été publiés pour votre annonce. [URL.QL]\r\n\r\n[RATE]\r\n\r\n[DESCRIPTION]', '" . core::request('ADMIN_EMAIL') . "', 'email', 1),\n('fr_FR', 'Bonjour [TO.NAME]!', 'messaging-ad-contact', 'Vous avez été contacté au sujet de votre annonce: `[AD.NAME]`. L''utilisateur [FROM.NAME] a un message pour vous: [DESCRIPTION] [URL.QL] Cordialement!', '" . core::request('ADMIN_EMAIL') . "', 'email', 1);");
/**
 * Access
 */
mysqli_query($link, "INSERT INTO `" . core::request('TABLE_PREFIX') . "roles` (`id_role`, `name`, `description`) VALUES \n    (1, 'user', 'Normal user'), \n    (5, 'translator', 'User + Translations'), \n    (7, 'moderator', 'Moderator'), \n    (10, 'admin', 'Full access');");
mysqli_query($link, "INSERT INTO `" . core::request('TABLE_PREFIX') . "access` (`id_role`, `access`) VALUES \n            (10, '*.*'),\n            (1, 'profile.*'),(1, 'stats.user'),(1, 'myads.*'),(1, 'messages.*'),\n            (5, 'translations.*'),(5, 'profile.*'),(5, 'stats.user'),(5, 'content.*'),(5, 'myads.*'),(5, 'messages.*'),\n            (7, 'profile.*'),(7, 'content.*'),(7, 'stats.user'),(7, 'blog.*'),(7, 'translations.*'),(7, 'ad.*'),\n            (7, 'widgets.*'),(7, 'menu.*'),(7, 'category.*'),(7, 'location.*'),(7, 'myads.*'),(7, 'messages.*');");
/**
 * Create user God/Admin 
 */
$password = hash_hmac('sha256', core::request('ADMIN_PWD'), install::$hash_key);
mysqli_query($link, "INSERT INTO `" . core::request('TABLE_PREFIX') . "users` (`id_user`, `name`, `seoname`, `email`, `password`, `status`, `id_role`, `subscriber`) \nVALUES (1, 'admin', 'admin', '" . core::request('ADMIN_EMAIL') . "', '{$password}', 1, 10, 1)");
/**
 * Configs to make the app work
 * @todo refactor to use same coding standard
 * @todo widgets examples? at least at sidebar, rss, text advert, pages, locations...
 *
 */
mysqli_query($link, "INSERT INTO `" . core::request('TABLE_PREFIX') . "config` (`group_name`, `config_key`, `config_value`) VALUES\n('appearance', 'theme', 'default'),\n('appearance', 'theme_mobile', ''),\n('appearance', 'allow_query_theme', 0),\n('appearance', 'custom_css', 0),\n('appearance', 'custom_css_version', 0),\n('appearance', 'map_active', 0),\n('appearance', 'map_jscode', ''),\n('appearance', 'map_settings',''),\n('i18n', 'charset', 'utf-8'),\n('i18n', 'timezone', '" . core::request('TIMEZONE') . "'),\n('i18n', 'locale', '" . core::request('LANGUAGE') . "'),\n('i18n', 'allow_query_language', 0),\n('payment', 'paypal_currency', 'USD'),\n('payment', 'sandbox', 0),\n('payment', 'to_featured', 0),\n('payment', 'to_top', 0),\n('payment', 'pay_to_go_on_feature', '1'),\n('payment', 'featured_plans', '{\"5\":\"10\"}'),\n('payment', 'pay_to_go_on_top', '5'),\n('payment', 'paypal_account', ''),\n('payment', 'paypal_seller', '0'),\n('payment', 'stock', '0'),\n('payment', 'paymill_private', ''),\n('payment', 'paymill_public', ''),\n('payment', 'stripe_private', ''),\n('payment', 'stripe_public', ''),\n('payment', 'stripe_address', '0'),\n('payment', 'stripe_alipay', '0'),\n('payment', 'alternative', ''),\n('payment', 'bitpay_apikey', ''),\n('payment', 'authorize_sandbox', '0'),\n('payment', 'authorize_login', ''),\n('payment', 'authorize_key', ''),\n('payment', 'twocheckout_sid', ''),\n('payment', 'twocheckout_secretword', ''),\n('payment', 'twocheckout_sandbox', 0),\n('payment', 'fraudlabspro', ''),\n('payment', 'paysbuy', ''),\n('payment', 'paysbuy_sandbox', '0'),\n('general', 'api_key', '" . core::generate_password(32) . "'),\n('general', 'number_format', '%n'),\n('general', 'date_format', 'd-m-y'),\n('general', 'measurement', 'metric'),\n('general', 'base_url', '" . core::request('SITE_URL') . "'),\n('general', 'moderation', 0),\n('general', 'maintenance', 0),\n('general', 'analytics', ''),\n('general', 'translate', ''),\n('general', 'site_name', '" . core::request('SITE_NAME') . "'),\n('general', 'site_description', ''),\n('general', 'subscribe', 0),\n('general', 'akismet_key', ''),\n('general', 'alert_terms', ''),\n('general', 'contact_page', ''),\n('general', 'search_by_description', 0),\n('general', 'blog', 0),\n('general', 'blog_disqus',''),\n('general', 'minify', 0),\n('general', 'faq', 0),\n('general', 'faq_disqus', ''),\n('general', 'forums', '0'),\n('general', 'messaging', 1),\n('general', 'black_list', '1'),\n('general', 'ocacu', '0'),\n('general', 'landing_page', '{\"controller\":\"home\",\"action\":\"index\"}'),\n('general', 'disallowbots', 0),\n('general', 'html_head', ''),\n('general', 'html_footer', ''),\n('general', 'recaptcha_active', 0),\n('general', 'recaptcha_secretkey', ''),\n('general', 'recaptcha_sitekey', ''),\n('general', 'cookie_consent', 0),\n('general', 'auto_locate', 0),\n('general', 'social_auth', 0),\n('general', 'adblock', 0),\n('general', 'search_multi_catloc', 0),\n('general', 'gcm_apikey', ''),\n('general', 'email_domains', ''),\n('general', 'cron', 1),\n('image', 'allowed_formats', 'jpeg,jpg,png,'),\n('image', 'max_image_size', '5'),\n('image', 'height', ''),\n('image', 'width', '1200'),\n('image', 'height_thumb', '200'),\n('image', 'width_thumb', '200'),\n('image', 'quality', '90'),\n('image', 'watermark', '0'),\n('image', 'watermark_path', ''),\n('image', 'watermark_position', '0'),\n('image', 'aws_s3_active', 0),\n('image', 'aws_access_key', ''),\n('image', 'aws_secret_key', ''),\n('image', 'aws_s3_bucket', ''),\n('image', 'aws_s3_domain', 0),\n('image', 'disallow_nudes', 0),\n('advertisement', 'num_images', '4'),\n('advertisement', 'expire_date', '0'),\n('advertisement', 'description', 1),\n('advertisement', 'address', 1),\n('advertisement', 'phone', 1),\n('advertisement', 'upload_file', 0),\n('advertisement', 'location', 1),\n('advertisement', 'description_bbcode', 1),\n('advertisement', 'captcha', 1),\n('advertisement', 'website', 1),\n('advertisement', 'price', 1),\n('advertisement', 'contact', 1),\n('advertisement', 'tos', ''),\n('advertisement', 'thanks_page', ''),\n('advertisement', 'disqus', ''),\n('advertisement', 'fbcomments', ''),\n('advertisement', 'map', 0),\n('advertisement', 'map_style', ''),\n('advertisement', 'map_zoom', 14),\n('advertisement', 'center_lon', ''),\n('advertisement', 'center_lat', ''),\n('advertisement', 'auto_locate_distance', 100),\n('advertisement', 'ads_in_home', '0'),\n('advertisement', 'banned_words_replacement', 'xxx'),\n('advertisement', 'banned_words', ''),\n('advertisement', 'fields', ''),\n('advertisement', 'parent_category', 1),\n('advertisement', 'related', 5),\n('advertisement', 'map_pub_new', '0'),\n('advertisement', 'qr_code', '0'),\n('advertisement', 'login_to_post', '0'),\n('advertisement', 'reviews', '0'),\n('advertisement', 'reviews_paid', '0'),\n('advertisement', 'advertisements_per_page', '10'),\n('advertisement', 'feed_elements', '20'),\n('advertisement', 'map_elements', '100'),\n('advertisement', 'sort_by', 'published-desc'),\n('advertisement', 'count_visits', 1),\n('advertisement', 'login_to_contact', 0),\n('advertisement', 'only_admin_post', 0),\n('advertisement', 'sharing', '0'),\n('advertisement', 'logbee', 0),\n('advertisement', 'leave_alert', 1),\n('email', 'notify_email', '" . core::request('ADMIN_EMAIL') . "'),\n('email', 'smtp_active', 0),\n('email', 'new_ad_notify', 0),\n('email', 'smtp_host', ''),\n('email', 'smtp_port', ''),\n('email', 'smtp_auth', 0),\n('email', 'smtp_ssl', 0),\n('email', 'smtp_user', ''),\n('email', 'smtp_pass', ''),\n('email', 'elastic_active', 0),\n('email', 'elastic_username', ''),\n('email', 'elastic_password', ''),\n('user', 'user_fields', '{}'),\n('social', 'config', '{\"debug_mode\":\"0\",\"providers\":{\"OpenID\":{\"enabled\":\"0\"},\"Yahoo\":{\"enabled\":\"0\",\"keys\":{\"id\":\"\",\"secret\":\"\"}},\n\"AOL\":{\"enabled\":\"0\"},\"Google\":{\"enabled\":\"0\",\"keys\":{\"id\":\"\",\"secret\":\"\"}},\"Facebook\":{\"enabled\":\"0\",\"keys\":{\"id\":\"\",\"secret\":\"\"}},\n\"Twitter\":{\"enabled\":\"0\",\"keys\":{\"key\":\"\",\"secret\":\"\"}},\"Live\":{\"enabled\":\"0\",\"keys\":{\"id\":\"\",\"secret\":\"\"}},\"MySpace\":{\"enabled\":\"0\",\"keys\":{\"key\":\"\",\"secret\":\"\"}},\n\"LinkedIn\":{\"enabled\":\"0\",\"keys\":{\"key\":\"\",\"secret\":\"\"}},\"Foursquare\":{\"enabled\":\"0\",\"keys\":{\"id\":\"\",\"secret\":\"\"}}},\"base_url\":\"\",\"debug_file\":\"\"}');");
//base category
mysqli_query($link, "INSERT INTO `" . core::request('TABLE_PREFIX') . "categories` \n  (`id_category` ,`name` ,`order` ,`id_category_parent` ,`parent_deep` ,`seoname` ,`description` )\nVALUES (1, 'Home category', 0 , 0, 0, 'all', 'root category');");
//base location
mysqli_query($link, "INSERT INTO `" . core::request('TABLE_PREFIX') . "locations` \n  (`id_location` ,`name` ,`id_location_parent` ,`parent_deep` ,`seoname` ,`description`)\nVALUES (1 , 'Home location', 0, 0, 'all', 'root location');");
//sample values
if (core::request('SAMPLE_DB') !== NULL) {
    //sample catpegories
    mysqli_query($link, "INSERT INTO `" . core::request('TABLE_PREFIX') . "categories` (`id_category`, `name`, `order`, `created`, `id_category_parent`, `parent_deep`, `seoname`, `description`, `price`) VALUES\n    (2, 'Jobs', 1, '2013-05-01 16:41:04', 1, 0, 'jobs', 'The best place to find work is with our job offers. Also you can ask for work in the ''Need'' section.', 0),\n    (3, 'Languages', 2, '2013-05-01 16:41:04', 1, 0, 'languages', 'You want to learn a new language? Or can you teach a language? This is your section!', 0),\n    (4, 'Others', 4, '2013-05-01 16:41:04', 1, 0, 'others', 'Whatever you can imagine is in this section.', 0),\n    (5, 'Housing', 0, '2013-05-01 16:41:53', 1, 0, 'housing', 'Do you need a place to sleep, or you have something to offer; rooms, shared apartments, houses... etc.\n\nFind your perfect roommate here!', 0),\n    (6, 'Market', 3, '2013-05-01 16:41:04', 1, 0, 'market', 'Buy or sell things that you don''t need anymore in the City, you will find someone interested, or maybe you are going to find exactly what you need.', 0),\n    (7, 'Full Time', 1, '2009-04-22 17:31:43', 2, 1, 'full-time', 'Are you looking for a fulltime job? Or do you have a fulltime job to offer? Post your Ad here!', 0),\n    (8, 'Part Time', 2, '2009-04-22 17:32:15', 2, 1, 'part-time', 'Are you looking for a parttime job? Or do you have a partime job to offer? Post your Ad here!', 0),\n    (9, 'Internship', 3, '2009-04-22 17:33:05', 2, 1, 'internship', 'Are you looking for a internship in the City? Or do you have an internship to offer? Post it here!', 0),\n    (10, 'Au pair', 4, '2009-06-19 09:26:22', 2, 1, 'au-pair', 'Find or require for a Au Pair service. Here is the best place', 0),\n    (11, 'English', 1, '2009-04-22 17:33:52', 3, 1, 'english', 'Do you speak English? Or can you teach it? Do you want to learn? This is your category.', 0),\n    (12, 'Spanish', 2, '2009-04-22 17:34:29', 3, 1, 'spanish', 'You want to learn Spanish? Or can you teach Spanish? This is your section!', 0),\n    (13, 'Other Languages', 3, '2009-04-22 17:35:34', 3, 1, 'other-languages', 'Are you interested in learning or teaching any other language that is not listed? Post it here!', 0),\n    (14, 'Events', 0, '2013-05-01 16:41:11', 4, 1, 'events', 'Upcoming Parties, Cinema, Museums, Parades, Birthdays, Dinners.... Everything!', 0),\n    (15, 'Hobbies', 1, '2013-05-01 16:41:11', 4, 1, 'hobbies', 'Share your hobby with someone! Football, running, cinema, music, cinema, party ... Post it here!', 0),\n    (16, 'Services', 3, '2009-04-22 17:38:33', 4, 1, 'services', 'Do you need a service? Relocation? Insurance? Doctor? Cleaning? Here you can ask for it or offer services!', 0),\n    (17, 'Friendship', 2, '2013-05-01 16:41:17', 1, 1, 'friendship', 'Are you alone in the City? Here you can find new friends! or a new boyfriend/girlfriend ;)', 0),\n    (18, 'Apartment', 1, '2009-04-22 17:39:32', 5, 1, 'apartment', 'Apartments, flats, monthly rentals, long terms, for days... this is the section to have your apartment in the City!', 0),\n    (19, 'Shared Apartments - Rooms', 2, '2009-05-03 21:53:57', 5, 1, 'shared-apartments-rooms', 'You want to share an apartment? Then you need a room! Ask for rooms or add yours in this section.', 0),\n    (20, 'House', 3, '2009-04-22 17:40:50', 5, 1, 'house', 'Rent a house, or offer your house for rent! Here you can find your beach house close to the City!', 0),\n    (21, 'TV', 1, '2009-04-22 17:41:39', 6, 1, 'tv', 'TV, Video Games, TFT, Plasma, your old TV, or your new one can find a new owner!', 0),\n    (22, 'Audio', 2, '2009-04-22 17:42:13', 6, 1, 'audio', 'HI-FI systems, iPod, MP3 players, MP4, if you don''t use it anymore sell it! If you try to find a second hand one, this is your place!', 0),\n    (23, 'Furniture', 3, '2009-04-22 17:43:16', 6, 1, 'furniture', 'Do you need to furnish your home? Or would you like to sell your furniture? Post it here!', 0),\n    (24, 'IT', 4, '2009-04-22 17:43:48', 6, 1, 'it', 'You need a computer? Laptop? Or do you have some old components? This is the IT market of the City!', 0),\n    (25, 'Other Market', 5, '2009-04-22 17:44:12', 6, 1, 'other-market', 'In this market you can sell everything you want! Or search for it!', 0);\n    ");
}
//crontabs
mysqli_query($link, "INSERT INTO `" . core::request('TABLE_PREFIX') . "crontab` (`name`, `period`, `callback`, `params`, `description`, `active`) VALUES\n('Sitemap', '0 3 * * *', 'Sitemap::generate', NULL, 'Regenerates the sitemap everyday at 3am',1),\n('Clean Cache', '0 5 * * *', 'Core::delete_cache', NULL, 'Once day force to flush all the cache.', 1),\n('Optimize DB', '0 4 1 * *', 'Core::optimize_db', NULL, 'once a month we optimize the DB', 1),\n('Unpaid Orders', '0 7 * * *', 'Cron_Ad::unpaid', NULL, 'Notify unpaid orders 2 days after was created', 1),\n('Expired Featured Ad', '0 8 * * *', 'Cron_Ad::expired_featured', NULL, 'Notify by email of expired featured ad', 1),\n('Expired Ad', '0 9 * * *', 'Cron_Ad::expired', NULL, 'Notify by email of expired ad', 1),\n('About to Expire Ad', '05 9 * * *', 'Cron_Ad::to_expire', NULL, 'Notify by email your ad is about to expire', 1);");
mysqli_close($link);
Beispiel #20
0
?>
" class="form-control" data-toggle="tooltip" title="<?php 
echo __("Database charset");
?>
" required />
                    </div>
                </div>

                <div class="form-group adv">                
                    <div class="col-md-12">
                    <label class="control-label"><?php 
echo __("Table prefix");
?>
:</label>
                    <input type="text" name="TABLE_PREFIX" value="<?php 
echo core::request('TABLE_PREFIX', 'oc2_');
?>
" class="form-control" data-toggle="tooltip" title="<?php 
echo __("Allows multiple installations in one database if you give each one a unique prefix");
?>
. <?php 
echo __("Only numbers, letters, and underscores");
?>
." required />
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
    <div class="form-actions">
Beispiel #21
0
        ?>
 ><?php 
        echo $num;
        ?>
</option>
                <?php 
    }
    ?>
            </select>
        </div>
        <div class="form-group">
            <input type="text" class="form-control input-sm search-query" name="email" placeholder="<?php 
    echo __('email');
    ?>
" value="<?php 
    echo core::request('email');
    ?>
">
        </div>
        <button type="submit" class="btn btn-primary"><?php 
    echo __('Filter');
    ?>
</button>
        <a class="btn btn-warning" href="<?php 
    echo Route::url('oc-panel', array('controller' => 'order', 'action' => 'index'));
    ?>
">
            <?php 
    echo __('Reset');
    ?>
        </a>
Beispiel #22
0
echo core::config('image.height_thumb');
?>
?<?php 
echo str_replace('+', ' ', http_build_query(array('text' => $ad->category->name, 'size' => 14, 'auto' => 'yes')));
?>
" class="img-responsive" alt="<?php 
echo HTML::chars($ad->title);
?>
"> 
                      <?endif?>
                  </figure>
              </a>
          </div>
          
          <ul>
              <?if (core::request('sort') == 'distance' AND Model_User::get_userlatlng()) :?>
                  <li><b><?php 
echo __('Distance');
?>
:</b> <?php 
echo i18n::format_measurement($ad->distance);
?>
</li>
              <?endif?>
              <?if ($ad->published!=0){?>
                  <li><b><?php 
echo __('Publish Date');
?>
:</b> <?php 
echo Date::format($ad->published, core::config('general.date_format'));
?>
Beispiel #23
0
 /**
  * Edit advertisement: Update
  *
  * All post fields are validated
  */
 public function action_update()
 {
     //template header
     $this->template->title = __('Edit advertisement');
     $this->template->meta_description = __('Edit advertisement');
     Controller::$full_width = TRUE;
     //local files
     if (Theme::get('cdn_files') == FALSE) {
         $this->template->styles = array('css/jquery.sceditor.default.theme.min.css' => 'screen', '//cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.1/css/selectize.bootstrap3.min.css' => 'screen', '//cdn.jsdelivr.net/sweetalert/1.1.3/sweetalert.css' => 'screen');
         $this->template->scripts['footer'] = array('js/jquery.sceditor.bbcode.min.js', '//maps.google.com/maps/api/js?sensor=false&libraries=geometry&v=3.7', '//cdn.jsdelivr.net/gmaps/0.4.15/gmaps.min.js', '//cdn.jsdelivr.net/sweetalert/1.1.3/sweetalert.min.js', '//cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.1/js/standalone/selectize.min.js', 'js/canvasResize.js', 'js/oc-panel/edit_ad.js');
     } else {
         $this->template->styles = array('css/jquery.sceditor.default.theme.min.css' => 'screen', '//cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.1/css/selectize.bootstrap3.min.css' => 'screen', '//cdn.jsdelivr.net/sweetalert/1.1.3/sweetalert.css' => 'screen');
         $this->template->scripts['footer'] = array('js/jquery.sceditor.bbcode.min.js', '//maps.google.com/maps/api/js?sensor=false&libraries=geometry&v=3.7', '//cdn.jsdelivr.net/gmaps/0.4.15/gmaps.min.js', '//cdn.jsdelivr.net/sweetalert/1.1.3/sweetalert.min.js', '//cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.1/js/standalone/selectize.min.js', 'js/canvasResize.js', 'js/oc-panel/edit_ad.js');
     }
     Breadcrumbs::add(Breadcrumb::factory()->set_title(__('My ads'))->set_url(Route::url('oc-panel', array('controller' => 'myads', 'action' => 'index'))));
     $form = new Model_Ad($this->request->param('id'));
     if ($form->loaded() and (Auth::instance()->get_user()->id_user == $form->id_user or Auth::instance()->get_user()->id_role == Model_Role::ROLE_ADMIN or Auth::instance()->get_user()->id_role == Model_Role::ROLE_MODERATOR)) {
         // deleting single image by path
         if (is_numeric($deleted_image = core::request('img_delete'))) {
             $form->delete_image($deleted_image);
             $this->redirect(Route::url('oc-panel', array('controller' => 'myads', 'action' => 'update', 'id' => $form->id_ad)));
         }
         // end of img delete
         // set primary image
         if (is_numeric($primary_image = core::request('primary_image'))) {
             $form->set_primary_image($primary_image);
             $this->redirect(Route::url('oc-panel', array('controller' => 'myads', 'action' => 'update', 'id' => $form->id_ad)));
         }
         $original_category = $form->category;
         $extra_payment = core::config('payment');
         if ($this->request->post()) {
             $data = $this->request->post();
             //to make it backward compatible with older themes: UGLY!!
             if (isset($data['category']) and is_numeric($data['category'])) {
                 $data['id_category'] = $data['category'];
                 unset($data['category']);
             }
             if (isset($data['location']) and is_numeric($data['location'])) {
                 $data['id_location'] = $data['location'];
                 unset($data['location']);
             }
             $return = $form->save_ad($data);
             //there was an error on the validation
             if (isset($return['validation_errors']) and is_array($return['validation_errors'])) {
                 foreach ($return['validation_errors'] as $f => $err) {
                     Alert::set(Alert::ALERT, $err);
                 }
             } elseif (isset($return['error'])) {
                 Alert::set($return['error_type'], $return['error']);
             } elseif (isset($return['message'])) {
                 // IMAGE UPLOAD
                 // in case something wrong happens user is redirected to edit advert.
                 $filename = NULL;
                 for ($i = 0; $i < core::config("advertisement.num_images"); $i++) {
                     if (Core::post('base64_image' . $i)) {
                         $filename = $form->save_base64_image(Core::post('base64_image' . $i));
                     } elseif (isset($_FILES['image' . $i])) {
                         $filename = $form->save_image($_FILES['image' . $i]);
                     }
                 }
                 if ($filename !== NULL) {
                     $form->last_modified = Date::unix2mysql();
                     try {
                         $form->save();
                     } catch (Exception $e) {
                         throw HTTP_Exception::factory(500, $e->getMessage());
                     }
                 }
                 Alert::set(Alert::SUCCESS, $return['message']);
                 //redirect user to pay
                 if (isset($return['checkout_url']) and !empty($return['checkout_url'])) {
                     $this->redirect($return['checkout_url']);
                 }
             }
             $this->redirect(Route::url('oc-panel', array('controller' => 'myads', 'action' => 'update', 'id' => $form->id_ad)));
         }
         //get all orders
         $orders = new Model_Order();
         $orders = $orders->where('id_user', '=', $form->id_user)->where('status', '=', Model_Order::STATUS_CREATED)->where('id_ad', '=', $form->id_ad)->find_all();
         Breadcrumbs::add(Breadcrumb::factory()->set_title(__('Update')));
         $this->template->content = View::factory('oc-panel/profile/edit_ad', array('ad' => $form, 'extra_payment' => $extra_payment, 'orders' => $orders));
     } else {
         Alert::set(Alert::ERROR, __('You dont have permission to access this link'));
         $this->redirect(Route::url('default'));
     }
 }
Beispiel #24
0
 /**
  * 
  * NEW ADVERTISEMENT 
  * 
  */
 public function action_index()
 {
     //Detect early spam users, show him alert
     if (core::config('general.black_list') == TRUE and Model_User::is_spam(Core::post('email')) === TRUE) {
         Alert::set(Alert::ALERT, __('Your profile has been disable for posting, due to recent spam content! If you think this is a mistake please contact us.'));
         $this->redirect('default');
     }
     //advertisement.only_admin_post
     if (Core::config('advertisement.only_admin_post') == 1 and (!Auth::instance()->logged_in() or Auth::instance()->logged_in() and Auth::instance()->get_user()->id_role != Model_Role::ROLE_ADMIN)) {
         $this->redirect('default');
     }
     if (Core::post('ajaxValidateCaptcha')) {
         $this->auto_render = FALSE;
         $this->template = View::factory('js');
         if (captcha::check('publish_new', TRUE)) {
             $this->template->content = 'true';
         } else {
             $this->template->content = 'false';
         }
         return;
     }
     //template header
     $this->template->title = __('Publish new advertisement');
     $this->template->meta_description = __('Publish new advertisement');
     $this->template->styles = array('css/jquery.sceditor.default.theme.min.css' => 'screen', 'css/jasny-bootstrap.min.css' => 'screen', '//cdn.jsdelivr.net/sweetalert/0.1.2/sweet-alert.min.css' => 'screen');
     $this->template->scripts['footer'][] = 'js/jquery.sceditor.bbcode.min.js';
     $this->template->scripts['footer'][] = 'js/jasny-bootstrap.min.js';
     $this->template->scripts['footer'][] = 'js/jquery.chained.min.js';
     $this->template->scripts['footer'][] = '//cdn.jsdelivr.net/sweetalert/0.1.2/sweet-alert.min.js';
     $this->template->scripts['footer'][] = '//cdnjs.cloudflare.com/ajax/libs/ouibounce/0.0.10/ouibounce.min.js';
     if (core::config('advertisement.map_pub_new')) {
         $this->template->scripts['footer'][] = '//maps.google.com/maps/api/js?sensor=false&libraries=geometry&v=3.7';
         $this->template->scripts['footer'][] = '//cdn.jsdelivr.net/gmaps/0.4.15/gmaps.min.js';
     }
     $this->template->scripts['footer'][] = 'js/new.js?v=' . Core::VERSION;
     // redirect to login, if conditions are met
     if (core::config('advertisement.login_to_post') == TRUE and !Auth::instance()->logged_in()) {
         Alert::set(Alert::INFO, __('Please, login before posting advertisement!'));
         HTTP::redirect(Route::url('oc-panel', array('controller' => 'auth', 'action' => 'login')));
     }
     //find all, for populating form select fields
     $categories = Model_Category::get_as_array();
     $order_categories = Model_Category::get_multidimensional();
     $order_parent_deep = Model_Category::get_by_deep();
     // NO categories redirect ADMIN to categories panel
     if (count($order_categories) == 0) {
         if (Auth::instance()->logged_in() and Auth::instance()->get_user()->id_role == Model_Role::ROLE_ADMIN) {
             Alert::set(Alert::INFO, __('Please, first create some categories.'));
             $this->redirect(Route::url('oc-panel', array('controller' => 'category', 'action' => 'index')));
         } else {
             Alert::set(Alert::INFO, __('Posting advertisements is not yet available.'));
             $this->redirect('default');
         }
     }
     //get locations
     $locations = Model_Location::get_as_array();
     $order_locations = Model_Location::get_multidimensional();
     $loc_parent_deep = Model_Location::get_by_deep();
     // bool values from DB, to show or hide this fields in view
     $form_show = array('captcha' => core::config('advertisement.captcha'), 'website' => core::config('advertisement.website'), 'phone' => core::config('advertisement.phone'), 'location' => core::config('advertisement.location'), 'address' => core::config('advertisement.address'), 'price' => core::config('advertisement.price'));
     $id_category = NULL;
     $selected_category = new Model_Category();
     //if theres a category by post or by get
     if (Core::request('category') !== NULL) {
         if (is_numeric(Core::request('category'))) {
             $selected_category->where('id_category', '=', core::request('category'))->limit(1)->find();
         } else {
             $selected_category->where('seoname', '=', core::request('category'))->limit(1)->find();
         }
         if ($selected_category->loaded()) {
             $id_category = $selected_category->id_category;
         }
     }
     $id_location = NULL;
     $selected_location = new Model_Location();
     //if theres a location by post or by get
     if (Core::request('location') !== NULL) {
         if (is_numeric(Core::request('location'))) {
             $selected_location->where('id_location', '=', core::request('location'))->limit(1)->find();
         } else {
             $selected_location->where('seoname', '=', core::request('location'))->limit(1)->find();
         }
         if ($selected_location->loaded()) {
             $id_location = $selected_location->id_location;
         }
     }
     //render view publish new
     $this->template->content = View::factory('pages/ad/new', array('categories' => $categories, 'order_categories' => $order_categories, 'order_parent_deep' => $order_parent_deep, 'locations' => $locations, 'order_locations' => $order_locations, 'loc_parent_deep' => $loc_parent_deep, 'form_show' => $form_show, 'id_category' => $id_category, 'selected_category' => $selected_category, 'id_location' => $id_location, 'selected_location' => $selected_location, 'fields' => Model_Field::get_all()));
     if ($this->request->post()) {
         if (captcha::check('publish_new')) {
             $data = $this->request->post();
             $validation = Validation::factory($data);
             //validate location since its optional
             if (core::config('advertisement.location')) {
                 if (count($locations) > 1) {
                     $validation = $validation->rule('location', 'not_empty')->rule('location', 'digit');
                 }
             }
             //user is not logged in validate input
             if (!Auth::instance()->logged_in()) {
                 $validation = $validation->rule('email', 'not_empty')->rule('email', 'email')->rule('name', 'not_empty')->rule('name', 'min_length', array(':value', 2))->rule('name', 'max_length', array(':value', 145));
             }
             if ($validation->check()) {
                 // User detection, if doesnt exists create
                 if (!Auth::instance()->logged_in()) {
                     $user = Model_User::create_email(core::post('email'), core::post('name'));
                 } else {
                     $user = Auth::instance()->get_user();
                 }
                 //to make it backward compatible with older themes: UGLY!!
                 if (isset($data['category']) and is_numeric($data['category'])) {
                     $data['id_category'] = $data['category'];
                     unset($data['category']);
                 }
                 if (isset($data['location']) and is_numeric($data['location'])) {
                     $data['id_location'] = $data['location'];
                     unset($data['location']);
                 }
                 //lets create!!
                 $return = Model_Ad::new_ad($data, $user);
                 //there was an error on the validation
                 if (isset($return['validation_errors']) and is_array($return['validation_errors'])) {
                     foreach ($return['validation_errors'] as $f => $err) {
                         Alert::set(Alert::ALERT, $err);
                     }
                 } elseif (isset($return['error'])) {
                     Alert::set($return['error_type'], $return['error']);
                 } elseif (isset($return['message']) and isset($return['ad'])) {
                     $new_ad = $return['ad'];
                     // IMAGE UPLOAD
                     $filename = NULL;
                     for ($i = 0; $i < core::config('advertisement.num_images'); $i++) {
                         if (isset($_FILES['image' . $i])) {
                             $filename = $new_ad->save_image($_FILES['image' . $i]);
                         }
                         if ($filename) {
                             $new_ad->has_images++;
                         }
                     }
                     //since theres images save the ad again...
                     if ($new_ad->has_images > 0) {
                         try {
                             $new_ad->save();
                         } catch (Exception $e) {
                             throw HTTP_Exception::factory(500, $e->getMessage());
                         }
                     }
                     Alert::set(Alert::SUCCESS, $return['message']);
                     //redirect user
                     if (isset($return['checkout_url']) and !empty($return['checkout_url'])) {
                         $this->redirect($return['checkout_url']);
                     } else {
                         $this->redirect(Route::url('default', array('action' => 'thanks', 'controller' => 'ad', 'id' => $new_ad->id_ad)));
                     }
                 }
             } else {
                 $errors = $validation->errors('ad');
                 foreach ($errors as $f => $err) {
                     Alert::set(Alert::ALERT, $err);
                 }
             }
         } else {
             Alert::set(Alert::ALERT, __('Captcha is not correct'));
         }
     }
 }
                            <button id="setMyLocation" class="btn btn-default" type="button"><?php 
    echo __('Ok');
    ?>
</button>
                        </span>
                    </div>
                    <br>
                    <div id="mapCanvas"></div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><?php 
    echo __('Close');
    ?>
</button>
                    <?php 
    if (core::request('userpos') == 1) {
        ?>
                        <a class="btn btn-danger" href="?<?php 
        echo http_build_query(['userpos' => NULL] + Request::current()->query());
        ?>
"><?php 
        echo __('Remove');
        ?>
</a>
                    <?php 
    }
    ?>
                </div>
            </div>
        </div>
    </div>
?>
                    </div>
                </div>
                <div class="form-group">
                    <?php 
echo FORM::label('description', __('Description'), array('class' => 'control-label col-md-2', 'for' => 'description'));
?>
                    <div class="col-sm-9">
                        <?php 
echo FORM::textarea('description', __('Description'), array('class' => 'form-control', 'id' => 'description', 'data-editor' => 'html'));
?>
                    </div>
                </div>
                
                <?php 
if (core::request('type') == 'email') {
    ?>
                <div class="form-group">
                    <?php 
    echo FORM::label('from_email', __('From email'), array('class' => 'control-label col-md-2', 'for' => 'from_email'));
    ?>
                    <div class="col-sm-4">
                        <?php 
    echo FORM::input('from_email', '', array('placeholder' => __('from_email'), 'class' => 'form-control', 'id' => 'from_email'));
    ?>
                    </div>
                </div>
                <?php 
}
?>
            
            echo HTML::entities($ad->category->name);
            ?>
&amp;size=14&amp;auto=yes" class="img-responsive" alt="<?php 
            echo HTML::chars($ad->title);
            ?>
"> 
                      <?php 
        }
        ?>
                  </figure>
              </a>
          </div>
          
          <ul>
              <?php 
        if (core::request('sort') == 'distance' and Model_User::get_userlatlng()) {
            ?>
                  <li><b><?php 
            echo __('Distance');
            ?>
:</b> <?php 
            echo i18n::format_measurement($ad->distance);
            ?>
</li>
              <?php 
        }
        ?>
              <?php 
        if ($ad->published != 0) {
            ?>
                  <li><b><?php 
Beispiel #28
0
?>
">
            <span class="glyphicon glyphicon-th-list"></span><?php 
echo __('List');
?>
        </a> 
        <a href="#" id="grid" class="btn btn-default btn-sm <?php 
echo core::cookie('list/grid') == 0 ? 'active' : '';
?>
">
            <span class="glyphicon glyphicon-th"></span><?php 
echo __('Grid');
?>
        </a>
        <button type="button" id="sort" data-sort="<?php 
echo core::request('sort');
?>
" class="btn btn-info btn-sm dropdown-toggle" data-toggle="dropdown">
            <span class="glyphicon glyphicon-list-alt"></span><?php 
echo __('Sort');
?>
 <span class="caret"></span>
        </button>
        <ul class="dropdown-menu" role="menu" id="sort-list">
            <li><a href="?sort=title-asc"><?php 
echo __('Name (A-Z)');
?>
</a></li>
            <li><a href="?sort=title-desc"><?php 
echo __('Name (Z-A)');
?>
Beispiel #29
0
                        <div class="col-md-8">
                            <?php 
echo FORM::input('address', $user->address, array('class' => 'form-control', 'id' => 'address', 'type' => 'address', 'maxlength' => '150', 'placeholder' => __('Address')));
?>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-offset-4 col-md-8">
                            <button type="submit" class="btn btn-primary"><?php 
echo __('Update');
?>
</button>
                        </div>
                    </div>
                    <input type="hidden" name="order_id" value="<?php 
echo core::request('order_id');
?>
">
                </form>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><?php 
echo __('Change password');
?>
</h3>
            </div>
            <div class="panel-body">
                <form class="form-horizontal"  method="post" action="<?php 
echo Route::url('oc-panel', array('controller' => 'profile', 'action' => 'changepass'));
Beispiel #30
0
                                                        <div class="form-group">
                                                            <label class="control-label">pass</label>
                                                            <p class="form-control-static admin_pwd"></p>
                                                        </div>
                                                        <p>
                                                            <a class="btn btn-default btn-block" href="<?php 
    echo core::request('SITE_URL', install::$url);
    ?>
"><?php 
    echo __('Go to Your Website');
    ?>
</a>
                                                        </p>
                                                        <p>
                                                            <a class="btn btn-default btn-block" href="<?php 
    echo core::request('SITE_URL', install::$url);
    ?>
oc-panel/">Admin</a>
                                                        </p>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    <?php 
}
?>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>