473,659 Members | 2,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Want AutoBidder to wait until seconds left to place bid.

7 New Member
I have an autobidder on my site and when someone places a bid the autobidder immediatly places a bid over that bid. I would like to have it bid with 1-5 seconds before the timer expires than right away.

Thanks for the help.

Rob
Jan 2 '11 #1
12 2883
HaLo2FrEeEk
404 Contributor
You could check the expiration time and use PHP to set a scheduled task (windows) or CRON job (unix) to run the autobidder a few seconds before the timer expires. You'd need to have permission to run shell_exec() commands, though.
Jan 4 '11 #2
Rob Riggs
7 New Member
Thanks for the reply. We have a dedicated server so I do have permission to run shell.exec()com mands. And we do run CRON jobs scheduled at one minute intervals.

I have a completely different auction script that I would like to switch to but can't get the countdown timers to work. You wouldn't be interested in fixing this for us would you? We would pay. We do have a list of things that we need addressed but the timers are the biggest. Need done ASAP. you can see the timer issue here pennytarget.com/pennytarget_old site

Let me know if you want to make some money.

Thanks,

Rob
Jan 4 '11 #3
Rob Riggs
7 New Member
Oh one more thing. The timer actually goes back up to to 30 seconds and starts counting down again when a bid is placed.
Jan 4 '11 #4
HaLo2FrEeEk
404 Contributor
I appreciate the offer but I don't do programming for money. I tried it a few times and it didn't work out for me or my clients. I program because I love it and it's fun. Doing it for money, for some reason, makes it less fun and I lose my motivation.

As for the timer, all I see in the example on the old site is that it doesn't count down, and the first item pauses itself shortly after I load the page. That just looks like the Javascript has an error in it that's stopping execution. I had that issue with a countdown timer I wrote for my site. Just debug the Javascript.

And I am sorry, I wish I could help more, but like I said, it's never worked out for me or my clients when I try to take on programming jobs.
Jan 4 '11 #5
Rob Riggs
7 New Member
Do you have a link to where I could get another timer? Here is what the timer code looks like. Sorry if this is long.


Expand|Select|Wrap|Line Numbers
  1. <?
  2.     session_start();
  3.     include("config/connect.php");
  4.     include("functions.php");
  5.     $uid = $_SESSION["userid"];
  6.  
  7.     $ipaddress = $_SERVER['REMOTE_ADDR']; 
  8.  
  9.     if($_SESSION["ipid"]=="" && $_SESSION["login_logout"]=="")
  10.     {
  11.         $qryipins = "Insert into login_logout (ipaddress,load_time) values('".$ipaddress."',NOW())";
  12.         mysql_query($qryipins) or die(mysql_error());
  13.         $ipid = mysql_insert_id();
  14.  
  15.         $qryipsel = "select * from login_logout where id='$ipid'";
  16.         $rsip = mysql_query($qryipsel);
  17.         $obj = mysql_fetch_object($rsip);
  18.         $_SESSION["ipid"] = $obj->load_time;
  19.         $_SESSION["ipaddress"] = $ipaddress;
  20.     }
  21.  
  22.     $qryauc = "select *, p.productID as pid,p.".$lng_prefix."name as name,".$lng_prefix."short_desc as short_desc from auction a left join products p on a.productID=p.productID left join auc_due_table adt on a.auctionID=adt.auction_id where adt.auc_due_time!=0 and a.auc_status='2' and featured_flag='0' order by adt.auc_due_time limit 0,6";    
  23.     $resauc = mysql_query($qryauc);
  24.     $totalauc = mysql_num_rows($resauc);
  25. ?>
  26. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  27. <html xmlns="http://www.w3.org/1999/xhtml">
  28. <head>
  29. <meta http-equiv="Content-Type" content="text/html; charset=<?=$lng_characset;?>" />
  30. <title><?=$AllPageTitle;?></title>
  31. <link href="css/style_youbid.css" rel="stylesheet" type="text/css" />
  32. <link href="css/menu.css" rel="stylesheet" type="text/css" />
  33. <!--[if lte IE 6]>
  34. <link href="css/menu_ie.css" rel="stylesheet" type="text/css" />
  35. <![endif]-->
  36. <script language="javascript" src="jquery.js"></script>
  37. <script language="javascript" src="effect.js"></script>
  38. <script language="javascript" src="default.js"></script>
  39. <script language="javascript" src="jqModal.js"></script>
  40. <script language="javascript" src="function.js"></script>
  41. <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
  42. </head>
  43.  
  44.  
  45. <body onload="OnloadPage();">
  46. <div id="main_div">
  47. <?
  48.     include("header.php");
  49. ?>
  50.  
  51.         <div class="flash_img"><div style="float: left; width: 305px;"><img src="<?=$lng_imagepath;?>registerbgsnap1.gif"  id="Image1" usemap="#Map1" border="0"  /></div>
  52.         <div style="float: left">
  53.           <script type="text/javascript">
  54. AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','653','height','173','src','images/demo','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/demo' ); //end AC code
  55. </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="653" height="173">
  56.             <param name="movie" value="http://bytes.com/images/demo.swf" />
  57.             <param name="quality" value="high" />
  58.             <embed src="http://bytes.com/images/demo.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="653" height="173"></embed>
  59.           </object>
  60.         </noscript></div></div>
  61.  
  62.         <div id="middle_div">
  63.             <div class="openAuction_bar_mainDIV">
  64.                 <div class="openAction_bar-left"></div>
  65.                 <div class="openAction_bar-middle"><div class="page_title_font"><?=$lng_openauction;?></div></div>
  66.                 <div class="openAction_bar-right"></div>
  67.              </div>        
  68.              <div class="openAuction_bar_mainDIV2" <? if($totalauc>3){?> style="height: 470px;" <? } else { ?> style="height: 220px;" <? } ?>>  
  69.                 <div id="Auction_boxes">
  70.                 <?
  71.                    if($totalauc>0){ 
  72.                    $a = 1;
  73.                    while($objauc=mysql_fetch_array($resauc))
  74.                    {    
  75.                         if($a==1 && $objauc["auc_status"]==2)
  76.                         {
  77.                             $co = "'".$objauc["auctionID"]."'";
  78.                             $arr = $objauc["auctionID"];
  79.                             $prr = $objauc["auc_due_price"];
  80.                         }
  81.                         elseif($objauc["auc_status"]==2)
  82.                         {
  83.                             $co .= ",'".$objauc["auctionID"]."'";
  84.                             $arr .= ",".$objauc["auctionID"];
  85.                             $prr .= ",".$objauc["auc_due_price"];
  86.                         }
  87.                 ?>
  88.                   <div class="auction-item" style="display: none" title="<?=$objauc["auctionID"];?>" id="auction_<?=$objauc["auctionID"];?>"></div>
  89.                     <div class="openAuction_box">
  90.                         <div id="openAuction_box_containt">
  91.                                 <div class="openAuction_itemname"><a href="auction_<?=str_replace(" ","_",strtolower(stripslashes($objauc["name"])));?>_<?=$objauc["auctionID"];?>.html"><?=stripslashes($objauc["name"]);?></a></div>                        
  92.                             <div id="openAuction_box_containt_left">
  93.                                 <div class="openAuction_product_img"><a href="auction_<?=str_replace(" ","_",strtolower(stripslashes($objauc["name"])));?>_<?=$objauc["auctionID"];?>.html"><img src="uploads/products/thumbs_big/thumbbig_<?=$objauc["picture1"];?>" border="0" /></a></div>
  94.                             </div>
  95.                             <div id="openAuction_box_containt_right">
  96.                                 <div class="openAuction_timer">
  97.                                  <span id="counter_index_page_<?=$objauc["auctionID"];?>">
  98.                                     <? 
  99.                                     echo "<script language='javascript' type='text/javascript'>
  100.                                     document.getElementById('counter_index_page_".$objauc["auctionID"]."').innerHTML = calc_counter_from_time('".$objauc["auc_due_time"]."');
  101.                                     </script>";
  102.                                    ?>
  103.                                   </span>
  104.                                 </div>
  105.                                 <div class="openAuction_product_price">
  106.                                     <span class="price" id="currencysymbol_<?=$objauc["auctionID"];?>"></span><span class="price" id="price_index_page_<?=$objauc["auctionID"];?>">---</span>
  107.                                 </div>
  108.                                 <div class="openAuction_bidder_name"><?=$lng_bidder;?>: <span id="product_bidder_<?=$objauc["auctionID"];?>">---</span></div>
  109.                         </div>
  110.                             <div class="openAuction_Bid_button">
  111.                                <? if($uid==""){ ?>
  112.                                 <img src="<?=$lng_imagepath;?>BID_btn.png" border="0"  alt="BID" onmouseover="this.src='<?=$lng_imagepath;?>LOGIN_btn-2.png'" onmouseout="this.src='<?=$lng_imagepath;?>BID_btn.png'" onclick="javascript: window.location.href='login.html'" id="image_main_<?=$objauc["auctionID"];?>"  style="cursor: pointer"/>
  113.                           <? } else { ?>
  114.                                 <img src="<?=$lng_imagepath;?>BID_btn.png" border="0" class="bid-button-link" name="getbid.php?prid=<?=$objauc["productID"];?>&aid=<?=$objauc["auctionID"];?>&uid=<?=$uid;?>" alt="BID" onmouseover="this.src='<?=$lng_imagepath;?>BID_btn_hover.png'" onmouseout="this.src='<?=$lng_imagepath;?>BID_btn.png'" id="image_main_<?=$objauc["auctionID"];?>"  style="cursor: pointer"/>
  115.                           <? } ?>
  116.                             </div>
  117.                         <div class="openAuction_itemvalue"><?=$lng_itemvalue;?><?=$Currency.number_format($objauc["price"],2);?></div>
  118.                     </div>
  119.                 </div>
  120.                     <?
  121.                         $a++;
  122.                         }
  123.                     }
  124.                     else
  125.                     {
  126.                     ?>
  127.                     <div style="height: 10px;">&nbsp;</div>
  128.                     <div class="noauction_message"><? echo $lng_noliveauction; ?></div>    
  129.                     <?
  130.                     }
  131.                     ?>
  132.  
  133.                  </div>                
  134.             </div>
  135.             <div id="cleaner"></div>
  136.             <div class="openAuction_bar_bottom">
  137.                 <div class="openAuction_leftcorner"></div>
  138.                 <div class="openAuction_bar_middle"></div>
  139.                 <div class="openAuction_rightcorner"></div>
  140.              </div>            
  141.         <div id="cleaner"></div>
  142.         <?
  143.             if($co!="")
  144.             {
  145.                 $qryauc2 = "select *, p.productID as pid, p.".$lng_prefix."name as name,".$lng_prefix."short_desc as short_desc from auction a left join products p on a.productID=p.productID left join auc_due_table adt on a.auctionID=adt.auction_id where  a.auctionID not in(".$co.") and adt.auc_due_time!=0 and a.auc_status=2 order by adt.auc_due_time limit 0,10";
  146.                 $resauc2 = mysql_query($qryauc2);
  147.                 $totalauc2 = mysql_num_rows($resauc2);
  148.             }
  149.             if($totalauc2>0)
  150.             {
  151.         ?>
  152.         <div class="openAuction_bar_mainDIV">
  153.             <div class="openAction_bar-left"></div>
  154.             <div class="openAction_bar-middle"><div class="page_title_font"><?=$lng_moreliveauction;?></div></div>
  155.             <div class="openAction_bar-right"></div>
  156.          </div>
  157.      <div class="openAuction_bar_mainDIV2">
  158.          <div style="height: 15px;">&nbsp;</div>
  159.         <div class="H_beit">
  160.             <div class="h_beit_image"><?=$lng_image;?></div>
  161.             <div class="h_beit_desc"><?=$lng_description;?></div>
  162.             <div class="h_beit_price"><?=$lng_price;?></div>
  163.             <div class="h_beit_bidder"><?=$lng_bidder;?></div>
  164.             <div class="h_beit_countdown"><?=$lng_countdown;?></div>
  165.         </div>
  166.         <?
  167.             while($objauc2 = mysql_fetch_array($resauc2))
  168.             {
  169.                 $arr .= ",".$objauc2["auctionID"];
  170.                 $prr .= ",".$objauc2["auc_due_price"];
  171.         ?>
  172.               <div class="auction-item" style="display: none" title="<?=$objauc2["auctionID"];?>" id="auction_<?=$objauc2["auctionID"];?>"></div>
  173.         <div class="descripton_box"> 
  174.         <div class="decription">
  175.                         <div class="body_inner_img"><a href="auction_<?=str_replace(" ","_",strtolower(stripslashes($objauc2["name"])));?>_<?=$objauc2["auctionID"];?>.html"><img src="uploads/products/thumbs_big/thumbbig_<?=$objauc2["picture1"];?>" border="0" /></a></div>
  176.                       <div class="auction_decri"><span style="font-size:12px; color:#000000;"><a href="auction_<?=str_replace(" ","_",strtolower($objauc2["name"]));?>_<?=$objauc2["auctionID"];?>.html" class="black_link"><?=stripslashes($objauc2["name"]);?></a></span><br />
  177.                             <br />
  178.                             <? echo stripslashes(choose_short_desc($objauc2["short_desc"],165));?><a href="auction_<?=str_replace(" ","_",strtolower(stripslashes($objauc2["name"])));?>_<?=$objauc2["auctionID"];?>.html" class="black_link"><?=$lng_linkmore;?></a>
  179.                         </div>
  180.                       <div class="auction_price"><span class="body_inner_box_price">
  181.                               <span style="font-size:16px; font-weight: bold;"><span class="price" id="currencysymbol_<?=$objauc2["auctionID"];?>"></span><span class="price" id="price_index_page_<?=$objauc2["auctionID"];?>">---</span>
  182.                             </span>
  183.                             <br />
  184.                             <?=$lng_insteadof;?><?=$Currency;?><?=$objauc2["price"];?>)</span></div>
  185.                       <div class="auction_bidder">
  186.                         <span id="product_bidder_<?=$objauc2["auctionID"];?>">---</span>                      
  187.                       </div>
  188.                       <div class="auction_countdown">
  189.                       <span class="body_inner_box_price_heading" id="counter_index_page_<?=$objauc2["auctionID"];?>">
  190.                           <?
  191.                         echo "<script language='javascript' type='text/javascript'>
  192.                             document.getElementById('counter_index_page_".$objauc2["auctionID"]."').innerHTML = calc_counter_from_time('".$objauc2["auc_due_time"]."');
  193.                             </script>";
  194.                           ?>                      
  195.                       </span><br />
  196.                      <? if($uid==""){ ?>
  197.                             <img src="<?=$lng_imagepath;?>BID_btn2.png" border="0"  alt="BID" onmouseover="this.src='<?=$lng_imagepath;?>login_btn3.png'" onmouseout="this.src='<?=$lng_imagepath;?>BID_btn2.png'" onclick="javascript: window.location.href='login.html'" id="image_main_<?=$objauc2["auctionID"];?>"  style="cursor: pointer; padding-left: 7px;"/>
  198.                       <? } else { ?>
  199.                             <img src="<?=$lng_imagepath;?>BID_btn2.png" border="0" class="bid-button-link" name="getbid.php?prid=<?=$objauc2["productID"];?>&aid=<?=$objauc2["auctionID"];?>&uid=<?=$uid;?>" alt="BID" onmouseover="this.src='<?=$lng_imagepath;?>BID_btn_hover2.png'" onmouseout="this.src='<?=$lng_imagepath;?>BID_btn2.png'" id="image_main_<?=$objauc2["auctionID"];?>"  style="cursor: pointer;padding-left: 7px;"/>
  200.                       <? } ?>
  201.                       </div>
  202.           </div>
  203.         </div>
  204.       <?
  205.               }
  206.       ?>
  207.     </div>
  208.      <div class="openAuction_bar_bottom">
  209.         <div class="openAuction_leftcorner"></div>
  210.         <div class="openAuction_bar_middle"></div>
  211.         <div class="openAuction_rightcorner"></div>
  212.      </div>
  213.       <?
  214.           }
  215.       ?>          
  216.      <?
  217.             include("footer.php");
  218.      ?>        
  219. <span style="display: none;" class="firstimagebold" id="firstimage_bold"><?=$totalauc;?></span>
  220. </div>
  221. <map name="Map1"><area shape="rect" coords="97,165,210,135" href="registration.html" title="Register"></map>
  222. </body>
  223. </html>

This is another one thats on this script:

Expand|Select|Wrap|Line Numbers
  1. <?
  2.     include("config/connect.php");
  3.     include("functions.php");
  4.  
  5.         $qrysel = "select * from auc_due_table adt left join auction a on a.auctionID=adt.auction_id where auc_due_time!=0 and a.pause_status='0' and auction_id='77' order by auction_id";
  6.         $ressel = mysql_query($qrysel);
  7.         $obj = mysql_fetch_array($ressel);
  8.         $total = mysql_num_rows($ressel);
  9.  
  10.         $auctiondueprice = GetAuctionMinPrice($obj["auctionID"]);
  11.  
  12.         echo "Auction Minimum Price:".$obj["auction_min_price"]."<br>";
  13.         echo "Auction DuePrice:".$auctiondueprice;
  14.  
  15.         if($obj["auction_min_price"]!="0.00" && $auctiondueprice<$obj["auction_min_price"])
  16.         {
  17. //            PlaceSystemBid($obj["auctionID"]);
  18.             echo "<br/>Condition is true";
  19.         }
  20.  
  21. ?>

Expand|Select|Wrap|Line Numbers
  1. //v1.7
  2.  
  3. // Flash Player Version Detection
  4.  
  5. // Detect Client Browser type
  6.  
  7. // Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
  8.  
  9. var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
  10.  
  11. var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
  12.  
  13. var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
  14.  
  15.  
  16.  
  17. function ControlVersion()
  18.  
  19. {
  20.  
  21.     var version;
  22.  
  23.     var axo;
  24.  
  25.     var e;
  26.  
  27.  
  28.  
  29.     // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
  30.  
  31.  
  32.  
  33.     try {
  34.  
  35.         // version will be set for 7.X or greater players
  36.  
  37.         axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
  38.  
  39.         version = axo.GetVariable("$version");
  40.  
  41.     } catch (e) {
  42.  
  43.     }
  44.  
  45.  
  46.  
  47.     if (!version)
  48.  
  49.     {
  50.  
  51.         try {
  52.  
  53.             // version will be set for 6.X players only
  54.  
  55.             axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
  56.  
  57.  
  58.  
  59.             // installed player is some revision of 6.0
  60.  
  61.             // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
  62.  
  63.             // so we have to be careful. 
  64.  
  65.  
  66.  
  67.             // default to the first public version
  68.  
  69.             version = "WIN 6,0,21,0";
  70.  
  71.  
  72.  
  73.             // throws if AllowScripAccess does not exist (introduced in 6.0r47)        
  74.  
  75.             axo.AllowScriptAccess = "always";
  76.  
  77.  
  78.  
  79.             // safe to call for 6.0r47 or greater
  80.  
  81.             version = axo.GetVariable("$version");
  82.  
  83.  
  84.  
  85.         } catch (e) {
  86.  
  87.         }
  88.  
  89.     }
  90.  
  91.  
  92.  
  93.     if (!version)
  94.  
  95.     {
  96.  
  97.         try {
  98.  
  99.             // version will be set for 4.X or 5.X player
  100.  
  101.             axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
  102.  
  103.             version = axo.GetVariable("$version");
  104.  
  105.         } catch (e) {
  106.  
  107.         }
  108.  
  109.     }
  110.  
  111.  
  112.  
  113.     if (!version)
  114.  
  115.     {
  116.  
  117.         try {
  118.  
  119.             // version will be set for 3.X player
  120.  
  121.             axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
  122.  
  123.             version = "WIN 3,0,18,0";
  124.  
  125.         } catch (e) {
  126.  
  127.         }
  128.  
  129.     }
  130.  
  131.  
  132.  
  133.     if (!version)
  134.  
  135.     {
  136.  
  137.         try {
  138.  
  139.             // version will be set for 2.X player
  140.  
  141.             axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
  142.  
  143.             version = "WIN 2,0,0,11";
  144.  
  145.         } catch (e) {
  146.  
  147.             version = -1;
  148.  
  149.         }
  150.  
  151.     }
  152.  
  153.  
  154.  
  155.     return version;
  156.  
  157. }
  158.  
  159.  
  160.  
  161. // JavaScript helper required to detect Flash Player PlugIn version information
  162.  
  163. function GetSwfVer(){
  164.  
  165.     // NS/Opera version >= 3 check for Flash plugin in plugin array
  166.  
  167.     var flashVer = -1;
  168.  
  169.  
  170.  
  171.     if (navigator.plugins != null && navigator.plugins.length > 0) {
  172.  
  173.         if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
  174.  
  175.             var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
  176.  
  177.             var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
  178.  
  179.             var descArray = flashDescription.split(" ");
  180.  
  181.             var tempArrayMajor = descArray[2].split(".");            
  182.  
  183.             var versionMajor = tempArrayMajor[0];
  184.  
  185.             var versionMinor = tempArrayMajor[1];
  186.  
  187.             var versionRevision = descArray[3];
  188.  
  189.             if (versionRevision == "") {
  190.  
  191.                 versionRevision = descArray[4];
  192.  
  193.             }
  194.  
  195.             if (versionRevision[0] == "d") {
  196.  
  197.                 versionRevision = versionRevision.substring(1);
  198.  
  199.             } else if (versionRevision[0] == "r") {
  200.  
  201.                 versionRevision = versionRevision.substring(1);
  202.  
  203.                 if (versionRevision.indexOf("d") > 0) {
  204.  
  205.                     versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
  206.  
  207.                 }
  208.  
  209.             }
  210.  
  211.             var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
  212.  
  213.         }
  214.  
  215.     }
  216.  
  217.     // MSN/WebTV 2.6 supports Flash 4
  218.  
  219.     else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
  220.  
  221.     // WebTV 2.5 supports Flash 3
  222.  
  223.     else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
  224.  
  225.     // older WebTV supports Flash 2
  226.  
  227.     else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
  228.  
  229.     else if ( isIE && isWin && !isOpera ) {
  230.  
  231.         flashVer = ControlVersion();
  232.  
  233.     }    
  234.  
  235.     return flashVer;
  236.  
  237. }
  238.  
  239.  
  240.  
  241. // When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
  242.  
  243. function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
  244.  
  245. {
  246.  
  247.     versionStr = GetSwfVer();
  248.  
  249.     if (versionStr == -1 ) {
  250.  
  251.         return false;
  252.  
  253.     } else if (versionStr != 0) {
  254.  
  255.         if(isIE && isWin && !isOpera) {
  256.  
  257.             // Given "WIN 2,0,0,11"
  258.  
  259.             tempArray         = versionStr.split(" ");     // ["WIN", "2,0,0,11"]
  260.  
  261.             tempString        = tempArray[1];            // "2,0,0,11"
  262.  
  263.             versionArray      = tempString.split(",");    // ['2', '0', '0', '11']
  264.  
  265.         } else {
  266.  
  267.             versionArray      = versionStr.split(".");
  268.  
  269.         }
  270.  
  271.         var versionMajor      = versionArray[0];
  272.  
  273.         var versionMinor      = versionArray[1];
  274.  
  275.         var versionRevision   = versionArray[2];
  276.  
  277.  
  278.  
  279.             // is the major.revision >= requested major.revision AND the minor version >= requested minor
  280.  
  281.         if (versionMajor > parseFloat(reqMajorVer)) {
  282.  
  283.             return true;
  284.  
  285.         } else if (versionMajor == parseFloat(reqMajorVer)) {
  286.  
  287.             if (versionMinor > parseFloat(reqMinorVer))
  288.  
  289.                 return true;
  290.  
  291.             else if (versionMinor == parseFloat(reqMinorVer)) {
  292.  
  293.                 if (versionRevision >= parseFloat(reqRevision))
  294.  
  295.                     return true;
  296.  
  297.             }
  298.  
  299.         }
  300.  
  301.         return false;
  302.  
  303.     }
  304.  
  305. }
  306.  
  307.  
  308.  
  309. function AC_AddExtension(src, ext)
  310.  
  311. {
  312.  
  313.   if (src.indexOf('?') != -1)
  314.  
  315.     return src.replace(/\?/, ext+'?'); 
  316.  
  317.   else
  318.  
  319.     return src + ext;
  320.  
  321. }
  322.  
  323.  
  324.  
  325. function AC_Generateobj(objAttrs, params, embedAttrs) 
  326.  
  327.  
  328.   var str = '';
  329.  
  330.   if (isIE && isWin && !isOpera)
  331.  
  332.   {
  333.  
  334.     str += '<object ';
  335.  
  336.     for (var i in objAttrs)
  337.  
  338.     {
  339.  
  340.       str += i + '="' + objAttrs[i] + '" ';
  341.  
  342.     }
  343.  
  344.     str += '>';
  345.  
  346.     for (var i in params)
  347.  
  348.     {
  349.  
  350.       str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  351.  
  352.     }
  353.  
  354.     str += '</object>';
  355.  
  356.   }
  357.  
  358.   else
  359.  
  360.   {
  361.  
  362.     str += '<embed ';
  363.  
  364.     for (var i in embedAttrs)
  365.  
  366.     {
  367.  
  368.       str += i + '="' + embedAttrs[i] + '" ';
  369.  
  370.     }
  371.  
  372.     str += '> </embed>';
  373.  
  374.   }
  375.  
  376.  
  377.  
  378.   document.write(str);
  379.  
  380. }
  381.  
  382.  
  383.  
  384. function AC_FL_RunContent(){
  385.  
  386.   var ret = 
  387.  
  388.     AC_GetArgs
  389.  
  390.     (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
  391.  
  392.      , "application/x-shockwave-flash"
  393.  
  394.     );
  395.  
  396.   AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
  397.  
  398. }
  399.  
  400.  
  401.  
  402. function AC_SW_RunContent(){
  403.  
  404.   var ret = 
  405.  
  406.     AC_GetArgs
  407.  
  408.     (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
  409.  
  410.      , null
  411.  
  412.     );
  413.  
  414.   AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
  415.  
  416. }
  417.  
  418.  
  419.  
  420. function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  421.  
  422.   var ret = new Object();
  423.  
  424.   ret.embedAttrs = new Object();
  425.  
  426.   ret.params = new Object();
  427.  
  428.   ret.objAttrs = new Object();
  429.  
  430.   for (var i=0; i < args.length; i=i+2){
  431.  
  432.     var currArg = args[i].toLowerCase();    
  433.  
  434.  
  435.  
  436.     switch (currArg){    
  437.  
  438.       case "classid":
  439.  
  440.         break;
  441.  
  442.       case "pluginspage":
  443.  
  444.         ret.embedAttrs[args[i]] = args[i+1];
  445.  
  446.         break;
  447.  
  448.       case "src":
  449.  
  450.       case "movie":    
  451.  
  452.         args[i+1] = AC_AddExtension(args[i+1], ext);
  453.  
  454.         ret.embedAttrs["src"] = args[i+1];
  455.  
  456.         ret.params[srcParamName] = args[i+1];
  457.  
  458.         break;
  459.  
  460.       case "onafterupdate":
  461.  
  462.       case "onbeforeupdate":
  463.  
  464.       case "onblur":
  465.  
  466.       case "oncellchange":
  467.  
  468.       case "onclick":
  469.  
  470.       case "ondblClick":
  471.  
  472.       case "ondrag":
  473.  
  474.       case "ondragend":
  475.  
  476.       case "ondragenter":
  477.  
  478.       case "ondragleave":
  479.  
  480.       case "ondragover":
  481.  
  482.       case "ondrop":
  483.  
  484.       case "onfinish":
  485.  
  486.       case "onfocus":
  487.  
  488.       case "onhelp":
  489.  
  490.       case "onmousedown":
  491.  
  492.       case "onmouseup":
  493.  
  494.       case "onmouseover":
  495.  
  496.       case "onmousemove":
  497.  
  498.       case "onmouseout":
  499.  
  500.       case "onkeypress":
  501.  
  502.       case "onkeydown":
  503.  
  504.       case "onkeyup":
  505.  
  506.       case "onload":
  507.  
  508.       case "onlosecapture":
  509.  
  510.       case "onpropertychange":
  511.  
  512.       case "onreadystatechange":
  513.  
  514.       case "onrowsdelete":
  515.  
  516.       case "onrowenter":
  517.  
  518.       case "onrowexit":
  519.  
  520.       case "onrowsinserted":
  521.  
  522.       case "onstart":
  523.  
  524.       case "onscroll":
  525.  
  526.       case "onbeforeeditfocus":
  527.  
  528.       case "onactivate":
  529.  
  530.       case "onbeforedeactivate":
  531.  
  532.       case "ondeactivate":
  533.  
  534.       case "type":
  535.  
  536.       case "codebase":
  537.  
  538.       case "id":
  539.  
  540.         ret.objAttrs[args[i]] = args[i+1];
  541.  
  542.         break;
  543.  
  544.       case "width":
  545.  
  546.       case "height":
  547.  
  548.       case "align":
  549.  
  550.       case "vspace": 
  551.  
  552.       case "hspace":
  553.  
  554.       case "class":
  555.  
  556.       case "title":
  557.  
  558.       case "accesskey":
  559.  
  560.       case "name":
  561.  
  562.       case "tabindex":
  563.  
  564.         ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
  565.  
  566.         break;
  567.  
  568.       default:
  569.  
  570.         ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
  571.  
  572.     }
  573.  
  574.   }
  575.  
  576.   ret.objAttrs["classid"] = classid;
  577.  
  578.   if (mimeType) ret.embedAttrs["type"] = mimeType;
  579.  
  580.   return ret;
  581.  
  582. }


I can post more if it will help

Thanks

Rob


-------------------


Edit Sorry about that
Jan 4 '11 #6
HaLo2FrEeEk
404 Contributor
Please edit your post and use code tags:

[code]CODE GOES HERE[/code]

I'll be more willing to help after you do that.
Jan 4 '11 #7
Rob Riggs
7 New Member
Sorry, I edited it and forgot the / in [/code]
Jan 4 '11 #8
HaLo2FrEeEk
404 Contributor
All I can say is that the javascript function that handles displaying the time needs to be told to run once every 1000 milliseconds, so you'll need a setTimeout() somewhere in there. I'm sorry I can't be of more help, but this is a Javascript issue and I haven't done any serious Javascript in years. We're aso getting off topic, back to my original reply, I'drecommend simply assigning a new CRON job to place a bid a few seconds before the timer expires. Make sure you check to see if a CRON already exists for that auction though, you don't want multiple CRONs posting multiple bids on the same item.

Also, are you doing this so that you can always outbid your users so you don't have to actually give anything away? I don't want to assume that, but it really looks that way. That's really dishonest and a great way to get yourself a very bad reputation, and possibly in a lot of trouble.
Jan 4 '11 #9
Rob Riggs
7 New Member
Okay, thanks for your time and help. Your the best!!!!
Jan 4 '11 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

19
9429
by: Tom | last post by:
Hi, I have the following problem. I analyse data from a file. When I am done analysing all the data that was in that file, I want to let my program wait until this specific file has changed (which indicates that new data has been added to the file from a third party program that I don't control). If that file has changed, I want my program to continue. What would be the appropriate command to check if the file changed? And how can I...
4
2882
by: MLH | last post by:
Best way to make Access 2.0 code wait 10 seconds before processing the next line??? For i=1 to whatever : next i is just too processor intensive. Isn't there something less taxing I can use???
2
3496
by: TJS | last post by:
in a script, a stored procedure is called. I want to verify the procedure is complete before proceeding ahead. How can I have the script wait until a stored procedure is verified as complete before proceeding ahead ??
2
6021
by: bigpoppa | last post by:
Hey I need help (doesn't everyone?) on a script. The script functions like this: Please wait X seconds for download (for example x=15 seconds) Please wait 14 seconds for download (and then a second later) Please wait 13 seconds for download... (process keeps repeating) Click here to download the file you requested (occurs at 0 seconds) Does anyone know of a script like that one? I have seen many sites use it including megaupload.com. I am...
4
11091
by: Eddie | last post by:
I am opening a windows (well, technically a greybox() call GB_show() which shows a nicer window than normal), and want to wait until that window is closed before moving to the next command. However, when I open the window, JavaScript immediately issues the next command statement. How can I get JavaScript to wait until the window is closed before continuing? Here's visually what I'm trying to do: statement1; GB_show('mycaption,...
1
3087
by: shawn gong | last post by:
hi all, I have a popup dialog using GTK, which allows user to select "Yes" or "No". Then the program flows depending on the selected answer. The problem is that func() doesn't not wait for Popup_Dlg() How can I half the program flow and let it wait until Popup_Dlg() returns a value? The code is run on Windows, Linux and Solaris
3
6443
by: Neekos | last post by:
I'm programatically opening IE and i need my code to wait until the browser is finished loading before continuing. How do i make it wait? i tried: Do DoEvents Loop Until webBrowser1.Busy = False but this doesnt work.
4
21458
by: Luke Bailey | last post by:
I'm trying to complete some changes to a database that I have created and I need to finish it by tomorrow morning! Here's the situation: I have a form where people can order a number of products. They can set this form to varying statuses so that their supervisors can review the orders before they get placed. When the user (call them technicians) sets the order form to "review" status, the code goes through each individual item that...
3
3101
by: raghudr | last post by:
Hi all, I have created lot of controls on a form what i want to do is for wait until handles are created. how can we do this?? say rag=new label();
0
8428
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8535
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8629
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4338
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2757
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.