Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. use the information stored in your database to create thepdf's on the fly. That way you don't store the actual pdf anywhere and can use the users details to grab the correct info from teh db to create it. I know it means creating it over and overe agian but thta may not be such a big issue. You could also cache the pdf on teh client machine......
  2. ????? Surely you service provider has one! I am with blueyonder so i can use smtp.blueyonder.co.uk. If you use outlook or similar you have to set an outgoing smtp server.
  3. There are script encryption for prtection shipped with zend studio - never had to use them so don't know what they do. problem with encryping the script is that the encryption key must somehow be available to the script - which means the user could extract the code themselves at some point if they find the key out. Now I had an idea of only porting part of your script to the server and have an installation script that copied the other fiels from your server - this way you can check the requesting url etc etc. Problem being you need to ensure open base dir is not set and all that malarkey.
  4. You have to escape special characters in a double quoted string! so (going on your code..) create file="index.php" content=" <?php \$r=\"r\"; echo \$r . \"Is r!\"; ?>"
  5. quickie... OK you have doen teh javascript to place stuff like [b]BOLD[/b],[h1]Header[/h1] into the text area adn teh the whole string has been saved in the database. You want to replace [b]SOME TEXT[/b] with bold tags adn same for h1 now you could do a string replace on just the '[' and the ']' [code]<?php $string = "[b]some bold text[/b] at the start of teh post."; $lookfor = array('[', ']'); $replacewith = array('<', '>'); $string = str_replace($lookfor, $replacewith, $string); ?> [/code] or you could do similar with regular expressions... [code]<?php $lookfor = array('/[b](?!\[)[/b]/','/[h1](?!\[)[/h1]/'); $replacewith = array('<b>\\1</b>', '<h1>\\1</h1>'); $strinng = preg_replace($lookfor, $replacewith, $string); ?> [/code] It takes too long to explain regular expressions so juts go and find a good tutorial on them.....
  6. Bit of java script to put the code in the text box (so its user friendly!) store that directly in your database then when outputting content to the screen do a regular expression replacement of the tags for your html tags.
  7. I think you should have a long hard look at your html!!!! There is not even a start and end html tag!!!!! Once you have something near a valid html file then worry why it doesn't look exactly how u want.
  8. OK. In the artupload file you have this....[code]<?php ....... $counter = 0; //ADD THIS LINE. while($counter <= count($photos_uploaded)) { if($photos_uploaded['size'][$counter] > 0) {    if(!array_key_exists($photos_uploaded['type'][$counter], $photo_types)) {      $result_final .= 'File ' . ($counter + 1) .        ' is not a photo<br />';    } else {      // Great the file is an image, we will add this file    } } $counter++; //ADD THIS LINE } ... ?> [/code] you still need anotehr loop to copy all teh files (it looks to me that you will only actually do one upload completely with script) but that is for you to throw and catch
  9. I AM!!! Just can't sleep (again!)
  10. [a href=\"http://uk.php.net/manual/en/function.substr.php\" target=\"_blank\"]substr[/a] you may aslo need to [a href=\"http://uk.php.net/manual/en/function.strip-tags.php\" target=\"_blank\"]striptags[/a]
  11. On the water marking.... I think I saw in the script that you grab the dimensions of each image. Simple if statement to check the watermark is smaller than the image - if it is use the watermark - if not do something else (I suggest you just put some text on), or nothing. Your first problem with the query has been sorted out. The final one about whether $_GET['editid'] is set.... another if statment... if (isset($_GET['editid'] )) { do something } else { do soemthing else }
  12. you have used count($arr) in your for loop!!! (For future refence that is very slow as count() will be evaluated each time you loop - set a counter = count before the loop and use that instead.) Now that does not stop the script working but maybe there try this [code] <?php $i = 0; foreach ($arr as $arr1) { foreach ($arr1 as $key => $cont) {    if (strpos($cont, '|') !== false  && !is_array($cont)) {     $_arr2[$i][$key] = explode('|', $cont);    } else {     $_arr2[$i][$key] = $cont;    }    } $i++; } ?> [/code] I am not entirly sure why you check to see if the key is not 0 in your script.
  13. You have to put it inside a form and set the 'action' attribute of the form to the url you want. BUT WHY???? all that hassel just for a link and you aren't even sending any data! I'd just use an image for the link if you don't want the 'plain' text or better still use css well and create a funky link! Latter is much better for accessibility!
  14. OK. First when you empty your table you can make sure the auto_insert counter returns to 1. In phpmyadmin goto the table you want, click teh operations tab at the top and at the bottom of the resulting page you can reset teh counter. The alternative is to do something with the mysql_insert_id function. After inserting into the table you can update the field of interest using the value rerurned from the mysql_insert_id function. A bit more code but not difficult AND will mean you don't have to worry about it again, even if you empty the table, once it is working.
  15. Are your clients getting any error messages back? Are you operating the machine or are they? (as impossible as it sems NEVER think that a user is doing everything right - although it should be that they can't!). Are they trying to upload enourmous bitmaps? ....sned us some more info on what they are doing, how they get the errors and some snippets. BTW What you have done is not exaclty thumnails - you are just re-sizing the images. No biggie I suppose but will affect page download time, pic quality etc. etc.
  16. Split them up into arrays of similar types (don't mix books nad chapters0 and then look at using array_mulit sort.
  17. make sure you ARE using a timestamp for both variable types. That is a timestamp for the last login and a tiemstamp for the ews article. Assuming that is all in order, make suer you are assiging a value to last vistit It may be that you instead use a join on the tables liek so.... [code]<?php $qry = "SELECT `metal_posts`.* FROM `metal_posts`, `user` WHERE `metal_posy`.`Date` >= `user`.`lastlogin` AND `user`.`id` = $_SESSION['id']"; $qry = mysql_query($qry); ......[/code] Now the field names need to be matched up (unless I am teh best guesser in the world!) but that should not be a problem! and the $_SESSION can be what ever you use to identify the user 9again I assume you use sessions witch may not be the case....
  18. Yes. Either the file does not exist or the path is incorrect or there is some permission problem (but think that last one would be specified if it were the case)
  19. I have tried this approach (and would be greatful for any comment). Firstly where possible avoid includes from any user dictated flow control... If unavoidable I prepend every path in the include with $_SERVER['DOC_ROOT']; hopefully forcing it to only include a file that is on this server.....
  20. Still this one eh??? Weel just looked at the code you posted the other day, no real probs there apart from maybe using extract() on user input (doesn't give you too much control on error checking their input but more importantly less portable code and issues with globals..... enough he says). OK are you getting errors returned from the script? if you try sending from an e-mail of your own do yet get a mail delivery failure notice? I know you have set them but what ARE the relevant php settings currently set to? Give us the [b]maximum[/b] amount of info you can - this one looks like a needle in a haystack jobbie...
  21. are other directories created using scripts? (I see the dir name is given by the owner name). Have a look and see if openbasedir is set in your php.ini - if it is no php script will be able to conductg and file/directory manipulation outside that directory.
  22. Mate throw us someting! Post any error messages, the code for generating the email, its contenst adn headers and such forth.... We can't help until we can see what the problem is.
  23. First thing to do is check your scripts have access to the folder. Once that is established you should be able to use the usual copy or move file functions as normal.
  24. do EVERYTHING except your query inside the while loop.
×
×
  • 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.