Jump to content

jvrothjr

Members
  • Posts

    299
  • Joined

  • Last visited

Everything posted by jvrothjr

  1. I was looking for something for testing once it goes into production I would be willing to send the money to host the production site.
  2. I am looking for a free host for a DB I basiclly need one DB with two users having access to the same DB. 1) Admin access remotely or localhost 2) read-only - remote access only I have a program that would need to have read access to rebuild files on update of software I have developing. remote users would have i file (RCbuild.php) that while everytime they wished to run the software would pull the latest pages. Still in the proccess of developing it. I have it running internal but would like to set it up remotely. Any Ideas would be great....... Thanks...
  3. I had found a script a guy wrote that does what you looking for. I took what I learned from this guy's script and created a photo storage DB to fit what I needed. I have sent you the Zip file of what this guy had put together understand more of what your trying to do. the file is f_2667.zip
  4. ok lets try this in your htdocs root of your web site create a dir [Store] and under that create [Thumb] here is a basic script that will do what your asking 1) upload file 2) check file extensions last three char [jpg] 3) if jpg move file from temp location to [Store] 4) create thumbnail of that file and store in [Store/Thumb] 5) get dir list of [Store/Thumb] 6) Hyper Link the Thumbnail to the large photo located in [Store] so if some one clicks on the Thumbnail the photo opens up in a target window. [code=php:0] <? if ($submit){ /* Add backslashes before characters that need to be quoted in database queries etc.    These characters are single quote ('), double quote ("), backslash (\) and NUL (the NULL byte). */ $data = addslashes(fread(fopen($form_data, "r"), filesize($form_data))); // Get file extention $upload_dir="store/";   //Source File path $thumbnail_path="store/Thumb/"; //Thumb Nail Storage $ext = substr($form_data_name,strlen($form_data_name)-3); // get last three char of filename $ext = strtolower($ext); // set file ext variable // Verify file extention as supported formats if ($ext == "jpg") { // if jpg ext then move file to create thimbnail if (move_uploaded_file($form_data,$upload_dir.$form_data_name)) // Call Thumbnail function         thumb_jpeg($form_data_name,$upload_dir,$thumbnail_path); // Display message Thumbnail was created.        echo "<center><h3>".$form_data_name." Thumbnail Created</h3></center>"; } else { // if format is not supported display message echo "<center><h3>".$ext." file format is not supported. Please try again (JPG only)</h3></center>"; } } function thumb_jpeg($image_name,$source_path,$destination_path){ //Create Thumbnail     $new_width=50;  //Image width Change if needed     $new_height=50;  //Image height Change if needed     $destimg=ImageCreate($new_width,$new_height) or die("Problem In Creating image");     $srcimg=ImageCreateFromjpeg($source_path.$image_name) or die("Problem In opening Source Image");     ImageCopyResized($destimg,$srcimg,0,0,0,0,$new_width,$new_height,ImageSX($srcimg),ImageSY($srcimg)) or die("Problem In resizing");     Imagejpeg($destimg,$destination_path.$image_name) or die("Problem In saving"); } // Display input box to upload file with submit button echo "<form method='post' action='$PHP_SELF' enctype='multipart/form-data' name='s'>"; echo "File to upload/store in database:  <input type='file' name='form_data' size='64'>"; echo "<br><input type='submit' name='submit' value='submit'>"; echo "</form>"; // Get list of path            $dhr = opendir($thumbnail_path); // While loop if path was returned            while (false !== ($file = readdir($dhr))) { // if file found call subroutine and pass path and filename                    if (!is_dir("$dirpath/$file")) { // if not this filename       if ($file <> "Thumbs.db") { // display thumbnail picture echo "<a href ='store/".$file."' TARGET='_BLANK'><img src='store/thumb/".$file."' Width='50' height='50'>"; } } } // Close path listing closedir($dhr); ?> [/code] Everything you need to create your script to list a folder and create thumbnails is a part on this script work with it and you can get what your looking for.
  5. [code=php:0] $upload_dir="store/";   //Source File path $thumbnail_path="store/Thumb/"; $ext = substr($form_data_name,strlen($form_data_name)-3); $ext = strtolower($ext); // Verify file extention as supported formats if ($ext == "jpg") { if (move_uploaded_file($form_data,$upload_dir.$form_data_name))         thumb_jpeg($form_data_name,$upload_dir,$thumbnail_path);         $datatn = addslashes(fread(fopen($thumbnail_path.$form_data_name, "r"), filesize($thumbnail_path.$form_data_name))); } [/code] oops there is also a filetype function
  6. your talking about the script looking at a folder getting the jpg's and creating thumbnails on the fly for the whole folder. Not doing this on the upload of the image????? I have a script that will create a thumbnails from a JPG file uploaded. then embed both the original and the thumbnail in a DB with other info and once a search is done the album is displayed using the thumbnail and once the thumbnail is selected a second script is used to pull the photo it self out of the DB. But this is diff then mass creation based on a folder........ and I believe that is what your looking for?????
  7. your value is set to nothing to display the value you need to use $_POST['varname'] [code=php:0] <input type="text" name="app_name" size="25" maxlength="25" value="" /> [/code]
  8. you could do many different things. 1) stop the mysql server and copy the data folder 2) mysqldump to create a sql file backup 3) use a tool like phpmyadmin to create sql dump files I use two of these nightly 1) on a site that is only used during bussness hours I use option [1] stop the server and copy folder. 2) on the other site used 24/7 factory support I use mysqldump (via a schedule) to auto backup the database to sql file.
  9. I have not tested this code but I believe this is what your looking for [code=php:0] echo "<table><tr><td></td>"; $queryTHD = "SELECT * FROM allstypes ORDER BY types ASC"; if ($MatchTHDRow = mysql_fetch_array($SearchTHD)) { do{ $tp = $MatchTHDRow[types]; echo "<td>".$tp."</td>"; } while($MatchTHDRow = mysql_fetch_array($SearchTHD)); } echo "</tr>"; $queryCPS = "SELECT * FROM ALLcps ORDER BY CPS ASC"; $SearchCPS = mysql_query ($queryCPS); if ($MatchCPSRow = mysql_fetch_array($SearchCPS)) { do{ $cp = $MatchTYPRow[CPS]; $queryTYP = "SELECT * FROM allstypes ORDER BY types ASC"; $SearchTPY = mysql_query ($queryTPY); echo "<tr><td>".$cp."</td>"; if ($MatchTYPRow = mysql_fetch_array($SearchTYP)) { do{ $tp = $MatchTYPRow[types]; $querycnt = "SELECT count(*) FROM AllCombo WHERE types ='tp' and CPS = 'cp'";     $cntchk=mysql_result($querycnt,0,"count(*)");     echo "<td>";     if ($cntchk == 0) {echo "NO";} else {echo "YES";}     echo "</td>"; } while($MatchCPSRow = mysql_fetch_array($SearchCPS)); } echo "</tr>"; } while($MatchCPSRow = mysql_fetch_array($SearchCPS)); echo "</table>"; [/code]
  10. [code=php:0] $qeury = "SELECT ALLcps.CPS, allstypes.types, AllCombo.APSID FROM allstypes INNER JOIN (ALLcps INNER JOIN AllCombo ON ALLcps.CPS = AllCombo.CPS) ON allstypes.types = AllCombo.types WHERE (((ALLcps.CPS)='cp1') AND ((allstypes.types)='type2'));" [/code]
  11. Here is a hyperlink code we use to use the default (outlook) on the machine [code=php:0] echo "<a href='mailto:$email?SUBJECT=$subject&Body=$body'>Send E-mail</a>"; [/code] Heads up not all are machine here at work had  the Client installed on the workstation. Shared machines used the Web Applicantion and not the Client and this would not work We switched to php mail function via are SMTP server.
  12. you could use SQLyog with the OBDC driver from mysql to connect to the Access DB and create a SQL file then with the same software connect to the mysql DB and run the sql file to import it into mysql. I have used this process before to do this.
  13. You would want to use the option [between] on your select query statement [code=php:0] $query = "select * from pricing where (Mcov between $Minprice and $Maxprice)"; [/code]
  14. Here is a Basic layout of how you could give the option of multi file uploads [code=php:0] <? if ($b == '') {$b = 1;} if ($b > 20) {$b = 20;} echo "<form method='POST' enctype='multipart/form-data'>"; echo "Enter Number of Files to Upload at once (Max: 20)<br>"; echo "<input align=center type='text' size=5 maxlength=2 name='b' value=".$b.">"; echo "<input type='hidden' name='TRN' value=".$TRN.">"; echo "<input type='hidden' name='User_Name' value=".$User_Name.">"; echo "<input type='hidden' name='TP' value=".$TP.">"; echo "<input type=hidden name=FNID value=".$FNID.">"; echo "<input type='Submit' name=cmd value='Reload'></form>"; echo "Browse a File to Upload For Record ".$TRN.": <br>"; echo "<form method='POST' enctype='multipart/form-data'>"; echo "<input type='hidden' name='b' value=".$b.">"; echo "<input type='hidden' name='TRN' value=".$TRN.">"; echo "<input type='hidden' name='User_Name' value=".$User_Name.">"; echo "<input type='hidden' name='TP' value=".$TP.">"; for ($a=0; $a < $b; $a++) {     $filetoupload = "filetoupload".$a;         echo "<input type='file' size='60' name='".$filetoupload."'><br>"; } echo "<input type='Submit' name=cmd value='Upload File'></form>"; ?> [/code]
  15. if its heavy on mysql how much memory is set for mysql on the box. (if your running is local)
  16. you got the php.ini Set SMTP=severname smtp_port=25
  17. index.php code [code=php:0] <IFRAME SRC='menu.php' scrolling='auto' FRAMEBORDER=0 width=20% height=90% align=left name=frame2> <IFRAME SRC='index1.php' scrolling='auto' FRAMEBORDER=0 width=80% height=90% align=right name=main> [/code] menu.php code [code=php:0] <form method=POST name=form1 action=''> <a href = 'index2.php' TARGET='main'> <img src='home.gif' onclick='submit()'> </form> [/code] When the button in Frame2 is selected it reloads with a new page in main iframe index2.php
  18. [code=php:0] <?php while ($row = mysql_fetch_array(whatever)) {   if ($tempfile != Null) {     // do what is necessary to show the file   }else {     // act like the file was never there   } } ?> [/code]
  19. here is a join that will get you matching records then you will need to insert this to the third table [code=php:0] "SELECT DISTINCT tb1.label, tb2.label2 FROM tb1, tb2, tb3 from tb2 left join tb3 on tb2.label2 = tb3.label2" [/code]
  20. Do you use an array to build your checkbox listing [code=php:0]        foreach ($filen as $value){             echo "<input type='checkbox' name='chkbx[]' value='".$value."' checked>$value<br>";         } [/code] If so you will need a foreach loop or something the get the values back out If you build is one line at a time the maybe your displaying the value to the screen but not setting the variable to it example of display and setting variables [code=php:0]             echo "<input type='checkbox' name='chkbx1' value='opt1' checked>Option 1<br>";             echo "<input type='checkbox' name='chkbx2' value='opt2'>Option 2<br>"; [/code] example on display only [code=php:0]             echo "<input type='checkbox' name='chkbx1' checked>Option 1<br>";             echo "<input type='checkbox' name='chkbx2'>Option 2<br>"; [/code]
  21. I have added both mime and filetype and neither one works I have enabled mine in php.ini and added <?php to magic.mime file using the below function and still getting nothing but [file] anyother Ideas Please [code=php:0] Function Setrecloop($dirpath,$form_data){ $filepath = $dirpath."/".$form_data;   $data = addslashes(fread(fopen($filepath, "r"), filesize($filepath)));   $filepath_size = filesize($filepath); echo mime_content_type($filepath)." Testing filepath</p>"; echo filetype($filepath)." Testing filepath</p>"; echo mime_content_type($form_data)." Testing form_data</p>"; echo filetype($form_data)." Testing form_data</p>"; echo mime_content_type($data)." Testing data</p>"; echo filetype($data)." Testing data</p>"; } [/code]
  22. My question here is I need to know the file type of file list from a directory and feed to the is function all its telling me is file or dir and I need to know image or text type. Can some one help with this. basiclly getting revision of files listed under root directory of server just need to know the type of file it is.................. [code=php:0]Function Setrecloop($form_data){ // Set variable of file data              $Filesize = filesize($form_data); $Filetype = filetype($form_data); } [/code]
  23. ok is [password_hash] a field in the DB and is [l] also a field name?
  24. its all in the " ' single and doule quote
×
×
  • 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.