
if((select count(*) from dbo.pal_Template where templateName = 'E-mail For Regional Moderation Subject Uploaded Template') = 0)
begin
INSERT INTO [dbo].[pal_Template]
           ([templateTypeId]
           ,[templateName]
           ,[templateContent])
     VALUES
           (11
           ,'E-mail For Regional Moderation Subject Uploaded Template'
           ,'
<!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>Email Template</title>          
    <style type="text/css">              
      body {              font-family:Trebuchet MS, Arial, Helvetica, sans-serif;              font-size: 12px;              }
      .noShow{
        display: none !important;
      }</style>      
  </head>      
  <body link="#BA4C14" alink="#BA4C14" class="RadEditorContentStyle">          
    <div>          
      <table style="border-collapse: collapse;" width="100%">              
        <tbody>                 
          <tr>                     
            <td align="left" valign="top">{logo}</td>     
          </tr>                  
          <tr>                      
            <td colspan="2"><br />Hi there<br /><br />                      
              <span class="{1stSpanClass}">A new school document has been uploaded into the postbox.<br/></span>
              <span class="{2ndSpanClass}">A new document has been uploaded to your school postbox.<br/></span>
              <br/>                      
              <strong>Main Section: </strong> {ParentFolder}<br/>                      
              <strong>Sub-folder Path:  </strong>{SubfolderPath}<br/>                     
              <strong>Document Name:  </strong>{FileName}<br/><br/>                      
              <span class="{schoolNameSpanClass}"><strong>School Name:  </strong>{SchoolName}<br/></span> <span class="{schoolTypeSpanClass}"><strong>School Type:  </strong>{SchoolType}<br/></span> 
              <strong>Subject Name:  </strong>{SubjectName}<br/> 
              <strong>Uploaded By:  </strong>{UploadedBy}<br/>                      
              <strong>Upload Date:  </strong>{UploadDate}<br/><br/>                                        Thank you,<br />IEB Team<br />                      
              <p>&nbsp;</p></td>
          </tr>              
        </tbody>          
      </table>          
    </div>     
  </body>  
</html>');
end;


if((select count(*) from dbo.pal_Template where templateName = 'E-mail For Regional Moderation Subject Uploaded Subject - to School') = 0)
begin
INSERT INTO [dbo].[pal_Template]
           ([templateTypeId]
           ,[templateName]
           ,[templateContent])
     VALUES
           (11
           ,'E-mail For Regional Moderation Subject Uploaded Subject - to School'
           ,'IEB Postbox - New Document Notice [{SubjectUniqueName}]');
end;

if((select count(*) from dbo.pal_Template where templateName = 'E-mail For Regional Moderation Subject Uploaded Subject - to Moderator') = 0)
begin
INSERT INTO [dbo].[pal_Template]
           ([templateTypeId]
           ,[templateName]
           ,[templateContent])
     VALUES
           (11
           ,'E-mail For Regional Moderation Subject Uploaded Subject - to Moderator'
           ,'IEB Postbox - New Document Notice [{SchoolPostboxName} - {SubjectUniqueName}]');
end;