Jump to content

flexxall

Members
  • Posts

    34
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

flexxall's Achievements

Member

Member (2/5)

0

Reputation

  1. You can also try the new Koding.com https://koding.com They give you a web IDE with storage and VM's to develope you apps on. Theres also the new One drive (the old sky drive) https://onedrive.live.com/about/en-us/
  2. Just thought id let ya all check out this Real Time collaborative web IDE. So far I think its definitely a good tool. https://koding.com Let me know what your thoughts are Steve
  3. So if anyone needs something similar I resolved with this ... <?php session_start(); $ip_address = $_SERVER['REMOTE_ADDR']; $user_name = $_SESSION['user_name']; $url = $_SERVER['REQUEST_URI']; $tokens = explode('/', $url); $image_id = $tokens[sizeof($tokens)-1]; include 'db_connect.php'; $sql_1 = "SELECT * FROM tracking_table WHERE image_id = '$image_id'"; $statement = $db->prepare($sql_1); $statement->execute(array()); $row = $statement->fetch(); $compare_id = $row['image_id']; $count = $row['count']; if ($compare_id != $image_id) : $sql_2 = "INSERT INTO tracking_table (image_id, user_name, ip_address, count) VALUES (?, ?, ?, ?)"; $statement = $db->prepare($sql_2); $statement->execute(array($image_id, $user_name, $ip_address, 0)); elseif ($compare_id == $image_id) : $count++; $sql_3 = "UPDATE tracking_table SET count = '$count' WHERE image_id = '$compare_id'"; $statement = $db->prepare($sql_3); $statement->execute(array($sql_3)); endif;
  4. I seem to be having an issue with this script. Im pretty sure its in my if statement but i cant figure out what is wrong. Any one see anything obviously wrong ? $ip_address = $_SERVER['REMOTE_ADDR']; $user_name = $_SESSION['user_name']; $url = $_SERVER['REQUEST_URI']; $tokens = explode('/', $url); $image_id = $tokens[sizeof($tokens)-1]; //Connect to the database include 'db_connect.php'; $sql_1 = "SELECT * FROM tracking_table"; $statement = $db->prepare($sql_1); $statement->execute(array()); while($row = $statement->fetch(PDO::FETCH_ASSOC)) { $compare_id = $row['image_id']; $count = $row['count']; } if ($compare_id != $image_id) { $sql_2 = "INSERT INTO tracking_table (image_id, user_name, ip_address, count) VALUES (?, ?, ?, ?)"; $statement = $db->prepare($sql_2); $statement->execute(array($image_id, $user_name, $ip_address, 0)); } else if ($compare_id == $image_id){ $count = $count++; $sql_3 = "INSERT INTO tracking_table (count) VALUES (?)"; $statement = $db->prepare($sql_3); $statement->execute($count); }
  5. thanx I"ll look into that possibility
  6. the reason for viewing the same images for all uses is ... if one of the users clicks on one of the images it dissapears and is assigned to them now the other users can not click that image as it is not available any more. If they are not viewing the same rotational screen then multiple users would have access to the same image file which i need to avoide
  7. the script on the main page is rotating images using jquery.cycle I would like for all the people that open the site regardless of when it is open to see the same images in the current rotation that they are in for other users. I understand about the lag issues and browser speed that makes sense. If i cant run the script server side and need to do it client side you mentioned i could make server calls. how would i go about doing that ?
  8. Hello, I have a script running on my homepage and i would like it to be identical for all people at the same time. Meaning the script runs fins when i open the site. then another user opens the site and the script runs fine for them but it is not in sync. how can i sync it so we are both viewing the same instance of the script. I think that makes sense, if not let me know and i can try to explain differently
  9. ok so i messed up my post and forgot the message. Here it is. I am working on nesting images inside a div that have javacsript applied to them. I have it kind of working but the position of the inner images is not properly aligning to the absolute positioning i am trying to get. They seem to be cascading down from the previous and outside the original div container i would like them in. Here is the code i have so far <script type="text/javascript"> $(document).ready( function(){ $('.fade0').innerfade({ speed: 1000, timeout: 6000, type: 'random_start', containerheight: '1.5em' }); $('.fade1').innerfade({ speed: 1000, timeout: 6000, type: 'random_start', containerheight: '1.5em' }); $('.fade2').innerfade({ speed: 1000, timeout: 6000, type: 'random_start', containerheight: '1.5em' }); }); </script> <h2>Blah Blah</h2> <div class="forest"> <div style="position: absolute; top: 315px; left: 24px;" class="fade0"> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> </div> <div style="position: absolute; top: 84px; left: 66px;" class="fade1"> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> </div> <div style="position: absolute; top: 325px; left: 181px;" class="fade2"> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> <a href="http://xxx"><img src="xxx.jpg"/></a> </div> </div> Any Help would be appreciated Steve
  10. I currently have gotten the page listed on a server. Heres the address if this helps any http://midnighthatchlings.com
  11. Heres one of the scripts that I would like to try to add a fade to. HTML page <script> var dymImg= new Array(); var imgBase= new Array(); imgBase[0] = "./images/random0.php?"; imgBase[1] = "./images/random1.php?"; imgBase[2] = "./images/random2.php?"; imgBase[3] = "./images/random3.php?"; imgBase[4] = "./images/random4.php?"; imgBase[5] = "./images/random5.php?"; imgBase[6] = "./images/random6.php?"; imgBase[7] = "./images/random7.php?"; imgBase[8] = "./images/random8.php?"; imgBase[9] = "./images/random9.php?"; var c = 0; function count() { c++; t=imgBase.length; for(n=0;n<t;n++) { dymImg[n].src=imgBase[n]+c; } } function init() { dymImg[0]= document.getElementById("dymImg0"); dymImg[1]= document.getElementById("dymImg1"); dymImg[2]= document.getElementById("dymImg2"); dymImg[3]= document.getElementById("dymImg3"); dymImg[4]= document.getElementById("dymImg4"); dymImg[5]= document.getElementById("dymImg5"); dymImg[6]= document.getElementById("dymImg6"); dymImg[7]= document.getElementById("dymImg7"); dymImg[8]= document.getElementById("dymImg8"); dymImg[9]= document.getElementById("dymImg9"); setInterval("count()",2000); } window.onload = init; </script> <style type="text/css"> .containerdiv { float: left; position: relative; } .cornerimage0 { position: absolute; top: 315px; left: 24px; } .cornerimage1 { position: absolute; top: 84px; left: 66px; } .cornerimage2 { position: absolute; top: 325px; left: 181px; } .cornerimage3 { position: absolute; top: 28px; left: 248px; } .cornerimage4 { position: absolute; top: 331px; left: 326px; } .cornerimage5 { position: absolute; top: 325px; left: 487px; } .cornerimage6 { position: absolute; top: 28px; left: 638px; } .cornerimage7 { position: absolute; top: 335px; left: 655px; } .cornerimage8 { position: absolute; top: 68px; left: 769px; } .cornerimage9 { position: absolute; top: 315px; left: 826px; } </style> <div class="containerdiv"> <img src="{T_IMAGESET_PATH}/site_adopt.jpg" width="900" height="380"/> <a href=hatchlings.php><img id="dymImg0" class="cornerimage0" src="./images/random0.php"/> <a href=hatchlings.php><img id="dymImg1" class="cornerimage1" src="./images/random1.php"/> <a href=hatchlings.php><img id="dymImg2" class="cornerimage2" src="./images/random2.php"/> <a href=hatchlings.php><img id="dymImg3" class="cornerimage3" src="./images/random3.php"/> <a href=hatchlings.php><img id="dymImg4" class="cornerimage4" src="./images/random4.php"/> <a href=hatchlings.php><img id="dymImg5" class="cornerimage5" src="./images/random5.php"/> <a href=hatchlings.php><img id="dymImg6" class="cornerimage6" src="./images/random6.php"/> <a href=hatchlings.php><img id="dymImg7" class="cornerimage7" src="./images/random7.php"/> <a href=hatchlings.php><img id="dymImg8" class="cornerimage8" src="./images/random8.php"/> <a href=hatchlings.php><img id="dymImg9" class="cornerimage9" src="./images/random9.php"/> </div> PHP Page $settings['img_folder'] = './adoptables/'; $settings['img_ext'] = array('.jpg','.gif','.png'); /* How to display the images? 0 = print just the image path (for includes), like: images/test.jpg 1 = redirect to the image, when using: <img src="randim.php" /> */ $settings['display_type'] = 1; /* Allow on-the-fly settings override? 0 = NO, 1 = YES */ $settings['allow_otf'] = 1; /* Override type? */ if ($settings['allow_otf'] && isset($_GET['type'])) { $type = intval($_GET['type']); } else { $type = $settings['display_type']; } /* Override images folder? */ if ($settings['allow_otf'] && isset($_GET['folder'])) { $folder = htmlspecialchars(trim($_GET['folder'])); if (!is_dir($folder)) { $folder = $settings['img_folder']; } } else { $folder = $settings['img_folder']; } /* Make sure images fodler ends with an '/' */ if (substr($folder,-1) != '/') { $folder.='/'; } /* Get a list of all the image files */ $flist = array(); foreach($settings['img_ext'] as $ext) { $tmp = glob($folder.'*'.$ext); if (is_array($tmp)) { $flist = array_merge($flist,$tmp); } } /* If we have any images choose a random one, otherwise select the "noimg.gif" image */ if (count($flist)) { $src = $flist[array_rand($flist)]; } else { $src = 'noimg.gif'; } /* Output the image according to the selected type */ if ($type) { header('Location:'.$src); exit(); } else { echo $src; } ?>
  12. I have two image rotators. one will rotate the image by swapping the pic with another and one will fade the image in and out. I have one that will allow placement of 10 rotation locations on top of the same background image ( what I want) but it does not fade the images. the other will fade the images but I can not get more than one instance on top of the same background image. Could anyone assist me with getting one of these to achieve what I am looking for ? I can not post a link to the site as it is a localhost I am building on but I can paste any of the code needed to assist with this issue.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.