function rotate_images($images = array(), $area = '') { $this->javaScript = '<script type="text/javascript"> <!-- //you may add your image file or text below var ' . $area . '_ =new Array(); '; $n = count($images); for ($i = 0; $i < $n; ++$i) { if (checkhttptext($images[$i]->banner_clickURL)) { $this->javaScript .= $area . '_[' . $i . ']=' . '"<a href=' . $images[$i]->banner_clickURL . '><img src=' . "'" . makeRelativePath($images[$i]->banner_imageurl, 7) . "'" . ' border=0></a>"; '; } else { $this->javaScript .= $area . '_[' . $i . ']=' . '"<a href=http://' . $images[$i]->banner_clickURL . '><img src=' . "'" . makeRelativePath($images[$i]->banner_imageurl, 7) . "'" . ' border=0></a>"; '; } } $this->javaScript .= 'var current=0; var ns6=document.getElementById&&!document.all; function changeItem(){ if(document.layers){ document.' . $area . '.document.write(' . $area . '_[current]) document.' . $area . '.document.close() } if(ns6)document.getElementById("' . $area . '").innerHTML=' . $area . '_[current] { if(document.all){ ' . $area . '.innerHTML=' . $area . '_[current] } } if (current==' . $n . ') { current=0 } else { current++ } setTimeout("changeItem()",1000) } window.onload=changeItem //--> </script>'; }
$sql = " select website from corporate_partners cp "; $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()); }
$ads600x140 .= '<img src="' . makeRelativePath($bannerdata->banner_imageurl, 7) . '" border="0" ></a>'; $ads600x140 .= '</p>'; } else { $ads600x140 .= '<p><a href="' . $PHP_SELF . '?bannerID=' . $bannerdata->bannerID . '">'; $ads600x140 .= '<img src="' . makeRelativePath($bannerdata->banner_imageurl, 7) . '" border="0" ></a>'; $ads600x140 .= '</p>'; } } /** * Get the active banner ads 180x700 */ $banner = new rotate_banner(); $bannerdata = $banner->view_banner('180x700'); $ads180x700 = ''; if ($bannerdata) { if (checkhttptext($bannerdata->banner_clickURL)) { $ads180x700 .= '<p><a href="' . $PHP_SELF . '?bannerID=' . $bannerdata->bannerID . '">'; $ads180x700 .= '<img src="' . makeRelativePath($bannerdata->banner_imageurl, 7) . '" border="0" ></a>'; $ads180x700 .= '</p>'; } else { $ads180x700 .= '<p><a href="' . $PHP_SELF . '?bannerID=' . $bannerdata->bannerID . '">'; $ads180x700 .= '<img src="' . makeRelativePath($bannerdata->banner_imageurl, 7) . '" border="0"></a>'; $ads180x700 .= '</p>'; } } /** * Get the clicked banner from the rotated banner... */ $bannerclick = new rotate_banner(); $bannerclick->getclicks($_REQUEST['bannerID']); /*
*/ $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()); }
$row_data .= '</td>'; $row_data .= '<td>'; $row_data .= '<a href="' . VIEW_BANNER_URL . $clients_images[$i]->bannerID . '">'; $row_data .= ' ' . $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 .= ' ' . $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 .= ' ' . 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';