?> </ul> <?php } if (!empty($my_connects_record)) { ?> <p class="margin-top-40"><strong>My Connects (<?php echo number_format($my_connects_totalcount); ?> )</strong></p> <ul class="profile-more-photos"> <?php foreach ($my_connects_record as $mcKey => $mcValue) { $friend_full_name = $mcValue["first_name"] . " " . $mcValue["last_name"]; $facebookUserImage = getUserImage($mcValue["user_id"], $mcValue["user_facebook_id"], NULL, 70, 70); echo '<li><a href="' . getPublicProfileUrl($mcValue["username"]) . '" title="' . $friend_full_name . '"><img src="' . $facebookUserImage . '" alt="image" class="img-circle lazy my-connects-img" data-original="' . $facebookUserImage . '"/></a></li>'; } ?> </ul> <?php } ?> </div> </div> <div class="col-lg-8"> <div class="margin-bottom-20"> <div class="btn-group"> <a href="<?php echo current_url();
public function updateSitemap() { $this->ci =& get_instance(); $this->ci->load->database(); $this->ci->load->model('Common_model'); // $model = $this->ci->Common_model; $model = new Common_model(); $xml = '<?xml version = "1.0" encoding = "UTF-8"?>' . "\n"; $xml .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">' . "\n"; $xml .= '<url><loc>' . base_url() . '</loc><lastmod>' . date('Y-m-d') . 'T' . date('H:i:s') . '+00:00</lastmod><changefreq>weekly</changefreq><priority>1.00</priority></url>' . "\n"; // all the static links $static_links_without_base_url = array('contact-us', 'about-us', 'how-it-works', 'privacy-policy', 'terms', 'login', 'register', 'forgot-password'); foreach ($static_links_without_base_url as $slKey => $slValue) { $xml .= '<url><loc>' . base_url($slValue) . '</loc><lastmod>' . date('Y-m-d') . 'T' . date('H:i:s') . '+00:00</lastmod><changefreq>weekly</changefreq><priority>0.85</priority></url>' . "\n"; } // all the active trips $trip_records = $model->fetchSelectedData('url_key', TABLE_TRIPS, array('trip_status' => '1')); foreach ($trip_records as $trKey => $trValue) { $trip_url = getTripUrl($trValue['url_key']); $xml .= '<url><loc>' . $trip_url . '</loc><lastmod>' . date('Y-m-d') . 'T' . date('H:i:s') . '+00:00</lastmod><changefreq>weekly</changefreq><priority>0.85</priority></url>' . "\n"; } // all the active users $user_records = $model->fetchSelectedData('username', TABLE_USERS, array('user_status' => '1')); foreach ($user_records as $urKey => $urValue) { $public_profile_url = getPublicProfileUrl($urValue['username']); $xml .= '<url><loc>' . $public_profile_url . '</loc><lastmod>' . date('Y-m-d') . 'T' . date('H:i:s') . '+00:00</lastmod><changefreq>weekly</changefreq><priority>0.85</priority></url>' . "\n"; } // all the active blogs $blog_records = $model->fetchSelectedData('blog_url_key', TABLE_BLOGS, array('blog_status' => '1')); foreach ($blog_records as $brKey => $brValue) { $blog_url = base_url('blog/read/' . $brValue['blog_url_key']); $xml .= '<url><loc>' . $blog_url . '</loc><lastmod>' . date('Y-m-d') . 'T' . date('H:i:s') . '+00:00</lastmod><changefreq>weekly</changefreq><priority>0.85</priority></url>' . "\n"; } // all the view photo pages $photo_records = $model->fetchSelectedData('image_name', TABLE_PHOTOS, array('image_name !=' => '', 'album_key !=' => '')); foreach ($photo_records as $prKey => $prValue) { $photo_url = base_url('view/album/' . $prValue['image_name']); $xml .= '<url><loc>' . $photo_url . '</loc><lastmod>' . date('Y-m-d') . 'T' . date('H:i:s') . '+00:00</lastmod><changefreq>weekly</changefreq><priority>0.85</priority></url>' . "\n"; } $xml .= '</urlset>'; // prd($xml); $file = fopen(APPPATH . '/../sitemap.xml', 'w'); fwrite($file, $xml); fclose($file); die; }