Location: PHPKode > projects > MembersGear > membersgear/includes/getEmailContent.php
<?php
  require_once "../config/config.php";
  require_once "cannedemail_class.php";
  
  $loCannedEmail = new cannedemail_class();
  $temp = $_SERVER['QUERY_STRING'];
  $query = "SELECT * FROM ".TABLE_PREFIX."email_templates WHERE id=".($_GET['id']+0);

  $lsValues = array($_GET['id']+0);                                   
  
  $resultData = mysql_fetch_array(mysql_query($query)) or die(mysql_error());

  $hdnField = $_GET['hdn'];
  $txtField = $_GET['box'];
  //$resultData = $loCannedEmail->View($query,$lsValues);
  echo "<div class=\"formformat\">";
  echo "<h2 style=\"color:#000;margin-bottom:5px;width:100%;\">Detail</h2>";
  echo "<table cellspacing=\"0\" cellpadding=\"0\" style=\"width:900px;*width:100%;\">";

  echo "<tr>";
        echo "<td class=\"right-side-text\" style=\"width:200px\"><label>Name :</label></td>";
        echo "<td class=\"left-side-text\">".$resultData[1]."</td>";
  echo "</tr>";
  
  echo "<tr>";
        echo "<td class=\"right-side-text\"><label>Send To :</label></td>";
        echo "<td class=\"left-side-text\">".$resultData[3]."</td>";
  echo "</tr>";
  
  
  if($resultData[3] == 'User' or $resultData[3] == 'Both')
  {
      echo "<tr>";
        echo "<td class=\"right-side-text\"><label>User E-mail Subject :</label></td>";
        echo "<td class=\"left-side-text\" >".$resultData[8]."</td>";
      echo "</tr>";
  
      echo "<tr>";
            echo "<td class=\"right-side-text\"  valign=\"top\"><label>User E-mail Text :</label></td>";
            echo "<td class=\"left-side-text\">".$resultData[10] ."</td>";
      echo "</tr>";
  }    
  
  if($resultData[3] == 'Admin' or $resultData[3] == 'Both')
  {
      echo "<tr>";
        echo "<td class=\"right-side-text\"><label>Admin E-mail Subject :</label></td>";
        echo "<td class=\"left-side-text\">".$resultData[13]."</td>";
      echo "</tr>";
  
      echo "<tr>";
            echo "<td class=\"right-side-text\" valign=\"top\"><label>Admin E-mail Text :</label></td>";
            echo "<td class=\"left-side-text\" >".$resultData[14] ."</td>";
      echo "</tr>";
  }
  
  echo "<tr>";
        echo "<td style=\"text-align:center\" class=\"buttontd\" colspan=\"2\">";
        echo "<input type=\"button\" class=\"btncss\" value=\"Select\" name=\"select_this\" onclick=\"SelectEmail($resultData[0],'$resultData[1]','','')\">&nbsp;&nbsp;";
        echo "<input type=\"button\" class=\"btncss\" value=\"Edit\" name=\"edit_this\" onclick=\"EditMail($resultData[0],'$resultData[1]');\">&nbsp;&nbsp;";
        echo "</td>";
  echo "</tr>";
  
  echo "</table></div>";
?>
Return current item: MembersGear