Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/include/configuration/SshConfiguration.php
<?php

if(!isset($msg)){
if ($buttonID=="saveconfigs") {
 
	//GENERAL
  $opt->server_name=$_POST['server_name'];
  $opt->server_port=$_POST['server_port'];
  $opt->server_username=$_POST['server_username'];
  $opt->server_passwd=$_POST['server_passwd'];
  $opt->location_id=$_SESSION['locID'];
  $oreon->database->savesshconfiguration($opt);
  echo "Ssh configuration have been saved";
  
}

$opt=$oreon->database->getsshconfiguration($_SESSION['locID']);
if (!isset($opt['LocName'])) $opt['LocName']='';
if (!isset($opt['server_name'])) $opt['server_name']='';
if (!isset($opt['server_port'])) $opt['server_port']='';
if (!isset($opt['server_username'])) $opt['server_username']='';
if (!isset($opt['server_passwd'])) $opt['server_passwd']='';
echo "
<form action=\"phpmyprepaid.php\" method=\"post\">
<br>
<hr>
<big><big  style=\"font-family: Aircut\"><span style=\"font-weight: bold;\"><b>SSH configuration for location ".$_SESSION['LocName']."</span></b></big></big><br>
<table>
<tr>
<td>SSH server : </td>
<td><input name=\"server_name\" value=\"".$opt['server_name']."\"></td>
</tr><tr>
<td>SSH port : </td>
<td><input name=\"server_port\" value=\"".$opt['server_port']."\"></td>
</tr><tr>
<td>SSH username : </td>
<td><input name=\"server_username\" value=\"".$opt['server_username']."\"></td>
</tr><tr>
<td>SSH password : </td>
<td><input name=\"server_passwd\" value=\"".$opt['server_passwd']."\"></td>
<hr>

</tr>
</table>

<hr>
<input type=\"hidden\" name=\"buttonID\" value=\"saveconfigs\">
<input name=\"submit\" type=\"submit\" class=\"smallButton\"  value=\"Save Configuration\" >
</form>
";
}
else echo $msg;
Return current item: phpMyPrepaid