| 1393 |
*/ |
*/ |
| 1394 |
function emailContentForm( $uid ) { |
function emailContentForm( $uid ) { |
| 1395 |
global $database, $mainframe, $my; |
global $database, $mainframe, $my; |
|
|
|
| 1396 |
$row = new mosContent( $database ); |
$row = new mosContent( $database ); |
| 1397 |
$row->load( $uid ); |
$row->load( $uid ); |
| 1398 |
|
|
| 1425 |
$subject_default = _EMAIL_INFO ." $yourname"; |
$subject_default = _EMAIL_INFO ." $yourname"; |
| 1426 |
$subject = trim( mosGetParam( $_POST, 'subject', $subject_default ) ); |
$subject = trim( mosGetParam( $_POST, 'subject', $subject_default ) ); |
| 1427 |
|
|
|
|
|
| 1428 |
$form_check = mosGetParam( $_POST, 'form_check', '' ); |
$form_check = mosGetParam( $_POST, 'form_check', '' ); |
| 1429 |
if (empty($_SESSION['_form_check_']['com_content']) || $form_check != $_SESSION['_form_check_']['com_content']) { |
if (empty($_SESSION['_form_check_']['com_content']) || $form_check != $_SESSION['_form_check_']['com_content']) { |
| 1430 |
// the form hasn't been generated by the server on this session |
// the form hasn't been generated by the server on this session |
| 1431 |
exit; |
exit; |
| 1432 |
} |
} |
|
|
|
| 1433 |
if ( !$email || !$youremail || ( is_email( $email ) == false ) || ( is_email( $youremail ) == false ) ) { |
if ( !$email || !$youremail || ( is_email( $email ) == false ) || ( is_email( $youremail ) == false ) ) { |
| 1434 |
echo "<script>alert (\"".T_('You must enter valid e-mail addresses for both yourself and your recipient.')."\"); window.history.go(-1);</script>"; |
echo "<script>alert (\"".T_('You must enter valid e-mail addresses for both yourself and your recipient.')."\"); window.history.go(-1);</script>"; |
| 1435 |
exit(0); |
exit(0); |
| 1441 |
|
|
| 1442 |
// link sent in email |
// link sent in email |
| 1443 |
$link = sefRelToAbs( $mosConfig_live_site .'/index.php?option=com_content&task=view&id='. $uid .'&Itemid='. $_Itemid ); |
$link = sefRelToAbs( $mosConfig_live_site .'/index.php?option=com_content&task=view&id='. $uid .'&Itemid='. $_Itemid ); |
|
|
|
| 1444 |
// message text |
// message text |
| 1445 |
$msg = sprintf( _EMAIL_MSG, $mosConfig_sitename, $yourname, $youremail, $link ); |
$msg = sprintf( _EMAIL_MSG, $mosConfig_sitename, $yourname, $youremail, $link ); |
| 1446 |
|
|