Fix A Bug On A Movie Clip Disp
I need a Flash expert to fix a bug on the Movie Clip of a slide that cannot get removed in a particular case.
Obviously, there should be no regression following the fix.
I need a Flash expert to fix a bug on the Movie Clip of a slide that cannot get removed in a particular case.
Obviously, there should be no regression following the fix.
Ok, so I am not well versed with javascript and do everything with php. But this one calls for a bit of js manipulation.
For someone who knows JS this should be a five minute job.
So, we are using openx for ad management. The problem is that placing the openx javacode all over the page is simply too annoying.
so we had created a single php function called disp_ads where it would be fed the ad_zone and another variable and then it would display the ad.
this is one it looks like:
function ad_disp_raw ($ad_zone, $ad_n) {
?>
<script type=’text/javascript’><!–//<![CDATA[
var m3_u = (location.protocol=='https:'?'/cp/adserver/www/delivery/ajs.php':'/cp/adserver/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?zoneid=<?=$ad_zone; ?>");
document.write ('&amp;cb=' + m3_r);
if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
document.write ("&amp;loc=" + escape(window.location));
if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
if (document.context) document.write ("&context=" + escape(document.context));
if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
document.write ("'></scr"+"ipt>");
//]]>–></script><noscript><a href=’/cp/adserver/www/delivery/ck.php?n=<?=$ad_n; ?>&amp;cb=INSERT_RANDOM_NUMBER_HERE’ target=’_blank’><img src=’/cp/adserver/www/delivery/avw.php?zoneid=<?=$ad_zone; ?>&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=<?=$ad_n; ?>’ border=’0′ alt=” /></a></noscript>
<?
}
// function ad_disp is a generic add display module from phpads
function ad_disp ($ad_zone, $ad_n) {
?>
<fieldset class=ads>
<legend>ADVERTISEMENT</legend>
<? ad_disp_raw ($ad_zone, $ad_n); ?>
</fieldset><?
}
———
So as you can see, sometimes we call the ad_disp function which displays a little fieldset around the ad or we can call the ad_disp_raw function directly if we don’t want the fieldset around the ad.
—-> the job:
we need the same methodology done but ALL is java. So, no php function but a java function PLUS the call.
So, really all one needs to do is write two js functions where one calls the other (see above php functions) and their call syntax – where all we do is call the function with the two variables.
right now the function calls look like this:
<? ad_disp{12, 1233s32); ?>
so we want a call that is as simple as this!
—> this needs to be done rightaway. so if you can’t do this in less than an hour don’t bid please.
Hello,
I have a script, it displays all active banners using pagination. Once the banner is clicked it doesn’t show up again. This works fine.
The issue:
For example I’m displaying 25 banners per page, I have over 1000 active banners so there are 102 pages.
If I click on the all 25 of the banners on page one and then leave the site, the next time I come back to the site they do not show. This works correctly. But here is the problem, when I come back to the site page one is blank, I have to move on to page 2 in order to see the next round of banners. So in other words it’s not moving the banners up to page one.
I need this fixed.
Here is the code if you think you want to tackle it.
[code]
<?php
session_start();
include "../header.php";
include "../config.php";
include "../style.php";
$uname=$_SESSION[uname];
if( session_is_registered("ulogin") ) {
$tbl_name="banners"; //your table name
// How many adjacent pages should be shown on each side?
$adjacents = 3;
/*
First get total number of rows in data table.
If you have a WHERE clause in your query, make sure you mirror it here.
*/
if( session_is_registered("ulogin") )
{
$query = "SELECT COUNT(*) as num FROM banners, banner_clicks WHERE banners.status=1 and banners.max>banners.shown AND banner_clicks.userid<>'".userid."' group by banners.id";
}
else
$query = "SELECT COUNT(*) as num FROM $tbl_name WHERE status=1 and max>shown";
$ttlpag=mysql_query($query) or die (mysql_error());
$total_pages = mysql_fetch_array($ttlpag);
$total_pages = $total_pages[num];
$qn="select * from sat_banclicks where userid='$uname' group by bannerid";
$ns=mysql_query($qn);
$nk=mysql_num_rows($ns);
$total_pages=$total_pages-(2*$nk);
//echo $nk;
/* Setup vars for query. */
$targetpage = "bannerlinkview.php"; //your file name (the name of this file)
$limit = 25; //how many items to show per page
$page = $_GET['page'];
if($page)
$start = ($page - 1) * $limit; //first item to display on this page
else
$start = 1; //if no page var is given, set start to 0
/* Get data. */
if( session_is_registered("ulogin") )
{
$sql = "SELECT banners.id as id, banners.name as name, banners.bannerurl as bannerurl, banners.targeturl as targeturl, banners.userid as userid, banners.shown as shown, banners.clicks as clicks, banners.max as max, banners.added as added FROM banners, banner_clicks WHERE banners.status=1 and banners.max>banners.shown AND banner_clicks.userid<>'".userid."' group by banners.id LIMIT $start, $limit";
}
else
{
$sql = "SELECT * FROM banners WHERE status=1 and max>shown LIMIT $start, $limit";
}
$result = mysql_query($sql) or die (mysql_error());
if(!mysql_num_rows($result))
{
$result = mysql_query ("SELECT * FROM banners WHERE status=1 and max>shown LIMIT $start, $limit");
}
/* Setup page vars for display. */
if ($page == 0) $page = 1; //if no page var is given, default to 1.
$prev = $page - 1; //previous page is page - 1
$next = $page + 1; //next page is page + 1
$lastpage = ceil($total_pages/$limit); //lastpage is = total pages / items per page, rounded up.
$lpm1 = $lastpage - 1; //last page minus 1
/*
Now we apply our rules and draw the pagination object.
We're actually saving the code to a variable in case we want to draw it more than once.
*/
$pagination = "";
if($lastpage > 1)
{
$pagination .= "<div class="pagination">";
//previous button
if ($page > 1)
$pagination.= "<a href="$targetpage?page=$prev">