Jump to content

ainoy31

Members
  • Posts

    370
  • Joined

  • Last visited

    Never

Everything posted by ainoy31

  1. The word Data: is not part of what I can matching against. If that is throwing you off then, my verbage was wrong. I get matching rows but some data that comes across does not match and this example is one of them
  2. fugix, Do me a favor and don't claim you know me fully. If you don't have something useful to say, just be quiet in the corner of the room.
  3. I have been over this piece of code for a couple of hours and cannot determine why it does not find a match. I appreciate a second eye on this. Data: XVZ020-932300- Test Me VALLEY- INCLUDING...York Town...NORTH York Town...HENDERSON... BOULDER CITY 310 AM PDT THU JUN 29 2011 .DATA...TEST. HIGHS AROUND 101 ON THE WEST SIDE OF THE VALLEY... AROUND 111 ON THE EAST SIDE. SOUTHWEST WIND 10 TO 20 MPH. GUSTS UP TO 20 MPH INCREASING TO 30 MPH IN THE AFTERNOON. .DATA...CLEAR...BREEZY. LOWS AROUND 79 ON THE WEST SIDE OF THE VALLEY...AROUND 80 ON THE EAST SIDE. SOUTHWEST WIND 15 TO 25 MPH DECREASING TO 10 TO 15 MPH AFTER MIDNIGHT. $$ Script: if(preg_match_all("/\n[A-Z]{2}[ZC][0-9]{3}[A-Za-z0-9\-\=\+\,\ \.\/\[\]\(\)\:\;\'\"\&\@\#\%\!\,\>\<\n]*?\n\\$\\$/", $data, $match)) { print_r($match); } else { echo "No Match"; } Much appreciation.
  4. thanks man. that helped.
  5. Directory structure: /home/~test/public_html/soap/ .../xml/ .../bin/ .../products/browser/ In file /home/~test/public_html/soap/bin/products/browser/test.php, I include another file and call it's function: require("../../xml/processXML.php"); $xmlData = generateXML(....); In the /home/~test/public_html/soap/xml/processXML.php, I have the following code: function generateXML() { exec("../bin/code.cur"); } The problem is the exec("../bin/code.cur") fails of the relative path issue. I did a getcwd() before the exec() and it returned /home/~test/public_html/soap/bin/products/browser. I have tried using dirname() and no help. I hope this is clear enought to understand where I am coming from. Thank you. AM
  6. Thanks man. Would have never thought of that. It is working now.
  7. I am dynamicly generating multiple forms to submit the complete path to an image. I am using the JS document.formname.submit(). After clicking on the image text link, I get the error message that "document.name is null or not an object or undefined". I have viewed the source page and the forms have the correct name with the image. Did a print on the form name passed to the JS goForm and it displays the correct form name. Thanks. Here is my code: <? if($dh=dir($folder)) { $cnt=0; while($file=$dh->read()) { $pic = $folder . '/' . $file; if($file != '.' && $file != '..') { $prodimage = "image" . $cnt; ?> <form name="<?=$prodimage;?>" action="imageModify.php" method="post"> <input type="hidden" name="img" value="<?=$pic;?>"> <a href="javascript: goForm('<?=$prodimage;?>');"><?=$file;?></a><br /><br /> </form> <? } $cnt++; } } ?> <script type="text/javascript"> function goForm(name) { //document.write(name); document.name.submit(); } </script>
  8. ainoy31

    Code

    I have this IF statement to check the order status if( ($order->order_status != "waiting") || ($order->order_status != "waiting_for_cust_resp") ) { echo $order->order_status; exit; url_redirect($unsecure_baseref."/existingcustomers.php?t=".$transactionid); } Why would an order status of 'waiting' or "waiting_for_cust_resp" get echo out. It should skip this statement altogether. I have used the trim() function. I am being blind or stupid here. Thanks.
  9. ainoy31

    Query Help

    Sorry. I figured it out as soon as I posted it on friday and forgot to resolve it. Thanks for the reply.
  10. ainoy31

    Query Help

    My table columns are as follows userid, service1, service2, service3 and the data type is int(11) So, sample data is userid=34532 / service1_id=564 / service2_id=453 / service3_id=232 The idea is to search the table base on the given userid and pull back the largest value. Which I am able to do. SELECT greatest(service1_id,service2_id,service3_id) FROM devvtest.user_services where userid='$userid') Then, I used the returned value and query the 3 service tables to get user's info. This is where I am stuck. I can run a query for each service as follows: Query for Service1 select legal_name, legal_name_fn, legal_name_ln from service1 where service1_id = (SELECT greatest(service1_id,service2_id,service3_id) FROM devvtest.user_services where userid='$userid' Query for Service2 select legal_name, physical_first_name, physical_last_name from service2 where service2_id = (SELECT greatest(service1_id,service2_id,service3_id) FROM devvtest.user_services where userid='$userid' Query for Service3 select contact_first_name, contact_last_name, legal_business_name from service3 where service3_id = (SELECT greatest(service1_id,service2_id,service3_id) FROM devvtest.user_services where userid='$userid' I am trying to combine these multiple queries into one query. Hope this makes sense. I looked at using if() and no luck. Much appreciation.
  11. my checkbox name (name='nrai') was using the same name as mine hidden div id (div id="nrai"). I changed the checkbox name and it fixed my issue in IE7.
  12. I have a checkbox that once clicked, it hides the current content data and displays the other content data. If I click on the checkbox, the current content data disappears but the content I want does not display. Also, if i click on the checkbox again, the checkbox itself disappears and the current content data re-appears. This is only happening in IE7. It works fine in FF and IE8. Hope this makes sense. PHP Code: <div id="nrai_check"><input type="checkbox" name="nrai" value="nrai_yes" onclick="showHideMe();"></div> <div style="font-size: 12px; font-weight: normal; line-height: 13px; color: #000000; font-family: Helvetica, Arial, Verdana, sans-serif; margin:3px 0 0 0;"> Message content goes here... ($120 for 1 year) </div> <div id="nrai" style="display:none; font-size: 12px; font-weight: bold; line-height: 13px; color: #000000; font-family: Helvetica, Arial, Verdana, sans-serif; margin:5px 0 0 22px;">Content Data.......</div> <div id="regAgentInfo" style="display:block;"> Agent content.... </div> javascript code: function showHideMe() { var nrai = document.getElementById('nrai'); var agent = document.getElementById('regAgentInfo'); var agent_same = document.getElementById('regagent_same'); if(nrai.style.display=='block') { nrai.style.display='none'; agent.style.display='block'; agent_same.disabled = false; } else { nrai.style.display='block'; agent.style.display='block'; agent_same.disabled = true; agent_same.checked = false; } } Please ignore the inline style. This is still in development stage. Much appreciation. AM
  13. I have setup a page with a hyperlink where my ops people can go and test to see if the outgoing email they created is considered a spam or not. After clicking on the link, the email content is sent to the following mailbox /var/spool/mail/spam which is working as defined. I am using the Razor_Agent software to check for spam material on the emails. So, I can now go to shell into the server and use this command to check the email sent in the spam mailbox. razor-check /var/spool/mail/spamuser This is working fine. My problem is that when I try to auto the whole process, the email is sent but the razor-check does not get executed. When I do a exec('whoami'), I get 'nobody'. So, I try to edit my etc/sudoers file and add nobody ALL= (ALL) NOPASSWD:ALL with the hope of giving the permission to execute this linux command but no luck. Here is my code: $filename = $_GET['file']; $template = '/var/projects/devv/xxx'.$filename; $body=@file_get_contents($template); $to_email = 'spamuser@localhost'; $from_email = 'me@xxx.com'; $content ="text/html; charset=iso-8859-1"; $subject="Receipt No Signature"; $verify=mail($to_email, $subject, $body, sprintf("From: %s\r\nContent-Type: %s\r\n", $from_email, $content)); if(!$verify) { $status_message = "Test spam email failed."; } else { $status_message = "Test spam email passed."; exec("razor-check /var/spool/mail/spamuser"); } echo $status_message; I have tried changing to root via exec("sudo bash razor-check /var/spool/mail/spamuser") and no luck. Any suggestion is appreciated. Thanks. AM
  14. I am trying to run this script to auto check our outgoing system emails. So, I can send a test email to the spambox and then run the following script to check to see if it is considered spam or not. shell_exec("sudo bash razor-check /var/spool/mail/spambox"); This works fine from the command line. This should change to root and then run the script with no problems. I check my log and the razor-check does not run and no error message. Much appreciation.
  15. Thanks guys. My mind is on vacation.
  16. Need help trying to figure what I am doing wrong here. @font-face { font-family: Helvetica Black; src: url(Helvetica-Black.ttf); color:#E1E6FA; font-size: 16px; } .dbaText { font-family: Helvetica Black; } <p class="dbaText">Test text...</p> Seems like the font is not working. Thanks. AM
  17. yeah. it gives me the php version of 5.1.5 (cli)...etc
  18. I am trying to get information on my php installed package. We are running on Linux CentOS 4.4. Using this command does not return anything. It just returns another command prompt. I am logged in as root as well. rpm -qa | grep php Thanks. AM
  19. Here is my solution. I had to create a hidden element and assign the value to it after the ajax call. document.getElementById('existingcustomers').domainname.value=docText; <form name="existingcustomers" id="existingcustomers" method="post"> <input type="hidden" name="domainname" id="domainname"> </form> Then for my hyperlink, I used this: <a href="javascript:link_click('LinkVisit', <?php print $sessionid ?>, 'ClickTrack', 3, 'http://xxx.com/domain_link.php?dn='+document.getElementById('existingcustomers').domainname.value)" > I was able to pass the generated domain name along to my next page. Hope this helps someone else out.
  20. I have an AJAX call that fills in a domain name for me. loadXMLDoc("xxx.php?t="+tradename); var docText=xmlhttp.responseText; var upsellText= "<strong style='color:#000000'>" + docText + "</strong> or another"; document.getElementById(urltext).innerHTML = upsellText; Here is the code for the html element that gets filled. The form name is existingcustomers. <li style="padding-top:15px"><a href="javascript:link_click('LinkVisit', 76, 'ClickTrack', 3, 'http://xxx.com/domain_link.php?domain_name='+document.existingcustomers.urltext.value)" > Purchase <span name="urltext" id="urltext">an</span> Internet address for my business.</a> This is inexpensive and necessary to prevent other businesses from taking your address. </li> The problem is my <a href> tag. I would like to pass the domain name along to the domain_link page. But in firefox it tells me it is undefined. Hope this makes sense. Much appreciation. AM
  21. Thanks. Knew I miss something stupid. Later
  22. I am reading data from a text file and then inserting it into a mysql table. Here is the code: $query = "INSERT INTO user_mail_list(userid, mail_date) VALUES ("; $fh = fopen("userid.txt", "r"); while(!feof($fh)) { $data = fgets($fh, 4096); $sql = $query . $data . ', 2009-06-30)'; mysql_query($sql); } It inserts into the table fine but the my mail date column has 0000:00:00 values rather than the 2009-06-30. I have echoed the query as well and it looks good. INSERT INTO user_mail_list(userid, mail_date) VALUES (5 , 2009-06-30) INSERT INTO user_mail_list(userid, mail_date) VALUES (184 , 2009-06-30) INSERT INTO user_mail_list(userid, mail_date) VALUES (469 , 2009-06-30) I am missing something stupid here. Thanks. AM
  23. I tried the suggestions and no luck. Still returns an empty array
  24. I an trying to get the data from an aspx form called __VIEWSTATE but the returned array is empty. Here is my code: <? $url="http://simpleinternetsite.com"; $channel = curl_init(); curl_setopt($channel, CURLOPT_URL, $url); curl_setopt($channel, CURLOPT_FAILONERROR, 1); curl_setopt($channel, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($channel, CURLOPT_RETURNTRANSFER, 1); $data=curl_exec($channel); if($data) { preg_match('/<input id="__VIEWSTATE" name="__VIEWSTATE" type="hidden" value="([^"]*?)">/', $data, $matches); print_r($matches); } ?> Much appreciation on this. AM
×
×
  • 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.