tengo el siguiente codigo en un test.php
Código PHP:
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="src/prototype.js" type="text/javascript"></script>
<script src="src/scriptaculous.js" type="text/javascript"></script>
</head>
<input type="text" id="autocomplete" name="autocomplete_parameter"/>
<div id="autocomplete_choices" class="autocomplete"></div>
<script type="text/javascript">
new Ajax.Autocompleter("autocomplete", "autocomplete_choices", "ajax.php?mode=tagsearch", {});
</script>
La pagina donde esta es vcs.php donde dependiend algiunos parametros del GET llama unas funciones o otras algo mas, voy a poner todo el codigo apra que me entiendan
en vcs.php tengo:
Código PHP:
<?php
if($screen == "claim" || $screen == ""){
claimVillages($playerId, $mode, $action, $player_access, $family);
}
elseif($screen == "history"){
printHistory($playerId, $link);
}
elseif($screen == "settings"){
screenSettings($playerId, $link, $mode, $action);
}
else{
echo "not implemented yet";
}
Código PHP:
<?php function screenSettings($id, $link, $mode, $action){
?>
<table class="main" width="840" align="center">
<tr>
<td style="padding:2px;">
<h2>Settings</h2>
<table>
<tr>
<td valign="top">
<table class="vis" width="100" align="left">
<tr><td <?php if($mode =="changepass" || $mode ==""){ echo 'class="selected";';} ?> width="100"><a href="vcs.php?screen=settings&mode=changepass">Change Password</a></td></tr>
<?php if($_SESSION["user"] == "AsgarothBelem"){ ?> <tr><td <?php if($mode =="addtribes" && $_SESSION["user"] == "AsgarothBelem"){ echo 'class="selected";';} ?> width="100"><a href="vcs.php?screen=settings&mode=addtribes">Add Tribes</a></td></tr><?php } ?>
</table>
</td>
<td valign="top" width="100%">
<?php
if($mode == "changepass" || $mode == ""){
if($action == "change"){
changePass($id, md5(addslashes($_POST["newpass"])), $_POST["oldpass"],$link);
}else{
showNewPassForm($link, "");
}
}elseif($mode == "addtribes" && $_SESSION["user"] == "AsgarothBelem"){
include("test.php");
//showAddtribeForm($link);
}
else echo "Unknown";
?>
</td>
</tr>
</table>
<br><p align="right" style="font-size: 7pt; margin-top:0px; margin-bottom:0px"><div class="closure">
<div align="right">© 2008 - 2008 Buup Solutions · <a href="buup.php">Contact</a>
</div>
</div>
</td>
</tr>
</table>
<?php
}
function showAddtribeForm($link){
include("test.php");
}