コード例 #1
0
ファイル: ads.php プロジェクト: sudogem/brcms
$sql = " select banner_clickURL from corporate_partners_imgs ba ";
$sql .= " where ba.banner_show = '1' ";
if (!($result = $db->query($sql))) {
    die('Error:' . $db->error());
}
$links = array();
while ($links[] = $db->fetcharray()) {
}
$db->freeresult();
$sponsoredlinks = '';
for ($i = 0; $i < count($links) - 1; $i++) {
    // Count the active banners
    foreach ($links as $field => $values) {
        if ($field == 'bannerID') {
            if (checkhttptext($links[$i]->banner_clickURL)) {
                $url = splithttptext($links[$i]->banner_clickURL);
                $sponsoredlinks .= '<li><a href="' . $links[$i]->banner_clickURL . '">' . $url[1] . '</a></li>';
            } else {
                $sponsoredlinks .= '<li><a href="http://' . $links[$i]->banner_clickURL . '">' . $links[$i]->banner_clickURL . '</a></li>';
            }
        }
    }
}
/**
 * obtain list of the category 
 */
$sql = "select * from category";
if (!($result = $db->query($sql))) {
    die('Error:' . $db->error());
}
$categories = array();
コード例 #2
0
ファイル: advertise.php プロジェクト: sudogem/brcms
$sql .= " where cp.status = '1' ";
if (!($result = $db->query($sql))) {
    die('Error:' . $db->error());
}
$links = array();
while ($links[] = $db->fetcharray()) {
}
$db->freeresult();
$sponsoredlinks = '';
$n = count($links) - 1;
for ($i = 0; $i < $n; $i++) {
    // Count the active banners
    foreach ($links as $field => $values) {
        if ($field == 'clientID') {
            if (checkhttptext($links[$i]->website)) {
                $url = splithttptext($links[$i]->website);
                $sponsoredlinks .= '<li><a href="' . $links[$i]->website . '">' . $url[1] . '</a></li>';
            } else {
                $sponsoredlinks .= '<li><a href="http://' . $links[$i]->website . '">' . $links[$i]->website . '</a></li>';
            }
        }
    }
}
/**
 * obtain list of the category 
 */
$sql = "select * from category order by category_name ASC";
if (!($result = $db->query($sql))) {
    die('Error:' . $db->error());
}
$categories = array();
コード例 #3
0
ファイル: banner_ads_manager.php プロジェクト: sudogem/brcms
 $row_data .= '<td>';
 $row_data .= '<a href="' . VIEW_BANNER_URL . $clients_images[$i]->bannerID . '">';
 $row_data .= '&nbsp;' . $clients_images[$i]->banner_name;
 $row_data .= '</a>';
 $row_data .= '</td>';
 $row_data .= '<td class="green">';
 $client_name = getBannerclient_info($clients_images[$i]->banner_clientID, 'clientname');
 $row_data .= '&nbsp;' . $client_name;
 $row_data .= '</td>';
 $row_data .= '<td class="blue2">';
 $row_data .= '<a href="#"  onClick=popupWindow("' . makeRelativePath($clients_images[$i]->banner_imageurl, 4) . '","win1",650,350,"yes","yes");>';
 $row_data .= '&nbsp;' . makeRelativePath($clients_images[$i]->banner_imageurl, 9);
 $row_data .= '</td>';
 $row_data .= '<td class="blue2">';
 if (checkhttptext($clients_images[$i]->banner_clickURL)) {
     $url = splithttptext($clients_images[$i]->banner_clickURL);
     $row_data .= '<a href="' . $clients_images[$i]->banner_clickURL . '">' . $url[1] . '</a>';
 } else {
     $row_data .= '<a href="http://' . $clients_images[$i]->banner_clickURL . '">' . $clients_images[$i]->banner_clickURL . '</a>';
 }
 $row_data .= '</td>';
 $row_data .= '<td ';
 switch ($clients_images[$i]->banner_show) {
     case 1:
         $row_data .= 'class="green">';
         $row_data .= 'published';
         break;
     case 0:
         $row_data .= 'class="viola">';
         $row_data .= 'not published';
         break;