det fatter jeg intet af :)
skal jeg ikke lave en slags script der tager imod info fra min teksteditor til at skrive nyhedsbrevet i og kobler email + navn på og sender det ?
kode fra min opret nyhedsbrev side:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="../login.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<!--#include file="../../Connections/scandlines.asp" -->
<%
' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Request.QueryString
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert")) = "fHtmlEditor") Then
MM_editConnection = MM_scandlines_STRING
MM_editTable = "Nyhedsbreve"
MM_editRedirectUrl = "oversigt_nyhedsbreve.asp"
MM_fieldsStr = "EditorValue|value|Overskrift|value|Dato|value"
MM_columnsStr = "Tekst|',none,''|Overskrift|',none,''|Dato|',none,''"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert")) <> "") Then
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
%>
<html>
<head>
<title>Content Management System</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../include/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<script language="JavaScript" src="../include/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>
<body>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top"><table width="760" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="110" height="110" style="border:1px solid #CCCCCC;"><!--#include virtual="admin/include/logo.asp" --></td>
<td width="5"> </td>
<td style="border:1px solid #CCCCCC;"><!--#include virtual="admin/include/topmenu.asp" --></td>
</tr>
</table>
<table width="100%" height="5" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="110" valign="top">
<!--#include virtual="admin/include/menu_nyhedsbrev.asp" -->
</td>
<td width="5"> </td>
<td align="center" valign="top" style="border:1px solid #CCCCCC;">
<style type="text/css">
<!--
.clsCursor { cursor: hand}
-->
</style>
<script>
initToolBar("foo");
window.status = "Current View: Wysiwyg";
</script>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form ACTION="<%=MM_editAction%>" METHOD="POST" name="fHtmlEditor">
<textarea name="EditorValue" style="display: none;"></textarea>
<script language="JavaScript">
var errorString = "Sorry but this web page needs\nWindows95 and Internet Explorer 5 or above to view."
var Ok = "false";
var name = navigator.appName;
var version = parseFloat(navigator.appVersion);
var platform = navigator.platform;
if (platform == "Win32" && name == "Microsoft Internet Explorer" && version >= 4){
Ok = "true";
} else {
Ok= "false";
}
if (Ok == "false") {
alert(errorString);
}
function ColorPalette_OnClick(colorString){
cpick.bgColor=colorString;
document.all.colourp.value=colorString;
doFormat('ForeColor',colorString);
}
function initToolBar(ed) {
var eb = document.all.editbar;
if (ed!=null) {
eb._editor = window.frames['myEditor'];
}
}
function doFormat(what) {
var eb = document.all.editbar;
if(what == "FontName"){
if(arguments[1] != 1){
eb._editor.execCommand(what, arguments[1]);
document.all.font.selectedIndex = 0;
}
} else if(what == "FontSize"){
if(arguments[1] != 1){
eb._editor.execCommand(what, arguments[1]);
document.all.size.selectedIndex = 0;
}
} else {
eb._editor.execCommand(what, arguments[1]);
}
}
function swapMode() {
var eb = document.all.editbar._editor;
eb.swapModes();
}
function create() {
var eb = document.all.editbar;
eb._editor.newDocument();
}
function newFile(){
create();
}
function makeUrl(){
sUrl = document.all.what.value + document.all.url.value;
doFormat('CreateLink',sUrl);
}
function copyValue() {
var theHtml = "" + document.frames("myEditor").document.frames("textEdit").document.body.innerHTML + "";
document.all.EditorValue.value = theHtml;
}
function SwapView_OnClick(){
if(document.all.btnSwapView.value == "View Html"){
var sMes = "View Wysiwyg";
var sStatusBarMes = "Current View Html";
} else {
var sMes = "View Html"
var sStatusBarMes = "Current View Wysiwyg";
}
document.all.btnSwapView.value = sMes;
window.status = sStatusBarMes;
swapMode();
}
function Help_OnClick(){
window.open("../../images/admin/editor_images/help_document.htm","wHelp", "toolbar=0, scrollbars=yes, width=640, height=480");
}
function OnFormSubmit(){
if(confirm("Indholdet er ved at blive sendt til databasen\nEr du sikker på det er færdigt?")){
copyValue();
document.fHtmlEditor.submit();
}
}
</script>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" class="12BlackBold">Opret nyhedsbrev</td>
<td> </td>
</tr>
<tr>
<td width="150"> </td>
<td> </td>
</tr>
<tr>
<td class="10BlackNormal">Overskrift:</td>
<td><input name="Overskrift" type="text" class="fields" id="Overskrift"></td>
</tr>
<tr>
<td class="10BlackNormal">Dato:</td>
<td>
<input name="Dato" type="text" class="fields" id="Dato" value="<%= Date() %>">
</td>
</tr>
<tr>
<td class="10BlackNormal"> </td>
<td> </td>
</tr>
<tr>
<td width="150" class="10BlackNormal">Beskrivelse:</td>
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" cellspacing="0" cellpadding="0" bgcolor="" width="100%" bordercolor="">
<tr valign="top">
<td> <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr valign="top">
<td valign="top"> <div id=editbar >
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="left">
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <table border="0">
<tr>
<td nowrap valign="baseline">
<div align="left">
<img class='clsCursor' src="../../images/admin/editor_images/Bold.gif" width="16" height="16" border="0" align="absmiddle" alt="Fed" onClick="doFormat('Bold')"> 
<img class='clsCursor' src="../../images/admin/editor_images/Italics.gif" width="16" height="16" border="0" align="absmiddle" alt="Kursiv" onClick="doFormat('Italic')"> 
<img class='clsCursor' src="../../images/admin/editor_images/underline.gif" width="16" height="16" border="0" align="absmiddle" alt="Understregning" onClick="doFormat('Underline')" > 
<img class='clsCursor' src="../../images/admin/editor_images/left.gif" width="16" height="16" border="0" alt="Venstrejusteret" align="absmiddle" onClick="doFormat('JustifyLeft')">
<img class='clsCursor' src="../../images/admin/editor_images/centre.gif" width="16" height="16" border="0" alt="Centreret" align="absmiddle" onClick="doFormat('JustifyCenter')"> 
<img class='clsCursor' src="../../images/admin/editor_images/right.gif" width="16" height="16" border="0" alt="Højrejusteret" align="absmiddle" onClick="doFormat('JustifyRight')"> 
</div></td>
<td valign="baseline" nowrap><img class='clsCursor' src="../../images/admin/editor_images/Cut.gif" width="16" height="16" border="0" alt="Klip" onClick="doFormat('Cut')"> 
<img class='clsCursor' src="../../images/admin/editor_images/Copy.gif" width="16" height="16" border="0" alt="Kopier" onClick="doFormat('Copy')"> 
<img class='clsCursor' src="../../images/admin/editor_images/Paste.gif" border="0" alt="Indsæt" onClick="doFormat('Paste')" width="16" height="16"> </td>
<td nowrap valign="baseline"><img class='clsCursor' src="../../images/admin/editor_images/para_bul.gif" width="16" height="16" border="0" alt="Opstilling med punktform" onClick="doFormat('InsertUnorderedList');" > 
<img class='clsCursor' src="../../images/admin/editor_images/para_num.gif" width="16" height="16" border="0" alt="Opstilling med nummer" onClick="doFormat('InsertOrderedList');" > 
<img class='clsCursor' src="../../images/admin/editor_images/indent.gif" width="20" height="16" alt="Formindsk indrykning" onClick="doFormat('Indent')"> 
<img class='clsCursor' src="../../images/admin/editor_images/outdent.gif" width="20" height="16" alt="Forøg indrykning" onClick="doFormat('Outdent')"> 
<img class='clsCursor' src="../../images/admin/editor_images/hr.gif" width="16" height="18" alt="Horisontal linie" onClick="doFormat('InsertHorizontalRule')"></td>
<td nowrap valign="baseline"><table border="0">
<tr valign="baseline">
<td nowrap> </td>
<td nowrap>
<select name="what" style="font: 8pt verdana;">
<option value="
http://" selected>
http://</option> <option value="mailto:">mailto:</option>
<option value="
ftp://">ftp://</option> <option value="
https://">https://</option> </select>
</td>
<td> <input type="text" name="url" size="35" class="fields">
</td>
<td> <input type="button" name="button2" value="Tilføj" onClick="makeUrl();" class="buttons">
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</div></td>
</tr>
<tr valign="top" align="left">
<td valign="top"> <table width="100%" border="0" height="100%">
<tr valign="top">
<td width="100%" height="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr valign="top">
<td height="250" bgcolor="#FFFFFF">
<iframe id=myEditor src="../../images/admin/editor_images/pd_edit.htm" onfocus="initToolBar(this)" width=100% height=100%></iframe></td>
</tr>
</table></td>
<!-- COLORPICKER_GOES_HERE -->
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150"> </td>
<td> </td>
</tr>
<tr>
<td width="150"> </td>
<td align="right" class="10BlackNormal"><img class='clsCursor' src="../../images/admin/editor_images/save.jpg" width="24" height="24" border="0" alt="Gem" onClick="OnFormSubmit()";></td>
</tr>
<tr>
<td width="150"> </td>
<td> </td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="fHtmlEditor">
</form></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>