Location: PHPKode > scripts > Linker IMG > linker-img/function/main_func.php
<?php

//======================================
// get permission
//======================================

function get_perms($file) {
   $p_bin = substr(decbin(fileperms($file)), -9) ;
   $p_arr = explode(".", substr(chunk_split($p_bin, 1,"."), 0, 17)) ;
   $perms = ""; $i = 0;
   foreach ($p_arr as $this) { 
      $p_char = ( $i%3==0 ? "r" : ( $i%3==1 ? "w" :"x" ) ); 
      $perms .= ( $this=="1" ? $p_char : "-" ) . ($i%3==2 ? " " : "" );
      $i++;
   }
   return $perms;
}

//======================================
// File size check
//======================================

function size_cut($string,$dotpo=1) {
	if ($string) 
	{
		if ($string>102.4 && $string <1024000) 
		$msg_size = number_format(($string/1024),$dotpo)."KB";
		else if ($string>=1024000) 
		$msg_size = number_format(($string/1024000),$dotpo)."MB";
		else 
		$msg_size = $string . "B";
	}
	return $msg_size;
}


//======================================
// Long text cut
//======================================

function text_cut($sub, $max) { 

$count = strlen($sub);
	if($count >= $max) { 
		for ($pos=$max;$pos>0 && ord($sub[$pos-1])>=127;$pos--); 
		if (($max-$pos)%2 == 0) 
		$sub = substr($sub, 0, $max)." ..."; 
		else 
		$sub = substr($sub, 0, $max+1)." ..."; 
	} 

return $sub;
}


//======================================
// htmlspecialchars
//======================================

function htmlspecial($string) {
//$string = str_replace("&","&amp;",$string);
//$string = str_replace("\"","&quot;",$string);
//$string = str_replace("\'","&#039;",$string);
$string = str_replace("<","&lt;",$string);
$string = str_replace(">","&gt;",$string);
return $string;
}

//======================================
// check email address
//======================================

function check_email($email) {

if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$", $email)) {



return false;
}
return $email;
}

//======================================
// Error message
//======================================

function errmsg($string) {
echo "<script> alert('$string');  history.back(); </script> "; exit;
}

function maxnum($table, $column) {
global $db;

$db->query("select MAX($column) as maxnum from $table");
if ($db->numrow>0) 
$max_row = $db->nrecord();
return $max_row[maxnum] + 1 ;

}

//======================================
// Operation time check
//======================================

function check_time($time1) {

$time2 = microtime(); 
$time1 = strchr($time1," ") .".". substr($time1 , 2,strpos($time1," ")-2); 
$time2 = strchr($time2," ") . "." . substr($time2 , 2,strpos($time2," ")-2); 

 $time = $time2 - $time1;
 echo "<br><br><hr size=1 color=#CCCCCC align=left width=100%>
<font size=2>$time</font>";

}


//======================================
// add http://
//======================================

function add_http($url)
{

	if (!eregi("^https?://", trim($url))) 
	$url = "http://" . $url ; 
    return $url;
}

//======================================
// Make category select box
//======================================

function view_category($return="",$relateview="",$compare="",$add_link="") 
{
global $db, $Ssepchar,$Sarrow;
	
	if (!$return) $return = "sid";
	
	if ($relateview) $add_query = "where relate<1";
	if ($add_link) $add_query = "where c_link ='1'";

	$db->query("select $return,pathtxt,relate from LINKER_CAT $add_query  order by pathtxt");

	for ($i=0 ; $i < $db->numrow ; $i++) 	{
	$view_row = $db->nrecord();
	$view_row[pathtxt] = str_replace($Ssepchar, $Sarrow , $view_row[pathtxt]);
	if ($compare && $view_row[$return]==$compare) 
	$view_cat .="<option value='$view_row[$return]' selected>$view_row[pathtxt]</option>\n";
	else
	$view_cat .="<option value='$view_row[$return]'>$view_row[pathtxt]</option>\n";
	}

return  $view_cat;
}


//======================================
// Make menu bar
//======================================

function show_menu($sid="") {

global  $tpl,$Sdomain,$l_m_array ;

$tpl->define(	array( menubar => "menu_bar.html" ) );

$handle = opendir("./lang");
while ($dirname = readdir($handle))
{

	if ($dirname <> "." && $dirname <> ".." && is_dir("./lang/$dirname")) 
	{
		$full_path = "lang/" . $dirname;
		$lang_op .= "<option value='$dirname'>". ucfirst($dirname) ."</option>\n";
	}
}
closedir($handle); 

$tpl->assign( array(
L_M_ADD		=>$l_m_array[add],
L_M_NEWS		=>$l_m_array[news],
L_M_COOL		=>$l_m_array[cool],
L_M_PICK		=>$l_m_array[pick],
L_M_TKWORD =>$l_m_array[tkword],
L_M_TREE		=>$l_m_array[tree],
ADD_HREF		=>"$Sdomain/add.php?sid=$sid",
LANG_OP		=> $lang_op
));

$tpl->parse(MENU_BAR, "menubar");
$tpl->clear(array("L_M_ADD","L_M_NEWS","L_M_COOL","L_M_PICK",
"L_M_TKWORD","L_M_ESEARCH","L_M_TREE","ADD_HREF"));
}

//======================================
// Get Location 
//======================================

function show_here($path="", $ext="", $title = "" )
{
	global  $Ssepchar, $Sarrow, $tpl;
	
	if (!$title) {
	$tpl->define(	array( here	 => "here.html" ) );
	$tpl->dyn_define( "row" , "here" );
	$path_ar = explode("/",$path);
	$ext_ar = explode($Ssepchar,$ext);
	$tpl->assign(array( SEPTER => $Sarrow ));

		for ($i=0 ; $i <count($path_ar) ; $i++) 
		{
			$tpl->assign(	array(
			HE_CAT		=>$path_ar[$i],
			HE_TITLE	=>	$ext_ar[$i]
			));
			
			$tpl->parse(HERE_ROW,".row");
		}	
	}
	else {
	$tpl->define(	array( here => "here_static.html" ) );
	$tpl->assign( array( HE_TITLE => $title ));
	}
	
	$tpl->parse(HERE, "here");
	$tpl->clear(array("HERE_ROW", "HE_CAT" , "HE_TITLE"));
	$tpl->dyn_clear("row");

}

//======================================
// Get search bar
//======================================

function show_search($catview="",$select="") {

global  $l_search, $l_cat,$l_count,$l_all_cat,$l_link,$l_this_cat,$l_ext_search,$l_error_nokword;
global  $tpl,$cat_count,$cat_path,$total_cat,$total_link;

$tpl->define( array( searchbar => "search_bar.html" ));
$tpl->dyn_define("serow1","searchbar");
$tpl->dyn_define("serow2","searchbar");

	if ($catview) {

		$tpl->assign(array(
		L_CAT			=> $l_cat,
		L_LINK			=> $l_link,
		L_COUNT		=> $l_count,
		CATANUM		=> $total_cat ,
		LINKNUM			=> $total_link ,
		COUNT			=> $cat_count
		));
		$tpl->parse("SROW1","serow1");
	}

	if ($select) {
		$tpl->assign(array(
		CATPATH		=> $cat_path,
		L_ALL_CAT		=> $l_all_cat,
		L_THIS_CAT	=> $l_this_cat
		));
		$tpl->parse("SROW2","serow2");
	}

$tpl->assign(array(
	L_SEARCH	=> $l_search,
	L_EXT_SEARCH => $l_ext_search,
	L_NOKWORD => $l_error_nokword 
	) );

$tpl->parse(SEARCHBAR, "searchbar");
$tpl->dyn_clear("serow1");
$tpl->dyn_clear("serow2");
$tpl->clear(array("L_ALL_CAT","L_THIS_CAT","CATANUM","CATPATH" ));

}


//======================================
// Get search result search bar
//======================================

function show_sebar () {

global $tpl, $viewtype,$mode, $self_file, $self_str, $page, $switch, $search_path, $kword,$HTTP_USER_AGENT  ;
global $l_search,$l_ext_search,$l_error_nokword,$l_search_result,$l_nail_view,$l_list_view,$l_slide_view;
global $c_title, $c_url, $c_name, $c_email, $c_scont, $c_lcont, $search_sid, $c_pagenum, $u_sort, $u_order, $c_sep;

$tpl->define( array( sebar => "search_sebar.html" ));

$viewstr = ($viewtype == "list") ?  $l_nail_view : $l_list_view ;
$viewrev = ($viewtype == "list") ?  "nail" : "list" ;
$ekword = (strstr($HTTP_USER_AGENT, "MSIE")) ? $kword : urlencode($kword);

$nail_url = "$self_file?switch=$mode&page=$page&viewtype=$viewrev&search_path=$search_path&kword=$ekword&c_title=$c_title&c_url=$c_url&c_name=$c_name&c_email=$c_email&c_scont=$c_scont&c_lcont=$c_lcont&search_sid=$search_sid&c_pagenum=$c_pagenum&u_sort=$u_sort&u_order=$u_order&c_sep=$c_sep";

$slide_url = "slide_show.php?switch=$self_str&search_path=$search_path&kword=$ekword&c_title=$c_title&c_url=$c_url&c_name=$c_name&c_email=$c_email&c_scont=$c_scont&c_lcont=$c_lcont&search_sid=$search_sid&c_pagenum=$c_pagenum&u_sort=$u_sort&u_order=$u_order&c_sep=$c_sep";

$tpl->assign(array(
	L_EXT_SEARCH	=> $l_ext_search,
	L_NOKWORD		=> $l_error_nokword,
	L_SE_RE			=> $l_search_result,
	L_SLIDE_VIEW		=> $l_slide_view,
	L_EXT_SEARCH	=> $l_ext_search,
	VIEWSTR 			=> $viewstr,
	NAILURL 			=> $nail_url,
	SLIDEURL 			=> $slide_url
	) );

$tpl->parse(SEARCH_SEBAR, "sebar");

}

//======================================
// Get Top new image
//======================================

function show_newimg()
{
	global $Snail_row, $tpl, $db, $l_recent;
	$tpl->define(array( newblock	=>	 "newimg_small.html" ));
	$tpl->dyn_define ( "newcol", "newblock" );

	$db->query("select sid,title,upfile from LINKER_LINK order by uptime desc limit $Snail_row");
	
	while ($row = $db->nrecord()) 
	{
		$row[title]= htmlspecial(stripslashes($row[title]));
		$row[title]= text_cut($row[title],15);
		$img_array = unserialize(stripslashes($row[upfile]));
		$tpl->assign(array( 
			IMG_UID => $img_array[1], 
			IMG_SID => $row[sid], 
			IMG_TITLE => $row[title] 
			));
		$tpl->parse("TROW",".newcol");
	}
	
	$tpl->assign("L_RECENT", $l_recent);
	$tpl->parse(NEWBLOCK, "newblock");
	$tpl->dyn_clear("newcol");
}

//======================================
// Get Top search keyword
//======================================

function show_tkword($number="")
{
	global $l_tkword,$tpl ,$db;
	
	$tpl->define(array( tkblock	=>	 "topkword_small.html" ));
	$tpl->dyn_define ( "tkcol", "tkblock" );

	if (!$number) $number = 5;
	$db->query("select count(kword) as count,kword from LINKER_TWORD 
	group by kword order by count desc,kword limit $number");
	
	$tpl->assign(array( "L_TKWORD" => $l_tkword ));

	while ($row = $db->nrecord()) 
	{
		$tpl->assign(array( T_KWORD => htmlspecial($row[kword]), T_EKWORD => urlencode($row[kword]) ) );
		$tpl->parse("TROW",".tkcol");
	}
	
	$tpl->assign( array( L_TKWORD	=> $l_tkword, TK_NUM => $number ));
	$tpl->parse(TKBLOCK, "tkblock");
	$tpl->clear(array("TROW","T_KWORD","L_TKWORD","TK_NUM"));
	$tpl->dyn_clear("tkcol");

}


//======================================
// LINK Order parse
//======================================

function show_linkbar() {

global  $tpl, $u_user1,$u_user2,$u_user3,$u_user4,$u_user5,$viewtype;
global  $l_s_array,$l_link,$l_list_view,$l_nail_view,$l_slide_view ;

$tpl->define(	array( linkbar => "link_bar.html" ));
$tpl->dyn_define ( "orform", "linkbar" );

$viewstr = ($viewtype == "list") ?  $l_nail_view : $l_list_view ;
$viewrev = ($viewtype == "list") ?  "nail" : "list" ;

$tpl->assign(array(
L_TITLE					=> $l_s_array[title],
L_NAME					=> $l_s_array[name],
L_SCONT				=> $l_s_array[scont],
L_COUNT				=> $l_s_array[counter],
L_UPTIME				=> $l_s_array[uptime],
L_ASC_ORDER		=> $l_s_array[ascorder],
L_DESC_ORDER		=> $l_s_array[descorder],
L_SORT					=> $l_s_array[sortinput],
L_LINK					=> $l_link,
L_SLIDE_VIEW			=> $l_slide_view,
VIEWSTR 				=> $viewstr,
VIEWREV 				=> $viewrev
));


for ($k=1 ;$k<=5 ;$k++) {
$u_name = ${"u_user" . $k};
$u_fname = "user". $k;

	if($u_name) {
	$tpl->assign( array(OR_NAME	=> $u_name, OR_RNAME	=> $u_fname ));
	$tpl->parse("ORROW", ".orform");
	}
}

$tpl->parse(LINKBAR,"linkbar");
$tpl->dyn_clear("orform");
$tpl->clear(array("L_TITLE","L_NAME","L_EMAIL","L_SCONT","L_COUNT","L_VISIT","L_UPTIME",
"L_ASC_ORDER","L_DESC_ORDER","L_SORT","ORROW","L_LINK","LINKNUM"));
}

//======================================
// Order parse
//======================================

function show_norder($extra_field="") {

global  $tpl,$TotalLink,$u_user1,$u_user2,$u_user3,$u_user4,$u_user5;
global  $viewtype,$self_file,$self_str,$type,$timestamp,$u_sort,$u_order,$page,$mode;
global  $l_s_array,$l_num, $l_search,$l_ext_search,$l_list_view,$l_nail_view,$l_slide_view;

$tpl->define(	array( order_form => "order_nbar.html" ));
$tpl->dyn_define ( "orform", "order_form" );

$viewstr = ($viewtype == "list") ?  $l_nail_view : $l_list_view ;
$viewrev = ($viewtype == "list") ?  "nail" : "list" ;

$nail_url = "$self_file?page=$page&viewtype=$viewrev&type=$type&switch=$mode&timestamp=$timestamp&u_sort=$u_sort&u_order=$u_order";
$slide_url = "slide_show.php?switch=$self_str&type=$type&timestamp=$timestamp&u_sort=$u_sort&u_order=$u_order";

$tpl->assign(array(
	L_NUM				=> $l_num,
	L_TITLE				=> $l_s_array[title],
	L_NAME				=> $l_s_array[name],
	L_EMAIL				=> $l_s_array[email],
	L_SCONT			=> $l_s_array[scont],
	L_COUNT			=> $l_s_array[counter],
	L_UPTIME			=> $l_s_array[uptime],
	L_ASC_ORDER	=> $l_s_array[ascorder],
	L_DESC_ORDER	=> $l_s_array[descorder],
	L_SORT				=> $l_s_array[sortinput],
	L_SEARCH			=> $l_search, 
	L_EXT_SEARCH	=> $l_ext_search,
	EXTRA_FIELD		=> $extra_field,
	L_SLIDE_VIEW		=> $l_slide_view,
	VIEWSTR 			=> $viewstr,
	NAILURL 			=> $nail_url,
	SLIDEURL 			=> $slide_url
) );

for ($k=1 ;$k<=5 ;$k++) {
$u_name = ${"u_user" . $k};
$u_fname = "user". $k;

	if($u_name) {
	$tpl->assign( array(SE_NAME	=> $u_name, SE_RNAME	=> $u_fname ));
	$tpl->parse("ORROW", ".orform");
	}
}

$tpl->parse(ORDERFORM,"order_form");
$tpl->dyn_clear("orform");
$tpl->clear(array("L_SEARCH_NUM","L_TITLE","L_NAME","L_EMAIL",
"L_SCONT", "L_COUNT","L_VISIT","L_UPTIME","L_ASC_ORDER","L_DESC_ORDER","L_SORT","ORROW" ));
}

//======================================
// Mailling list
//======================================

function show_mailling() {

global  $tpl,$l_mailling,$l_join,$l_out,$l_submit;

$tpl->define( array( mailform => "mail_small.html" ));

$tpl->assign(array(
L_MAILLING => $l_mailling,
L_JOIN	=> $l_join,
L_OUT	=> $l_out,
L_SUBMIT	=> $l_submit
));

$tpl->parse(MAILLING, "mailform");
$tpl->clear(array("L_MAILLING","L_JOIN","L_OUT","L_SUBMIT" ));

}

//======================================
// Link template assign
//======================================

function link_assign() {

global $tpl,$l_l_array, $Snail_width, $Snail_height,$l_source;

$tpl->assign(array(
L_VOTE			=> $l_l_array[vote],
L_COUNT		=> $l_l_array[counter],
L_VOTE_NUM => $l_l_array[vote_num],
L_COMMENT => $l_l_array[comment],
L_VOTE_AVE =>$l_l_array[vote_ave],
L_UPTIME		=> $l_l_array[uptime],
L_SOURCE		=> $l_source,
T_WIDTH  => $Snail_width,
T_HEIGHT  => $Snail_height
));

}

function link_unassign() {

global $tpl ;
$tpl->clear(array("L_REVIEW","L_VOTE","L_COUNT","L_VISIT","L_VOTE_NUM","L_COMMENT","L_VOTE_AVE","L_UPTIME" ));
}


//======================================
// Make LINK
//======================================

function  view_link($row,$string="",$prow="") {

global $Sdomain, $Stemplate ,$Ssepchar, $Sarrow, $Sfupload, $Scool_num, $tpl, $c_highpre, $c_highnext;

$row[title]=htmlspecial(stripslashes($row[title]));
$row[scont]=htmlspecial(stripslashes($row[scont]));
$row[user1]=htmlspecial(stripslashes($row[user1]));
$row[user2]=htmlspecial(stripslashes($row[user2]));
$row[user3]=htmlspecial(stripslashes($row[user3]));
$row[user4]=htmlspecial(stripslashes($row[user4]));
$row[user5]=htmlspecial(stripslashes($row[user5]));

$interval =ceil(( time() - $row[uptime])/86400);
$date = date("Y-m-d",$row[uptime]);
if ($interval<=1) $mark="<img src='$Sdomain/$Stemplate/image/new_1.gif'>";	
elseif ($interval<=3) $mark="<img src='$Sdomain/$Stemplate/image/new_3.gif'>";
elseif ($interval<=7) $mark="<img src='$Sdomain/$Stemplate/image/new_7.gif'>";

if ($row[c_pick]) $choice="<img src='$Sdomain/$Stemplate/image/choice.gif'>";
if ($row[count]>$Scool_num) $cool="<img src='$Sdomain/$Stemplate/image/cool.gif'>";


// average and total sum

for ($i=1; $i<=10 ;$i++) {
$vnum = "n".$i;
$vote +=$row[$vnum];
$total_sum += $i * $row[$vnum];
}

$temp_evere = ($vote)  ? $total_sum / $vote : 0 ;
$evere = number_format($temp_evere , 2);


$upfile = @unserialize(stripslashes($row[upfile]));
if (is_array($upfile)) 
$tpl->assign(array(
	DOWN	=> "<a href='download.php?sid=$row[sid]' title='$upfile[0] ($upfile[2])'><img src='$Stemplate/image/file.gif' border=0   align=absmiddle></a>",
	FORIGNAME	=>	 $upfile[0],
	FIMGNAME		=>	 $upfile[1],
	IMG_SIZE		=> size_cut($upfile[2]),
	IMG_WIDTH		=> $upfile[3],
	IMG_HEIGHT	=> $upfile[4]
));


// parent view
if ($prow) {
$path_ar = explode("/",$row[path]);
$txt_ar = explode($Ssepchar,$row[pathtxt]);

for ($i=0 ; $i <count($path_ar) ; $i++) 	{
$link_herear[] = "<a href='index.php?cat=$path_ar[$i]'><font color=gray class=midsmall>$txt_ar[$i]</font></a>";
}

$link_here = @implode($Sarrow,$link_herear);
}

$origin_url = $row[url];

// USER search keyword highlight
if ($string) {
$string = ereg_replace("/","\/",$string);
$row[title] = preg_replace("/$string/i", $c_highpre.$string.$c_highnext , $row[title]); 
$row[scont] = preg_replace("/$string/i", $c_highpre.$string.$c_highnext , $row[scont]); 
$row[url] = preg_replace("/$string/i", $c_highpre.$string.$c_highnext , $row[url]); 
}


$tpl->assign(array(
MARK				=> $mark,
CHOICE			=> $choice,
COOL			=> $cool,
LINK_NO			=> $row[sid],
LINK_TITLE		=> $row[title],
LINK_CTITLE	=> text_cut($row[title],15),
LINK_SOURCE	=> $row[url],
LINK_HERE		=> $link_here,
LINK_VOTE		=> $vote,
LINK_COM		=> $row[comment],
LINNK_EVOTE	=> $evere,
LINK_COUNT	=> $row[count],
LINK_VISIT	 	=> $row[visit],
LINK_SCONT	=> $row[scont],
LINK_UPTIME	=> $date,
USER1	=> $row[user1],
USER2	=> $row[user2],
USER3	=> $row[user3],
USER4	=> $row[user4],
USER5	=> $row[user5]
));

$tpl->parse("TEMPLINK","link_row");
$link = $tpl->simfetch("TEMPLINK");
$tpl->clear(array("TEMPLINK","DOWN","FIMGNAME","IMG_WIDTH","IMG_HEIGHT","IMG_SIZE"));

return $link;
}


//======================================
// Make Comment
//======================================

function  view_comment($row) {

global $Sdomain, $Stemplate , $tpl;


$row[name] = htmlspecial($row[name]);
$row[content] = htmlspecial($row[content]);

// make start image
for ($i=0;$i< floor($row[vote]/2);$i++) 
$com_star .= "<img src='$Sdomain/$Stemplate/image/star.gif' border=0 width=16 height=16>";

if ($row[vote]%2) 
$com_star .= "<img src='$Sdomain/$Stemplate/image/half_star.gif' border=0>";

if ($row[email]) $row[email] = "<a href='mailto:{$row[email]}'>$row[email]</a>";
if ($row[home]) $row[home] = "<a href='$row[home]' target='_new'>$row[home]</a>";

$row[content]=nl2br(htmlspecial(stripslashes($row[content])));
$date = date("Y/m/d",$row[uptime]);
$tpl->assign(array(
COM_SID			=> $row[sid],
COM_NAME		=> $row[name],
COM_IP				=> $row[ipaddr],
COM_STAR		=> $com_star,
COM_DATE		=> $date,
COM_CONTENT	=> $row[content]
));

$tpl->parse(T_COM,"comment");
$link = $tpl->simfetch("T_COM");
$tpl->clear("T_COM");
return $link;

}

//======================================
// URL Live check
//======================================

function url_live($url)  
{

// 000 : only http://
// 001 checkdnsrr error
// 002 fsockopen error
// other : http return code

if ($url == "http://") return "000";
$parsed = parse_url($url); 
$host = $parsed["host"];
$path = $parsed["path"];

if (!$path) $path = "/";


if (!(checkdnsrr($host,"A"))) return "001";

$fp = fsockopen ($host, 80,$errno, $errstr, 10) ;
if (!$fp) return "002";

fputs($fp,"GET $path HTTP/1.0\n\n");  

$line = fgets($fp, 1024);  
	 
	 if (eregi( "^http/[0-9]+.[0-9]+ ([0-9]{3}) [a-z ]*", $line)) {
	 $return =   trim(eregi_replace( "^http/[0-9]+.[0-9]+ ([0-9]{3}) [a-z ]*",  "\\1", $line));
	}
	else 	{
	$return = "000";
	}

fclose($fp);  
return $return;
}  


//======================================
// Send mail
//======================================

function send_mail($to,$sub,$mail_body,$html="") {

global $Sadmin_mail,$Scharset, $Ssite_name;

$sub=stripslashes($sub);
$mailbody .= stripslashes($mail_body) . "\n\n";
if ($html) $mailheaders .= "Content-Type: text/html; charset=$Scharset\n";
else $mailheaders .= "Content-Type: text/plain; charset=$Scharset\n";
//$mailheaders .= "Content-Transfer Encoding: 8bit\n";
$mailheaders .= "From: $Ssite_name Administrator<".$Sadmin_mail.">\n";
$mailheaders .= "Reply-To: $Sadmin_mail"."\n";
$mailheaders .= "X-Mailer: LINKER_MAILER";
@mail($to,$sub,$mailbody,$mailheaders);
}    


?>
Return current item: Linker IMG