function deny_testimonial($testimonial_id) { $testi = new Testimonials(); $testi->testimonial_id = $testimonial_id; $testi->status = DENIED; $testi->change_status(); }
function lamtech_preprocess_node(&$vars) { // kpr($vars); if (isset($vars['content']['field_category']) && count($vars['content']['field_category'])) { $vars['category'] = $vars['content']['field_category'][0]; unset($vars['content']['field_category']); } $helper = NULL; switch ($vars['type']) { case 'cta': require_once DRUPAL_ROOT . '/' . drupal_get_path('theme', 'lamtech') . '/tpl/anb/cta/CTA.php'; $helper = new CTA(); $helper->preprocess($vars); break; case 'features_intro': require_once DRUPAL_ROOT . '/' . drupal_get_path('theme', 'lamtech') . '/tpl/anb/fi/FeaturesIntro.php'; $helper = new FeaturesIntro(); $helper->preprocess($vars); break; case 'gallery': require_once DRUPAL_ROOT . '/' . drupal_get_path('theme', 'lamtech') . '/tpl/anb/gallery/Gallery.php'; $helper = new Gallery(); $helper->preprocess($vars); break; case 'testimonials': require_once DRUPAL_ROOT . '/' . drupal_get_path('theme', 'lamtech') . '/tpl/anb/testimonials/Testimonials.php'; $helper = new Testimonials(); $helper->preprocess($vars); break; case 'hero': require_once DRUPAL_ROOT . '/' . drupal_get_path('theme', 'lamtech') . '/tpl/anb/hero/Hero.php'; $helper = new Hero(); $helper->preprocess($vars); break; case 'team': require_once DRUPAL_ROOT . '/' . drupal_get_path('theme', 'lamtech') . '/tpl/anb/team/Team.php'; $helper = new Team(); $helper->preprocess($vars); break; case 'statistic': require_once DRUPAL_ROOT . '/' . drupal_get_path('theme', 'lamtech') . '/tpl/anb/statistic/Statistic.php'; $helper = new Statistic(); $helper->preprocess($vars); break; case 'contact_info': require_once DRUPAL_ROOT . '/' . drupal_get_path('theme', 'lamtech') . '/tpl/anb/contact-info/ContactInfo.php'; $helper = new ContactInfo(); $helper->preprocess($vars); break; case 'advanced_page': unset($vars['content']['field_hide_title']); break; } // kpr($vars); }
function render() { global $login_uid, $page_uid; $testi = new Testimonials(); $testi->recipient_id = isset($this->recipient_id) ? $this->recipient_id : $page_uid; $testi->status = isset($this->testimonial_status) ? $this->testimonial_status : APPROVED; $this->Paging["count"] = $testi->get_multiple_testimonials(TRUE); $result = $testi->get_multiple_testimonials(FALSE, $this->Paging["show"], $this->Paging['page']); $this->links = $this->manage_links($result); $this->inner_HTML = $this->generate_inner_html(); $content = parent::render(); return $content; }
public function form() { $this->views = new Views(new Template("admin")); Phalanx::loadClasses('Testimonials'); $this->views->data = Testimonials::get($this->get->id); $this->views->display('testimonials_form.phtml'); }
public function deleteTestimonials() { $id = Input::get('id'); $getTestimonials = Testimonials::find($id); if (!$getTestimonials->delete()) { return 1; } return 0; }
function display_page_content() { $testimonials = Testimonials::FindAll(); ?> <div id="edit-header" class="testimonialnav"> <div class="nav-left column"> <h1>Choose a Testimonial to Edit</h1> </div> <div class="nav-right column"> <a href="<?php echo get_link("admin/edit_testimonial/add"); ?> " class="hcd_button">Add a new Testimonial</a> </div> <div class="clearleft"></div> </div> <p class="announce">Testimonials are stored for insertion into content throughout the site. Depending on your site, there might be a template or two that displays one at random. All testimonials are displayed using a “blockquote” style. </p> <?php if (count($testimonials) > 0) { ?> <div id="table-header" class="testimonials"> <strong class="item-link">Testimonial Name</strong> <span class="item-path">Content snippet</span> <span class="item-revised">Attribution</span> <span>Featured?</span> </div> <ul id="listitems" class="managelist testimoniallist"> <?php foreach ($testimonials as $thetest) { $this_feature = $thetest->is_featured ? 'Yes' : ''; echo "\t\t<li>\n\t\t\t<span class=\"item-link\"><a href=\"" . get_link("/admin/edit_testimonial/{$thetest->id}") . "\">" . $thetest->get_title() . " <small>EDIT</small></a></span>\n\t\t\t<span class=\"item-path\">" . $thetest->get_excerpt(48, " ") . "</span>\n\t\t\t<span class=\"item-revised\">" . $thetest->attribution . "</span>\n\t\t\t<span>" . $this_feature . "</span>\n\t\t</li>\n"; } ?> </ul> <?php } else { echo "\t\t<h3 class=\"empty-list\">There are no testimonials to edit. <a class=\"short\" href=\"" . get_link("admin/edit_testimonial/add") . "\">Add one if you like</a>.</h3>"; } }
public function testGet_multiple_testimonials_WithInvalid_Id() { $testi = new Testimonials(); try { $testi->sender_id = 'abc'; $testi->get_multiple_testimonials(); } catch (PAException $e) { $error = $e->message; $code = $e->code; } $this->assertEquals($code, INVALID_PARAMETER); }
function display_page_content() { // Double check that the proper columns exist $add_testimonial = requestIdParam() == "add" ? true : false; if ($add_testimonial) { $testimonial = $testimonialtitle = $testimonialcontent = $testimonialatt = $testimonialfeat = null; } else { $testimonial_id = requestIdParam(); $testimonial = Testimonials::FindById($testimonial_id); $testimonialtitle = $testimonial->get_title(); $testimonialcontent = $testimonial->content; $testimonialatt = $testimonial->attribution; $testimonialfeat = $testimonial->is_featured; } ?> <script type="text/javascript"> $().ready(function() { $("#edit_testimonial").validate({ rules : { title: "required" }, messages: { title: "Please enter a title for this testimonial" } }); }); </script> <div id="edit-header" class="testimonialnav"> <h1><?php if ($add_testimonial) { echo 'Add'; } else { echo 'Edit'; } ?> Testimonial</h1> </div> <form method="POST" id="edit_testimonial"> <p class="display_name"> <label for="title">Testimonial Display Name:</label> <?php textField("display_name", $testimonialtitle, "required: true"); ?> <br /> <span class="hint">This name will be used in the admin only — it will not display on the front-end</span> </p> <p> <label for="content">Testimonial Content:</label> <span class="hint">Quotes will get added when displayed, so please do not add quotes here.</span><br /> <?php textArea("content", $testimonialcontent, 98, EDIT_WINDOW_HEIGHT / 2); ?> </p> <p> <label for="attribution">Testimonial attribution:</label> <?php textField("attribution", $testimonialatt); ?> <br /> <span class="hint">Optional. A “credit” for the testimonial quote.</span> </p> <p> <label for="featured"> <input type="checkbox" name="featured" id="featured"<?php if ($testimonialfeat) { ?> checked="checked"<?php } ?> > Feature this Testimonial </label> <span class="hint">Optionally show this testimonial in special places as dictated by the site design.</span> </p> <div id="edit-footer" class="testimonialnav clearfix"> <div class="column half"> <p> <input type="submit" class="submitbutton" name="submit" value="Save Testimonial" /> <br /> <input type="submit" class="submitbuttonsmall" name="submit" value="Save and Return to List" /> </p> </div> <div class="column half last"> <?php $user = Users::GetCurrentUser(); if ($user->has_role() && requestIdParam() != "add") { ?> <p><label for="delete">Delete this testimonial? <input name="delete" id="delete" class="boxes" type="checkbox" value="<?php echo $testimonial->id; ?> " /></label> <span class="hint">Check the box and then click “Save” to delete this testimonial from the database. Warning: if this testimonial is removed but still being used in content, an error will be displayed.</span> </p> <?php } ?> </div> </div> </form> <?php }
<?php require_once "{$path_prefix}/api/Testimonials/Testimonials.php"; global $page_uid, $login_uid; if ($_form) { $testi = new Testimonials(); $testi->sender_id = $login_uid; $testi->recipient_id = $page_uid; $testi->body = $_form['body']; try { $id = $testi->save(); } catch (PAException $e) { $msg = $e->message; $code = $e->code; } } // Here we call the function $msg_array = array(); $msg_array['failure_msg'] = $msg; $msg_array['success_msg'] = 9013; $login = User::get_login_name_from_id($page_uid); $current_url = PA::$url . '/' . FILE_USER_BLOG . '?uid=' . $page_uid; $url_perms = array('current_url' => $current_url, 'login' => $login); $url = get_url(FILE_USER_BLOG, $url_perms); $redirect_url = $url; set_web_variables($msg_array, $redirect_url);
<!-- Insert a Testimonial --> <div id="test_insert" class="dropslide" style="display: none; "> <p><span class="hint">Click the icons to insert the testimonial code for it in the edit window above. Be sure your cursor is where you want it first. </span></p> <?php $testimonials = Testimonials::FindAll(); if (is_array($testimonials) and count($testimonials) > 0) { ?> <table id="images" class="dropdown" cellpadding="0" cellspacing="0" border="0" width="98%"> <thead> <th>Name</th> <th>Content Snippet</th> <th colspan="3">Design Options</th> </thead> <tbody> <?php foreach ($testimonials as $test) { ?> <tr> <td><strong><a href="#" onclick="insertDocument('testimonial:<?php echo $test->slug; ?> ', '{{', '}}'); return false;"><?php $test->the_title(); ?> </strong></a></td> <td><?php $test->the_excerpt(72, " "); ?> <td><a href="#" onclick="insertDocument('testimonial:<?php
public function getTestimonials($limit = 5) { return Testimonials::get()->limit($limit); }
function testimonial_display($content_to_display) { $pattern_recog = array("left" => array("{", "{"), "right" => array("}", "}"), "center" => array("{", "}")); foreach ($pattern_recog as $float => $direction) { $testimonialPattern = "*" . $direction[0] . "{2}(testimonial:[A-Za-z0-9_ \\-]+)" . $direction[1] . "{2}*"; $testimonialNames = getFilterIds($content_to_display, $testimonialPattern); $testimonials = array(); if (count($testimonialNames) > 0) { foreach ($testimonialNames as $name) { $sploded = explode(":", $name); $testimonials[] = Testimonials::FindByName($sploded[1]); } } foreach ($testimonials as $testimonial) { if (is_object($testimonial)) { $replacement = $testimonial->displayTestimonial($float); $search = "{$direction[0]}{$direction[0]}testimonial:" . $testimonial->slug . "{$direction[1]}{$direction[1]}"; $content_to_display = str_replace($search, $replacement, $content_to_display); } else { $content_to_display = "<span class=\"database_error\">HCd>CMS Warning: Testimonial not found!</span> " . $content_to_display; } } } return $content_to_display; }
protected $cptslug_plural = 'testimonials'; protected $singular = 'Testimonial'; protected $plural = 'Testimonials'; protected $icon = 'dashicons-format-quote'; // Arguments to define the CPT protected $cpt_args = array('exclude_from_search' => true, 'show_in_nav_menus' => false); // Arguments for the CPT loop protected $loop_args = array('no_found_rows' => true, 'orderby' => 'menu_order', 'order' => 'ASC', 'quantity' => 500); public function display_loop($pid) { $html = ""; $reviewer = get_post_meta($pid, otm_cmb_prefix($this->cptslug) . 'reviewer', true); $html .= "<li class='" . $this->cptslug . "'>"; $html .= "<h3>" . get_the_title() . "</h3>"; $html .= apply_filters('the_content', get_the_content()); if (!empty($reviewer)) { $html .= "<p class='cite'> - <span class='reviewer' itemprop='reviewer'>" . esc_attr($reviewer) . "</span></p>"; } $html .= "</li>"; return $html; } public function cmb_metaboxes(array $meta_boxes) { // Start with an underscore to hide fields from custom fields list $prefix = otm_cmb_prefix($this->cptslug); $meta_boxes[] = array('id' => $this->cptslug . '_metabox', 'title' => sprintf(__('%s Information', 'evans-mu'), $this->singular), 'object_types' => array($this->cptslug), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array(array('name' => __('Reviewer Name', 'evans-mu'), 'id' => $prefix . 'reviewer', 'type' => 'text'))); return $meta_boxes; } } $testimonials = new Testimonials(); $testimonials->hooks();
<body> <? if(isset($success)) { ?> <div class="alert"> <?php echo $success; ?> </div> <? } ?> <div id="blog_overview"> <ul class="btn"> <li><a href="<?php echo $ROOT_URL; ?> _admin/modules_testimonials/view/">Back</a></li> </ul> </div> <? $testi = Testimonials::findTestimonials($_REQUEST['id']); ?> <form id="blog_page" action="<? $PHP_SELF; ?>" method="post"> <h3>ACM Testimonials</h3> <fieldset style="width:1050px;"> <legend>News Panel</legend> <ul> <li> <label for="name">Name</label> <input type="text" id="name" name="name" value="<?php echo stripslashes($testi->fldTestimonialsName); ?> "> </li> <li> <label for="description"> <textarea cols="" rows="" id="description" name="description"><?php
<textarea class="form-control input-sm" id="txt" name="txt" style="height:161px;resize:none;" placeholder="enter testimonials"></textarea> </div> <div style="margin-top:20px;"> <button type="submit" id="newAnn" class="btn_darkblue">Submit</button> </div> {{Form::token()}} </form> </div> @endif <div class="editprofile_info"> <div class="bggreen notification_header"> Testimonials </div> <div class="friendrequest_list"> <?php $testimonials = Testimonials::orderBy('id', 'DESC')->get(); ?> @if(count($testimonials) != 0) @foreach($testimonials as $testimonial) <?php $userInfo = UserInfo::where('user_id', '=', $testimonial['user_id'])->first(); ?> <div class="friendrequest_row"> <div class="notification_content"> <span>{{$userInfo['firstname']}},{{$userInfo['lastname']}}</span> <p>{{$testimonial['testimonials']}}</p> <span>created at: {{$testimonial['created_at']}}</span> </div> @if(Auth::User()['isAdmin'] == 1 || $userInfo['user_id'] == Auth::User()['id']) <a class="notification_action" href="javascript:void(0);" data-id="{{$testimonial['id']}}"> <i class="demo-icon icon-remove-user"></i>
<?php include "../../../classes/Database.php"; include "../../../classes/Connection.php"; include_once "../../../includes/bootstrap.php"; include "../../../classes/Testimonials.php"; include "../../../classes/AdminAction.php"; include "../../../includes/security.funcs.inc"; include_once "../../../includes/Pagination.php"; if (isset($_POST['submit'])) { $_POST = sanitize($_POST); $testimonials = $_POST; settype($testimonials, 'object'); Testimonials::addTestimonials($testimonials); $success = "testimonials Successfully saved!"; $updates = 'Add new testimonials content'; AdminAction::addAdminAction($_SESSION['admin_name'], $updates); } ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $ROOT_URL; ?> _admin/_assets/css/core3.css" /> <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $ROOT_URL; ?>
<blockquote> <?php echo substr($page1->fldPagesDescription, 0, 200); ?> ... <a href="<?php echo $root; ?> about-us.html">Read more</a> </blockquote> </li> <li class="last"> <hgroup> <h2>Customer Testimonials</h2> <hr /> </hgroup> <? $testi = Testimonials::findTestimonialsHome();?> <blockquote> <?php echo $testi->fldTestimonialsDescription; ?> <!-- This section is for Testimonial Submitter. Do not move or re-place tag. --> <div class="testi_user"> <strong><?php echo $testi->fldTestimonialsName; ?> </strong>, <?php echo $testi->fldTestimonialsWebsite; ?> </div> </blockquote> </li> </ul>
if ($file == false) { $msg = "Unable to upload photo <br>" . $myUploadobj->error; $error = TRUE; } else { $login_user->picture = $file; $_SESSION['user']['picture'] = $file; } } try { $login_user->save(); } catch (PAException $e) { $msg = "{$e->message}"; $save_error = TRUE; } } $count_testimonial = Testimonials::count_testimonials($login_uid, PENDING); $page_id = PAGE_USER_PRIVATE; // load all support code // these should eventually be collapsed into one file $parameter = js_includes('iutil.js'); $parameter .= js_includes('json.js'); $parameter .= js_includes('idrag.js'); $parameter .= js_includes('idrop.js'); $parameter .= js_includes('isortables.js'); // load code to initialize drag&drop in this page $parameter .= js_includes('userpage.js'); $parameter .= build_rsd_link_rel("user:"******"<script language='javascript' type='text/javascript'>\n // var uid = {$login_uid};\n var page_id = {$page_id};\n </script>"; } // accessing page settings data
/** * Function : setup_module() * Purpose : call back function to set up variables * used in PageRenderer class * To see how it is used see api/PageRenderer/PageRenderer.php * @param $column - string - contains left, middle, right * position of the block module * @param $moduleName - string - contains name of the block module * @param $obj - object - object reference of the block module * @return type string - returns skip means skip the block module * returns rendered html code of block module */ function setup_module($column, $module, $obj) { global $network_info, $paging; $user_name = PA::$page_user->login_name; switch ($module) { case 'EventCalendarSidebarModule': $obj->assoc_id = PA::$page_uid; $obj->assoc_type = "user"; // this is the personal calendar if (PA::$login_uid != PA::$page_uid) { $obj->may_edit = false; } else { $obj->may_edit = true; } break; case 'UserPhotoModule': $obj->block_type = 'UserPhotoBlock'; $obj->uid = PA::$page_uid; break; case 'ImagesModule': PA::$page_uid == PA::$login_uid ? $obj->title = 'My Gallery' : ($obj->title = sprintf(__("%s's Gallery"), ucfirst($user_name))); $obj->uid = PA::$page_uid; break; case 'AboutUserModule': $obj->mode = PUB; $obj->title = 'About:'; $obj->block_type = 'AboutUser'; $obj->uid = PA::$page_uid; break; case 'FlickrModule': $obj->block_type = 'UserPhotoBlock'; $obj->uid = PA::$page_uid; break; case 'RelationsModule': PA::$page_uid == PA::$login_uid ? $obj->title = 'My Relations' : ($obj->title = sprintf(__("%s's Relations"), ucfirst($user_name))); $obj->uid = PA::$page_uid; break; case 'MyNetworksModule': PA::$page_uid == PA::$login_uid ? $obj->title = 'My Networks' : ($obj->title = sprintf(__("%s's Networks"), ucfirst($user_name))); $obj->uid = PA::$page_uid; break; case 'MyLinksModule': PA::$page_uid == PA::$login_uid ? $obj->title = 'My Links' : ($obj->title = sprintf(__("%s's Links"), ucfirst($user_name))); $obj->uid = PA::$page_uid; break; case 'MyGroupsModule': $obj->block_type = 'usergroups'; $obj->uid = PA::$page_uid; PA::$page_uid == PA::$login_uid ? $obj->title = 'My Groups' : ($obj->title = sprintf(__("%s's Groups"), ucfirst($user_name))); break; case 'InRelationModule': $status = null; $extra = unserialize($network_info->extra); if ($extra['reciprocated_relationship'] == NET_YES) { $status = APPROVED; // If the network operator has enabled reciprocated relationships, show only approved friends, otherwise all friends will be listed. } $relations_ids = Relation::get_all_user_ids((int) PA::$page_uid, 6, $cnt = FALSE, $show = 'ALL', $page = 0, $sort_by = 'created', $direction = 'DESC', $status); $obj->user_name = PA::$page_user->first_name; $obj->uid = PA::$page_uid; $obj->links = $relations_ids; break; case 'RecentCommentsModule': PA::$page_uid == PA::$login_uid ? $obj->title = 'My Comments' : ($obj->title = sprintf(__("%s's Comments"), ucfirst($user_name))); $obj->block_type = 'usercomments'; $obj->uid = PA::$page_uid; break; case 'ShowContentModule': global $post_type_message; if (!empty($_GET['post_type'])) { $post_type = $_GET['post_type']; } else { $post_type = 'all'; } $content_type = get_content_type($post_type); $obj->cid = @$_GET['cid']; $obj->mode = PUB; $obj->block_type = HOMEPAGE; $obj->content_type = $content_type; $obj->uid = PA::$page_uid; $obj->block_heading = sprintf(__("%s's Blog"), PA::$page_user->first_name); $obj->message = $post_type_message[$post_type]; $obj->Paging["page"] = 1; $obj->Paging["show"] = 10; break; case 'LinkModule': $delicious_id = PA::$page_user->get_profile_field('external', 'delicious'); if (!$delicious_id) { return "skip"; } $obj->block_type = 'UserPhotoBlock'; $obj->delicious_id = $delicious_id; $obj->title = 'Delicious'; break; case 'ProfileFeedModule': $profile_feeds = UserProfileFeed::get_user_profile_feeds(PA::$page_uid, PA::$login_uid); if (empty($profile_feeds)) { return 'skip'; } $obj->profile_feeds = $profile_feeds; $obj->title = PA::$page_user->first_name . "'s " . $obj->title; break; case 'ShowTestimonialModule': //FIXME: probably querying testimonials at least twice here - //once to determine whether to skip, and once or more inside //ShowTestimonialModule. $count_testimonial = Testimonials::count_testimonials(PA::$page_uid, APPROVED); if ($count_testimonial == 0) { return 'skip'; } $obj->testimonial_status = APPROVED; $obj->title = ucfirst(PA::$page_user->first_name) . "'s testimonials"; $obj->mode = PUB; $obj->Paging["page"] = $paging["page"]; $obj->Paging["show"] = 3; break; case 'ShowUserCommentModule': //FIXME: probably querying comments at least twice here - once to //determine whether to skip, and once or more inside //ShowUserCommentModule to actually get the comments. $count_comment = Comment::count_comment(PA::$page_uid, TYPE_USER); if ($count_comment == 0) { return 'skip'; } $obj->Paging["page"] = $paging["page"]; $obj->Paging["show"] = 3; $obj->title = 'Comments for ' . ucfirst(PA::$page_user->first_name); break; } }
/** * Draw page text */ public function DrawText() { global $objLogin; $objGallery = new GalleryAlbums(); $objContactUs = ContactUs::Instance(); $replace_needles = 1; $module_page = false; if (!count($this->page)) { return false; } // dont show this page if it was expired if (!$objLogin->IsLoggedInAsAdmin() && $this->page['finish_publishing'] != '0000-00-00' && date('Y-m-d') > $this->page['finish_publishing']) { draw_important_message(_PAGE_EXPIRED); return false; } if ($this->page['content_type'] == 'article' && isset($this->page['page_text'])) { $page_text = decode_text($this->page['page_text'], false); echo '<div class="pages_contents">'; if (preg_match('/{module:gallery}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:gallery}/i', $objGallery->DrawGallery(false), $page_text, 1); } if (preg_match_all('/{module:album=(.*?)}/i', $page_text, $matches)) { $module_page = true; if (is_array($matches[1])) { foreach ($matches[1] as $key => $val) { if (strtolower($val) != 'code') { $val = @preg_replace('/[^A-Za-z0-9:]/i', '', $val); $page_text = @preg_replace('/{module:album=' . $val . '}/i', $objGallery->DrawAlbum($val, false), $page_text, 1); } } } } if (self::$PROJECT == 'MedicalAppointment') { if (preg_match('/{module:about_us}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:about_us}/i', Clinic::DrawAboutUs(false), $page_text, 1); } } if (self::$PROJECT == 'HotelSite') { if (preg_match('/{module:about_us}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:about_us}/i', Hotels::DrawAboutUs(false), $page_text, 1); } if (preg_match('/{module:rooms}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:rooms}/i', Rooms::DrawRoomsInfo(false), $page_text, 1); } if (preg_match('/{module:testimonials}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:testimonials}/i', Testimonials::DrawTestimonails(false), $page_text, 1); } } if (preg_match('/{module:contact_us}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:contact_us}/i', $objContactUs->DrawContactUsForm(false), $page_text, 1); } if (preg_match('/{module:faq}/i', $page_text)) { $module_page = true; $page_text = @preg_replace('/{module:faq}/i', FaqCategories::DrawFaqList(false), $page_text, 1); } if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { $page_text = stripslashes($page_text); } if ($this->page['is_home']) { if (self::$PROJECT == 'HotelSite') { Campaigns::DrawCampaignBanner('standard'); Campaigns::DrawCampaignBanner('global'); } } //echo $page_text; //echo "<hr>"; // draw all needed blocks for Home page if ($this->page['is_home']) { if (self::$PROJECT == 'BusinessDirectory') { if (ModulesSettings::Get('listings', 'show_categories_home_block') == 'yes') { Categories::DrawHomePageBlock(); } } else { if (self::$PROJECT == 'ShoppingCart') { if (ModulesSettings::Get('products_catalog', 'is_active') == 'yes') { Campaigns::DrawCampaignBanner(); if (ModulesSettings::Get('products_catalog', 'show_featured_block') == 'home page') { Products::DrawFeaturedBlock('home'); } if (ModulesSettings::Get('products_catalog', 'show_new_products_block') == 'home page') { Products::DrawNewProductsBlock(); } Categories::DrawHomePageBlock(); } } } } // draw comments form if (!$this->page['is_home'] && !$module_page) { if (Modules::IsModuleInstalled('comments')) { if (ModulesSettings::Get('comments', 'comments_allow') == 'yes' && $this->page['comments_allowed']) { $objComments = new Comments(); $objComments->DrawArticleComments($this->page['id']); } } } echo '</div>'; } else { if ($this->page['content_type'] == 'link' && isset($this->page['link_url'])) { $link_url = decode_text($this->page['link_url']); echo '<div class="pages_contents">'; echo '<a href="' . $link_url . '">' . $link_url . '</a>'; echo '</div>'; } } }
<?php $tag = 'testimonials'; $obj = new Testimonials(); $data = $obj->getByTag($tag); ?> <div class="sixcol column"> <h1>Top Experts</h1> <div class="experts"> <div class="expert-preview"> <div class="expert-meta"> <div class="expert-image bordered-image"> <img src="assets/img/expAvatar.jpg" class="avatar" width="96" alt=""> </div> <div class="user-links"> <a href="http://twitter.com/" class="twitter" target="_blank" title="Twitter"></a> <a href="http://www.facebook.com/" class="facebook" target="_blank" title="Facebook"></a> <a href="http://www.tumblr.com/" class="tumblr" target="_blank" title="Tumblr"></a> <a href="http://vimeo.com/" class="vimeo" target="_blank" title="Vimeo"></a> </div> </div> <div class="expert-text"> <h3>Steven Granger</h3> <div class="clear"></div> <span class="expert-signature">Project Manager</span> <p>Cras a neque diam. Aenean dapibus accumsan velit eget imperdiet. Quisque sapien neque, fermentum ac pharetra ac, iaculis a elit. Morbi tincidunt, lectus et dignissim pharetra, elit leo lacinia purus, eu porta. Aenean adipiscing, sed lacinia sapien tincidunt.</p> </div>
</tr> </thead> <tbody id="alter_rows"> <?php $count_record = Testimonials::countTestimonials(); if (!isset($_REQUEST['page'])) { $page = 1; } else { $page = $_GET[page]; } $pagination = new Pagination(); //for display $pg = $pagination->page_pagination(20, $count_record, $page, 20); //$result_prod = mysql_query($query_Recordset2.$pg[1]); $testi = Testimonials::findAll($pg[1]); ?> <? if($count_record == 0) { ?> <tr> <td colspan="6" align="center" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#F00; font-weight:bold">No Record Found</td> </tr> <? } else { foreach($testi as $testis) { ?> <tr> <td> <?php echo $testis->fldTestimonialsID; ?> </td> <td><?php