Jump to content

Greywacke

Members
  • Posts

    510
  • Joined

  • Last visited

Everything posted by Greywacke

  1. ISSUE RESOLVED!!! :)i realised that the quote request sent with the missing value, was as result of the line of code not running.upon closer inspection of the code, it turned out that the line was missing alltogether, hence the flag %PRODUCTMAKEMODEL% still being in the subject!i repaired and tested this, and it works now :)lookie:IT WORKS! lol, i've got to get out of the nasty habit of stressing when my coding does not want to work... the difference was it was working on the sandbox, where that line exists.that line was missing in the production - but not anymore
  2. okay ive come up with setting the memory limit to 32M as follows just after setting the timeout to 0. ini_set(′memory_limit′, ′32M′); but even after the second submission, it does not fix that "memory leak"...i guess i need to get to bed now, will work on this issue further in the morning.
  3. and here is where it is implemented in the handler, several lines down: $body = getFile("../templat/lead.html"); // load mail template// approximately 191 lines missing, none of them containing $attribsarr$body = str_replace("%PRODUCTMAKEMODEL%", $attribsarr["vehicle_make_model"]. " - ". $attribsarr["canopy_style"],$body); // insert make/model yes justsomeguy, it is not empty initially. see the screenshot with the first three leads. it seems that line of code just isn't running on the 4th loop :S$attribsarr is used in the 191 lines, but it is not being emptied according to the code up to loop 4, and the last 4 lines of code above. could it be as result of a memory leakage possibly? it is not as result of a script timeout, because this is set to 0 at the start of the script with set_time_limit(0); , in the event of many e-mail's being sent as result of many suppliers matching the quote request.can the memory space allocated for a php script be set in the script? let me google on this...okay. i've found the following: on the first result for "memory space allocated php" located at Maxi-Pedia Heap & Stack Definition.let me read on with php matches...
  4. hi all,here is the code that sets the array: $attribsarr = array();//reset($HTTP_POST_VARS);foreach ($_POST as $key => $val) { // loop quote attributes if ($key!="submit"&&$key!="contact_name"&& $key!="email"&&$key!="contact_cell"&& $key!="province"&&$key!="city_town"&& $key!="add_reqs"&&$key!="service_id"&& $key!="quotations_reqd") { $attribsarr[$key] = $val; }} the following screenshot shows the emails sent:Quote Requests Selectedi do not believe the array is set to empty, the first 3 mails contain the value.however the 4th email does not.why would this array be emptied spontaneously?
  5. hi again,i've decided to add them as displayed in the following preview pages:CanopyXchange.za.net Processing CaptureSalesPages (QuoteMe.za.net) Processing Capturethe onload event has been commented to display the div that acts as a "film" to deter people from leaving the page before fully processed.the alert has been dropped, rather displaying the reason why leaving would not be a good idea.ISSUE RESOLVED!
  6. okay that would be php, like i said - i don't know how to lol... :)and what is there to make sure that the user stays with the handler while its being processed, even if it takes up to a minute or three? this is the reason why i try to keep the user on the page while processing the submitted form.why i asked if a signed script would work, was because the dodgy marketing sites out there wouldn't easily get a trusted certificate.
  7. hi all,i was wondering if it is at all possible, to prevent a user from leaving a form handler during processing, as this is an important part, quite like processing a credit card...this form can take up to 1-3 minutes to process, depending on the amount of suppliers matched.i've tried to do this by adding the following before the php code of the handler: <div id="progressbg" style="visibility: visible;"> <div id="progressloader"> </div></div><script language="javascript">window.onload = function () { var lyr = document.getElementById("progressbg"); lyr.style.visibility = "hidden";}window.onbeforeunload = function (e) { var e = e || window.event; var lyr = document.getElementById("progressbg"); if (lyr.style.visibility == "visible") { // For IE and Firefox if (e) e.returnValue = "Please be patient while we process your request."; return "Please be patient while we process your request."; }}</script><style type="text/css">div#progressbg { position: fixed; z-index: 100; top: 0; left: 0; width: 100%; height: 100%; border: none; background: transparent url("progress-bg.png") top left fixed repeat; text-align: center; vertical-align: middle;}div#progressloader { position: fixed; z-index: 101; width: 128px; height: 47px; border: none; left: 45%; top: 45%; background: transparent url("progress-sp.gif") top left scroll no-repeat; text-align: center; vertical-align: middle;}</style> but if the user tries to leave the handler whilst processing - such as refreshing it (thus resubmitting it) or pressing stop or back, it gives him/her the option of cancelling the page. this tends to mess up the database selections and insertions, especially if there are more than one instance of the form being handled on the server. what to do? i have no idea how this could be fixed on the handler itsself.i guess with a compiled and signed javascript one might be able to do this, but something tells me that was only for netscape back in the day...if i add an alert in while the page is loading, then the onunload cancelling query still pops up regardless with the choice of leaving the page while loading.
  8. it seems to be working perfectly!ISSUE RESOLVED
  9. here is the replacement function and code used, still to check if it works: function str_in_array($needle, $haystack) { // this function allows case insensitive strings in the array to be searched foreach ($haystack as $value) { if (stristr($value, $needle)>-1) { return true; } } return false;}// if excerpt!str_in_array(";;;".$row1["bigint_SupplierID"].";;;",$GLOBALS[($status==2)?"mailaddp":"mailadds"])
  10. hi there,i need to check wether a certain string exists within an array of strings. there are two arrays that are checked respectively, with the following bit of php in the getsuppliers function.if $status = 0 it is an active supplier, if &status = 2 it is a prospecting supplier. the following excerpt is from inside an if statement. if (!function_exists('fnmatch')) { function fnmatch($pattern, $string) { for ($op = 0, $npattern = '', $n = 0, $l = strlen($pattern); $n < $l; $n++) { switch ($c = $pattern[$n]) { case '\\': $npattern .= '\\' . @$pattern[++$n]; break; case '.': case '+': case '^': case '$': case '(': case ')': case '{': case '}': case '=': case '!': case '<': case '>': case '|': $npattern .= '\\' . $c; break; case '?': case '*': $npattern .= '.' . $c; break; case '[': case ']': default: $npattern .= $c; if ($c == '[') { $op++; } else if ($c == ']') { if ($op == 0) return false; $op--; } break; } } if ($op != 0) return false; return preg_match('/' . $npattern . '/i', $string); }}function wc_in_array($needle, $haystack) { # this function allows wildcards in the array to be searched foreach ($haystack as $value) { if (true === fnmatch($value, $needle)) { return true; } } return false;} it doesn't seem the replacement fnmatch function accepts * characters as wildcards. could somebody please help!how could i fix this function? 0o i'm guessing to simplify it, to use stristr instead within the fnmatch replacement...i know it is not returning true if the value is found as i get duplicate suppliers in the array. the excerpt at the top is to check if the supplier has not been added yet.
  11. success!!! :)using 0 as the getdate day parameter gets the last day of the previous month - so i had to add 1 to get the last month of the current month.here is the adjusted code: $ts = strtotime(date("Y-m-t 23:59:59",mktime(23,59,59,$now["mon"]+ 1,0,$now["year"])));$tl = strtotime(date("Y-m-t 23:59:59",mktime(23,59,59,$now["mon"]- 2,0,$now["year"])));function monthsub($date, $month) { $now = getdate(strtotime(date("Y-m-d H:i:s", $date))); return strtotime(date("Y-m-t 23:59:59",mktime(23,59,59,$now["mon"]-$month+1,0,$now["year"])));} this issue is now resolved
  12. okay, i stand corrected.only the current timestamp should be of SAST, so that code needs to be updated as follows:require_once('../includes/statistical/timezones/class-timezone-conversion.php'); // Include timezone conversion class // Include timezone conversion classrequire_once('../includes/statistical/timezones/class-timezone-conversion.php');function convert_tz($timestamp, $timezone) { // convert local datetime to SAST (South African Standard Time) $tz = new TimezoneConversion(); // Create TimezoneConversion Object $tz->setProperty('DateTime', $timestamp); // Set local 'DateTime' to convert $tz->setProperty('Timezone', $timezone); // Set Timezone Convert To return $tz->convertDateTime(); // Get SAST Timestamp}$now = getdate(strtotime(convert_tz(date("Y-m-d H:i:s", time()),"SAST"))); i am still sitting with the problem of parsing the to dates however, from the current month to 4 months ago. for some reason the following code only allows months with 31 days to be parsed 0o function monthsub($date, $month) { $now = getdate(strtotime(date("Y-m-d H:i:s", $date))); return strtotime(date("Y-m-t 23:59:59",mktime(23,59,59,$now["mon"]- $month,0,$now["year"])));}
  13. okay, i noticed the monthadd was subtracting months and the monthsub was adding months, also the times and days of the month were swopped. here are the new functions: $now = getdate(strtotime(date("Y-m-d H:i:s", time())));$fs = strtotime(date("Y-m-1 00:00:00",mktime(0,0,0,$now["mon"]-3, 1,$now["year"])));$fl = strtotime(date("Y-m-1 00:00:00",mktime(0,0,0,$now["mon"], 1,$now["year"])));$ts = strtotime(date("Y-m-t 23:59:59",mktime(23,59,59,$now["mon"], 0,$now["year"])));$tl = strtotime(date("Y-m-t 23:59:59",mktime(23,59,59,$now["mon"]-3, 0,$now["year"])));function monthadd($date, $month, $timezone) { $now = getdate(strtotime(date("Y-m-d H:i:s", $date))); return strtotime(date("Y-m-1 00:00:00",mktime(0,0,0,$now["mon"]+ $month,1,$now["year"])));}function monthsub($date, $month, $timezone) { $now = getdate(strtotime(date("Y-m-d H:i:s", $date))); return strtotime(date("Y-m-t 23:59:59",mktime(23,59,59,$now["mon"]- $month,0,$now["year"])));}function getfromdates() { $f = $GLOBALS["fs"]; while ($f <= $GLOBALS["fl"]) { echo " <fromdate>\n"; echo " <text>1st ".date("F Y, H:i:s",$f)."</text>\n"; echo " <value>".date("Y-m-d H:i:s",$f)."</value>\n"; if (date("Y-m-d H:i:s",$f) == $GLOBALS["f"]) echo " <selected>selected</selected>\n"; echo " </fromdate>\n"; $f = monthadd($f,1); }}function gettodates() { $t = $GLOBALS["ts"]; while ($t >= $GLOBALS["tl"]) { echo " <todate>\n"; echo " <text>".date("tS F Y, H:i:s",$t)."</text>\n"; echo " <value>".date("Y-m-d H:i:s",$t)."</value>\n"; if (date("Y-m-d H:i:s",$t) == $GLOBALS["t"]) echo " <selected>selected</selected>\n"; echo " </todate>\n"; $t = monthsub($t,1); }} but unfortunately, these are the months returned in xml, after calling these two functions: <fromdate> <text>1st January 2010, 00:00:00</text> <value>2010-01-01 00:00:00</value></fromdate><fromdate> <text>1st February 2010, 00:00:00</text> <value>2010-02-01 00:00:00</value></fromdate><fromdate> <text>1st March 2010, 00:00:00</text> <value>2010-03-01 00:00:00</value></fromdate><fromdate> <text>1st April 2010, 00:00:00</text> <value>2010-04-01 00:00:00</value> <selected>selected</selected></fromdate><todate> <text>31st March 2010, 23:59:59</text> <value>2010-03-31 23:59:59</value></todate><todate> <text>31st January 2010, 23:59:59</text> <value>2010-01-31 23:59:59</value></todate> only the from dates are correct, why would the to dates not be correct?any assistance in sorting these issues out, would be immensely appreciated - it would seem my clarity of intention has vapourised as result of the heat.
  14. okay the code has been updated - i realised converting by timezone was not needed. $now = getdate(strtotime(date("Y-m-d H:i:s", time())));$fs = strtotime(date("Y-m-1 00:00:00",mktime(0,0,0,$now["mon"]-3, 1,$now["year"])));$fl = strtotime(date("Y-m-1 00:00:00",mktime(0,0,0,$now["mon"], 1,$now["year"])));$ts = strtotime(date("Y-m-t 23:59:59",mktime(23,59,59,$now["mon"], 0,$now["year"])));$tl = strtotime(date("Y-m-t 23:59:59",mktime(23,59,59,$now["mon"]-3, 0,$now["year"])));function monthsub($date, $month, $timezone) { $now = getdate(strtotime(date("Y-m-d H:i:s", $date))); return strtotime(date("Y-m-1 00:00:00",mktime(0,0,0,$now["mon"]- $month,1,$now["year"])));}function monthadd($date, $month, $timezone) { $now = getdate(strtotime(date("Y-m-d H:i:s", $date))); return strtotime(date("Y-m-t 23:59:59",mktime(23,59,59,$now["mon"]+ $month,0,$now["year"])));}function getfromdates() { $f = $GLOBALS["fs"]; while ($f <= $GLOBALS["fl"]) { echo " <fromdate>\n"; echo " <text>1st ".date("F Y, H:i:s",$f)."</text>\n"; echo " <value>".date("Y-m-d H:i:s",$f)."</value>\n"; if (date("Y-m-d H:i:s",$f) == $GLOBALS["f"]) echo " <selected>selected</selected>\n"; echo " </fromdate>\n"; $f = monthadd($f,1,"SAST"); }}function gettodates() { $t = $GLOBALS["ts"]; while ($t >= $GLOBALS["tl"]) { echo " <todate>\n"; echo " <text>".date("tS F Y, H:i:s",$t)."</text>\n"; echo " <value>".date("Y-m-d H:i:s",$t)."</value>\n"; if (date("Y-m-d H:i:s",$t) == $GLOBALS["t"]) echo " <selected>selected</selected>\n"; echo " </todate>\n"; $t = monthsub($t,1,"SAST"); }} but unfortunately it loops ad infinit... why does it never bring t = ts to tl and f = fs to fl? it is intended to print the previous 3 months from and to timestamps as well as the current month.
  15. hi all,it's me again with dates. i've written the following code to write the past 4 months including the current month in ascending order, as well as the past 4 months including the current month in descending order - to print out the dates in xml for population in two dropdowns via ajax.now, i can't seem to get this right: // Include timezone conversion classrequire_once('../includes/statistical/timezones/class-timezone-conversion.php');// get current SAST timestamp as getdate array to use in mktime$now = getdate(strtotime(convert_tz(date("Y-m-d H:i:s", time()),"SAST")));// get timestamp from start$fs = strtotime(date("Y-m-1 00:00:00",mktime(0,0,0, $now["mon"]-3,1,$now["year"])));// get timestamp from limit$fl = strtotime(date("Y-m-1 00:00:00",mktime(0,0,0, $now["mon"],1,$now["year"])));// get timestamp to start$ts = strtotime(date("Y-m-t 23:59:59",mktime(23,59,59, $now["mon"],0,$now["year"])));// get timestamp to limit$tl = strtotime(date("Y-m-t 23:59:59",mktime(23,59,59, $now["mon"]-3,0,$now["year"])));// timezone conversion functionfunction convert_tz($timestamp, $timezone) { // convert local datetime to SAST (South African Standard Time) $tz = new TimezoneConversion(); // Create TimezoneConversion Object $tz->setProperty('DateTime', $timestamp); // Set local 'DateTime' to convert $tz->setProperty('Timezone', $timezone); // Set Timezone Convert To return $tz->convertDateTime(); // Get SAST Timestamp}// subtract monthsfunction monthsub($date, $month, $timezone) { $now = getdate(strtotime(convert_tz(date("Y-m-d H:i:s", $date),$timezone))); return strtotime(date("Y-m-1 00:00:00",mktime(0,0,0,$now["mon"]- $month,1,$now["year"])));}// add monthsfunction monthadd($date, $month, $timezone) { $now = getdate(strtotime(convert_tz(date("Y-m-d H:i:s", $date),$timezone))); return strtotime(date("Y-m-t 23:59:59",mktime(23,59,59,$now["mon"]+ $month,0,$now["year"])));}// get from dates functionfunction getfromdates() { $f = strtotime(date($GLOBALS["fs"])); while ($f <= $GLOBALS["fl"]) { echo " <fromdate>\n"; echo " <text>1st ".date("F Y, H:i:s",$f)."</text>\n"; echo " <value>".date("Y-m-d H:i:s",$f)."</value>\n"; if (date("Y-m-d H:i:s",$f) == $GLOBALS["f"]) echo " <selected>selected</selected>\n"; echo " </fromdate>\n"; $f = monthadd($f,1,"SAST"); }}// get to dates functionfunction gettodates() { $t = strtotime(date($GLOBALS["fs"])); while ($t >= $GLOBALS["tl"]) { echo " <todate>\n"; echo " <text>".date("tS F Y, H:i:s",$t)."</text>\n"; echo " <value>".date("Y-m-d H:i:s",$t)."</value>\n"; if (date("Y-m-d H:i:s",$t) == $GLOBALS["t"]) echo " <selected>selected</selected>\n"; echo " </todate>\n"; $t = monthsub($t,1,"SAST"); }} i am using the timezone conversion class and am trying to implement the getdate object along with mktime.how would i be able to get this done? the to dates all need to be the last day of the month, at 23:59:59 and the from dates all need to be the first day of the month at 00:00:00.the server is in the US, so the current dates need to be converted to +2:00 GMT (SAST) to correctly select the values from the database, which has +2:00 GMT (SAST) as the session timezone.however, with the above code, i only get the following todate in the xml output: <fromdate> <text>1st January 1970, 02:00:00</text> <value>1970-01-01 02:00:00</value></fromdate> that is all output i get from the execution of both of these functions, how does this work? getfromdates();gettodates(); the globals ts and fs contain the from and to starting dates.the globals tl and fl contain the from and to ending dates.the globals t and f contain the selected dropdown values on the client - passed via the querystring.the from and to dates contain the current months first and last second respectively.please help anybody who can see what i do not! battling to see the forest for the trees again...
  16. nevermind, i seem to have this issue resolved now i believe it was due to utf8 encoding as result of the delivering page and form etc all being utf8, this was resolved as soon as i used utf8_decode on the string the problem was really php - but is resolved now
  17. hi there,i am currently experiencing a message string being dropped via ajax post.here follows the function that prepares the makes the request, followed by the code that prepares the data and requests it being sent. var ajaxloading = 0;function makeRequest(method, url, parameters) { var http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { // set type accordingly to anticipated content type http_request.overrideMimeType('text/xml'); //http_request.overrideMimeType('text/html'); } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Cannot create XMLHTTP instance'); return false; } http_request.onreadystatechange = function() { alertContents(http_request); } url += (method=="GET")?parameters:""; http_request.open(method, url, true); if (method == "POST") { http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request.setRequestHeader("Content-length", parameters.length); http_request.setRequestHeader("Connection", "close"); } http_request.send((method=="GET")?null:parameters); ajaxloading++;} var poststr = "textarea_transactionmessage=" + escape(document.form_transactions. textarea_transactionmessage.value);var s = document.form_transactions.menu_transactiontype. options[document.form_transactions.menu_transactiontype.selectedIndex].value;var f = document.form_transactions.menu_fromtimestamp. options[document.form_transactions.menu_fromtimestamp.selectedIndex].value;var t = document.form_transactions.menu_totimestamp. options[document.form_transactions.menu_totimestamp.selectedIndex].value;makeRequest("POST", "scripts/ajax_signup.php?q=1&s="+s+"&f="+f+"&t="+t, poststr); thus in theory, if the message value is "test message", and sending it to the handler (ajax_signup.php) it should retrieve it in the following code. // get statement message$message = $_POST["textarea_transactionmessage"];// insert statement message$body = str_replace("%MESSAGE%",$message,$body); yet the mails i receive have a blank message inserted into the paragraph that is originally "<p>%MESSAGE%</p>" 0ocan anybody perhaps see what i do not see here? the value is retrieved successfully and posted as "textarea_transactionmessage=test%20message". the querystring values s, f & t are successfully retrieved via $_GET.
  18. ah thanks RahXephon for noticing that :)i guess it's late, i'm tired - guess my focus of intention is a little faded atm...
  19. hi there,i'm retrieving a list of attributes from a database in php, and i need to get the attribute values of 3 specific attributes.here follows the code: $attr = split("<br />",$row1["text_LeadAttributes"]);$req = "";$mak = "";$stl = "";foreach ($attr as $value) { $val = split($value," = "); if (stristr($val[0],"product")) { $req = trim($val[1]); } elseif (stristr($val[0],"make_model")) { $mak = trim($val[1]); } elseif (stristr($val[0],"style")) { $stl = trim($val[1]); }}if (strlen($req)==0) { $req = $mak." ".$stl; }// print make / style attribute valueecho " <makestyle>" . xmlentities($req) . "</makestyle>\n"; as is, this code prints the following as <makestyle> value: <makestyle> </makestyle> now the leads are entered into the database from two sources, one has products_description as the combined make / style, or the other vehicle_make_model and canopy_style attributes. the lead attribute values retrieved from the database are formatted like follows from the second source: and formatted as follows from the first source: there are no errors, however - these values do not print. the records exist in the database, and theoretically i should be able to retrieve the attribute values.perhaps i need to split by any html tag using regular expressions in php?i am afraid i do not understand why this would not be working as expected.any assistance provided would be greatly appreciated!
  20. okay... so javacript is the default language then...
  21. hi everyone...i got an inpage script (a pair of script tags that follows, within the body tag.the snippet of code is as follows: <script language="JavaScript" type="text/javascript"><!-- window.onload = function () {var msg = "SQL DEBUGGING INFO:\nSELECT *...\", 1, 13);\n\n";if (msg.length>0) alert(msg); } // imagine these previous 3 lines as one line--></script> the string msg is rather extensive when alerting, however i need to alert the sql string output of the page to debug...can one do what i tried to do here, in one line? or does the commenting (old school habit) mess it up a tad...
  22. ah forgot to reply... my apologies, issue has been resolved. the array $recipients was redefined between where it was created and where it was used. thanks justsomeguy, will use that if i need it (but i believe my apache development server is set to E_ALL by default...)
  23. these are the arrays ealier directly after being split earlier in the page: $recipient[0]=Riette Bradford, $recipient[1]=Test Supplier One, $recipient[2]=pierre@greywacke.co.za, $recipient[3]=9960, $recipient[4]=27729154799, $recipient[5]=Supreme Industrial Park, Unit F 25, Cnr. Heidelberg Road & Southern Klipriviersberg Road, Steeledale, Johannesburg, $recipient[6]=18, $recipient[7]=http://maps.google.co.za/maps/ms?msa=0&msid=102191045390808171562.0004803ec16dc5f3dd9ac&hl=en&ie=UTF8&ll=-26.242607,28.101879&spn=0.008834,0.01649&z=17, $recipient[8]=http://www.canopyxchange.za.net/andycab;roadrunner_jhb;XrCi9yRcNicVzBxjPAUSE$recipient[0]=Pierre du Toit, $recipient[1]=Test Supplier Two, $recipient[2]=pierre@greywacke.co.za, $recipient[3]=10000, $recipient[4]=27729154799, $recipient[5]=880 13th Avenue, Wonderboom South, Pretoria, 0084, $recipient[6]=19, $recipient[7]=, $recipient[8]= why are elements 4-8 dropped without any error being displayed?
  24. well, only half of the problem was resolved... an issue still remains.why is it that elements 0 - 8 exist after being split, but certain elements are dropped by the time they are used?only 0-3 remains in the array...this is what remains in the two $mailaddp elements: $recipient[0]=Riette Bradford, $recipient[1]=Test Supplier One, $recipient[2]=pierre@greywacke.co.za, $recipient[3]=9960$recipient[0]=Pierre du Toit, $recipient[1]=Test Supplier Two, $recipient[2]=pierre@greywacke.co.za, $recipient[3]=10000
  25. this string created, does not insert those two fields, here is the entire function for retrieving suppliers and their info: function getsuppliers($sid,$status) { $GLOBALS[($status==2)?"mailaddp":"mailadds"] = array(); // try check for all attributeid's within loop for supplier foreach ($GLOBALS["attribids"] as $aid) { $sql1 = "SELECT text_ContactFirstName,text_ContactSurname, text_SupplierName,`text_ContactE-mail`, bigint_CurrentBalance, bigint_ContactTel, text_SupplierAddress, 5_suppliers.bigint_SupplierID, text_GoogleMapsURL, text_VTigerData FROM 9_supplierattributes JOIN (5_suppliers) ON ( 9_supplierattributes.bigint_SupplierID = 5_suppliers.bigint_SupplierID ) WHERE smallint_SupplierStatus = ".$status." AND bigint_ServiceID = ".$sid." AND bigint_AttributeID = ".$aid." AND bigint_RegionID = ".$GLOBALS["region"].";\n"; $GLOBALS["sql"] .= $sql1; $result1 = mysql_query($sql1); $err = mysql_error(); $GLOBALS["sql"] .= strtoupper($err)."\n"; if ($result1) { while ($row1 = mysql_fetch_array($result1)) { if (arrTrue(hasAttribs($row1["bigint_SupplierID"])) && !in_array(";;;".$row1["bigint_SupplierID"].";;;", $GLOBALS[($status==2)?"mailaddp":"mailadds"]) && $row1["bigint_CurrentBalance"] >= $GLOBALS["servicecost"]) { array_push($GLOBALS[($status==2)?"mailaddp":"mailadds"], $row1["text_ContactFirstName"]." ". $row1["text_ContactSurname"].";;;". $row1["text_SupplierName"].";;;". $row1["text_ContactE-mail"].";;;". $row1["bigint_CurrentBalance"].";;;". $row1["bigint_ContactTel"].";;;". $row1["text_SupplierAddress"].";;;". $row1["bigint_SupplierID"].";;;". $row["text_GoogleMapsURL"].";;;". $row["text_VTigerData"]); } } } mysql_free_result($result1); }} ah lol i noticed the last two items did not have the correct variable, just $row as opposed to $row1... issue seems to be resolved
×
×
  • Create New...