function storvargen_preprocess_block(&$vars) { if ($vars['block']->module == 'block') { $info = block_custom_block_get($vars['block']->delta); $description = seoUrl($info['info']); $vars['classes_array'][] = $description; } }
<h5>Related Content</h5> <div class="related-content-links"> <?php switch ($activities_weekday) { case count($activities_weekday) === 1: echo 'This activity is only available on ' . $page_title . '.'; break; default: echo '<p>This activity is also available on:</p>'; echo '<ul>'; foreach ($activities_weekday as $day) { switch ($day) { case $page_title: continue; default: echo '<li><a href="/activities-2/' . seoUrl($day) . '#' . basename(get_permalink()) . '" class="btn">' . esc_html($day) . '</a></li>'; } } echo '</ul>'; } ?> </div> <div class="social-share"> <p>Share this activity on social media</p> <ul> <li class="facebook"><a href="http://www.facebook.com/sharer.php?u=<?php echo get_post_permalink(); ?> ">Facebook</a> </li> <li class="twitter"><a href="http://twitter.com/share?text=Home:%20Venture%20Community%20Association&url=<?php
//$services=""; //if (count($resource->Services) > 0){ // $tmpservices = array(); // foreach ($resource->Services as $service){ // $tmpservices[] = BFCHelper::getLanguage($service->Name, $this->language); // } // $services = implode(', ',$tmpservices); //} //$resource->Price /**** for search similar *****/ //add counter $model = new BookingForConnectorModelOnSellUnit(); $retCounter = $model->setCounterByResourceId($resource->ResourceId, "details", $language); //BFCHelper::setState($resource->Merchant, 'merchant', 'merchant'); //-------------------pagina per il redirect di tutte le risorsein vendita $routeMerchant = $base_url . '/merchant-details/merchantdetails/' . $resource->MerchantId . '-' . seoUrl($merchant->Name); $merchantLogo = plugins_url("images/default.png", dirname(__FILE__)); $merchantLogoError = plugins_url("images/default.png", dirname(__FILE__)); if ($merchant->LogoUrl != '') { $merchantLogo = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'merchant_logo_small_top'); $merchantLogoError = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'merchant_logo_small_top'); } $addressDataMerchant = $merchant->AddressData; $PlanimetryData = $resource->PlanimetryData; $showResourcePlanimetria = !empty($PlanimetryData); $VideoData = $resource->VideoData; $showResourceVideo = !empty($VideoData); $unitfloor = array('unitfloor_value' => __('ND', 'bfi'), 'unitfloor_value0' => __('Ground floor', 'bfi'), 'unitfloor_value-1' => __('Top floor', 'bfi'), 'unitfloor_value-2' => __('Mansarda', 'bfi'), 'unitfloor_value-3' => __('multi-level', 'bfi')); $centralizedheating = array('centralizedheating_value-2' => __('ND', 'bfi'), 'centralizedheating_value-1' => __('Accounted', 'bfi'), 'centralizedheating_value0' => __('Autonomous', 'bfi'), 'centralizedheating_value1' => __('Centralized', 'bfi')); echo $sellonsearchform; ?>
$event_start_time = get_post_meta(get_the_ID(), 'event-start-time', true); $event_end_time = get_post_meta(get_the_ID(), 'event-end-time', true); $event_charge = get_post_meta(get_the_ID(), 'event-charge', true); if (have_posts()) { while (have_posts()) { the_post(); ?> <h2 class="entry-title"><?php the_title(); ?> </h2> <article id="<?php echo basename(get_permalink()); ?> " class="<?php echo seoUrl(esc_html($category[0]->name)); ?> entry"> <div class="inner"> <header class="entry-header"> <h3 class="entry-title"><?php the_title(); ?> </h3> <figure> <?php echo the_post_thumbnail('full', array('class' => 'img-responsive img-circle')); ?> </figure> <p><em>Category: </em><?php echo !empty($category) ? esc_html($category[0]->name) : '';
} else { $html .= 'Would you like to leave your review?'; } $html .= '</a>'; $html .= '</div>'; echo $html; ?> <?php } ?> <?php $uriMerchantResources = $base_url . '/merchant-details/merchantdetails/' . $merchant->MerchantId . '-' . seoUrl($merchant->Name) . '/resources'; $uriMerchantRatings = $base_url . '/merchant-details/merchantdetails/' . $merchant->MerchantId . '-' . seoUrl($merchant->Name) . '/reviews'; $uriMerchantOffers = $base_url . '/merchant-details/merchantdetails/' . $merchant->MerchantId . '-' . seoUrl($merchant->Name) . '/offers'; $uriMerchantOnsellunits = $base_url . '/merchant-details/merchantdetails/' . $merchant->MerchantId . '-' . seoUrl($merchant->Name) . '/sales'; $uriMerchantContacts = $base_url . '/merchant-details/merchantdetails/' . $merchant->MerchantId . '-' . seoUrl($merchant->Name) . '/contacts'; ?> <ul class="com_bookingforconnector_merchantdetails-menu"> <?php if ($merchant->HasResources) { ?> <?php if ($merchant->HasResources) { ?> <li class="com_bookingforconnector_merchantdetails-menu-item"><?php echo l('Resources', $uriMerchantResources); ?> </li> <?php } ?>
$routeRating = JRoute::_($currUriresource.'&layout=rating'); $routeInfoRequest = JRoute::_($currUriresource.'&layout=inforequestpopup&tmpl=component'); $routeRapidView = JRoute::_($currUriresource.'&layout=rapidview&tmpl=component'); $routeMerchant = ""; if($isportal){ $currUriMerchant = $uriMerchant. '&merchantId=' . $result->MerchantId . ':' . BFCHelper::getSlug($result->MrcName); if ($itemIdMerchant<>0) $currUriMerchant.= '&Itemid='.$itemIdMerchant; $routeMerchant = JRoute::_($currUriMerchant); } */ $route = url('accommodation-details/resource/' . $result->ResourceId . '-' . seoUrl($result->ResName)); $routeRating = url('accommodation-details/resource/' . $result->ResourceId . '-' . seoUrl($result->ResName) . '/ratings'); $routeRapidView = url('accommodation-details/resource/' . $result->ResourceId . '-' . seoUrl($result->ResName), array('query' => array('layout' => 'rapid'))); $routeMerchant = url('merchant-details/merchantdetails/' . $result->MerchantId . '-' . seoUrl($result->MrcName)); $bookingType = 0; $availability = 0; $ribbonofferdisplay = "hidden"; $classofferdisplay = ""; $stay = new StdClass(); $availability = $result->Availability; $bookingType = $result->BookingType; if ($result->Price < $result->TotalPrice || $result->IsOffer) { $ribbonofferdisplay = ""; $classofferdisplay = "com_bookingforconnector_highlight"; } if (!empty($result->RateplanId)) { $route .= "?pricetype=" . $result->RateplanId; } ?>
mysqli_query($connecDB, "DELETE FROM postcategory WHERE idPost = '{$id}'") or die(mysql_error()); mysqli_query($connecDB, "DELETE FROM tags WHERE idPost = '{$id}'") or die(mysql_error()); //TAGS //get id post terbaru //CATEGORY $piecesCAT = $_POST["category"]; foreach ($piecesCAT as $partCAT) { //$cats = $partCAT; mysqli_query($connecDB, "INSERT INTO postcategory (idCategory, idPost, timed) VALUES \n ('{$partCAT}','{$id}', NOW())") or die(mysql_error()); //print($partCAT.'<br />'); //die(); } //END OF CATEGORY foreach ($_POST['tags'] as $part) { $tagz = ltrim($part); $tagSlug = seoUrl($tagz); //echo $part; mysqli_query($connecDB, "INSERT INTO tags (idPost, namaTags, tagSlug) VALUES \n ('{$id}','{$part}', '{$tagSlug}')"); //print($part.'<br />'); } //END of TAGS header('Location: ./post/?type=editPost&idPost=' . $id . ''); } if (isset($_POST['tambahCategory'])) { $namaCategory = $_POST['category']; $slug = $_POST['slug']; $description = $_POST['description']; mysqli_query($connecDB, "INSERT INTO category (category, slug, description) \n VALUES ('{$namaCategory}', '{$slug}', '{$description}')"); header('Location: ./category/'); } if (isset($_POST['addImage'])) {
function search_availability() { bfi_get_locale(); if (!isset($_REQUEST['task'])) { unset($_SESSION['search.filterparams']); setSessionFromSubmittedData(); $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 1; $num_per_page = 20; $start = ($page - 1) * $num_per_page; $searchmodel = new BookingForConnectorModelSearch(); $items = $searchmodel->getItems(false, false, $start); $items = is_array($items) ? $items : array(); $total = 0; if (!empty($_SESSION['search.results']) && !empty($_SESSION['search.results']['totalresultcount'])) { $total = $_SESSION['search.results']['totalresultcount']; } $pages = ceil($total / $num_per_page); $output = ''; $output = $output . '<div id="bfcmerchantlist"><div id="searchitems" rel="' . htmlspecialchars(json_encode($items)) . '"></div> <div class="resourcetabmenu"> <a class="resources" rel="resources"><i class="fa fa-list-ul"></i> ' . __('List', 'bfi') . '</a><a id="maptab" class="mappa" rel="mappa"> ' . __('Map', 'bfi') . '</a> </div> <div class="resourcetabcontainer"> <div id="resources" class="tabcontent"> <div class="com_bookingforconnector-merchantlist">'; echo $output; $merchant_ids = ''; if ($_SESSION['search.params']['merchantResults']) { $resource_ids = array(); if (is_array($items)) { $merchant_ids = array(); foreach ($items as $merchant) { $merchant_ids[] = $merchant->MerchantId; } $merchant_ids = implode(',', $merchant_ids); } echo '<div id="idsforajax" rel="' . $merchant_ids . '"></div>'; include 'templates/search-listing.php'; } else { $resource_ids = array(); foreach ($items as $resource) { $resource_ids[] = $resource->ResourceId; } $resource_ids = implode(',', $resource_ids); echo '<div id="idsforajax" rel="' . $resource_ids . '"></div>'; include 'templates/search-listing-resources.php'; } $output = ''; $output = $output . '</div> </div> <div id="mappa" class="tabcontent"> <div id="map_canvassearch" class="searchmap" style="width:100%; min-height:400px"></div> </div>'; $url = $_SERVER['REQUEST_URI']; $pagination_args = array('base' => $url . '%_%', 'format' => '&page=%#%', 'total' => $pages, 'current' => $page, 'show_all' => false, 'end_size' => 5, 'mid_size' => 2, 'prev_next' => true, 'prev_text' => __('«'), 'next_text' => __('»'), 'type' => 'plain', 'add_args' => false, 'add_fragment' => ''); $paginate_links = paginate_links($pagination_args); if ($paginate_links) { echo "<nav class='custom-pagination'>"; // echo "<span class='page-numbers page-num'>Page " . $page . " of " . $numpages . "</span> "; echo "<span class='page-numbers page-num'>" . __('Page', 'bfi') . " </span> "; print $paginate_links; echo "</nav>"; } $output = $output . "</div></div>"; echo $output; } else { $task = $_REQUEST['task']; if ($task == 'GetMerchantsByIds') { $lists = $_REQUEST['merchantsId']; $merchants = BFCHelper::getMerchantsByIds($lists, $GLOBALS['bfi_lang']); die($merchants); } else { if ($task == 'getMerchantGroups') { $merchantgroups = BFCHelper::getMerchantGroups(); wp_send_json($merchantgroups); } else { if ($task == 'GetPhoneByMerchantId') { $merchantId = $_REQUEST['merchantid']; $language = $GLOBALS['bfi_lang']; $phno = BFCHelper::GetPhoneByMerchantId($merchantId, $language); wp_send_json($phno); } else { if ($task == 'GetResourcesByIds') { $lists = $_REQUEST['resourcesId']; $language = $GLOBALS['bfi_lang']; $resources = BFCHelper::GetResourcesByIds($lists, $language); @header('Content-Type: application/json; charset=' . get_option('blog_charset')); echo $resources; die; } else { if ($task == 'getmarketinfo') { $base_url = get_site_url(); $merchant_id = $_REQUEST['merchantId']; $model = new BookingForConnectorModelMerchantDetails(); $merchant = $model->getItem($merchant_id); $output = '<div class="com_bookingforconnector_map_merchantdetails" style="display:block;height:150px;overflow:auto; width: 300px;"> <div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t257"> <h3 style="margin:0;" class="com_bookingforconnector_merchantdetails-name"><a class="com_bookingforconnector_merchantdetails-nameAnchor" href="' . $base_url . '/merchant-details/merchantdetails/' . $merchant->MerchantId . '-' . seoUrl($merchant->Name) . '">' . $merchant->Name . '</a> <br/><span class="com_bookingforconnector_merchantdetails-rating com_bookingforconnector_merchantdetails-rating' . $merchant->Rating . '"> <span class="com_bookingforconnector_merchantdetails-ratingText">Rating ' . $merchant->Rating . '</span> </span> </h3> <div class="com_bookingforconnector_merchantdetails-contacts" style="display:none;"> <h3>' . __('Facility contacts data', 'bfi') . '</h3> <div>' . __('Phone', 'bfi') . ': <br/> <!-- Fax: --> </div> </div> </div> </div>'; die($output); } else { if ($task == 'getmarketinforesource') { $base_url = get_site_url(); $resource_id = $_REQUEST['resourceId']; $model = new BookingForConnectorModelResource(); $resource = $model->getItem($resource_id); $merchant = $resource->Merchant; $output = '<div class="com_bookingforconnector_map_merchantdetails" style="display:block;height:150px;overflow:auto; width: 300px;"> <div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t257"> <h3 style="margin:0;" class="com_bookingforconnector_merchantdetails-name"><a class="com_bookingforconnector_merchantdetails-nameAnchor" href="' . $base_url . '/accommodation-details/resource/' . $resource->ResourceId . '-' . seoUrl($resource->Name) . '">' . $resource->Name . '</a> <br/><span class="com_bookingforconnector_merchantdetails-rating com_bookingforconnector_merchantdetails-rating' . $merchant->Rating . '"> <span class="com_bookingforconnector_merchantdetails-ratingText">Rating ' . $merchant->Rating . '</span> </span> </h3> <div class="com_bookingforconnector_merchantdetails-contacts" style="display:none;"> <h3>' . __('Facility contacts data', 'bfi') . '</h3> <div>' . __('Phone', 'bfi') . ': <br/> Fax: </div> </div> </div> </div>'; die($output); } else { if ($task == 'getmarketinforesourceonsell') { $base_url = get_site_url(); $resource_id = $_REQUEST['resourceId']; $model = new BookingForConnectorModelOnSellUnit(); $resource = $model->getItem($resource_id); $merchant = $resource->Merchant; $resource->Price = $resource->MinPrice; $resourceName = BFCHelper::getLanguage($resource->Name, $language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags')); $resourceDescription = BFCHelper::getLanguage($resource->Description, $language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags')); $zone = $resource->LocationZone; $location = $resource->LocationName; $contractType = $resource->ContractType ? 'contacttype1' : 'contacttype'; // $img = "/images/default.png"; // $imgError = "/images/default.png"; $img = plugins_url("images/default.png", dirname(__FILE__)); $imgError = plugins_url("images/default.png", dirname(__FILE__)); $route = '/merchant-details/sale/' . $resource_id . '-' . seoUrl($resource->Name); if ($resource->ImageUrl != '') { $img = BFCHelper::getImageUrlResized('onsellunits', $resource->ImageUrl, 'onsellunit_map_default'); $imgError = BFCHelper::getImageUrl('onsellunits', $resource->ImageUrl, 'onsellunit_map_default'); } elseif ($merchant->LogoUrl != '') { $img = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'onsellunit_map_default'); $imgError = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'onsellunit_map_default'); } ob_start(); include 'templates/onsellmapmarker.php'; $output = ob_get_contents(); ob_end_clean(); die($output); } } } } } } } } }
/** * All = all fields are filled * 1 = Author field is checked * 2 = Course field is checked * 3 = Author and Course field are checked * 4 = Lesson Field is checked * 5 = Lesson and Author fields are checked * 6 = Course and lesson fields are checked * Any other input = All fields selected */ public function index($match = '-', $fields = 'all', $page = null) { $this->data['main_view12'] = ''; if ($match == "-" or $match == NULL) { $this->data['did_we_search'] = false; } else { $this->data['did_we_search'] = true; } switch ($fields) { case "author": $this->data['checkbox_checking'][1] = true; $this->data['checkbox_checking'][2] = false; $this->data['checkbox_checking'][4] = false; break; case "course": $this->data['checkbox_checking'][1] = false; $this->data['checkbox_checking'][2] = true; $this->data['checkbox_checking'][4] = false; break; case "author-course": $this->data['checkbox_checking'][1] = true; $this->data['checkbox_checking'][2] = true; $this->data['checkbox_checking'][4] = false; break; case "lesson": $this->data['checkbox_checking'][1] = false; $this->data['checkbox_checking'][2] = false; $this->data['checkbox_checking'][4] = true; break; case "author-lesson": $this->data['checkbox_checking'][1] = true; $this->data['checkbox_checking'][2] = false; $this->data['checkbox_checking'][4] = true; break; case "course-lesson": $this->data['checkbox_checking'][1] = false; $this->data['checkbox_checking'][2] = true; $this->data['checkbox_checking'][4] = true; break; default: $this->data['checkbox_checking'][1] = true; $this->data['checkbox_checking'][2] = true; $this->data['checkbox_checking'][4] = true; break; } // end of fields if ($this->input->post('search_mini_button') == true) { $filter_slug = "all"; redirect($this->data['language'] . '/user/search/index/' . seoUrl($this->input->post('search')) . '/' . $filter_slug . '/' . $page, 'refresh'); } $property = $this->input->post('checkbox_group'); //$this->data['main_view12']=$property; $total = 0; $filter_slug = ''; if ($this->input->post('search')) { $this->data['did_we_search'] = true; $match = seoUrl($this->input->post('search')); if ($property) { foreach ($property as $value) { $total += $value; } } switch ($total) { case 1: $filter_slug = "author"; break; case 2: $filter_slug = "course"; break; case 3: $filter_slug = "author-course"; break; case 4: $filter_slug = "lesson"; break; case 5: $filter_slug = "author-lesson"; break; case 6: $filter_slug = "course-lesson"; break; default: $filter_slug = "all"; break; } redirect($this->data['language'] . '/user/search/index/' . seoUrl($this->input->post('search')) . '/' . $filter_slug . '/' . $page, 'refresh'); } //-------------------- Configuring the Pagination ---------------------- $config = array(); $config["base_url"] = base_url() . $this->data['language'] . "/user/search/index/" . $match . '/' . $fields; //Defaulting the match parameter if ($match == '-') { $match = NULL; } $this->data['main_view12'] = $config["total_rows"] = $this->course_m->search_count(decodeseoUrl($match), $fields); $config['num_links'] = 3; $config["per_page"] = 10; $config["uri_segment"] = 7; // Configuring styles for pagination (Located in '/library/MY_PAgination') foreach ($this->my_pagination->set_style() as $key => $value) { $config[$key] = $value; } $this->pagination->initialize($config); $this->data["course_data"] = ' '; $page = $this->uri->segment(7) ? $this->uri->segment(7) : 0; $this->data["course_data"] = $this->course_m->search_limit($config["per_page"], $page, decodeseoUrl($match), $fields); $this->data["page_links"] = $this->pagination->create_links(); //-------------------- Configuring the Pagination ---------------------- //Search options if ($this->input->post('match') != null) { //Redirecting to display the search results $match = $this->input->post('match'); $match = seoUrl($this->input->post('match')); redirect($this->data['language'] . '/user/search/index/' . $this->data['url'] . $match . '/' . $fields, 'refresh'); } $this->data['main_view12'] = decodeseoURL($match); $this->data['main_view'] = 'en/3-user/components/views/search/main_search_window'; $this->load->view('en/3-user/layout/_layout_notification', $this->data); }
/** * Description: Displays a table view of all lesson, filterable, orderable with header links * and devided with pagination(Takes information from ultiple database tables) * @param int $order (Order type) * @param string $type ('asc' OR 'desc') * @param string $match (Search needle for filtering) * */ public function order($order = 1, $type = "asc", $match = '-') { if ($match == "-" or $match == NULL) { $this->data['did_we_search'] = false; } else { $this->data['did_we_search'] = true; } //Secondary order parameter $order1 = $order; if ($order == NULL) { $order1 = 'course'; } //Setting default url $this->data['url'] = "/" . $order1 . '/' . $type . '/'; if (empty($match)) { //Search parameter $match = '-'; } /**---------------------- Creating header links --------------------------------------**/ //Total number of table columns $total_items = 11; //what is the position of the pagination parameter $pagination_segment = 7; //Specific url path $extended_url = "/admin/lesson/order/"; //User visible header names $header_list_name = array(0 => $this->lang->line('course_table_icon'), 1 => $this->lang->line('course_table_course'), 2 => 'Lesson', 3 => $this->lang->line('course_table_slug'), 4 => $this->lang->line('course_table_author'), 5 => 'Language', 6 => $this->lang->line('course_table_created'), 7 => 'Modified', 8 => $this->lang->line('active'), 9 => '', 10 => '', 11 => ''); //List of valid header slugs( False values are converted to non-clickable) $header_order_slug = array(0 => 'category', 1 => 'course', 2 => 'lesson', 3 => 'slug', 4 => 'author', 5 => 'description', 6 => 'created', 7 => 'modified', 8 => 'active', 9 => false, 10 => false, 11 => false); //Calling and sending all data required to create header ordering links(Ordering value+type, Pagination and search result filtering) $this->data['links'] = $this->course_m->create_table_header($this->data['language'], $total_items, $extended_url, $header_list_name, $header_order_slug, $order, $type, $page = 0, $pagination_segment, $match); /**---------------------- Creating header links --------------------------------------**/ $this->data['type'] = $type; //defaulting the type of search if ($type != 'asc' and $type != 'desc') { $type = 'asc'; } if ($match != '-' and is_numeric($match) == false or $match == NULL and is_numeric($match) == false) { $field = array('description' => decodeseoUrl($match), 'category_name' => decodeseoUrl($match), 'lesson_name' => decodeseoUrl($match), 'title' => decodeseoUrl($match), 'lesson_slug' => decodeseoUrl($match), 'cat_slug' => decodeseoUrl($match), 'lessons.lesson_id' => decodeseoUrl($match)); } elseif ($match != '-' and is_numeric($match)) { $field = array('lessons.lesson_id' => $match); } else { $field = null; } $search_haystack = array(1 => 'title', 2 => 'category_name', 3 => 'lesson_name', 4 => 'language.lang_name', 5 => 'first_name', 6 => 'last_name', 7 => 'lessons.lesson_id'); $multy = array('0' => 'lessons-courses', '1' => 'courses-users', '2' => 'courses-category', '3' => 'lessons-language'); //-------------------- Configuring the Pagination ---------------------- $config = array(); $config["base_url"] = base_url() . $this->data['language'] . "/admin/lesson/order/" . $order . "/" . $type . '/' . $match; //Defaulting the match parameter if ($match == '-') { $match = NULL; } $config["total_rows"] = $this->lesson_m->count_pagination_records(null, $search_haystack, decodeseoUrl($match), $multy); $config['num_links'] = 3; $config["per_page"] = 10; $config["uri_segment"] = 8; // Configuring styles for pagination (Located in '/library/MY_PAgination') foreach ($this->my_pagination->set_style() as $key => $value) { $config[$key] = $value; } switch ($order) { case 'category': $this->db->order_by('category_name', $type); break; case 'course': $this->db->order_by('title', $type); break; case 'slug': $this->db->order_by('c_slug', $type); break; case 'author': $this->db->order_by('first_name', $type); break; case 'description': $this->db->order_by('course_description', $type); break; case 'date': $this->db->order_by('course_date', $type); break; case 'active': $this->db->order_by('course_approved', $type); break; default: $this->db->order_by('title', $type); break; } $this->pagination->initialize($config); $this->data["course_data"] = ' '; $page = $this->uri->segment(8) ? $this->uri->segment(8) : 0; //$this->data['courses'] = $this->course_m->fetch_limit($config["per_page"], $page, $field, $match, true); $this->data['courses'] = $this->lesson_m->fetch_pagination_records($config["per_page"], $page, null, true, $search_haystack, decodeseoUrl($match), $multy); $this->data["page_links"] = $this->pagination->create_links(); //-------------------- Configuring the Pagination ---------------------- //Search options if ($this->input->post('match') != null) { //Redirecting to display the search results $match = $this->input->post('match'); $match = seoUrl($this->input->post('match')); redirect($this->data['language'] . '/admin/lesson/order' . $this->data['url'] . $match, 'refresh'); } //$this->data['courses'] =$this->course_m->count_pagination_records(null , null ,$search_haystack, 'a', $multy); $this->data['url'] = "/" . $order1 . '/' . $type . '/'; // Getting information needed to display courses //$this->data['categories'] = $this->category_m->get(); // $this->data['courses']=$this->course_m->get(); //$this->data['users']=$this->user_m->get(); // Load views $this->data['subview'] = 'en/1-admin/components/views/lesson/lesson_index'; $this->load->view('en/1-admin/layout/_layout_main', $this->data); }
?> "> <input type="hidden" id="hashorder" name="hashorder" value="<?php echo $hashorder; ?> "> <input type="hidden" id="resourceId" name="resourceId" value="<?php echo $resourceId; ?> "> <input type="hidden" id="label" name="label" value="<?php echo $formlabel; ?> "> <input type="hidden" id="redirect" name="redirect" value="<?php echo 'merchant-details/reviews/' . $merchant_id . '-' . seoUrl($merchant->Name); ?> "> <div class="com_bookingforconnector_rating"> <div class="<?php echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW; ?> "> <div class="<?php echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_COL; ?> 6"> <label><?php _e('Name', 'bfi'); ?>
} ?> <br> </div> </div> <!-- end summary --> <!-- fields --> <form id="calculatorForm" action="<?php echo $form_url; ?> /accommodation-details/payment/form/<?php echo $resource->ResourceId; ?> -<?php echo seoUrl($resource->Name); ?> " method="POST" class="com_bookingforconnector_resource-calculatorForm com_bookingforconnector_resource-calculatorTable <?php echo $viewExtra ? 'com_bookingforconnector_resource-calculatorTable-viewextras' : ''; ?> <?php echo $viewSummary ? 'com_bookingforconnector_resource-calculatorTable-viewsummary' : ''; ?> "> <div class="<?php echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW; ?> com_bookingforconnector_resource-calculatorForm-mandatory"> <h4><?php _e('Availability', 'bfi'); ?>
function add_goods_action() { $this->_check_login_json(); // print_r($_POST); $msg = ''; $_POST['price'] = (int) $_POST['price']; if (mb_strlen($_POST['name']) < 3 or mb_strlen($_POST['short_description']) < 15 or count($_POST['categories']) < 1 or $_POST['price'] < 0) { $anser_ar['title'] = 'Ошибка'; $anser_ar['content'] = ' Одно из полей заполнено неверно '; } else { // <load image> if (!empty($_POST['image_url']) or isset($_FILES['image_local'])) { if (!empty($_POST['image_url'])) { //загрузка изображений по URl $load_result = $this->upload_img_lib->url_upload($_POST['image_url']); } else { //загрузка изображения с компьютера $load_result = $this->upload_img_lib->local_upload('image_local'); } if ($load_result) { $img_data = $this->upload_img_lib->get_file_data(); #$this->upload_img_lib->resize_img( $img_data['file_name'], 'small'); $this->upload_img_lib->resize_img($img_data['file_name'], 'upper-small'); $this->upload_img_lib->resize_img($img_data['file_name'], 'medium'); $_POST['main_img'] = $img_data['file_name']; } else { $_POST['main_img'] = ''; $msg .= $this->upload_img_lib->error_msg(); } } // </load image> // получение keywords, description $html_info = $this->admin_m->get_new_goods_html_info($_POST['name'], $_POST['categories'][0]); $_POST['html_keywords'] = $html_info['html_keywords']; $_POST['html_description'] = $html_info['html_description']; $_POST['url_name'] = seoUrl($_POST['name']); $goods_id = $this->admin_m->add_goods($_POST); // занесение информации о товаре if ($goods_id) { foreach ($_POST['categories'] as $cat_id) { // добавление категорий товаров $this->admin_m->add_goods_to_cat($goods_id, $cat_id); } //add competitors link $msg .= $this->admin_m->add_competitors_link($goods_id, $_POST['competitors']); $anser_ar['title'] = 'Товар добавлен'; $anser_ar['content'] = $msg . ' Изменения отобразятся на сайте в течении 10 мин.'; $anser_ar['script'] = "\$('#right_content_block').load('/admin/add_goods/', {}, function(){ ajax_init(); } )"; } else { $anser_ar['title'] = 'Товар не добавлен'; $anser_ar['content'] = 'Возникла ошибка при добавлении. ' . $msg; } } echo json_encode($anser_ar); }
<?php } else { ?> <?php if ($merchant->RatingsContext !== 0 && $merchant->RatingsContext !== 2) { ?> <div class="alert alert-block"> <?php _e('Would you like to be the first to write a review?', 'bfi'); ?> <?php if (($merchant->RatingsContext === 1 || $merchant->RatingsContext === 3) && ($merchant->RatingsType == 0 || $merchant->RatingsType == 2)) { ?> <a href="<?php echo $base_url . '/merchant-details/review/' . $merchant->MerchantId . '-' . seoUrl($merchant->Name); ?> " class="btn btn-info"><?php _e('Review', 'bfi'); ?> </a> <?php } ?> </div> <?php } ?> <?php
?> </span></i></span></li> <?php } ?> </ul> <h4 class="headline"> CATEGORIES <span class="line"></span> </h4> <div class="media popular-post"> <ul class="list-group"> <?php foreach ($category as $c) { $cat = seoUrl($c->name); ?> <li data-id="<?php echo site_url() . 'cat/' . $cat; ?> " class="list-group-item get_cat"><i class="fa fa-circle" style="font-size:6px;vertical-align:middle;color:#ccc;"></i> <?php echo $c->name; ?> </li> <?php } ?> </ul> </div> <!--<h4 class="headline"> TAG CLOUD
$shiftId = dbConn::querySingle("SELECT shiftId FROM :prefix:shift WHERE \n plan = :0 AND fromDate = :1 AND toDate = :2 ", $plan, explode("-", str_replace(":", "", $sh))[0], explode("-", str_replace(":", "", $sh))[1]); foreach ($values['productions'] as $prod) { // separate tables if (!in_array($prod, $values['productions'])) { continue; } $has = false; $required = 0; foreach (dbConn::query("SELECT * FROM :prefix:production_shift WHERE production = :0 AND shift = :1", $prod, $shiftId) as $r) { $required = $r['required']; $has = true; } $prodShift = new template("production_shift"); $prodShift->insert("shiftId", $shiftId); $prodShift->insert("disabled", $has ? "" : "shift-disabled"); $prodShift->insert("unique", seoUrl("{$plan}-{$prod}-" . substr(str_replace(":00-", " - ", $sh), 0, 13))); if ($has) { // fill required number of workers, name $prodShift->insert("required", $required); $prodShift->insert("name", $prod); // get workers of one shift in one production foreach (dbConn::query("SELECT * FROM :prefix:worker WHERE production = :0 AND shift = :1", $prod, $shiftId) as $r) { $worker = new template("worker"); $worker->insert("name", $r['name']); $worker->insert("email", $r['email']); $prodShift->insert("workers", $worker->getOutput()); } } $t->insert("shift_productions", $prodShift->getOutput()); } $planTpl->insert("shifts", $t->getOutput());
<?php $base_url = get_site_url(); $language = $GLOBALS['bfi_lang']; if (defined('ICL_LANGUAGE_CODE') && class_exists('SitePress')) { $language = ICL_LANGUAGE_CODE; global $sitepress; if ($sitepress->get_current_language() != $sitepress->get_default_language()) { $base_url .= "/" . ICL_LANGUAGE_CODE; } } $formlabel = get_option('form_key', ''); $formRoute = $base_url . '/sendOffer'; $routeThanks = $base_url . '/thanks/merchant-details/merchantdetails/' . $merchant->MerchantId . '-' . seoUrl($merchant->Name); $privacy = BFCHelper::GetPrivacy($language); ?> <div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t<?php echo $merchant->MerchantTypeId; ?> "> <?php //include('merchant-head.php'); ?> <?php if ($offer != null) { ?> <div class="com_bookingforconnector_merchantdetails-offers"> <?php $offer->OfferId = $offer->PackageId; $offer->Price = $offer->Value; $offerName = BFCHelper::getLanguage($offer->Name, $language);
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> <h4 class="modal-title" id="myModalLabel">Form penawaran</h4> </div> <form action="<?php echo home_url('/prosesco/5'); ?> " method="post"> <div class="modal-body"> <?php $prod = get_post($_POST['kdbb']); $jdlp = $prod->post_title; ?> <div class="col-xs-12 text-center"> <a href="<?php echo home_url('/' . seoUrl($jdlp) . '/' . $prod->ID); ?> " class="thumbnail"> <?php $srcimg = wp_get_attachment_url(get_post_thumbnail_id($prod->ID)); ?> <img src="<?php echo $srcimg; ?> " alt="thumb product"> </a> </div> <div class="table-responsive"> <table class="table"> <tr> <?php
"> <span class="glyphicon glyphicon-remove"></span></a> </td> <td><?php echo $no_urut; ?> </td> <td><?php echo get_the_post_thumbnail($key, array(50, 50)); ?> </td> <td><?php if ($prod->post_title != '') { ?> <a href="<?php echo site_url() . '/' . seoUrl($prod->post_title); ?> "> <?php echo $pmprod = $prod->post_title; ?> </a> <?php } else { echo $pmprod = "Tak Berjudul"; } ?> </td> <td><?php echo $hrg; ?>
/** * Description: Allows the user to add new lessons or edit existing ones to an specific course * @param int course (must be valid, othervise you would be redirected)(determins in what course would you create a lesson) * @param int lesson (if you wnat to edit the course) */ public function add_lesson($course = null, $lesson = NULL) { //check if we got any form data if ($this->input->post('category_id') != NULL) { //Redirect the user $course = $this->input->post('category_id'); $this->session->set_flashdata('course_view', '/en/2-developer/components/views/main_lesson_view_list'); //redirect($this->data['language'].'/developer/course/add_lesson/'.$course, 'refresh'); } //BUGFIX might need deleting //Check the flash data if ($this->session->flashdata('course_view') != null) { //$this->data['lesson_all']=$this->lesson_m->get_by_id('course_id',$course); //$this->data['course_view']=$this->session->userdata('course_view'); } if ($course == NULL or $this->course_m->get_by_ids('course_id', $course) == NULL) { $this->session->set_flashdata('message', $this->lang->line('error_flash_no_course')); redirect($this->data['language'] . '/developer/course/', 'refresh'); } $this->data['course_current'] = $course; $this->data['course'] = $this->course_m->get_by_id($course, false); // Check lesson_id in the URL if ($lesson != NULL and $this->lesson_m->get_by_id('lesson_id', $lesson) != NULL and $this->lesson_m->check_lesson($lesson) != NULL) { /*===LESSON IS AVAILBLE IN THE URL===== * Description: we are checking for the last component in the entry. * if we have it we will load data so it will be displayed for the edit lesson screen */ $l = $this->lesson_m->get_by_id('lesson_id', $lesson); $this->data['l_data'] = $l[0]; } // Load language and course data //$this->data['course']=$this->course_m->get_by_cou_and_cat($category, $course); $this->data['language_lesson'] = $this->language_m->get_all(); //Loading subviews and main view $this->data['lesson_view'] = '/en/1-admin/components/views/main_lesson_create_form'; // Form validation for new lessons if ($this->input->post('submit')) { // Set up the form rules $rules = $this->lesson_m->rules_create_lesson; $rules['lesson_slug']['rules'] .= '|is_unique[lessons.lesson_slug]'; $this->form_validation->set_rules($rules); // Process the form if ($this->form_validation->run() == TRUE) { //Get data from form and put it into an array $data = $this->lesson_m->array_from_post(array('lesson_name', 'lesson_slug', 'language_id', 'course_id')); $data['lesson_slug'] = seoUrl($data['lesson_slug']); $this->lesson_m->save($data); //Set success message $this->session->set_flashdata('success', $this->lang->line('info_flash_add')); redirect($this->data['language'] . '/developer/course/'); } } // Form validation for editing a lessons if ($this->input->post('edit')) { // Set up the form rules $rules = $this->lesson_m->rules_create_lesson; if ($this->data['l_data']->lesson_slug != $this->input->post('lesson_slug')) { $rules['lesson_slug']['rules'] .= '|is_unique[lessons.lesson_slug]'; } $this->form_validation->set_rules($rules); // Process the form if ($this->form_validation->run() == TRUE) { $data = $this->lesson_m->array_from_post(array('lesson_name', 'lesson_slug', 'language_id', 'course_id', 'lesson_id')); $data['lesson_slug'] = seoUrl($data['lesson_slug']); $this->lesson_m->save($data, $lesson); $this->session->set_flashdata('success', $this->lang->line('info_flash_update')); redirect($this->data['language'] . '/developer/course/add_lesson/' . $course . '/' . $lesson); } } $this->data['subview'] = '/en/2-developer/components/views/main_lesson_create_form'; $this->data['lesson'] = $lesson; $this->load->view('en/2-developer/layout/_layout_main', $this->data); }
/** * Description: Edit/Add a new course * @param course_id(optional) (it determins which course will be edited, if its NULL it will create a new course) */ public function edit($course_id = NULL) { // We get all information about categories and difficulties $this->data['dificulty'] = $this->difficulty_m->get(); $this->data['categories'] = $this->category_m->get(); // Check if we got a course in the URl and check if it exist(is valid) if ($course_id != NULL and $this->course_m->get_by_ids('course_id', $course_id) != NULL) { //If its valid get all the information about it and put it into a temporary variable $c $c = $this->course_m->get_by_ids('course_id', $course_id); // $c is an array of objects, we just want an object $this->data['course'] = $c[0]; // Set the category information of our course $this->data['category'] = $this->category_m->get_by_id($this->data['course']->category_id, false); // Set the user information of our course $this->data['user'] = $this->user_m->get_by_id('id', $this->data['course']->author_id); } else { //if the course is NULL or invalid we will just get the user information for creating a course instead of editing an existing course $this->data['user'] = $this->user_m->get_by_id('id', $this->session->userdata('id')); } //Check if the course_id exists and validate the form if ($course_id != NULL) { //Set validation rules $rules = $this->course_m->rules_edit; if ($this->data['course']->c_slug != $this->input->post('c_slug')) { $rules['c_slug']['rules'] .= '|is_unique[courses.c_slug]'; } $this->form_validation->set_rules($rules); // Process the form if ($this->form_validation->run() == TRUE) { //Format the array for saving to the database from the form data $data = $this->course_m->array_from_post(array('title', 'c_slug', 'description', 'category_id')); $data['c_slug'] = seoUrl($data['c_slug']); // Save to database and redirect $this->course_m->save($data, $course_id); redirect($this->data['language'] . '/admin/course'); } } else { //Set validation rules $rules = $this->course_m->rules_edit; $rules['c_slug']['rules'] .= '|is_unique[courses.c_slug]'; $this->form_validation->set_rules($rules); // Process the form if ($this->form_validation->run() == TRUE) { // If the administrator is creating a course it is approved and we add the date of creation //Format the array for saving to the database from the form data $data = $this->course_m->array_from_post(array('title', 'c_slug', 'description', 'category_id', 'approved', 'difficulty_id')); $data['pub_date'] = date('Y-m-d'); $data['author_id'] = $this->session->userdata('id'); $data['c_slug'] = seoUrl($data['c_slug']); // Save to database and redirect $this->course_m->save($data); redirect($this->data['language'] . '/admin/course'); } } // Load the view $this->data['subview'] = 'en/1-admin/components/views/main_course_edit'; $this->load->view('en/1-admin/layout/_layout_main', $this->data); }
} else { ?> <div class="table-responsive"> <table class="table"> <thead> <td>id penawaran</td> <td>Waktu</td> <td>barang</td> <td>Harga</td> <td>qty</td> <td>status</td> </thead> <tbody> <?php foreach ($wpdb->get_results("SELECT * FROM {$t8} WHERE SUBSTRING(id,15,255)='" . $user_ID . "'") as $key => $value) { $brg = get_post(intval($value->kd_prod)); if ($value->status == "0") { $stts = "belum dikonfirmasi"; } else { $stts = "sudah dikonfirmasi"; } echo "<tr>"; echo "<td>" . $value->id . "</td>\n <td>" . $value->tgl . "</td>\n <td><a href='" . home_url('/' . seoUrl($brg->post_title)) . "' >" . $brg->post_title . "</a></td>\n <td>" . $value->harga . "</td>\n <td>" . $value->qty . "</td>\n <td>" . $stts . "</td>\n "; echo "</tr>"; } ?> </tbody> </table> </div> <?php }
$addressData = $resource->AddressData; $indirizzo = BFCHelper::getItem($addressData, 'indirizzo'); $cap = BFCHelper::getItem($addressData, 'cap'); $comune = BFCHelper::getItem($addressData, 'comune'); $provincia = BFCHelper::getItem($addressData, 'provincia'); } $img = plugins_url("images/default.png", dirname(__FILE__)); $imgError = plugins_url("images/default.png", dirname(__FILE__)); if ($resource->ImageUrl != '') { $img = BFCHelper::getImageUrlResized('resources', $resource->ImageUrl, 'resource_list_default'); $imgError = BFCHelper::getImageUrl('resources', $resource->ImageUrl, 'resource_list_default'); } elseif ($merchant->LogoUrl != '') { $img = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'resource_list_default_logo'); $imgError = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'resource_list_default_logo'); } $route = $base_url . '/accommodation-details/resource/' . $resource->ResourceId . '-' . seoUrl($resourceName); ?> <div class="com_bookingforconnector_search-resource"> <div class="com_bookingforconnector_merchantdetails-resource com_bookingforconnector_merchantdetails-resource-t"> <div class="com_bookingforconnector_merchantdetails-resource-features"> <a class="com_bookingforconnector_resource-imgAnchor" href="<?php echo $route; ?> "><img class="com_bookingforconnector_resource-img" src="<?php echo $img; ?> " onerror="this.onerror=null;this.src='<?php echo $imgError; ?> '" /></a> <h4 class="com_bookingforconnector_merchantdetails-resource-name"><a class="com_bookingforconnector_resource-resource-nameAnchor" href="<?php
$addressData = $resource->AddressData; $indirizzo = BFCHelper::getItem($addressData, 'indirizzo'); $cap = BFCHelper::getItem($addressData, 'cap'); $comune = BFCHelper::getItem($addressData, 'comune'); $provincia = BFCHelper::getItem($addressData, 'provincia'); } $img = "/sites/all/modules/bfi/images/default.png"; $imgError = "/sites/all/modules/bfi/images/default.png"; if ($resource->ImageUrl != '') { $img = BFCHelper::getImageUrlResized('resources', $resource->ImageUrl, 'resource_list_default'); $imgError = BFCHelper::getImageUrl('resources', $resource->ImageUrl, 'resource_list_default'); } elseif ($merchant->LogoUrl != '') { $img = BFCHelper::getImageUrlResized('merchant', $merchant->LogoUrl, 'resource_list_default_logo'); $imgError = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'resource_list_default_logo'); } $route = url('accommodation-details/resource/' . $resource->ResourceId . '-' . seoUrl($resourceName)); ?> <div class="com_bookingforconnector_search-resource"> <div class="com_bookingforconnector_merchantdetails-resource com_bookingforconnector_merchantdetails-resource-t"> <div class="com_bookingforconnector_merchantdetails-resource-features"> <a class="com_bookingforconnector_resource-imgAnchor" href="<?php echo $route; ?> "><img class="com_bookingforconnector_resource-img" src="<?php echo $img; ?> " onerror="this.onerror=null;this.src='<?php echo $imgError; ?> '" /></a> <h4 class="com_bookingforconnector_merchantdetails-resource-name"><a class="com_bookingforconnector_resource-resource-nameAnchor" href="<?php
function insert_news($data_ar, $count_word = 80, $rewrite_news = true) { //принимает массив array('url','img','title','text','date') и минимальный размер текста(колличество слов более 4 букв) ; $data_ar['text'] = $this->clear_txt($data_ar['text']); $data_ar['title'] = $this->db->escape_str(strip_tags($data_ar['title'])); $data_ar['donor'] = $this->get_donor_url($data_ar['url']); $this_hash_ar = $this->get_shingles_hash($data_ar['text']); if (count($this_hash_ar) < $count_word) { echo "error #1 small text \n"; return FALSE; } $like_hash_list = $this->get_like_news_hash($this_hash_ar); if ($like_hash_list != false) { //сравнение хешей foreach ($like_hash_list as $news_id => $like_hash_ar) { if ($this->comparison_shingles_hash($this_hash_ar, $like_hash_ar, 60) == true) { //если найденно совпадение текста if (count($this_hash_ar) > count($like_hash_ar) && $rewrite_news == true) { //если новый текст больше старого, то перезапись старого текста новым $data_ar['text'] = $this->change_img_in_txt($data_ar['text'], $data_ar['url']); //замена изображений в тексте $this->CI->db->query(" UPDATE `articles` \n SET \n `title` = '{$data_ar['title']}', \n `text` = '" . $this->db->escape_str($data_ar['text']) . "',\n `donor_url` = '{$data_ar['url']}',\n `donor_host` = '{$data_ar['donor']}', \n `shingles_hash` = '" . serialize($this_hash_ar) . "' \n WHERE `id`='{$news_id}' \n "); echo 'ОК - Запись перезаписана ID-' . $news_id . ' - ' . $data_ar['title'] . "\n"; } echo "error #2 clone text. CloneID-" . $news_id . ' ' . $data_ar['title'] . "\n"; return FALSE; } } } $data_ar['text'] = $this->change_img_in_txt($data_ar['text'], $data_ar['url']); //замена изображений в тексте $data_ar['img_name'] = $this->load_img($data_ar['img'], $data_ar['url']); $data_ar['url_name'] = seoUrl($data_ar['title']); $this->CI->db->query(" INSERT INTO `articles` \n SET\n `title` = '{$data_ar['title']}', \n `text` = '" . $this->db->escape_str($data_ar['text']) . "',\n `img` = '{$data_ar['img_name']}',\n `date` = '{$data_ar['date']}',\n `url_name` = '{$data_ar['url_name']}',\n `donor_url` = '{$data_ar['url']}',\n `donor_host` = '{$data_ar['donor']}', \n `shingles_hash` = '" . serialize($this_hash_ar) . "' \n "); echo 'ОК - Занесена новая новость ID# ' . $this->CI->db->insert_id() . ' - ' . $data_ar['title'] . "\n"; return TRUE; }
if ($query->post_count === 1) { ?> <script> var oneGalleryVideo = true; </script> <?php } if ($query->have_posts()) { ?> <?php while ($query->have_posts()) { $query->the_post(); $index++; $deepLinktitle = seoUrl(get_the_title()); $cats = get_the_category(); $desktopURL = get_post_meta(get_the_ID(), 'medialoft_desktop_url', true); $mobileURL = get_post_meta(get_the_ID(), 'medialoft_mobile_url', true); $poster = get_post_meta(get_the_ID(), 'medialoft_video_poster', true); ?> <div class="gallery-item <?php echo $columnSizeClass; ?> " data-deep-link="<?php echo $deepLinktitle; ?> " data-item-index="<?php echo $index; ?>
the_title(); ?> </h3> <figure> <?php echo the_post_thumbnail(); ?> <p><em>Category: </em><?php echo !empty($category) ? esc_html($category[0]->name) : ''; ?> </p> <p>Day(s): <?php // Set a new variable to contain the html in string form $weekday_links = array(); foreach ($activities_weekday as $day) { $weekday_links[] = '<a href="/activities-2/' . seoUrl($day) . '#' . basename(get_permalink()) . '">' . esc_html($day) . '</a>'; } echo implode(" / ", $weekday_links); ?> </p> <p>Time: <?php echo esc_html(date('h:ia', $activities_start_time)); ?> -<?php echo esc_html(date('h:ia', $activities_end_time)); ?> </p> </figure> </header><!-- .entry-header --> <section> <h4>More Information</h4>
<br /><br /> <div id="firstresources">Loading....</div> <br /><br /> </div> <?php if ($showMap) { } ?> <script type="text/javascript"> jQuery(function($) { jQuery('.moduletable-insearch').show(); var pagelist = Drupal.settings.basePath+'/merchant-details/merchantdetails/<?php echo $merchant->MerchantId; ?> -<?php echo seoUrl($merchant->Name); ?> /?task=getMerchantResources'; console.log(pagelist); jQuery("#firstresources").load(pagelist, function() { var shortenOption = { moreText: "Show More", lessText: "Show Less", showChars: '250' }; jQuery(".com_bookingforconnector_merchantdetails-resource-desc").shorten(shortenOption); }); selTipo = jQuery('select[name=merchantCategoryId] > option:first-child'); if (selTipo.length ) { selTipo.text('<?php
/** * Description: The category editing page, check is the category exists before it can be edited * @param int category_id (used for setting information for editing of a specific category) */ public function edit($category_id = NULL) { //Checking if the category exists if ($category_id != NULL and $this->category_m->get_by_id($category_id, false) != NULL) { //Passing the category information to the view $this->data['category'] = $this->category_m->get_by_id($category_id, false); //setting error message if the category doesn't exist count($this->data['category']) || ($this->data['errors'][] = $this->lang->line('category_error_not_found')); } else { //If there is no category_id or it doesnt exist we will add a new category $this->data['category'] = $this->category_m->get_new(); } // Set up the form rules $rules = $this->category_m->rules; if ($this->data['category']) { if ($this->data['category']->cat_slug != $this->input->post('cat_slug')) { $rules['cat_slug']['rules'] .= '|is_unique[category.cat_slug]'; } } else { $rules['cat_slug']['rules'] .= '|is_unique[category.cat_slug]'; } $this->form_validation->set_rules($rules); // Process the form if ($this->form_validation->run() == TRUE) { //Formating the data from the form $data = $this->category_m->array_from_post(array('category_name', 'cat_slug', 'description', 'description_sr')); $data['cat_slug'] = seoUrl($data['cat_slug']); //Saving to the database $this->category_m->save($data, $category_id); redirect($this->data['language'] . '/admin/category'); } // Load the views $this->data['subview'] = 'en/1-admin/components/views/main_category_edit'; $this->load->view('en/1-admin/layout/_layout_main', $this->data); }
if (isset($_SESSION['myusername'])) { $loginname = $_SESSION['myusername']; if ($loginname == $name) { ?> <li><a href="#newpost" data-toggle="tab">Create New Post</a></li> <?php } } ?> </ul> <div id="my-tab-content" class="tab-content"> <div class="tab-pane active" id="red" style="padding: 10px;"> <?php if ($total_posts > 0) { foreach ($author[0]['posts'] as $p) { $title = seoUrl($p->title); ?> <div class="post_<?php echo $p->id; ?> "> <div class="panel panel-default blog-container"> <div class="panel-body"> <h4 class="headline m-top-md"> <a href="<?php echo site_url() . 'post/' . $title; ?> "><?php echo $p->title; ?> </a>