File size: 2.01Kb
<?php
/**
* Wap Portal русская версия
*
* Copyright (C) 2002 - 2005 Красников Виктор
*
* Wap Portal
* Developer: Красников Виктор - [email protected]
* Homepage: http://tut.spb.su
* Date: 05/05/2005
* Version #: 1.0
**/
// Add to database
if (isset($update)) {
// Replace quotes
if (!get_magic_quotes_gpc()) {
$elink = str_replace("'","\'",$elink);
$ejavascript = str_replace("'","\'",$ejavascript);
}
$query = "UPDATE wps_emulator SET javascript = '$ejavascript', link = '$elink' WHERE id = 1";
$result = mysql_query($query)
or die("Insert failed");
$update = 0;
}
?>
<table width="600">
<tr>
<td colspan="2"><a href='index.php' border=0>Home</a> > Emulator Settings</td>
</tr>
<tr>
<td align="center" width="75%"><b>Emulator Options</b></td>
<td align="center" width="25%"><b>Resources</b></td>
</tr>
<tr>
<td>
<?// Read news from mySQL database
$query = "SELECT * FROM wps_emulator WHERE id = 1";
$result = mysql_query($query);
$row = mysql_fetch_row($result);
?>
<form name="form" method="post" action="index.php?option=emulator">
<p><b>Javascript:</b><br>
<textarea name="ejavascript" cols="80" rows="10"><?echo $row[1];?></textarea>
<br>
<b>Link:</b><br>
<textarea name="elink" cols="80" rows="5"><?echo $row[2];?></textarea>
</p>
<input type="hidden" name="update" value="1">
<input type="submit" name="Submit" value="Submit">
</form>
</td>
<td valign="top"><b>Javascript:</b><br>
Script in the header to open the window and call the emulator.<br>
<br>
<b>Link:</b><br>
Link text in the body calling the javascript function.<br>
Use <b>$url</b> for default address and <b>$name</b> for default title.<br>
<br>
<?php
$common->setup_default_emulator();
$common->display_emulator();
?>
</td>
</tr>
</table>