Location: PHPKode > scripts > Uda Iskariot > uda-iskariot/hide_mail.php
<?
/******************************************************************
This class is for free for any allowed by your low use.
During using link at author (http://trader.poltav.com) is required.
By "AS IS" license.
Copyright Kaurov Eugene (Ukraine) hide@address.com
*******************************************************************/
require "./tr_inc.php";
require "./tr_dbaccess.php";
$tmp=@mysql_result(mysql_query("SELECT f_mail FROM tr_firms WHERE id='$id'"),0);
$tmp=trim($tmp);
if ($tmp)
{
	//your variable $tmp is text, for example 'hide@address.com'
	if ($action=='send')
	{
		Header("Location: mailto:$tmp");
		exit;
	}
	else
	{
		include("./uda_iskariot.class.php");
		$delo = new uda_iskariot($tmp,2,'#ffffff','#000000');
		$delo->display_mail();
	}
}
?>
<?
/*
sample of using:
I recommend to do it in such way
//****************** mysql table's structure
mysql_query("
			CREATE TABLE tr_firms
			(
                id int(12)   NOT NULL auto_increment,
 				f_mail       varchar(120) default NULL,
				PRIMARY KEY (id)
			)
			");
//*****************



//****************** html code at clien page:
<img src="hide_mail.php?id=10"> //only pictures width e-mail

//or (if you want allow send e-mail by one click)
print"<a href='./hide_mail.php?id=1&action=send' target=mailto_frame><img src='./hide_mail.php?id=1' border=0></a><IFRAME NAME='mailto_frame' width='0' height='0'></IFRAME>";
//******************

//****************** code of using class:
$tmp=@mysql_result(mysql_query("SELECT f_mail FROM tr_firms WHERE id='$id'"));
if ($tmp)
{
	//your variable $tmp is text, for example 'hide@address.com'
	include("uada_iskariot.class.php");
	$delo = new uda_iskariot($tmp,2,'#ffffff','#000000');
	$delo->display_mail();
}
//******************
*/

/*In Ukaraine
Äîðîã³ áðàòè-óêðà¿íö³! Öå ì³é ïåðøèé ñêðèïò íà php_classes, àëå ÿ ñïîä³âàþñÿ,
â³í áóäå âàì êîðèñíèé. Íàñ, óêðà¿íö³â, äóæå ìàëî ³ âíåñîê íàø ó ðîçâèòîê
²Ò-³íäóñò𳿠íàäçâè÷àéíî ìàëèé, ïðîòå ÿ ñïîä³âàþñÿ, ç Áîæîþ äîïîìîãîþ ³ ìè ñòàíåìî
â³äîìèìè ³ äîñÿãíåìî óñï³õó.

Äàíèé ñêðèïò çàõèùຠe-mail àäðåñè â³ä ñïàìåð³â-çáèðà÷³â áàç. Ñóòü ó òîìó, ùî
äóæå ÷àñòî íåîáõ³äí³ àäðåñè ìè çáåð³ãàºìî â mySQL-áàçàõ, â³äïîâ³äíî ìîæåìî
îòðèìóâàòè ¿õ çâ³äòè áåç â³äîìà ê볺íò³â. Çàëèøàºòüñÿ ëèøå çàáåçïå÷èòè â³äâ³äóâà÷à
çðó÷íèì ³ áåçïå÷í³ì â³ä ñïàìåð³â ñïîñîáîì. ß ïðîïîíóþ ïîêàçóâàòè éîãî ó âèãëÿä³
ìàëþíêó- òîä³ éîãî ìîæíà õ³áà â³äñêàíóâàòè (à öå äîñèòü âàæêî). Àëå ÿêùî ò³ëüêè
òàê ³ çàëèøèòè, òîä³ â³äâ³äóâà÷ó íåìຠìîæëèâîñò³ ïèñàòè ëèñòè îäíèì êë³êîì. Òîìó
ïðè êë³ö³ íà ë³íêó ÿ îêðåìèì ñêðèïòîì ôîðìóþ õ³äåð Header("Location: mailto:$tmp");
ùî ³ çàáåçïå÷óº çðó÷íå ïîñëàííÿ. Äëÿ òîãî, ùîá íå â³äêðèâàëîñÿ íîâå â³êíî, ïðîïèñóºìî
ôðåéì <IFRAME NAME='mailto_frame' width='0' height='0'></IFRAME>.
Ñàìå â³í ³ ñòàíîâèòü íà äàíèé ÷àñ íåáåçïåêó, ïðîòå íåçíà÷íó: ùîá çàõîïèòè e-mail
ñïàìåðó ñïî÷àòêó äîâåäåòüñÿ ïðî³í³ö³àë³çóâàòè êë³ê ïî ññèëö³.

Íåõàé çáåðåæå Ãîñïîäü íàøó äåðæàâó â³ä â³éíè!
15.11.2004ð.
************/
?>
Return current item: Uda Iskariot