コード例 #1
0
 public function AddExtraHTMLToSidebar(&$company)
 {
     define('API', 'PS');
     require_once 'siteadmin/includes/config/affiliatewindow.php';
     $result = CPHelper::getStaggImageHTML($company['staggurl']);
     $result .= '<div id="sidebar-merchantDescription-main"><h3>' . (empty($company['sidebar_title']) ? 'Quick Glance' : $company['sidebar_title']) . '</h3>';
     $result .= mb_str_replace('{logo}', '<img src="' . $company['logourl'] . '" style="float:left; margin:5px;"/>', $company['sidebar']);
     if (!empty($company['displayurl'])) {
         list($cloakedURL, $realURL) = CPHelper::getCompanyURLs($company['id'], $company['displayurl'], $company['source']);
         $result .= '<ul><li class="official-website"><h4>Official Website</h4><a href="' . $cloakedURL . '" target="_blank">' . $realURL . '</a></li></ul>';
     }
     $result .= '</div>';
     $company['sidebar'] = $result;
 }
コード例 #2
0
?>
" />
</form>
<div id="articleContent" >
<h3 style="margin-bottom:0px;"><?php 
echo $this->catname;
?>
</h3>
<div style="color:#666;"><em><?php 
echo $this->results_description;
?>
</em></div>
<div style="clear:both;margin-bottom:20px;"></div>
<?php 
foreach ($this->list as $i => $item) {
    list($cloakedURL, $realURL) = CPHelper::getCompanyURLs($item['id'], $item['displayurl'], $item['source']);
    //echo "cloakedURL=<pre>";print_r($cloakedURL);echo "</pre><hr>";
    //echo "this->plist_c=<pre>";print_r($this->plist_c);echo "</pre><hr>";
    $logo = !empty($item['logourl']) ? '<img src="' . $item['logourl'] . '" style="float:left; margin:5px;" />' : '';
    $description = mb_str_replace('{logoleft}', '', strip_tags($item['content']));
    $description = mb_strlen($description) > 250 ? mb_substr($description, 0, 250) . '..' : $description;
    $pageURL = CPRoute::_('index.php?type=base&mod=companies&what=page&cat=' . $item['path'] . '&page=' . $item['alias']);
    ?>
	<table cellpadding="0" cellspacing="0" border="0">
	<tr>
	<td style="width:100px;" valign="top"><a href="<?php 
    echo $pageURL;
    ?>
"><?php 
    echo $logo;
    ?>