<?   session_start();ob_start();

	include("head.php");
	include("../include/db.inc.php");
	
	$db1=new db;
    $db1->open();mysql_query("SET NAMES 'utf8'");

		if($_SESSION['uname']=='' || $_SESSION['pwd']=='')
		{
			header("location:login.php");
		}
		if(isset($_POST['sub_mail'])){
		if($_POST['content_id']!=0){
		$ins="UPDATE `admin_mail` SET `invite_mail` = '".$_POST['invite_mail']."', `reg_mail` = '".$_POST['reg_mail']."',
		`confirm_reg_mail` = '".$_POST['confirm_reg_mail']."', `forget_mail` = '".$_POST['forget_mail']."', `wall_mail` = '".$_POST['wall_mail']."', 
		`feedback_mail` = '".$_POST['feedback_mail']."',`comment_blog_mail` = '".$_POST['comment_blog_mail']."',
		`comment_feedback_mail` = '".$_POST['comment_feedback_mail']."',`blog_mail` = '".$_POST['blog_mail']."'";
		 $qu=mysql_query($ins);
		 }else{
		 
		 mysql_query("insert into `admin_mail` SET `invite_mail` = '".$_POST['invite_mail']."', `reg_mail` = '".$_POST['reg_mail']."', 
		 `confirm_reg_mail` = '".$_POST['confirm_reg_mail']."', `forget_mail` = '".$_POST['forget_mail']."',  `wall_mail` = '".$_POST['wall_mail']."', 
		 `feedback_mail` = '".$_POST['feedback_mail']."',`comment_blog_mail` = '".$_POST['comment_blog_mail']."',
		`comment_feedback_mail` = '".$_POST['comment_feedback_mail']."',`blog_mail` = '".$_POST['blog_mail']."' ");
		 
		 	}
		 
			}
		$st="select * from admin_mail ";
		$qt=mysql_query($st);
		$rt=mysql_fetch_array($qt);
?>
<!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>Money Auctions | Admin Controls</title>
<link href="index.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
	tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		plugins : "spellchecker,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable",
		theme_advanced_buttons1_add_before : "save,newdocument,separator",
		theme_advanced_buttons1_add : "fontselect,fontsizeselect",
		theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",
		theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
		theme_advanced_buttons3_add_before : "tablecontrols,separator",
		theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,spellchecker",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_path_location : "bottom",
		content_css : "/example_data/example_full.css",
	    plugin_insertdate_dateFormat : "%Y-%m-%d",
	    plugin_insertdate_timeFormat : "%H:%M:%S",
		extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
		external_link_list_url : "example_data/example_link_list.js",
		external_image_list_url : "example_data/example_image_list.js",
		flash_external_list_url : "example_data/example_flash_list.js",
		file_browser_callback : "mcFileManager.filebrowserCallBack",
		theme_advanced_resize_horizontal : false,
		theme_advanced_resizing : true,
		apply_source_formatting : true,
		spellchecker_languages : "+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv"
	});
</script>
</head>
<body>
<div class="admin_wrapper">
  <div class="logo_show">
    <? include("minorlogout.php");?>
  </div>
  <div style="float:left; width:200px">
    <div class="topg_links_show">
      <? include("left.php");	?>
    </div>
    <div class="top_links_show">
      <? include("belowleft1.php");	?>
    </div>
  </div>
  <div style="float:left; width:800px">
    <div class="maximum">
      <table width="100%" border="0" cellpadding="0" cellspacing="10" style="margin-top:80px">
        <form name="addfrm" method="post" action=" " >
          <input type="hidden" name="content_id" value="<?=$rt['content_id']?>" />
          <tr>
            <td width="40%" >!! Invite Mail Contents!!</td>
            <td width="60%"><textarea type="text" name="invite_mail" style="width:700px; height:220px"><?=$rt['invite_mail']?>
</textarea></td>
          </tr>
          <tr>
            <td width="30%" >!! Registration Mail Contents!!</td>
            <td width="70%"><textarea type="text" name="reg_mail" style="width:700px; height:220px"><?=$rt['reg_mail']?>
</textarea></td>
          </tr>
          <tr>
            <td width="40%" >!! Confirm Registration Mail Contents!!</td>
            <td width="60%"><textarea type="text" name="confirm_reg_mail" style="width:700px; height:220px"><?=$rt['confirm_reg_mail']?>
</textarea></td>
          </tr>
          <tr>
            <td width="30%" >!! Forget Mail Contents!!</td>
            <td width="70%"><textarea type="text" name="forget_mail" style="width:700px; height:220px"><?=$rt['forget_mail']?>
</textarea></td>
          </tr>
          <tr>
            <td width="30%" >!! Wall Mail Contents!!</td>
            <td width="70%"><textarea type="text" name="wall_mail" style="width:700px; height:220px"><?=$rt['wall_mail']?>
</textarea></td>
          </tr>
          <tr>
            <td width="30%" >!! Feedback Mail Contents!!</td>
            <td width="70%"><textarea type="text" name="feedback_mail" style="width:700px; height:220px"><?=$rt['feedback_mail']?>
</textarea></td>
          </tr>
          <tr>
            <td width="30%" >!! Comment Blog Mail Contents!!</td>
            <td width="70%"><textarea type="text" name="comment_blog_mail" style="width:700px; height:220px"><?=$rt['comment_blog_mail']?>
</textarea></td>
          </tr>
          <tr>
            <td width="30%" >!! Comment Feedback Mail Contents!!</td>
            <td width="70%"><textarea type="text" name="comment_feedback_mail" style="width:700px; height:220px"><?=$rt['comment_feedback_mail']?>
</textarea></td>
          </tr>
          <tr>
            <td width="30%" >!! Blog Mail Contents!!</td>
            <td width="70%"><textarea type="text" name="blog_mail" style="width:700px; height:220px"><?=$rt['blog_mail']?>
</textarea></td>
          </tr>
          <tr>
            <td  colspan="2"><input type="submit" name="sub_mail" value="Submit" />
            </td>
          </tr>
        </form>
      </table>
    </div>
  </div>
  <div class="bottom_links_show">
    <? include("footer.php");	?>
  </div>

</html>
</div>
</body>
</html>
