Jump to content

Renlok

Members
  • Posts

    258
  • Joined

  • Last visited

Everything posted by Renlok

  1. For my search function im trying to build a search array but this part is giving my loads of problems I cant get it to work foreach ($payment as $key => &$val){if (!$pri){$ora = "((au.payment LIKE :payment{$val})";$asparams[] = array(":payment{$val}", '%' . $system->cleanvars($val) . '%', PDO::PARAM_STR);}else{$ora .= " OR (au.payment LIKE :payment{$val}) AND ";$asparams[] = array(":payment{$val}", '%' . $system->cleanvars($val) . '%', PDO::PARAM_STR);}$pri = true; } the $ora is just added to the SQL later and the $asparams is the parameter array that is passsed into bindParam later im getting the messasge anyone have any ideas?
  2. I fixed it changed it to $this->pdo = new PDO("mysql:host=$DbHost;dbname=$DbDatabase;charset=$CHARSET", $DbUser, $DbPassword);
  3. I am creating a PDO database handler class, I've never used it before and its very slow going so far it mostly works but i have a problem public function connect($DbHost, $DbUser, $DbPassword, $DbDatabase, $DBPrefix, $CHARSET) { $this->DBPrefix = $DBPrefix; $this->CHARSET = $CHARSET; try { // MySQL with PDO_MYSQL echo "SET NAMES $CHARSET"; $this->pdo = new PDO("mysql:host=$DbHost;dbname=$DbDatabase", $DbUser, $DbPassword, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES $CHARSET")); // set error reporting up $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // actually use prepared statements $this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); } catch(PDOException $e) { $this->error_handler($e->getMessage()); } } doesn't work unless i remove , array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES $CHARSET") and I have no idea why it isn't throwing any errors its just not working
  4. oh nevermind i just forgot the FROM *facepalm* but thanks anyway
  5. yeah it does have a value ive tried that and its not the problem.
  6. in my code i have $query = "DELETE " . $DBPrefix . "bids WHERE auction = " . $Auction['id']; $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__); but if WHERE auction = " . $Auction['id'] doesnt match anything i returns the error I really dont understand why its returning an error is this just a case of having to add some code to check if theres anything that actualy needs deleting first?
  7. if you view http://www.webidsupport.com/index.php in IE the header will be streched but in any other browser it will look normal. Anyone know how i can fix this?
  8. I've made a script and the .htacces file has the contents # secure htaccess file <Files .htaccess> order allow,deny deny from all </Files> # disable directory browsing Options All -Indexes # disable access to logs/template files <Files ~ "\.(log|tpl)$"> order allow,deny deny from all </files> but on some servers the Options All -Indexes line will cause a 403 error to be thrown when using the install script and ive no idea why? an example or the url that will throw it is http://yoursite.com/install/install.php?step=2&URL=http://yoursite.com/&EMail=sales@yoursite.com&cats=1&n=1 I could really do with some help :-\
  9. well yeah i sort of fix it for IE8 i had given up on all the older IE's but thanks anyway i may try that out when i have time next.
  10. for anyone else to fix it i added <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
  11. but there all errors with urls having & and = in which i cant do anything about and isnt going to make any difference with how it looks in any browser Also if you enable compatability mode in IE site looks fine
  12. the page: http://www.webidsupport.com/ looks fine in every other browser ive tested with but looks awful in IE anyone have any ideas of how to sort it out without messing it up on all other browsers?
  13. OK thanks i finally go it to work with the bccomp() function now i have if (bccomp($bid, $next_bid, 2) == -1)
  14. It shows string(4) "0.29" float(0.29) EDIT: but even if i change it to var_dump(floatval($bid)); echo '<br />'; var_dump($next_bid); if (floatval($bid) < $next_bid) it shows float(0.29) float(0.29) but the if statement still returns as true
  15. i have an if statement if ($bid < $next_bid) and it $bid & $next_bid hold the same values. php seems to think the statement is true. is this a bug in php or something?
  16. because thats the only way i could make it work.
  17. but it doesnt if i put the text inside the div of the orange box the text appears at the bottom of the page
  18. Im working on making a page its http://www.webidsupport.com/index.php# and the problem im having is when you make your browser window quite small the text in the orange box moves to the left hand side. i wanted to know if anyones knows how i can keep it so its always over the orange box? thanks.
  19. is it possible to have a column layout where the centre column is of a fixed width and the left and right column take up the rest of the space? Ive been searching for a while and havent a clue how to do it
  20. Sorry i wasnt sure to post this in HTML or CSS But what i want is to try and make the effect in the attachment so it looks like its being wrapped around the page. And i cant add the hangover bits with absolute divs because the part above it will change size as its dynamically generated. So i was wondering if its possible to make a div bigger than its container? or if theres a better way [attachment deleted by admin]
  21. Renlok

    match a date

    im trying to make a script which pulls data from a file and im trying to format it and example string would be and i want to change it to the code i have is $data = preg_replace('/(0-9){2}-(0-9){2}-(0-9){4} (0-9){2}:(0-9){2}:(0-9){2}::/', '<b>\1-\2-\3 \4:\5:\6::</b>', $data); but it doesnt work anyone have any ideas?
  22. thanks for the reply yeah im the developer of the auction script i just want to get ideas of how to improve the default theme as i suck as web design
  23. http://mezuu.com/index.php login u:racken p:123456 tell me what needs improving be brutal
  24. well i have the code $(document).ready(function () { var num_images = $('#numimages', window.opener.document).val(); var now_images = {NUMIMAGES}; var image_cost = {IMAGE_COST}; if (num_images != now_images) { var fee_diff = (now_images - num_images) * image_cost; $("#to_pay", window.opener.document).text(parseFloat($("#to_pay", window.opener.document).text()) + fee_diff); $('#numimages', window.opener.document).val(now_images); } }); but it doest seem to work just makes the window crash the full javascript on the page is <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript"> $(document).ready(function () { var num_images = $('#numimages', window.opener.document).val(); var now_images = {NUMIMAGES}; var image_cost = {IMAGE_COST}; if (num_images != now_images) { var fee_diff = (now_images - num_images) * image_cost; $("#to_pay", window.opener.document).text(parseFloat($("#to_pay", window.opener.document).text()) + fee_diff); $('#numimages', window.opener.document).val(now_images); } }); </script> <!-- IF B_CROPSCREEN --> <script type="text/javascript" src="js/jquery.imgareaselect.js"></script> <script type="text/javascript"> function preview(img, selection) { var scaleX = {SCALEX} / selection.width; var scaleY = {SCALEY} / selection.height; $('#thumbprev').css({ width: Math.round((scaleX / {IMGRATIO}) * {IMGWIDTH}) + 'px', height: Math.round((scaleY / {IMGRATIO}) * {IMGHEIGHT}) + 'px', marginLeft: '-' + Math.round(scaleX * selection.x1) + 'px', marginTop: '-' + Math.round(scaleY * selection.y1) + 'px' }); $('#x1').val(selection.x1 * {IMGRATIO}); $('#y1').val(selection.y1 * {IMGRATIO}); $('#x2').val(selection.x2 * {IMGRATIO}); $('#y2').val(selection.y2 * {IMGRATIO}); $('#w').val(selection.width * {IMGRATIO}); $('#h').val(selection.height * {IMGRATIO}); } $(document).ready(function () { $('#save_thumb').click(function() { var x1 = $('#x1').val(); var y1 = $('#y1').val(); var x2 = $('#x2').val(); var y2 = $('#y2').val(); var w = $('#w').val(); var h = $('#h').val(); if (x1=="" || y1=="" || x2=="" || y2=="" || w=="" || h=="") { alert("You must make a selection first"); return false; } else { return true; } }); }); $(window).load(function () { $('#thumbnail').imgAreaSelect({ aspectRatio: '{RATIO}', onSelectChange: preview, x1: 0, y1: 0, x2: {STARTX}, y2: {STARTY} }); }); </script> if thats of any help and the {NUMIMAGES} are variables that a phrased in by php when the page is loaded
  25. how can you have it so when a user closes a popup window an input value is updated in the parent window (the window it was opened from) id really appreciate any help
×
×
  • 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.