Jump to content

spyros1234

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

spyros1234's Achievements

Member

Member (2/5)

0

Reputation

  1. If I am not able to turn off the safe mode do you have any suggestion on how can I send multiple attachments?
  2. Hello I trying to find a way to send by email multiple attachments. I found a class (Attachment Mailer v1.2) http://www.finalwebsites.com/snippets.php?id=41 I am uploading the first the files and then I am sending them with this class The problem is that I am getting this error message: “Warning: mail() [function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in /var/www/vhosts/hostname/httpdocs/attach_mailer_class.php on line 280” Php script : require($_SERVER['DOCUMENT_ROOT']."/admin/attach_mailer_class.php"); $test = new attach_mailer($name = "Spyros Kotsakis", $from = "kotsakis@x2interactive.gr", $to = "kotsakis@x2interactive.gr", $cc = "", $bcc = "", $subject = "Test text email with attachments"); $test->text_body = "...Some body text\n\n the admin"; $test->add_attach_file($_SERVER['DOCUMENT_ROOT']."/uploads/".$row_ekpedeftika_files['file_name']); $test->process_mail(); Please help me !!!! I am open if you have another suggestion on how to send multiple attachments Thank you! [attachment deleted by admin]
  3. I have found this nice image crop script but I am having some difficulties to modified and put it in to my project. I am trying to find to root path for the picture that I want modify and I can’t The picture is on the directory “/upload”. The directory upload is in the root of the site Can you please help <?php //////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////// ////////////////////////// ////////////////////////// 1 2 CROP IMAGE ////////////////////////// ////////////////////////// ////////////////////////// ////////////////////////// (c) 2002 Roel Meurders ////////////////////////// ////////////////////////// mail: support [at] roelmeurders [dot] com ////////////////////////// ////////////////////////// version 0.2 ////////////////////////// ////////////////////////// ////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// ///// CREDITS: Most Javascript is taken from DHTMLCentral.com and is made by Thomas Brattli. /////// //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // SET VARIABLES /////////////////////////////////////////////////////////////////////////////////// $org = "PB180068.JPG"; //where the original can be found (incl fullpath); $res = "result.jpg"; //how the result should be saved (incl fullpath); $crw = 100; // sets the heigth to crop to; $crh = 100; // sets the heigth to crop to; $maxwinw = 500; //Sets the maxmimum width for displaying the original while cropping $maxwinh = 500; //Same, only this time it's the height $jpegqual = 80; //Sets the jpeg quality $redirect = "12cropimage.php"; //Sets the file to which the forms should be posted Change you include this file in another. $javafile = "12cropimage.js"; //Relative path to js-file $gdversion = 2; // set to 2 if you have gd2 installed $spacer = "spacer.gif"; //Relactive path tpo spacer.gif, transparent image $txt['cropimage'] = "crop"; $txt['preview'] = "preview"; $txt['bigger'] = "+"; $txt['smaller'] = "-"; $txt['closewindow'] = "close window"; $txt['selectioninpicture'] = "The selection has to be completely on the image."; //////////////////////////////////////////////////////////////////////////////////////////////////// // GET PROPORTIONS ///////////////////////////////////////////////////////////////////////////////// if ($crA != "nada"){ $size = getimagesize($org); $trueW=$size[0]; $trueH=$size[1]; if($trueH<$maxwinh && $trueW<$maxwinw){ $imgH = $trueH; $imgW = $trueW; $imgProp = 1; } else { if (($maxwinh/$maxwinw) < ($trueH/$trueW)){ $imgH = $maxwinh; $imgW = ($maxwinh / $trueH) * $trueW; $imgProp = $trueH / $imgH; } else { $imgW = $maxwinw; $imgH = ($maxwinw / $trueW) * $trueH; $imgProp = $trueW / $imgW; } } } //////////////////////////////////////////////////////////////////////////////////////////////////// // FUNCTION TO SHOW THE USER INTERFACE ///////////////////////////////////////////////////////////// function CR_showUI(){ global $txt, $imgW, $imgH, $imgProp, $spacer, $redirect, $javafile, $crw, $crh, $org, $res; ?> <html> <head> <title>Crop image</title> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <script language="JavaScript" src="<?=$javafile?>"></script> <script language="JavaScript"> <!-- function libinit(){ obj=new lib_obj('cropDiv') obj.dragdrop() } function cropCheck(crA){ if ((((obj.x + obj.cr)-11) <= <?=$imgW?>)&&(((obj.y + obj.cb)-11) <= <?=$imgH?>)&&(obj.x >= 11)&&(obj.y >= 11)){ var url = '<?=$redirect?>?&crA='+crA+'&org=<?=$org?>&res=<?=$res?>&crw=<?=$crw?>&crh=<?=$crh?>&l='+(obj.x-11)+'&t='+(obj.y-11)+'&s='+obj.cr; if (crA == 'pre'){ window.open(url,'prevWin','width=<?=$crw?>,height=<?=$crh?>'); } else { location.href=url; } } else { alert('<?=$txt['selectioninpicture']?>'); } } function stopZoom() { loop = false; clearTimeout(zoomtimer); } function cropZoom(dir) { loop = true; prop = <?=$crh?> / <?=$crw?>; zoomtimer = null; direction = dir; if (loop == true) { if (direction == "in") { if ((obj.cr > <?=($crw/$imgProp)?>)&&(obj.cb > <?=($crh/$imgProp)?>)){ cW = obj.cr - 1; cH = parseInt(prop * cW); obj.clipTo(0,cW,cH,0,1); } } else { if ((obj.cr < (<?=$imgW?>-5))&&(obj.cb < (<?=$imgH?>-5))){ cW = obj.cr + 1; cH = parseInt(prop * cW); obj.clipTo(0,cW,cH,0,1); } } zoomtimer = setTimeout("cropZoom(direction)", 10); } } onload=libinit; // --> </script> <style> body{font-family:arial,helvetica; font-size:12px} #cropDiv{position:absolute; left:11px; top:11px; width:<?=($crw/$imgProp)?>px; height:<?=($crh/$imgProp)?>px; z-index:2; background-image: url(<?=$spacer?>); } </style> </head> <body bgcolor="#FFFFFF" text="#000066" link="#000066" alink="#000066" vlink="#000066" marginwidth="10" marginheight="10" topmargin="10" leftmargin="10"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td align="left" valign="top"><IMG SRC="<?=$redirect?>?crA=img&org=<?=$org?>&res=<?=$res?>&crw=<?=$crw?>&crh=<?=$crh?>" border="1"></td> </tr> <tr> <td><img src="<?=$spacer?>" border=0 height="5" width="5"></td> </tr> <tr> <td align="right"> <input type="button" name="Submit1" value="<?=$txt['cropimage']?>" onClick="cropCheck('def');"> <input type="button" name="Submit2" value="<?=$txt['preview']?>" onClick="cropCheck('pre');"> <input type="button" name="Submit3" value="<?=$txt['smaller']?>" onMouseDown="cropZoom('in');" onMouseUp="stopZoom();"> <input type="button" name="Submit4" value="<?=$txt['bigger']?>" onMouseDown="cropZoom('out');" onMouseUp="stopZoom();"> </td> </tr> </table> <div id="cropDiv"> <table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000"> <tr> <td><img src="<?=$spacer?>"></td> </tr> </table> </div> </body> </html> <? } //////////////////////////////////////////////////////////////////////////////////////////////////// // FUNCTION TO SHOW THE CROP PREVIEW /////////////////////////////////////////////////////////////// function CR_showPrev($t,$l,$s){ global $txt, $imgW, $imgH, $redirect, $crh, $crw, $org, $res; ?> <html> <head> <title>crop voorbeeld</title> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="top.focus();"> <a href="#" onClick="top.close();"><img alt="<?=$txt['closewindow']?>" src="<?=$redirect?>?crA=crop&org=<?=$org?>&res=<?=$res?>&crw=<?=$crw?>&crh=<?=$crh?>&l=<?=$l?>&t=<?=$t?>&s=<?=$s?>" border=0></a> </body> </html> <? } //////////////////////////////////////////////////////////////////////////////////////////////////// // FUNCTION TO ACTUALLY MAKE THE CROP ////////////////////////////////////////////////////////////// function CR_make_crop($l,$t,$s,$w,$h){ global $org,$imgProp, $gdversion; $l1 = ceil($imgProp * $l); $t1 = ceil($imgProp * $t); $s1 = ceil($imgProp * $s); $s2 = ceil(($h / $w)* $s1); if ($gdversion == 2){ $new = imagecreatetruecolor($w,$h); } else { $new = imagecreate($w,$h); } $img = imagecreatefromjpeg ($org); imagecopyresized ($new, $img, 0, 0, $l1, $t1, $w, $h, $s1, $s2); imagedestroy($img); return $new; } //////////////////////////////////////////////////////////////////////////////////////////////////// // SCRIPT CONTROL VIA VARIABLE $crA //////////////////////////////////////////////////////////////// switch($crA){ case img: header("Content-Type: image/jpeg"); $im = CR_make_crop(0,0,($trueW/$imgProp),$imgW,$imgH); imagejpeg($im,"",$jpegqual); imagedestroy($im); exit; case crop: header("Content-Type: image/jpeg"); $im = CR_make_crop($l,$t,$s,$crw,$crh); imagejpeg($im,"",$jpegqual); imagedestroy($im); exit; case pre: CR_showPrev($t,$l,$s); exit; case def: $im = CR_make_crop($l,$t,$s,$crw,$crh); imagejpeg($im,$res,$jpegqual); imagedestroy($im); break; default: CR_showUI(); exit; } ///////////////////////////////////////////////////////////////////////////////////////////////////////// // END OF STORY ?>
  4. <?php //////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////// ////////////////////////// ////////////////////////// 1 2 CROP IMAGE ////////////////////////// ////////////////////////// ////////////////////////// ////////////////////////// (c) 2002 Roel Meurders ////////////////////////// ////////////////////////// mail: support [at] roelmeurders [dot] com ////////////////////////// ////////////////////////// version 0.2 ////////////////////////// ////////////////////////// ////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// ///// CREDITS: Most Javascript is taken from DHTMLCentral.com and is made by Thomas Brattli. /////// //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // SET VARIABLES /////////////////////////////////////////////////////////////////////////////////// $org = "PB180068.JPG"; //where the original can be found (incl fullpath); $res = "result.jpg"; //how the result should be saved (incl fullpath); $crw = 100; // sets the heigth to crop to; $crh = 100; // sets the heigth to crop to; $maxwinw = 500; //Sets the maxmimum width for displaying the original while cropping $maxwinh = 500; //Same, only this time it's the height $jpegqual = 80; //Sets the jpeg quality $redirect = "12cropimage.php"; //Sets the file to which the forms should be posted Change you include this file in another. $javafile = "12cropimage.js"; //Relative path to js-file $gdversion = 2; // set to 2 if you have gd2 installed $spacer = "spacer.gif"; //Relactive path tpo spacer.gif, transparent image $txt['cropimage'] = "crop"; $txt['preview'] = "preview"; $txt['bigger'] = "+"; $txt['smaller'] = "-"; $txt['closewindow'] = "close window"; $txt['selectioninpicture'] = "The selection has to be completely on the image."; //////////////////////////////////////////////////////////////////////////////////////////////////// // GET PROPORTIONS ///////////////////////////////////////////////////////////////////////////////// if ($crA != "nada"){ $size = getimagesize($org); $trueW=$size[0]; $trueH=$size[1]; if($trueH<$maxwinh && $trueW<$maxwinw){ $imgH = $trueH; $imgW = $trueW; $imgProp = 1; } else { if (($maxwinh/$maxwinw) < ($trueH/$trueW)){ $imgH = $maxwinh; $imgW = ($maxwinh / $trueH) * $trueW; $imgProp = $trueH / $imgH; } else { $imgW = $maxwinw; $imgH = ($maxwinw / $trueW) * $trueH; $imgProp = $trueW / $imgW; } } } //////////////////////////////////////////////////////////////////////////////////////////////////// // FUNCTION TO SHOW THE USER INTERFACE ///////////////////////////////////////////////////////////// function CR_showUI(){ global $txt, $imgW, $imgH, $imgProp, $spacer, $redirect, $javafile, $crw, $crh, $org, $res; ?> <html> <head> <title>Crop image</title> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <script language="JavaScript" src="<?=$javafile?>"></script> <script language="JavaScript"> <!-- function libinit(){ obj=new lib_obj('cropDiv') obj.dragdrop() } function cropCheck(crA){ if ((((obj.x + obj.cr)-11) <= <?=$imgW?>)&&(((obj.y + obj.cb)-11) <= <?=$imgH?>)&&(obj.x >= 11)&&(obj.y >= 11)){ var url = '<?=$redirect?>?&crA='+crA+'&org=<?=$org?>&res=<?=$res?>&crw=<?=$crw?>&crh=<?=$crh?>&l='+(obj.x-11)+'&t='+(obj.y-11)+'&s='+obj.cr; if (crA == 'pre'){ window.open(url,'prevWin','width=<?=$crw?>,height=<?=$crh?>'); } else { location.href=url; } } else { alert('<?=$txt['selectioninpicture']?>'); } } function stopZoom() { loop = false; clearTimeout(zoomtimer); } function cropZoom(dir) { loop = true; prop = <?=$crh?> / <?=$crw?>; zoomtimer = null; direction = dir; if (loop == true) { if (direction == "in") { if ((obj.cr > <?=($crw/$imgProp)?>)&&(obj.cb > <?=($crh/$imgProp)?>)){ cW = obj.cr - 1; cH = parseInt(prop * cW); obj.clipTo(0,cW,cH,0,1); } } else { if ((obj.cr < (<?=$imgW?>-5))&&(obj.cb < (<?=$imgH?>-5))){ cW = obj.cr + 1; cH = parseInt(prop * cW); obj.clipTo(0,cW,cH,0,1); } } zoomtimer = setTimeout("cropZoom(direction)", 10); } } onload=libinit; // --> </script> <style> body{font-family:arial,helvetica; font-size:12px} #cropDiv{position:absolute; left:11px; top:11px; width:<?=($crw/$imgProp)?>px; height:<?=($crh/$imgProp)?>px; z-index:2; background-image: url(<?=$spacer?>); } </style> </head> <body bgcolor="#FFFFFF" text="#000066" link="#000066" alink="#000066" vlink="#000066" marginwidth="10" marginheight="10" topmargin="10" leftmargin="10"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td align="left" valign="top"><IMG SRC="<?=$redirect?>?crA=img&org=<?=$org?>&res=<?=$res?>&crw=<?=$crw?>&crh=<?=$crh?>" border="1"></td> </tr> <tr> <td><img src="<?=$spacer?>" border=0 height="5" width="5"></td> </tr> <tr> <td align="right"> <input type="button" name="Submit1" value="<?=$txt['cropimage']?>" onClick="cropCheck('def');"> <input type="button" name="Submit2" value="<?=$txt['preview']?>" onClick="cropCheck('pre');"> <input type="button" name="Submit3" value="<?=$txt['smaller']?>" onMouseDown="cropZoom('in');" onMouseUp="stopZoom();"> <input type="button" name="Submit4" value="<?=$txt['bigger']?>" onMouseDown="cropZoom('out');" onMouseUp="stopZoom();"> </td> </tr> </table> <div id="cropDiv"> <table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000"> <tr> <td><img src="<?=$spacer?>"></td> </tr> </table> </div> </body> </html> <? } //////////////////////////////////////////////////////////////////////////////////////////////////// // FUNCTION TO SHOW THE CROP PREVIEW /////////////////////////////////////////////////////////////// function CR_showPrev($t,$l,$s){ global $txt, $imgW, $imgH, $redirect, $crh, $crw, $org, $res; ?> <html> <head> <title>crop voorbeeld</title> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="top.focus();"> <a href="#" onClick="top.close();"><img alt="<?=$txt['closewindow']?>" src="<?=$redirect?>?crA=crop&org=<?=$org?>&res=<?=$res?>&crw=<?=$crw?>&crh=<?=$crh?>&l=<?=$l?>&t=<?=$t?>&s=<?=$s?>" border=0></a> </body> </html> <? } //////////////////////////////////////////////////////////////////////////////////////////////////// // FUNCTION TO ACTUALLY MAKE THE CROP ////////////////////////////////////////////////////////////// function CR_make_crop($l,$t,$s,$w,$h){ global $org,$imgProp, $gdversion; $l1 = ceil($imgProp * $l); $t1 = ceil($imgProp * $t); $s1 = ceil($imgProp * $s); $s2 = ceil(($h / $w)* $s1); if ($gdversion == 2){ $new = imagecreatetruecolor($w,$h); } else { $new = imagecreate($w,$h); } $img = imagecreatefromjpeg ($org); imagecopyresized ($new, $img, 0, 0, $l1, $t1, $w, $h, $s1, $s2); imagedestroy($img); return $new; } //////////////////////////////////////////////////////////////////////////////////////////////////// // SCRIPT CONTROL VIA VARIABLE $crA //////////////////////////////////////////////////////////////// switch($crA){ case img: header("Content-Type: image/jpeg"); $im = CR_make_crop(0,0,($trueW/$imgProp),$imgW,$imgH); imagejpeg($im,"",$jpegqual); imagedestroy($im); exit; case crop: header("Content-Type: image/jpeg"); $im = CR_make_crop($l,$t,$s,$crw,$crh); imagejpeg($im,"",$jpegqual); imagedestroy($im); exit; case pre: CR_showPrev($t,$l,$s); exit; case def: $im = CR_make_crop($l,$t,$s,$crw,$crh); imagejpeg($im,$res,$jpegqual); imagedestroy($im); break; default: CR_showUI(); exit; } ///////////////////////////////////////////////////////////////////////////////////////////////////////// // END OF STORY ?>
  5. I have found this nice image crop script but I am having some difficulties to modified and put it in to my project. I am trying to find to root path for the picture that I want modify and I can’t The picture is on the directory “/upload”. The directory upload is in the root of the site Can you please help
  6. Problem on retrieving values from the database I am retrieving a value from the database and I insert the value as a value of a field The problem is that when the value has spaces then in the filed is viewed only the part of the value before the first space. If the value is not includes any spaces then the value appears in the field correct.
  7. Hello I have a problem on retrieving some fields from the Database. The data in the fields are written with Greek fonts. In the mysql the data are viewed correctly the problem is when I am trying to print them out. In properties of the mysql fields I have CHARACTER SET utf8 COLLATE utf8_unicode_ci I also have tried to use instead of ‘utf8’ ‘greek’ in this line ---- mysql_query("SET NAMES 'utf8'", $connection); Please help Thank you <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <?php require("config.php"); $connection = mysql_connect($db_host, $db_user, $db_password) or die("error connecting"); mysql_select_db($db_name, $connection); mysql_query("SET NAMES 'utf8'", $connection); $query = "SELECT * from area"; $result = mysql_query($query, $connection); for ($i = 0; $i < mysql_num_rows($result); $i++) { $autoid = mysql_result($result, $i, "autoid"); $area = mysql_result($result, $i, "area"); echo $area; } ?> </body> </html>
  8. Hello I am creating a static ComboBox. The problem is that I can’t assign to the ComboBox a selectedItem Please help Thank you combomm.themeColor = 0xCCCCCC; combomm.rollOverColor =0xCCCCCC; combomm.borderColor = 0xCCCCCC; combomm.selectionColor = 0xCCCCCC; combomm.addItem("hello","script"); combomm.addItem("32432","script"); combomm.addItem("sdfsdf","script"); combomm.addItem("234sdfsdf2","script"); combomm.selectedItem = combomm.length-1;
  9. Hello I have a 6 digit number and I want to split it to 2 separate numbers do you know how can I do this ? For example the number 200509 I want to split it in to 2005 and 09. Thank you.
  10. I have a link that I want when the user clicks on it a confirm pop-up to appear. But it’s not working. Can you please help me? echo ' </td><td width="15%" bgcolor="'.$bg_color.'" align="center" class="update"><div class="update"> <a href="index.php?autoid='. $autoid .'" class="update" OnClick= "return confirm("do you really want to delete")">DELETE</a></div></td></tr>';
  11. Hello I am trying to make a script that will read a .txt file and it will export the text that is written in the file in separate variables I have upload the txt file www.istografos.com/gari/orders3.txt I will try to describe the file but will be better if you have the time to open it. The text is written in the same order in each txt file. The problem is the text length will be indefinable. And something else the txt file is an export from a ERP system so I can’t modify the text. I have to deal it as it is. If you have any idea please HELP
  12. Hello I have store in a database some question with four answers for each question. I want retrieve randomly 20 questions from the database. Also I have to mix the answers as I echo them out… Do you have any idea how can I do this? Thank you
×
×
  • 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.