Jump to content

kool_samule

Members
  • Posts

    169
  • Joined

  • Last visited

Everything posted by kool_samule

  1. Solution: http://en.kioskea.net/forum/affich-27490-link-not-open-in-internet-explorer
  2. Hi Chaps, I have this link, which (in Windoxs XP), opens a directory: However, we have upgraded a few PC's in the office to Windows 7 and now, when the above link is clicked, a blank window appears. Does anyone else have this problem, or found a solution? Cheers
  3. Hi Chaps, I have a Query, that selects data from MySQL database: $maxRows_rsShop = 20; $pageNum_rsShop = 0; if (isset($_GET['pageNum_rsShop'])) { $pageNum_rsShop = $_GET['pageNum_rsShop']; } $startRow_rsShop = $pageNum_rsShop * $maxRows_rsShop; $colname_rsShop = "-1"; if (isset($_GET['shop'])) { $colname_rsShop = $_GET['shop']; } mysql_select_db($database_dbconnect, $dbconnect); $query_rsShop = sprintf(" SELECT tbl_shop.shop_title, tbl_product.prod_id, tbl_product.prodtitle, tbl_product.prod_shop_thumb, tbl_product.prod_price, tbl_product_type.prod_type_title, tbl_product_type.prod_type_plural, SUM(tbl_product_type.prod_type_id) as quantity, img_name FROM tbl_shop_has_prod INNER JOIN tbl_shop ON tbl_shop.shop_id=tbl_shop_has_prod.FK_shop_id INNER JOIN tbl_product ON tbl_product.prod_id=tbl_shop_has_prod.FK_prod_id INNER JOIN tbl_product_type ON tbl_product_type.prod_type_id=tbl_product.FK_prod_type_id INNER JOIN tbl_product_has_size ON tbl_product_has_size.FK_prod_id=tbl_product.prod_id INNER JOIN tbl_web_img ON tbl_web_img.FK_shop_id=tbl_shop.shop_id WHERE shop_id=%s AND prod_quantity > 0 GROUP BY shop_id, prod_id ORDER BY prod_added DESC", GetSQLValueString($colname_rsShop, "int")); $query_limit_rsShop = sprintf("%s LIMIT %d, %d", $query_rsShop, $startRow_rsShop, $maxRows_rsShop); $rsShop = mysql_query($query_limit_rsShop, $dbconnect) or die(mysql_error()); $row_rsShop = mysql_fetch_assoc($rsShop); if (isset($_GET['totalRows_rsShop'])) { $totalRows_rsShop = $_GET['totalRows_rsShop']; } else { $all_rsShop = mysql_query($query_rsShop); $totalRows_rsShop = mysql_num_rows($all_rsShop); } $totalPages_rsShop = ceil($totalRows_rsShop/$maxRows_rsShop)-1; $queryString_rsShop = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_rsShop") == false && stristr($param, "totalRows_rsShop") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_rsShop = "&" . htmlentities(implode("&", $newParams)); } } $queryString_rsShop = sprintf("&totalRows_rsShop=%d%s", $totalRows_rsShop, $queryString_rsShop); I have 'Move to Fist Page', 'Move to Previous Page', 'Move to Next Page', 'Move to Last Page' links that work OK, but what I'm after is page numbering links so the user knows how many pages there are, i.e.: 1, 2, 3. Can anyone help / point me in the right direction? Cheers
  4. Hi Chaps, Bit of a newibe question regarding SSL Certificates and Payment Processing, I'm building an on-line shop and have got to the payment processing part. I'm going down the Merchant Account / Payment Gateway route, rather than the third-party (PayPal) route. What I need to know if whether I need to buy an SSL Certificate for my site as standard practice, and if I do, is it just the checkout/payment pages or the whole site? If it is just the checkout pages, do I link to the pages through SSL like so: <a href="https://www.domain.com/checkout.php">Continue to Checkout</a> or would it automatically recognise that the page/directory is protected?
  5. Hi, thanks for the reply, should have mentioned that I'm in the UK too. . . Don't think the monthy fees/SSL certificate/internet merchant account would be a problem to be honest. Does Sage Pay Go integrate within your site or does it redirect to a thirdy party website? I'm looking for lehmans term explanations on this one. . .
  6. Hi Chaps, not sure if this is the correct forum, so excuse me if it isn't, I'm building an online store, and have got to the point where I need some info about Payments. The site is in PHP and have already got a cart set up, so just need to accept credit cards and process them to a bank account. Does anyone have any information or preference on the best service provider to use, level of easiness on integration? I'm after a service provider that doesn't require redirection to a third party website (like PayPal), and we can't apply for PayPal Web Payments Pro, so something that would 'stay' within the site would be awesome. Any info would be a great help.
  7. sorted it, chmod on folder and file to 0775. thanks for the help!
  8. Hi, I've also tried chmod($path, 0777); the permission now reads: -rwxrwxrwx but it still isn't working . . . anything else that I can try?
  9. OK, done that, I take it I'm supposed to be looking at the Uploaded Image File, rather then the folder? The uploaded file has the permissions: -rw-r--r--
  10. I've got DreamWeaver for uploading, but I have access to Web - FTP, or Window Explorer . . .
  11. How do I do that if the upload folder id remotely accessed via FTP?
  12. Hi Chaps, I've got a image upload script that works on my Apache on IIS development server, but on the Apache Lunix live server, although the images are uploaded correctly and the MySQL database is updated correctly, I can't view the images. Viewing the HTML source, checking both the FTP files and the database values, all look OK. But the image doesn't show, just the white box with the red cross in the corner. If I try to copy the shortcut of the image and open it in a seperate window, I get the following: I'm not sure what to try next, it seems strange that the files/database/source look good but it just won't show! I've tried both $HTTP_POST_FILES and $_FILES to upload the images, but both have the same result. If anyone has any ideas, please help!
  13. Ok, thanks chaps, even if there is a bit of confusion on how exactly to do this, is the method correct, i.e. Attempt to set a Cookie and then, say redirect on failure?
  14. Hi Chaps, Quick question on this one, I've got a <noscript> tag in my HTML to check to see if Javascipt in enabled, but how do you check to see if cookies are enabled? Is there HTML code / PHP function, or do you simply try to set a cookie and redirect on failure to read the cookie you just to to set? Cheers
  15. Hi Chaps, Not sure about this one, so thought I'd ask. . . . I have a image gallery page where 4 thumbnail images: <div class="image_thumb"> <ul> <li><a href="Product_Large/Product_Large1.jpg"><img src="Product_Thumb/Product_Thumb1.jpg" alt="Product Item 1" /></a></li> <li><a href="Product_Large/Product_Large2.jpg"><img src="Product_Thumb/Product_Thumb2.jpg" alt="Product Item 2" /></a></li> <li><a href="Product_Large/Product_Large3.jpg"><img src="Product_Thumb/Product_Thumb3.jpg" alt="Product Item 3" /></a></li> <li><a href="Product_Large/Product_Large4.jpg"><img src="Product_Thumb/Product_Thumb4.jpg" alt="Product Item 4" /></a></li> </ul> </div> are presented, and using jQuery and CSS a larger version of the image is presented in a div: <div class="main_image"> <a href="Product_Zoom/Product_Zoom1.jpg" class="jqzoom" title="Product Item 1"><img src="Product_Large/Product_Large1.jpg" alt="- Product_Large1" /></a> </div> Then I use the class="jqzoom" jQuery function to display a extra-large version of the image. The problem is that the <a href: ....> link for each picture is the (at the monet) same, the <img scr . . .> changes however, to show the correct large version of the image. My question is, is there some way PHP can change the value of Product_Zoom1.jpg in: once the link in the <div class="image_thumb"> ???
  16. Hi jcbones, got a solution that works: <?php $job_cost = 0; $proj_cost = 0; do { ?> <tr> <th>//Job ID</th> <td></td> </tr> <?php do { ?> <tr> <th>// Task ID</th> <td>// Task Cost ($task_cost)</td> </tr> <?php $job_cost += $task_cost; } while ($row_rsTasks = mysql_fetch_assoc($rsTasks)); ?> <tr> <th></th> <td>// Job Total</td> </tr> <?php $proj_cost += $job_cost; } while ($row_rsJobs = mysql_fetch_assoc($rsJobs)); ?> Thanks anyway
  17. Hi ProjectFear, thanks for the code, however, I'm getting in a bit of a muddle, could you guide me through this. I have the Jobs/Tasks in a loop but don't know how to populate the array in the correct way. I have: <table border="0" cellspacing="0" cellpadding="0"> <tr> <th>// Project ID</th> <td></td> </tr> <?php do { ?> <tr> <th>//Job ID</th> <td></td> </tr> <?php do { ?> <tr> <th>// Task ID</th> <td>// Task Cost ($task_cost)</td> </tr> <?php } while ($row_rsTasks = mysql_fetch_assoc($rsTasks)); ?> <tr> <th></th> <td>// Job Total</td> </tr> <?php } while ($row_rsJobs = mysql_fetch_assoc($rsJobs)); ?> <tr> <th></th> <td>// Project Total</td> </tr> </table> And need the PHP code you posted to work with this . . .is this possible?
  18. Uhhh, yeah, that gives us the results I'm after, just need to figure out how to populate the $projects array in the correct way . . .
  19. Hi Chaps, I'm after a bit of help with summing up some arrays, to build a Quote for a Project. - Project_ID - Job_ID (repeated for each Project_ID) - Task_ID (repeated for each Job_ID) Each Task_ID has it's own cost, so what I need to do is sum up the Tasks, to give a total for Job and likewise I need to sum up the Job totals to give a Project total. Hopefully this will give you some idea as to what I have in my database: The result I'm after is: Job_1 = £1000 Job_2 = £900 Project_1 = £1900
  20. Hi Chaps, Outline: I have a table of Jobs and a table of Tasks. The Tasks are linked to the Jobs via FOREIGN KEY and is working fine. There can be say 10 Tasks linked to a Job, in this example, there are 4 already linked. I have a Query that selects the FK_task_id field from a table: rsJob: SELECT FK_task_id FROM tbl_job LEFT OUTER JOIN tbl_task_item ON tbl_task_item.FK_job_id=tbl_job.job_id; Producing: The second Query lists all the Tasks: rsTask: SELECT task_id, task_title FROM tbl_task; Producing: What I'm trying to do is that lists the total 10 Tasks, and check the checkboxes that are already linked. The PHP code I have at the moment: <?php do { ?> <?php echo $row_rsTask['task_title']; ?> - <input type="checkbox" name="task[<?php echo $row_rsTask['task_id']; ?>]" value="<?php echo $row_rsTask['task_id']; ?>" <?php if (!(strcmp(htmlentities($row_rsJob['FK_task_id'], ENT_COMPAT, 'utf-8'),htmlentities($row_rsTask['task_id'], ENT_COMPAT, 'utf-8')))) {echo "checked=\"checked\"";} ?> /></br> <?php } while ($row_rsTask = mysql_fetch_assoc($rsTask)); ?> The problem is that only the first record from rsJob is checked (1 - Prep), where 1 - Prep, 2 - Trans, 4 - TypeF and 10 - Ship should all be ticked. Has anyone got any ideas on how to display all 10 Tasks and also get all 4 checkboxes to check in this Loop?
  21. Uhh....like this? $day_of_week = date('w', strtotime(date("Y-m-d",$test_date)); switch ( $day_of_week ) { case 0: //sunday +3600*24; break; case 6: //saturday +3600*48; break; default: $test_date; break; }
  22. Like this? case 0: //sunday $due = strtotime(date("Y-m-d",$test_date+3600*24 )); $task_due = date('Y-m-d H:i:s', $due); break;
  23. OK, thanks dude, this is what I've got: <?php $task_start = "2010-05-27 16:08:23"; $duration = 45000; // Which I guess is 12.5 hours???? $start_str = strtotime($task_start); $calc = $start_str + $duration; $due_date = date('Y-m-d H:i:s',$calc); $test_date=$calc; $test_endtime=strtotime(date("Y-m-d",$start_str )." 17:30"); //start date 17:30 $test_starttime=strtotime(date("Y-m-d",$start_str+3600*24)." 9:00"); //next date 9:00 while ($test_date > $test_endtime) { $diff=$test_date - $test_endtime; $test_date=$test_starttime + $diff; $test_endtime+=3600*24; $test_starttime+=3600*24; } $day_of_week = date('w', $test_date); switch ( $day_of_week ) { case 0: //sunday $task_due = date('Y-m-d H:i:s', $test_date+3600*24); break; case 6: //saturday $task_due = date('Y-m-d H:i:s', $test_date+3600*48); break; default: $task_due = date('Y-m-d H:i:s',$test_date); break; } echo $task_due; ?> It looks good, could you just have a peep at it and let me know if you can see anything wrong with it? Cheers
  24. I now have this code, that will calculate the correct times, but does anyone know how I can check to see if the correct time falls on a weekend, and if so, move it to the next Monday? $task_start = "2010-05-27 16:08:23"; $duration = 45000; // Which I guess is 12.5 hours???? $start_str = strtotime($task_start); $calc = $start_str + $duration; $due_date = date('Y-m-d H:i:s',$calc); $test_date=$calc; $test_endtime=strtotime(date("Y-m-d",$start_str )." 17:30"); //start date 17:30 $test_starttime=strtotime(date("Y-m-d",$start_str+3600*24)." 9:00"); //next date 9:00 while ($test_date > $test_endtime) { $diff=$test_date - $test_endtime; $test_date=$test_starttime + $diff; $test_endtime+=3600*24; $test_starttime+=3600*24; } echo "<br>".$due_date; // 2010-05-28 04:38:23 echo "<br>".date('Y-m-d H:i:s',$test_date) //2010-05-29 11:38:23 $task_due = date('Y-m-d H:i:s',$test_date);
  25. Hi Chaps, I have a MySQL (Y-m-d H:i:s) starting date. . . I then have a task duration in seconds/minutes What I'm after is a task 'due' date, which falls between normal working hours (09:00 - 17:30). $task_start = 2010-05-27 16:08:23; $duration = 45000; // Which I guess is 12.5 hours???? $start_str = strtotime($task_start); $calc = $start_str + $duration; $due_date = date('Y-m-d H:i:s', $calc); echo $due_date; // 2010-05-28 04:38:23 As you can see, the calculation is correct, but the time falls outside the normal working hours, so I need some sort of function to check, then re-calculate so it falls between 09:00-17:30. Any help would be awesome!
×
×
  • 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.