<html style="width: 398; height: 218">
<head>
<title>Insert Link</title>
<?PHP

#############################################################################
#                              Site@School
# Site@School is a website management system designed for schools.
#
# insert_link.php 
#$Id: insert_link.php,v 1.1 2006/10/03 12:27:15 fstuurman Exp $
############################################################################
include ("../../../configuration/database.inc.php"); // connecting to database
mysql_connect("$db_server", "$db_username", "$db_password");
mysql_select_db("$db_name");

$query = "SELECT config_value FROM $table_configuration where config_key='language'";
$result = mysql_query($query) or die_script(mysql_error());
$language = mysql_result($result, 0);
include ("../../../languages/$language/$language.php");
unset ($query);
unset ($result);
?>

<script type="text/javascript" src="popup.js"></script>

<script type="text/javascript">
var preview_window = null;

function Init() {
__dlg_init();
window.focus();
document.getElementById("l_text").focus();
};

function onOK() {
var required = {
"l_text": "You must enter the text",
"l_url": "Please enter the URL"
};
for (var i in required) {
var el = document.getElementById(i);
if (!el.value) {
alert(required[i]);
el.focus();
return false;
}
}
// pass data back to the calling window
var fields = ["l_text", "l_url", "l_target"];
var param = new Object();
for (var i in fields) {
var id = fields[i];
var el = document.getElementById(id);
param[id] = el.value;
}

__dlg_close(param);
return false;
};

function onCancel() {
if (preview_window) {
preview_window.close();
}
__dlg_close(null);
return false;
};
</script>

<style type="text/css">
html, body {
background: ButtonFace;
color: ButtonText;
font: 11px Tahoma,Verdana,sans-serif;
margin: 0px;
padding: 0px;
}
body { padding: 5px; }
table {
font: 11px Tahoma,Verdana,sans-serif;
}
form p {
margin-top: 5px;
margin-bottom: 5px;
}
.fl { width: 9em; float: left; padding: 2px 5px; text-align: right; }
.fr { width: 6em; float: left; padding: 2px 5px; text-align: right; }
fieldset { padding: 0px 10px 5px 5px; }
select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
button { width: 70px; }
.space { padding: 2px; }

.title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
border-bottom: 1px solid black; letter-spacing: 2px;
}
form { padding: 0px; margin: 0px; }
</style>

</head>

<body onload="Init()">

<div class="title">Insert Link</div>

<form action="" method="get">
<table border="0" width="100%" style="padding: 0px; margin: 0px">
<tbody>

<tr>
<td style="width: 7em; text-align: right">Link text:</td>
<td>
<input type="text" name="text" id="l_text" style="width:100%"
title="Enter the text for link" />
</td>
</tr>
<tr>
<td style="width: 7em; text-align: right">Link url:</td>
<td><input type="text" name="url" id="l_url" style="width:100%" 
title="Enter the link url" /></td>
</tr>
<tr>
<td style="width: 7em; text-align: right">Target:</td>
<td><select name="target" id="l_target" style="width:100%" title="Enter the target for link">
<option selected value="none">page standard</option>
<option value="_self">same frame</option>
<option value="_top">whole page</option>
<option value="_blank">new window</option>
<option value="_parent">parent frame</option>
</select></td>
</tr>
</tbody>
</table>
<TABLE><TR><TD VALIGN="BOTTOM">
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>&nbsp;
<button type="button" name="ok" onclick="return onOK();">OK</button>
</TD></TR></TABLE>
</form>
</body>
</html>