Jump to content


Photo

Re: send page to friends help please


  • Please log in to reply
58 replies to this topic

#21 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 September 2006 - 06:44 PM

Pointing a browser at http://www..com/imag...w=500&h=500

causes 'something' to happen (in image.php) to be able to generate this:

value="http://www..com/gall.../01/01/510.jpg"

Whatever variable name holds that value is the variable name you want to include in the email. You'll need to look through the image.php script to see what that variable is named.
Legend has it that reading the manual never killed anyone.
My site

#22 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 06:50 PM

andy here is the image.php code any ideas as to what i need??

if ( !defined('SECTION_MODE') )
{
define("PHPFOX_RUNTIME",TRUE);
define("PHPFOX_DIR","");
define("PHPFOX_SCRIPT","image");

if (!@include_once("phpfox_loader.php"))
{
die("<b>Fatal Error:</b> Cant Load phpfox_loader.php");
}

if (@$GLOBALS['phpfox_config']['error_reporting'])
{
error_reporting(0);
}
}

switch( $PHPFOX_SUB )
{

case 'image_verify':

ob_start();

$image = imagecreate(60, 30);

$bgColor = imagecolorallocate ($image, 255, 255, 255);

$textColor = imagecolorallocate ($image, 0, 0, 0);

imagestring ($image, 5, 5, 8,  $PHPFOX_ID, $textColor);

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

header("Cache-Control: no-store, no-cache, must-revalidate");

header("Cache-Control: post-check=0, pre-check=0", false);

header("Pragma: no-cache");   

header('Content-type: image/jpeg');

imagegif($image);

imagedestroy($image);

ob_end_flush();

break;
default:

if ( !empty($_GET['user']) )
{
$sub_source = ('member/i/p/'.$VAR[29].''. $_GET['user'] .'.jpg');
}

if ( !empty($_GET['gallery']) )
{
$sub_source = ('gallery/'.$VAR[17].''. base64_decode( $_GET['gallery'] ) .'.jpg');
}

if ( !empty($_GET['groups']) )
{
$sub_source = (''.$VAR[30].''. $_GET['groups'] .'.jpg');
}

$extra = "";

if ( !empty($phpfox_config['gd_watermark_image']) && !empty($phpfox_config['gd_watermark']) )
{
$total = ($_GET['w']+$_GET['h']);

if ( $total > 300 )
{
$extra .= "&fltr[]=wmi|". $VAR[5] ."/". $phpfox_config['gd_watermark_image_location'] ."|BL|";
}
}
else
{
if ( !empty($phpfox_config['gd_watermark']) )
{
$total = ($_GET['w']+$_GET['h']);
$fontsize = false;

if ( $total >= 500 )
{
$fontsize = 4;
}

if ( $fontsize )
{
$extra .= '&fltr[]=wmt|'. $phpfox_config['gd_watermark_text'] .'|'. $fontsize .'|BL|'. $phpfox_config['gd_watermark_color'] .'|';
}
}
}

header('Location: '. $VAR[0] .'/thumb/index.php?src='. base64_encode( ''. $VAR[5] .'/'. $sub_source .'' ) .'&w='. $_GET['w'] .'&h='. $_GET['h'] .'&q='. $phpfox_config['upload_set_quality'] .''. $extra .'');
exit;
break;

#23 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 07:20 PM

hi

not sure if this is the bit i need??-

if ( !empty($_GET['gallery']) )
  {
      $sub_source = ('gallery/'.$VAR[17].''. base64_decode( $_GET['gallery'] ) .'.jpg');
  }


#24 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 07:43 PM

hi im stuck any clues please?? i know im close to finishing this now.

#25 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 08:19 PM

andy b can you think of anything that i should do here?

#26 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 08:58 PM

everyones ghone silent... any clues before i explode??

#27 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 September 2006 - 09:12 PM

where is that, or anywhere else, is the code that actually produces this stuff below:

<div style="padding-top:4px;padding-left:10px;"><input type="text" size="70" name="url" value="http://www..com/gallery/I/2005/01/01/510.jpg" /></div>

Unless you can identify that, there's no hope of ever getting the image name variable and being able to add it to your email script.  It's not a matter of everybody going silent (even though some people do have other things to do), it's all about not even getting close to the informaiton that's needed.
Legend has it that reading the manual never killed anyone.
My site

#28 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 09:27 PM

i thought the image.php had the code that i needed to add to my email page script??

#29 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 September 2006 - 09:31 PM

i thought the image.php had the code that i needed to add to my email page script??


Look at the code you posted for image.php and tell me what is the variable name for the image that will be displayed.  As far as I can tell, it isn't there any more than there's anything on that page that would echo the html that's wrapped around it.
Legend has it that reading the manual never killed anyone.
My site

#30 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 10:50 PM

hi andy the code for the variable is located in the gallery.php and here it is what do i need to do next with it??

*##############################
START IMAGE CLASS
##############################*/
$IMAGE2 = '<table style="margin-left:auto;margin-right:auto;"><tr><td>'."\n";

if ($b['rating'] >= '9.00') {

$IMAGE2 .= '<div class="pics2">'."\n";
$IMAGE2 .= '<div class="pics1">'.$LANG['116'].'</div>'."\n";
$IMAGE2 .= '</div>'."\n";

} elseif (checkdiff($b['time'],time(),"") == '17') {

$IMAGE2 .= '<div class="pics2">'."\n";
$IMAGE2 .= '<div class="pics1">'.$LANG['117'].'</div>'."\n";
$IMAGE2 .= '</div>'."\n";

}
$IMAGE2 .= "<div class=\"wrap1\">\n<div class=\"wrap2\">\n<div class=\"wrap3\">\n ".$IMAGELINK."\n";

$extra = $VAR[0]."/".$img2;

if (file_exists("".$VAR[5]."/".$img.""))
{
$IMAGE2 .= setIMAGE("".$VAR[0]."/$img",1,$extra,$b['width'],$b['height'],$b['id'],$newsize,$minussize);
}
else
{
if (file_exists("".$VAR[5]."/".$img2."")) {

$IMAGE2 .= setIMAGE("".$VAR[0]."/$img2",1,$extra,$b['width'],$b['height'],$b['id'],$newsize,$minussize);

} else {

$IMAGE2 .= '<img src="'.$VAR[0].'/images/noimage.jpg" alt="" width="120" height="90" />';

}
}

$IMAGE2 .= "</a>\n</div>\n</div>\n</div>\n</td>\n</tr>\n</table>\n";
/*##############################
END IMAGE CLASS
##############################*/



#31 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 10:53 PM

this might be useful too-

if ($NUM7 == '2') // TEXT MODE
{

$IMAGE .= '<td style="text-align:left;vertical-align;middle;" onmouseover="this.className=\'border14\';" onmouseout="this.className=\'\';"> '."\n";
$IMAGE .= '<table style="width:100%;"><tr><td style="width:60%;font-size:8pt;" class="color">'."\n";

if (is_int($i / 2))
{
if ($i != $TOTALG) { $newtr = 'class="border13"'; } else { $newtr = ''; }
}
else
{
$newtr = '';
}

if ($b['text'] == '') $b['text'] = "Untitled";
if ($b['gcatagory'] == '') $b['gcatagory'] = "All";

$IMAGE .= ''.$i.'. '.$IMAGELINK .''.$b['text'].'</a> '.$LANG['181'].' '.ulink($b['user']).' '."\n";
$IMAGE .= '</td><td style="width:20%;font-size:8pt;" class="color"> '.ucfirst($b['gcatagory']).' </td>'."\n";
$IMAGE .= '<td style="width:20%;font-size:8pt;" class="color"> '.date("M d, Y",$b['time']).' </td>'."\n";
$IMAGE .= '</tr></table>'."\n";
$IMAGE .= '</td></tr><tr '.$newtr.'>'."\n";

}
elseif ($NUM7 == '3') // INFOPIC MODE
{


$IMAGE .= '<td style="text-align:left;vertical-align;middle;">'."\n";
$IMAGE .= '<table style="width:100%;"><tr><td style="width:30%;text-align:center;">'."\n";

if (is_int($i / 2))
{
if ($i != $TOTALG) { $newtr = 'class="border13"'; } else { $newtr = ''; }
}
else
{
$newtr = '';
}

$IMAGE .= $IMAGE2;

if ($b['text'] == '') $b['text'] = "Untitled";
if ($b['gcatagory'] == '') $b['gcatagory'] = "All";


$IMAGE .= '</td><td style="width:70%;vertical-align:top;font-size:8pt;" class="color"> asd'."\n";

$newwidth = "";
$newheight = "";



$IMAGE .= '<b>'.$LANG['172'].'</b>: '.ulink($b['user']).' <br />'."\n";


$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG[183].'</b>: '.$b['text'].' </div>'."\n";
$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG['173'].'</b>: '.$b['view'].' </div>'."\n";
$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG['175'].'</b>: '.$b['comment'].' </div>'."\n";



if (file_exists("".$VAR[5]."/".$img2."")) {

list($newwidth, $newheight) = @getimagesize("".$VAR[5]."/".$img2."");

$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG['182'].'</b>: '.$newwidth.'x'.$newheight.' </div>'."\n";
$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG['184'].'</b>: '.newsize(filesize("".$VAR[5]."/".$img2."")).' </div>'."\n";

}


$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG['185'].'</b>: <div style="padding:4px;"><input type="text" size="70" name="url" value="'.$ilocation.'" /></div></div>'."\n";



$IMAGE .= '</td></tr></table>'."\n";
$IMAGE .= '</td></tr><tr '.$newtr.'>'."\n";


}
else // MAIN GALLERY MODE
{


$IMAGE .= '<td style="text-align:center;vertical-align;middle;"> '."\n";
$IMAGE .= '<table style="margin-left:auto;margin-right:auto;"><tr><td style="font-size:8pt;" class="color">'."\n";

$IMAGE .= $IMAGE2;

if (member_types2($VAR[4]) == '0') {

$IMAGE .= '<div>[ <a href="'.$VAR[0].'/admin/?action='.base64_encode('delete_image').'&amp;id='.base64_encode($b['id']).'">Delete</a> ] ';

if ($b['feature'] == '1') {

$IMAGE .= '[ <a href="'.$VAR[0].'/admin/?action='.base64_encode('remove_feature_image').'&amp;id='.base64_encode($b['id']).'&amp;return='.base64_encode($VAR[3]).'">Remove Feature</a> ]';

} else {

$IMAGE .= '[ <a href="'.$VAR[0].'/admin/?action='.base64_encode('feature_image').'&amp;id='.base64_encode($b['id']).'&amp;return='.base64_encode($VAR[3]).'">Feature</a> ]';

}

$IMAGE .= '</div>';


}


$IMAGE .= "</td>\n</tr>\n</table></td>\n".$tr."\n";



} // END IMAGE MODE

#32 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 September 2006 - 11:01 PM

Cripes. Do I have to read all that!!

If I did, I'd see that the very same chunk of html you're looking for is buried near the bottom:

    $IMAGE .= '<div style="padding-top:4px;">'.$LANG['185'].': <div style="padding:4px;"><input type="text" size="70" name="url" value="'.$ilocation.'" /></div></div>'."\n";

So it looks as if the full URL for the image is $ilocation.  And if that's right, then the message you want to send to your friend is something like:

echo "See my fabulous picture at ". $ilocation;

Legend has it that reading the manual never killed anyone.
My site

#33 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 11:16 PM

hi andy now i need to add this in to my send page to friend script below where will it need to go exactly?

sorry redarrow heres the mail code
thanks in advance -


<!doctype html public "-//w3c//dtd html 3.2//en">

<html>

<head>
<title>(.com)</title>

<meta name="GENERATOR" content="Arachnophilia 4.0">
<meta name="FORMATTER" content="Arachnophilia 4.0">
</head>

<body bgcolor="#330000" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<a href="http://www..com" target="_blank" ><BR><center><img src="http://.com/images/e...pagefriend.jpg" width="800" height="104" border="0" /></a>
<BR>
<BR>
<b>
<?
$status = "OK";
$msg="";
if (!stristr($y_email,"@") OR !stristr($y_email,".")) { // checking your email
$msg .="Your email address is not correct<BR>";
$status= "NOTOK";}

if (strlen($y_name) <2 ) { // checking your name
$msg .="Please enter your name<BR>";
$status= "NOTOK";}

if (!stristr($f_email,"@") OR !stristr($f_email,".")) { // checking friends email
$msg .="Your Friends address is not correct<BR>";
$status= "NOTOK";}

if (strlen($f_name) <2 ) { // checking freinds name
$msg .="Please enter your friend's name<BR>";
$status= "NOTOK";}

if (strlen($y_msg) <2 ) { // checking Message details
$msg .="Please enter your message details<BR>";
$status= "NOTOK";}




#34 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 11:18 PM

or can it go in this bit

the rest of the code is here http://pastebin.com/782116



#35 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 September 2006 - 11:54 PM

pastebin appears to have gone to the waste bin. I can't connect to it.  basically what you want to do is change wherever it says something like "please visit the page ". $url to "please look at my picture at ". $ilocation ... give it a try.
Legend has it that reading the manual never killed anyone.
My site

#36 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 03 September 2006 - 12:11 AM

hi andy i changed it to-

$ref=@$HTTP_REFERER;
/////Message at the top of the page showing the url////
$header_message = "Hi $f_name \n Your friend $y_name requested you to visit the page at $ilocation";
/// Body message prepared with the message entered by the user ////
$body_message =$header_message."\n".$y_msg."\n";

but now there is not a link at all being sent in this email?[

#37 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 03 September 2006 - 12:15 AM

for the record this used to read-

$ref=@$HTTP_REFERER;
/////Message at the top of the page showing the url////
$header_message = "Hi $f_name \n Your friend $y_name requested you to visit the page at \n $ref \n";
/// Body message prepared with the message entered by the user ////
$body_message =$header_message."\n".$y_msg."\n";
$body_message .="\n Get your FREE 25MB email address by visiting http://www..com";


#38 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 03 September 2006 - 12:49 AM

andy i have got the script working again by also changing-

$ref=@$HTTP_REFERER to $ilocation=@$HTTP_REFERER

but now again the url in the browser is being sent and i have full access to tamper with the account that sent the link?? What am i doing wrong?

#39 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 03 September 2006 - 11:46 AM

maybe this $ilocation is not the correct variable after all ...can any one think of anything?

#40 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 03 September 2006 - 07:18 PM

still going mad with this  ???so near yet so far any suggetion?? andy? :-\




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users