Jump to content


  • Posts

  • Joined

  • Last visited

About pafruu

  • Birthday 09/08/1974

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Location
    Moncton, NB, Canada

pafruu's Achievements


Newbie (1/7)



  1. not sure ifthis isit but here it goes:"<?if (!defined('HOMESELLERS')) { die ("You can't access this file directly...");}require_once('lang/'.$LANGUAGE.'_listing.php');if (isset($_GET["ftn"])) { $ftn = $_GET["ftn"];} elseif (isset($_POST["ftn"])) { $ftn = $_POST["ftn"];} else { $ftn = "";}if (isAdminLoggedIn()) { if (isset($_GET["listing_id"])) { $listing_id = $_GET["listing_id"]; } elseif (isset($_POST["listing_id"])) { $listing_id = $_POST["listing_id"]; } if (isset($_POST["savelisting"])) { // Save form information savelisting($listing_id); } if (isset($_POST["saveimages"])) { // Save form information saveimages($listing_id); } if (isset($_GET["deleteimage"])) { deleteimage($listing_id, $_GET["deleteimage"]); } switch($ftn) { case "addlisting": // Get form information $newids = createids(1); $smarty->assign('newids', $newids); $section_template = "admin_addlisting"; break; case "editlisting": // Get form information $listing_info = getlisting($listing_id); $smarty->assign('listing_info', $listing_info); $section_template = "admin_editlisting"; break; case "viewimages": // Get form information $listing_images = getimages($listing_id); $smarty->assign('listing_id', $listing_id); $smarty->assign('listing_images', $listing_images); $section_template = "admin_images"; break; case "removelisting": delete_listing($listing_id); $smarty->assign('_message', 'Listing '.$listing_id.' has been removed!'); break; case "marklistingassold": marksold($listing_id); $smarty->assign('_message', 'Listing '.$listing_id.' has been marked as sold!'); break; case "addids": $newids = createids($_POST["amountids"], $_POST["startid"]); $smarty->assign('newids', $newids); $section_template = "admin_addids"; break; case "edittools": if (isset($_POST['savelink'])) { if (isset($_POST['id'])) { $query = "UPDATE listings SET link = \"".addslashes($_POST['link'])."\", title = \"".addslashes($_POST['title'])."\", description = \"".addslashes($_POST['description'])."\" WHERE id = ".$_POST['id']; } else { $query = "INSERT INTO links (link, title, description) VALUES (\"".$_POST['link']."\", \"".$_POST['title']."\", description = \"".$_POST['description']."\") "; }//echo $query; } $query = "SELECT id, link, title, description, image FROM links"; $results = $db->GetArray($query); $smarty->assign('links', $results); $section_template = "admin_edittools"; break; default: break; }} else { $section_template = "admin_login";}?>"
  2. Hi all. Im currently trying to figure out where the site went wrong into not saving new links into the database. Here is the code from the form itself. What am I missing??<font class="t1">Edit Tools</font><p>{foreach from=$links item=link}<form action="" method="post" enctype="multipart/form-data">Title: <input type="text" name="title" value="{$link.title}"><br>Link: <input type="text" name="link" value="{$link.link}"><br><textarea name="description" cols="25" rows="6">{$link.description}</textarea><br>Image: {if ($link.image != "")}<a href="{$link.link}" target="links"><img src="images/links/{$link.image}"></a>{else}<input type="hidden" name="MAX_FILE_SIZE" value="2000000"><input type="file" name="image">{/if}<br><input type="hidden" name="id" value="{$link.id}"><input type="hidden" name="savelink" value="1"><input type="submit"></form><p>{/foreach}<hr><b>New link:</b><p><form action="" method="post" enctype="multipart/form-data">Title: <input type="text" name="title"><br>Link: <input type="text" name="link"><br><textarea name="description" cols="25" rows="6"></textarea><br>Image: <input type="hidden" name="MAX_FILE_SIZE" value="2000000"><input type="file" name="image"><br><input type="hidden" name="savelink" value="1"><input type="submit"></form>
  3. Thank you for the quick reply I do have a onload event attached to all the images, how would I go about this?
  4. Hey Guys,I must say I'm a n00b when it comes to javascript. Here is the situation, I've got a page on a website that has a lot of elements to be loaded to it. (it's the way the customer wanted it). Now Ive managed to come up with a progress bar on the page which wotrks fine locally but as soon as it gets ion to the web, its seems to be disappearing within 2 seconds. here is waht i got at the top of the page: and at the bottom: Im sure i'm missing something here but I do not know what, please help
  5. Wow! Thanks so much.. I tried it and it works.
  6. Hello, I'm very new to javascript and I am trying to create an order form for model bases. The way it should work is that you would have to select the width and the height of the base and the quality of wood of which you would want it built. I got the square footage to work its just the calculation of the price of which I have a problem. You see, if you select mdr, the square footage would be multiplied by a quarter and if you choose hardwood, it should be multiplied by a dollar. Now I've created a switch but no matter waht it always calculates the square foot by a quarter. What am I missing??heres the code: Please help a n00b
  7. pafruu

    5 min countdown

    I actually resolved the solution with dynamic text
  8. pafruu

    5 min countdown

    ok I got the timer working in a different way but now I need to control the text size as the 5 min clock starts bold and in a size of aprprox. 50 size, as soon as 4:59 shows up all text format dissapears. What am I missing??here the actionScript:var my_format:TextFormat = new TextFormat();my_format.font = "Helvetica";my_format.size = 50;my_format.bold = true;var start = getTimer();var countdown = "5:00";var textbox = this.createTextField(0,0,250,175,200,300);textbox.variable = "countdown";textbox.textColor = 0x0066cc;textbox.setTextFormat(my_format);var runit = function(){ var diff = (getTimer() - start)/1000; var mins = 4+ - Math.floor(diff/60); var secs = 60 - Math.floor(diff%60); countdown = mins + ":" + secs; if(countdown == "0:00") { trace("time\'s up"); clearInterval(timer); };};var timer = setInterval(runit, 1000);
  9. pafruu

    5 min countdown

    I'm sorry I'm kind of a n00b when it comes to action script. How will the getTimer function work?
  10. pafruu

    5 min countdown

    Hello, I want to create a 5 min countdown in actionscript. I've found countdowns that countdown to a specific date. I dont want that. I need only a countdown that starts at 5 minutes and goes to zero.here is a countdown tutorial that i've folllowed, it uses dynamic text that goes to a specific date:this.onEnterFrame = function () { var today:Date = new Date(); var currentYear = today.getFullYear(); var currentTime = today.getTime(); var targetDate:Date = new Date(currentYear,11,25); var targetTime = targetDate.getTime(); var timeLeft = targetTime - currentTime; var sec = Math.floor(timeLeft/1000); var min = Math.floor(sec/60); var hrs = Math.floor(min/60); var days = Math.floor(hrs/24); sec = string(sec % 60); if (sec.length < 2) { sec = "0" + sec; } min = string(min % 60); if (min.length < 2) { min = "0" + min; } hrs = string(hrs % 24); if (hrs.length < 2) { hrs = "0" + hrs; } days = string(days); var counter:String = min + ":" + sec; time_txt.text = counter;}is there a way to modify it so that I can tell it to start at 5 minutes?
  11. your right, because the hack, I just checked doesnt work aaaargh
  12. actually its ok, i went with a css hack and it works
  13. Hi I need help,I am trying to make my website detect if the user is using safari or not. If the user does use safari then I want the site to use a different stylesheet. here is what I got so far:<script type="text/javascript">function detectBrowser(){var browser=navigator.appName;var b_version=navigator.appVersion;var version=parsefloat(b_version);if ((browser=="Safari")){document.write("<link href="img/stylesaf.css" rel="stylesheet" type="text/css" />");}{document.write("<link href="img/style.css" rel="stylesheet" type="text/css" />");}}</script>when I load up the page on my browser its as if the style sheet doesnt exist at all...*edit* <body onload="detectBrowser()"> I forgot to write that I do call the function on load *edit*please help
  14. Hi guys,Just wondering if any of you guys know where the deactivate clipping mask was on photoshop 7? It was originally done in CS2 which was available by right clicking on the layer!Please help!
  • Create New...